@rangka/client 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/components/ui/input-group.d.ts +1 -1
  2. package/dist/shell/assets/index-Dh7K40cQ.js +8634 -0
  3. package/dist/shell/assets/{vendor-query-dRdWN_eK.js → vendor-query-B2cydN5j.js} +1 -1
  4. package/dist/shell/assets/{vendor-radix-D-Trh8JA.js → vendor-radix-BJxYPxPb.js} +1 -1
  5. package/dist/shell/assets/{vendor-router-B1WM9yRc.js → vendor-router-ET_myMt5.js} +1 -1
  6. package/dist/shell/index.html +4 -4
  7. package/dist/widgets/components/register.d.ts.map +1 -1
  8. package/dist/widgets/components/register.js +58 -0
  9. package/dist/widgets/components/register.js.map +1 -1
  10. package/dist/widgets/loader.d.ts.map +1 -1
  11. package/dist/widgets/loader.js +2 -28
  12. package/dist/widgets/loader.js.map +1 -1
  13. package/package.json +2 -2
  14. package/dist/shell/assets/AttachmentWidget-BTTGroHP.js +0 -1
  15. package/dist/shell/assets/AttachmentsWidget-DZgvmO9P.js +0 -1
  16. package/dist/shell/assets/BadgeWidget-DN6GsAAG.js +0 -1
  17. package/dist/shell/assets/CardWidget-qX-UvqJh.js +0 -1
  18. package/dist/shell/assets/CheckboxWidget-CYPZ85ih.js +0 -1
  19. package/dist/shell/assets/CodeWidget-DnVtHG1d.js +0 -1
  20. package/dist/shell/assets/ColumnWidget-CYmFCVOf.js +0 -1
  21. package/dist/shell/assets/ComputedWidget-BQApkfir.js +0 -1
  22. package/dist/shell/assets/DatePickerWidget-pEusSy9D.js +0 -1
  23. package/dist/shell/assets/DatetimeWidget-M0fEGDTD.js +0 -1
  24. package/dist/shell/assets/DividerWidget-hXVGhIKC.js +0 -1
  25. package/dist/shell/assets/DrawerWidget-DynL7EIy.js +0 -1
  26. package/dist/shell/assets/DynamicLinkWidget-ChMJ5DAf.js +0 -1
  27. package/dist/shell/assets/IconWidget-Cgo9txq1.js +0 -1
  28. package/dist/shell/assets/ImageWidget-YUv1_OQK.js +0 -1
  29. package/dist/shell/assets/JsonWidget-RHUHhXHJ.js +0 -1
  30. package/dist/shell/assets/LinkWidget-CIu7qmb2.js +0 -1
  31. package/dist/shell/assets/ManyToManyWidget-DCQnygvZ.js +0 -1
  32. package/dist/shell/assets/ModalWidget-FggzYaS2.js +0 -1
  33. package/dist/shell/assets/MoneyWidget-CKjOSucD.js +0 -1
  34. package/dist/shell/assets/RepeatWidget-Dfp4zW4d.js +0 -1
  35. package/dist/shell/assets/ScrollAreaWidget-CdFdf4rv.js +0 -1
  36. package/dist/shell/assets/SequenceWidget-DIXHZslz.js +0 -1
  37. package/dist/shell/assets/SpacerWidget-BgM4dC6x.js +0 -1
  38. package/dist/shell/assets/SplitWidget-_mcQkjQk.js +0 -1
  39. package/dist/shell/assets/StackWidget-BI_VIreo.js +0 -1
  40. package/dist/shell/assets/TableWidget-DuIvd6qR.js +0 -1
  41. package/dist/shell/assets/TextareaWidget-CATua7Ls.js +0 -1
  42. package/dist/shell/assets/TreeWidget-BoHlhfza.js +0 -1
  43. package/dist/shell/assets/calendar-DqckiKt1.js +0 -1
  44. package/dist/shell/assets/index-D1wStSrO.js +0 -8635
  45. package/dist/shell/assets/popover-DywIKFaQ.js +0 -1
  46. package/dist/shell/assets/textarea-BVCZevA6.js +0 -1
  47. package/dist/shell/assets/useSurfaceContext-kzu9770H.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as E,j as M,R as _t,a as rs,b as Os}from"./vendor-radix-D-Trh8JA.js";var wt=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Zt(t){const s=E.useRef({value:t,prev:null}),e=s.current.value;return t!==e&&(s.current={value:t,prev:e}),s.current.prev}function Us(t,s,e={},n={}){E.useEffect(()=>{if(!t.current||n.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([r])=>{s(r)},e);return o.observe(t.current),()=>{o.disconnect()}},[s,e,n.disabled,t])}function Ws(t){const s=E.useRef(null);return E.useImperativeHandle(t,()=>s.current,[]),s}const is=!1;function Lt(t){return t[t.length-1]}function Hs(t){return typeof t=="function"}function rt(t,s){return Hs(t)?t(s):t}const as=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function cs(t){for(const s in t)if(as.call(t,s))return!0;return!1}const Vs=()=>Object.create(null),nt=(t,s)=>X(t,s,Vs);function X(t,s,e=()=>({}),n=0){if(t===s)return t;if(n>500)return s;const o=s,r=je(t)&&je(o);if(!r&&!(Ut(t)&&Ut(o)))return o;const i=r?t:Be(t);if(!i)return o;const c=r?o:Be(o);if(!c)return o;const l=i.length,u=c.length,f=r?new Array(u):e();let a=0;for(let d=0;d<u;d++){const h=r?d:c[d],p=t[h],g=o[h];if(p===g){f[h]=p,(r?d<l:as.call(t,h))&&a++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){f[h]=g;continue}const m=X(p,g,e,n+1);f[h]=m,m===p&&a++}return l===u&&a===l?t:f}function Be(t){const s=Object.getOwnPropertyNames(t);for(const o of s)if(!Ee.call(t,o))return!1;const e=Object.getOwnPropertySymbols(t);if(e.length===0)return s;const n=s;for(const o of e){if(!Ee.call(t,o))return!1;n.push(o)}return n}function Ut(t){if(!Ae(t))return!1;const s=t.constructor;if(typeof s>"u")return!0;const e=s.prototype;return!(!Ae(e)||!e.hasOwnProperty("isPrototypeOf"))}function Ae(t){return Object.prototype.toString.call(t)==="[object Object]"}function je(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function at(t,s,e){if(t===s)return!0;if(typeof t!=typeof s)return!1;if(Array.isArray(t)&&Array.isArray(s)){if(t.length!==s.length)return!1;for(let n=0,o=t.length;n<o;n++)if(!at(t[n],s[n],e))return!1;return!0}if(Ut(t)&&Ut(s)){const n=(e==null?void 0:e.ignoreUndefined)??!0;if(e!=null&&e.partial){for(const i in s)if((!n||s[i]!==void 0)&&!at(t[i],s[i],e))return!1;return!0}let o=0;if(!n)o=Object.keys(t).length;else for(const i in t)t[i]!==void 0&&o++;let r=0;for(const i in s)if((!n||s[i]!==void 0)&&(r++,r>o||!at(t[i],s[i],e)))return!1;return o===r}return!1}function vt(t){let s,e;const n=new Promise((o,r)=>{s=o,e=r});return n.status="pending",n.resolve=o=>{n.status="resolved",n.value=o,s(o),t==null||t(o)},n.reject=o=>{n.status="rejected",e(o)},n}function Ct(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function $s(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function De(t){let s;try{s=decodeURI(t)}catch{s=t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return $s(s)}const zs=["http:","https:","mailto:","tel:"];function Wt(t,s){if(!t)return!1;try{const e=new URL(t);return!s.has(e.protocol)}catch{return!1}}function Pt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const s=/%25|%5C/gi;let e=0,n="",o;for(;(o=s.exec(t))!==null;)n+=De(t.slice(e,o.index))+o[0],e=s.lastIndex;n=n+De(e?t.slice(e):t);let r=!1;return n.startsWith("//")&&(r=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:r}}function Ks(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Gs(t,s){if(t===s)return!0;if(t.length!==s.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==s[e])return!1;return!0}function q(){throw new Error("Invariant failed")}function It(t){const s=new Map;let e,n;const o=r=>{r.next&&(r.prev?(r.prev.next=r.next,r.next.prev=r.prev,r.next=void 0,n&&(n.next=r,r.prev=n)):(r.next.prev=void 0,e=r.next,r.next=void 0,n&&(r.prev=n,n.next=r)),n=r)};return{get(r){const i=s.get(r);if(i)return o(i),i.value},set(r,i){if(s.size>=t&&e){const l=e;s.delete(l.key),l.next&&(e=l.next,l.next.prev=void 0),l===n&&(n=void 0)}const c=s.get(r);if(c)c.value=i,o(c);else{const l={key:r,value:i,prev:n};n&&(n.next=l),n=l,e||(e=l),s.set(r,l)}},clear(){s.clear(),e=void 0,n=void 0}}}const Z=4,ls=5;function qs(t){const s=t.indexOf("{");if(s===-1)return null;const e=t.indexOf("}",s);return e===-1||s+1>=t.length?null:[s,e]}function us(t,s,e=new Uint16Array(6)){const n=t.indexOf("/",s),o=n===-1?t.length:n,r=t.substring(s,o);if(!r||!r.includes("$"))return e[0]=0,e[1]=s,e[2]=s,e[3]=o,e[4]=o,e[5]=o,e;if(r==="$"){const c=t.length;return e[0]=2,e[1]=s,e[2]=s,e[3]=c,e[4]=c,e[5]=c,e}if(r.charCodeAt(0)===36)return e[0]=1,e[1]=s,e[2]=s+1,e[3]=o,e[4]=o,e[5]=o,e;const i=qs(r);if(i){const[c,l]=i,u=r.charCodeAt(c+1);if(u===45){if(c+2<r.length&&r.charCodeAt(c+2)===36){const f=c+3,a=l;if(f<a)return e[0]=3,e[1]=s+c,e[2]=s+f,e[3]=s+a,e[4]=s+l+1,e[5]=o,e}}else if(u===36){const f=c+1,a=c+2;return a===l?(e[0]=2,e[1]=s+c,e[2]=s+f,e[3]=s+a,e[4]=s+l+1,e[5]=t.length,e):(e[0]=1,e[1]=s+c,e[2]=s+a,e[3]=s+l,e[4]=s+l+1,e[5]=o,e)}}return e[0]=0,e[1]=s,e[2]=s,e[3]=o,e[4]=o,e[5]=o,e}function Kt(t,s,e,n,o,r,i){var l,u,f,a,d,h,p,g,m,x;i==null||i(e);let c=n;{const v=e.fullPath??e.from,_=v.length,S=((l=e.options)==null?void 0:l.caseSensitive)??t,w=((f=(u=e.options)==null?void 0:u.params)==null?void 0:f.parse)??((a=e.options)==null?void 0:a.parseParams);for(;c<_;){const y=us(v,c,s);let P;const b=c,R=y[5];switch(c=R+1,r++,y[0]){case 0:{const L=v.substring(y[2],y[3]);if(S){const k=(d=o.static)==null?void 0:d.get(L);if(k)P=k;else{o.static??(o.static=new Map);const C=it(e.fullPath??e.from);C.parent=o,C.depth=r,P=C,o.static.set(L,C)}}else{const k=L.toLowerCase(),C=(h=o.staticInsensitive)==null?void 0:h.get(k);if(C)P=C;else{o.staticInsensitive??(o.staticInsensitive=new Map);const T=it(e.fullPath??e.from);T.parent=o,T.depth=r,P=T,o.staticInsensitive.set(k,T)}}break}case 1:{const L=v.substring(b,y[1]),k=v.substring(y[4],R),C=S&&!!(L||k),T=L?C?L:L.toLowerCase():void 0,F=k?C?k:k.toLowerCase():void 0,j=!w&&((p=o.dynamic)==null?void 0:p.find(B=>!B.parse&&B.caseSensitive===C&&B.prefix===T&&B.suffix===F));if(j)P=j;else{const B=te(1,e.fullPath??e.from,C,T,F);P=B,B.depth=r,B.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(B)}break}case 3:{const L=v.substring(b,y[1]),k=v.substring(y[4],R),C=S&&!!(L||k),T=L?C?L:L.toLowerCase():void 0,F=k?C?k:k.toLowerCase():void 0,j=!w&&((g=o.optional)==null?void 0:g.find(B=>!B.parse&&B.caseSensitive===C&&B.prefix===T&&B.suffix===F));if(j)P=j;else{const B=te(3,e.fullPath??e.from,C,T,F);P=B,B.parent=o,B.depth=r,o.optional??(o.optional=[]),o.optional.push(B)}break}case 2:{const L=v.substring(b,y[1]),k=v.substring(y[4],R),C=S&&!!(L||k),T=L?C?L:L.toLowerCase():void 0,F=k?C?k:k.toLowerCase():void 0,j=te(2,e.fullPath??e.from,C,T,F);P=j,j.parent=o,j.depth=r,o.wildcard??(o.wildcard=[]),o.wildcard.push(j)}}o=P}if(w&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){const y=it(e.fullPath??e.from);y.kind=ls,y.parent=o,r++,y.depth=r,o.pathless??(o.pathless=[]),o.pathless.push(y),o=y}const I=(e.path||!e.children)&&!e.isRoot;if(I&&v.endsWith("/")){const y=it(e.fullPath??e.from);y.kind=Z,y.parent=o,r++,y.depth=r,o.index=y,o=y}o.parse=w??null,o.priority=((x=(m=e.options)==null?void 0:m.params)==null?void 0:x.priority)??0,I&&!o.route&&(o.route=e,o.fullPath=e.fullPath??e.from)}if(e.children)for(const v of e.children)Kt(t,s,v,c,o,r,i)}function Qt(t,s){if(t.parse&&!s.parse)return-1;if(!t.parse&&s.parse)return 1;if(t.parse&&s.parse&&(t.priority||s.priority))return s.priority-t.priority;if(t.prefix&&s.prefix&&t.prefix!==s.prefix){if(t.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(t.prefix))return 1}if(t.suffix&&s.suffix&&t.suffix!==s.suffix){if(t.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(t.suffix))return 1}return t.prefix&&!s.prefix?-1:!t.prefix&&s.prefix?1:t.suffix&&!s.suffix?-1:!t.suffix&&s.suffix?1:t.caseSensitive&&!s.caseSensitive?-1:!t.caseSensitive&&s.caseSensitive?1:0}function Y(t){var s,e,n;if(t.pathless)for(const o of t.pathless)Y(o);if(t.static)for(const o of t.static.values())Y(o);if(t.staticInsensitive)for(const o of t.staticInsensitive.values())Y(o);if((s=t.dynamic)!=null&&s.length){t.dynamic.sort(Qt);for(const o of t.dynamic)Y(o)}if((e=t.optional)!=null&&e.length){t.optional.sort(Qt);for(const o of t.optional)Y(o)}if((n=t.wildcard)!=null&&n.length){t.wildcard.sort(Qt);for(const o of t.wildcard)Y(o)}}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}}function te(t,s,e,n,o){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:s,parent:null,parse:null,priority:0,caseSensitive:e,prefix:n,suffix:o}}function Js(t,s){const e=it("/"),n=new Uint16Array(6);for(const o of t)Kt(!1,n,o,1,e,0);Y(e),s.masksTree=e,s.flatCache=It(1e3)}function Ys(t,s){t||(t="/");const e=s.flatCache.get(t);if(e)return e;const n=ye(t,s.masksTree);return s.flatCache.set(t,n),n}function Xs(t,s,e,n,o){t||(t="/"),n||(n="/");const r=s?`case\0${t}`:t;let i=o.singleCache.get(r);return i||(i=it("/"),Kt(s,new Uint16Array(6),{from:t},1,i,0),o.singleCache.set(r,i)),ye(n,i,e)}function Zs(t,s,e=!1){const n=e?t:`nofuzz\0${t}`,o=s.matchCache.get(n);if(o!==void 0)return o;t||(t="/");let r;try{r=ye(t,s.segmentTree,e)}catch(i){if(i instanceof URIError)r=null;else throw i}return r&&(r.branch=ds(r.route)),s.matchCache.set(n,r),r}function Qs(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function to(t,s=!1,e){const n=it(t.fullPath),o=new Uint16Array(6),r={},i={};let c=0;return Kt(s,o,t,1,n,0,l=>{if(e==null||e(l,c),l.id in r&&q(),r[l.id]=l,c!==0&&l.path){const u=Qs(l.fullPath);(!i[u]||l.fullPath.endsWith("/"))&&(i[u]=l)}c++}),Y(n),{processedTree:{segmentTree:n,singleCache:It(1e3),matchCache:It(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}function ye(t,s,e=!1){const n=t.split("/"),o=so(t,n,s,e);if(!o)return null;const[r]=fs(t,n,o);return{route:o.node.route,rawParams:r}}function fs(t,s,e){var f,a,d,h,p,g,m,x,v,_;const n=eo(e.node);let o=null;const r=Object.create(null);let i=((f=e.extract)==null?void 0:f.part)??0,c=((a=e.extract)==null?void 0:a.node)??0,l=((d=e.extract)==null?void 0:d.path)??0,u=((h=e.extract)==null?void 0:h.segment)??0;for(;c<n.length;i++,c++,l++,u++){const S=n[c];if(S.kind===Z)break;if(S.kind===ls){u--,i--,l--;continue}const w=s[i],I=l;if(w&&(l+=w.length),S.kind===1){o??(o=e.node.fullPath.split("/"));const y=o[u],P=((p=S.prefix)==null?void 0:p.length)??0;if(y.charCodeAt(P)===123){const b=((g=S.suffix)==null?void 0:g.length)??0,R=y.substring(P+2,y.length-b-1),L=w.substring(P,w.length-b);r[R]=decodeURIComponent(L)}else{const b=y.substring(1);r[b]=decodeURIComponent(w)}}else if(S.kind===3){if(e.skipped&1<<c){i--,l=I-1;continue}o??(o=e.node.fullPath.split("/"));const y=o[u],P=((m=S.prefix)==null?void 0:m.length)??0,b=((x=S.suffix)==null?void 0:x.length)??0,R=y.substring(P+3,y.length-b-1),L=S.suffix||S.prefix?w.substring(P,w.length-b):w;L&&(r[R]=decodeURIComponent(L))}else if(S.kind===2){const y=S,P=t.substring(I+(((v=y.prefix)==null?void 0:v.length)??0),t.length-(((_=y.suffix)==null?void 0:_.length)??0)),b=decodeURIComponent(P);r["*"]=b,r._splat=b;break}}return e.rawParams&&Object.assign(r,e.rawParams),[r,{part:i,node:c,path:l,segment:u}]}function ds(t){const s=[t];for(;t.parentRoute;)t=t.parentRoute,s.push(t);return s.reverse(),s}function eo(t){const s=Array(t.depth+1);do s[t.depth]=t,t=t.parent;while(t);return s}function so(t,s,e,n){if(t==="/"&&e.index)return{node:e.index,skipped:0};const o=!Lt(s),r=o&&t!=="/",i=s.length-(o?1:0),c=[{node:e,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;c.length;){const f=c.pop(),{node:a,index:d,skipped:h,depth:p,statics:g,dynamics:m,optionals:x}=f;let{extract:v,rawParams:_}=f;if(a.kind===2&&a.route&&!Bt(u,f))continue;if(a.parse){if(!Fe(t,s,f))continue;_=f.rawParams,v=f.extract}n&&a.route&&a.kind!==Z&&Bt(l,f)&&(l=f);const S=d===i;if(S&&(a.route&&(!r||a.kind===Z||a.kind===2)&&Bt(u,f)&&(u=f),!a.optional&&!a.wildcard&&!a.index&&!a.pathless))continue;const w=S?void 0:s[d];let I;if(S&&a.index){const y={node:a.index,index:d,skipped:h,depth:p+1,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_};let P=!0;if(a.index.parse&&(Fe(t,s,y)||(P=!1)),P){if(!m&&!x&&!h&&oo(g,i))return y;Bt(u,y)&&(u=y)}}if(a.wildcard)for(let y=a.wildcard.length-1;y>=0;y--){const P=a.wildcard[y],{prefix:b,suffix:R}=P;if(!(b&&(S||!(P.caseSensitive?w:I??(I=w.toLowerCase())).startsWith(b)))){if(R){if(S)continue;const L=s.slice(d).join("/").slice(-R.length);if((P.caseSensitive?L:L.toLowerCase())!==R)continue}c.push({node:P,index:i,skipped:h,depth:p+1,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_})}}if(a.optional){const y=h|1<<p,P=p+1;for(let b=a.optional.length-1;b>=0;b--){const R=a.optional[b];c.push({node:R,index:d,skipped:y,depth:P,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_})}if(!S)for(let b=a.optional.length-1;b>=0;b--){const R=a.optional[b],{prefix:L,suffix:k}=R;if(L||k){const C=R.caseSensitive?w:I??(I=w.toLowerCase());if(L&&!C.startsWith(L)||k&&!C.endsWith(k))continue}c.push({node:R,index:d+1,skipped:h,depth:P,statics:g,dynamics:m,optionals:x+Et(i,d),extract:v,rawParams:_})}}if(!S&&a.dynamic&&w)for(let y=a.dynamic.length-1;y>=0;y--){const P=a.dynamic[y],{prefix:b,suffix:R}=P;if(b||R){const L=P.caseSensitive?w:I??(I=w.toLowerCase());if(b&&!L.startsWith(b)||R&&!L.endsWith(R))continue}c.push({node:P,index:d+1,skipped:h,depth:p+1,statics:g,dynamics:m+Et(i,d),optionals:x,extract:v,rawParams:_})}if(!S&&a.staticInsensitive){const y=a.staticInsensitive.get(I??(I=w.toLowerCase()));y&&c.push({node:y,index:d+1,skipped:h,depth:p+1,statics:g+Et(i,d),dynamics:m,optionals:x,extract:v,rawParams:_})}if(!S&&a.static){const y=a.static.get(w);y&&c.push({node:y,index:d+1,skipped:h,depth:p+1,statics:g+Et(i,d),dynamics:m,optionals:x,extract:v,rawParams:_})}if(a.pathless){const y=p+1;for(let P=a.pathless.length-1;P>=0;P--){const b=a.pathless[P];c.push({node:b,index:d,skipped:h,depth:y,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_})}}}if(u)return u;if(n&&l){let f=l.index;for(let d=0;d<l.index;d++)f+=s[d].length;const a=f===t.length?"/":t.slice(f);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(a),l}return null}function Et(t,s){return 2**(t-s-1)}function oo(t,s){return t===2**(s-1)-1}function Fe(t,s,e){let n,o;try{[n,o]=fs(t,s,e)}catch{return null}if(e.rawParams=n,e.extract=o,!e.node.parse)return!0;try{if(e.node.parse(n)===!1)return null}catch{}return!0}function Bt(t,s){return t?s.statics>t.statics||s.statics===t.statics&&(s.dynamics>t.dynamics||s.dynamics===t.dynamics&&(s.optionals>t.optionals||s.optionals===t.optionals&&((s.node.kind===Z)>(t.node.kind===Z)||s.node.kind===Z==(t.node.kind===Z)&&s.depth>t.depth))):!0}function Dt(t){return ve(t.filter(s=>s!==void 0).join("/"))}function ve(t){return t.replace(/\/{2,}/g,"/")}function hs(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function G(t){const s=t.length;return s>1&&t[s-1]==="/"?t.replace(/\/{1,}$/,""):t}function ps(t){return G(hs(t))}function Ht(t,s){return t!=null&&t.endsWith("/")&&t!=="/"&&t!==`${s}/`?t.slice(0,-1):t}function no(t,s,e){return Ht(t,e)===Ht(s,e)}function ro({base:t,to:s,trailingSlash:e="never",cache:n}){const o=s.startsWith("/"),r=!o&&s===".";let i;if(n){i=o?s:r?t:t+"\0"+s;const u=n.get(i);if(u)return u}let c;if(r)c=t.split("/");else if(o)c=s.split("/");else{for(c=t.split("/");c.length>1&&Lt(c)==="";)c.pop();const u=s.split("/");for(let f=0,a=u.length;f<a;f++){const d=u[f];d===""?f?f===a-1&&c.push(d):c=[d]:d===".."?c.pop():d==="."||c.push(d)}}c.length>1&&(Lt(c)===""?e==="never"&&c.pop():e==="always"&&c.push(""));const l=ve(c.join("/"))||"/";return i&&n&&n.set(i,l),l}function io(t){const s=new Map(t.map(o=>[encodeURIComponent(o),o])),e=Array.from(s.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(e,"g");return o=>o.replace(n,r=>s.get(r)??r)}function ee(t,s,e){const n=s[t];return typeof n!="string"?n:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(o=>Oe(o,e)).join("/"):Oe(n,e)}function Ne({path:t,params:s,decoder:e,...n}){let o=!1;const r=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:o};if(!t.includes("$"))return{interpolatedPath:t,usedParams:r,isMissingParams:o};const i=t.length;let c=0,l,u="";for(;c<i;){const f=c;l=us(t,f,l);const a=l[5];if(c=a+1,f===a)continue;const d=l[0];if(d===0){u+="/"+t.substring(f,a);continue}if(d===2){const h=s._splat;r._splat=h,r["*"]=h;const p=t.substring(f,l[1]),g=t.substring(l[4],a);if(!h){o=!0,(p||g)&&(u+="/"+p+g);continue}const m=ee("_splat",s,e);u+="/"+p+m+g;continue}if(d===1){const h=t.substring(l[2],l[3]);!o&&!(h in s)&&(o=!0),r[h]=s[h];const p=t.substring(f,l[1]),g=t.substring(l[4],a),m=ee(h,s,e)??"undefined";u+="/"+p+m+g;continue}if(d===3){const h=t.substring(l[2],l[3]),p=s[h];if(p==null)continue;r[h]=p;const g=t.substring(f,l[1]),m=t.substring(l[4],a),x=ee(h,s,e)??"";u+="/"+g+x+m;continue}}return t.endsWith("/")&&(u+="/"),{usedParams:r,interpolatedPath:u||"/",isMissingParams:o}}function Oe(t,s){const e=encodeURIComponent(t);return(s==null?void 0:s(e))??e}function N(t){return(t==null?void 0:t.isNotFound)===!0}function ao(t,s=String){const e=new URLSearchParams;for(const n in t){const o=t[n];o!==void 0&&e.set(n,s(o))}return e.toString()}function se(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function co(t){const s=new URLSearchParams(t),e=Object.create(null);for(const[n,o]of s.entries()){const r=e[n];r==null?e[n]=se(o):Array.isArray(r)?r.push(se(o)):e[n]=[r,se(o)]}return e}const lo=fo(JSON.parse),uo=ho(JSON.stringify,JSON.parse);function fo(t){return s=>{s[0]==="?"&&(s=s.substring(1));const e=co(s);for(const n in e){const o=e[n];if(typeof o=="string")try{e[n]=t(o)}catch{}}return e}}function ho(t,s){const e=typeof s=="function";function n(o){if(typeof o=="object"&&o!==null)try{return t(o)}catch{}else if(e&&typeof o=="string")try{return s(o),t(o)}catch{}return o}return o=>{const r=ao(o,n);return r?`?${r}`:""}}const ct="__root__";function po(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{}const s=new Headers(t.headers);t.href&&s.get("Location")===null&&s.set("Location",t.href);const e=new Response(null,{status:t.statusCode,headers:s});if(e.options=t,t.throw)throw e;return e}function W(t){return t instanceof Response&&!!t.options}const ue=t=>{var s;if(!t.rendered)return t.rendered=!0,(s=t.onReady)==null?void 0:s.call(t)},go=t=>t.stores.matchesId.get().some(s=>{var e;return(e=t.stores.matchStores.get(s))==null?void 0:e.get()._forcePending}),Gt=(t,s)=>!!(t.preload&&!t.router.stores.matchStores.has(s)),lt=(t,s,e=!0)=>{const n={...t.router.options.context??{}},o=e?s:s-1;for(let r=0;r<=o;r++){const i=t.matches[r];if(!i)continue;const c=t.router.getMatch(i.id);c&&Object.assign(n,c.__routeContext,c.__beforeLoadContext)}return n},Ue=(t,s)=>{if(!t.matches.length)return;const e=s.routeId,n=t.matches.findIndex(i=>i.routeId===t.router.routeTree.id),o=n>=0?n:0;let r=e?t.matches.findIndex(i=>i.routeId===e):t.firstBadMatchIndex??t.matches.length-1;r<0&&(r=o);for(let i=r;i>=0;i--){const c=t.matches[i];if(t.router.looseRoutesById[c.routeId].options.notFoundComponent)return i}return e?r:o},Q=(t,s,e)=>{var n,o,r;if(!(!W(e)&&!N(e)))throw W(e)&&e.redirectHandled&&!e.options.reloadDocument||(s&&((n=s._nonReactive.beforeLoadPromise)==null||n.resolve(),(o=s._nonReactive.loaderPromise)==null||o.resolve(),s._nonReactive.beforeLoadPromise=void 0,s._nonReactive.loaderPromise=void 0,s._nonReactive.error=e,t.updateMatch(s.id,i=>({...i,status:W(e)?"redirected":N(e)?"notFound":i.status==="pending"?"success":i.status,context:lt(t,s.index),isFetching:!1,error:e})),N(e)&&!e.routeId&&(e.routeId=s.routeId),(r=s._nonReactive.loadPromise)==null||r.resolve()),W(e)&&(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e))),e},gs=(t,s)=>{const e=t.router.getMatch(s);return!!(!e||e._nonReactive.dehydrated)},We=(t,s,e)=>{const n=lt(t,e);t.updateMatch(s,o=>({...o,context:n}))},Rt=(t,s,e)=>{var i,c;const{id:n,routeId:o}=t.matches[s],r=t.router.looseRoutesById[o];if(e instanceof Promise)throw e;t.firstBadMatchIndex??(t.firstBadMatchIndex=s),Q(t,t.router.getMatch(n),e);try{(c=(i=r.options).onError)==null||c.call(i,e)}catch(l){e=l,Q(t,t.router.getMatch(n),e)}t.updateMatch(n,l=>{var u,f;return(u=l._nonReactive.beforeLoadPromise)==null||u.resolve(),l._nonReactive.beforeLoadPromise=void 0,(f=l._nonReactive.loadPromise)==null||f.resolve(),{...l,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!t.preload&&!W(e)&&!N(e)&&(t.serialError??(t.serialError=e))},ms=(t,s,e,n)=>{var r;if(n._nonReactive.pendingTimeout!==void 0)return;const o=e.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Gt(t,s)&&(e.options.loader||e.options.beforeLoad||vs(e))&&typeof o=="number"&&o!==1/0&&(e.options.pendingComponent??((r=t.router.options)==null?void 0:r.defaultPendingComponent))){const i=setTimeout(()=>{ue(t)},o);n._nonReactive.pendingTimeout=i}},mo=(t,s,e)=>{const n=t.router.getMatch(s);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;ms(t,s,e,n);const o=()=>{const r=t.router.getMatch(s);r.preload&&(r.status==="redirected"||r.status==="notFound")&&Q(t,r,r.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(o):o()},yo=(t,s,e,n)=>{const o=t.router.getMatch(s);let r=o._nonReactive.loadPromise;o._nonReactive.loadPromise=vt(()=>{r==null||r.resolve(),r=void 0});const{paramsError:i,searchError:c}=o;i&&Rt(t,e,i),c&&Rt(t,e,c),ms(t,s,n,o);const l=new AbortController;let u=!1;const f=()=>{u||(u=!0,t.updateMatch(s,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:l})))},a=()=>{var S;(S=o._nonReactive.beforeLoadPromise)==null||S.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(s,w=>({...w,isFetching:!1}))};if(!n.options.beforeLoad){t.router.batch(()=>{f(),a()});return}o._nonReactive.beforeLoadPromise=vt();const d={...lt(t,e,!1),...o.__routeContext},{search:h,params:p,cause:g}=o,m=Gt(t,s),x={search:h,abortController:l,params:p,preload:m,context:d,location:t.location,navigate:S=>t.router.navigate({...S,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:m?"preload":g,matches:t.matches,routeId:n.id,...t.router.options.additionalContext},v=S=>{if(S===void 0){t.router.batch(()=>{f(),a()});return}(W(S)||N(S))&&(f(),Rt(t,e,S)),t.router.batch(()=>{f(),t.updateMatch(s,w=>({...w,__beforeLoadContext:S})),a()})};let _;try{if(_=n.options.beforeLoad(x),Ct(_))return f(),_.catch(S=>{Rt(t,e,S)}).then(v)}catch(S){f(),Rt(t,e,S)}v(_)},vo=(t,s)=>{const{id:e,routeId:n}=t.matches[s],o=t.router.looseRoutesById[n],r=()=>c(),i=()=>yo(t,e,s,o),c=()=>{if(gs(t,e))return;const l=mo(t,e,o);return Ct(l)?l.then(i):i()};return r()},So=(t,s,e)=>{var r,i,c,l,u,f;const n=t.router.getMatch(s);if(!n||!e.options.head&&!e.options.scripts&&!e.options.headers)return;const o={ssr:t.router.options.ssr,matches:t.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(i=(r=e.options).head)==null?void 0:i.call(r,o),(l=(c=e.options).scripts)==null?void 0:l.call(c,o),(f=(u=e.options).headers)==null?void 0:f.call(u,o)]).then(([a,d,h])=>({meta:a==null?void 0:a.meta,links:a==null?void 0:a.links,headScripts:a==null?void 0:a.scripts,headers:h,scripts:d,styles:a==null?void 0:a.styles}))},ys=(t,s,e,n,o)=>{const r=s[n-1],{params:i,loaderDeps:c,abortController:l,cause:u}=t.router.getMatch(e),f=lt(t,n),a=Gt(t,e);return{params:i,deps:c,preload:!!a,parentMatchPromise:r,abortController:l,context:f,location:t.location,navigate:d=>t.router.navigate({...d,_fromLocation:t.location}),cause:a?"preload":u,route:o,...t.router.options.additionalContext}},He=async(t,s,e,n,o)=>{var r,i,c,l,u;try{const f=t.router.getMatch(e);try{(!(is??t.router.isServer)||f.ssr===!0)&&Mt(o);const a=o.options.loader,d=typeof a=="function"?a:a==null?void 0:a.handler,h=d==null?void 0:d(ys(t,s,e,n,o)),p=!!d&&Ct(h);if((p||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||f._nonReactive.minPendingPromise)&&t.updateMatch(e,m=>({...m,isFetching:"loader"})),d){const m=p?await h:h;Q(t,t.router.getMatch(e),m),m!==void 0&&t.updateMatch(e,x=>({...x,loaderData:m}))}o._lazyPromise&&await o._lazyPromise;const g=f._nonReactive.minPendingPromise;g&&await g,o._componentsPromise&&await o._componentsPromise,t.updateMatch(e,m=>({...m,error:void 0,context:lt(t,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let d=a;if((d==null?void 0:d.name)==="AbortError"){if(f.abortController.signal.aborted){(r=f._nonReactive.loaderPromise)==null||r.resolve(),f._nonReactive.loaderPromise=void 0;return}t.updateMatch(e,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:lt(t,n)}));return}const h=f._nonReactive.minPendingPromise;h&&await h,N(a)&&await((c=(i=o.options.notFoundComponent)==null?void 0:i.preload)==null?void 0:c.call(i)),Q(t,t.router.getMatch(e),a);try{(u=(l=o.options).onError)==null||u.call(l,a)}catch(p){d=p,Q(t,t.router.getMatch(e),p)}!W(d)&&!N(d)&&await Mt(o,["errorComponent"]),t.updateMatch(e,p=>({...p,error:d,context:lt(t,n),status:"error",isFetching:!1}))}}catch(f){const a=t.router.getMatch(e);a&&(a._nonReactive.loaderPromise=void 0),Q(t,a,f)}},xo=async(t,s,e)=>{var h,p,g,m;async function n(x,v,_,S,w){const I=Date.now()-v.updatedAt,y=x?w.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??t.router.options.defaultStaleTime??0,P=w.options.shouldReload,b=typeof P=="function"?P(ys(t,s,o,e,w)):P,{status:R,invalid:L}=S,k=I>=y&&(!!t.forceStaleReload||S.cause==="enter"||_!==void 0&&_!==S.id);i=R==="success"&&(L||(b??k)),x&&w.options.preload===!1||(i&&!t.sync&&f?(c=!0,(async()=>{var C,T;try{await He(t,s,o,e,w);const F=t.router.getMatch(o);(C=F._nonReactive.loaderPromise)==null||C.resolve(),(T=F._nonReactive.loadPromise)==null||T.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){W(F)&&await t.router.navigate(F.options)}})()):R!=="success"||i?await He(t,s,o,e,w):We(t,o,e))}const{id:o,routeId:r}=t.matches[e];let i=!1,c=!1;const l=t.router.looseRoutesById[r],u=l.options.loader,f=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(gs(t,o)){if(!t.router.getMatch(o))return t.matches[e];We(t,o,e)}else{const x=t.router.getMatch(o),v=t.router.stores.matchesId.get()[e],_=((h=v&&t.router.stores.matchStores.get(v)||null)==null?void 0:h.routeId)===r?v:(p=t.router.stores.matches.get().find(w=>w.routeId===r))==null?void 0:p.id,S=Gt(t,o);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!t.sync&&!x.preload&&f)return x;await x._nonReactive.loaderPromise;const w=t.router.getMatch(o),I=w._nonReactive.error||w.error;I&&Q(t,w,I),w.status==="pending"&&await n(S,x,_,w,l)}else{const w=S&&!t.router.stores.matchStores.has(o),I=t.router.getMatch(o);I._nonReactive.loaderPromise=vt(),w!==I.preload&&t.updateMatch(o,y=>({...y,preload:w})),await n(S,x,_,I,l)}}const a=t.router.getMatch(o);c||((g=a._nonReactive.loaderPromise)==null||g.resolve(),(m=a._nonReactive.loadPromise)==null||m.resolve(),a._nonReactive.loadPromise=void 0),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0,c||(a._nonReactive.loaderPromise=void 0),a._nonReactive.dehydrated=void 0;const d=c?a.isFetching:!1;return d!==a.isFetching||a.invalid!==!1?(t.updateMatch(o,x=>({...x,isFetching:d,invalid:!1})),t.router.getMatch(o)):a};async function Ve(t){var d,h;const s=t,e=[];go(s.router)&&ue(s);let n;for(let p=0;p<s.matches.length;p++){try{const g=vo(s,p);Ct(g)&&await g}catch(g){if(W(g))throw g;if(N(g))n=g;else if(!s.preload)throw g;break}if(s.serialError||s.firstBadMatchIndex!=null)break}const o=s.firstBadMatchIndex??s.matches.length,r=n&&!s.preload?Ue(s,n):void 0,i=n&&s.preload?0:r!==void 0?Math.min(r+1,o):o;let c,l;for(let p=0;p<i;p++)e.push(xo(s,e,p));try{await Promise.all(e)}catch{const p=await Promise.allSettled(e);for(const g of p){if(g.status!=="rejected")continue;const m=g.reason;if(W(m))throw m;N(m)?c??(c=m):l??(l=m)}if(l!==void 0)throw l}const u=c??(n&&!s.preload?n:void 0);let f=s.firstBadMatchIndex!==void 0?s.firstBadMatchIndex:s.matches.length-1;if(!u&&n&&s.preload)return s.matches;if(u){const p=Ue(s,u);p===void 0&&q();const g=s.matches[p],m=s.router.looseRoutesById[g.routeId],x=(d=s.router.options)==null?void 0:d.defaultNotFoundComponent;!m.options.notFoundComponent&&x&&(m.options.notFoundComponent=x),u.routeId=g.routeId;const v=g.routeId===s.router.routeTree.id;s.updateMatch(g.id,_=>({..._,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),f=p,await Mt(m,["notFoundComponent"])}else if(!s.preload){const p=s.matches[0];p.globalNotFound||(h=s.router.getMatch(p.id))!=null&&h.globalNotFound&&s.updateMatch(p.id,g=>({...g,globalNotFound:!1,error:void 0}))}if(s.serialError&&s.firstBadMatchIndex!==void 0){const p=s.router.looseRoutesById[s.matches[s.firstBadMatchIndex].routeId];await Mt(p,["errorComponent"])}for(let p=0;p<=f;p++){const{id:g,routeId:m}=s.matches[p],x=s.router.looseRoutesById[m];try{const v=So(s,g,x);if(v){const _=await v;s.updateMatch(g,S=>({...S,..._}))}}catch(v){console.error(`Error executing head for route ${m}:`,v)}}const a=ue(s);if(Ct(a)&&await a,u)throw u;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function $e(t,s){const e=s.map(n=>{var o,r;return(r=(o=t.options[n])==null?void 0:o.preload)==null?void 0:r.call(o)}).filter(Boolean);if(e.length!==0)return Promise.all(e)}function Mt(t,s=Ft){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(n=>{const{id:o,...r}=n.options;Object.assign(t.options,r),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const e=()=>t._componentsLoaded?void 0:s===Ft?(()=>{if(t._componentsPromise===void 0){const n=$e(t,Ft);n?t._componentsPromise=n.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():$e(t,s);return t._lazyPromise?t._lazyPromise.then(e):e()}function vs(t){var s;for(const e of Ft)if((s=t.options[e])!=null&&s.preload)return!0;return!1}const Ft=["component","errorComponent","pendingComponent","notFoundComponent"];function Po(t){return{input:({url:s})=>{for(const e of t)s=fe(e,s);return s},output:({url:s})=>{for(let e=t.length-1;e>=0;e--)s=Ss(t[e],s);return s}}}function Ro(t){const s=ps(t.basepath),e=`/${s}`,n=t.caseSensitive?e:e.toLowerCase(),o=`${n}/`;return{input:({url:r})=>{const i=t.caseSensitive?r.pathname:r.pathname.toLowerCase();return i===n?r.pathname="/":i.startsWith(o)&&(r.pathname=r.pathname.slice(e.length)),r},output:({url:r})=>(r.pathname=Dt(["/",s,r.pathname]),r)}}function fe(t,s){var n;const e=(n=t==null?void 0:t.input)==null?void 0:n.call(t,{url:s});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return s}function Ss(t,s){var n;const e=(n=t==null?void 0:t.output)==null?void 0:n.call(t,{url:s});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return s}function bo(t,s){const{createMutableStore:e,createReadonlyStore:n,batch:o,init:r}=s,i=new Map,c=new Map,l=new Map,u=e(t.status),f=e(t.loadedAt),a=e(t.isLoading),d=e(t.isTransitioning),h=e(t.location),p=e(t.resolvedLocation),g=e(t.statusCode),m=e(t.redirect),x=e([]),v=e([]),_=e([]),S=n(()=>oe(i,x.get())),w=n(()=>oe(c,v.get())),I=n(()=>oe(l,_.get())),y=n(()=>x.get()[0]),P=n(()=>x.get().some(B=>{var $;return(($=i.get(B))==null?void 0:$.get().status)==="pending"})),b=n(()=>{var B;return{locationHref:h.get().href,resolvedLocationHref:(B=p.get())==null?void 0:B.href,status:u.get()}}),R=n(()=>({status:u.get(),loadedAt:f.get(),isLoading:a.get(),isTransitioning:d.get(),matches:S.get(),location:h.get(),resolvedLocation:p.get(),statusCode:g.get(),redirect:m.get()})),L=It(64);function k(B){let $=L.get(B);return $||($=n(()=>{const Re=x.get();for(const be of Re){const ft=i.get(be);if(ft&&ft.routeId===B)return ft.get()}}),L.set(B,$)),$}const C={status:u,loadedAt:f,isLoading:a,isTransitioning:d,location:h,resolvedLocation:p,statusCode:g,redirect:m,matchesId:x,pendingIds:v,cachedIds:_,matches:S,pendingMatches:w,cachedMatches:I,firstId:y,hasPending:P,matchRouteDeps:b,matchStores:i,pendingMatchStores:c,cachedMatchStores:l,__store:R,getRouteMatchStore:k,setMatches:T,setPending:F,setCached:j};T(t.matches),r==null||r(C);function T(B){ne(B,i,x,e,o)}function F(B){ne(B,c,v,e,o)}function j(B){ne(B,l,_,e,o)}return C}function oe(t,s){const e=[];for(const n of s){const o=t.get(n);o&&e.push(o.get())}return e}function ne(t,s,e,n,o){const r=t.map(c=>c.id),i=new Set(r);o(()=>{for(const c of s.keys())i.has(c)||s.delete(c);for(const c of t){const l=s.get(c.id);if(!l){const u=n(c);u.routeId=c.routeId,s.set(c.id,u);continue}l.routeId=c.routeId,l.get()!==c&&l.set(c)}Gs(e.get(),r)||e.set(r)})}var tt="__TSR_index",ze="popstate",Ke="beforeunload";function wo(t){let s=t.getLocation();const e=new Set,n=i=>{s=t.getLocation(),e.forEach(c=>c({location:s,action:i}))},o=i=>{t.notifyOnIndexChange??!0?n(i):s=t.getLocation()},r=async({task:i,navigateOpts:c,...l})=>{var a,d;if((c==null?void 0:c.ignoreBlocker)??!1){i();return}const u=((a=t.getBlockers)==null?void 0:a.call(t))??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(const h of u){const p=Vt(l.path,l.state);if(await h.blockerFn({currentLocation:s,nextLocation:p,action:l.type})){(d=t.onBlocked)==null||d.call(t);return}}i()};return{get location(){return s},get length(){return t.getLength()},subscribers:e,subscribe:i=>(e.add(i),()=>{e.delete(i)}),push:(i,c,l)=>{const u=s.state[tt];c=Ge(u+1,c),r({task:()=>{t.pushState(i,c),n({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:c})},replace:(i,c,l)=>{const u=s.state[tt];c=Ge(u,c),r({task:()=>{t.replaceState(i,c),n({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:c})},go:(i,c)=>{r({task:()=>{t.go(i),o({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{r({task:()=>{t.back((i==null?void 0:i.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{r({task:()=>{t.forward((i==null?void 0:i.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>s.state[tt]!==0,createHref:i=>t.createHref(i),block:i=>{var l;if(!t.setBlockers)return()=>{};const c=((l=t.getBlockers)==null?void 0:l.call(t))??[];return t.setBlockers([...c,i]),()=>{var f,a;const u=((f=t.getBlockers)==null?void 0:f.call(t))??[];(a=t.setBlockers)==null||a.call(t,u.filter(d=>d!==i))}},flush:()=>{var i;return(i=t.flush)==null?void 0:i.call(t)},destroy:()=>{var i;return(i=t.destroy)==null?void 0:i.call(t)},notify:n}}function Ge(t,s){s||(s={});const e=Se();return{...s,key:e,__TSR_key:e,[tt]:t}}function _o(t){var P,b;const s=typeof document<"u"?window:void 0,e=s.history.pushState,n=s.history.replaceState;let o=[];const r=()=>o,i=R=>o=R,c=(R=>R),l=(()=>Vt(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((P=s.history.state)!=null&&P.__TSR_key)&&!((b=s.history.state)!=null&&b.key)){const R=Se();s.history.replaceState({[tt]:0,key:R,__TSR_key:R},"")}let u=l(),f,a=!1,d=!1,h=!1,p=!1;const g=()=>u;let m,x;const v=()=>{m&&(y._ignoreSubscribers=!0,(m.isPush?s.history.pushState:s.history.replaceState)(m.state,"",m.href),y._ignoreSubscribers=!1,m=void 0,x=void 0,f=void 0)},_=(R,L,k)=>{const C=c(L);x||(f=u),u=Vt(L,k),m={href:C,state:k,isPush:(m==null?void 0:m.isPush)||R==="push"},x||(x=Promise.resolve().then(()=>v()))},S=R=>{u=l(),y.notify({type:R})},w=async()=>{if(d){d=!1;return}const R=l(),L=R.state[tt]-u.state[tt],k=L===1,C=L===-1,T=!k&&!C||a;a=!1;const F=T?"GO":C?"BACK":"FORWARD",j=T?{type:"GO",index:L}:{type:C?"BACK":"FORWARD"};if(h)h=!1;else{const B=r();if(typeof document<"u"&&B.length){for(const $ of B)if(await $.blockerFn({currentLocation:u,nextLocation:R,action:F})){d=!0,s.history.go(1),y.notify(j);return}}}u=l(),y.notify(j)},I=R=>{if(p){p=!1;return}let L=!1;const k=r();if(typeof document<"u"&&k.length)for(const C of k){const T=C.enableBeforeUnload??!0;if(T===!0){L=!0;break}if(typeof T=="function"&&T()===!0){L=!0;break}}if(L)return R.preventDefault(),R.returnValue=""},y=wo({getLocation:g,getLength:()=>s.history.length,pushState:(R,L)=>_("push",R,L),replaceState:(R,L)=>_("replace",R,L),back:R=>(R&&(h=!0),p=!0,s.history.back()),forward:R=>{R&&(h=!0),p=!0,s.history.forward()},go:R=>{a=!0,s.history.go(R)},createHref:R=>c(R),flush:v,destroy:()=>{s.history.pushState=e,s.history.replaceState=n,s.removeEventListener(Ke,I,{capture:!0}),s.removeEventListener(ze,w)},onBlocked:()=>{f&&u!==f&&(u=f)},getBlockers:r,setBlockers:i,notifyOnIndexChange:!1});return s.addEventListener(Ke,I,{capture:!0}),s.addEventListener(ze,w),s.history.pushState=function(...R){const L=e.apply(s.history,R);return y._ignoreSubscribers||S("PUSH"),L},s.history.replaceState=function(...R){const L=n.apply(s.history,R);return y._ignoreSubscribers||S("REPLACE"),L},y}function Lo(t){let s=t.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function Vt(t,s){const e=Lo(t),n=e.indexOf("#"),o=e.indexOf("?"),r=Se();return{href:e,pathname:e.substring(0,n>0?o>0?Math.min(n,o):n:o>0?o:e.length),hash:n>-1?e.substring(n):"",search:o>-1?e.slice(o,n===-1?void 0:n):"",state:s||{[tt]:0,key:r,__TSR_key:r}}}function Se(){return(Math.random()+1).toString(36).substring(7)}function mt(t,s){const e=s,n=t;return{fromLocation:e,toLocation:n,pathChanged:(e==null?void 0:e.pathname)!==n.pathname,hrefChanged:(e==null?void 0:e.href)!==n.href,hashChanged:(e==null?void 0:e.hash)!==n.hash}}const de=new WeakMap;var Co=class{constructor(t,s){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=>{var f;const n=this.options,o=this.basepath??(n==null?void 0:n.basepath)??"/",r=this.basepath===void 0,i=n==null?void 0:n.rewrite;if(this.options={...n,...e},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=io(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_o()),this.origin=this.options.origin,this.origin||(window!=null&&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 a;this.resolvePathCache=It(1e3),a=this.buildRouteTree(),this.setRoutes(a)}if(!this.stores&&this.latestLocation){const a=this.getStoreConfig(this);this.batch=a.batch,this.stores=bo(Mo(this.latestLocation),a),Uo(this)}let c=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(r||o!==l||i!==u){this.basepath=l;const a=[],d=ps(l);d&&d!=="/"&&a.push(Ro({basepath:l})),u&&a.push(u),this.rewrite=a.length===0?void 0:a.length===1?a[0]:Po(a),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((f=window.CSS)==null?void 0:f.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=()=>{const e=to(this.routeTree,this.options.caseSensitive,(n,o)=>{n.init({originalIndex:o})});return this.options.routeMasks&&Js(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,n)=>{const o={eventType:e,fn:n};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=e=>{this.subscribers.forEach(n=>{n.eventType===e.type&&n.fn(e)})},this.parseLocation=(e,n)=>{const o=({pathname:l,search:u,hash:f,href:a,state:d})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const x=this.options.parseSearch(u),v=this.options.stringifySearch(x);return{href:l+v+f,publicHref:l+v+f,pathname:Pt(l).path,external:!1,searchStr:v,search:nt(n==null?void 0:n.search,x),hash:Pt(f.slice(1)).path,state:X(n==null?void 0:n.state,d)}}const h=new URL(a,this.origin),p=fe(this.rewrite,h),g=this.options.parseSearch(p.search),m=this.options.stringifySearch(g);return p.search=m,{href:p.href.replace(p.origin,""),publicHref:a,pathname:Pt(p.pathname).path,external:!!this.rewrite&&p.origin!==this.origin,searchStr:m,search:nt(n==null?void 0:n.search,g),hash:Pt(p.hash.slice(1)).path,state:X(n==null?void 0:n.state,d)}},r=o(e),{__tempLocation:i,__tempKey:c}=r.state;if(i&&(!c||c===this.tempLocationKey)){const l=o(i);return l.state.key=r.state.key,l.state.__TSR_key=r.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:r}}return r},this.resolvePathWithBase=(e,n)=>ro({base:e,to:n.includes("//")?ve(n):n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,n,o)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:n},o):this.matchRoutesInternal(e,n),this.getMatchedRoutes=e=>To({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{const n=this.getMatch(e);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{var o;if(this.stores.pendingMatchStores.has(e))return;const n=(o=this.stores.matchStores.get(e))==null?void 0:o.get();n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(e)})},this.buildLocation=e=>{const n=(r={})=>{var L,k;const i=r._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(i);r.from;const l=r.unsafeRelative==="path"?i.pathname:r.from??c.fullPath,u=r.to?`${r.to}`:void 0,f=c.search,a=Object.assign(Object.create(null),c.params),d=(u==null?void 0:u.charCodeAt(0))===47?"/":this.resolvePathWithBase(l,"."),h=u?this.resolvePathWithBase(d,u):d,p=r.params===!1||r.params===null?Object.create(null):(r.params??!0)===!0?a:Object.assign(a,rt(r.params,a)),g=this.routesByPath[G(h)];let m;if(g)m=this.getRouteBranch(g);else if(h.includes("$"))m=[];else{const C=this.getMatchedRoutes(h);m=C.matchedRoutes,this.options.notFoundRoute&&(!C.foundRoute||C.foundRoute.path!=="/"&&C.routeParams["**"])&&(m=[...m,this.options.notFoundRoute])}if(m.length&&cs(p))for(const C of m){const T=((L=C.options.params)==null?void 0:L.stringify)??C.options.stringifyParams;if(T)try{Object.assign(p,T(p))}catch{}}const x=e.leaveParams?h:Pt(Ne({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=f;if(e._includeValidateSearch&&((k=this.options.search)!=null&&k.strict)){const C={};m.forEach(T=>{if(T.options.validateSearch)try{Object.assign(C,Nt(T.options.validateSearch,{...C,...v}))}catch{}}),v=C}v=ko({search:v,dest:r,destRoutes:m,_includeValidateSearch:e._includeValidateSearch}),v=nt(f,v);const _=this.options.stringifySearch(v),S=r.hash===!0?i.hash:r.hash?rt(r.hash,i.hash):void 0,w=S?`#${S}`:"";let I=r.state===!0?i.state:r.state?rt(r.state,i.state):{};I=X(i.state,I);const y=`${x}${_}${w}`;let P,b,R=!1;if(this.rewrite){const C=new URL(y,this.origin),T=Ss(this.rewrite,C);P=C.href.replace(C.origin,""),T.origin!==this.origin?(b=T.href,R=!0):b=T.pathname+T.search+T.hash}else P=Ks(y),b=P;return{publicHref:b,href:P,pathname:x,search:v,searchStr:_,state:I,hash:S??"",external:R,unmaskOnReload:r.unmaskOnReload}},o=(r={},i)=>{const c=n(r);let l=i?n(i):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const f=Ys(c.pathname,this.processedTree);if(f){Object.assign(u,f.rawParams);const{from:a,params:d,...h}=f.route,p=d===!1||d===null?Object.create(null):(d??!0)===!0?u:Object.assign(u,rt(d,u));i={from:e.from,...h,params:p},l=n(i)}}}return l&&(c.maskedLocation=l),c};return e.mask?o(e,{from:e.from,...e.mask}):o(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:n,...o})=>{let r;const i=()=>{const u=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(a=>{o.state[a]=this.latestLocation.state[a]});const f=at(o.state,this.latestLocation.state);return u.forEach(a=>{delete o.state[a]}),f},c=G(this.latestLocation.href)===G(o.href);let l=this.commitLocationPromise;if(this.commitLocationPromise=vt(()=>{l==null||l.resolve(),l=void 0}),c&&i())this.load();else{let{maskedLocation:u,hashScrollIntoView:f,...a}=o;u&&(a={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=o.replace?"REPLACE":"PUSH",this.history[r==="REPLACE"?"replace":"push"](a.publicHref,a.state,{ignoreBlocker:n})}return this._scroll.next=o.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:n,hashScrollIntoView:o,viewTransition:r,ignoreBlocker:i,href:c,...l}={})=>{if(c){const a=this.history.location.state.__TSR_index,d=Vt(c,{__TSR_index:e?a:a+1}),h=new URL(d.pathname,this.origin);l.to=fe(this.rewrite,h).pathname,l.search=this.options.parseSearch(d.search),l.hash=d.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const f=this.commitLocation({...u,viewTransition:r,replace:e,resetScroll:n,hashScrollIntoView:o,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:e,reloadDocument:n,href:o,publicHref:r,...i})=>{var l,u;let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(e!==void 0||!o){const a=this.buildLocation({to:e,...i});o=o??a.publicHref,r=r??a.publicHref}const f=!c&&r?r:o;if(Wt(f,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){const a=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const d of a)if(d!=null&&d.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...i,href:o,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const e=this.matchRoutes(this.latestLocation),n=this.stores.cachedMatches.get().filter(o=>!e.some(r=>r.id===o.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(n)})},this.load=async e=>{var u;const n=(u=e==null?void 0:e.action)==null?void 0:u.type;let o,r,i;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(f=>{this.startTransition(async()=>{var a;try{this.beforeLoad(),n?de.set(this.latestLocation,n):de.delete(this.latestLocation);const d=this.latestLocation,h=mt(d,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...h}),this.emit({type:"onBeforeLoad",...h}),await Ve({router:this,sync:e==null?void 0:e.sync,forceStaleReload:c.href===d.href,matches:this.stores.pendingMatches.get(),location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var v,_;let p=null,g=null,m=null,x=null;this.batch(()=>{const S=this.stores.pendingMatches.get(),w=S.length,I=this.stores.matches.get();p=w?I.filter(b=>!this.stores.pendingMatchStores.has(b.id)):null;const y=new Set;for(const b of this.stores.pendingMatchStores.values())b.routeId&&y.add(b.routeId);const P=new Set;for(const b of this.stores.matchStores.values())b.routeId&&P.add(b.routeId);g=w?I.filter(b=>!y.has(b.routeId)):null,m=w?S.filter(b=>!P.has(b.routeId)):null,x=w?S.filter(b=>P.has(b.routeId)):I,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(S),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]),this.clearExpiredCache())});for(const[S,w]of[[g,"onLeave"],[m,"onEnter"],[x,"onStay"]])if(S)for(const I of S)(_=(v=this.looseRoutesById[I.routeId].options)[w])==null||_.call(v,I)})})}})}catch(d){W(d)?(o=d,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):N(d)&&(r=d);const h=o?o.status:r?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(h),this.stores.redirect.set(o)})}this.latestLoadPromise===i&&((a=this.commitLocationPromise)==null||a.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.stores.matches.get().some(f=>f.status==="error")&&(l=500),l!==void 0&&this.stores.statusCode.set(l)},this.startViewTransition=e=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const r=this.latestLocation,i=this.stores.resolvedLocation.get(),c=typeof n.types=="function"?n.types(mt(r,i)):n.types;if(c===!1){e();return}o={update:e,types:c}}else o=e;document.startViewTransition(o)}else e()},this.updateMatch=(e,n)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(e);if(o){o.set(n);return}const r=this.stores.matchStores.get(e);if(r){r.set(n);return}const i=this.stores.cachedMatchStores.get(e);if(i){const c=n(i.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(l=>l.filter(u=>u!==e)):i.set(c)}})},this.getMatch=e=>{var n,o,r;return((n=this.stores.cachedMatchStores.get(e))==null?void 0:n.get())??((o=this.stores.pendingMatchStores.get(e))==null?void 0:o.get())??((r=this.stores.matchStores.get(e))==null?void 0:r.get())},this.invalidate=e=>{const n=o=>{var r;return((r=e==null?void 0:e.filter)==null?void 0:r.call(e,o))??!0?{...o,invalid:!0,...e!=null&&e.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(n)),this.stores.setCached(this.stores.cachedMatches.get().map(n)),this.stores.setPending(this.stores.pendingMatches.get().map(n))}),this.shouldViewTransition=!1,this.load({sync:e==null?void 0:e.sync})},this.getParsedLocationHref=e=>e.publicHref||"/",this.resolveRedirect=e=>{const n=e.headers.get("Location");if(!e.options.href||e.options._builtLocation){const o=e.options._builtLocation??this.buildLocation(e.options),r=this.getParsedLocationHref(o);e.options.href=r,e.headers.set("Location",r)}else if(n)try{const o=new URL(n);if(this.origin&&o.origin===this.origin){const r=o.pathname+o.search+o.hash;e.options.href=r,e.headers.set("Location",r)}}catch{}if(e.options.href&&!e.options._builtLocation&&Wt(e.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{const n=e==null?void 0:e.filter;n!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!n(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const e=Date.now(),n=o=>{const r=this.looseRoutesById[o.routeId];if(!r.options.loader)return!0;const i=(o.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:e-o.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=Mt,this.preloadRoute=async e=>{const n=e._builtLocation??this.buildLocation(e);let o=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:e});const r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),c=o.filter(l=>!i.has(l.id));if(c.length){const l=this.stores.cachedMatches.get();this.stores.setCached([...l,...c])}try{return o=await Ve({router:this,matches:o,location:n,preload:!0,updateMatch:(l,u)=>{r.has(l)?o=o.map(f=>f.id===l?u(f):f):this.updateMatch(l,u)}}),o}catch(l){if(W(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:n});N(l)||console.error(l);return}},this.matchRoute=(e,n)=>{const o={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(o);if(n!=null&&n.pending&&this.stores.status.get()!=="pending")return!1;const i=((n==null?void 0:n.pending)===void 0?!this.stores.isLoading.get():n.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=Xs(r.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,i.pathname,this.processedTree);return!c||e.params&&!at(c.rawParams,e.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?at(i.search,r.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status==="notFound"||e.globalNotFound),this.getStoreConfig=s,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??uo,parseSearch:t.parseSearch??lo,protocolAllowlist:t.protocolAllowlist??zs}),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:s,processedTree:e}){this.routesById=t,this.routesByPath=s,this.processedTree=e;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(t){let s=this.routeBranchCache.get(t);return s||(s=ds(t),this.routeBranchCache.set(t,s)),s}get looseRoutesById(){return this.routesById}getParentContext(t){return t!=null&&t.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,s){var f,a;const e=this.getMatchedRoutes(t.pathname),{foundRoute:n,routeParams:o}=e;let{matchedRoutes:r}=e,i=!1;(n?n.path!=="/"&&o["**"]:G(t.pathname))&&(this.options.notFoundRoute?r=[...r,this.options.notFoundRoute]:i=!0);const c=i?Bo(this.options.notFoundMode,r):void 0,l=new Array(r.length),u=new Map;for(const d of this.stores.matchStores.values())d.routeId&&u.set(d.routeId,d.get());for(let d=0;d<r.length;d++){const h=r[d],p=l[d-1];let g,m,x;{const T=(p==null?void 0:p.search)??t.search,F=(p==null?void 0:p._strictSearch)??void 0;try{const j=Nt(h.options.validateSearch,{...T})??void 0;g={...T,...j},m={...F,...j},x=void 0}catch(j){let B=j;if(j instanceof $t||(B=new $t(j.message,{cause:j})),s!=null&&s.throwOnError)throw B;g=T,m={},x=B}}const v=((a=(f=h.options).loaderDeps)==null?void 0:a.call(f,{search:g}))??"",_=v?JSON.stringify(v):"",{interpolatedPath:S,usedParams:w}=Ne({path:h.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),I=h.id+S+_,y=this.getMatch(I),P=u.get(h.id),b=(y==null?void 0:y._strictParams)??w;let R;if(!y)try{qe(h,b)}catch(T){if(N(T)||W(T)?R=T:R=new Io(T.message,{cause:T}),s!=null&&s.throwOnError)throw R}Object.assign(o,b);const L=P?"stay":"enter";let k;if(y)k={...y,cause:L,params:(P==null?void 0:P.params)??o,_strictParams:b,search:nt(P?P.search:y.search,g),_strictSearch:m};else{const T=h.options.loader||h.options.beforeLoad||h.lazyFn||vs(h)?"pending":"success";k={id:I,ssr:h.options.ssr,index:d,routeId:h.id,params:(P==null?void 0:P.params)??o,_strictParams:b,pathname:S,updatedAt:Date.now(),search:P?nt(P.search,g):g,_strictSearch:m,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:vt()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:P?X(P.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}s!=null&&s.preload||(k.globalNotFound=c===h.id),k.searchError=x;const C=this.getParentContext(p);k.context={...C,...k.__routeContext,...k.__beforeLoadContext},l[d]=k}for(let d=0;d<l.length;d++){const h=l[d],p=this.looseRoutesById[h.routeId],g=this.getMatch(h.id),m=u.get(h.routeId);if(h.params=m?nt(m.params,o):o,!g){const x=l[d-1],v=this.getParentContext(x);if(p.options.context){const _={deps:h.loaderDeps,params:h.params,context:v??{},location:t,navigate:S=>this.navigate({...S,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:l,routeId:p.id};h.__routeContext=p.options.context(_)??void 0}h.context={...v,...h.__routeContext,...h.__beforeLoadContext}}}return l}matchRoutesLightweight(t){var u;const{matchedRoutes:s,routeParams:e}=this.getMatchedRoutes(t.pathname),n=Lt(s),o={...t.search};for(const f of s)try{Object.assign(o,Nt(f.options.validateSearch,o))}catch{}const r=Lt(this.stores.matchesId.get()),i=r&&((u=this.stores.matchStores.get(r))==null?void 0:u.get()),c=i&&i.routeId===n.id&&i.pathname===t.pathname;let l;if(c)l=i.params;else{const f=Object.assign(Object.create(null),e);for(const a of s)try{qe(a,f)}catch{}l=f}return{matchedRoutes:s,fullPath:n.fullPath,search:o,params:l}}},$t=class extends Error{},Io=class extends Error{};function Mo(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Nt(t,s){if(t==null)return{};if("~standard"in t){const e=t["~standard"].validate(s);if(e instanceof Promise)throw new $t("Async validation not supported");if(e.issues)throw new $t(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(s):typeof t=="function"?t(s):{}}function To({pathname:t,routesById:s,processedTree:e}){const n=Object.create(null),o=G(t);let r;const i=Zs(o,e,!0);return i&&(r=i.route,Object.assign(n,i.rawParams)),{matchedRoutes:(i==null?void 0:i.branch)||[s.__root__],routeParams:n,foundRoute:r}}function ko({search:t,dest:s,destRoutes:e,_includeValidateSearch:n}){return Eo(e)(t,s,n??!1)}function Eo(t){var r;let s,e;const n=[];for(const i of t){const c=i.options;if("search"in c)(r=c.search)!=null&&r.middlewares&&n.push(...c.search.middlewares);else if(c.preSearchFilters||c.postSearchFilters){const u=({search:f,next:a})=>{const d=a(c.preSearchFilters?c.preSearchFilters.reduce((h,p)=>p(h),f):f);return c.postSearchFilters?c.postSearchFilters.reduce((h,p)=>p(h),d):d};n.push(u)}const l=c.validateSearch;if(l){const u=({search:f,next:a,meta:d})=>{const h=a(f);if(e)try{const p=Nt(l,h);if(d&&p)for(const g in p)g in h||(d.defaulted||(d.defaulted=new Map)).set(g,p[g]);return{...h,...p}}catch{}return h};n.push(u)}}const o=(i,c,l)=>{if(i>=n.length){if(!s.search)return{};if(s.search===!0)return c;const f=rt(s.search,c);return l&&(l.explicit=f),f}const u=(f,a)=>{if(a){const d=l||{};return{search:o(i+1,f,d),meta:d}}return o(i+1,f,l)};return n[i]({search:c,next:u,meta:l})};return function(c,l,u){return s=l,e=u,o(0,c)}}function Bo(t,s){if(t!=="root")for(let e=s.length-1;e>=0;e--){const n=s[e];if(n.children)return n.id}return ct}function qe(t,s){var n;const e=((n=t.options.params)==null?void 0:n.parse)??t.options.parseParams;if(e){const o=e(s);if(o===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,o)}}function Ao(){try{return sessionStorage}catch{return}}const jo="tsr-scroll-restoration-v1_3",yt=Ao();function Do(){try{return JSON.parse((yt==null?void 0:yt.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Fo(){try{yt==null||yt.setItem(jo,JSON.stringify(J))}catch{}}const J=Do(),Je="data-scroll-restoration-id",No=t=>t.state.__TSR_key||t.href;function Oo(t){const s=t.getAttribute(Je);if(s)return`[${Je}="${s}"]`;let e="",n=t,o;for(;o=n.parentNode;){let r=1,i=n;for(;i=i.previousElementSibling;)r++;const c=`${n.localName}:nth-child(${r})`;e=e?`${c} > ${e}`:c,n=o}return e}let At=!1;const pt="window";function he(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Ye(t){const s=[];for(const e of t){if(e===pt)continue;const n=he(e);n&&s.push(n)}return s}function Uo(t,s){const e=t.options.scrollRestoration,n=t._scroll;e&&(n.restoring=!0);const o=t.options.getScrollRestorationKey||No,r=new Map,i=(u,f,a)=>{const d=r.get(u)||{};d.scrollX=f,d.scrollY=a,r.set(u,d)},c=u=>{if(!(At||!n.restoring))if(u.target===document)i(pt,scrollX,scrollY);else{const f=u.target;i(f,f.scrollLeft,f.scrollTop)}},l=u=>{if(!n.restoring)return;const f=J[u]||(J[u]={});for(const[a,d]of r)a===pt?f[pt]=d:a.isConnected&&(f[Oo(a)]=d)};e&&!n.restoration&&(n.restoration=!0,At=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c,!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&l(o(u.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{l(o(t.stores.resolvedLocation.get()??t.stores.location.get())),Fo()})),!n.reset&&(n.reset=!0,t.subscribe("onRendered",u=>{var m;const f=t.options.scrollRestorationBehavior,a=t.options.scrollToTopSelectors,d=n.next;let h;if(r.clear(),d||(n.next=!0),typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const p=o(u.toLocation),g=u.fromLocation&&o(u.fromLocation);if(n.restoring&&g&&g!==p){const x=J[g];if(x){let v=J[p];for(const _ in x){if(_===pt){if(d)continue}else{const S=he(_);if(!S||d&&a&&(h??(h=Ye(a)),h.includes(S)))continue}v||(v=J[p]={}),v[_]??(v[_]=x[_])}}}At=!0;try{const x=u.toLocation.hash,v=u.toLocation.state.__hashScrollIntoViewOptions??!0;let _=!1;if(d){const S=de.get(u.toLocation),w=x&&v&&(S==="PUSH"||S==="REPLACE"),I=n.restoring?J[p]:void 0;if(I)for(const y in I){const{scrollX:P,scrollY:b}=I[y];if(y===pt){if(w)continue;scrollTo({top:b,left:P,behavior:f}),_=!0}else{const R=he(y);R&&(R.scrollLeft=P,R.scrollTop=b)}}if(!_&&!x){const y={top:0,left:0,behavior:f};if(scrollTo(y),a){h??(h=Ye(a));for(const P of h)P.scrollTo(y)}}}!_&&x&&v&&((m=document.getElementById(x))==null||m.scrollIntoView(v))}finally{At=!1}}))}const Wo="Error preloading route! ☝️";var xs=class{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=s=>{var l,u;this.originalIndex=s.originalIndex;const e=this.options,n=!(e!=null&&e.path)&&!(e!=null&&e.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),n?this._path=ct:this.parentRoute||q();let o=n?ct:e==null?void 0:e.path;o&&o!=="/"&&(o=hs(o));const r=(e==null?void 0:e.id)||o;let i=n?ct:Dt([this.parentRoute.id==="__root__"?"":this.parentRoute.id,r]);o==="__root__"&&(o="/"),i!=="__root__"&&(i=Dt(["/",i]));const c=i==="__root__"?"/":Dt([this.parentRoute.fullPath,o]);this._path=o,this._id=i,this._fullPath=c,this._to=G(c)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>po({from:this.fullPath,...s}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Ho=class extends xs{constructor(t){super(t)}};function xe(t){const s=t.errorComponent??Pe;return M.jsx(Vo,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:e,reset:n})=>e?E.createElement(s,{error:e,reset:n}):t.children})}var Vo=class extends E.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,s){const e=t.getResetKey();return s.error&&s.resetKey!==e?{resetKey:e,error:null}:{resetKey:e}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,s){this.props.onCatch&&this.props.onCatch(t,s)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Pe({error:t}){const[s,e]=E.useState(!1);return M.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[M.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[M.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),M.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>e(n=>!n),children:s?"Hide Error":"Show Error"})]}),M.jsx("div",{style:{height:".25rem"}}),s?M.jsx("div",{children:M.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?M.jsx("code",{children:t.message}):null})}):null]})}function $o({children:t,fallback:s=null}){return Ps()?M.jsx(_t.Fragment,{children:t}):M.jsx(_t.Fragment,{children:s})}function Ps(){return _t.useSyncExternalStore(zo,()=>!0,()=>!1)}function zo(){return()=>{}}var Rs=E.createContext(null);function V(t){return E.useContext(Rs)}var qt=E.createContext(void 0),Ko=E.createContext(void 0),D=(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))(D||{});function Go({update:t,notify:s,unwatched:e}){return{link:n,unlink:o,propagate:r,checkDirty:i,shallowPropagate:c};function n(u,f,a){const d=f.depsTail;if(d!==void 0&&d.dep===u)return;const h=d!==void 0?d.nextDep:f.deps;if(h!==void 0&&h.dep===u){h.version=a,f.depsTail=h;return}const p=u.subsTail;if(p!==void 0&&p.version===a&&p.sub===f)return;const g=f.depsTail=u.subsTail={version:a,dep:u,sub:f,prevDep:d,nextDep:h,prevSub:p,nextSub:void 0};h!==void 0&&(h.prevDep=g),d!==void 0?d.nextDep=g:f.deps=g,p!==void 0?p.nextSub=g:u.subs=g}function o(u,f=u.sub){const a=u.dep,d=u.prevDep,h=u.nextDep,p=u.nextSub,g=u.prevSub;return h!==void 0?h.prevDep=d:f.depsTail=d,d!==void 0?d.nextDep=h:f.deps=h,p!==void 0?p.prevSub=g:a.subsTail=g,g!==void 0?g.nextSub=p:(a.subs=p)===void 0&&e(a),h}function r(u){let f=u.nextSub,a;t:do{const d=u.sub;let h=d.flags;if(h&60?h&12?h&4?!(h&48)&&l(u,d)?(d.flags=h|40,h&=1):h=0:d.flags=h&-9|32:h=0:d.flags=h|32,h&2&&s(d),h&1){const p=d.subs;if(p!==void 0){const g=(u=p).nextSub;g!==void 0&&(a={value:f,prev:a},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;a!==void 0;)if(u=a.value,a=a.prev,u!==void 0){f=u.nextSub;continue t}break}while(!0)}function i(u,f){let a,d=0,h=!1;t:do{const p=u.dep,g=p.flags;if(f.flags&16)h=!0;else if((g&17)===17){if(t(p)){const m=p.subs;m.nextSub!==void 0&&c(m),h=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(a={value:u,prev:a}),u=p.deps,f=p,++d;continue}if(!h){const m=u.nextDep;if(m!==void 0){u=m;continue}}for(;d--;){const m=f.subs,x=m.nextSub!==void 0;if(x?(u=a.value,a=a.prev):u=m,h){if(t(f)){x&&c(m),f=u.sub;continue}h=!1}else f.flags&=-33;f=u.sub;const v=u.nextDep;if(v!==void 0){u=v;continue t}}return h}while(!0)}function c(u){do{const f=u.sub,a=f.flags;(a&48)===32&&(f.flags=a|16,(a&6)===2&&s(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let a=f.depsTail;for(;a!==void 0;){if(a===u)return!0;a=a.prevDep}return!1}}function qo(t,s,e){var r,i,c;const n=typeof t=="object",o=n?t:void 0;return{next:(r=n?t.next:t)==null?void 0:r.bind(o),error:(i=n?t.error:s)==null?void 0:i.bind(o),complete:(c=n?t.complete:e)==null?void 0:c.bind(o)}}const pe=[];let Ot=0;const{link:Xe,unlink:Jo,propagate:Yo,checkDirty:bs,shallowPropagate:Ze}=Go({update(t){return t._update()},notify(t){pe[ge++]=t,t.flags&=~D.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=D.Mutable|D.Dirty,zt(t))}});let jt=0,ge=0,z,me=0;function ws(t){try{++me,t()}finally{--me||_s()}}function zt(t){const s=t.depsTail;let e=s!==void 0?s.nextDep:t.deps;for(;e!==void 0;)e=Jo(e,t)}function _s(){if(!(me>0)){for(;jt<ge;){const t=pe[jt];pe[jt++]=void 0,t.notify()}jt=0,ge=0}}function Qe(t,s){const e=typeof t=="function",n=t,o={_snapshot:e?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:e?D.None:D.Mutable,get(){return z!==void 0&&Xe(o,z,Ot),o._snapshot},subscribe(r){const i=qo(r),c={current:!1},l=Xo(()=>{var u;o.get(),c.current?(u=i.next)==null||u.call(i,o._snapshot):c.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(r){const i=z,c=(s==null?void 0:s.compare)??Object.is;if(e)z=o,++Ot,o.depsTail=void 0;else if(r===void 0)return!1;e&&(o.flags=D.Mutable|D.RecursedCheck);try{const l=o._snapshot,u=typeof r=="function"?r(l):r===void 0&&e?n(l):r;return l===void 0||!c(l,u)?(o._snapshot=u,!0):!1}finally{z=i,e&&(o.flags&=~D.RecursedCheck),zt(o)}}};return e?(o.flags=D.Mutable|D.Dirty,o.get=function(){const r=o.flags;if(r&D.Dirty||r&D.Pending&&bs(o.deps,o)){if(o._update()){const i=o.subs;i!==void 0&&Ze(i)}}else r&D.Pending&&(o.flags=r&~D.Pending);return z!==void 0&&Xe(o,z,Ot),o._snapshot}):o.set=function(r){if(o._update(r)){const i=o.subs;i!==void 0&&(Yo(i),Ze(i),_s())}},o}function Xo(t){const s=()=>{const n=z;z=e,++Ot,e.depsTail=void 0,e.flags=D.Watching|D.RecursedCheck;try{return t()}finally{z=n,e.flags&=~D.RecursedCheck,zt(e)}},e={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:D.Watching|D.RecursedCheck,notify(){const n=this.flags;n&D.Dirty||n&D.Pending&&bs(this.deps,this)?s():this.flags=D.Watching},stop(){this.flags=D.None,this.depsTail=void 0,zt(this)}};return s(),e}var re={exports:{}},ie={},ae={exports:{}},ce={};/**
1
+ import{r as E,j as M,R as _t,a as rs,b as Os}from"./vendor-radix-BJxYPxPb.js";var wt=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Zt(t){const s=E.useRef({value:t,prev:null}),e=s.current.value;return t!==e&&(s.current={value:t,prev:e}),s.current.prev}function Us(t,s,e={},n={}){E.useEffect(()=>{if(!t.current||n.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([r])=>{s(r)},e);return o.observe(t.current),()=>{o.disconnect()}},[s,e,n.disabled,t])}function Ws(t){const s=E.useRef(null);return E.useImperativeHandle(t,()=>s.current,[]),s}const is=!1;function Lt(t){return t[t.length-1]}function Hs(t){return typeof t=="function"}function rt(t,s){return Hs(t)?t(s):t}const as=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function cs(t){for(const s in t)if(as.call(t,s))return!0;return!1}const Vs=()=>Object.create(null),nt=(t,s)=>X(t,s,Vs);function X(t,s,e=()=>({}),n=0){if(t===s)return t;if(n>500)return s;const o=s,r=je(t)&&je(o);if(!r&&!(Ut(t)&&Ut(o)))return o;const i=r?t:Be(t);if(!i)return o;const c=r?o:Be(o);if(!c)return o;const l=i.length,u=c.length,f=r?new Array(u):e();let a=0;for(let d=0;d<u;d++){const h=r?d:c[d],p=t[h],g=o[h];if(p===g){f[h]=p,(r?d<l:as.call(t,h))&&a++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){f[h]=g;continue}const m=X(p,g,e,n+1);f[h]=m,m===p&&a++}return l===u&&a===l?t:f}function Be(t){const s=Object.getOwnPropertyNames(t);for(const o of s)if(!Ee.call(t,o))return!1;const e=Object.getOwnPropertySymbols(t);if(e.length===0)return s;const n=s;for(const o of e){if(!Ee.call(t,o))return!1;n.push(o)}return n}function Ut(t){if(!Ae(t))return!1;const s=t.constructor;if(typeof s>"u")return!0;const e=s.prototype;return!(!Ae(e)||!e.hasOwnProperty("isPrototypeOf"))}function Ae(t){return Object.prototype.toString.call(t)==="[object Object]"}function je(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function at(t,s,e){if(t===s)return!0;if(typeof t!=typeof s)return!1;if(Array.isArray(t)&&Array.isArray(s)){if(t.length!==s.length)return!1;for(let n=0,o=t.length;n<o;n++)if(!at(t[n],s[n],e))return!1;return!0}if(Ut(t)&&Ut(s)){const n=(e==null?void 0:e.ignoreUndefined)??!0;if(e!=null&&e.partial){for(const i in s)if((!n||s[i]!==void 0)&&!at(t[i],s[i],e))return!1;return!0}let o=0;if(!n)o=Object.keys(t).length;else for(const i in t)t[i]!==void 0&&o++;let r=0;for(const i in s)if((!n||s[i]!==void 0)&&(r++,r>o||!at(t[i],s[i],e)))return!1;return o===r}return!1}function vt(t){let s,e;const n=new Promise((o,r)=>{s=o,e=r});return n.status="pending",n.resolve=o=>{n.status="resolved",n.value=o,s(o),t==null||t(o)},n.reject=o=>{n.status="rejected",e(o)},n}function Ct(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function $s(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function De(t){let s;try{s=decodeURI(t)}catch{s=t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return $s(s)}const zs=["http:","https:","mailto:","tel:"];function Wt(t,s){if(!t)return!1;try{const e=new URL(t);return!s.has(e.protocol)}catch{return!1}}function Pt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};const s=/%25|%5C/gi;let e=0,n="",o;for(;(o=s.exec(t))!==null;)n+=De(t.slice(e,o.index))+o[0],e=s.lastIndex;n=n+De(e?t.slice(e):t);let r=!1;return n.startsWith("//")&&(r=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:r}}function Ks(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function Gs(t,s){if(t===s)return!0;if(t.length!==s.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==s[e])return!1;return!0}function q(){throw new Error("Invariant failed")}function It(t){const s=new Map;let e,n;const o=r=>{r.next&&(r.prev?(r.prev.next=r.next,r.next.prev=r.prev,r.next=void 0,n&&(n.next=r,r.prev=n)):(r.next.prev=void 0,e=r.next,r.next=void 0,n&&(r.prev=n,n.next=r)),n=r)};return{get(r){const i=s.get(r);if(i)return o(i),i.value},set(r,i){if(s.size>=t&&e){const l=e;s.delete(l.key),l.next&&(e=l.next,l.next.prev=void 0),l===n&&(n=void 0)}const c=s.get(r);if(c)c.value=i,o(c);else{const l={key:r,value:i,prev:n};n&&(n.next=l),n=l,e||(e=l),s.set(r,l)}},clear(){s.clear(),e=void 0,n=void 0}}}const Z=4,ls=5;function qs(t){const s=t.indexOf("{");if(s===-1)return null;const e=t.indexOf("}",s);return e===-1||s+1>=t.length?null:[s,e]}function us(t,s,e=new Uint16Array(6)){const n=t.indexOf("/",s),o=n===-1?t.length:n,r=t.substring(s,o);if(!r||!r.includes("$"))return e[0]=0,e[1]=s,e[2]=s,e[3]=o,e[4]=o,e[5]=o,e;if(r==="$"){const c=t.length;return e[0]=2,e[1]=s,e[2]=s,e[3]=c,e[4]=c,e[5]=c,e}if(r.charCodeAt(0)===36)return e[0]=1,e[1]=s,e[2]=s+1,e[3]=o,e[4]=o,e[5]=o,e;const i=qs(r);if(i){const[c,l]=i,u=r.charCodeAt(c+1);if(u===45){if(c+2<r.length&&r.charCodeAt(c+2)===36){const f=c+3,a=l;if(f<a)return e[0]=3,e[1]=s+c,e[2]=s+f,e[3]=s+a,e[4]=s+l+1,e[5]=o,e}}else if(u===36){const f=c+1,a=c+2;return a===l?(e[0]=2,e[1]=s+c,e[2]=s+f,e[3]=s+a,e[4]=s+l+1,e[5]=t.length,e):(e[0]=1,e[1]=s+c,e[2]=s+a,e[3]=s+l,e[4]=s+l+1,e[5]=o,e)}}return e[0]=0,e[1]=s,e[2]=s,e[3]=o,e[4]=o,e[5]=o,e}function Kt(t,s,e,n,o,r,i){var l,u,f,a,d,h,p,g,m,x;i==null||i(e);let c=n;{const v=e.fullPath??e.from,_=v.length,S=((l=e.options)==null?void 0:l.caseSensitive)??t,w=((f=(u=e.options)==null?void 0:u.params)==null?void 0:f.parse)??((a=e.options)==null?void 0:a.parseParams);for(;c<_;){const y=us(v,c,s);let P;const b=c,R=y[5];switch(c=R+1,r++,y[0]){case 0:{const L=v.substring(y[2],y[3]);if(S){const k=(d=o.static)==null?void 0:d.get(L);if(k)P=k;else{o.static??(o.static=new Map);const C=it(e.fullPath??e.from);C.parent=o,C.depth=r,P=C,o.static.set(L,C)}}else{const k=L.toLowerCase(),C=(h=o.staticInsensitive)==null?void 0:h.get(k);if(C)P=C;else{o.staticInsensitive??(o.staticInsensitive=new Map);const T=it(e.fullPath??e.from);T.parent=o,T.depth=r,P=T,o.staticInsensitive.set(k,T)}}break}case 1:{const L=v.substring(b,y[1]),k=v.substring(y[4],R),C=S&&!!(L||k),T=L?C?L:L.toLowerCase():void 0,F=k?C?k:k.toLowerCase():void 0,j=!w&&((p=o.dynamic)==null?void 0:p.find(B=>!B.parse&&B.caseSensitive===C&&B.prefix===T&&B.suffix===F));if(j)P=j;else{const B=te(1,e.fullPath??e.from,C,T,F);P=B,B.depth=r,B.parent=o,o.dynamic??(o.dynamic=[]),o.dynamic.push(B)}break}case 3:{const L=v.substring(b,y[1]),k=v.substring(y[4],R),C=S&&!!(L||k),T=L?C?L:L.toLowerCase():void 0,F=k?C?k:k.toLowerCase():void 0,j=!w&&((g=o.optional)==null?void 0:g.find(B=>!B.parse&&B.caseSensitive===C&&B.prefix===T&&B.suffix===F));if(j)P=j;else{const B=te(3,e.fullPath??e.from,C,T,F);P=B,B.parent=o,B.depth=r,o.optional??(o.optional=[]),o.optional.push(B)}break}case 2:{const L=v.substring(b,y[1]),k=v.substring(y[4],R),C=S&&!!(L||k),T=L?C?L:L.toLowerCase():void 0,F=k?C?k:k.toLowerCase():void 0,j=te(2,e.fullPath??e.from,C,T,F);P=j,j.parent=o,j.depth=r,o.wildcard??(o.wildcard=[]),o.wildcard.push(j)}}o=P}if(w&&e.children&&!e.isRoot&&e.id&&e.id.charCodeAt(e.id.lastIndexOf("/")+1)===95){const y=it(e.fullPath??e.from);y.kind=ls,y.parent=o,r++,y.depth=r,o.pathless??(o.pathless=[]),o.pathless.push(y),o=y}const I=(e.path||!e.children)&&!e.isRoot;if(I&&v.endsWith("/")){const y=it(e.fullPath??e.from);y.kind=Z,y.parent=o,r++,y.depth=r,o.index=y,o=y}o.parse=w??null,o.priority=((x=(m=e.options)==null?void 0:m.params)==null?void 0:x.priority)??0,I&&!o.route&&(o.route=e,o.fullPath=e.fullPath??e.from)}if(e.children)for(const v of e.children)Kt(t,s,v,c,o,r,i)}function Qt(t,s){if(t.parse&&!s.parse)return-1;if(!t.parse&&s.parse)return 1;if(t.parse&&s.parse&&(t.priority||s.priority))return s.priority-t.priority;if(t.prefix&&s.prefix&&t.prefix!==s.prefix){if(t.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(t.prefix))return 1}if(t.suffix&&s.suffix&&t.suffix!==s.suffix){if(t.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(t.suffix))return 1}return t.prefix&&!s.prefix?-1:!t.prefix&&s.prefix?1:t.suffix&&!s.suffix?-1:!t.suffix&&s.suffix?1:t.caseSensitive&&!s.caseSensitive?-1:!t.caseSensitive&&s.caseSensitive?1:0}function Y(t){var s,e,n;if(t.pathless)for(const o of t.pathless)Y(o);if(t.static)for(const o of t.static.values())Y(o);if(t.staticInsensitive)for(const o of t.staticInsensitive.values())Y(o);if((s=t.dynamic)!=null&&s.length){t.dynamic.sort(Qt);for(const o of t.dynamic)Y(o)}if((e=t.optional)!=null&&e.length){t.optional.sort(Qt);for(const o of t.optional)Y(o)}if((n=t.wildcard)!=null&&n.length){t.wildcard.sort(Qt);for(const o of t.wildcard)Y(o)}}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}}function te(t,s,e,n,o){return{kind:t,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:s,parent:null,parse:null,priority:0,caseSensitive:e,prefix:n,suffix:o}}function Js(t,s){const e=it("/"),n=new Uint16Array(6);for(const o of t)Kt(!1,n,o,1,e,0);Y(e),s.masksTree=e,s.flatCache=It(1e3)}function Ys(t,s){t||(t="/");const e=s.flatCache.get(t);if(e)return e;const n=ye(t,s.masksTree);return s.flatCache.set(t,n),n}function Xs(t,s,e,n,o){t||(t="/"),n||(n="/");const r=s?`case\0${t}`:t;let i=o.singleCache.get(r);return i||(i=it("/"),Kt(s,new Uint16Array(6),{from:t},1,i,0),o.singleCache.set(r,i)),ye(n,i,e)}function Zs(t,s,e=!1){const n=e?t:`nofuzz\0${t}`,o=s.matchCache.get(n);if(o!==void 0)return o;t||(t="/");let r;try{r=ye(t,s.segmentTree,e)}catch(i){if(i instanceof URIError)r=null;else throw i}return r&&(r.branch=ds(r.route)),s.matchCache.set(n,r),r}function Qs(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function to(t,s=!1,e){const n=it(t.fullPath),o=new Uint16Array(6),r={},i={};let c=0;return Kt(s,o,t,1,n,0,l=>{if(e==null||e(l,c),l.id in r&&q(),r[l.id]=l,c!==0&&l.path){const u=Qs(l.fullPath);(!i[u]||l.fullPath.endsWith("/"))&&(i[u]=l)}c++}),Y(n),{processedTree:{segmentTree:n,singleCache:It(1e3),matchCache:It(1e3),flatCache:null,masksTree:null},routesById:r,routesByPath:i}}function ye(t,s,e=!1){const n=t.split("/"),o=so(t,n,s,e);if(!o)return null;const[r]=fs(t,n,o);return{route:o.node.route,rawParams:r}}function fs(t,s,e){var f,a,d,h,p,g,m,x,v,_;const n=eo(e.node);let o=null;const r=Object.create(null);let i=((f=e.extract)==null?void 0:f.part)??0,c=((a=e.extract)==null?void 0:a.node)??0,l=((d=e.extract)==null?void 0:d.path)??0,u=((h=e.extract)==null?void 0:h.segment)??0;for(;c<n.length;i++,c++,l++,u++){const S=n[c];if(S.kind===Z)break;if(S.kind===ls){u--,i--,l--;continue}const w=s[i],I=l;if(w&&(l+=w.length),S.kind===1){o??(o=e.node.fullPath.split("/"));const y=o[u],P=((p=S.prefix)==null?void 0:p.length)??0;if(y.charCodeAt(P)===123){const b=((g=S.suffix)==null?void 0:g.length)??0,R=y.substring(P+2,y.length-b-1),L=w.substring(P,w.length-b);r[R]=decodeURIComponent(L)}else{const b=y.substring(1);r[b]=decodeURIComponent(w)}}else if(S.kind===3){if(e.skipped&1<<c){i--,l=I-1;continue}o??(o=e.node.fullPath.split("/"));const y=o[u],P=((m=S.prefix)==null?void 0:m.length)??0,b=((x=S.suffix)==null?void 0:x.length)??0,R=y.substring(P+3,y.length-b-1),L=S.suffix||S.prefix?w.substring(P,w.length-b):w;L&&(r[R]=decodeURIComponent(L))}else if(S.kind===2){const y=S,P=t.substring(I+(((v=y.prefix)==null?void 0:v.length)??0),t.length-(((_=y.suffix)==null?void 0:_.length)??0)),b=decodeURIComponent(P);r["*"]=b,r._splat=b;break}}return e.rawParams&&Object.assign(r,e.rawParams),[r,{part:i,node:c,path:l,segment:u}]}function ds(t){const s=[t];for(;t.parentRoute;)t=t.parentRoute,s.push(t);return s.reverse(),s}function eo(t){const s=Array(t.depth+1);do s[t.depth]=t,t=t.parent;while(t);return s}function so(t,s,e,n){if(t==="/"&&e.index)return{node:e.index,skipped:0};const o=!Lt(s),r=o&&t!=="/",i=s.length-(o?1:0),c=[{node:e,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let l=null,u=null;for(;c.length;){const f=c.pop(),{node:a,index:d,skipped:h,depth:p,statics:g,dynamics:m,optionals:x}=f;let{extract:v,rawParams:_}=f;if(a.kind===2&&a.route&&!Bt(u,f))continue;if(a.parse){if(!Fe(t,s,f))continue;_=f.rawParams,v=f.extract}n&&a.route&&a.kind!==Z&&Bt(l,f)&&(l=f);const S=d===i;if(S&&(a.route&&(!r||a.kind===Z||a.kind===2)&&Bt(u,f)&&(u=f),!a.optional&&!a.wildcard&&!a.index&&!a.pathless))continue;const w=S?void 0:s[d];let I;if(S&&a.index){const y={node:a.index,index:d,skipped:h,depth:p+1,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_};let P=!0;if(a.index.parse&&(Fe(t,s,y)||(P=!1)),P){if(!m&&!x&&!h&&oo(g,i))return y;Bt(u,y)&&(u=y)}}if(a.wildcard)for(let y=a.wildcard.length-1;y>=0;y--){const P=a.wildcard[y],{prefix:b,suffix:R}=P;if(!(b&&(S||!(P.caseSensitive?w:I??(I=w.toLowerCase())).startsWith(b)))){if(R){if(S)continue;const L=s.slice(d).join("/").slice(-R.length);if((P.caseSensitive?L:L.toLowerCase())!==R)continue}c.push({node:P,index:i,skipped:h,depth:p+1,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_})}}if(a.optional){const y=h|1<<p,P=p+1;for(let b=a.optional.length-1;b>=0;b--){const R=a.optional[b];c.push({node:R,index:d,skipped:y,depth:P,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_})}if(!S)for(let b=a.optional.length-1;b>=0;b--){const R=a.optional[b],{prefix:L,suffix:k}=R;if(L||k){const C=R.caseSensitive?w:I??(I=w.toLowerCase());if(L&&!C.startsWith(L)||k&&!C.endsWith(k))continue}c.push({node:R,index:d+1,skipped:h,depth:P,statics:g,dynamics:m,optionals:x+Et(i,d),extract:v,rawParams:_})}}if(!S&&a.dynamic&&w)for(let y=a.dynamic.length-1;y>=0;y--){const P=a.dynamic[y],{prefix:b,suffix:R}=P;if(b||R){const L=P.caseSensitive?w:I??(I=w.toLowerCase());if(b&&!L.startsWith(b)||R&&!L.endsWith(R))continue}c.push({node:P,index:d+1,skipped:h,depth:p+1,statics:g,dynamics:m+Et(i,d),optionals:x,extract:v,rawParams:_})}if(!S&&a.staticInsensitive){const y=a.staticInsensitive.get(I??(I=w.toLowerCase()));y&&c.push({node:y,index:d+1,skipped:h,depth:p+1,statics:g+Et(i,d),dynamics:m,optionals:x,extract:v,rawParams:_})}if(!S&&a.static){const y=a.static.get(w);y&&c.push({node:y,index:d+1,skipped:h,depth:p+1,statics:g+Et(i,d),dynamics:m,optionals:x,extract:v,rawParams:_})}if(a.pathless){const y=p+1;for(let P=a.pathless.length-1;P>=0;P--){const b=a.pathless[P];c.push({node:b,index:d,skipped:h,depth:y,statics:g,dynamics:m,optionals:x,extract:v,rawParams:_})}}}if(u)return u;if(n&&l){let f=l.index;for(let d=0;d<l.index;d++)f+=s[d].length;const a=f===t.length?"/":t.slice(f);return l.rawParams??(l.rawParams=Object.create(null)),l.rawParams["**"]=decodeURIComponent(a),l}return null}function Et(t,s){return 2**(t-s-1)}function oo(t,s){return t===2**(s-1)-1}function Fe(t,s,e){let n,o;try{[n,o]=fs(t,s,e)}catch{return null}if(e.rawParams=n,e.extract=o,!e.node.parse)return!0;try{if(e.node.parse(n)===!1)return null}catch{}return!0}function Bt(t,s){return t?s.statics>t.statics||s.statics===t.statics&&(s.dynamics>t.dynamics||s.dynamics===t.dynamics&&(s.optionals>t.optionals||s.optionals===t.optionals&&((s.node.kind===Z)>(t.node.kind===Z)||s.node.kind===Z==(t.node.kind===Z)&&s.depth>t.depth))):!0}function Dt(t){return ve(t.filter(s=>s!==void 0).join("/"))}function ve(t){return t.replace(/\/{2,}/g,"/")}function hs(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function G(t){const s=t.length;return s>1&&t[s-1]==="/"?t.replace(/\/{1,}$/,""):t}function ps(t){return G(hs(t))}function Ht(t,s){return t!=null&&t.endsWith("/")&&t!=="/"&&t!==`${s}/`?t.slice(0,-1):t}function no(t,s,e){return Ht(t,e)===Ht(s,e)}function ro({base:t,to:s,trailingSlash:e="never",cache:n}){const o=s.startsWith("/"),r=!o&&s===".";let i;if(n){i=o?s:r?t:t+"\0"+s;const u=n.get(i);if(u)return u}let c;if(r)c=t.split("/");else if(o)c=s.split("/");else{for(c=t.split("/");c.length>1&&Lt(c)==="";)c.pop();const u=s.split("/");for(let f=0,a=u.length;f<a;f++){const d=u[f];d===""?f?f===a-1&&c.push(d):c=[d]:d===".."?c.pop():d==="."||c.push(d)}}c.length>1&&(Lt(c)===""?e==="never"&&c.pop():e==="always"&&c.push(""));const l=ve(c.join("/"))||"/";return i&&n&&n.set(i,l),l}function io(t){const s=new Map(t.map(o=>[encodeURIComponent(o),o])),e=Array.from(s.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(e,"g");return o=>o.replace(n,r=>s.get(r)??r)}function ee(t,s,e){const n=s[t];return typeof n!="string"?n:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(o=>Oe(o,e)).join("/"):Oe(n,e)}function Ne({path:t,params:s,decoder:e,...n}){let o=!1;const r=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:o};if(!t.includes("$"))return{interpolatedPath:t,usedParams:r,isMissingParams:o};const i=t.length;let c=0,l,u="";for(;c<i;){const f=c;l=us(t,f,l);const a=l[5];if(c=a+1,f===a)continue;const d=l[0];if(d===0){u+="/"+t.substring(f,a);continue}if(d===2){const h=s._splat;r._splat=h,r["*"]=h;const p=t.substring(f,l[1]),g=t.substring(l[4],a);if(!h){o=!0,(p||g)&&(u+="/"+p+g);continue}const m=ee("_splat",s,e);u+="/"+p+m+g;continue}if(d===1){const h=t.substring(l[2],l[3]);!o&&!(h in s)&&(o=!0),r[h]=s[h];const p=t.substring(f,l[1]),g=t.substring(l[4],a),m=ee(h,s,e)??"undefined";u+="/"+p+m+g;continue}if(d===3){const h=t.substring(l[2],l[3]),p=s[h];if(p==null)continue;r[h]=p;const g=t.substring(f,l[1]),m=t.substring(l[4],a),x=ee(h,s,e)??"";u+="/"+g+x+m;continue}}return t.endsWith("/")&&(u+="/"),{usedParams:r,interpolatedPath:u||"/",isMissingParams:o}}function Oe(t,s){const e=encodeURIComponent(t);return(s==null?void 0:s(e))??e}function N(t){return(t==null?void 0:t.isNotFound)===!0}function ao(t,s=String){const e=new URLSearchParams;for(const n in t){const o=t[n];o!==void 0&&e.set(n,s(o))}return e.toString()}function se(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function co(t){const s=new URLSearchParams(t),e=Object.create(null);for(const[n,o]of s.entries()){const r=e[n];r==null?e[n]=se(o):Array.isArray(r)?r.push(se(o)):e[n]=[r,se(o)]}return e}const lo=fo(JSON.parse),uo=ho(JSON.stringify,JSON.parse);function fo(t){return s=>{s[0]==="?"&&(s=s.substring(1));const e=co(s);for(const n in e){const o=e[n];if(typeof o=="string")try{e[n]=t(o)}catch{}}return e}}function ho(t,s){const e=typeof s=="function";function n(o){if(typeof o=="object"&&o!==null)try{return t(o)}catch{}else if(e&&typeof o=="string")try{return s(o),t(o)}catch{}return o}return o=>{const r=ao(o,n);return r?`?${r}`:""}}const ct="__root__";function po(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{}const s=new Headers(t.headers);t.href&&s.get("Location")===null&&s.set("Location",t.href);const e=new Response(null,{status:t.statusCode,headers:s});if(e.options=t,t.throw)throw e;return e}function W(t){return t instanceof Response&&!!t.options}const ue=t=>{var s;if(!t.rendered)return t.rendered=!0,(s=t.onReady)==null?void 0:s.call(t)},go=t=>t.stores.matchesId.get().some(s=>{var e;return(e=t.stores.matchStores.get(s))==null?void 0:e.get()._forcePending}),Gt=(t,s)=>!!(t.preload&&!t.router.stores.matchStores.has(s)),lt=(t,s,e=!0)=>{const n={...t.router.options.context??{}},o=e?s:s-1;for(let r=0;r<=o;r++){const i=t.matches[r];if(!i)continue;const c=t.router.getMatch(i.id);c&&Object.assign(n,c.__routeContext,c.__beforeLoadContext)}return n},Ue=(t,s)=>{if(!t.matches.length)return;const e=s.routeId,n=t.matches.findIndex(i=>i.routeId===t.router.routeTree.id),o=n>=0?n:0;let r=e?t.matches.findIndex(i=>i.routeId===e):t.firstBadMatchIndex??t.matches.length-1;r<0&&(r=o);for(let i=r;i>=0;i--){const c=t.matches[i];if(t.router.looseRoutesById[c.routeId].options.notFoundComponent)return i}return e?r:o},Q=(t,s,e)=>{var n,o,r;if(!(!W(e)&&!N(e)))throw W(e)&&e.redirectHandled&&!e.options.reloadDocument||(s&&((n=s._nonReactive.beforeLoadPromise)==null||n.resolve(),(o=s._nonReactive.loaderPromise)==null||o.resolve(),s._nonReactive.beforeLoadPromise=void 0,s._nonReactive.loaderPromise=void 0,s._nonReactive.error=e,t.updateMatch(s.id,i=>({...i,status:W(e)?"redirected":N(e)?"notFound":i.status==="pending"?"success":i.status,context:lt(t,s.index),isFetching:!1,error:e})),N(e)&&!e.routeId&&(e.routeId=s.routeId),(r=s._nonReactive.loadPromise)==null||r.resolve()),W(e)&&(t.rendered=!0,e.options._fromLocation=t.location,e.redirectHandled=!0,e=t.router.resolveRedirect(e))),e},gs=(t,s)=>{const e=t.router.getMatch(s);return!!(!e||e._nonReactive.dehydrated)},We=(t,s,e)=>{const n=lt(t,e);t.updateMatch(s,o=>({...o,context:n}))},Rt=(t,s,e)=>{var i,c;const{id:n,routeId:o}=t.matches[s],r=t.router.looseRoutesById[o];if(e instanceof Promise)throw e;t.firstBadMatchIndex??(t.firstBadMatchIndex=s),Q(t,t.router.getMatch(n),e);try{(c=(i=r.options).onError)==null||c.call(i,e)}catch(l){e=l,Q(t,t.router.getMatch(n),e)}t.updateMatch(n,l=>{var u,f;return(u=l._nonReactive.beforeLoadPromise)==null||u.resolve(),l._nonReactive.beforeLoadPromise=void 0,(f=l._nonReactive.loadPromise)==null||f.resolve(),{...l,error:e,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!t.preload&&!W(e)&&!N(e)&&(t.serialError??(t.serialError=e))},ms=(t,s,e,n)=>{var r;if(n._nonReactive.pendingTimeout!==void 0)return;const o=e.options.pendingMs??t.router.options.defaultPendingMs;if(t.onReady&&!Gt(t,s)&&(e.options.loader||e.options.beforeLoad||vs(e))&&typeof o=="number"&&o!==1/0&&(e.options.pendingComponent??((r=t.router.options)==null?void 0:r.defaultPendingComponent))){const i=setTimeout(()=>{ue(t)},o);n._nonReactive.pendingTimeout=i}},mo=(t,s,e)=>{const n=t.router.getMatch(s);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;ms(t,s,e,n);const o=()=>{const r=t.router.getMatch(s);r.preload&&(r.status==="redirected"||r.status==="notFound")&&Q(t,r,r.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(o):o()},yo=(t,s,e,n)=>{const o=t.router.getMatch(s);let r=o._nonReactive.loadPromise;o._nonReactive.loadPromise=vt(()=>{r==null||r.resolve(),r=void 0});const{paramsError:i,searchError:c}=o;i&&Rt(t,e,i),c&&Rt(t,e,c),ms(t,s,n,o);const l=new AbortController;let u=!1;const f=()=>{u||(u=!0,t.updateMatch(s,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:l})))},a=()=>{var S;(S=o._nonReactive.beforeLoadPromise)==null||S.resolve(),o._nonReactive.beforeLoadPromise=void 0,t.updateMatch(s,w=>({...w,isFetching:!1}))};if(!n.options.beforeLoad){t.router.batch(()=>{f(),a()});return}o._nonReactive.beforeLoadPromise=vt();const d={...lt(t,e,!1),...o.__routeContext},{search:h,params:p,cause:g}=o,m=Gt(t,s),x={search:h,abortController:l,params:p,preload:m,context:d,location:t.location,navigate:S=>t.router.navigate({...S,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:m?"preload":g,matches:t.matches,routeId:n.id,...t.router.options.additionalContext},v=S=>{if(S===void 0){t.router.batch(()=>{f(),a()});return}(W(S)||N(S))&&(f(),Rt(t,e,S)),t.router.batch(()=>{f(),t.updateMatch(s,w=>({...w,__beforeLoadContext:S})),a()})};let _;try{if(_=n.options.beforeLoad(x),Ct(_))return f(),_.catch(S=>{Rt(t,e,S)}).then(v)}catch(S){f(),Rt(t,e,S)}v(_)},vo=(t,s)=>{const{id:e,routeId:n}=t.matches[s],o=t.router.looseRoutesById[n],r=()=>c(),i=()=>yo(t,e,s,o),c=()=>{if(gs(t,e))return;const l=mo(t,e,o);return Ct(l)?l.then(i):i()};return r()},So=(t,s,e)=>{var r,i,c,l,u,f;const n=t.router.getMatch(s);if(!n||!e.options.head&&!e.options.scripts&&!e.options.headers)return;const o={ssr:t.router.options.ssr,matches:t.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(i=(r=e.options).head)==null?void 0:i.call(r,o),(l=(c=e.options).scripts)==null?void 0:l.call(c,o),(f=(u=e.options).headers)==null?void 0:f.call(u,o)]).then(([a,d,h])=>({meta:a==null?void 0:a.meta,links:a==null?void 0:a.links,headScripts:a==null?void 0:a.scripts,headers:h,scripts:d,styles:a==null?void 0:a.styles}))},ys=(t,s,e,n,o)=>{const r=s[n-1],{params:i,loaderDeps:c,abortController:l,cause:u}=t.router.getMatch(e),f=lt(t,n),a=Gt(t,e);return{params:i,deps:c,preload:!!a,parentMatchPromise:r,abortController:l,context:f,location:t.location,navigate:d=>t.router.navigate({...d,_fromLocation:t.location}),cause:a?"preload":u,route:o,...t.router.options.additionalContext}},He=async(t,s,e,n,o)=>{var r,i,c,l,u;try{const f=t.router.getMatch(e);try{(!(is??t.router.isServer)||f.ssr===!0)&&Mt(o);const a=o.options.loader,d=typeof a=="function"?a:a==null?void 0:a.handler,h=d==null?void 0:d(ys(t,s,e,n,o)),p=!!d&&Ct(h);if((p||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||f._nonReactive.minPendingPromise)&&t.updateMatch(e,m=>({...m,isFetching:"loader"})),d){const m=p?await h:h;Q(t,t.router.getMatch(e),m),m!==void 0&&t.updateMatch(e,x=>({...x,loaderData:m}))}o._lazyPromise&&await o._lazyPromise;const g=f._nonReactive.minPendingPromise;g&&await g,o._componentsPromise&&await o._componentsPromise,t.updateMatch(e,m=>({...m,error:void 0,context:lt(t,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let d=a;if((d==null?void 0:d.name)==="AbortError"){if(f.abortController.signal.aborted){(r=f._nonReactive.loaderPromise)==null||r.resolve(),f._nonReactive.loaderPromise=void 0;return}t.updateMatch(e,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:lt(t,n)}));return}const h=f._nonReactive.minPendingPromise;h&&await h,N(a)&&await((c=(i=o.options.notFoundComponent)==null?void 0:i.preload)==null?void 0:c.call(i)),Q(t,t.router.getMatch(e),a);try{(u=(l=o.options).onError)==null||u.call(l,a)}catch(p){d=p,Q(t,t.router.getMatch(e),p)}!W(d)&&!N(d)&&await Mt(o,["errorComponent"]),t.updateMatch(e,p=>({...p,error:d,context:lt(t,n),status:"error",isFetching:!1}))}}catch(f){const a=t.router.getMatch(e);a&&(a._nonReactive.loaderPromise=void 0),Q(t,a,f)}},xo=async(t,s,e)=>{var h,p,g,m;async function n(x,v,_,S,w){const I=Date.now()-v.updatedAt,y=x?w.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??t.router.options.defaultStaleTime??0,P=w.options.shouldReload,b=typeof P=="function"?P(ys(t,s,o,e,w)):P,{status:R,invalid:L}=S,k=I>=y&&(!!t.forceStaleReload||S.cause==="enter"||_!==void 0&&_!==S.id);i=R==="success"&&(L||(b??k)),x&&w.options.preload===!1||(i&&!t.sync&&f?(c=!0,(async()=>{var C,T;try{await He(t,s,o,e,w);const F=t.router.getMatch(o);(C=F._nonReactive.loaderPromise)==null||C.resolve(),(T=F._nonReactive.loadPromise)==null||T.resolve(),F._nonReactive.loaderPromise=void 0,F._nonReactive.loadPromise=void 0}catch(F){W(F)&&await t.router.navigate(F.options)}})()):R!=="success"||i?await He(t,s,o,e,w):We(t,o,e))}const{id:o,routeId:r}=t.matches[e];let i=!1,c=!1;const l=t.router.looseRoutesById[r],u=l.options.loader,f=((typeof u=="function"||u==null?void 0:u.staleReloadMode)??t.router.options.defaultStaleReloadMode)!=="blocking";if(gs(t,o)){if(!t.router.getMatch(o))return t.matches[e];We(t,o,e)}else{const x=t.router.getMatch(o),v=t.router.stores.matchesId.get()[e],_=((h=v&&t.router.stores.matchStores.get(v)||null)==null?void 0:h.routeId)===r?v:(p=t.router.stores.matches.get().find(w=>w.routeId===r))==null?void 0:p.id,S=Gt(t,o);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!t.sync&&!x.preload&&f)return x;await x._nonReactive.loaderPromise;const w=t.router.getMatch(o),I=w._nonReactive.error||w.error;I&&Q(t,w,I),w.status==="pending"&&await n(S,x,_,w,l)}else{const w=S&&!t.router.stores.matchStores.has(o),I=t.router.getMatch(o);I._nonReactive.loaderPromise=vt(),w!==I.preload&&t.updateMatch(o,y=>({...y,preload:w})),await n(S,x,_,I,l)}}const a=t.router.getMatch(o);c||((g=a._nonReactive.loaderPromise)==null||g.resolve(),(m=a._nonReactive.loadPromise)==null||m.resolve(),a._nonReactive.loadPromise=void 0),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0,c||(a._nonReactive.loaderPromise=void 0),a._nonReactive.dehydrated=void 0;const d=c?a.isFetching:!1;return d!==a.isFetching||a.invalid!==!1?(t.updateMatch(o,x=>({...x,isFetching:d,invalid:!1})),t.router.getMatch(o)):a};async function Ve(t){var d,h;const s=t,e=[];go(s.router)&&ue(s);let n;for(let p=0;p<s.matches.length;p++){try{const g=vo(s,p);Ct(g)&&await g}catch(g){if(W(g))throw g;if(N(g))n=g;else if(!s.preload)throw g;break}if(s.serialError||s.firstBadMatchIndex!=null)break}const o=s.firstBadMatchIndex??s.matches.length,r=n&&!s.preload?Ue(s,n):void 0,i=n&&s.preload?0:r!==void 0?Math.min(r+1,o):o;let c,l;for(let p=0;p<i;p++)e.push(xo(s,e,p));try{await Promise.all(e)}catch{const p=await Promise.allSettled(e);for(const g of p){if(g.status!=="rejected")continue;const m=g.reason;if(W(m))throw m;N(m)?c??(c=m):l??(l=m)}if(l!==void 0)throw l}const u=c??(n&&!s.preload?n:void 0);let f=s.firstBadMatchIndex!==void 0?s.firstBadMatchIndex:s.matches.length-1;if(!u&&n&&s.preload)return s.matches;if(u){const p=Ue(s,u);p===void 0&&q();const g=s.matches[p],m=s.router.looseRoutesById[g.routeId],x=(d=s.router.options)==null?void 0:d.defaultNotFoundComponent;!m.options.notFoundComponent&&x&&(m.options.notFoundComponent=x),u.routeId=g.routeId;const v=g.routeId===s.router.routeTree.id;s.updateMatch(g.id,_=>({..._,...v?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),f=p,await Mt(m,["notFoundComponent"])}else if(!s.preload){const p=s.matches[0];p.globalNotFound||(h=s.router.getMatch(p.id))!=null&&h.globalNotFound&&s.updateMatch(p.id,g=>({...g,globalNotFound:!1,error:void 0}))}if(s.serialError&&s.firstBadMatchIndex!==void 0){const p=s.router.looseRoutesById[s.matches[s.firstBadMatchIndex].routeId];await Mt(p,["errorComponent"])}for(let p=0;p<=f;p++){const{id:g,routeId:m}=s.matches[p],x=s.router.looseRoutesById[m];try{const v=So(s,g,x);if(v){const _=await v;s.updateMatch(g,S=>({...S,..._}))}}catch(v){console.error(`Error executing head for route ${m}:`,v)}}const a=ue(s);if(Ct(a)&&await a,u)throw u;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function $e(t,s){const e=s.map(n=>{var o,r;return(r=(o=t.options[n])==null?void 0:o.preload)==null?void 0:r.call(o)}).filter(Boolean);if(e.length!==0)return Promise.all(e)}function Mt(t,s=Ft){!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(n=>{const{id:o,...r}=n.options;Object.assign(t.options,r),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0);const e=()=>t._componentsLoaded?void 0:s===Ft?(()=>{if(t._componentsPromise===void 0){const n=$e(t,Ft);n?t._componentsPromise=n.then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0}):t._componentsLoaded=!0}return t._componentsPromise})():$e(t,s);return t._lazyPromise?t._lazyPromise.then(e):e()}function vs(t){var s;for(const e of Ft)if((s=t.options[e])!=null&&s.preload)return!0;return!1}const Ft=["component","errorComponent","pendingComponent","notFoundComponent"];function Po(t){return{input:({url:s})=>{for(const e of t)s=fe(e,s);return s},output:({url:s})=>{for(let e=t.length-1;e>=0;e--)s=Ss(t[e],s);return s}}}function Ro(t){const s=ps(t.basepath),e=`/${s}`,n=t.caseSensitive?e:e.toLowerCase(),o=`${n}/`;return{input:({url:r})=>{const i=t.caseSensitive?r.pathname:r.pathname.toLowerCase();return i===n?r.pathname="/":i.startsWith(o)&&(r.pathname=r.pathname.slice(e.length)),r},output:({url:r})=>(r.pathname=Dt(["/",s,r.pathname]),r)}}function fe(t,s){var n;const e=(n=t==null?void 0:t.input)==null?void 0:n.call(t,{url:s});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return s}function Ss(t,s){var n;const e=(n=t==null?void 0:t.output)==null?void 0:n.call(t,{url:s});if(e){if(typeof e=="string")return new URL(e);if(e instanceof URL)return e}return s}function bo(t,s){const{createMutableStore:e,createReadonlyStore:n,batch:o,init:r}=s,i=new Map,c=new Map,l=new Map,u=e(t.status),f=e(t.loadedAt),a=e(t.isLoading),d=e(t.isTransitioning),h=e(t.location),p=e(t.resolvedLocation),g=e(t.statusCode),m=e(t.redirect),x=e([]),v=e([]),_=e([]),S=n(()=>oe(i,x.get())),w=n(()=>oe(c,v.get())),I=n(()=>oe(l,_.get())),y=n(()=>x.get()[0]),P=n(()=>x.get().some(B=>{var $;return(($=i.get(B))==null?void 0:$.get().status)==="pending"})),b=n(()=>{var B;return{locationHref:h.get().href,resolvedLocationHref:(B=p.get())==null?void 0:B.href,status:u.get()}}),R=n(()=>({status:u.get(),loadedAt:f.get(),isLoading:a.get(),isTransitioning:d.get(),matches:S.get(),location:h.get(),resolvedLocation:p.get(),statusCode:g.get(),redirect:m.get()})),L=It(64);function k(B){let $=L.get(B);return $||($=n(()=>{const Re=x.get();for(const be of Re){const ft=i.get(be);if(ft&&ft.routeId===B)return ft.get()}}),L.set(B,$)),$}const C={status:u,loadedAt:f,isLoading:a,isTransitioning:d,location:h,resolvedLocation:p,statusCode:g,redirect:m,matchesId:x,pendingIds:v,cachedIds:_,matches:S,pendingMatches:w,cachedMatches:I,firstId:y,hasPending:P,matchRouteDeps:b,matchStores:i,pendingMatchStores:c,cachedMatchStores:l,__store:R,getRouteMatchStore:k,setMatches:T,setPending:F,setCached:j};T(t.matches),r==null||r(C);function T(B){ne(B,i,x,e,o)}function F(B){ne(B,c,v,e,o)}function j(B){ne(B,l,_,e,o)}return C}function oe(t,s){const e=[];for(const n of s){const o=t.get(n);o&&e.push(o.get())}return e}function ne(t,s,e,n,o){const r=t.map(c=>c.id),i=new Set(r);o(()=>{for(const c of s.keys())i.has(c)||s.delete(c);for(const c of t){const l=s.get(c.id);if(!l){const u=n(c);u.routeId=c.routeId,s.set(c.id,u);continue}l.routeId=c.routeId,l.get()!==c&&l.set(c)}Gs(e.get(),r)||e.set(r)})}var tt="__TSR_index",ze="popstate",Ke="beforeunload";function wo(t){let s=t.getLocation();const e=new Set,n=i=>{s=t.getLocation(),e.forEach(c=>c({location:s,action:i}))},o=i=>{t.notifyOnIndexChange??!0?n(i):s=t.getLocation()},r=async({task:i,navigateOpts:c,...l})=>{var a,d;if((c==null?void 0:c.ignoreBlocker)??!1){i();return}const u=((a=t.getBlockers)==null?void 0:a.call(t))??[],f=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&u.length&&f)for(const h of u){const p=Vt(l.path,l.state);if(await h.blockerFn({currentLocation:s,nextLocation:p,action:l.type})){(d=t.onBlocked)==null||d.call(t);return}}i()};return{get location(){return s},get length(){return t.getLength()},subscribers:e,subscribe:i=>(e.add(i),()=>{e.delete(i)}),push:(i,c,l)=>{const u=s.state[tt];c=Ge(u+1,c),r({task:()=>{t.pushState(i,c),n({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:c})},replace:(i,c,l)=>{const u=s.state[tt];c=Ge(u,c),r({task:()=>{t.replaceState(i,c),n({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:c})},go:(i,c)=>{r({task:()=>{t.go(i),o({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{r({task:()=>{t.back((i==null?void 0:i.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{r({task:()=>{t.forward((i==null?void 0:i.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>s.state[tt]!==0,createHref:i=>t.createHref(i),block:i=>{var l;if(!t.setBlockers)return()=>{};const c=((l=t.getBlockers)==null?void 0:l.call(t))??[];return t.setBlockers([...c,i]),()=>{var f,a;const u=((f=t.getBlockers)==null?void 0:f.call(t))??[];(a=t.setBlockers)==null||a.call(t,u.filter(d=>d!==i))}},flush:()=>{var i;return(i=t.flush)==null?void 0:i.call(t)},destroy:()=>{var i;return(i=t.destroy)==null?void 0:i.call(t)},notify:n}}function Ge(t,s){s||(s={});const e=Se();return{...s,key:e,__TSR_key:e,[tt]:t}}function _o(t){var P,b;const s=typeof document<"u"?window:void 0,e=s.history.pushState,n=s.history.replaceState;let o=[];const r=()=>o,i=R=>o=R,c=(R=>R),l=(()=>Vt(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((P=s.history.state)!=null&&P.__TSR_key)&&!((b=s.history.state)!=null&&b.key)){const R=Se();s.history.replaceState({[tt]:0,key:R,__TSR_key:R},"")}let u=l(),f,a=!1,d=!1,h=!1,p=!1;const g=()=>u;let m,x;const v=()=>{m&&(y._ignoreSubscribers=!0,(m.isPush?s.history.pushState:s.history.replaceState)(m.state,"",m.href),y._ignoreSubscribers=!1,m=void 0,x=void 0,f=void 0)},_=(R,L,k)=>{const C=c(L);x||(f=u),u=Vt(L,k),m={href:C,state:k,isPush:(m==null?void 0:m.isPush)||R==="push"},x||(x=Promise.resolve().then(()=>v()))},S=R=>{u=l(),y.notify({type:R})},w=async()=>{if(d){d=!1;return}const R=l(),L=R.state[tt]-u.state[tt],k=L===1,C=L===-1,T=!k&&!C||a;a=!1;const F=T?"GO":C?"BACK":"FORWARD",j=T?{type:"GO",index:L}:{type:C?"BACK":"FORWARD"};if(h)h=!1;else{const B=r();if(typeof document<"u"&&B.length){for(const $ of B)if(await $.blockerFn({currentLocation:u,nextLocation:R,action:F})){d=!0,s.history.go(1),y.notify(j);return}}}u=l(),y.notify(j)},I=R=>{if(p){p=!1;return}let L=!1;const k=r();if(typeof document<"u"&&k.length)for(const C of k){const T=C.enableBeforeUnload??!0;if(T===!0){L=!0;break}if(typeof T=="function"&&T()===!0){L=!0;break}}if(L)return R.preventDefault(),R.returnValue=""},y=wo({getLocation:g,getLength:()=>s.history.length,pushState:(R,L)=>_("push",R,L),replaceState:(R,L)=>_("replace",R,L),back:R=>(R&&(h=!0),p=!0,s.history.back()),forward:R=>{R&&(h=!0),p=!0,s.history.forward()},go:R=>{a=!0,s.history.go(R)},createHref:R=>c(R),flush:v,destroy:()=>{s.history.pushState=e,s.history.replaceState=n,s.removeEventListener(Ke,I,{capture:!0}),s.removeEventListener(ze,w)},onBlocked:()=>{f&&u!==f&&(u=f)},getBlockers:r,setBlockers:i,notifyOnIndexChange:!1});return s.addEventListener(Ke,I,{capture:!0}),s.addEventListener(ze,w),s.history.pushState=function(...R){const L=e.apply(s.history,R);return y._ignoreSubscribers||S("PUSH"),L},s.history.replaceState=function(...R){const L=n.apply(s.history,R);return y._ignoreSubscribers||S("REPLACE"),L},y}function Lo(t){let s=t.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function Vt(t,s){const e=Lo(t),n=e.indexOf("#"),o=e.indexOf("?"),r=Se();return{href:e,pathname:e.substring(0,n>0?o>0?Math.min(n,o):n:o>0?o:e.length),hash:n>-1?e.substring(n):"",search:o>-1?e.slice(o,n===-1?void 0:n):"",state:s||{[tt]:0,key:r,__TSR_key:r}}}function Se(){return(Math.random()+1).toString(36).substring(7)}function mt(t,s){const e=s,n=t;return{fromLocation:e,toLocation:n,pathChanged:(e==null?void 0:e.pathname)!==n.pathname,hrefChanged:(e==null?void 0:e.href)!==n.href,hashChanged:(e==null?void 0:e.hash)!==n.hash}}const de=new WeakMap;var Co=class{constructor(t,s){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=>{var f;const n=this.options,o=this.basepath??(n==null?void 0:n.basepath)??"/",r=this.basepath===void 0,i=n==null?void 0:n.rewrite;if(this.options={...n,...e},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=io(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=_o()),this.origin=this.options.origin,this.origin||(window!=null&&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 a;this.resolvePathCache=It(1e3),a=this.buildRouteTree(),this.setRoutes(a)}if(!this.stores&&this.latestLocation){const a=this.getStoreConfig(this);this.batch=a.batch,this.stores=bo(Mo(this.latestLocation),a),Uo(this)}let c=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(r||o!==l||i!==u){this.basepath=l;const a=[],d=ps(l);d&&d!=="/"&&a.push(Ro({basepath:l})),u&&a.push(u),this.rewrite=a.length===0?void 0:a.length===1?a[0]:Po(a),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((f=window.CSS)==null?void 0:f.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=()=>{const e=to(this.routeTree,this.options.caseSensitive,(n,o)=>{n.init({originalIndex:o})});return this.options.routeMasks&&Js(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,n)=>{const o={eventType:e,fn:n};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=e=>{this.subscribers.forEach(n=>{n.eventType===e.type&&n.fn(e)})},this.parseLocation=(e,n)=>{const o=({pathname:l,search:u,hash:f,href:a,state:d})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const x=this.options.parseSearch(u),v=this.options.stringifySearch(x);return{href:l+v+f,publicHref:l+v+f,pathname:Pt(l).path,external:!1,searchStr:v,search:nt(n==null?void 0:n.search,x),hash:Pt(f.slice(1)).path,state:X(n==null?void 0:n.state,d)}}const h=new URL(a,this.origin),p=fe(this.rewrite,h),g=this.options.parseSearch(p.search),m=this.options.stringifySearch(g);return p.search=m,{href:p.href.replace(p.origin,""),publicHref:a,pathname:Pt(p.pathname).path,external:!!this.rewrite&&p.origin!==this.origin,searchStr:m,search:nt(n==null?void 0:n.search,g),hash:Pt(p.hash.slice(1)).path,state:X(n==null?void 0:n.state,d)}},r=o(e),{__tempLocation:i,__tempKey:c}=r.state;if(i&&(!c||c===this.tempLocationKey)){const l=o(i);return l.state.key=r.state.key,l.state.__TSR_key=r.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:r}}return r},this.resolvePathWithBase=(e,n)=>ro({base:e,to:n.includes("//")?ve(n):n,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,n,o)=>typeof e=="string"?this.matchRoutesInternal({pathname:e,search:n},o):this.matchRoutesInternal(e,n),this.getMatchedRoutes=e=>To({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{const n=this.getMatch(e);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{var o;if(this.stores.pendingMatchStores.has(e))return;const n=(o=this.stores.matchStores.get(e))==null?void 0:o.get();n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(e)})},this.buildLocation=e=>{const n=(r={})=>{var L,k;const i=r._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(i);r.from;const l=r.unsafeRelative==="path"?i.pathname:r.from??c.fullPath,u=r.to?`${r.to}`:void 0,f=c.search,a=Object.assign(Object.create(null),c.params),d=(u==null?void 0:u.charCodeAt(0))===47?"/":this.resolvePathWithBase(l,"."),h=u?this.resolvePathWithBase(d,u):d,p=r.params===!1||r.params===null?Object.create(null):(r.params??!0)===!0?a:Object.assign(a,rt(r.params,a)),g=this.routesByPath[G(h)];let m;if(g)m=this.getRouteBranch(g);else if(h.includes("$"))m=[];else{const C=this.getMatchedRoutes(h);m=C.matchedRoutes,this.options.notFoundRoute&&(!C.foundRoute||C.foundRoute.path!=="/"&&C.routeParams["**"])&&(m=[...m,this.options.notFoundRoute])}if(m.length&&cs(p))for(const C of m){const T=((L=C.options.params)==null?void 0:L.stringify)??C.options.stringifyParams;if(T)try{Object.assign(p,T(p))}catch{}}const x=e.leaveParams?h:Pt(Ne({path:h,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let v=f;if(e._includeValidateSearch&&((k=this.options.search)!=null&&k.strict)){const C={};m.forEach(T=>{if(T.options.validateSearch)try{Object.assign(C,Nt(T.options.validateSearch,{...C,...v}))}catch{}}),v=C}v=ko({search:v,dest:r,destRoutes:m,_includeValidateSearch:e._includeValidateSearch}),v=nt(f,v);const _=this.options.stringifySearch(v),S=r.hash===!0?i.hash:r.hash?rt(r.hash,i.hash):void 0,w=S?`#${S}`:"";let I=r.state===!0?i.state:r.state?rt(r.state,i.state):{};I=X(i.state,I);const y=`${x}${_}${w}`;let P,b,R=!1;if(this.rewrite){const C=new URL(y,this.origin),T=Ss(this.rewrite,C);P=C.href.replace(C.origin,""),T.origin!==this.origin?(b=T.href,R=!0):b=T.pathname+T.search+T.hash}else P=Ks(y),b=P;return{publicHref:b,href:P,pathname:x,search:v,searchStr:_,state:I,hash:S??"",external:R,unmaskOnReload:r.unmaskOnReload}},o=(r={},i)=>{const c=n(r);let l=i?n(i):void 0;if(!l){const u=Object.create(null);if(this.options.routeMasks){const f=Ys(c.pathname,this.processedTree);if(f){Object.assign(u,f.rawParams);const{from:a,params:d,...h}=f.route,p=d===!1||d===null?Object.create(null):(d??!0)===!0?u:Object.assign(u,rt(d,u));i={from:e.from,...h,params:p},l=n(i)}}}return l&&(c.maskedLocation=l),c};return e.mask?o(e,{from:e.from,...e.mask}):o(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:n,...o})=>{let r;const i=()=>{const u=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(a=>{o.state[a]=this.latestLocation.state[a]});const f=at(o.state,this.latestLocation.state);return u.forEach(a=>{delete o.state[a]}),f},c=G(this.latestLocation.href)===G(o.href);let l=this.commitLocationPromise;if(this.commitLocationPromise=vt(()=>{l==null||l.resolve(),l=void 0}),c&&i())this.load();else{let{maskedLocation:u,hashScrollIntoView:f,...a}=o;u&&(a={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...a,search:a.searchStr,state:{...a.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(a.unmaskOnReload??this.options.unmaskOnReload??!1)&&(a.state.__tempKey=this.tempLocationKey)),a.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=o.replace?"REPLACE":"PUSH",this.history[r==="REPLACE"?"replace":"push"](a.publicHref,a.state,{ignoreBlocker:n})}return this._scroll.next=o.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:n,hashScrollIntoView:o,viewTransition:r,ignoreBlocker:i,href:c,...l}={})=>{if(c){const a=this.history.location.state.__TSR_index,d=Vt(c,{__TSR_index:e?a:a+1}),h=new URL(d.pathname,this.origin);l.to=fe(this.rewrite,h).pathname,l.search=this.options.parseSearch(d.search),l.hash=d.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const f=this.commitLocation({...u,viewTransition:r,replace:e,resetScroll:n,hashScrollIntoView:o,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:e,reloadDocument:n,href:o,publicHref:r,...i})=>{var l,u;let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(e!==void 0||!o){const a=this.buildLocation({to:e,...i});o=o??a.publicHref,r=r??a.publicHref}const f=!c&&r?r:o;if(Wt(f,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){const a=((u=(l=this.history).getBlockers)==null?void 0:u.call(l))??[];for(const d of a)if(d!=null&&d.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(f):window.location.href=f,Promise.resolve()}return this.buildAndCommitLocation({...i,href:o,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const e=this.matchRoutes(this.latestLocation),n=this.stores.cachedMatches.get().filter(o=>!e.some(r=>r.id===o.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(n)})},this.load=async e=>{var u;const n=(u=e==null?void 0:e.action)==null?void 0:u.type;let o,r,i;const c=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(f=>{this.startTransition(async()=>{var a;try{this.beforeLoad(),n?de.set(this.latestLocation,n):de.delete(this.latestLocation);const d=this.latestLocation,h=mt(d,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...h}),this.emit({type:"onBeforeLoad",...h}),await Ve({router:this,sync:e==null?void 0:e.sync,forceStaleReload:c.href===d.href,matches:this.stores.pendingMatches.get(),location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var v,_;let p=null,g=null,m=null,x=null;this.batch(()=>{const S=this.stores.pendingMatches.get(),w=S.length,I=this.stores.matches.get();p=w?I.filter(b=>!this.stores.pendingMatchStores.has(b.id)):null;const y=new Set;for(const b of this.stores.pendingMatchStores.values())b.routeId&&y.add(b.routeId);const P=new Set;for(const b of this.stores.matchStores.values())b.routeId&&P.add(b.routeId);g=w?I.filter(b=>!y.has(b.routeId)):null,m=w?S.filter(b=>!P.has(b.routeId)):null,x=w?S.filter(b=>P.has(b.routeId)):I,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),w&&(this.stores.setMatches(S),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...p.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]),this.clearExpiredCache())});for(const[S,w]of[[g,"onLeave"],[m,"onEnter"],[x,"onStay"]])if(S)for(const I of S)(_=(v=this.looseRoutesById[I.routeId].options)[w])==null||_.call(v,I)})})}})}catch(d){W(d)?(o=d,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):N(d)&&(r=d);const h=o?o.status:r?404:this.stores.matches.get().some(p=>p.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(h),this.stores.redirect.set(o)})}this.latestLoadPromise===i&&((a=this.commitLocationPromise)==null||a.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.stores.matches.get().some(f=>f.status==="error")&&(l=500),l!==void 0&&this.stores.statusCode.set(l)},this.startViewTransition=e=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const r=this.latestLocation,i=this.stores.resolvedLocation.get(),c=typeof n.types=="function"?n.types(mt(r,i)):n.types;if(c===!1){e();return}o={update:e,types:c}}else o=e;document.startViewTransition(o)}else e()},this.updateMatch=(e,n)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(e);if(o){o.set(n);return}const r=this.stores.matchStores.get(e);if(r){r.set(n);return}const i=this.stores.cachedMatchStores.get(e);if(i){const c=n(i.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(l=>l.filter(u=>u!==e)):i.set(c)}})},this.getMatch=e=>{var n,o,r;return((n=this.stores.cachedMatchStores.get(e))==null?void 0:n.get())??((o=this.stores.pendingMatchStores.get(e))==null?void 0:o.get())??((r=this.stores.matchStores.get(e))==null?void 0:r.get())},this.invalidate=e=>{const n=o=>{var r;return((r=e==null?void 0:e.filter)==null?void 0:r.call(e,o))??!0?{...o,invalid:!0,...e!=null&&e.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(n)),this.stores.setCached(this.stores.cachedMatches.get().map(n)),this.stores.setPending(this.stores.pendingMatches.get().map(n))}),this.shouldViewTransition=!1,this.load({sync:e==null?void 0:e.sync})},this.getParsedLocationHref=e=>e.publicHref||"/",this.resolveRedirect=e=>{const n=e.headers.get("Location");if(!e.options.href||e.options._builtLocation){const o=e.options._builtLocation??this.buildLocation(e.options),r=this.getParsedLocationHref(o);e.options.href=r,e.headers.set("Location",r)}else if(n)try{const o=new URL(n);if(this.origin&&o.origin===this.origin){const r=o.pathname+o.search+o.hash;e.options.href=r,e.headers.set("Location",r)}}catch{}if(e.options.href&&!e.options._builtLocation&&Wt(e.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return e.headers.get("Location")||e.headers.set("Location",e.options.href),e},this.clearCache=e=>{const n=e==null?void 0:e.filter;n!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!n(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const e=Date.now(),n=o=>{const r=this.looseRoutesById[o.routeId];if(!r.options.loader)return!0;const i=(o.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:e-o.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=Mt,this.preloadRoute=async e=>{const n=e._builtLocation??this.buildLocation(e);let o=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:e});const r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),c=o.filter(l=>!i.has(l.id));if(c.length){const l=this.stores.cachedMatches.get();this.stores.setCached([...l,...c])}try{return o=await Ve({router:this,matches:o,location:n,preload:!0,updateMatch:(l,u)=>{r.has(l)?o=o.map(f=>f.id===l?u(f):f):this.updateMatch(l,u)}}),o}catch(l){if(W(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:n});N(l)||console.error(l);return}},this.matchRoute=(e,n)=>{const o={...e,to:e.to?this.resolvePathWithBase(e.from||"",e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(o);if(n!=null&&n.pending&&this.stores.status.get()!=="pending")return!1;const i=((n==null?void 0:n.pending)===void 0?!this.stores.isLoading.get():n.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=Xs(r.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,i.pathname,this.processedTree);return!c||e.params&&!at(c.rawParams,e.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?at(i.search,r.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status==="notFound"||e.globalNotFound),this.getStoreConfig=s,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??uo,parseSearch:t.parseSearch??lo,protocolAllowlist:t.protocolAllowlist??zs}),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:s,processedTree:e}){this.routesById=t,this.routesByPath=s,this.processedTree=e;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}getRouteBranch(t){let s=this.routeBranchCache.get(t);return s||(s=ds(t),this.routeBranchCache.set(t,s)),s}get looseRoutesById(){return this.routesById}getParentContext(t){return t!=null&&t.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,s){var f,a;const e=this.getMatchedRoutes(t.pathname),{foundRoute:n,routeParams:o}=e;let{matchedRoutes:r}=e,i=!1;(n?n.path!=="/"&&o["**"]:G(t.pathname))&&(this.options.notFoundRoute?r=[...r,this.options.notFoundRoute]:i=!0);const c=i?Bo(this.options.notFoundMode,r):void 0,l=new Array(r.length),u=new Map;for(const d of this.stores.matchStores.values())d.routeId&&u.set(d.routeId,d.get());for(let d=0;d<r.length;d++){const h=r[d],p=l[d-1];let g,m,x;{const T=(p==null?void 0:p.search)??t.search,F=(p==null?void 0:p._strictSearch)??void 0;try{const j=Nt(h.options.validateSearch,{...T})??void 0;g={...T,...j},m={...F,...j},x=void 0}catch(j){let B=j;if(j instanceof $t||(B=new $t(j.message,{cause:j})),s!=null&&s.throwOnError)throw B;g=T,m={},x=B}}const v=((a=(f=h.options).loaderDeps)==null?void 0:a.call(f,{search:g}))??"",_=v?JSON.stringify(v):"",{interpolatedPath:S,usedParams:w}=Ne({path:h.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),I=h.id+S+_,y=this.getMatch(I),P=u.get(h.id),b=(y==null?void 0:y._strictParams)??w;let R;if(!y)try{qe(h,b)}catch(T){if(N(T)||W(T)?R=T:R=new Io(T.message,{cause:T}),s!=null&&s.throwOnError)throw R}Object.assign(o,b);const L=P?"stay":"enter";let k;if(y)k={...y,cause:L,params:(P==null?void 0:P.params)??o,_strictParams:b,search:nt(P?P.search:y.search,g),_strictSearch:m};else{const T=h.options.loader||h.options.beforeLoad||h.lazyFn||vs(h)?"pending":"success";k={id:I,ssr:h.options.ssr,index:d,routeId:h.id,params:(P==null?void 0:P.params)??o,_strictParams:b,pathname:S,updatedAt:Date.now(),search:P?nt(P.search,g):g,_strictSearch:m,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:vt()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:P?X(P.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}s!=null&&s.preload||(k.globalNotFound=c===h.id),k.searchError=x;const C=this.getParentContext(p);k.context={...C,...k.__routeContext,...k.__beforeLoadContext},l[d]=k}for(let d=0;d<l.length;d++){const h=l[d],p=this.looseRoutesById[h.routeId],g=this.getMatch(h.id),m=u.get(h.routeId);if(h.params=m?nt(m.params,o):o,!g){const x=l[d-1],v=this.getParentContext(x);if(p.options.context){const _={deps:h.loaderDeps,params:h.params,context:v??{},location:t,navigate:S=>this.navigate({...S,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:l,routeId:p.id};h.__routeContext=p.options.context(_)??void 0}h.context={...v,...h.__routeContext,...h.__beforeLoadContext}}}return l}matchRoutesLightweight(t){var u;const{matchedRoutes:s,routeParams:e}=this.getMatchedRoutes(t.pathname),n=Lt(s),o={...t.search};for(const f of s)try{Object.assign(o,Nt(f.options.validateSearch,o))}catch{}const r=Lt(this.stores.matchesId.get()),i=r&&((u=this.stores.matchStores.get(r))==null?void 0:u.get()),c=i&&i.routeId===n.id&&i.pathname===t.pathname;let l;if(c)l=i.params;else{const f=Object.assign(Object.create(null),e);for(const a of s)try{qe(a,f)}catch{}l=f}return{matchedRoutes:s,fullPath:n.fullPath,search:o,params:l}}},$t=class extends Error{},Io=class extends Error{};function Mo(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],statusCode:200}}function Nt(t,s){if(t==null)return{};if("~standard"in t){const e=t["~standard"].validate(s);if(e instanceof Promise)throw new $t("Async validation not supported");if(e.issues)throw new $t(JSON.stringify(e.issues,void 0,2),{cause:e});return e.value}return"parse"in t?t.parse(s):typeof t=="function"?t(s):{}}function To({pathname:t,routesById:s,processedTree:e}){const n=Object.create(null),o=G(t);let r;const i=Zs(o,e,!0);return i&&(r=i.route,Object.assign(n,i.rawParams)),{matchedRoutes:(i==null?void 0:i.branch)||[s.__root__],routeParams:n,foundRoute:r}}function ko({search:t,dest:s,destRoutes:e,_includeValidateSearch:n}){return Eo(e)(t,s,n??!1)}function Eo(t){var r;let s,e;const n=[];for(const i of t){const c=i.options;if("search"in c)(r=c.search)!=null&&r.middlewares&&n.push(...c.search.middlewares);else if(c.preSearchFilters||c.postSearchFilters){const u=({search:f,next:a})=>{const d=a(c.preSearchFilters?c.preSearchFilters.reduce((h,p)=>p(h),f):f);return c.postSearchFilters?c.postSearchFilters.reduce((h,p)=>p(h),d):d};n.push(u)}const l=c.validateSearch;if(l){const u=({search:f,next:a,meta:d})=>{const h=a(f);if(e)try{const p=Nt(l,h);if(d&&p)for(const g in p)g in h||(d.defaulted||(d.defaulted=new Map)).set(g,p[g]);return{...h,...p}}catch{}return h};n.push(u)}}const o=(i,c,l)=>{if(i>=n.length){if(!s.search)return{};if(s.search===!0)return c;const f=rt(s.search,c);return l&&(l.explicit=f),f}const u=(f,a)=>{if(a){const d=l||{};return{search:o(i+1,f,d),meta:d}}return o(i+1,f,l)};return n[i]({search:c,next:u,meta:l})};return function(c,l,u){return s=l,e=u,o(0,c)}}function Bo(t,s){if(t!=="root")for(let e=s.length-1;e>=0;e--){const n=s[e];if(n.children)return n.id}return ct}function qe(t,s){var n;const e=((n=t.options.params)==null?void 0:n.parse)??t.options.parseParams;if(e){const o=e(s);if(o===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,o)}}function Ao(){try{return sessionStorage}catch{return}}const jo="tsr-scroll-restoration-v1_3",yt=Ao();function Do(){try{return JSON.parse((yt==null?void 0:yt.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Fo(){try{yt==null||yt.setItem(jo,JSON.stringify(J))}catch{}}const J=Do(),Je="data-scroll-restoration-id",No=t=>t.state.__TSR_key||t.href;function Oo(t){const s=t.getAttribute(Je);if(s)return`[${Je}="${s}"]`;let e="",n=t,o;for(;o=n.parentNode;){let r=1,i=n;for(;i=i.previousElementSibling;)r++;const c=`${n.localName}:nth-child(${r})`;e=e?`${c} > ${e}`:c,n=o}return e}let At=!1;const pt="window";function he(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Ye(t){const s=[];for(const e of t){if(e===pt)continue;const n=he(e);n&&s.push(n)}return s}function Uo(t,s){const e=t.options.scrollRestoration,n=t._scroll;e&&(n.restoring=!0);const o=t.options.getScrollRestorationKey||No,r=new Map,i=(u,f,a)=>{const d=r.get(u)||{};d.scrollX=f,d.scrollY=a,r.set(u,d)},c=u=>{if(!(At||!n.restoring))if(u.target===document)i(pt,scrollX,scrollY);else{const f=u.target;i(f,f.scrollLeft,f.scrollTop)}},l=u=>{if(!n.restoring)return;const f=J[u]||(J[u]={});for(const[a,d]of r)a===pt?f[pt]=d:a.isConnected&&(f[Oo(a)]=d)};e&&!n.restoration&&(n.restoration=!0,At=!1,history.scrollRestoration="manual",document.addEventListener("scroll",c,!0),t.subscribe("onBeforeLoad",u=>{u.fromLocation&&l(o(u.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{l(o(t.stores.resolvedLocation.get()??t.stores.location.get())),Fo()})),!n.reset&&(n.reset=!0,t.subscribe("onRendered",u=>{var m;const f=t.options.scrollRestorationBehavior,a=t.options.scrollToTopSelectors,d=n.next;let h;if(r.clear(),d||(n.next=!0),typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const p=o(u.toLocation),g=u.fromLocation&&o(u.fromLocation);if(n.restoring&&g&&g!==p){const x=J[g];if(x){let v=J[p];for(const _ in x){if(_===pt){if(d)continue}else{const S=he(_);if(!S||d&&a&&(h??(h=Ye(a)),h.includes(S)))continue}v||(v=J[p]={}),v[_]??(v[_]=x[_])}}}At=!0;try{const x=u.toLocation.hash,v=u.toLocation.state.__hashScrollIntoViewOptions??!0;let _=!1;if(d){const S=de.get(u.toLocation),w=x&&v&&(S==="PUSH"||S==="REPLACE"),I=n.restoring?J[p]:void 0;if(I)for(const y in I){const{scrollX:P,scrollY:b}=I[y];if(y===pt){if(w)continue;scrollTo({top:b,left:P,behavior:f}),_=!0}else{const R=he(y);R&&(R.scrollLeft=P,R.scrollTop=b)}}if(!_&&!x){const y={top:0,left:0,behavior:f};if(scrollTo(y),a){h??(h=Ye(a));for(const P of h)P.scrollTo(y)}}}!_&&x&&v&&((m=document.getElementById(x))==null||m.scrollIntoView(v))}finally{At=!1}}))}const Wo="Error preloading route! ☝️";var xs=class{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=s=>{var l,u;this.originalIndex=s.originalIndex;const e=this.options,n=!(e!=null&&e.path)&&!(e!=null&&e.id);this.parentRoute=(u=(l=this.options).getParentRoute)==null?void 0:u.call(l),n?this._path=ct:this.parentRoute||q();let o=n?ct:e==null?void 0:e.path;o&&o!=="/"&&(o=hs(o));const r=(e==null?void 0:e.id)||o;let i=n?ct:Dt([this.parentRoute.id==="__root__"?"":this.parentRoute.id,r]);o==="__root__"&&(o="/"),i!=="__root__"&&(i=Dt(["/",i]));const c=i==="__root__"?"/":Dt([this.parentRoute.fullPath,o]);this._path=o,this._id=i,this._fullPath=c,this._to=G(c)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>po({from:this.fullPath,...s}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Ho=class extends xs{constructor(t){super(t)}};function xe(t){const s=t.errorComponent??Pe;return M.jsx(Vo,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:e,reset:n})=>e?E.createElement(s,{error:e,reset:n}):t.children})}var Vo=class extends E.Component{constructor(...t){super(...t),this.state={error:null}}static getDerivedStateFromProps(t,s){const e=t.getResetKey();return s.error&&s.resetKey!==e?{resetKey:e,error:null}:{resetKey:e}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidCatch(t,s){this.props.onCatch&&this.props.onCatch(t,s)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Pe({error:t}){const[s,e]=E.useState(!1);return M.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[M.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[M.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),M.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>e(n=>!n),children:s?"Hide Error":"Show Error"})]}),M.jsx("div",{style:{height:".25rem"}}),s?M.jsx("div",{children:M.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?M.jsx("code",{children:t.message}):null})}):null]})}function $o({children:t,fallback:s=null}){return Ps()?M.jsx(_t.Fragment,{children:t}):M.jsx(_t.Fragment,{children:s})}function Ps(){return _t.useSyncExternalStore(zo,()=>!0,()=>!1)}function zo(){return()=>{}}var Rs=E.createContext(null);function V(t){return E.useContext(Rs)}var qt=E.createContext(void 0),Ko=E.createContext(void 0),D=(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))(D||{});function Go({update:t,notify:s,unwatched:e}){return{link:n,unlink:o,propagate:r,checkDirty:i,shallowPropagate:c};function n(u,f,a){const d=f.depsTail;if(d!==void 0&&d.dep===u)return;const h=d!==void 0?d.nextDep:f.deps;if(h!==void 0&&h.dep===u){h.version=a,f.depsTail=h;return}const p=u.subsTail;if(p!==void 0&&p.version===a&&p.sub===f)return;const g=f.depsTail=u.subsTail={version:a,dep:u,sub:f,prevDep:d,nextDep:h,prevSub:p,nextSub:void 0};h!==void 0&&(h.prevDep=g),d!==void 0?d.nextDep=g:f.deps=g,p!==void 0?p.nextSub=g:u.subs=g}function o(u,f=u.sub){const a=u.dep,d=u.prevDep,h=u.nextDep,p=u.nextSub,g=u.prevSub;return h!==void 0?h.prevDep=d:f.depsTail=d,d!==void 0?d.nextDep=h:f.deps=h,p!==void 0?p.prevSub=g:a.subsTail=g,g!==void 0?g.nextSub=p:(a.subs=p)===void 0&&e(a),h}function r(u){let f=u.nextSub,a;t:do{const d=u.sub;let h=d.flags;if(h&60?h&12?h&4?!(h&48)&&l(u,d)?(d.flags=h|40,h&=1):h=0:d.flags=h&-9|32:h=0:d.flags=h|32,h&2&&s(d),h&1){const p=d.subs;if(p!==void 0){const g=(u=p).nextSub;g!==void 0&&(a={value:f,prev:a},f=g);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;a!==void 0;)if(u=a.value,a=a.prev,u!==void 0){f=u.nextSub;continue t}break}while(!0)}function i(u,f){let a,d=0,h=!1;t:do{const p=u.dep,g=p.flags;if(f.flags&16)h=!0;else if((g&17)===17){if(t(p)){const m=p.subs;m.nextSub!==void 0&&c(m),h=!0}}else if((g&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(a={value:u,prev:a}),u=p.deps,f=p,++d;continue}if(!h){const m=u.nextDep;if(m!==void 0){u=m;continue}}for(;d--;){const m=f.subs,x=m.nextSub!==void 0;if(x?(u=a.value,a=a.prev):u=m,h){if(t(f)){x&&c(m),f=u.sub;continue}h=!1}else f.flags&=-33;f=u.sub;const v=u.nextDep;if(v!==void 0){u=v;continue t}}return h}while(!0)}function c(u){do{const f=u.sub,a=f.flags;(a&48)===32&&(f.flags=a|16,(a&6)===2&&s(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let a=f.depsTail;for(;a!==void 0;){if(a===u)return!0;a=a.prevDep}return!1}}function qo(t,s,e){var r,i,c;const n=typeof t=="object",o=n?t:void 0;return{next:(r=n?t.next:t)==null?void 0:r.bind(o),error:(i=n?t.error:s)==null?void 0:i.bind(o),complete:(c=n?t.complete:e)==null?void 0:c.bind(o)}}const pe=[];let Ot=0;const{link:Xe,unlink:Jo,propagate:Yo,checkDirty:bs,shallowPropagate:Ze}=Go({update(t){return t._update()},notify(t){pe[ge++]=t,t.flags&=~D.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=D.Mutable|D.Dirty,zt(t))}});let jt=0,ge=0,z,me=0;function ws(t){try{++me,t()}finally{--me||_s()}}function zt(t){const s=t.depsTail;let e=s!==void 0?s.nextDep:t.deps;for(;e!==void 0;)e=Jo(e,t)}function _s(){if(!(me>0)){for(;jt<ge;){const t=pe[jt];pe[jt++]=void 0,t.notify()}jt=0,ge=0}}function Qe(t,s){const e=typeof t=="function",n=t,o={_snapshot:e?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:e?D.None:D.Mutable,get(){return z!==void 0&&Xe(o,z,Ot),o._snapshot},subscribe(r){const i=qo(r),c={current:!1},l=Xo(()=>{var u;o.get(),c.current?(u=i.next)==null||u.call(i,o._snapshot):c.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(r){const i=z,c=(s==null?void 0:s.compare)??Object.is;if(e)z=o,++Ot,o.depsTail=void 0;else if(r===void 0)return!1;e&&(o.flags=D.Mutable|D.RecursedCheck);try{const l=o._snapshot,u=typeof r=="function"?r(l):r===void 0&&e?n(l):r;return l===void 0||!c(l,u)?(o._snapshot=u,!0):!1}finally{z=i,e&&(o.flags&=~D.RecursedCheck),zt(o)}}};return e?(o.flags=D.Mutable|D.Dirty,o.get=function(){const r=o.flags;if(r&D.Dirty||r&D.Pending&&bs(o.deps,o)){if(o._update()){const i=o.subs;i!==void 0&&Ze(i)}}else r&D.Pending&&(o.flags=r&~D.Pending);return z!==void 0&&Xe(o,z,Ot),o._snapshot}):o.set=function(r){if(o._update(r)){const i=o.subs;i!==void 0&&(Yo(i),Ze(i),_s())}},o}function Xo(t){const s=()=>{const n=z;z=e,++Ot,e.depsTail=void 0,e.flags=D.Watching|D.RecursedCheck;try{return t()}finally{z=n,e.flags&=~D.RecursedCheck,zt(e)}},e={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:D.Watching|D.RecursedCheck,notify(){const n=this.flags;n&D.Dirty||n&D.Pending&&bs(this.deps,this)?s():this.flags=D.Watching},stop(){this.flags=D.None,this.depsTail=void 0,zt(this)}};return s(),e}var re={exports:{}},ie={},ae={exports:{}},ce={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.js
4
4
  *
@@ -4,10 +4,10 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Rangka</title>
7
- <script type="module" crossorigin src="/assets/index-D1wStSrO.js"></script>
8
- <link rel="modulepreload" crossorigin href="/assets/vendor-radix-D-Trh8JA.js">
9
- <link rel="modulepreload" crossorigin href="/assets/vendor-query-dRdWN_eK.js">
10
- <link rel="modulepreload" crossorigin href="/assets/vendor-router-B1WM9yRc.js">
7
+ <script type="module" crossorigin src="/assets/index-Dh7K40cQ.js"></script>
8
+ <link rel="modulepreload" crossorigin href="/assets/vendor-radix-BJxYPxPb.js">
9
+ <link rel="modulepreload" crossorigin href="/assets/vendor-query-B2cydN5j.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/vendor-router-ET_myMt5.js">
11
11
  <link rel="stylesheet" crossorigin href="/assets/index-63v1sBS3.css">
12
12
  </head>
13
13
  <body>
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/widgets/components/register.ts"],"names":[],"mappings":"AA8BA,wBAAgB,sBAAsB,IAAI,IAAI,CAI7C"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/widgets/components/register.ts"],"names":[],"mappings":"AAwFA,wBAAgB,sBAAsB,IAAI,IAAI,CAI7C"}
@@ -8,6 +8,35 @@ import { SectionWidget } from './SectionWidget.js';
8
8
  import { GridWidget } from './GridWidget.js';
9
9
  import { DataWidget } from './DataWidget.js';
10
10
  import { FormWidget } from '../form/FormWidget.js';
11
+ import { CheckboxWidget } from './CheckboxWidget.js';
12
+ import { BadgeWidget } from './BadgeWidget.js';
13
+ import { IconWidget } from './IconWidget.js';
14
+ import { ImageWidget } from './ImageWidget.js';
15
+ import { DividerWidget } from './DividerWidget.js';
16
+ import { SpacerWidget } from './SpacerWidget.js';
17
+ import { SplitWidget } from './SplitWidget.js';
18
+ import { CardWidget } from './CardWidget.js';
19
+ import { ScrollAreaWidget } from './ScrollAreaWidget.js';
20
+ import { StackWidget } from './StackWidget.js';
21
+ import { TableWidget } from './TableWidget.js';
22
+ import { ColumnWidget } from './ColumnWidget.js';
23
+ import { RepeatWidget } from './RepeatWidget.js';
24
+ import { DrawerWidget } from './DrawerWidget.js';
25
+ import { ModalWidget } from './ModalWidget.js';
26
+ import { TextareaWidget } from './TextareaWidget.js';
27
+ import { DatePickerWidget } from './DatePickerWidget.js';
28
+ import { DatetimeWidget } from './DatetimeWidget.js';
29
+ import { MoneyWidget } from './MoneyWidget.js';
30
+ import { LinkWidget } from './LinkWidget.js';
31
+ import { ManyToManyWidget } from './ManyToManyWidget.js';
32
+ import { DynamicLinkWidget } from './DynamicLinkWidget.js';
33
+ import { AttachmentWidget } from './AttachmentWidget.js';
34
+ import { AttachmentsWidget } from './AttachmentsWidget.js';
35
+ import { SequenceWidget } from './SequenceWidget.js';
36
+ import { ComputedWidget } from './ComputedWidget.js';
37
+ import { CodeWidget } from './CodeWidget.js';
38
+ import { JsonWidget } from './JsonWidget.js';
39
+ import { TreeWidget } from './TreeWidget.js';
11
40
  const builtInWidgets = [
12
41
  ButtonWidget,
13
42
  InputWidget,
@@ -18,6 +47,35 @@ const builtInWidgets = [
18
47
  GridWidget,
19
48
  DataWidget,
20
49
  FormWidget,
50
+ CheckboxWidget,
51
+ BadgeWidget,
52
+ IconWidget,
53
+ ImageWidget,
54
+ DividerWidget,
55
+ SpacerWidget,
56
+ SplitWidget,
57
+ CardWidget,
58
+ ScrollAreaWidget,
59
+ StackWidget,
60
+ TableWidget,
61
+ ColumnWidget,
62
+ RepeatWidget,
63
+ DrawerWidget,
64
+ ModalWidget,
65
+ TextareaWidget,
66
+ DatePickerWidget,
67
+ DatetimeWidget,
68
+ MoneyWidget,
69
+ LinkWidget,
70
+ ManyToManyWidget,
71
+ DynamicLinkWidget,
72
+ AttachmentWidget,
73
+ AttachmentsWidget,
74
+ SequenceWidget,
75
+ ComputedWidget,
76
+ CodeWidget,
77
+ JsonWidget,
78
+ TreeWidget,
21
79
  ];
22
80
  export function registerBuiltInWidgets() {
23
81
  for (const widget of builtInWidgets) {
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/widgets/components/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AASnD,MAAM,cAAc,GAAqB;IACvC,YAAyC;IACzC,WAAwC;IACxC,YAAyC;IACzC,UAAuC;IACvC,WAAwC;IACxC,aAA0C;IAC1C,UAAuC;IACvC,UAAuC;IACvC,UAAuC;CACxC,CAAC;AAEF,MAAM,UAAU,sBAAsB;IACpC,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE,CAAC;QACpC,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/widgets/components/register.ts"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/widgets/loader.ts"],"names":[],"mappings":"AAaA,wBAAsB,iBAAiB,CACrC,WAAW,GAAE,MAAiC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA8BjE"}
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/widgets/loader.ts"],"names":[],"mappings":"AAYA,wBAAsB,iBAAiB,CACrC,WAAW,GAAE,MAAiC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAQf;AAED,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAqBjE"}
@@ -1,5 +1,4 @@
1
1
  import { getWidget, registerWidget } from './registry.js';
2
- import { lazyWidgets } from './components/lazy-manifest.js';
3
2
  let manifestCache = null;
4
3
  const loaded = new Set();
5
4
  const loading = new Map();
@@ -22,14 +21,6 @@ export async function ensureWidget(name) {
22
21
  const pending = loading.get(name);
23
22
  if (pending)
24
23
  return pending;
25
- const loader = lazyWidgets[name];
26
- if (loader) {
27
- const promise = loadBuiltInWidget(name, loader);
28
- loading.set(name, promise);
29
- const result = await promise;
30
- loading.delete(name);
31
- return result;
32
- }
33
24
  if (!manifestCache) {
34
25
  await loadCustomWidgets();
35
26
  }
@@ -43,21 +34,6 @@ export async function ensureWidget(name) {
43
34
  loading.delete(name);
44
35
  return result;
45
36
  }
46
- async function loadBuiltInWidget(name, loader) {
47
- try {
48
- const mod = await loader();
49
- const component = mod.default;
50
- if (component && component.widgetMeta) {
51
- registerWidget(component.widgetMeta, component);
52
- }
53
- loaded.add(name);
54
- return getWidget(name) !== undefined;
55
- }
56
- catch {
57
- loaded.add(name);
58
- return false;
59
- }
60
- }
61
37
  async function loadCustomWidget(name, entry) {
62
38
  try {
63
39
  if (entry.css) {
@@ -69,14 +45,12 @@ async function loadCustomWidget(name, entry) {
69
45
  if (def.meta && def.component) {
70
46
  registerWidget(def.meta, def.component);
71
47
  }
72
- else if (def.name) {
73
- registerWidget(def, mod.default);
74
- }
75
48
  }
76
49
  loaded.add(name);
77
50
  return getWidget(name) !== undefined;
78
51
  }
79
- catch {
52
+ catch (err) {
53
+ console.error(`[rangka] Failed to load custom widget "${name}":`, err);
80
54
  loaded.add(name);
81
55
  return false;
82
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/widgets/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQ5D,IAAI,aAAa,GAAoB,IAAI,CAAC;AAC1C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;AACjC,MAAM,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;AAEpD,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,cAAsB,wBAAwB;IAE9C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO;QACpB,aAAa,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;IACT,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,IAAI,SAAS,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IAE3D,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,OAAO;QAAE,OAAO,OAAO,CAAC;IAE5B,MAAM,MAAM,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;QAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,iBAAiB,EAAE,CAAC;IAC5B,CAAC;IAED,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,CAAC,GAAG;QAAE,OAAO,KAAK,CAAC;IAEvB,MAAM,KAAK,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IACnE,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE3B,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC;IAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,iBAAiB,CAC9B,IAAY,EACZ,MAEE;IAEF,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,MAAM,EAAE,CAAC;QAC3B,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC;QAC9B,IAAI,SAAS,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;YACtC,cAAc,CAAC,SAAS,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,gBAAgB,CAC7B,IAAY,EACZ,KAAkC;IAElC,IAAI,CAAC;QACH,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;YACd,MAAM,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QAED,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEtD,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YACnD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC;YACxB,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;gBAC9B,cAAc,CACZ,GAAG,CAAC,IAA4B,EAChC,GAAG,CAAC,SAAuC,CAC5C,CAAC;YACJ,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;gBACpB,cAAc,CAAC,GAA2B,EAAE,GAAG,CAAC,OAAqC,CAAC,CAAC;YACzF,CAAC;QACH,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,cAAc,IAAI,IAAI,CAAC,CAAC;QAChE,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QACD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,GAAG,GAAG,YAAY,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/widgets/loader.ts"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rangka/client",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [
@@ -36,7 +36,7 @@
36
36
  "tailwind-merge": "^2.6.1",
37
37
  "tw-animate-css": "^1.4.0",
38
38
  "vaul": "^1.1.2",
39
- "@rangka/shared": "0.1.2"
39
+ "@rangka/shared": "0.1.3"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@tailwindcss/vite": "^4.1.0",
@@ -1 +0,0 @@
1
- import{r as y,j as s}from"./vendor-radix-D-Trh8JA.js";import{L as z,M as N,j as D,c as b}from"./index-D1wStSrO.js";import"./vendor-query-dRdWN_eK.js";import"./vendor-router-B1WM9yRc.js";function R({props:d,bind:e,on:r}){var p,x;const f=d.label??((p=e.meta)==null?void 0:p.label)??"",h=d.accept??"",l=d.disabled??((x=e.meta)==null?void 0:x.readOnly)??!1,m=y.useRef(null),u=e.value,g=t=>{var c,n,i;const a=(c=t.target.files)==null?void 0:c[0];if(a){const o={name:a.name,size:a.size};(n=e.setValue)==null||n.call(e,o),(i=r.change)==null||i.call(r,o)}},v=t=>{var c,n,i;if(t.preventDefault(),l)return;const a=(c=t.dataTransfer.files)==null?void 0:c[0];if(a){const o={name:a.name,size:a.size};(n=e.setValue)==null||n.call(e,o),(i=r.change)==null||i.call(r,o)}},j=()=>{var t,a;(t=e.setValue)==null||t.call(e,null),(a=r.remove)==null||a.call(r),m.current&&(m.current.value="")};return s.jsxs(z,{children:[f&&s.jsx(N,{children:f}),u?s.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input px-3 py-2",children:[s.jsx("span",{className:"flex-1 truncate text-sm",children:u.name}),u.size&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[(u.size/1024).toFixed(1)," KB"]}),!l&&s.jsx(D,{variant:"ghost",size:"sm",onClick:j,className:"h-5 px-1","aria-label":"Remove file",children:"×"})]}):s.jsx("div",{className:b("flex flex-col items-center justify-center rounded-md border-2 border-dashed border-input p-4 text-center transition-colors",!l&&"cursor-pointer hover:border-primary/50 hover:bg-accent/50",l&&"opacity-50 cursor-not-allowed"),onClick:()=>{var t;return!l&&((t=m.current)==null?void 0:t.click())},onDrop:v,onDragOver:t=>t.preventDefault(),role:"button","aria-label":"Upload file",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Drop a file here or click to browse"})}),s.jsx("input",{ref:m,type:"file",accept:h,onChange:g,className:"hidden",disabled:l})]})}R.widgetMeta={name:"attachment",label:"Attachment",category:"input",schema:{label:{type:"string"},accept:{type:"string"},maxSize:{type:"string"},disabled:{type:"boolean",default:!1}},binding:"field",triggers:["change","remove"],container:!1};export{R as AttachmentWidget};
@@ -1 +0,0 @@
1
- import{r as z,j as a}from"./vendor-radix-D-Trh8JA.js";import{L as N,M as b,j as C,c as D}from"./index-D1wStSrO.js";import"./vendor-query-dRdWN_eK.js";import"./vendor-router-B1WM9yRc.js";function F({props:u,bind:t,on:s}){var h,f;const d=u.label??((h=t.meta)==null?void 0:h.label)??"",g=u.accept??"",p=u.maxCount??10,i=u.disabled??((f=t.meta)==null?void 0:f.readOnly)??!1,x=z.useRef(null),n=t.value??[],y=e=>{var c,m;const r=Array.from(e.target.files??[]).map(o=>({name:o.name,size:o.size})),l=[...n,...r].slice(0,p);(c=t.setValue)==null||c.call(t,l),(m=s.change)==null||m.call(s,l),x.current&&(x.current.value="")},j=e=>{var c,m;if(e.preventDefault(),i)return;const r=Array.from(e.dataTransfer.files).map(o=>({name:o.name,size:o.size})),l=[...n,...r].slice(0,p);(c=t.setValue)==null||c.call(t,l),(m=s.change)==null||m.call(s,l)},v=e=>{var l,c;const r=n.filter((m,o)=>o!==e);(l=t.setValue)==null||l.call(t,r),(c=s.remove)==null||c.call(s,e)};return a.jsxs(N,{children:[d&&a.jsx(b,{children:d}),n.length>0&&a.jsx("ul",{className:"mb-2 space-y-1",role:"list",children:n.map((e,r)=>a.jsxs("li",{className:"flex items-center gap-2 rounded-md border border-input px-3 py-1.5",children:[a.jsx("span",{className:"flex-1 truncate text-sm",children:e.name}),e.size&&a.jsxs("span",{className:"text-xs text-muted-foreground",children:[(e.size/1024).toFixed(1)," KB"]}),!i&&a.jsx(C,{variant:"ghost",size:"sm",onClick:()=>v(r),className:"h-5 px-1","aria-label":`Remove ${e.name}`,children:"×"})]},`${e.name}-${r}`))}),n.length<p&&a.jsx("div",{className:D("flex flex-col items-center justify-center rounded-md border-2 border-dashed border-input p-4 text-center transition-colors",!i&&"cursor-pointer hover:border-primary/50 hover:bg-accent/50",i&&"opacity-50 cursor-not-allowed"),onClick:()=>{var e;return!i&&((e=x.current)==null?void 0:e.click())},onDrop:j,onDragOver:e=>e.preventDefault(),role:"button","aria-label":"Upload files",children:a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Drop files here or click to browse (",n.length,"/",p,")"]})}),a.jsx("input",{ref:x,type:"file",accept:g,multiple:!0,onChange:y,className:"hidden",disabled:i})]})}F.widgetMeta={name:"attachments",label:"Attachments",category:"input",schema:{label:{type:"string"},accept:{type:"string"},maxSize:{type:"string"},maxCount:{type:"number",default:10},disabled:{type:"boolean",default:!1}},binding:"field",triggers:["change","remove"],container:!1};export{F as AttachmentsWidget};
@@ -1 +0,0 @@
1
- import{j as i}from"./vendor-radix-D-Trh8JA.js";import{B as l}from"./index-D1wStSrO.js";import"./vendor-query-dRdWN_eK.js";import"./vendor-router-B1WM9yRc.js";const r={solid:"default",outline:"outline",subtle:"secondary"};function s({props:e,bind:t}){const a=e.label,o=t.value??"",n=r[e.variant??"subtle"]??"secondary";return i.jsx(l,{variant:n,children:a||o})}s.widgetMeta={name:"badge",label:"Badge",category:"display",schema:{variant:{type:"enum",options:["solid","outline","subtle"],default:"subtle"},color:{type:"enum",options:["default","success","warning","error","info"],default:"default"},colorMap:{type:"object"}},binding:"field",triggers:[],container:!1};export{s as BadgeWidget};
@@ -1 +0,0 @@
1
- import{j as e}from"./vendor-radix-D-Trh8JA.js";import{a as m,b as x,d as f,e as g,f as j,W as o,g as h,h as p}from"./index-D1wStSrO.js";import{S as u}from"./useSurfaceContext-kzu9770H.js";import"./vendor-query-dRdWN_eK.js";import"./vendor-router-B1WM9yRc.js";function C({props:t,children:c}){const a=t.title,s=t.description,l=t.size??"default",i=t.actions,n=t.footer;return e.jsxs(m,{size:l,children:[(a||s||i)&&e.jsxs(x,{children:[a&&e.jsx(f,{children:a}),s&&e.jsx(g,{children:s}),i&&i.length>0&&e.jsx(j,{children:e.jsx("div",{className:"flex items-center gap-2",children:i.map((r,d)=>e.jsx(o,{node:r},r.id??d))})})]}),e.jsx(h,{children:e.jsx(u,{value:"card",children:c})}),n&&n.length>0&&e.jsx(p,{children:n.map((r,d)=>e.jsx(o,{node:r},r.id??d))})]})}C.widgetMeta={name:"card",label:"Card",category:"layout",schema:{title:{type:"string"},description:{type:"string"},size:{type:"enum",options:["default","sm"],default:"default"},actions:{type:"array"},footer:{type:"array"}},binding:"none",triggers:[],container:!0};export{C as CardWidget};
@@ -1 +0,0 @@
1
- import{j as a,a0 as u,a1 as b}from"./vendor-radix-D-Trh8JA.js";import{C as g,c as h}from"./index-D1wStSrO.js";import"./vendor-query-dRdWN_eK.js";import"./vendor-router-B1WM9yRc.js";function m({className:r,...e}){return a.jsx(u,{"data-slot":"checkbox",className:h("peer relative flex size-4 shrink-0 items-center justify-center rounded-none border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",r),...e,children:a.jsx(b,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:a.jsx(g,{})})})}function f({props:r,bind:e,on:i}){var c,l;const t=r.label??((c=e.meta)==null?void 0:c.label)??"",x=r.disabled??((l=e.meta)==null?void 0:l.readOnly)??!1,s=e.error;return a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(m,{checked:e.value??!1,onCheckedChange:d=>{var n,o;(n=e.setValue)==null||n.call(e,d),(o=i.change)==null||o.call(i,d)},disabled:x}),t&&a.jsx("span",{className:"text-sm text-foreground",children:t})]}),s&&a.jsx("p",{className:"text-xs text-destructive",children:s})]})}f.widgetMeta={name:"checkbox",label:"Checkbox",category:"input",schema:{label:{type:"string"},disabled:{type:"boolean",default:!1}},binding:"field",triggers:["change"],container:!1};export{f as CheckboxWidget};