gitifact 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/dist/browser/assets/{Markdown-Br4lZgRm.js → Markdown-C8BT0YZz.js} +2 -2
- package/dist/browser/assets/about-DMFBT-sA.js +3 -0
- package/dist/browser/assets/about-Df__2EC8.css +1 -0
- package/dist/browser/assets/{contributors._email-BedFTFKd.js → contributors._email-bq12TRAr.js} +1 -1
- package/dist/browser/assets/{contributors.index-Bnzf41H5.js → contributors.index-eTu4P306.js} +1 -1
- package/dist/browser/assets/{features._featureId-DcMHCk6D.js → features._featureId-CGRWLMyZ.js} +1 -1
- package/dist/browser/assets/{requirements-Dwwz8esQ.js → features.index-_wXeEia1.js} +1 -1
- package/dist/browser/assets/git-CTULSVR7.js +1 -0
- package/dist/browser/assets/gitifact-logo-DPewkDQ4.svg +5 -0
- package/dist/browser/assets/{guides._documentId-DCT-3idQ.js → guides._documentId-D3RCTjtd.js} +1 -1
- package/dist/browser/assets/{guides.index-D1kTKyw-.js → guides.index-CFMN9ggJ.js} +1 -1
- package/dist/browser/assets/index-Cl1J8uRf.js +56 -0
- package/dist/browser/assets/{page-header-BL8BYIMW.js → page-header-CYf1yQV1.js} +75 -5
- package/dist/browser/assets/product-BxZktNQM.js +8 -0
- package/dist/browser/assets/{product.index-DByH6f_H.js → product.index-AF24IXK3.js} +1 -1
- package/dist/browser/assets/request-state-DzkYXwJR.js +1 -0
- package/dist/browser/assets/{features.index-De9qZC-A.js → requirements-DpTMK_Uu.js} +1 -1
- package/dist/browser/assets/{routes-3pD4uVSj.js → routes-jgWFqeRv.js} +1 -1
- package/dist/browser/index.html +5 -5
- package/dist/i18n/ko/block.md +30 -0
- package/dist/i18n/ko/changelog.md +41 -0
- package/dist/main.js +860 -524
- package/package.json +3 -3
- package/dist/browser/assets/about-BEuntqm_.js +0 -52
- package/dist/browser/assets/about-yX6os7bt.css +0 -1
- package/dist/browser/assets/git-D7ZvYMaq.js +0 -1
- package/dist/browser/assets/index-Dv_ANS5w.js +0 -56
- package/dist/browser/assets/product-mRpyGR_g.js +0 -8
- package/dist/browser/assets/request-state-CcdtplxL.js +0 -1
- /package/dist/{docs → i18n/ko/docs}/commit.md +0 -0
- /package/dist/{docs → i18n/ko/docs}/design.md +0 -0
- /package/dist/{docs → i18n/ko/docs}/product.md +0 -0
- /package/dist/{docs → i18n/ko/docs}/spec.md +0 -0
- /package/dist/{docs → i18n/ko/docs}/workflow.md +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Tooltip-a2AGdnkC.js","assets/themeProps-MQSlTycI.js","assets/useIsomorphicLayoutEffect-f8dYmyS2.js","assets/MenuBottomSheet-BkRC4_VW.js","assets/Section-DQRr6JoK.js","assets/useMediaQuery-C_nG4b-e.js","assets/BottomSheet-CUR7U0gF.js","assets/useDevWarning-CzR6rkf6.js","assets/useScrollLock-CrQ0xkil.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{J as e,K as t,S as n,V as r,X as i,c as a,l as o,n as s,q as c,v as l,x as u,y as d}from"./themeProps-MQSlTycI.js";import{a as f,r as p,t as m,u as h}from"./useIsomorphicLayoutEffect-f8dYmyS2.js";import{a as g,n as _,t as v}from"./useMediaQuery-C_nG4b-e.js";import{A as y,B as b,D as x,E as S,F as C,G as w,H as T,I as E,L as D,M as ee,N as O,O as k,P as A,R as te,T as j,V as ne,_ as re,f as ie,g as M,j as ae,k as N,n as oe,p as se,r as ce,w as le,z as ue}from"./IconButton-BqlnBu_N.js";import{t as P}from"./useDevWarning-CzR6rkf6.js";var F=i(c(),1),I=o(),de=typeof Intl.Segmenter==`function`?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null;function L(e){if(de){let t=de.segment(e)[Symbol.iterator]().next();return t.done?``:t.value.segment}let t=e.codePointAt(0);return t==null?``:String.fromCodePoint(t)}function fe(e){return e!=null&&typeof e!=`boolean`&&e!==``}var R={kbCHJM:`x1nrll8i`,k3aq6I:`xsqj5wx`,$$css:!0},pe={mirror:{k3aq6I:`xgtlewx`,$$css:!0},centerInline:e=>[R,{"--x-transform":`translate(-50%, ${e})`==null?void 0:`translate(-50%, ${e})`}]},me=[`button`,`a`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="combobox"]`,`[role="listbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[data-pressable-container]`].join(`,`),he=`[aria-readonly="true"]`;function ge(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(me)&&!n.matches(he))return!0;n=n.parentElement}return!1}function _e(e){if(typeof document>`u`||!(`getSelection`in document))return!1;let t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function ve({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return(0,F.useEffect)(()=>{let t=e.current;t&&t.setAttribute(`data-pressable-container`,`true`)},[e]),{onClick:(0,F.useCallback)(o=>{if(a)return;let s=e.current;if(!s||_e(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&ge(c,s))&&(n?.(o),!o.defaultPrevented&&(r!=null&&(i===`_blank`||o.ctrlKey||o.metaKey?window.open(r,`_blank`,`noopener`):t?.current?t.current.click():window.location.href=r),r==null&&n==null&&t?.current))){let e=new MouseEvent(`click`,{bubbles:o.bubbles,cancelable:o.cancelable,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey,altKey:o.altKey,button:o.button});t.current.dispatchEvent(e),o.stopPropagation()}},[e,t,n,r,i,a]),onMouseUp:(0,F.useCallback)(t=>{if(a)return;let n=e.current;if(!n)return;let i=t.target;i instanceof Element&&t.button===1&&r!=null&&(i===t.currentTarget||!ge(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a])}}var ye=(0,F.lazy)(async()=>x(()=>import(`./Tooltip-a2AGdnkC.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2])));function be(e){return e===`display-1`||e===`display-2`||e===`display-3`}var xe={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function Se({level:e,type:n,weight:r,accessibilityLevel:i,color:a=`primary`,display:o=`block`,maxLines:c=0,hasTruncateTooltip:l=!0,wordBreak:u,textWrap:d,justify:f=`start`,hasCapsize:p=!1,hasStrikethrough:m=!1,xstyle:h,className:_,style:v,children:x,ref:w,...j}){let re=xe[e],ie=i&&i!==e?{"aria-level":i}:{},M=u??(c===1?`break-all`:`break-word`),oe=c>0||p?`block`:o,se=n&&be(n)?n:void 0,ce=N({maxLines:c}),le=typeof l==`string`?l:`above`,P=c>0&&l!==!1&&ce.isTruncated,de=(0,F.useRef)(null),L=k(w,ce.ref,de),fe=c>1?{WebkitLineClamp:c}:void 0;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(re,{ref:L,...g(s(`heading`,{level:e,color:a,type:n,weight:r}),t(ae[S(a)],se?D[se]:E[e],se&&O[se],r&&ne[r],c===1?ue.singleLine:c>1?ue.multiLine:A[oe],c>0&&T[M],d&&te[d],f!==`start`&&C[f],p&&y.enabled,m&&ee.strikethrough,h),_,{...v,...fe}),...ie,...j,children:x}),P&&(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(ye,{anchorRef:de,content:(0,I.jsx)(`span`,{...t(b.content),children:ce.fullText}),placement:le})})]})}Se.displayName=`Heading`;var Ce=[`noopener`,`noreferrer`];function we(e,t){if(e!==`_blank`)return{target:e,rel:t};let n=t?.split(/\s+/).filter(Boolean)??[];for(let e of Ce)n.includes(e)||n.push(e);return{target:e,rel:n.join(` `)}}var Te=F.use,Ee=F.useLayoutEffect;function De(e,t,n){F.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function Oe(e){let t=F.useRef(null);return F.useImperativeHandle(e,()=>t.current,[]),t}function ke(e){return e[e.length-1]}function Ae(e,t){return typeof e==`function`?e(t):e}var je=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;function Ne(e){for(let t in e)if(je.call(e,t))return!0;return!1}var Pe=()=>Object.create(null),Fe=(e,t)=>Ie(e,t,Pe);function Ie(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Be(e)&&Be(i);if(!a&&!(Re(e)&&Re(i)))return i;let o=a?e:Le(e);if(!o)return i;let s=a?i:Le(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:je.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=Ie(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function Le(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!Me.call(e,r))return!1;t.push(r)}return t}function Re(e){if(!ze(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ze(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ze(e){return Object.prototype.toString.call(e)===`[object Object]`}function Be(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ve(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Ve(e[r],t[r],n))return!1;return!0}if(Re(e)&&Re(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!Ve(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!Ve(e[o],t[o],n)))return!1;return i===a}return!1}function He(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var Ue=/[\x00-\x1f\x7f"<>`{}]/g;function We(e){return e.replace(Ue,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ge(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return We(t)}var Ke=[`http:`,`https:`,`mailto:`,`tel:`];function qe(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var Je=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ye(e,t){if(!e)return!1;if(Je.test(e))return!0;let n=qe(e);return n?!t.has(n):!1}function Xe(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Ge(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ge(r?e.slice(r):e)}return t}function Ze(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Qe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function $e(){throw Error(`Invariant failed`)}function et(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var tt=4,nt=5;function rt(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function it(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=rt(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=ot(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=st(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=ot(r);e.kind=nt,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=ot(r);e.kind=tt,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)it(e,t,r,c,i,a,o,s)}function at(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ot(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function st(e,t,n,r,i){return{kind:e,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,caseSensitive:n,prefix:r,suffix:i}}function ct(e,t){let n=ot(`/`),r=new Uint16Array(6),i=[];for(let t of e)it(!1,r,t,1,n,0,i);for(let e of i)e.sort(at);t.masksTree=n,t.flatCache=et(1e3)}function lt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=mt(e,t.masksTree);return t.flatCache.set(e,r),r}function ut(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=ot(`/`),it(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),mt(r,o,n)}function dt(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=mt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=gt(a.route)),t.matchCache.set(r,a),a}function ft(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function pt(e,t=!1,n){let r=ot(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;it(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&$e(),o[e.id]=e,c!==0&&e.path){let t=ft(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(at);return{processedTree:{segmentTree:r,singleCache:et(1e3),matchCache:et(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function mt(e,t,n=!1){let r=e.split(`/`),i=vt(e,r,t,n);if(!i)return null;let[a]=ht(e,r,i);return{route:i.node.route,rawParams:a}}function ht(e,t,n){let r=_t(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===tt)break;if(u.kind===nt){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function gt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function _t(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function vt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!ke(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!St(l,n))continue;if(i.parse){if(!xt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==tt&&St(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===tt||i.kind===2)&&St(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(xt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&bt(f,o))return n;St(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+yt(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+yt(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+yt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+yt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function yt(e,t){return 2**(e-t-1)}function bt(e,t){return e===2**(t-1)-1}function xt(e,t,n){let r,i;try{[r,i]=ht(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function St(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===tt)>(e.node.kind===tt)||t.node.kind===tt==(e.node.kind===tt)&&t.node.depth>e.node.depth)))}function Ct(e){return wt(e.filter(e=>e!==void 0).join(`/`))}function wt(e){return e.replace(/\/{2,}/g,`/`)}function Tt(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Et(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Dt(e){return Et(Tt(e))}function Ot(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function kt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=wt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=wt(e)),o=e.split(`/`);o.length>1&&ke(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(ke(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?wt(s):s)||`/`;return a&&r&&r.set(a,c),c}function At(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function jt(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Nt(e,n)).join(`/`):Nt(r,n):r}function Mt({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=rt(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=jt(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=jt(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=jt(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Nt(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var Pt=`Error preloading route! ☝️`;function Ft({children:e,fallback:t=null}){return(0,I.jsx)(F.Fragment,{children:It()?e:t})}function It(){return F.useSyncExternalStore(Lt,()=>!0,()=>!1)}function Lt(){return()=>{}}var Rt=F.createContext(null);function zt(e){return F.useContext(Rt)}var Bt=e((e=>{var t=c();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Vt=e(((e,t)=>{t.exports=Bt()})),Ht=e((e=>{var t=c(),n=Vt();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,c){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),c!==void 0&&f.hasValue){var t=f.value;if(c(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return c!==void 0&&c(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,c]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Ut=e(((e,t)=>{t.exports=Ht()}))();function Wt(e,t){return e===t}function Gt(e,t=e=>e,n){let r=n?.compare??Wt,i=(0,F.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,F.useCallback)(()=>e.get(),[e]);return(0,Ut.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Kt(e){let t=F.useRef(e);return Ve(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function qt(e,t){return e[0]===t[0]&&e[1]===t[1]}function Jt(e,t){let n=typeof e==`string`&&qe(e);if(n)return t.has(n)?e:null}function Yt(e,t,n,r,i){let a=Ot(e.pathname,r),o=Ot(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!Ve(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function Xt(e,t){let n=zt(),r=Oe(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:D,params:ee,search:O,hash:k,state:A,mask:te,reloadDocument:j,unsafeRelative:ne,from:re,_fromLocation:ie,...M}=e,ae=s,N=It(),oe=Kt(e.search),se=Kt(e.params),ce=Kt(o),le=F.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,oe,se,e.state,e.mask,e.unsafeRelative]),ue=F.useCallback(e=>{let t=Jt(ae,n.protocolAllowlist);if(t!==void 0)return[t??void 0];let r=n.buildLocation({_fromLocation:e,...le}),i=an(r,n,v);return[i,!v&&(!i||qe(i))?void 0:Yt(e,r,ce,n.basepath,N)]},[ce,v,N,le,n,ae]),[P,I]=Gt(n.stores.location,ue,{compare:qt}),de=I===void 0?P:void 0,L=v||P===void 0,fe=F.useRef(!1),R=e.reloadDocument||de||L?!1:c??n.options.defaultPreload,pe=l??n.options.defaultPreloadDelay??0,me=F.useCallback(()=>{n.preloadRoute(le).catch(e=>{console.warn(e),console.warn(Pt)})},[n,le]),he=F.useCallback(e=>{if(!e){nn(r);return}if(!(e.isIntersecting??R===`intent`)){e.isIntersecting===!1&&nn(r);return}if(!pe){me();return}tn.has(r)||tn.set(r,setTimeout(()=>{tn.delete(r),me()},pe))},[me,r,R,pe]);if(De(r,he,R!==`viewport`),F.useEffect(()=>{fe.current||R===`render`&&(me(),fe.current=!0)},[me,R]),de)return{...M,ref:r,href:de,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let ge=Ae(I?i:a,{})??(I?Qt:Zt),_e=ge.className,ve=b?_e?`${b} ${_e}`:b:_e,ye=ge.style,be=y&&ye?{...y,...ye}:y||ye,xe=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!L&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...le,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))},Se=()=>{R===`intent`&&me()},Ce=()=>{R===`intent`&&nn(r)};return{...M,...ge,href:P,ref:r,onClick:rn(x,xe),onBlur:rn(S,Ce),onFocus:rn(C,he),onMouseEnter:rn(w,he),onMouseLeave:rn(T,Ce),onTouchStart:rn(E,Se),disabled:!!L,target:_,...be&&{style:be},...ve&&{className:ve},...L&&$t,...I&&en}}var Zt={},Qt={className:`active`},$t={role:`link`,"aria-disabled":!0},en={"data-status":`active`,"aria-current":`page`},tn=new WeakMap,nn=e=>{clearTimeout(tn.get(e)),tn.delete(e)},rn=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function an(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!Ye(i,t.protocolAllowlist))return i}var on=F.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Xt(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;a=t}return F.createElement(n||`a`,a,o)}),sn=F.createContext(void 0),cn=e=>{let t=F.useContext(sn);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ln=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,I.jsx)(sn.Provider,{value:e,children:t})),un={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dn=new class{#e=un;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function fn(e){setTimeout(e,0)}var pn=typeof window>`u`||`Deno`in globalThis;function mn(){}function hn(e,t){return typeof e==`function`?e(t):e}function gn(e){return typeof e==`number`&&e>=0&&e!==1/0}function _n(e,t){return Math.max(e+(t||0)-Date.now(),0)}function z(e,t){return typeof e==`function`?e(t):e}function vn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==bn(o,t.options))return!1}else if(!Sn(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function yn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(xn(t.options.mutationKey)!==xn(a))return!1}else if(!Sn(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function bn(e,t){return(t?.queryKeyHashFn||xn)(e)}function xn(e){return JSON.stringify(e,(e,t)=>Dn(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Sn(e[r],t[r]))return!1;return!0}return!1}var Cn=Object.prototype.hasOwnProperty;function wn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=En(e)&&En(t);if(!r&&!(Dn(e)&&Dn(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Cn.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=wn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Tn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function En(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Dn(e){if(!On(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!On(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function On(e){return Object.prototype.toString.call(e)===`[object Object]`}function kn(e){return new Promise(t=>{dn.setTimeout(t,e)})}function An(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:wn(e,t)}function jn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Mn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Nn=Symbol();function Pn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Nn?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fn(e,t){return typeof e==`function`?e(...t):!!e}function In(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Ln=()=>pn,Rn=()=>Ln(),zn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bn=new class extends zn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Vn=fn;function Hn(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Vn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Un=Hn(),Wn=new class extends zn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Gn(e){return Math.min(1e3*2**e,3e4)}function Kn(e){return(e??`online`)!==`online`||Wn.isOnline()}var qn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Jn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(mn);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new qn(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Bn.isFocused()&&(e.networkMode===`always`||Wn.isOnline())&&e.canRun(),p=()=>Kn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Rn()?0:3),a=e.retryDelay??Gn,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),kn(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var Yn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gn(this.gcTime)&&(this.#e=dn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(dn.clearTimeout(this.#e),this.#e=void 0)}};function Xn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{In(e,()=>t.signal,()=>n=!0)},u=Pn(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Mn:jn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Qn:Zn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Zn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Zn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function $n(e,t){return t?Zn(e,t)!=null:!1}function er(e,t){return!t||!e.getPreviousPageParam?!1:Qn(e,t)!=null}var tr=class extends Yn{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ir(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ir(this.options);e.data!==void 0&&(this.setState(rr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=An(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>z(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!_n(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Pn(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Xn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Jn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof qn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof qn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...nr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...rr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Un.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function nr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function rr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ir(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ar=class extends zn{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sr(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof z(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Tn(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&lr(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||z(this.options.enabled,this.#t)!==z(t.enabled,this.#t)||z(this.options.staleTime,this.#t)!==z(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||z(this.options.enabled,this.#t)!==z(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Tn(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(mn)),t}#h(e){return!Rn()&&z(this.options.enabled,this.#t)!==!1&&gn(e)}#g(){this.#b();let e=z(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=_n(this.#r.dataUpdatedAt,e)+1;this.#u=dn.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=dn.setInterval(()=>{(this.options.refetchIntervalInBackground||Bn.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(dn.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(dn.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&sr(e,t),o=i&&lr(e,n,t,r);(a||o)&&(l={...l,...nr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=An(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=An(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ur(e,t),refetch:this.refetch,isEnabled:z(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Tn(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Un.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function or(e,t){return z(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||z(t.retryOnMount,e)!==!1)}function sr(e,t){return or(e,t)||e.state.data!==void 0&&cr(e,t,t.refetchOnMount)}function cr(e,t,n){if(z(t.enabled,e)!==!1&&z(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ur(e,t)}return!1}function lr(e,t,n,r){return(e!==t||z(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ur(e,n)}function ur(e,t){return z(t.enabled,e)!==!1&&e.isStaleByTime(z(t.staleTime,e))}var dr=class extends ar{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$n(t,n.data),hasPreviousPage:er(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},fr=F.createContext(!1),pr=()=>F.useContext(fr);fr.Provider;function mr(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hr=F.createContext(mr()),gr=()=>F.useContext(hr),_r=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Fn(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},vr=e=>{F.useEffect(()=>{e.clearReset()},[e])},yr=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Fn(n,[e.error,r])),br=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},xr=(e,t)=>e?.suspense&&t.isPending,Sr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Cr(e,t,n){let r=pr(),i=gr(),a=cn(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,br(o),_r(o,i,s),vr(i);let[l]=F.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(F.useSyncExternalStore(F.useCallback(e=>{let t=d?l.subscribe(Un.batchCalls(e)):mn;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),F.useEffect(()=>{l.setOptions(o)},[o,l]),xr(o,u))throw Sr(o,l,i);if(yr({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function wr(e,t){return Cr(e,ar,t)}function Tr(e){return e}function Er(e){return e}function Dr(e,t){return Cr(e,dr,t)}var Or={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},kr={start:{kjj79g:`x1nhvcw1`,$$css:!0},center:{kjj79g:`xl56j7k`,$$css:!0},end:{kjj79g:`x13a6bvl`,$$css:!0},between:{kjj79g:`x1qughib`,$$css:!0},around:{kjj79g:`x1l1ennw`,$$css:!0},evenly:{kjj79g:`xaw8158`,$$css:!0}},Ar={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},jr={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},Mr={stack:{k1xSpc:`x78zum5`,$$css:!0}},Nr={0:{k1C7PZ:`x1o57wo1`,khm7nJ:`x6yxi7o`,$$css:!0},1:{k1C7PZ:`x1lfs0n9`,khm7nJ:`x1ngg2t4`,$$css:!0},2:{k1C7PZ:`xak3so`,khm7nJ:`x1x7z4sm`,$$css:!0},3:{k1C7PZ:`xewh9hi`,khm7nJ:`x4olc9o`,$$css:!0},4:{k1C7PZ:`xty4p9g`,khm7nJ:`xtx9w7w`,$$css:!0},5:{k1C7PZ:`x1eqhezk`,khm7nJ:`x1iu6piu`,$$css:!0},6:{k1C7PZ:`x3qlgwd`,khm7nJ:`xczp1bk`,$$css:!0},8:{k1C7PZ:`xicv188`,khm7nJ:`xgx0vcf`,$$css:!0},10:{k1C7PZ:`x1p37tyl`,khm7nJ:`x1xpicb7`,$$css:!0},"0.5":{k1C7PZ:`x1kihgfc`,khm7nJ:`x1tw44j4`,$$css:!0},"1.5":{k1C7PZ:`x1thn6ci`,khm7nJ:`xhq53yo`,$$css:!0}};function Pr({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[Mr.stack,Ar[t],n!=null&&Nr[n],e!=null&&Or[e],r!=null&&kr[r],i!=null&&jr[i]]}function Fr(e){return!e||typeof window>`u`?!1:window.getComputedStyle(e).direction===`rtl`}var Ir=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function Lr(e){if(e.isContentEditable)return e;let t=e.closest(`[contenteditable]`);return t&&t.getAttribute(`contenteditable`)!==`false`?t:null}function Rr(e,t){if(!(e instanceof HTMLElement))return!1;let n=Lr(e);if(n){let e=typeof window<`u`?window.getSelection():null;return e&&e.rangeCount>0&&!e.isCollapsed?!0:(n.textContent??``).length>0}let r=e.tagName===`TEXTAREA`,i=e.tagName===`INPUT`&&Ir.has(e.type);if(!r&&!i)return!1;let{selectionStart:a,selectionEnd:o,value:s}=e;return a!==o||a==null?!0:t===`ArrowLeft`||t===`ArrowUp`||t===`Home`?a>0:t===`ArrowRight`||t===`ArrowDown`||t===`End`?a<s.length:!1}function zr(e={}){let{itemSelector:t=`[role="menuitem"]`,boundarySelector:n,wrap:r=!0,onEscape:i,orientation:a=`vertical`,hasHomeEnd:o=!0,hasRovingTabIndex:s=!1,hasCaretGuard:c=!1}=e,l=(0,F.useRef)(null),u=(0,F.useCallback)(e=>e.getAttribute(`aria-disabled`)===`true`||e.disabled===!0||e.hasAttribute(`disabled`),[]),d=(0,F.useCallback)(()=>{let e=l.current;if(!e)return[];let r=Array.from(e.querySelectorAll(t));return n?r.filter(t=>t.closest(n)===e):r},[t,n]),f=(0,F.useCallback)(e=>{let t=l.current;if(!t||!n)return!0;let r=e.target;return!r||r.closest(n)===t},[n]),p=(0,F.useCallback)((e,t,n,r)=>{let i=e.length;if(i===0)return-1;let a=t;for(let t=0;t<i;t++){if(a<0||a>=i){if(!r)return-1;a=(a+i)%i}let t=e[a];if(t&&!u(t))return a;a+=n}return-1},[u]),h=(0,F.useCallback)(()=>{let e=d(),t=document.activeElement;return e.findIndex(e=>e===t||e.contains(t))},[d]),g=(0,F.useCallback)((e,t)=>{e.getAttribute(`tabindex`)!==String(t)&&e.setAttribute(`tabindex`,String(t))},[]),_=(0,F.useCallback)(()=>{let e=d(),t=e.filter(e=>!u(e));if(t.length===0)return;let n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0];for(let t of e)g(t,t===n?0:-1)},[d,u,g]);m(()=>{s&&_()});let v=(0,F.useCallback)((e,t)=>{let n=e[t];if(n){if(s)for(let t of e)g(t,t===n?0:-1);n.focus()}},[s,g]),y=(0,F.useCallback)(e=>{let t=d();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1));v(t,n)},[d,v]),b=(0,F.useCallback)(()=>{let e=d(),t=p(e,0,1,!1);return t!==-1&&(v(e,t),!0)},[d,p,v]),x=(0,F.useCallback)(()=>{let e=d(),t=p(e,e.length-1,-1,!1);return t!==-1&&(v(e,t),!0)},[d,p,v]),S=(0,F.useCallback)(()=>{s&&_()},[s,_]);return{listRef:l,handleKeyDown:(0,F.useCallback)(e=>{if(e.ctrlKey||e.metaKey||e.altKey||!f(e))return;if(e.key===`Escape`){i&&(e.preventDefault(),i());return}let t=a===`horizontal`||a===`both`,n=a===`vertical`||a===`both`,s=[],u=[];if(t){let t=e.key===`ArrowLeft`||e.key===`ArrowRight`?Fr(l.current):!1;s.push(t?`ArrowLeft`:`ArrowRight`),u.push(t?`ArrowRight`:`ArrowLeft`)}n&&(s.push(`ArrowDown`),u.push(`ArrowUp`));let m=s.includes(e.key),g=u.includes(e.key),_=o&&e.key===`Home`,y=o&&e.key===`End`;if(!m&&!g&&!_&&!y||c&&(Rr(e.target,e.key)||Rr(document.activeElement,e.key)))return;let S=h(),C=d();if(m){let e=S===-1?0:S+1,t=p(C,e,1,r);t!==-1&&v(C,t)}else if(g){let e=S===-1?C.length-1:S-1,t=p(C,e,-1,r);t!==-1&&v(C,t)}else _?b():y&&x();e.preventDefault()},[h,d,r,a,o,c,p,v,b,x,i,f]),handleFocus:S,focusItem:y,focusFirst:b,focusLast:x,ownsEvent:f,getItems:d}}var Br=500,Vr=300;function Hr(e){let{show:t,hide:n,isOpen:r,isEnabled:i,showDelay:a=150,hideDelay:o=200,clickGuardMs:s=Br,itemSelector:c,popoverId:l,ownsFocus:u=!0}=e,d=v(`(hover: hover)`),f=(0,F.useRef)(null),p=(0,F.useRef)(null),h=(0,F.useRef)(null),g=(0,F.useRef)(!1),_=(0,F.useRef)(0),y=(0,F.useRef)(0),b=(0,F.useRef)(r);m(()=>{let e=b.current;b.current=r,e&&!r&&(g.current=!1,y.current=0,_.current=Date.now())},[r]);let x=(0,F.useCallback)(()=>{f.current&&=(clearTimeout(f.current),null),p.current&&=(clearTimeout(p.current),null)},[]),S=(0,F.useRef)(()=>{}),{listRef:C,handleKeyDown:w,focusFirst:T}=zr({itemSelector:c,onEscape:()=>S.current()}),E=(0,F.useCallback)(()=>{let e=C.current?.contains(document.activeElement)??!1;n(),e&&h.current?.focus()},[n,C]);(0,F.useEffect)(()=>{S.current=()=>{x(),E()}},[x,E]),(0,F.useEffect)(()=>()=>x(),[x]);let D=(0,F.useCallback)(()=>{T()||C.current?.focus()},[T,C]),ee=(0,F.useCallback)(()=>{if(!u){t();return}t({skipAutoFocus:!0}),D()},[u,t,D]),O=(0,F.useCallback)(()=>s>0&&y.current>0&&Date.now()-y.current<s&&(g.current=!1,y.current=0,!0),[s]),k=(0,F.useCallback)(e=>{if(l&&e?.preventDefault(),x(),e!=null&&e.detail===0){_.current=0,g.current=!1,y.current=0,r?u&&D():ee();return}if(!r){_.current=0,g.current=!1,y.current=0,ee();return}if(O()){u&&D();return}E()},[l,x,r,u,O,ee,D,E]),A=(0,F.useCallback)(()=>{if(!d||_.current>0&&Date.now()-_.current<Vr)return;if(r){x();return}g.current=!0,x();let e=()=>{y.current=Date.now(),t({skipAutoFocus:!0})};a>0?f.current=setTimeout(e,a):e()},[d,r,x,t,a]),te=(0,F.useCallback)(()=>{_.current=0,g.current&&(x(),p.current=setTimeout(()=>{n()},o))},[x,n,o]),j=(0,F.useCallback)(()=>{x()},[x]),ne=(0,F.useCallback)(e=>{h.current=e},[]),re=(0,F.useCallback)(()=>{},[]),ie=(0,F.useCallback)(e=>{},[]),M=(0,F.useCallback)(e=>{},[]);return i?{triggerProps:{onClick:k,onMouseEnter:A,onMouseLeave:te,...l?{popoverTarget:l}:null},contentProps:{onMouseEnter:j,onMouseLeave:te,onKeyDown:w},menuRef:C,focusFirst:T,focusMenu:D,confirmHoverOpen:O,close:E,setTriggerEl:ne}:{triggerProps:{onClick:re,onMouseEnter:re,onMouseLeave:re},contentProps:{onMouseEnter:re,onMouseLeave:re,onKeyDown:M},menuRef:C,focusFirst:T,focusMenu:D,confirmHoverOpen:O,close:E,setTriggerEl:ie}}var Ur={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function Wr({direction:e=`vertical`,hAlign:r,vAlign:i,justify:a,align:o,gap:c,padding:f,paddingInline:p,paddingInlineStart:m,paddingInlineEnd:h,paddingBlock:_,paddingBlockStart:v,paddingBlockEnd:y,isScrollable:b,width:x,height:S,maxWidth:C,minHeight:w,wrap:T,as:E=`div`,xstyle:D,className:ee,style:O,children:k,ref:A,...te}){let j=r??(e===`horizontal`?a:o),ne=i??(e===`horizontal`?o:a),re=e===`horizontal`?j:ne,ie=e===`horizontal`?ne:j,M=m??p??f,ae=h??p??f,N=v??_??f,oe=y??_??f,se=t(...Pr({direction:e,crossAlign:ie,mainAlign:re,gap:c,wrap:T}),M!=null&&n[M],ae!=null&&u[ae],N!=null&&d[N],oe!=null&&l[oe],b&&Ur.scrollable,D),ce={...x!=null&&{width:typeof x==`number`?`${x}px`:x},...S!=null&&{height:typeof S==`number`?`${S}px`:S},...C!=null&&{maxWidth:typeof C==`number`?`${C}px`:C},...w!=null&&{minHeight:typeof w==`number`?`${w}px`:w}};return(0,F.createElement)(E,{ref:A,...g(s(`stack`,{direction:e,gap:c,wrap:T}),se,ee,{...O,...ce}),...te},k)}Wr.displayName=`Stack`;function Gr({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,I.jsx)(Wr,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}Gr.displayName=`VStack`;function Kr(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function qr(e,t=`|`){return e.map(e=>vi(e)).join(t)}function Jr(e,t){return typeof t==`bigint`?t.toString():t}var Yr=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Xr(e){return new Yr(e)}function Zr(e){return e==null}function Qr(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function $r(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function ei(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ti(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function ni(e){return ti(e._zod.def)??e._zod.def.shape}function ri(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return ei(this,t,e),e},enumerable:!0,configurable:!0})}function ii(e,t,n){t in e?ei(e,t,n):e[t]=n}function ai(e,t,n,r){let i=ni(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ri(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ii(e,a,r?r(n.value,a):n.value))}}function oi(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ri(e,n,()=>t[n]):ii(e,n,r.value))}}function si(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ci(e){return JSON.stringify(e)}function li(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ui=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function di(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fi=Xr(()=>{if(oa.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function pi(e){if(di(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return di(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function mi(e){return pi(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var hi=new Set([`string`,`number`,`symbol`]);function gi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function _i(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function B(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function vi(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function yi(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var bi={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},xi={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Si(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return ai(i,e,Ci(e,t)),_i(e,si(n,{shape:i,checks:[]}))}function Ci(e,t){let n=ni(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function wi(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ci(e,t)),a={};return ai(a,e,Reflect.ownKeys(ni(e)).filter(e=>!i.has(e))),_i(e,si(n,{shape:a,checks:[]}))}function Ti(e,t){if(!pi(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=ni(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return _i(e,si(e._zod.def,{shape:Ei(e,t)}))}function Ei(e,t){let n={};return ai(n,e,Reflect.ownKeys(ni(e))),oi(n,t),n}function Di(e,t){if(!pi(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return _i(e,si(e._zod.def,{shape:Ei(e,t)}))}function Oi(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return ai(n,e,Reflect.ownKeys(ni(e))),ai(n,t,Reflect.ownKeys(ni(t))),_i(e,si(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ki(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ci(t,n)):void 0,o={};return ai(o,t,Reflect.ownKeys(ni(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),_i(t,si(t._zod.def,{shape:o,checks:[]}))}function Ai(e,t,n){let r=n?new Set(Ci(t,n)):void 0,i={};return ai(i,t,Reflect.ownKeys(ni(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),_i(t,si(t._zod.def,{shape:i}))}function ji(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Mi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ni(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Pi(e){return typeof e==`string`?e:e?.message}function Fi(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ii(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Pi(e.inst?._zod.def?.error?.(e))??Pi(a?.(e))??Pi(t?.error?.(e))??Pi(n.customError?.(e))??Pi(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Li=/[\uD800-\uDBFF]/;function Ri(e){let t=e.length;if(!Li.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function zi(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Bi(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Vi(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Hi(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ki(e,n,r.value)}}function Ui(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Wi(e,t,n){return Ui(e,t,n,!1)}function Gi(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ui(this,n,r(this))},set(e){Ui(this,n,e)}})}return t}function Ki(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ui(this,t,n.bind(this))},set(e){Ui(this,t,e)}})}function qi(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ji,Yi=!1,Xi={configurable:!0,get(){Yi=!0}};function V(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ji!==e._zod){Ji=void 0;return}Ji=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Xi);let e=Yi;Yi=!1;try{let r=n(this);return Yi?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Yi||=e,r}catch(n){throw delete this[t],Yi||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Zi(e,t,n,r){let i=qi(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Qi=`~constantCatch`;function $i(e){let t=()=>e;return t[Qi]=!0,t}var ea,ta={value:void 0,enumerable:!1},na=`captureStackTrace`in Error?Error:null;function ra(e){let t=na;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return na=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function H(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){ta.value=new a(r);try{Object.defineProperty(n,"_zod",ta)}finally{ta.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Hi(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ra(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ia=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},aa=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ea=globalThis).__zod_globalConfig??(ea.__zod_globalConfig={});var oa=globalThis.__zod_globalConfig;function sa(e){return e&&Object.assign(oa,e),oa}function ca(){let e=this._zod;return e.message??=JSON.stringify(e.def,Jr,2),e.message}function la(e){this._zod.message=e}var ua={get:ca,set:la,enumerable:!0,configurable:!0},da={value:void 0,enumerable:!1},fa=new WeakSet([Object.prototype,Error.prototype]),pa=(e,t)=>{e.name=`$ZodError`,da.value=t,Object.defineProperty(e,"issues",da),da.value=void 0,Object.defineProperty(e,"message",ua);let n=Object.getPrototypeOf(e);fa.has(n)||(fa.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},ma=H(`$ZodError`,pa);H(`$ZodError`,pa,void 0,{Parent:Error});function ha(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ga(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ha(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function _a(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function va(e,t){return{callee:t?.callee??e,Err:t?.Err}}var ya=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ia;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ii(e,o,sa())));throw ui(n,a?.callee??t),n}return s.value};return t},ba=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ii(e,o,sa())));throw ui(n,a?.callee??t),n}return s.value};return t},xa=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ia;return a.issues.length?Sa(e,a.issues,i):{success:!0,data:a.value}};function Sa(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ii(e,n,sa()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ca=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Sa(e,a.issues,i):{success:!0,data:a.value}},wa=Symbol.for(`zod.compile.invalid`),Ta=Symbol.for(`zod.compile.fallback`),Ea=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==wa)return!0;if(r.definite===!0&&n===void 0)return!1}return Da(e,t,n)});function Da(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Ta]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new ia;return a.issues.length===0}var Oa=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},ka=e=>{let t=ya(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,va(n,a))};return n},Aa=e=>{let t=ya(e),n=(e,r,i,a)=>t(e,r,i,va(n,a));return n},ja=e=>{let t=ba(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,va(n,a))};return n},Ma=e=>{let t=ba(e),n=async(e,r,i,a)=>await t(e,r,i,va(n,a));return n},Na=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xa(e)(t,n,i)},Pa=e=>(t,n,r)=>xa(e)(t,n,r),Fa=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ca(e)(t,n,i)},Ia=e=>async(t,n,r)=>Ca(e)(t,n,r),La=/^[cC][0-9a-z]{6,}$/,Ra=/^[0-9a-z]+$/,za=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ba=/^[0-9a-vA-V]{20}$/,Va=/^[A-Za-z0-9]{27}$/,Ha=/^[a-zA-Z0-9_-]{21}$/;function Ua(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Wa=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ga=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ka=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qa=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ja=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Ya(){return new RegExp(Ja,`u`)}var Xa=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Za=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qa=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$a=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,to=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,no=/^https?$/,ro=/^\+[1-9]\d{6,14}$/,io=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function ao(e){return RegExp(`^${e}$`)}var oo=ao(io);function so(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function co(e){return RegExp(`^${so(e)}$`)}function lo(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${so({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${so({precision:e.precision})}`:n;return RegExp(`^${io}T(?:${r})$`)}var uo=/^[\s\S]{0,}$/,fo=/^-?\d+(?:\.\d+)?$/,po=/^(?:true|false)$/i,mo=/^null$/i,ho=/^[^A-Z]*$/,go=/^[^a-z]*$/,U=H(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),_o=e=>{let t=e.value;return!Zr(t)&&t.length!==void 0},vo={number:`number`,bigint:`bigint`,object:`date`},yo=H(`$ZodCheckLessThan`,(e,t)=>{U.init(e,t);let n=vo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:vo[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bo=H(`$ZodCheckGreaterThan`,(e,t)=>{U.init(e,t);let n=vo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:vo[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xo=H(`$ZodCheckMultipleOf`,(e,t)=>{U.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):$r(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),So=H(`$ZodCheckNumberFormat`,(e,t)=>{U.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=bi[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Co=H(`$ZodCheckMaxLength`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=_o),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ri(r):i)<=t.maximum)return;let a=zi(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wo=H(`$ZodCheckMinLength`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=_o),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ri(r):i)>=t.minimum)return;let a=zi(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),To=H(`$ZodCheckLengthEquals`,(e,t)=>{var n;U.init(e,t),(n=e._zod.def).when??(n.when=_o),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ri(r):i;if(a===t.length)return;let o=zi(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Eo=H(`$ZodCheckStringFormat`,(e,t)=>{var n,r;U.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Do=H(`$ZodCheckRegex`,(e,t)=>{Eo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Oo=H(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ho,Eo.init(e,t)}),ko=H(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=go,Eo.init(e,t)}),Ao=H(`$ZodCheckIncludes`,(e,t)=>{U.init(e,t);let n=gi(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),jo=H(`$ZodCheckStartsWith`,(e,t)=>{U.init(e,t);let n=RegExp(`^${gi(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Mo=H(`$ZodCheckEndsWith`,(e,t)=>{U.init(e,t);let n=RegExp(`.*${gi(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),No=H(`$ZodCheckOverwrite`,(e,t)=>{U.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Po=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
+
import{J as e,K as t,S as n,V as r,X as i,c as a,l as o,n as s,q as c,v as l,x as u,y as d}from"./themeProps-MQSlTycI.js";import{a as f,r as p,t as m,u as h}from"./useIsomorphicLayoutEffect-f8dYmyS2.js";import{a as g,n as _,t as v}from"./useMediaQuery-C_nG4b-e.js";import{A as y,B as b,D as x,E as S,F as C,G as w,H as T,I as E,L as D,M as ee,N as O,O as k,P as A,R as te,T as j,V as ne,_ as re,f as ie,g as M,j as ae,k as N,n as oe,p as se,r as ce,w as le,z as ue}from"./IconButton-BqlnBu_N.js";import{t as P}from"./useDevWarning-CzR6rkf6.js";var F=i(c(),1),I=o(),de=typeof Intl.Segmenter==`function`?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null;function L(e){if(de){let t=de.segment(e)[Symbol.iterator]().next();return t.done?``:t.value.segment}let t=e.codePointAt(0);return t==null?``:String.fromCodePoint(t)}function fe(e){return e!=null&&typeof e!=`boolean`&&e!==``}var R={kbCHJM:`x1nrll8i`,k3aq6I:`xsqj5wx`,$$css:!0},pe={mirror:{k3aq6I:`xgtlewx`,$$css:!0},centerInline:e=>[R,{"--x-transform":`translate(-50%, ${e})`==null?void 0:`translate(-50%, ${e})`}]},me=[`button`,`a`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="combobox"]`,`[role="listbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[data-pressable-container]`].join(`,`),he=`[aria-readonly="true"]`;function ge(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(me)&&!n.matches(he))return!0;n=n.parentElement}return!1}function _e(e){if(typeof document>`u`||!(`getSelection`in document))return!1;let t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function ve({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return(0,F.useEffect)(()=>{let t=e.current;t&&t.setAttribute(`data-pressable-container`,`true`)},[e]),{onClick:(0,F.useCallback)(o=>{if(a)return;let s=e.current;if(!s||_e(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&ge(c,s))&&(n?.(o),!o.defaultPrevented&&(r!=null&&(i===`_blank`||o.ctrlKey||o.metaKey?window.open(r,`_blank`,`noopener`):t?.current?t.current.click():window.location.href=r),r==null&&n==null&&t?.current))){let e=new MouseEvent(`click`,{bubbles:o.bubbles,cancelable:o.cancelable,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey,altKey:o.altKey,button:o.button});t.current.dispatchEvent(e),o.stopPropagation()}},[e,t,n,r,i,a]),onMouseUp:(0,F.useCallback)(t=>{if(a)return;let n=e.current;if(!n)return;let i=t.target;i instanceof Element&&t.button===1&&r!=null&&(i===t.currentTarget||!ge(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a])}}var ye=(0,F.lazy)(async()=>x(()=>import(`./Tooltip-a2AGdnkC.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2])));function be(e){return e===`display-1`||e===`display-2`||e===`display-3`}var xe={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function Se({level:e,type:n,weight:r,accessibilityLevel:i,color:a=`primary`,display:o=`block`,maxLines:c=0,hasTruncateTooltip:l=!0,wordBreak:u,textWrap:d,justify:f=`start`,hasCapsize:p=!1,hasStrikethrough:m=!1,xstyle:h,className:_,style:v,children:x,ref:w,...j}){let re=xe[e],ie=i&&i!==e?{"aria-level":i}:{},M=u??(c===1?`break-all`:`break-word`),oe=c>0||p?`block`:o,se=n&&be(n)?n:void 0,ce=N({maxLines:c}),le=typeof l==`string`?l:`above`,P=c>0&&l!==!1&&ce.isTruncated,de=(0,F.useRef)(null),L=k(w,ce.ref,de),fe=c>1?{WebkitLineClamp:c}:void 0;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(re,{ref:L,...g(s(`heading`,{level:e,color:a,type:n,weight:r}),t(ae[S(a)],se?D[se]:E[e],se&&O[se],r&&ne[r],c===1?ue.singleLine:c>1?ue.multiLine:A[oe],c>0&&T[M],d&&te[d],f!==`start`&&C[f],p&&y.enabled,m&&ee.strikethrough,h),_,{...v,...fe}),...ie,...j,children:x}),P&&(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(ye,{anchorRef:de,content:(0,I.jsx)(`span`,{...t(b.content),children:ce.fullText}),placement:le})})]})}Se.displayName=`Heading`;var Ce=[`noopener`,`noreferrer`];function we(e,t){if(e!==`_blank`)return{target:e,rel:t};let n=t?.split(/\s+/).filter(Boolean)??[];for(let e of Ce)n.includes(e)||n.push(e);return{target:e,rel:n.join(` `)}}var Te=F.use,Ee=F.useLayoutEffect;function De(e,t,n){F.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function Oe(e){let t=F.useRef(null);return F.useImperativeHandle(e,()=>t.current,[]),t}function ke(e){return e[e.length-1]}function Ae(e,t){return typeof e==`function`?e(t):e}var je=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;function Ne(e){for(let t in e)if(je.call(e,t))return!0;return!1}var Pe=()=>Object.create(null),Fe=(e,t)=>Ie(e,t,Pe);function Ie(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Be(e)&&Be(i);if(!a&&!(Re(e)&&Re(i)))return i;let o=a?e:Le(e);if(!o)return i;let s=a?i:Le(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:je.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=Ie(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function Le(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!Me.call(e,r))return!1;t.push(r)}return t}function Re(e){if(!ze(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ze(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ze(e){return Object.prototype.toString.call(e)===`[object Object]`}function Be(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ve(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Ve(e[r],t[r],n))return!1;return!0}if(Re(e)&&Re(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!Ve(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!Ve(e[o],t[o],n)))return!1;return i===a}return!1}function He(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var Ue=/[\x00-\x1f\x7f"<>`{}]/g;function We(e){return e.replace(Ue,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ge(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return We(t)}var Ke=[`http:`,`https:`,`mailto:`,`tel:`];function qe(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var Je=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Ye(e,t){if(!e)return!1;if(Je.test(e))return!0;let n=qe(e);return n?!t.has(n):!1}function Xe(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Ge(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ge(r?e.slice(r):e)}return t}function Ze(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Qe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function $e(){throw Error(`Invariant failed`)}function et(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var tt=4,nt=5;function rt(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function it(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=rt(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=ot(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=st(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=ot(r);e.kind=nt,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=ot(r);e.kind=tt,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)it(e,t,r,c,i,a,o,s)}function at(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ot(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function st(e,t,n,r,i){return{kind:e,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,caseSensitive:n,prefix:r,suffix:i}}function ct(e,t){let n=ot(`/`),r=new Uint16Array(6),i=[];for(let t of e)it(!1,r,t,1,n,0,i);for(let e of i)e.sort(at);t.masksTree=n,t.flatCache=et(1e3)}function lt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=mt(e,t.masksTree);return t.flatCache.set(e,r),r}function ut(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=ot(`/`),it(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),mt(r,o,n)}function dt(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=mt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=gt(a.route)),t.matchCache.set(r,a),a}function ft(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function pt(e,t=!1,n){let r=ot(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;it(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&$e(),o[e.id]=e,c!==0&&e.path){let t=ft(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(at);return{processedTree:{segmentTree:r,singleCache:et(1e3),matchCache:et(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function mt(e,t,n=!1){let r=e.split(`/`),i=vt(e,r,t,n);if(!i)return null;let[a]=ht(e,r,i);return{route:i.node.route,rawParams:a}}function ht(e,t,n){let r=_t(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===tt)break;if(u.kind===nt){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function gt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function _t(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function vt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!ke(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!St(l,n))continue;if(i.parse){if(!xt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==tt&&St(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===tt||i.kind===2)&&St(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(xt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&bt(f,o))return n;St(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+yt(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+yt(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+yt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+yt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function yt(e,t){return 2**(e-t-1)}function bt(e,t){return e===2**(t-1)-1}function xt(e,t,n){let r,i;try{[r,i]=ht(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function St(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===tt)>(e.node.kind===tt)||t.node.kind===tt==(e.node.kind===tt)&&t.node.depth>e.node.depth)))}function Ct(e){return wt(e.filter(e=>e!==void 0).join(`/`))}function wt(e){return e.replace(/\/{2,}/g,`/`)}function Tt(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Et(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Dt(e){return Et(Tt(e))}function Ot(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function kt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=wt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=wt(e)),o=e.split(`/`);o.length>1&&ke(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(ke(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?wt(s):s)||`/`;return a&&r&&r.set(a,c),c}function At(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function jt(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Nt(e,n)).join(`/`):Nt(r,n):r}function Mt({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=rt(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=jt(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=jt(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=jt(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Nt(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var Pt=`Error preloading route! ☝️`;function Ft({children:e,fallback:t=null}){return(0,I.jsx)(F.Fragment,{children:It()?e:t})}function It(){return F.useSyncExternalStore(Lt,()=>!0,()=>!1)}function Lt(){return()=>{}}var Rt=F.createContext(null);function zt(e){return F.useContext(Rt)}var Bt=e((e=>{var t=c();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Vt=e(((e,t)=>{t.exports=Bt()})),Ht=e((e=>{var t=c(),n=Vt();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,c){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),c!==void 0&&f.hasValue){var t=f.value;if(c(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return c!==void 0&&c(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,c]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Ut=e(((e,t)=>{t.exports=Ht()}))();function Wt(e,t){return e===t}function Gt(e,t=e=>e,n){let r=n?.compare??Wt,i=(0,F.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,F.useCallback)(()=>e.get(),[e]);return(0,Ut.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Kt(e){let t=F.useRef(e);return Ve(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function qt(e,t){return e[0]===t[0]&&e[1]===t[1]}function Jt(e,t){let n=typeof e==`string`&&qe(e);if(n)return t.has(n)?e:null}function Yt(e,t,n,r,i){let a=Ot(e.pathname,r),o=Ot(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!Ve(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function Xt(e,t){let n=zt(),r=Oe(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:D,params:ee,search:O,hash:k,state:A,mask:te,reloadDocument:j,unsafeRelative:ne,from:re,_fromLocation:ie,...M}=e,ae=s,N=It(),oe=Kt(e.search),se=Kt(e.params),ce=Kt(o),le=F.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,oe,se,e.state,e.mask,e.unsafeRelative]),ue=F.useCallback(e=>{let t=Jt(ae,n.protocolAllowlist);if(t!==void 0)return[t??void 0];let r=n.buildLocation({_fromLocation:e,...le}),i=an(r,n,v);return[i,!v&&(!i||qe(i))?void 0:Yt(e,r,ce,n.basepath,N)]},[ce,v,N,le,n,ae]),[P,I]=Gt(n.stores.location,ue,{compare:qt}),de=I===void 0?P:void 0,L=v||P===void 0,fe=F.useRef(!1),R=e.reloadDocument||de||L?!1:c??n.options.defaultPreload,pe=l??n.options.defaultPreloadDelay??0,me=F.useCallback(()=>{n.preloadRoute(le).catch(e=>{console.warn(e),console.warn(Pt)})},[n,le]),he=F.useCallback(e=>{if(!e){nn(r);return}if(!(e.isIntersecting??R===`intent`)){e.isIntersecting===!1&&nn(r);return}if(!pe){me();return}tn.has(r)||tn.set(r,setTimeout(()=>{tn.delete(r),me()},pe))},[me,r,R,pe]);if(De(r,he,R!==`viewport`),F.useEffect(()=>{fe.current||R===`render`&&(me(),fe.current=!0)},[me,R]),de)return{...M,ref:r,href:de,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let ge=Ae(I?i:a,{})??(I?Qt:Zt),_e=ge.className,ve=b?_e?`${b} ${_e}`:b:_e,ye=ge.style,be=y&&ye?{...y,...ye}:y||ye,xe=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!L&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...le,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))},Se=()=>{R===`intent`&&me()},Ce=()=>{R===`intent`&&nn(r)};return{...M,...ge,href:P,ref:r,onClick:rn(x,xe),onBlur:rn(S,Ce),onFocus:rn(C,he),onMouseEnter:rn(w,he),onMouseLeave:rn(T,Ce),onTouchStart:rn(E,Se),disabled:!!L,target:_,...be&&{style:be},...ve&&{className:ve},...L&&$t,...I&&en}}var Zt={},Qt={className:`active`},$t={role:`link`,"aria-disabled":!0},en={"data-status":`active`,"aria-current":`page`},tn=new WeakMap,nn=e=>{clearTimeout(tn.get(e)),tn.delete(e)},rn=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function an(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!Ye(i,t.protocolAllowlist))return i}var on=F.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Xt(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;a=t}return F.createElement(n||`a`,a,o)}),sn=F.createContext(void 0),cn=e=>{let t=F.useContext(sn);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ln=({client:e,children:t})=>(F.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,I.jsx)(sn.Provider,{value:e,children:t})),un={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dn=new class{#e=un;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function fn(e){setTimeout(e,0)}var pn=typeof window>`u`||`Deno`in globalThis;function mn(){}function hn(e,t){return typeof e==`function`?e(t):e}function gn(e){return typeof e==`number`&&e>=0&&e!==1/0}function _n(e,t){return Math.max(e+(t||0)-Date.now(),0)}function z(e,t){return typeof e==`function`?e(t):e}function vn(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==bn(o,t.options))return!1}else if(!Sn(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function yn(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(xn(t.options.mutationKey)!==xn(a))return!1}else if(!Sn(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function bn(e,t){return(t?.queryKeyHashFn||xn)(e)}function xn(e){return JSON.stringify(e,(e,t)=>Dn(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Sn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Sn(e[r],t[r]))return!1;return!0}return!1}var Cn=Object.prototype.hasOwnProperty;function wn(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=En(e)&&En(t);if(!r&&!(Dn(e)&&Dn(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Cn.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=wn(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Tn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function En(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Dn(e){if(!On(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!On(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function On(e){return Object.prototype.toString.call(e)===`[object Object]`}function kn(e){return new Promise(t=>{dn.setTimeout(t,e)})}function An(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:wn(e,t)}function jn(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Mn(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Nn=Symbol();function Pn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Nn?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fn(e,t){return typeof e==`function`?e(...t):!!e}function In(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Ln=()=>pn,Rn=()=>Ln(),zn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bn=new class extends zn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Vn=fn;function Hn(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Vn,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Un=Hn(),Wn=new class extends zn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Gn(e){return Math.min(1e3*2**e,3e4)}function Kn(e){return(e??`online`)!==`online`||Wn.isOnline()}var qn=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Jn(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(mn);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new qn(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Bn.isFocused()&&(e.networkMode===`always`||Wn.isOnline())&&e.canRun(),p=()=>Kn(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Rn()?0:3),a=e.retryDelay??Gn,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),kn(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var Yn=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gn(this.gcTime)&&(this.#e=dn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rn()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(dn.clearTimeout(this.#e),this.#e=void 0)}};function Xn(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{In(e,()=>t.signal,()=>n=!0)},u=Pn(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Mn:jn;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Qn:Zn,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Zn(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Zn(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Qn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function $n(e,t){return t?Zn(e,t)!=null:!1}function er(e,t){return!t||!e.getPreviousPageParam?!1:Qn(e,t)!=null}var tr=class extends Yn{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ir(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=ir(this.options);e.data!==void 0&&(this.setState(rr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=An(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nn||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>z(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!_n(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Pn(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Xn(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Jn({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof qn&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof qn){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...nr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...rr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Un.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function nr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kn(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function rr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function ir(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ar=class extends zn{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sr(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof z(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Tn(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&lr(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||z(this.options.enabled,this.#t)!==z(t.enabled,this.#t)||z(this.options.staleTime,this.#t)!==z(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||z(this.options.enabled,this.#t)!==z(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Tn(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(mn)),t}#h(e){return!Rn()&&z(this.options.enabled,this.#t)!==!1&&gn(e)}#g(){this.#b();let e=z(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=_n(this.#r.dataUpdatedAt,e)+1;this.#u=dn.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=dn.setInterval(()=>{(this.options.refetchIntervalInBackground||Bn.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(dn.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(dn.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&sr(e,t),o=i&&lr(e,n,t,r);(a||o)&&(l={...l,...nr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=An(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=An(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:ur(e,t),refetch:this.refetch,isEnabled:z(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Tn(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();Un.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function or(e,t){return z(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||z(t.retryOnMount,e)!==!1)}function sr(e,t){return or(e,t)||e.state.data!==void 0&&cr(e,t,t.refetchOnMount)}function cr(e,t,n){if(z(t.enabled,e)!==!1&&z(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&ur(e,t)}return!1}function lr(e,t,n,r){return(e!==t||z(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ur(e,n)}function ur(e,t){return z(t.enabled,e)!==!1&&e.isStaleByTime(z(t.staleTime,e))}var dr=class extends ar{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$n(t,n.data),hasPreviousPage:er(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},fr=F.createContext(!1),pr=()=>F.useContext(fr);fr.Provider;function mr(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hr=F.createContext(mr()),gr=()=>F.useContext(hr),_r=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Fn(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},vr=e=>{F.useEffect(()=>{e.clearReset()},[e])},yr=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Fn(n,[e.error,r])),br=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},xr=(e,t)=>e?.suspense&&t.isPending,Sr=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Cr(e,t,n){let r=pr(),i=gr(),a=cn(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,br(o),_r(o,i,s),vr(i);let[l]=F.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(F.useSyncExternalStore(F.useCallback(e=>{let t=d?l.subscribe(Un.batchCalls(e)):mn;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),F.useEffect(()=>{l.setOptions(o)},[o,l]),xr(o,u))throw Sr(o,l,i);if(yr({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function wr(e,t){return Cr(e,ar,t)}function Tr(e){return e}function Er(e){return e}function Dr(e,t){return Cr(e,dr,t)}var Or={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},kr={start:{kjj79g:`x1nhvcw1`,$$css:!0},center:{kjj79g:`xl56j7k`,$$css:!0},end:{kjj79g:`x13a6bvl`,$$css:!0},between:{kjj79g:`x1qughib`,$$css:!0},around:{kjj79g:`x1l1ennw`,$$css:!0},evenly:{kjj79g:`xaw8158`,$$css:!0}},Ar={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},jr={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},Mr={stack:{k1xSpc:`x78zum5`,$$css:!0}},Nr={0:{k1C7PZ:`x1o57wo1`,khm7nJ:`x6yxi7o`,$$css:!0},1:{k1C7PZ:`x1lfs0n9`,khm7nJ:`x1ngg2t4`,$$css:!0},2:{k1C7PZ:`xak3so`,khm7nJ:`x1x7z4sm`,$$css:!0},3:{k1C7PZ:`xewh9hi`,khm7nJ:`x4olc9o`,$$css:!0},4:{k1C7PZ:`xty4p9g`,khm7nJ:`xtx9w7w`,$$css:!0},5:{k1C7PZ:`x1eqhezk`,khm7nJ:`x1iu6piu`,$$css:!0},6:{k1C7PZ:`x3qlgwd`,khm7nJ:`xczp1bk`,$$css:!0},8:{k1C7PZ:`xicv188`,khm7nJ:`xgx0vcf`,$$css:!0},10:{k1C7PZ:`x1p37tyl`,khm7nJ:`x1xpicb7`,$$css:!0},"0.5":{k1C7PZ:`x1kihgfc`,khm7nJ:`x1tw44j4`,$$css:!0},"1.5":{k1C7PZ:`x1thn6ci`,khm7nJ:`xhq53yo`,$$css:!0}};function Pr({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[Mr.stack,Ar[t],n!=null&&Nr[n],e!=null&&Or[e],r!=null&&kr[r],i!=null&&jr[i]]}function Fr(e){return!e||typeof window>`u`?!1:window.getComputedStyle(e).direction===`rtl`}var Ir=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function Lr(e){if(e.isContentEditable)return e;let t=e.closest(`[contenteditable]`);return t&&t.getAttribute(`contenteditable`)!==`false`?t:null}function Rr(e,t){if(!(e instanceof HTMLElement))return!1;let n=Lr(e);if(n){let e=typeof window<`u`?window.getSelection():null;return e&&e.rangeCount>0&&!e.isCollapsed?!0:(n.textContent??``).length>0}let r=e.tagName===`TEXTAREA`,i=e.tagName===`INPUT`&&Ir.has(e.type);if(!r&&!i)return!1;let{selectionStart:a,selectionEnd:o,value:s}=e;return a!==o||a==null?!0:t===`ArrowLeft`||t===`ArrowUp`||t===`Home`?a>0:t===`ArrowRight`||t===`ArrowDown`||t===`End`?a<s.length:!1}function zr(e={}){let{itemSelector:t=`[role="menuitem"]`,boundarySelector:n,wrap:r=!0,onEscape:i,orientation:a=`vertical`,hasHomeEnd:o=!0,hasRovingTabIndex:s=!1,hasCaretGuard:c=!1}=e,l=(0,F.useRef)(null),u=(0,F.useCallback)(e=>e.getAttribute(`aria-disabled`)===`true`||e.disabled===!0||e.hasAttribute(`disabled`),[]),d=(0,F.useCallback)(()=>{let e=l.current;if(!e)return[];let r=Array.from(e.querySelectorAll(t));return n?r.filter(t=>t.closest(n)===e):r},[t,n]),f=(0,F.useCallback)(e=>{let t=l.current;if(!t||!n)return!0;let r=e.target;return!r||r.closest(n)===t},[n]),p=(0,F.useCallback)((e,t,n,r)=>{let i=e.length;if(i===0)return-1;let a=t;for(let t=0;t<i;t++){if(a<0||a>=i){if(!r)return-1;a=(a+i)%i}let t=e[a];if(t&&!u(t))return a;a+=n}return-1},[u]),h=(0,F.useCallback)(()=>{let e=d(),t=document.activeElement;return e.findIndex(e=>e===t||e.contains(t))},[d]),g=(0,F.useCallback)((e,t)=>{e.getAttribute(`tabindex`)!==String(t)&&e.setAttribute(`tabindex`,String(t))},[]),_=(0,F.useCallback)(()=>{let e=d(),t=e.filter(e=>!u(e));if(t.length===0)return;let n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0];for(let t of e)g(t,t===n?0:-1)},[d,u,g]);m(()=>{s&&_()});let v=(0,F.useCallback)((e,t)=>{let n=e[t];if(n){if(s)for(let t of e)g(t,t===n?0:-1);n.focus()}},[s,g]),y=(0,F.useCallback)(e=>{let t=d();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1));v(t,n)},[d,v]),b=(0,F.useCallback)(()=>{let e=d(),t=p(e,0,1,!1);return t!==-1&&(v(e,t),!0)},[d,p,v]),x=(0,F.useCallback)(()=>{let e=d(),t=p(e,e.length-1,-1,!1);return t!==-1&&(v(e,t),!0)},[d,p,v]),S=(0,F.useCallback)(()=>{s&&_()},[s,_]);return{listRef:l,handleKeyDown:(0,F.useCallback)(e=>{if(e.ctrlKey||e.metaKey||e.altKey||!f(e))return;if(e.key===`Escape`){i&&(e.preventDefault(),i());return}let t=a===`horizontal`||a===`both`,n=a===`vertical`||a===`both`,s=[],u=[];if(t){let t=e.key===`ArrowLeft`||e.key===`ArrowRight`?Fr(l.current):!1;s.push(t?`ArrowLeft`:`ArrowRight`),u.push(t?`ArrowRight`:`ArrowLeft`)}n&&(s.push(`ArrowDown`),u.push(`ArrowUp`));let m=s.includes(e.key),g=u.includes(e.key),_=o&&e.key===`Home`,y=o&&e.key===`End`;if(!m&&!g&&!_&&!y||c&&(Rr(e.target,e.key)||Rr(document.activeElement,e.key)))return;let S=h(),C=d();if(m){let e=S===-1?0:S+1,t=p(C,e,1,r);t!==-1&&v(C,t)}else if(g){let e=S===-1?C.length-1:S-1,t=p(C,e,-1,r);t!==-1&&v(C,t)}else _?b():y&&x();e.preventDefault()},[h,d,r,a,o,c,p,v,b,x,i,f]),handleFocus:S,focusItem:y,focusFirst:b,focusLast:x,ownsEvent:f,getItems:d}}var Br=500,Vr=300;function Hr(e){let{show:t,hide:n,isOpen:r,isEnabled:i,showDelay:a=150,hideDelay:o=200,clickGuardMs:s=Br,itemSelector:c,popoverId:l,ownsFocus:u=!0}=e,d=v(`(hover: hover)`),f=(0,F.useRef)(null),p=(0,F.useRef)(null),h=(0,F.useRef)(null),g=(0,F.useRef)(!1),_=(0,F.useRef)(0),y=(0,F.useRef)(0),b=(0,F.useRef)(r);m(()=>{let e=b.current;b.current=r,e&&!r&&(g.current=!1,y.current=0,_.current=Date.now())},[r]);let x=(0,F.useCallback)(()=>{f.current&&=(clearTimeout(f.current),null),p.current&&=(clearTimeout(p.current),null)},[]),S=(0,F.useRef)(()=>{}),{listRef:C,handleKeyDown:w,focusFirst:T}=zr({itemSelector:c,onEscape:()=>S.current()}),E=(0,F.useCallback)(()=>{let e=C.current?.contains(document.activeElement)??!1;n(),e&&h.current?.focus()},[n,C]);(0,F.useEffect)(()=>{S.current=()=>{x(),E()}},[x,E]),(0,F.useEffect)(()=>()=>x(),[x]);let D=(0,F.useCallback)(()=>{T()||C.current?.focus()},[T,C]),ee=(0,F.useCallback)(()=>{if(!u){t();return}t({skipAutoFocus:!0}),D()},[u,t,D]),O=(0,F.useCallback)(()=>s>0&&y.current>0&&Date.now()-y.current<s&&(g.current=!1,y.current=0,!0),[s]),k=(0,F.useCallback)(e=>{if(l&&e?.preventDefault(),x(),e!=null&&e.detail===0){_.current=0,g.current=!1,y.current=0,r?u&&D():ee();return}if(!r){_.current=0,g.current=!1,y.current=0,ee();return}if(O()){u&&D();return}E()},[l,x,r,u,O,ee,D,E]),A=(0,F.useCallback)(()=>{if(!d||_.current>0&&Date.now()-_.current<Vr)return;if(r){x();return}g.current=!0,x();let e=()=>{y.current=Date.now(),t({skipAutoFocus:!0})};a>0?f.current=setTimeout(e,a):e()},[d,r,x,t,a]),te=(0,F.useCallback)(()=>{_.current=0,g.current&&(x(),p.current=setTimeout(()=>{n()},o))},[x,n,o]),j=(0,F.useCallback)(()=>{x()},[x]),ne=(0,F.useCallback)(e=>{h.current=e},[]),re=(0,F.useCallback)(()=>{},[]),ie=(0,F.useCallback)(e=>{},[]),M=(0,F.useCallback)(e=>{},[]);return i?{triggerProps:{onClick:k,onMouseEnter:A,onMouseLeave:te,...l?{popoverTarget:l}:null},contentProps:{onMouseEnter:j,onMouseLeave:te,onKeyDown:w},menuRef:C,focusFirst:T,focusMenu:D,confirmHoverOpen:O,close:E,setTriggerEl:ne}:{triggerProps:{onClick:re,onMouseEnter:re,onMouseLeave:re},contentProps:{onMouseEnter:re,onMouseLeave:re,onKeyDown:M},menuRef:C,focusFirst:T,focusMenu:D,confirmHoverOpen:O,close:E,setTriggerEl:ie}}var Ur={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function Wr({direction:e=`vertical`,hAlign:r,vAlign:i,justify:a,align:o,gap:c,padding:f,paddingInline:p,paddingInlineStart:m,paddingInlineEnd:h,paddingBlock:_,paddingBlockStart:v,paddingBlockEnd:y,isScrollable:b,width:x,height:S,maxWidth:C,minHeight:w,wrap:T,as:E=`div`,xstyle:D,className:ee,style:O,children:k,ref:A,...te}){let j=r??(e===`horizontal`?a:o),ne=i??(e===`horizontal`?o:a),re=e===`horizontal`?j:ne,ie=e===`horizontal`?ne:j,M=m??p??f,ae=h??p??f,N=v??_??f,oe=y??_??f,se=t(...Pr({direction:e,crossAlign:ie,mainAlign:re,gap:c,wrap:T}),M!=null&&n[M],ae!=null&&u[ae],N!=null&&d[N],oe!=null&&l[oe],b&&Ur.scrollable,D),ce={...x!=null&&{width:typeof x==`number`?`${x}px`:x},...S!=null&&{height:typeof S==`number`?`${S}px`:S},...C!=null&&{maxWidth:typeof C==`number`?`${C}px`:C},...w!=null&&{minHeight:typeof w==`number`?`${w}px`:w}};return(0,F.createElement)(E,{ref:A,...g(s(`stack`,{direction:e,gap:c,wrap:T}),se,ee,{...O,...ce}),...te},k)}Wr.displayName=`Stack`;function Gr({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,I.jsx)(Wr,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}Gr.displayName=`VStack`;function Kr(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function qr(e,t=`|`){return e.map(e=>vi(e)).join(t)}function Jr(e,t){return typeof t==`bigint`?t.toString():t}var Yr=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function Xr(e){return new Yr(e)}function Zr(e){return e==null}function Qr(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function $r(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function ei(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ti(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function ni(e){return ti(e._zod.def)??e._zod.def.shape}function ri(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return ei(this,t,e),e},enumerable:!0,configurable:!0})}function ii(e,t,n){t in e?ei(e,t,n):e[t]=n}function ai(e,t,n,r){let i=ni(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ri(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ii(e,a,r?r(n.value,a):n.value))}}function oi(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ri(e,n,()=>t[n]):ii(e,n,r.value))}}function si(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ci(e){return JSON.stringify(e)}function li(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ui=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function di(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fi=Xr(()=>{if(oa.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function pi(e){if(di(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return di(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function mi(e){return pi(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var hi=new Set([`string`,`number`,`symbol`]);function gi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function _i(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function B(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function vi(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function yi(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var bi={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},xi={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Si(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return ai(i,e,Ci(e,t)),_i(e,si(n,{shape:i,checks:[]}))}function Ci(e,t){let n=ni(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function wi(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ci(e,t)),a={};return ai(a,e,Reflect.ownKeys(ni(e)).filter(e=>!i.has(e))),_i(e,si(n,{shape:a,checks:[]}))}function Ti(e,t){if(!pi(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=ni(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return _i(e,si(e._zod.def,{shape:Ei(e,t)}))}function Ei(e,t){let n={};return ai(n,e,Reflect.ownKeys(ni(e))),oi(n,t),n}function Di(e,t){if(!pi(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return _i(e,si(e._zod.def,{shape:Ei(e,t)}))}function Oi(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return ai(n,e,Reflect.ownKeys(ni(e))),ai(n,t,Reflect.ownKeys(ni(t))),_i(e,si(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ki(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ci(t,n)):void 0,o={};return ai(o,t,Reflect.ownKeys(ni(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),_i(t,si(t._zod.def,{shape:o,checks:[]}))}function Ai(e,t,n){let r=n?new Set(Ci(t,n)):void 0,i={};return ai(i,t,Reflect.ownKeys(ni(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),_i(t,si(t._zod.def,{shape:i}))}function ji(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Mi(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ni(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Pi(e){return typeof e==`string`?e:e?.message}function Fi(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ii(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Pi(e.inst?._zod.def?.error?.(e))??Pi(a?.(e))??Pi(t?.error?.(e))??Pi(n.customError?.(e))??Pi(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Li=/[\uD800-\uDBFF]/;function Ri(e){let t=e.length;if(!Li.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function zi(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Bi(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Vi(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Hi(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ki(e,n,r.value)}}function Ui(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Wi(e,t,n){return Ui(e,t,n,!1)}function Gi(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Ui(this,n,r(this))},set(e){Ui(this,n,e)}})}return t}function Ki(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Ui(this,t,n.bind(this))},set(e){Ui(this,t,e)}})}function qi(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ji,Yi=!1,Xi={configurable:!0,get(){Yi=!0}};function V(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ji!==e._zod){Ji=void 0;return}Ji=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Xi);let e=Yi;Yi=!1;try{let r=n(this);return Yi?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Yi||=e,r}catch(n){throw delete this[t],Yi||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Zi(e,t,n,r){let i=qi(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Qi=`~constantCatch`;function $i(e){let t=()=>e;return t[Qi]=!0,t}var ea,ta={value:void 0,enumerable:!1},na=`captureStackTrace`in Error?Error:null;function ra(e){let t=na;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return na=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function H(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){ta.value=new a(r);try{Object.defineProperty(n,"_zod",ta)}finally{ta.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Hi(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ra(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var ia=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},aa=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(ea=globalThis).__zod_globalConfig??(ea.__zod_globalConfig={});var oa=globalThis.__zod_globalConfig;function sa(e){return e&&Object.assign(oa,e),oa}function ca(){let e=this._zod;return e.message??=JSON.stringify(e.def,Jr,2),e.message}function la(e){this._zod.message=e}var ua={get:ca,set:la,enumerable:!0,configurable:!0},da={value:void 0,enumerable:!1},fa=new WeakSet([Object.prototype,Error.prototype]),pa=(e,t)=>{e.name=`$ZodError`,da.value=t,Object.defineProperty(e,"issues",da),da.value=void 0,Object.defineProperty(e,"message",ua);let n=Object.getPrototypeOf(e);fa.has(n)||(fa.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},ma=H(`$ZodError`,pa);H(`$ZodError`,pa,void 0,{Parent:Error});function ha(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ga(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ha(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function _a(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function va(e,t){return{callee:t?.callee??e,Err:t?.Err}}var ya=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new ia;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ii(e,o,sa())));throw ui(n,a?.callee??t),n}return s.value};return t},ba=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ii(e,o,sa())));throw ui(n,a?.callee??t),n}return s.value};return t},xa=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new ia;return a.issues.length?Sa(e,a.issues,i):{success:!0,data:a.value}};function Sa(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ii(e,n,sa()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ca=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Sa(e,a.issues,i):{success:!0,data:a.value}},wa=Symbol.for(`zod.compile.invalid`),Ta=Symbol.for(`zod.compile.fallback`),Ea=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==wa)return!0;if(r.definite===!0&&n===void 0)return!1}return Da(e,t,n)});function Da(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Ta]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new ia;return a.issues.length===0}var Oa=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},ka=e=>{let t=ya(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,va(n,a))};return n},Aa=e=>{let t=ya(e),n=(e,r,i,a)=>t(e,r,i,va(n,a));return n},ja=e=>{let t=ba(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,va(n,a))};return n},Ma=e=>{let t=ba(e),n=async(e,r,i,a)=>await t(e,r,i,va(n,a));return n},Na=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xa(e)(t,n,i)},Pa=e=>(t,n,r)=>xa(e)(t,n,r),Fa=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ca(e)(t,n,i)},Ia=e=>async(t,n,r)=>Ca(e)(t,n,r),La=/^[cC][0-9a-z]{6,}$/,Ra=/^[0-9a-z]+$/,za=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ba=/^[0-9a-vA-V]{20}$/,Va=/^[A-Za-z0-9]{27}$/,Ha=/^[a-zA-Z0-9_-]{21}$/;function Ua(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Wa=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ga=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Ka=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,qa=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ja=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function Ya(){return new RegExp(Ja,`u`)}var Xa=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Za=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qa=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,$a=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eo=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,to=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,no=/^https?$/,ro=/^\+[1-9]\d{6,14}$/,io=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function ao(e){return RegExp(`^${e}$`)}var oo=ao(io);function so(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function co(e){return RegExp(`^${so(e)}$`)}function lo(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${so({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${so({precision:e.precision})}`:n;return RegExp(`^${io}T(?:${r})$`)}var uo=/^[\s\S]{0,}$/,fo=/^-?\d+(?:\.\d+)?$/,po=/^(?:true|false)$/i,mo=/^null$/i,ho=/^[^A-Z]*$/,go=/^[^a-z]*$/,_o=H(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),vo=e=>{let t=e.value;return!Zr(t)&&t.length!==void 0},yo={number:`number`,bigint:`bigint`,object:`date`},bo=H(`$ZodCheckLessThan`,(e,t)=>{_o.init(e,t);let n=yo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:yo[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xo=H(`$ZodCheckGreaterThan`,(e,t)=>{_o.init(e,t);let n=yo[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:yo[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),So=H(`$ZodCheckMultipleOf`,(e,t)=>{_o.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):$r(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Co=H(`$ZodCheckNumberFormat`,(e,t)=>{_o.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=bi[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),wo=H(`$ZodCheckMaxLength`,(e,t)=>{var n;_o.init(e,t),(n=e._zod.def).when??(n.when=vo),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ri(r):i)<=t.maximum)return;let a=zi(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),To=H(`$ZodCheckMinLength`,(e,t)=>{var n;_o.init(e,t),(n=e._zod.def).when??(n.when=vo),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ri(r):i)>=t.minimum)return;let a=zi(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Eo=H(`$ZodCheckLengthEquals`,(e,t)=>{var n;_o.init(e,t),(n=e._zod.def).when??(n.when=vo),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ri(r):i;if(a===t.length)return;let o=zi(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Do=H(`$ZodCheckStringFormat`,(e,t)=>{var n,r;_o.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Oo=H(`$ZodCheckRegex`,(e,t)=>{Do.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ko=H(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ho,Do.init(e,t)}),Ao=H(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=go,Do.init(e,t)}),jo=H(`$ZodCheckIncludes`,(e,t)=>{_o.init(e,t);let n=gi(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Mo=H(`$ZodCheckStartsWith`,(e,t)=>{_o.init(e,t);let n=RegExp(`^${gi(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),No=H(`$ZodCheckEndsWith`,(e,t)=>{_o.init(e,t);let n=RegExp(`.*${gi(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Po=H(`$ZodCheckOverwrite`,(e,t)=>{_o.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Fo=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3
3
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
4
|
-
`)}\n};`)(...Object.values(this.closed))}},Fo={major:4,minor:6,patch:4},W=H(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Fo;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=ji(t),a;for(let o of n){if(o._zod.def.when){if(Mi(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ia;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Fi(t.issues,n,e),i||=ji(t,n))});else{if(t.issues.length===n)continue;Fi(t.issues,n,e),i||=ji(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(ji(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ia;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ia;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Wi(this,`~standard`,Ro(this))},set"~standard"(e){Ui(this,`~standard`,e)}}),Io=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ii(e,t,sa()))}:{value:e.value};async function Lo(e,t){let n={async:!0};return Io(await e._zod.run({value:t,issues:[]},n),n)}function Ro(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Io(r,n)}catch{}return Lo(e,t)},vendor:`zod`,version:1}}var zo=H(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=t.pattern??uo,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),G=H(`$ZodStringFormat`,(e,t)=>{Eo.init(e,t),zo.init(e,t)}),Bo=H(`$ZodGUID`,(e,t)=>{t.pattern??=Ga,G.init(e,t)}),Vo=H(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ka(e)}else t.pattern??=Ka();G.init(e,t)}),Ho=H(`$ZodEmail`,(e,t)=>{t.pattern??=qa,G.init(e,t)});function Uo(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Wo(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Uo(e)||2:Go(e,t)}function Go(e,t){if(!t.normalize&&t.protocol?.source===no.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Ko=/[\t\n\r]/g;function qo(e){return e.replace(Ko,``)}function Jo(e,t){return t.lastIndex=0,t.test(e.hostname)}function Yo(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Xo=H(`$ZodURL`,(e,t)=>{G.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Wo(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=qo(r);return}t.hostname&&!Jo(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Yo(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:qo(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Zo=H(`$ZodEmoji`,(e,t)=>{t.pattern??=Ya(),G.init(e,t)}),Qo=H(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Ha:Ua(t.length),G.init(e,t)}),$o=H(`$ZodCUID`,(e,t)=>{t.pattern??=La,G.init(e,t)}),es=H(`$ZodCUID2`,(e,t)=>{t.pattern??=Ra,G.init(e,t)}),ts=H(`$ZodULID`,(e,t)=>{t.pattern??=za,G.init(e,t)}),ns=H(`$ZodXID`,(e,t)=>{t.pattern??=Ba,G.init(e,t)}),rs=H(`$ZodKSUID`,(e,t)=>{t.pattern??=Va,G.init(e,t)}),is=H(`$ZodISODateTime`,(e,t)=>{t.pattern??=lo(t),G.init(e,t)}),as=H(`$ZodISODate`,(e,t)=>{t.pattern??=oo,G.init(e,t)}),os=H(`$ZodISOTime`,(e,t)=>{t.pattern??=co(t),G.init(e,t)}),ss=H(`$ZodISODuration`,(e,t)=>{t.pattern??=Wa,G.init(e,t)}),cs=H(`$ZodIPv4`,(e,t)=>{t.pattern??=Xa,G.init(e,t)}),ls=/^[0-9a-fA-F:.]+$/;function us(e){return ls.test(e)?Uo(`http://[${e}]`):!1}var ds=H(`$ZodIPv6`,(e,t)=>{t.pattern??=Za,G.init(e,t),e._zod.check=n=>{us(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),fs=H(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Qa,G.init(e,t)});function ps(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:us(n)}var ms=H(`$ZodCIDRv6`,(e,t)=>{t.pattern??=$a,G.init(e,t),e._zod.check=n=>{ps(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function hs(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var gs=/^[0-9a-zA-Z+/]*={0,2}$/,_s=H(`$ZodBase64`,(e,t)=>{t.pattern??=gs,G.init(e,t),e._zod.check=n=>{hs(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),vs=/^[A-Za-z0-9_-]*$/;function ys(e){if(!vs.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return hs(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var bs=H(`$ZodBase64URL`,(e,t)=>{t.pattern??=vs,G.init(e,t),e._zod.check=n=>{ys(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),xs=H(`$ZodE164`,(e,t)=>{t.pattern??=ro,G.init(e,t)});function Ss(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Cs=H(`$ZodJWT`,(e,t)=>{G.init(e,t),e._zod.check=n=>{Ss(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),ws=H(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=fo,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Ts=H(`$ZodNumberFormat`,(e,t)=>{So.init(e,t),ws.init(e,t)}),Es=H(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=po,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Ds=H(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=mo,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Os=H(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),ks=H(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function As(e,t,n){e.issues.length&&t.issues.push(...Ni(n,e.issues)),t.value[n]=e.value}var js=H(`$ZodArray`,(e,t)=>{W.init(e,t);let n=oa.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>As(t,r,e)));else if(As(c,r,e),s&&c.issues.length!==0&&ji(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Ms(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ni(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Ns=[];function Ps(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Ns,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=yi(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Fs(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(ji(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ms(e,n,i,t,d,f))):Ms(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Is=H(`$ZodObject`,(e,t)=>{W.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Xr(()=>Ps(t));V(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||ei(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=di,o=t.catchall,s,c=oa.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(ji(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Ms(n,t,e,r,a,o))):Ms(s,t,e,r,a,o)}return o?Fs(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Ls=H(`$ZodObjectJIT`,(e,t)=>{Is.init(e,t);let n=e._zod.parse,r=Xr(()=>Ps(t)),i=oa.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Po([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
4
|
+
`)}\n};`)(...Object.values(this.closed))}},Io={major:4,minor:6,patch:4},U=H(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Io;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=ji(t),a;for(let o of n){if(o._zod.def.when){if(Mi(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new ia;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Fi(t.issues,n,e),i||=ji(t,n))});else{if(t.issues.length===n)continue;Fi(t.issues,n,e),i||=ji(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(ji(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new ia;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new ia;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Wi(this,`~standard`,zo(this))},set"~standard"(e){Ui(this,`~standard`,e)}}),Lo=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ii(e,t,sa()))}:{value:e.value};async function Ro(e,t){let n={async:!0};return Lo(await e._zod.run({value:t,issues:[]},n),n)}function zo(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Lo(r,n)}catch{}return Ro(e,t)},vendor:`zod`,version:1}}var Bo=H(`$ZodString`,(e,t)=>{U.init(e,t),e._zod.pattern=t.pattern??uo,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),W=H(`$ZodStringFormat`,(e,t)=>{Do.init(e,t),Bo.init(e,t)}),Vo=H(`$ZodGUID`,(e,t)=>{t.pattern??=Ga,W.init(e,t)}),Ho=H(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ka(e)}else t.pattern??=Ka();W.init(e,t)}),Uo=H(`$ZodEmail`,(e,t)=>{t.pattern??=qa,W.init(e,t)});function Wo(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Go(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Wo(e)||2:Ko(e,t)}function Ko(e,t){if(!t.normalize&&t.protocol?.source===no.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var qo=/[\t\n\r]/g;function Jo(e){return e.replace(qo,``)}function Yo(e,t){return t.lastIndex=0,t.test(e.hostname)}function Xo(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Zo=H(`$ZodURL`,(e,t)=>{W.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Go(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Jo(r);return}t.hostname&&!Yo(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Xo(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Jo(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Qo=H(`$ZodEmoji`,(e,t)=>{t.pattern??=Ya(),W.init(e,t)}),$o=H(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Ha:Ua(t.length),W.init(e,t)}),es=H(`$ZodCUID`,(e,t)=>{t.pattern??=La,W.init(e,t)}),ts=H(`$ZodCUID2`,(e,t)=>{t.pattern??=Ra,W.init(e,t)}),ns=H(`$ZodULID`,(e,t)=>{t.pattern??=za,W.init(e,t)}),rs=H(`$ZodXID`,(e,t)=>{t.pattern??=Ba,W.init(e,t)}),is=H(`$ZodKSUID`,(e,t)=>{t.pattern??=Va,W.init(e,t)}),as=H(`$ZodISODateTime`,(e,t)=>{t.pattern??=lo(t),W.init(e,t)}),os=H(`$ZodISODate`,(e,t)=>{t.pattern??=oo,W.init(e,t)}),ss=H(`$ZodISOTime`,(e,t)=>{t.pattern??=co(t),W.init(e,t)}),cs=H(`$ZodISODuration`,(e,t)=>{t.pattern??=Wa,W.init(e,t)}),ls=H(`$ZodIPv4`,(e,t)=>{t.pattern??=Xa,W.init(e,t)}),us=/^[0-9a-fA-F:.]+$/;function ds(e){return us.test(e)?Wo(`http://[${e}]`):!1}var fs=H(`$ZodIPv6`,(e,t)=>{t.pattern??=Za,W.init(e,t),e._zod.check=n=>{ds(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),ps=H(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Qa,W.init(e,t)});function ms(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:ds(n)}var hs=H(`$ZodCIDRv6`,(e,t)=>{t.pattern??=$a,W.init(e,t),e._zod.check=n=>{ms(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function gs(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var _s=/^[0-9a-zA-Z+/]*={0,2}$/,vs=H(`$ZodBase64`,(e,t)=>{t.pattern??=_s,W.init(e,t),e._zod.check=n=>{gs(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),ys=/^[A-Za-z0-9_-]*$/;function bs(e){if(!ys.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return gs(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var xs=H(`$ZodBase64URL`,(e,t)=>{t.pattern??=ys,W.init(e,t),e._zod.check=n=>{bs(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ss=H(`$ZodE164`,(e,t)=>{t.pattern??=ro,W.init(e,t)});function Cs(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var ws=H(`$ZodJWT`,(e,t)=>{W.init(e,t),e._zod.check=n=>{Cs(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Ts=H(`$ZodNumber`,(e,t)=>{U.init(e,t),e._zod.pattern=fo,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Es=H(`$ZodNumberFormat`,(e,t)=>{Co.init(e,t),Ts.init(e,t)}),Ds=H(`$ZodBoolean`,(e,t)=>{U.init(e,t),e._zod.pattern=po,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Os=H(`$ZodNull`,(e,t)=>{U.init(e,t),e._zod.pattern=mo,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),ks=H(`$ZodUnknown`,(e,t)=>{U.init(e,t),e._zod.parse=e=>e}),As=H(`$ZodNever`,(e,t)=>{U.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function js(e,t,n){e.issues.length&&t.issues.push(...Ni(n,e.issues)),t.value[n]=e.value}var Ms=H(`$ZodArray`,(e,t)=>{U.init(e,t);let n=oa.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>js(t,r,e)));else if(js(c,r,e),s&&c.issues.length!==0&&ji(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Ns(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ni(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Ps=[];function Fs(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Ps,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=yi(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Is(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(ji(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Ns(e,n,i,t,d,f))):Ns(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Ls=H(`$ZodObject`,(e,t)=>{U.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=Xr(()=>Fs(t));V(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||ei(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=di,o=t.catchall,s,c=oa.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(ji(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Ns(n,t,e,r,a,o))):Ns(s,t,e,r,a,o)}return o?Is(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Rs=H(`$ZodObjectJIT`,(e,t)=>{Ls.init(e,t);let n=e._zod.parse,r=Xr(()=>Fs(t)),i=oa.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Fo([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
5
5
|
let ${e}_ab = false;
|
|
6
6
|
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
7
7
|
const iss = ${e}.issues[i];
|
|
@@ -51,7 +51,77 @@ import{J as e,K as t,S as n,V as r,X as i,c as a,l as o,n as s,q as c,v as l,x a
|
|
|
51
51
|
newResult[${r}] = ${n}.value;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=di,c=!oa.jitless,l=c&&fi.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Fs([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Rs(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ji(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ii(e,r,sa())))}),t)}var zs=H(`$ZodUnion`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),V(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),V(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),V(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Qr(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Rs(t,r,e,i)):Rs(o,r,e,i)}});function Bs(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Vs=H(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,zs.init(e,t);let n=e._zod.parse;V(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||ei(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=ti(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=Xr(()=>Bs(t));e._zod.parse=(i,a)=>{let o=i.value;if(!di(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Hs=H(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Ws(e,t,n)):Ws(e,i,a)}});function Us(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(pi(e)&&pi(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Us(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Us(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ws(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Us(t.value,n.value);if(!c.valid){if(ji(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Gs=H(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=Kr(t.entries),r=new Set(n);e._zod.values=r,V(e,`pattern`,e=>{let t=Kr(e.def.entries).filter(e=>hi.has(typeof e));return RegExp(t.length?`^(${t.map(e=>gi(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Ks=H(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,V(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?gi(e):e?gi(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),qs=H(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,oa.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new aa(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new ia;return n.value=i,n}});function Js(e,t){return e.value=t.issues.length?void 0:t.value,e}var Ys=H(`$ZodOptional`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Qr(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Js(e,t)):Js(e,r)}return t.innerType._zod.run(e,n)}}),Xs=H(`$ZodExactOptional`,(e,t)=>{Ys.init(e,t),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Zs=H(`$ZodNullable`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Qr(t.source)}|null)$`):void 0}),V(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Qs=H(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>$s(e,t)):$s(r,t)}});function $s(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ec=H(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),tc=H(`$ZodNonOptional`,(e,t)=>{W.init(e,t),V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>nc(t,e)):nc(i,e)}});function nc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function rc(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ii(e,r,sa()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ic=H(`$ZodCatch`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>rc(e,r,t,n)):rc(e,r,t,n)}}),ac=H(`$ZodPipe`,(e,t)=>{W.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>oc(e,t.in,n)):oc(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>oc(e,t.out,n)):oc(r,t.out,n)}});function oc(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var sc=H(`$ZodReadonly`,(e,t)=>{W.init(e,t),V(e,`propValues`,e=>e.def.innerType._zod.propValues),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`optin`,e=>e.def.innerType?._zod?.optin),V(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(cc):cc(r)}});function cc(e){return e.memo||(e.value=Object.freeze(e.value)),e}var lc=H(`$ZodCustom`,(e,t)=>{U.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>uc(t,n,r,e));uc(i,n,r,e)}});function uc(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Vi(e))}}var dc=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},fc=`~memo`,pc=[];function mc(e){return typeof e==`object`&&!!e}function hc(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var gc=new WeakMap,_c=0,vc=1,yc=2;function bc(e,t,n){let r=gc.get(e);if(r!==void 0)return r?yc:_c;if(t.has(e))return yc;t.add(e);let i=_c,a=e=>{if(i!==yc&&e?._zod){let r=bc(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=_c;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?vc:o.value?._zod?bc(o.value,t,n):_c;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ti(c);s(e?o(e,!0):vc),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?bc(r,t,!1):vc);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),xc(e,i)}function xc(e,t){return t!==vc&&gc.set(e,t===yc),t}function Sc(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Cc,wc=[],Tc={alloc(e,t,n){let r=Cc;if(!r)return n;Cc=void 0;let i={value:n,issues:null};return r.set(t.value,i),wc.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Dc(n,e.value))throw new dc;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=bc(e,new Set,!1);if(i===_c)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===yc||r?n=!0:r=!0}let l=s.value;if(!mc(l))return t(s,c);let u=c[fc];u||(u={buckets:new WeakMap,backEdges:void 0},c[fc]=u);let d;i===c?d=a:(d=Sc(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...hc(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Cc=d;let p=wc.length,m=t(s,c);Cc=void 0;let h=wc.length>p?wc.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?hc(e.issues):pc),e)):(h&&(h.issues=m.issues.length?hc(m.issues):pc),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Ec(){return Tc}function Dc(e,t){let n=e[fc]?.backEdges;return n!==void 0&&mc(t)&&n.has(t)}var Oc=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Bi(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${vi(e.values[0])}`:`Invalid option: expected one of ${qr(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${qr(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function kc(){return{localeError:Oc()}}var Ac,jc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Mc(){return new jc}(Ac=globalThis).__zod_globalRegistry??(Ac.__zod_globalRegistry=Mc());var Nc=globalThis.__zod_globalRegistry;function Pc(e){return e.checks&&=[...e.checks],e}function Fc(e,t){return new e(Pc({type:`string`,...B(t)}))}function Ic(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...B(t)})}function Lc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...B(t)})}function Rc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...B(t)})}function zc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...B(t)})}function Bc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...B(t)})}function Vc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...B(t)})}function Hc(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...B(t)})}function Uc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...B(t)})}function Wc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...B(t)})}function Gc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...B(t)})}function Kc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...B(t)})}function qc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...B(t)})}function Jc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...B(t)})}function Yc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...B(t)})}function Xc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...B(t)})}function Zc(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...B(t)})}function Qc(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...B(t)})}function $c(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...B(t)})}function el(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...B(t)})}function tl(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...B(t)})}function nl(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...B(t)})}function rl(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...B(t)})}function il(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...B(t)})}function al(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...B(t)})}function ol(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...B(t)})}function sl(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...B(t)})}function cl(e,t){return new e(Pc({type:`number`,checks:[],...B(t)}))}function ll(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...B(t)})}function ul(e,t){return new e({type:`boolean`,...B(t)})}function dl(e,t){return new e({type:`null`,...B(t)})}function fl(e){return new e({type:`unknown`})}function pl(e,t){return new e({type:`never`,...B(t)})}function ml(e,t){return new yo({check:`less_than`,...B(t),value:e,inclusive:!1})}function hl(e,t){return new yo({check:`less_than`,...B(t),value:e,inclusive:!0})}function gl(e,t){return new bo({check:`greater_than`,...B(t),value:e,inclusive:!1})}function _l(e,t){return new bo({check:`greater_than`,...B(t),value:e,inclusive:!0})}function vl(e,t){return new xo({check:`multiple_of`,...B(t),value:e})}function yl(e,t){return new Co({check:`max_length`,...B(t),maximum:e})}function bl(e,t){return new wo({check:`min_length`,...B(t),minimum:e})}function xl(e,t){return new To({check:`length_equals`,...B(t),length:e})}function Sl(e,t){return new Do({check:`string_format`,format:`regex`,...B(t),pattern:e})}function Cl(e){return new Oo({check:`string_format`,format:`lowercase`,...B(e)})}function wl(e){return new ko({check:`string_format`,format:`uppercase`,...B(e)})}function Tl(e,t){return new Ao({check:`string_format`,format:`includes`,...B(t),includes:e})}function El(e,t){return new jo({check:`string_format`,format:`starts_with`,...B(t),prefix:e})}function Dl(e,t){return new Mo({check:`string_format`,format:`ends_with`,...B(t),suffix:e})}function Ol(e){return new No({check:`overwrite`,tx:e})}function kl(e){return Ol(t=>t.normalize(e))}function Al(){return Ol(e=>e.trim())}function jl(){return Ol(e=>e.toLowerCase())}function Ml(){return Ol(e=>e.toUpperCase())}function Nl(){return Ol(e=>li(e))}function Pl(e,t,n){return new e({type:`array`,element:t,...B(n)})}function Fl(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B(n)})}function Il(e,t){let n=Ll(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Vi(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Vi(r))}},e(t.value,t)),t);return n}function Ll(e,t){let n=new U({check:`custom`,...B(t)});return n._zod.check=e,n}function Rl(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&ei(e,t,n[t]);return e}function zl(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Nc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Bl(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function K(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,K(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Rl(o.schema,c),t.io===`input`&&q(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Vl(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Hl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Vl(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Vl(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
54
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=di,c=!oa.jitless,l=c&&fi.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Is([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function zs(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ji(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ii(e,r,sa())))}),t)}var Bs=H(`$ZodUnion`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),V(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),V(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),V(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Qr(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>zs(t,r,e,i)):zs(o,r,e,i)}});function Vs(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Hs=H(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Bs.init(e,t);let n=e._zod.parse;V(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||ei(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=ti(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=Xr(()=>Vs(t));e._zod.parse=(i,a)=>{let o=i.value;if(!di(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Us=H(`$ZodIntersection`,(e,t)=>{U.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Gs(e,t,n)):Gs(e,i,a)}});function Ws(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(pi(e)&&pi(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Ws(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Ws(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Gs(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Ws(t.value,n.value);if(!c.valid){if(ji(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Ks=H(`$ZodEnum`,(e,t)=>{U.init(e,t);let n=Kr(t.entries),r=new Set(n);e._zod.values=r,V(e,`pattern`,e=>{let t=Kr(e.def.entries).filter(e=>hi.has(typeof e));return RegExp(t.length?`^(${t.map(e=>gi(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),qs=H(`$ZodLiteral`,(e,t)=>{U.init(e,t);let n=new Set(t.values);e._zod.values=n,V(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?gi(e):e?gi(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Js=H(`$ZodTransform`,(e,t)=>{U.init(e,t),e._zod.optin=`optional`,oa.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new aa(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new ia;return n.value=i,n}});function Ys(e,t){return e.value=t.issues.length?void 0:t.value,e}var Xs=H(`$ZodOptional`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Qr(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Ys(e,t)):Ys(e,r)}return t.innerType._zod.run(e,n)}}),Zs=H(`$ZodExactOptional`,(e,t)=>{Xs.init(e,t),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Qs=H(`$ZodNullable`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Qr(t.source)}|null)$`):void 0}),V(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),$s=H(`$ZodDefault`,(e,t)=>{U.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ec(e,t)):ec(r,t)}});function ec(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tc=H(`$ZodPrefault`,(e,t)=>{U.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),nc=H(`$ZodNonOptional`,(e,t)=>{U.init(e,t),V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>rc(t,e)):rc(i,e)}});function rc(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function ic(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ii(e,r,sa()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ac=H(`$ZodCatch`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>ic(e,r,t,n)):ic(e,r,t,n)}}),oc=H(`$ZodPipe`,(e,t)=>{U.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>sc(e,t.in,n)):sc(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>sc(e,t.out,n)):sc(r,t.out,n)}});function sc(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var cc=H(`$ZodReadonly`,(e,t)=>{U.init(e,t),V(e,`propValues`,e=>e.def.innerType._zod.propValues),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`optin`,e=>e.def.innerType?._zod?.optin),V(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(lc):lc(r)}});function lc(e){return e.memo||(e.value=Object.freeze(e.value)),e}var uc=H(`$ZodCustom`,(e,t)=>{_o.init(e,t),U.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>dc(t,n,r,e));dc(i,n,r,e)}});function dc(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Vi(e))}}var fc=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},pc=`~memo`,mc=[];function hc(e){return typeof e==`object`&&!!e}function gc(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var _c=new WeakMap,vc=0,yc=1,bc=2;function xc(e,t,n){let r=_c.get(e);if(r!==void 0)return r?bc:vc;if(t.has(e))return bc;t.add(e);let i=vc,a=e=>{if(i!==bc&&e?._zod){let r=xc(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=vc;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?yc:o.value?._zod?xc(o.value,t,n):vc;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ti(c);s(e?o(e,!0):yc),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?xc(r,t,!1):yc);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Sc(e,i)}function Sc(e,t){return t!==yc&&_c.set(e,t===bc),t}function Cc(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var wc,Tc=[],Ec={alloc(e,t,n){let r=wc;if(!r)return n;wc=void 0;let i={value:n,issues:null};return r.set(t.value,i),Tc.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Oc(n,e.value))throw new fc;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=xc(e,new Set,!1);if(i===vc)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===bc||r?n=!0:r=!0}let l=s.value;if(!hc(l))return t(s,c);let u=c[pc];u||(u={buckets:new WeakMap,backEdges:void 0},c[pc]=u);let d;i===c?d=a:(d=Cc(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...gc(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;wc=d;let p=Tc.length,m=t(s,c);wc=void 0;let h=Tc.length>p?Tc.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?gc(e.issues):mc),e)):(h&&(h.issues=m.issues.length?gc(m.issues):mc),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Dc(){return Ec}function Oc(e,t){let n=e[pc]?.backEdges;return n!==void 0&&hc(t)&&n.has(t)}var kc=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Bi(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${vi(e.values[0])}`:`Invalid option: expected one of ${qr(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${qr(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Ac(){return{localeError:kc()}}var jc,Mc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Nc(){return new Mc}(jc=globalThis).__zod_globalRegistry??(jc.__zod_globalRegistry=Nc());var Pc=globalThis.__zod_globalRegistry;function Fc(e){return e.checks&&=[...e.checks],e}function Ic(e,t){return new e(Fc({type:`string`,...B(t)}))}function Lc(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...B(t)})}function Rc(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...B(t)})}function zc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...B(t)})}function Bc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...B(t)})}function Vc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...B(t)})}function Hc(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...B(t)})}function Uc(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...B(t)})}function Wc(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...B(t)})}function Gc(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...B(t)})}function Kc(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...B(t)})}function qc(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...B(t)})}function Jc(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...B(t)})}function Yc(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...B(t)})}function Xc(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...B(t)})}function Zc(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...B(t)})}function Qc(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...B(t)})}function $c(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...B(t)})}function el(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...B(t)})}function tl(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...B(t)})}function nl(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...B(t)})}function rl(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...B(t)})}function il(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...B(t)})}function al(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...B(t)})}function ol(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...B(t)})}function sl(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...B(t)})}function cl(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...B(t)})}function ll(e,t){return new e(Fc({type:`number`,checks:[],...B(t)}))}function ul(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...B(t)})}function dl(e,t){return new e({type:`boolean`,...B(t)})}function fl(e,t){return new e({type:`null`,...B(t)})}function pl(e){return new e({type:`unknown`})}function ml(e,t){return new e({type:`never`,...B(t)})}function hl(e,t){return new bo({check:`less_than`,...B(t),value:e,inclusive:!1})}function gl(e,t){return new bo({check:`less_than`,...B(t),value:e,inclusive:!0})}function _l(e,t){return new xo({check:`greater_than`,...B(t),value:e,inclusive:!1})}function vl(e,t){return new xo({check:`greater_than`,...B(t),value:e,inclusive:!0})}function yl(e,t){return new So({check:`multiple_of`,...B(t),value:e})}function bl(e,t){return new wo({check:`max_length`,...B(t),maximum:e})}function xl(e,t){return new To({check:`min_length`,...B(t),minimum:e})}function Sl(e,t){return new Eo({check:`length_equals`,...B(t),length:e})}function Cl(e,t){return new Oo({check:`string_format`,format:`regex`,...B(t),pattern:e})}function wl(e){return new ko({check:`string_format`,format:`lowercase`,...B(e)})}function Tl(e){return new Ao({check:`string_format`,format:`uppercase`,...B(e)})}function El(e,t){return new jo({check:`string_format`,format:`includes`,...B(t),includes:e})}function Dl(e,t){return new Mo({check:`string_format`,format:`starts_with`,...B(t),prefix:e})}function Ol(e,t){return new No({check:`string_format`,format:`ends_with`,...B(t),suffix:e})}function kl(e){return new Po({check:`overwrite`,tx:e})}function Al(e){return kl(t=>t.normalize(e))}function jl(){return kl(e=>e.trim())}function Ml(){return kl(e=>e.toLowerCase())}function Nl(){return kl(e=>e.toUpperCase())}function Pl(){return kl(e=>li(e))}function Fl(e,t,n){return new e({type:`array`,element:t,...B(n)})}function Il(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B(n)})}function Ll(e,t){let n=Rl(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Vi(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Vi(r))}},e(t.value,t)),t);return n}function Rl(e,t){let n=new _o({check:`custom`,...B(t)});return n._zod.check=e,n}function zl(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&ei(e,t,n[t]);return e}function Bl(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Pc,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Vl(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function G(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,G(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&zl(o.schema,c),t.io===`input`&&K(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Hl(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Ul(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Hl(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Hl(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
55
55
|
|
|
56
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ul(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Ul(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Wl=new Set([`type`,`properties`,`required`,`additionalProperties`]),Gl=[`oneOf`,`anyOf`];function Kl(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ql(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Wl.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??Kl(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}ei(n,r,e.length===1?e[0]:ql(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=Kl(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Jl(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Wl)if(t in e)return;let n=t.filter(e=>Gl.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ql(t);else{let e=n[0],i=Gl.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ql([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Rl(e,r))}function Yl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Rl(i,s),Rl(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Ul(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Jl(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Rl(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,ei(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Zl(t,`input`,e.processors),output:Zl(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function q(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return q(r.element,n);if(r.type===`set`)return q(r.valueType,n);if(r.type===`lazy`)return q(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return q(r.innerType,n);if(r.type===`intersection`)return q(r.left,n)||q(r.right,n);if(r.type===`record`||r.type===`map`)return q(r.keyType,n)||q(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:q(r.in,n)||q(r.out,n);if(r.type===`object`){for(let e in r.shape)if(q(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(q(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(q(e,n))return!0;return!!(r.rest&&q(r.rest,n))}return!1}var Xl=(e,t={})=>n=>{let r=zl({...n,processors:t});return K(e,r),Hl(r,e),Yl(r,e)},Zl=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=zl({...i??{},target:a,io:t,processors:n});return K(e,o),Hl(o,e),Yl(o,e)},Ql=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},$l=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},eu=(e,t)=>{Ql(e,`minimum`,t),$l(e,`maximum`,t)},tu=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},nu=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},ru=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},iu=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},au=(e,t)=>Ql(e,`minimum`,t.minimum),ou=(e,t)=>$l(e,`maximum`,t.maximum),su=e=>(t,n)=>{iu(t,n.format);let[r,i]=e[n.format];Ql(t,`minimum`,r),$l(t,`maximum`,i)},cu={greater_than:(e,t)=>Ql(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>$l(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>tu(e,t.value),number_format:su(bi),bigint_format:su(xi),min_length:au,max_length:ou,length_equals:(e,t)=>eu(e,t.length),min_size:au,max_size:ou,size_equals:(e,t)=>eu(e,t.size),string_format:(e,t)=>{iu(e,t.format),t.pattern&&nu(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>ru(e,t.mime)};function lu(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)cu[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Ql(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Ql(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&$l(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&$l(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&tu(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&ru(t,i.mime);for(let e of i.patterns??[])nu(t,e);return t}var uu={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},du=new Map([[gs,eo],[vs,to]]),fu=e=>du.get(e)??e,pu=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=lu(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=uu[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(fu);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},mu=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=lu(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Bl(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},hu=(e,t,n,r)=>{n.type=`boolean`},gu=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},_u=(e,t,n,r)=>{n.not={}},vu=(e,t,n,r)=>{let i=e._zod.def,a=Kr(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},yu=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Bl(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Bl(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},bu=(e,t,n,r)=>{Bl(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},xu=(e,t,n,r)=>{Bl(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Su=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=lu(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=K(a.element,t,{...r,path:[...r.path,`items`]})};function Cu(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Cu(t.out):t.type===`catch`?Cu(t.innerType):e._zod.optin}var wu=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Bl(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)ei(i.properties,e,K(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Cu(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=K(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Tu=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>K(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Eu=(e,t,n,r)=>{let i=e._zod.def,a=K(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=K(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Du=(e,t,n,r)=>{let i=e._zod.def,a=K(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ou=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ku=Symbol();function Au(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Bl(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),ku):JSON.parse(o)}var ju=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Au(i.defaultValue,e,t,n,r);o!==ku&&(n.default=o)},Mu=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Au(i.defaultValue,e,t,n,r);o!==ku&&(n._prefault=o)},Nu=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Bl(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Pu=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;K(o,t,r);let s=t.seen.get(e);s.ref=o},Fu=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Iu=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Lu=new WeakSet([Object.prototype,Error.prototype]);function Ru(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var zu=H(`ZodError`,(e,t)=>{ma.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Lu.has(n)||(Lu.add(n),Ru(n,`format`,e=>t=>_a(e,t)),Ru(n,`flatten`,e=>t=>ga(e,t)),Ru(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Jr,2)}),Ru(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Jr,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Bu=ya(zu),Vu=ba(zu),Hu=xa(zu),Uu=Ca(zu),Wu=ka(zu),Gu=Aa(zu),Ku=ja(zu),qu=Ma(zu),Ju=Na(zu),Yu=Pa(zu),Xu=Fa(zu),Zu=Ia(zu);function Qu(){oa.localeError||sa(kc())}function $u(){oa.memoizer||sa({memoizer:Ec()})}var J=H(`ZodType`,(e,t)=>(Qu(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(si(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return _i(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(vf(e,t))},superRefine(e,t){return this.check(yf(e,t))},overwrite(e){return this.check(Ol(e))},optional(){return $d(this)},exactOptional(){return tf(this)},nullable(){return rf(this)},nullish(){return $d(rf(this))},nonoptional(e){return uf(this,e)},array(){return zd(this)},or(e){return Hd([this,e])},and(e){return Kd(this,e)},transform(e){return mf(this,Zd(e))},default(e){return of(this,e)},prefault(e){return cf(this,e)},catch(e){return ff(this,e)},pipe(e){return mf(this,e)},readonly(){return gf(this)},describe(e){let t=this.clone();return Nc.add(t,{description:e}),t},meta(...e){if(e.length===0)return Nc.get(this);let t=this.clone();return Nc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Wi(this,`~standard`,{...Ro(this),jsonSchema:{input:Zl(this,`input`),output:Zl(this,`output`)}})},set"~standard"(e){Ui(this,`~standard`,e)},parse:function e(t,n){return Bu(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Vu(this,t,n,{callee:e})},safeParse(e,t){return Hu(this,e,t)},async safeParseAsync(e,t){return Uu(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ui(this,`spa`,e)},validate(e,t){return Ea(this,e,t)},validateAsync(e,t){return Oa(this,e,t)},encode:function e(t,n){return Wu(this,t,n,{callee:e})},decode:function e(t,n){return Gu(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ku(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await qu(this,t,n,{callee:e})},safeEncode(e,t){return Ju(this,e,t)},safeDecode(e,t){return Yu(this,e,t)},async safeEncodeAsync(e,t){return Xu(this,e,t)},async safeDecodeAsync(e,t){return Zu(this,e,t)},toJSONSchema(e){return Xl(this,{})(e)},get description(){return Nc.get(this)?.description},get _def(){return this._zod.def}}),ed=H(`_ZodString`,(e,t)=>{zo.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pu(e,t,n,r)},Gi({format:e=>lu(e).format??null,minLength:e=>lu(e).minimum??null,maxLength:e=>lu(e).maximum??null},{regex(...e){return this.check(Sl(...e))},includes(...e){return this.check(Tl(...e))},startsWith(...e){return this.check(El(...e))},endsWith(...e){return this.check(Dl(...e))},min(...e){return this.check(bl(...e))},max(...e){return this.check(yl(...e))},length(...e){return this.check(xl(...e))},nonempty(...e){return this.check(bl(1,...e))},lowercase(e){return this.check(Cl(e))},uppercase(e){return this.check(wl(e))},trim(){return this.check(Al())},normalize(...e){return this.check(kl(...e))},toLowerCase(){return this.check(jl())},toUpperCase(){return this.check(Ml())},slugify(){return this.check(Nl())}})),td=H(`ZodString`,(e,t)=>{zo.init(e,t),ed.init(e,t)},{email(e){return this.check(Ic(od,e))},url(e){return this.check(Hc(ud,e))},jwt(e){return this.check(rl(Td,e))},emoji(e){return this.check(Uc(dd,e))},guid(e){return this.check(Lc(sd,e))},uuid(e){return this.check(Rc(cd,e))},uuidv4(e){return this.check(zc(cd,e))},uuidv6(e){return this.check(Bc(cd,e))},uuidv7(e){return this.check(Vc(cd,e))},nanoid(e){return this.check(Wc(fd,e))},cuid(e){return this.check(Gc(pd,e))},cuid2(e){return this.check(Kc(md,e))},ulid(e){return this.check(qc(hd,e))},base64(e){return this.check(el(Sd,e))},base64url(e){return this.check(tl(Cd,e))},xid(e){return this.check(Jc(gd,e))},ksuid(e){return this.check(Yc(_d,e))},ipv4(e){return this.check(Xc(vd,e))},ipv6(e){return this.check(Zc(yd,e))},cidrv4(e){return this.check(Qc(bd,e))},cidrv6(e){return this.check($c(xd,e))},e164(e){return this.check(nl(wd,e))},datetime(e){return this.check(il(nd,e))},date(e){return this.check(al(rd,e))},time(e){return this.check(ol(id,e))},duration(e){return this.check(sl(ad,e))}});function Y(e){return Fc(td,e)}var X=H(`ZodStringFormat`,(e,t)=>{G.init(e,t),ed.init(e,t)}),nd=H(`ZodISODateTime`,(e,t)=>{is.init(e,t),X.init(e,t)}),rd=H(`ZodISODate`,(e,t)=>{as.init(e,t),X.init(e,t)}),id=H(`ZodISOTime`,(e,t)=>{os.init(e,t),X.init(e,t)}),ad=H(`ZodISODuration`,(e,t)=>{ss.init(e,t),X.init(e,t)}),od=H(`ZodEmail`,(e,t)=>{Ho.init(e,t),X.init(e,t)}),sd=H(`ZodGUID`,(e,t)=>{Bo.init(e,t),X.init(e,t)}),cd=H(`ZodUUID`,(e,t)=>{Vo.init(e,t),X.init(e,t)});function ld(e){return Rc(cd,e)}var ud=H(`ZodURL`,(e,t)=>{Xo.init(e,t),X.init(e,t)}),dd=H(`ZodEmoji`,(e,t)=>{Zo.init(e,t),X.init(e,t)}),fd=H(`ZodNanoID`,(e,t)=>{Qo.init(e,t),X.init(e,t)}),pd=H(`ZodCUID`,(e,t)=>{$o.init(e,t),X.init(e,t)}),md=H(`ZodCUID2`,(e,t)=>{es.init(e,t),X.init(e,t)}),hd=H(`ZodULID`,(e,t)=>{ts.init(e,t),X.init(e,t)}),gd=H(`ZodXID`,(e,t)=>{ns.init(e,t),X.init(e,t)}),_d=H(`ZodKSUID`,(e,t)=>{rs.init(e,t),X.init(e,t)}),vd=H(`ZodIPv4`,(e,t)=>{cs.init(e,t),X.init(e,t)}),yd=H(`ZodIPv6`,(e,t)=>{ds.init(e,t),X.init(e,t)}),bd=H(`ZodCIDRv4`,(e,t)=>{fs.init(e,t),X.init(e,t)}),xd=H(`ZodCIDRv6`,(e,t)=>{ms.init(e,t),X.init(e,t)}),Sd=H(`ZodBase64`,(e,t)=>{_s.init(e,t),X.init(e,t)}),Cd=H(`ZodBase64URL`,(e,t)=>{bs.init(e,t),X.init(e,t)}),wd=H(`ZodE164`,(e,t)=>{xs.init(e,t),X.init(e,t)}),Td=H(`ZodJWT`,(e,t)=>{Cs.init(e,t),X.init(e,t)}),Ed=H(`ZodNumber`,(e,t)=>{ws.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mu(e,t,n,r),e.isFinite=!0},Gi({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=lu(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=lu(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=lu(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>lu(e).format??null},{gt(e,t){return this.check(gl(e,t))},gte(e,t){return this.check(_l(e,t))},min(e,t){return this.check(_l(e,t))},lt(e,t){return this.check(ml(e,t))},lte(e,t){return this.check(hl(e,t))},max(e,t){return this.check(hl(e,t))},int(e){return this.check(kd(e))},safe(e){return this.check(kd(e))},positive(e){return this.check(gl(0,e))},nonnegative(e){return this.check(_l(0,e))},negative(e){return this.check(ml(0,e))},nonpositive(e){return this.check(hl(0,e))},multipleOf(e,t){return this.check(vl(e,t))},step(e,t){return this.check(vl(e,t))},finite(){return this}}));function Dd(e){return cl(Ed,e)}var Od=H(`ZodNumberFormat`,(e,t)=>{Ts.init(e,t),Ed.init(e,t)});function kd(e){return ll(Od,e)}var Ad=H(`ZodBoolean`,(e,t)=>{Es.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hu(e,t,n,r)});function jd(e){return ul(Ad,e)}var Md=H(`ZodNull`,(e,t)=>{Ds.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gu(e,t,n,r)});function Nd(e){return dl(Md,e)}var Pd=H(`ZodUnknown`,(e,t)=>{Os.init(e,t),J.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Fd(){return fl(Pd)}var Id=H(`ZodNever`,(e,t)=>{ks.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_u(e,t,n,r)});function Ld(e){return pl(Id,e)}var Rd=H(`ZodArray`,(e,t)=>{$u(),js.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Su(e,t,n,r),e.element=t.element},{min(e,t){return this.check(bl(e,t))},nonempty(e){return this.check(bl(1,e))},max(e,t){return this.check(yl(e,t))},length(e,t){return this.check(xl(e,t))},unwrap(){return this.element}});function zd(e,t){return Pl(Rd,e,t)}var Bd=H(`ZodObject`,(e,t)=>{$u(),Ls.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wu(e,t,n,r),Zi(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Jd(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(si(this._zod.def,{catchall:e}))},passthrough(){return this.clone(si(this._zod.def,{catchall:Fd()}))},loose(){return this.clone(si(this._zod.def,{catchall:Fd()}))},strict(){return this.clone(si(this._zod.def,{catchall:Ld()}))},strip(){return this.clone(si(this._zod.def,{catchall:void 0}))},extend(e){return Ti(this,e)},safeExtend(e){return Di(this,e)},merge(e){return Oi(this,e)},pick(e){return Si(this,e)},omit(e){return wi(this,e)},partial(...e){return ki(Qd,this,e[0])},exactPartial(...e){return ki(ef,this,e[0],`exactPartial`)},required(...e){return Ai(lf,this,e[0])}});function Z(e,t){return new Bd({type:`object`,shape:e,catchall:Ld(),...B(t)})}var Vd=H(`ZodUnion`,(e,t)=>{zs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tu(e,t,n,r),e.options=t.options});function Hd(e,t){return new Vd({type:`union`,options:e,...B(t)})}var Ud=H(`ZodDiscriminatedUnion`,(e,t)=>{Vd.init(e,t),Vs.init(e,t)});function Wd(e,t,n){return new Ud({type:`union`,options:t,discriminator:e,...B(n)})}var Gd=H(`ZodIntersection`,(e,t)=>{Hs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eu(e,t,n,r)});function Kd(e,t){return new Gd({type:`intersection`,left:e,right:t})}var qd=H(`ZodEnum`,(e,t)=>{Gs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vu(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new qd({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new qd({...t,checks:[],...B(r),entries:i})}});function Jd(e,t){return new qd({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}var Yd=H(`ZodLiteral`,(e,t)=>{Ks.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yu(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Q(e,t){return new Yd({type:`literal`,values:Array.isArray(e)?e:[e],...B(t)})}var Xd=H(`ZodTransform`,(e,t)=>{$u(),qs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xu(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new aa(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Vi(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Vi(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zd(e){return new Xd({type:`transform`,transform:e})}var Qd=H(`ZodOptional`,(e,t)=>{Ys.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $d(e){return new Qd({type:`optional`,innerType:e})}var ef=H(`ZodExactOptional`,(e,t)=>{Xs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tf(e){return new ef({type:`optional`,innerType:e})}var nf=H(`ZodNullable`,(e,t)=>{Zs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Du(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rf(e){return new nf({type:`nullable`,innerType:e})}var af=H(`ZodDefault`,(e,t)=>{Qs.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ju(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function of(e,t){return new af({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():mi(t)}})}var sf=H(`ZodPrefault`,(e,t)=>{ec.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cf(e,t){return new sf({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():mi(t)}})}var lf=H(`ZodNonOptional`,(e,t)=>{tc.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ou(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uf(e,t){return new lf({type:`nonoptional`,innerType:e,...B(t)})}var df=H(`ZodCatch`,(e,t)=>{ic.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ff(e,t){return new df({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:$i(t)})}var pf=H(`ZodPipe`,(e,t)=>{ac.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pu(e,t,n,r),e.in=t.in,e.out=t.out});function mf(e,t){return new pf({type:`pipe`,in:e,out:t})}var hf=H(`ZodReadonly`,(e,t)=>{sc.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gf(e){return new hf({type:`readonly`,innerType:e})}var _f=H(`ZodCustom`,(e,t)=>{lc.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bu(e,t,n,r)});function vf(e,t={}){return Fl(_f,e,t)}function yf(e,t){return Il(e,t)}function bf(e){return il(nd,e)}var xf=Y().min(1).refine(e=>!e.includes(`\0`)&&!/[\uD800-\uDFFF]/u.test(e),`Paths must be lossless Unicode strings without NUL.`),Sf=xf.refine(e=>!e.startsWith(`/`)&&!/^[A-Za-z]:/.test(e)&&!(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`).some(e=>e===`.`||e===`..`||e===``)),Cf=Y().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/).refine(e=>!/^0+$/.test(e)),wf=Z({commitChanged:jd(),trackedChanges:jd(),untrackedChanges:jd()}).nullable(),Tf=Sf.refine(e=>!e.endsWith(`/`)),Ef=Wd(`kind`,[Z({kind:Q(`tracked`),path:Tf,xy:Y().regex(/^[.MTAD]{2}$/).refine(e=>e!==`..`),submodule:wf}),Z({kind:Q(`unmerged`),path:Tf,xy:Jd([`DD`,`AU`,`UD`,`UA`,`DU`,`AA`,`UU`]),submodule:wf}),Z({kind:Q(`untracked`),path:Sf,xy:Nd(),submodule:Nd()})]),Df=Hd([Z({contract:Q(`repository-status`),version:Q(1),ok:Q(!0),observation:Z({id:ld(),startedAt:bf(),completedAt:bf(),consistency:Q(`best-effort`)}),repository:Z({key:Y().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:Y().regex(/^worktree:[0-9a-f]{64}$/),rootPath:xf.refine(e=>e.startsWith(`/`)||/^[A-Za-z]:[/\\]/.test(e)||e.startsWith(`\\\\`)),objectFormat:Jd([`sha1`,`sha256`])}),head:Wd(`state`,[Z({state:Q(`branch`),branch:xf,commit:Cf}),Z({state:Q(`detached`),branch:Nd(),commit:Cf}),Z({state:Q(`unborn`),branch:xf,commit:Nd()})]),changes:zd(Ef),summary:Z({staged:kd().nonnegative(),unstaged:kd().nonnegative(),untracked:kd().nonnegative(),conflicted:kd().nonnegative()}),checks:Z({state:Q(`not-run`),reason:Q(`git-status-only`)})}).superRefine((e,t)=>{e.head.commit&&e.head.commit.length!==(e.repository.objectFormat===`sha1`?40:64)&&t.addIssue({code:`custom`,message:`Object ID does not match objectFormat.`,path:[`head`,`commit`]});let n=new Set,r={staged:0,unstaged:0,untracked:0,conflicted:0};for(let i of e.changes)n.has(i.path)&&t.addIssue({code:`custom`,message:`Duplicate path.`,path:[`changes`]}),n.add(i.path),i.kind===`unmerged`?r.conflicted++:i.kind===`untracked`?r.untracked++:(i.xy[0]!==`.`&&r.staged++,i.xy[1]!==`.`&&r.unstaged++);for(let n of[`staged`,`unstaged`,`untracked`,`conflicted`])e.summary[n]!==r[n]&&t.addIssue({code:`custom`,message:`Summary does not match changes.`,path:[`summary`,n]})}),Z({contract:Q(`repository-status`),version:Q(1),ok:Q(!1),error:Z({code:Jd([`GIT_NOT_FOUND`,`GIT_CONTEXT_OVERRIDE`,`NOT_A_REPOSITORY`,`UNSUPPORTED_REPOSITORY`,`GIT_UNSUPPORTED`,`GIT_FAILED`,`INVALID_GIT_OUTPUT`,`UNSUPPORTED_PATH_ENCODING`,`REPOSITORY_CHANGED`,`READ_LIMIT_EXCEEDED`]),message:Y().min(1)})})]),Of=Z({contract:Q(`browser-session`),version:Q(1),sessionId:ld(),repository:Z({key:Y().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:Y().regex(/^worktree:[0-9a-f]{64}$/)})}),kf=Z({contract:Q(`browser-http-error`),version:Q(1),error:Z({code:Jd([`BAD_REQUEST`,`FORBIDDEN`,`NOT_FOUND`,`METHOD_NOT_ALLOWED`,`SESSION_CHANGED`,`SERVER_CLOSING`,`INTERNAL_ERROR`]),message:Y().min(1)})});Wd(`ok`,[Z({contract:Q(`project-init`),version:Q(4),ok:Q(!0),outcome:Jd([`planned`,`created`,`already-initialized`]),rootPath:Y(),configPath:Q(`.gitifact/config.json`),schemaVersion:Q(1),baseline:Wd(`kind`,[Z({kind:Q(`empty`)}),Z({kind:Q(`commit`),objectFormat:Jd([`sha1`,`sha256`]),commit:Y()})]),agentDocs:Z({mode:Jd([`install`,`remove`,`skip`]),paths:zd(Y())})}),Z({contract:Q(`project-init`),version:Q(4),ok:Q(!1),error:Z({code:Y(),message:Y()})})]);var Af=Z({id:Y(),title:Y(),body:Y()}),jf=Z({email:Y(),name:Y(),commits:Dd().int().nonnegative(),latest:Y()}),Mf=Z({id:Y(),path:Y(),title:Y(),description:Y(),requirements:zd(Af),design:Z({title:Y(),body:Y(),requirements:zd(Y())}).optional(),contributors:zd(jf),updatedAt:Y().nullable()}),Nf=Af.extend({specId:Y(),path:Y()}).nullable(),Pf=Z({id:Y(),kind:Jd([`product`,`guide`]),path:Y(),title:Y(),body:Y(),updatedAt:Y().nullable()}),Ff=Z({contract:Q(`browser-specs`),version:Q(1),sessionId:Y(),head:Y().nullable(),observedAt:Y(),working:jd(),features:zd(Mf),documents:zd(Pf).default([]),events:zd(Z({key:Y(),commit:Y(),date:Y(),author:Y(),email:Y(),committer:Y(),message:Y(),id:Y(),kind:Jd([`requirement`,`design`,`product`,`guide`]).optional(),types:zd(Jd([`created`,`modified`,`moved`,`deleted`])),before:Nf,after:Nf,reasons:zd(Y())})),contributors:zd(jf),contributorsLimited:jd(),nextCursor:Dd().int().nonnegative().nullable(),boundary:jd()}),If=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`ApiError`}};async function Lf(e,t={}){let n;try{n=await fetch(e,{...t,cache:`no-store`})}catch(e){throw e instanceof Error&&e.name===`AbortError`?e:new If(`로컬 서버에 연결하지 못했습니다. 서버 실행 상태를 확인하세요.`,`NETWORK_ERROR`)}try{return{response:n,data:await n.json()}}catch{throw new If(`서버 응답 형식을 확인할 수 없습니다. CLI와 브라우저 버전을 확인하세요.`,`INVALID_RESPONSE`)}}var Rf=[`browser-session`,1,window.location.origin];function zf(e){let t=kf.safeParse(e);throw t.success?new If(t.data.error.message,t.data.error.code):new If(`서버 응답이 지원하는 계약과 일치하지 않습니다.`,`INVALID_RESPONSE`)}var Bf=()=>Tr({queryKey:Rf,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!0,queryFn:async({signal:e})=>{let{response:t,data:n}=await Lf(`/api/v1/session`,{signal:e});if(!t.ok)return zf(n);let r=Of.safeParse(n);if(!r.success)throw new If(`서버 세션 형식이 호환되지 않습니다.`,`INVALID_RESPONSE`);return r.data}});function Vf(e){return[`repository-status`,1,window.location.origin,e.sessionId,e.repository.key,e.repository.worktreeKey]}async function Hf(e,t,n){let{response:r,data:i}=await Lf(`/api/v1/status`+(t?`/refresh`:``),{method:t?`POST`:`GET`,headers:{"X-Gitifact-Session":e.sessionId},...n?{signal:n}:{}}),a=Df.safeParse(i);if(!a.success)return zf(i);if(!a.data.ok)throw new If(a.data.error.message,a.data.error.code);if(!r.ok)throw new If(`서버 상태와 응답 결과가 일치하지 않습니다.`,`INVALID_RESPONSE`);if(a.data.repository.key!==e.repository.key||a.data.repository.worktreeKey!==e.repository.worktreeKey)throw new If(`다른 checkout의 응답입니다. 다시 연결하세요.`,`SESSION_CHANGED`);return a.data}var Uf=e=>Tr({queryKey:Vf(e),staleTime:5e3,retry:!1,queryFn:({signal:t})=>Hf(e,!1,t)}),Wf=e=>Hf(e,!0);function Gf(){let e=wr(Bf());return e.data?(0,I.jsx)(Kf,{session:e.data}):(0,I.jsx)(j,{type:`supporting`,color:`secondary`,children:`로컬 프로젝트`})}function Kf({session:e}){let t=wr(Uf(e)).data?.repository.rootPath;return(0,I.jsx)(j,{type:`supporting`,color:`secondary`,children:t?.split(/[\/]/).filter(Boolean).at(-1)??`로컬 프로젝트`})}var qf=e=>Er({queryKey:[`browser-specs`,1,window.location.origin,e.sessionId,e.repository.worktreeKey],initialPageParam:{cursor:0,head:``},staleTime:5e3,retry:!1,queryFn:async({signal:t,pageParam:n})=>{let{response:r,data:i}=await Lf(`/api/v1/specs`+(n.cursor?`?cursor=${n.cursor}&head=${n.head}`:``),{signal:t,headers:{"X-Gitifact-Session":e.sessionId}});if(!r.ok)return zf(i);let a=Ff.safeParse(i);if(!a.success)throw new If(`명세 응답 형식이 호환되지 않습니다.`,`INVALID_RESPONSE`);if(a.data.sessionId!==e.sessionId)throw new If(`서버가 변경됐습니다. 다시 연결하세요.`,`SESSION_CHANGED`);return a.data},getNextPageParam:e=>e.nextCursor===null?void 0:{cursor:e.nextCursor,head:e.head??``}}),Jf={contract:`browser-session`,version:1,sessionId:``,repository:{key:``,worktreeKey:``}},Yf=/^\.(?:gitifact|tryce)\//;function Xf(){let e=wr(Bf()),t=Dr({...qf(e.data??Jf),enabled:!1}),n=wr({...Uf(e.data??Jf),enabled:!!e.data&&!e.error}),r=t.data?.pages[0]?.working,i=n.data?n.data.changes.some(e=>Yf.test(e.path)):void 0;if(r!==void 0||i!==void 0)return!!r||!!i}function Zf({data:e,size:t}){return(0,I.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`${t/16}rem`,height:`${t/16}rem`,style:{flexShrink:0},fill:`none`,"aria-hidden":`true`,focusable:`false`,children:e.map(([e,t],n)=>(0,F.createElement)(e,{...t,key:n}))})}var Qf={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k9WMMc:`x2b8uid`,kOIVth:`x18g69wz`,k8WAf4:`xmfvnks`,kg3NbH:`xm7rs69`,$$css:!0},containerCompact:{kOIVth:`x1txdalj`,k8WAf4:`x1na6nto`,kg3NbH:`x1pzlopt`,$$css:!0}};function $f({title:e,description:n,icon:r,actions:i,headingLevel:a=3,isCompact:o=!1,xstyle:c,className:l,style:u,ref:d,...f}){let p=`h${a}`;return(0,I.jsxs)(`div`,{ref:d,...f,role:`status`,...g(s(`empty-state`,{variant:o?`compact`:null}),t(Qf.container,o&&Qf.containerCompact,c),l,u),children:[r!=null&&(0,I.jsx)(`div`,{"aria-hidden":`true`,children:r}),(0,I.jsxs)(`div`,{className:`x78zum5 xdt5ytf x6s0dn4 xxc7z9f`,children:[(0,F.createElement)(p,g(s(`empty-state-title`,{variant:o?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0`},1:{className:`x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib`}}[!!o<<0]),e),n!=null&&(0,I.jsx)(`div`,{...g(s(`empty-state-description`,{variant:o?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4`},1:{className:`x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d`}}[!!o<<0]),children:n})]}),i!=null&&(0,I.jsx)(`div`,{...{0:{className:`x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d`},1:{className:`x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf`}}[!!o<<0],children:i})]})}$f.displayName=`EmptyState`;function ep({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,I.jsx)(Wr,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}ep.displayName=`HStack`;function tp(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&e.key!==` `}function np(e){let{getItemLabels:t,onMatch:n,getCurrentIndex:r,resetMs:i=750,isDisabled:a}=e,o=(0,F.useRef)(``),s=(0,F.useRef)(void 0),c=(0,F.useCallback)(()=>{o.current=``,s.current&&=(clearTimeout(s.current),void 0)},[]),l=(0,F.useCallback)(()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=``,s.current=void 0},i)},[i]);return{onKeyDown:(0,F.useCallback)(e=>{let i=e.key===` `&&!e.ctrlKey&&!e.metaKey&&o.current.length>0;if(!tp(e)&&!i)return!1;let s=t();if(s.length===0)return!1;let c=e.key.toLowerCase(),u=o.current.length>0&&o.current.split(``).every(e=>e===c)?c:o.current+c;o.current=u,l();let d=r?.()??-1,f=s.length,p=d>=0,m=p?d:0,h=p&&u.length===1?1:0;for(let e=0;e<f;e++){let t=(m+h+e+f)%f;if(a?.(t))continue;let r=s[t];if(r!=null&&r.trim().toLowerCase().startsWith(u))return n(t),!0}return!0},[t,n,r,l,a]),reset:c}}var rp=500,ip=10;function ap(e){let{onLongPress:t,disabled:n=!1,delayMs:r=rp,moveCancelPx:i=ip}=e,a=(0,F.useRef)(null),o=(0,F.useRef)(null),s=(0,F.useRef)(t);s.current=t;let c=(0,F.useCallback)(()=>{a.current!=null&&(clearTimeout(a.current),a.current=null),o.current=null},[]),l=(0,F.useCallback)(e=>{if(n)return;if(e.touches.length!==1){c();return}let t=e.touches[0];c(),o.current={x:t.clientX,y:t.clientY},a.current=setTimeout(()=>{let e=o.current;e!=null&&s.current({x:e.x,y:e.y})},r)},[n,r,c]),u=(0,F.useCallback)(e=>{let t=o.current;if(t==null)return;if(e.touches.length!==1){c();return}let n=e.touches[0];(Math.abs(n.clientX-t.x)>i||Math.abs(n.clientY-t.y)>i)&&c()},[i,c]);return(0,F.useEffect)(()=>c,[c]),{onTouchStart:l,onTouchMove:u,onTouchEnd:c,onTouchCancel:c}}var op={horizontal:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kzqmXN:`xh8yej3`,$$css:!0},vertical:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kZKoxP:`x5yr21d`,$$css:!0}},sp={horizontalLine:{kZKoxP:`xsyqizj`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},verticalLine:{kzqmXN:`xjk4fl7`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},subtle:{kWkggS:`x1m4xfpy`,$$css:!0},strong:{kWkggS:`x7njt3n`,$$css:!0}},cp={horizontal:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,kzqmXN:`xx6qvi6`,$$css:!0},vertical:{keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,kZKoxP:`x12qplqi`,$$css:!0}};function lp({orientation:e=`horizontal`,label:n,variant:r=`subtle`,isFullBleed:i=!1,xstyle:a,className:o,style:c,ref:l,"aria-label":u,"aria-labelledby":d,...f}){let p=e===`horizontal`,m=(0,F.useId)(),h=d??(n&&u==null?m:void 0);return(0,I.jsxs)(`div`,{ref:l,...f,role:`separator`,"aria-orientation":e,"aria-label":u,"aria-labelledby":h,...g(s(`divider`,{variant:r,orientation:e}),t(p?op.horizontal:op.vertical,i&&(p?cp.horizontal:cp.vertical),a),o,c),children:[(0,I.jsx)(`div`,{...t(p?sp.horizontalLine:sp.verticalLine,sp[r])}),n&&(0,I.jsx)(`div`,{id:m,...{0:{className:`x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4`},1:{className:`x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82`}}[!p<<0],children:n}),n&&(0,I.jsx)(`div`,{...t(p?sp.horizontalLine:sp.verticalLine,sp[r])})]})}lp.displayName=`Divider`;var up=(0,F.createContext)(null);up.displayName=`ItemDescriptionContext`;var dp=new Set([`option`,`tab`,`row`,`gridcell`,`columnheader`,`rowheader`,`treeitem`]),$={root:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kg3NbH:`xf314gf`,kVAEAm:`x1n2onr6`,kB7OPa:`x9f619`,k9WMMc:`x1yc453h`,kaIpWk:`xh6dtrn`,$$css:!0},alignStart:{kGNEyG:`x1cy8zhl`,$$css:!0},interactive:{kkrTdU:`x1ypdohk x16khyan`,k1ekBW:`x15406qy`,kIyJzY:`xkvfbh3`,kAMwcw:`xlr8y92`,$$css:!0},highlighted:{kWkggS:`x1lmrjuc`,$$css:!0},selected:{kWkggS:`xgcxg3y`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kfzvcC:`x47corl`,$$css:!0},inlineLabel:{kmuXW:`x2lah0s`,$$css:!0},inlineDescription:{kmuXW:`xs83m0k`,k7Eaqz:`xeuugli`,$$css:!0},label:{kMwMTN:`x5tbw38`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},labelSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},labelMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0},description:{kMwMTN:`x1gb3s7i`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},descriptionSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},descriptionMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},fp={lineClamp:e=>[{kJFfOR:e==null?e:`x1yhjpo9`,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},pp={compact:{k8WAf4:`xu0wf1k`,$$css:!0},balanced:{k8WAf4:`xce4md1`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`xrrkdod`,$$css:!0}};function mp({as:e=`div`,marker:n,startContent:r,label:i,description:a,endContent:o,align:c=`center`,density:l=`balanced`,labelLines:u,descriptionLines:d,layout:f=`stacked`,onClick:p,interactiveRef:m,href:h,target:_,rel:v,isHighlighted:y=!1,isSelected:b=!1,isDisabled:x=!1,xstyle:S,className:C,style:T,ref:E,role:D,...ee}){let O=re(),A=m!=null,te=(0,F.useRef)(null),{onClick:j}=ve({containerRef:te,interactiveRef:m??void 0,disabled:x});P(`Item`,"`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",A&&(p!=null||h!=null));let ne=p!=null||h!=null||A,{target:ie,rel:ae}=we(_,v),N=D!=null,oe=D!=null&&dp.has(D),se=(0,F.useId)(),ce=fe(a),le=typeof i==`string`,ue=typeof a==`string`,de=u==null?le?$.labelSingleTruncate:null:u===1?$.labelSingleTruncate:$.labelMultiTruncate,L=f===`inline`&&a!=null,R=d==null?ue||L?$.descriptionSingleTruncate:null:d===1?$.descriptionSingleTruncate:$.descriptionMultiTruncate,pe=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{...t($.label,L&&$.inlineLabel,de,u!=null&&u>1&&fp.lineClamp(u)),children:i}),a!=null&&(0,I.jsx)(`span`,{id:ce?se:void 0,...t($.description,L&&$.inlineDescription,R,d!=null&&d>1&&fp.lineClamp(d)),children:a})]}),me=e=>{x||e.target.closest(`button, a, input, select, textarea`)||p?.(e)},he=(0,I.jsxs)(I.Fragment,{children:[n,r!=null&&(0,I.jsx)(`span`,{className:`x3psx0u x78zum5`,children:r}),N||A?(0,I.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}):h==null?p==null?(0,I.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}):(0,I.jsx)(`button`,{type:`button`,onClick:p,disabled:x,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}):(0,I.jsx)(O,{href:h,target:ie,rel:ae,"aria-disabled":x||void 0,tabIndex:x?-1:void 0,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}),o!=null&&(0,I.jsx)(`span`,{...{0:{className:`x3psx0u x78zum5 xvc5jky`},1:{className:`x3psx0u x78zum5 xvc5jky xbyyjgo`}}[!!x<<0],children:o})]}),ge=k(E,te);return(0,I.jsx)(e,{ref:A?ge:E,...ee,"aria-selected":oe&&b||void 0,"aria-current":ee[`aria-current`]??(b&&!oe?!0:void 0),"aria-disabled":x||void 0,...g(s(`item`,{density:l,align:c}),w.focusWithin($.root,pp[l],c===`start`&&$.alignStart,ne&&$.interactive,ne&&M.backgroundColor,y&&$.highlighted,b&&$.selected,x&&!N&&$.disabled,S),C,T),role:D,onClick:A?j:N?p:ne?me:void 0,children:(0,I.jsx)(up,{value:ce?se:null,children:he})})}mp.displayName=`Item`;var hp=`(max-width: 768px) and (pointer: coarse)`;function gp(e){let t=v(hp);return e===`adaptive`?t?`bottom-sheet`:`popover`:e}function _p(e){let t=0,n=0,r=[];for(let i of e){let e=i.width;if(e?.type===`pixel`)n+=e.value;else{let n=e?.value??1,a=e==null?0:e.minWidth??120;t+=n,r.push({key:i.key,proportion:n,minWidth:a})}}let i=0;if(t>0)for(let e of r){let n=e.minWidth*t/e.proportion;n>i&&(i=n)}let a=n+i,o=new Map;for(let n of e){let e=n.width,r={};if(e?.type===`pixel`)r.width=`${e.value}px`,r.minWidth=`${e.value}px`;else{let n=e?.value??1;t>0&&(r.width=`${n/t*100}%`),e!=null&&(r.minWidth=`${e.minWidth??120}px`)}o.set(n.key,{style:r})}return{columns:o,tableMinWidth:a}}function vp(e=1,t){return{type:`proportional`,value:e,minWidth:t?.minWidth??120}}function yp(e){return{type:`pixel`,value:e}}function bp(e){if(e.length===0)return e;let t=L(e);return t.toUpperCase()+e.slice(t.length)}function xp(e,t){let n=e[t];return n==null?``:n instanceof Date?n.toISOString():typeof n==`string`||typeof n==`number`||typeof n==`boolean`||typeof n==`bigint`?String(n):``}function Sp(e){return e==null?0:typeof e==`string`?e.length:typeof e==`number`||typeof e==`boolean`?String(e).length:0}function Cp(e){if(e==null||typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`)return 0;let t=String(e),n=0,r=0;for(let e=0;e<=t.length;e++)e===t.length||t[e]===` `||t[e]===` `||t[e]===`
|
|
57
|
-
`?(r>n&&(n=r),r=0):r++;return n}var wp=60,Tp=8;function Ep(e){if(e.length===0)return[];let t=e[0],n=Object.keys(t),r=e.slice(0,Math.min(5,e.length));return n.map(e=>{let t=bp(e).length,n=t,i=t;for(let t of r){let r=Sp(t[e]);r>n&&(n=r);let a=Cp(t[e]);a>i&&(i=a)}return{key:e,headerLen:t,maxContentLen:n,maxWordLen:i}}).map(e=>{let t=e.maxContentLen<=6?1:e.maxContentLen<=15?2:3,n=Math.max(Math.max(e.headerLen,e.maxWordLen)*Tp,wp);return{key:e.key,header:bp(e.key),width:vp(t,{minWidth:n})}})}var Dp=(0,F.createContext)(null);Dp.displayName=`ListContext`;var Op={list:{kogj98:`x1ghz6dp`,kZCmMZ:`x1c1uobl`,kH6xsr:`x3ct3a4`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,$$css:!0},withDividers:{kOIVth:`xxhr3t`,$$css:!0},withCounter:{kt6KFK:`xif0320`,$$css:!0}},kp={kt6KFK:`x1khind5`,$$css:!0},Ap={counterStart:e=>[kp,{"--x-counterReset":`astryx-list ${e}`==null?void 0:`astryx-list ${e}`}]};function jp({children:e,density:n=`balanced`,hasDividers:r=!1,header:i,listStyle:a=`none`,start:o,xstyle:c,className:l,style:u,"data-testid":d,ref:f,...p}){let m=(0,F.useId)(),h=a===`decimal`,_=h?`ol`:`ul`,v=(0,F.useMemo)(()=>({density:n,hasDividers:r,listStyle:a}),[n,r,a]),y=(0,I.jsx)(_,{ref:f,...p,"data-testid":d,...i==null?null:{"aria-labelledby":m},...h&&o!=null&&o!==1?{start:o}:{},role:`list`,...g(s(`list`,{density:n,listStyle:a}),t(Op.list,r&&Op.withDividers,a!==`none`&&(o!=null&&o!==1?Ap.counterStart(o-1):Op.withCounter),c),l,u),children:e});return i==null?(0,I.jsx)(Dp,{value:v,children:y}):(0,I.jsx)(Dp,{value:v,children:(0,I.jsxs)(`div`,{className:`x78zum5 xdt5ytf`,children:[(0,I.jsx)(`div`,{id:m,className:`x1p37lm5`,children:i}),y]})})}jp.displayName=`List`;var Mp={withCounter:{kAmcRD:`xfrknyr`,$$css:!0},withDivider:{kt9PQ7:`x92x3c3`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Np={noRadius:{kaIpWk:`x2u8bby`,$$css:!0}};function Pp({label:e,description:t,startContent:n,endContent:r,onClick:i,interactiveRef:a,href:o,target:c,rel:l,isDisabled:u=!1,isSelected:d=!1,xstyle:f,className:p,style:m,ref:h,..._}){let v=(0,F.use)(Dp),y=v?.density??`balanced`,b=v?.hasDividers??!1,x=v?.listStyle??`none`;return(0,I.jsx)(mp,{as:`li`,ref:h,marker:x===`disc`?(0,I.jsx)(`span`,{className:`xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv`,children:(0,I.jsx)(`span`,{className:`x1v4s8kt xols6we x16rqkct x19aspcf`})}):x===`circle`?(0,I.jsx)(`span`,{className:`xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv`,children:(0,I.jsx)(`span`,{className:`x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w`})}):x===`decimal`?(0,I.jsx)(`span`,{className:`xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5`}):null,startContent:n,label:e,description:t,endContent:r,onClick:i,interactiveRef:a,href:o,target:c,rel:l,isDisabled:u,isSelected:d,density:y,xstyle:[x!==`none`&&Mp.withCounter,b&&Mp.withDivider,b&&Np.noRadius,f],...g(s(`list-item`),{className:p,style:m}),..._})}Pp.displayName=`ListItem`;var Fp={x139im0d:`x139im0d`,$$css:!0},Ip={cell:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,ks0D6T:`x1m189uc`,$$css:!0}},Lp={cell:{kVQacm:`xb3r6kr`,kHjlTd:`x1mzt3pk`,kTgw9:`x13faqbe`,ks0D6T:`x1m189uc`,$$css:!0}},Rp={compact:{kZCmMZ:`x5uh4xs`,kwRFfy:`xbg7gas`,$$css:!0},balanced:{kZCmMZ:`x9bi00s`,kwRFfy:`xpilulx`,$$css:!0},spacious:{kZCmMZ:`x18c6q21`,kwRFfy:`x1wzlfcn`,$$css:!0}},zp=(0,F.createContext)(null);zp.displayName=`TableContext`;var Bp={row:{kWkggS:`x1dnou9g`,"--table-row-overlay":`x1rht92`,$$css:!0}},Vp={row:{kWkggS:`xoevpu5`,"--table-row-overlay":`xc01ov8`,k1ekBW:`x15406qy`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0}},Hp={row:{kWkggS:`x1dnou9g xoevpu5`,"--table-row-overlay":`x1rht92 xc01ov8`,k1ekBW:`x15406qy`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0}};function Up({children:e,xstyle:n,ref:r,isHeaderRow:i=!1,className:a,style:o,...c}){let l=(0,F.use)(zp);if(!l)return(0,I.jsx)(`tr`,{ref:r,...c,...g(s(`table-row`),t(Fp,n),a,o),children:e});let u=[];return i||(l.isStriped&&l.hasHover?u.push(Hp.row):l.isStriped?u.push(Bp.row):l.hasHover&&u.push(Vp.row)),l.dividers===`rows`||l.dividers,n&&u.push(...n),(0,I.jsx)(`tr`,{ref:r,...c,...g(s(`table-row`),t(Fp,...u),a,o),children:e})}Up.displayName=`TableRow`;var Wp={destructiveAction:{"--_item-label-color":`xufyqxy`,"--_item-description-color":`xqlix59`,kMwMTN:`xjt36v0`,$$css:!0},divider:{kqGvvJ:`xsq74q5`,$$css:!0}};function Gp(e,t){return`item-${e.id??t}`}function Kp({items:e,onSelect:t,onOpenSubmenu:n}){let r=(e,r)=>{let i=e.items!=null&&e.items.length>0,a=e.variant===`destructive`;return(0,I.jsx)(Pp,{label:e.label,description:e.description,startContent:e.icon?ce(e.icon,{size:`sm`,color:a?`error`:`secondary`}):void 0,endContent:i?(0,I.jsx)(oe,{icon:`chevronRight`,size:`sm`,color:`secondary`,xstyle:pe.mirror}):e.endContent,isDisabled:e.isDisabled,onClick:r=>{f()===`pointer`&&r.currentTarget.blur(),i?n(e):t(e)},xstyle:a&&Wp.destructiveAction},Gp(e,r))};return(0,I.jsx)(jp,{density:`spacious`,children:e.map((e,t)=>`type`in e&&e.type===`divider`?(0,I.jsx)(`li`,{role:`presentation`,className:`x3ct3a4`,children:(0,I.jsx)(lp,{xstyle:Wp.divider})},`divider-${t}`):`type`in e&&e.type===`section`?(0,I.jsx)(`li`,{role:`presentation`,className:`x3ct3a4`,children:(0,I.jsxs)(`div`,{role:`group`,"aria-label":e.title,className:`x78zum5 xdt5ytf xzye2dw`,children:[e.title&&(0,I.jsx)(Se,{level:4,children:e.title}),(0,I.jsx)(jp,{density:`spacious`,children:e.items.map(r)})]})},`section-${e.id??t}`):r(e,t))})}Kp.displayName=`MenuBottomSheetActionList`;var qp=(0,F.createContext)(null);qp.displayName=`DropdownMenuContext`;function Jp(){return(0,F.use)(qp)}var Yp=(0,F.createContext)(null);Yp.displayName=`DropdownMenuRadioGroupContext`;function Xp(e,t){if(t||e.pointerType!==`mouse`)return;let n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus({preventScroll:!0})}var Zp={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz x1anq1lc`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},destructive:{kMwMTN:`xjt36v0`,"--_item-label-color":`xufyqxy`,"--_item-description-color":`xqlix59`,$$css:!0}},Qp={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}};function $p({icon:e,label:t,description:n,onClick:r,isDisabled:i=!1,endContent:a,hasCloseOnSelect:o=!0,variant:c=`default`,xstyle:l,className:u,style:d}){let f=Jp(),p=f?.menuSize??`md`,m=(0,F.useCallback)(()=>{i||(r?.(),o&&f?.closeMenu())},[i,r,o,f]),h=(0,F.useCallback)(e=>Xp(e,i),[i]),_=c===`destructive`;return(0,I.jsx)(mp,{role:`menuitem`,tabIndex:i?void 0:-1,onPointerMove:h,startContent:e?ce(e,{size:`sm`,color:_?`error`:`secondary`}):void 0,label:t,description:n,endContent:a,onClick:m,isDisabled:i,xstyle:[Zp.root,Qp[p],_&&Zp.destructive,i&&Zp.disabled,l],...g(s(`dropdown-menu-item`,{size:p,variant:_?`destructive`:null}),{className:u,style:d})})}$p.displayName=`DropdownMenuItem`;var em={divider:{kqGvvJ:`xsq74q5`,$$css:!0}},tm=s(`dropdown-menu-divider`).className;function nm({xstyle:e,className:t,style:n,ref:r}){return(0,I.jsx)(lp,{ref:r,xstyle:[em.divider,e],className:t?`${tm} ${t}`:tm,style:n})}nm.displayName=`DropdownMenuDivider`;function rm(e,t,n){let[r,i]=(0,F.useState)(!1),a=(0,F.useCallback)(()=>{let t=e.current;if(!t)return;let n=t.scrollHeight>t.clientHeight+1;i(e=>e===n?e:n)},[e]);return m(()=>{if(!n)return;let t=e.current;if(!t)return;a();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(a),i=typeof MutationObserver>`u`?null:new MutationObserver(a);return r?.observe(t),i?.observe(t,{childList:!0,characterData:!0,subtree:!0}),t.addEventListener(`load`,a,!0),window.addEventListener(`resize`,a),window.visualViewport?.addEventListener(`resize`,a),()=>{r?.disconnect(),i?.disconnect(),t.removeEventListener(`load`,a,!0),window.removeEventListener(`resize`,a),window.visualViewport?.removeEventListener(`resize`,a)}},[n,a,e]),m(()=>{n&&a()},[t,n,a]),r}var im=new Set([`auto`,`contain`,`fit-content`,`inherit`,`initial`,`max-content`,`min-content`,`revert`,`revert-layer`,`stretch`,`unset`]);function am(e,t){if(typeof e==`number`)return{property:`minWidth`,value:`min(${e}px, ${t})`};let n=e.trim(),r=n.toLowerCase();return im.has(r)||r.startsWith(`fit-content(`)?{property:`inlineSize`,value:n}:{property:`minWidth`,value:`min(${n}, ${t})`}}var om=new Set([`menuitem`,`menuitemradio`,`menuitemcheckbox`]),sm=[...om].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(`,`),cm=`[role="menu"]`,lm=r[`--spacing-4`];`${lm}${lm}`;var um=`calc(100vw - ${lm} - ${lm})`;`${lm}${lm}`,`${lm}${lm}`;var dm={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},open:{kWkggS:`x1lmrjuc`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0}},fm={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}},pm={kzqmXN:`x1uyokj7`,$$css:!0},mm={popoverViewport:{kB7OPa:`x9f619`,kskxy:`x1hkkhfe`,$$css:!0},popover:{k7Eaqz:`x12knhqr`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:e==null?e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],popoverCustomIntrinsicWidth:e=>[pm,{"--x-inlineSize":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function hm(e){let{icon:t,label:n,description:i,isDisabled:a=!1,hasSpinner:o=!1,menuWidth:c,onOpenChange:l,children:u,xstyle:d,className:f,style:m,"data-testid":_,menuDataTestId:v}=e,y=Jp(),b=y?.menuSize??`md`,x=!a,S=(0,F.useId)(),C=(0,F.useId)(),w=(0,F.useRef)(null),[T,E]=(0,F.useState)(!1),D=h({mode:`context`,lightDismiss:!1,onShow:(0,F.useCallback)(()=>{E(!0),l?.(!0)},[l]),onHide:(0,F.useCallback)(()=>{E(!1),l?.(!1)},[l])}),ee=(0,F.useCallback)(()=>{x&&D.show()},[x,D]),O=(0,F.useCallback)(()=>{D.hide()},[D]),{listRef:k,handleKeyDown:A,focusFirst:te,focusItem:j,ownsEvent:ne,getItems:re}=zr({itemSelector:sm,boundarySelector:cm,wrap:!1,onEscape:()=>P({focusTrigger:!0})}),ie=rm(k,u,T),M=np({getItemLabels:()=>re().map(e=>e.textContent),onMatch:j,getCurrentIndex:()=>re().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))}),{triggerProps:ae,contentProps:N,confirmHoverOpen:se}=Hr({show:ee,hide:O,isOpen:T,isEnabled:x}),ue=(0,F.useCallback)(e=>{x&&(D.show(),e?.focusFirst&&(te()||k.current?.focus()))},[x,D,te,k]),P=(0,F.useCallback)(e=>{D.hide(),e?.focusTrigger!==!1&&w.current?.focus()},[D]),de=(0,F.useCallback)(e=>{w.current=e,D.ref(e)},[D]),L=(0,F.useCallback)(()=>{if(!a){if(T){if(se()){te()||k.current?.focus();return}P({focusTrigger:!0})}else ue({focusFirst:!0})}},[a,T,ue,P,se,te,k]),fe=(0,F.useCallback)(e=>{if(a)return;let t=typeof window<`u`&&w.current&&window.getComputedStyle(w.current).direction===`rtl`?`ArrowLeft`:`ArrowRight`;(e.key===t||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),ue({focusFirst:!0}))},[a,ue]),R=(0,F.useCallback)(e=>Xp(e,a),[a]),me=(0,F.useCallback)(e=>{if(!ne(e))return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),P({focusTrigger:!0});return}if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&om.has(t.getAttribute(`role`)??``)&&t.click();return}let t=typeof window<`u`&&k.current&&window.getComputedStyle(k.current).direction===`rtl`?`ArrowRight`:`ArrowLeft`;if(e.key===t){e.preventDefault(),P({focusTrigger:!0});return}if(M.onKeyDown(e)){e.preventDefault();return}A(e)},[ne,P,A,M,k]),he=(0,F.useMemo)(()=>({menuSize:b,closeMenu:()=>{P({focusTrigger:!1}),y?.closeMenu()}}),[b,P,y]),ge=o?(0,I.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,I.jsx)(le,{size:`sm`})}):(0,I.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,I.jsx)(oe,{icon:`chevronRight`,size:`sm`,color:`secondary`,xstyle:pe.mirror,...s(`dropdown-menu-indicator-icon`)})}),_e=c?am(c,um):null,ve=_e?_e.property===`inlineSize`?mm.popoverCustomIntrinsicWidth(_e.value):mm.popoverCustomWidth(_e.value):mm.popover;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(mp,{ref:e=>de(e),id:C,role:`menuitem`,tabIndex:a?void 0:-1,"aria-haspopup":`menu`,"aria-expanded":T,"aria-controls":T?S:void 0,"aria-disabled":a||void 0,"data-testid":_,onMouseEnter:ae.onMouseEnter,onMouseLeave:ae.onMouseLeave,onPointerMove:R,startContent:t?ce(t,{size:`sm`,color:`secondary`}):void 0,label:n,description:i,endContent:ge,onClick:L,onKeyDown:fe,isDisabled:a,xstyle:[dm.root,fm[b],T&&dm.open,a&&dm.disabled,d],...g(s(`dropdown-menu-item`,{size:b}),{className:f,style:m})}),D.render((0,I.jsx)(`div`,{ref:k,id:S,role:`menu`,tabIndex:ie?0:-1,"aria-labelledby":C,onKeyDown:me,onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave,"data-testid":v,...g(s(`dropdown-menu`),{0:{className:`x9f619 x78zum5 xdt5ytf x1lsbc85 xs2v1xk x1hkkhfe x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92`},1:{className:`x9f619 x78zum5 xdt5ytf x1lsbc85 xs2v1xk x1hkkhfe x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92 x1odjw0f x6ikm8r xish69e`}}[!!ie<<0]),children:(0,I.jsx)(qp,{value:he,children:u})}),{placement:`end`,alignment:`start`,offset:r[`--spacing-1`],xstyle:[mm.popoverViewport,ve,p.end]})]})}hm.displayName=`DropdownMenuSubMenu`;function gm(e,t){return`item-${e.id??t}`}function _m(e,t){return`section-${e.id??t}`}function vm(e,t){let{items:n,id:r,...i}=e;return(0,I.jsx)($p,{...i},gm(e,t))}function ym(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];`type`in r&&r.type===`divider`?t.push((0,I.jsx)(nm,{},`divider-${n}`)):`type`in r&&r.type===`section`?t.push((0,I.jsxs)(`div`,{role:`group`,"aria-label":r.title,children:[r.title&&(0,I.jsx)(`div`,{"aria-hidden":`true`,...g(s(`dropdown-menu-section-heading`),{className:`xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o`}),children:r.title}),r.items.map(vm)]},_m(r,n))):`type`in r||(r.items&&r.items.length>0?t.push((0,I.jsx)(hm,{icon:r.icon,label:r.label,isDisabled:r.isDisabled,children:ym(r.items)},gm(r,n))):t.push(vm(r,n)))}return t}var bm=(0,F.lazy)(async()=>x(()=>import(`./MenuBottomSheet-BkRC4_VW.js`).then(e=>({default:e.MenuBottomSheet})),__vite__mapDeps([3,1,4,5,6,7,8]))),xm={trigger:{kVAEAm:`x1n2onr6`,k7VYTy:`xpdipgo`,kO7zv1:`x1winvzj`,kfSwDN:`x87ps6o`,$$css:!0},menu:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kskxy:`xuyqlj2`,kORKVm:`x1odjw0f`,"--_dropdown-menu-radius":`x1fcsqxe`,"--_dropdown-menu-padding":`xgory14`,kmVPX3:`x9epnlk`,kaIpWk:`x1n97fys`,kWkggS:`x1prclbq`,kGVxlE:`x1i5ehqx`,kSiTet:`x1hc1fzr`,k1ekBW:`x19991ni`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,kfSwDN:`x87ps6o`,$$css:!0},popover:{k7Eaqz:`x5w4yej`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}],sheetMenu:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kzqmXN:`xh8yej3`,"--_dropdown-menu-radius":`x1fcsqxe`,"--_dropdown-menu-padding":`xgory14`,kmVPX3:`x9epnlk`,kaIpWk:`x1n97fys`,kWkggS:`x10xzikg`,kI3sdo:`x1a2a7pz`,kfSwDN:`x87ps6o`,$$css:!0},sheetRootHeading:{keTefX:`x6i7dpz`,$$css:!0},sheetViewHeading:{kI3sdo:`x1a2a7pz`,$$css:!0}};function Sm({children:e,menuWidth:n,size:r=`md`,label:i,isDisabled:o=!1,onOpenChange:c,presentation:l=`popover`,ref:u,className:d,style:f,xstyle:m,triggerXstyle:_,"data-testid":v,...y}){let b=se(),x=i??b(`@astryx.contextMenu.label`),S=b(`@astryx.dropdownMenu.back`),C=gp(l)===`bottom-sheet`,{items:w,menuContent:T,...E}=y,D=w??[],ee=T,O=(0,F.useId)(),A=(0,F.useRef)({x:0,y:0}),te=(0,F.useRef)(null),j=(0,F.useRef)(null),ne=(0,F.useRef)(null),re=(0,F.useRef)(null),[M,ae]=(0,F.useState)(!1),[N,ce]=(0,F.useState)([]),le=N.at(-1),ue=le?.items??D,P=le?.label??x,de=typeof P==`string`?P:x,L=(0,F.useCallback)(e=>{e||ce([]),ae(e),c?.(e)},[c]),fe=h({mode:`context`,onHide:(0,F.useCallback)(()=>{ae(!1),c?.(!1);let e=ne.current;ne.current=null,e&&document.contains(e)&&e.focus()},[c]),onShow:(0,F.useCallback)(()=>{ae(!0),c?.(!0)},[c]),lightDismiss:!1}),R=(0,F.useCallback)(()=>{C?L(!1):fe.hide()},[fe,L,C]),me=(0,F.useCallback)(e=>{e.isDisabled||(e.onClick?.(),e.hasCloseOnSelect!==!1&&R())},[R]);(0,F.useEffect)(()=>{if(!M||N.length===0)return;let e=requestAnimationFrame(()=>{re.current?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(e)},[M,N.length]);let{listRef:he,handleKeyDown:ge,focusFirst:_e,focusItem:ve,ownsEvent:ye,getItems:be}=zr({itemSelector:sm,boundarySelector:cm,wrap:!1,onEscape:R}),xe=np({getItemLabels:()=>be().map(e=>e.textContent),onMatch:ve,getCurrentIndex:()=>be().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))});(0,F.useEffect)(()=>{if(!M||C)return;let e=e=>{let t=he.current;t&&!t.contains(e.target)&&R()};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[M,R,he,C]),(0,F.useEffect)(()=>{if(!M||C)return;let e=e=>{e.key===`Escape`&&(a(e)||(e.preventDefault(),R()))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[M,R,C]);let Ce=(0,F.useCallback)(e=>{if(ye(e)){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&om.has(t.getAttribute(`role`)??``)&&t.click();return}if(e.key===`Tab`){R();return}if(xe.onKeyDown(e)){e.preventDefault();return}ge(e)}},[ge,R,xe,ye]),we=(0,F.useCallback)((e,t,n)=>{A.current={x:e,y:t};let r=te.current;r&&(r.style.left=`${e}px`,r.style.top=`${t}px`),ne.current=document.activeElement instanceof HTMLElement?document.activeElement:n,C?L(!0):(fe.show(),requestAnimationFrame(()=>_e()))},[fe,_e,L,C]),Te=(0,F.useCallback)(e=>{if(o)return;e.preventDefault();let t=j.current?.getBoundingClientRect(),n=e.clientX===0&&e.clientY===0&&e.detail===0,r=n||!t?0:e.clientX-t.left,i=n||!t?t?.height??0:e.clientY-t.top;we(r,i,e.currentTarget)},[o,we]),Ee=ap({disabled:o,onLongPress:(0,F.useCallback)(e=>{let t=j.current?.getBoundingClientRect();we(t?e.x-t.left:e.x,t?e.y-t.top:e.y,j.current)},[we])}),De=n?xm.popoverCustomWidth(n):xm.popover,Oe=(0,F.useMemo)(()=>({closeMenu:R,menuSize:r}),[R,r]),ke=w===void 0?ee:ym(D),Ae=(0,I.jsx)(`div`,{ref:he,id:O,role:`menu`,"data-autofocus":C?``:void 0,tabIndex:C?0:-1,"aria-label":x,onKeyDown:Ce,onContextMenu:e=>e.preventDefault(),...g(s(`context-menu`),t(C?xm.sheetMenu:xm.menu,m),d,f),children:(0,I.jsx)(qp,{value:Oe,children:ke})}),je=w===void 0?Ae:(0,I.jsxs)(`div`,{ref:he,"data-autofocus":``,tabIndex:0,...g(s(`context-menu`),t(xm.sheetMenu,m),d,f),children:[(0,I.jsxs)(`div`,{className:`x78zum5 x1q0g3np x6s0dn4 xzye2dw x1p37lm5`,children:[N.length>0&&(0,I.jsx)(ie,{label:S,variant:`ghost`,size:`sm`,icon:(0,I.jsx)(oe,{icon:`chevronLeft`,size:`sm`,xstyle:pe.mirror}),isIconOnly:!0,onClick:()=>ce(e=>e.slice(0,-1))}),(0,I.jsx)(Se,{ref:re,level:3,tabIndex:-1,xstyle:[xm.sheetViewHeading,N.length===0&&xm.sheetRootHeading],children:P})]}),(0,I.jsx)(Kp,{items:ue,onSelect:me,onOpenSubmenu:e=>ce(t=>[...t,e])})]});return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{ref:k(u,j),...E,onContextMenu:Te,...Ee,"data-testid":v,...t(xm.trigger,..._?Array.isArray(_)?_:[_]:[]),children:[e,(0,I.jsx)(`span`,{ref:k(te,fe.ref),"aria-hidden":`true`,...g({className:`x10l6tqk xnalus7 xqtp20y x47corl`},{style:{left:`${A.current.x}px`,top:`${A.current.y}px`}})})]}),C?(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(bm,{isOpen:M,onOpenChange:L,label:de,children:je})}):fe.render(Ae,{placement:`below`,alignment:`start`,xstyle:[De,p.below]})]})}Sm.displayName=`ContextMenu`;function Cm(e){let t=[],n=new Map;for(let r of e){let e=r.group??`__ungrouped__`,i=n.get(e);i||(i=[],n.set(e,i),t.push(e)),i.push(r)}let r=[];return t.forEach((e,t)=>{t>0&&r.push({type:`divider`});for(let t of n.get(e)??[])r.push({label:typeof t.label==`string`?t.label:t.id,icon:t.checked?(0,I.jsx)(oe,{icon:`check`,size:`xsm`,"aria-hidden":!0}):t.icon,isDisabled:t.disabled,onClick:t.onSelect,variant:t.variant})}),r}function wm({element:e,getActions:t,triggerXstyle:n}){let[r,i]=(0,F.useState)(null);return(0,I.jsx)(Sm,{items:r??[],triggerXstyle:n,onOpenChange:e=>{i(e?Cm(t()):null)},children:e})}function Tm(e,t,n){return typeof t==`function`?(0,I.jsx)(wm,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:(0,I.jsx)(Sm,{items:Cm(t),triggerXstyle:n,children:e})}function Em(e,t,n){let r=[];return(e.dividers===`rows`||e.dividers===`grid`)&&r.push(t),(e.dividers===`columns`||e.dividers===`grid`)&&r.push(n),r}function Dm(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function Om(){return(0,F.use)(zp)}var km={compact:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},balanced:{k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0}},Am={compact:{kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},balanced:{kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},spacious:{kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0}},jm={compact:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},balanced:{k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,$$css:!0}},Mm={fill:{k1xSpc:`x1lliihq`,kB7OPa:`x9f619`,kZKoxP:`x5yr21d`,kzqmXN:`xh8yej3`,$$css:!0}},Nm={cell:{kZKoxP:`x5yr21d`,$$css:!0}},Pm={cell:{kt9PQ7:`x92x3c3 x1wp2rvj`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Fm={cell:{ke9TFa:`xw8tdv1 x1qlsc9e`,k8ry5P:`x18b5jzi`,kBCPoo:`x1gejf6u`,$$css:!0}},Im={middle:{kXLuUW:`xxymvpz`,$$css:!0},top:{kXLuUW:`x16dsc37`,$$css:!0},bottom:{kXLuUW:`x3ajldb`,$$css:!0}};function Lm({children:e,xstyle:n,ref:r,className:i,style:a,contextMenuActions:o,...c}){let l=Om(),u=typeof o==`function`||Array.isArray(o)&&o.length>0,d=l?[u?Am[l.density]:km[l.density],l.textOverflow===`truncate`?Ip.cell:Lp.cell,Rp[l.density],Im[l.verticalAlign],...Em(l,Pm.cell,Fm.cell),...u?[Nm.cell]:[]]:[],f=Tm(e,o,u&&l?[Mm.fill,jm[l.density]]:u?Mm.fill:void 0);return(0,I.jsx)(`td`,{ref:r,...c,...g(s(`table-cell`,{density:l?.density}),t(...Dm(d,n)),i,a),children:f})}Lm.displayName=`TableCell`;var Rm={compact:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kGuDYH:`xcr08ib`,kB7OPa:`x9f619`,$$css:!0},balanced:{k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kGuDYH:`xcr08ib`,kB7OPa:`x9f619`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,kGuDYH:`xcr08ib`,kB7OPa:`x9f619`,$$css:!0}},zm={cell:{k63SB2:`x2mo6ok`,kMwMTN:`xv1l7n4`,k9WMMc:`x1yc453h`,$$css:!0}},Bm={cell:{kt9PQ7:`x92x3c3`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Vm={cell:{ke9TFa:`xw8tdv1 x1qlsc9e`,k8ry5P:`x18b5jzi`,kBCPoo:`x1gejf6u`,$$css:!0}};function Hm({children:e,xstyle:n,ref:r,className:i,style:a,contextMenuActions:o,...c}){let l=Om(),u=[];l&&(u.push(zm.cell,Rm[l.density],Bm.cell,Ip.cell,Rp[l.density]),(l.dividers===`columns`||l.dividers===`grid`)&&u.push(Vm.cell));let d=Tm(e,o);return(0,I.jsx)(`th`,{ref:r,...c,...g(s(`table-header-cell`,{density:l?.density}),t(...Dm(u,n)),i,a),children:d})}Hm.displayName=`TableHeaderCell`;function Um({ref:e,children:n,xstyle:r,className:i,style:a,...o}){return(0,I.jsx)(`thead`,{ref:e,...g(s(`table-header`),t(r),i,a),...o,children:n})}Um.displayName=`TableHeader`;function Wm({ref:e,children:n,xstyle:r,className:i,style:a,...o}){return(0,I.jsx)(`tbody`,{ref:e,...g(s(`table-body`),t(r),i,a),...o,children:n})}Wm.displayName=`TableBody`;var Gm={table:{kzqmXN:`xh8yej3`,kLvRdT:`x1mwwwfo`,kheTzg:`x1gukg7c`,kPzzVL:`x140o2bo`,$$css:!0},tableAutoLayout:{kPzzVL:`x1drmoe9`,$$css:!0}};function Km(e,t,n,...r){return e.reduce((e,n,i)=>{let a=t(n);if(!a)return e;try{return a(e,...r)}catch(t){return _(`Table`,`Plugin at index ${i} threw in transform:`,t),e}},n)}var qm=[];function Jm(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ym({item:e,rowIndex:t,rowKey:n,columns:r,plugins:i,textOverflow:a,RowComponent:o,CellComponent:s,ariaRowIndex:c}){let l=r.map((t,n)=>{let o={};t.align&&(o.style={textAlign:t.align});let c=Km(i,e=>e.transformBodyCell,{htmlProps:o,xstyle:[],columnIndex:n,columns:r},t,e,n,r),l=!t.renderCell,u=null;c.isContentSuppressed||(u=l?xp(e,t.key):t.renderCell?.(e)??null);let d;return d=l&&a===`truncate`&&typeof u==`string`&&u.length>0?(0,I.jsx)(j,{type:`body`,maxLines:1,children:u}):u,(0,I.jsx)(s,{...c.htmlProps,contextMenuActions:c.contextMenuActions,xstyle:c.xstyle,children:d},t.key)}),u=Km(i,e=>e.transformBodyRow,{htmlProps:c==null?{}:{"aria-rowindex":c},xstyle:[],children:(0,I.jsx)(I.Fragment,{children:l})},e,t),d=(0,I.jsx)(o,{ref:u.ref,...u.htmlProps,xstyle:u.xstyle,children:u.children},n);return u.afterRow?(0,I.jsxs)(I.Fragment,{children:[d,u.afterRow]}):d}function Xm(e,t){if(e.rowKey!==t.rowKey||e.rowIndex!==t.rowIndex||e.ariaRowIndex!==t.ariaRowIndex||e.columns!==t.columns||e.plugins!==t.plugins||e.textOverflow!==t.textOverflow||e.RowComponent!==t.RowComponent||e.CellComponent!==t.CellComponent)return!1;if(e.item===t.item)return!0;let n=e.item,r=t.item,i=Object.keys(r);if(Object.keys(n).length!==i.length)return!1;for(let e of i)if(n[e]!==r[e])return!1;return!0}var Zm=(0,F.memo)(Ym,Xm);function Qm({data:e,columns:n,idKey:r,plugins:i,children:a,textOverflow:o=`wrap`,scrollWrapper:c,emptyState:l,rowIndexStart:u,rowCount:d,xstyle:f,className:p,style:m,ref:h,...v}){let y=se(),b=i??qm,x=u!=null||d!=null,S=u??1,C=x?d??-1:void 0,w=Up,T=Lm,E=Hm,D=Km(b,e=>e.transformColumns,n??(e?Ep(e):[])),ee=(0,F.useRef)(D);Jm(ee.current,D)||(ee.current=D);let O=ee.current,k=_p(O),A=Km(b,e=>e.transformTable,{htmlProps:{},xstyle:a?[Gm.table,Gm.tableAutoLayout]:[Gm.table]}),te=O.map((e,t)=>{let n=e.header??e.key,r={"data-column-key":e.key,scope:`col`};e.align&&(r.style={textAlign:e.align});let i=Km(b,e=>e.transformHeaderCell,{htmlProps:r,xstyle:[],content:n,columnIndex:t,columns:O},e,t,O),a=k.columns.get(e.key)?.style??{},o=i.htmlProps.style,s={...i.htmlProps,style:o?{...a,...o}:a},c=i.content??n,l=typeof c==`string`&&c.length>0?{title:c}:{},{before:u,after:d,overlay:f,below:p}=i,m=u!=null||d!=null||f!=null||p!=null?(0,I.jsxs)(I.Fragment,{children:[u,d==null?c:(0,I.jsxs)(`div`,{className:`x3nfvp2 x6s0dn4 xzye2dw xeuugli`,children:[c,d]}),f,p]}):c;return(0,I.jsx)(E,{...s,...l,contextMenuActions:i.contextMenuActions,xstyle:i.xstyle,children:m},e.key)}),j=Km(b,e=>e.transformHeaderRow,{htmlProps:{},xstyle:[],children:(0,I.jsx)(I.Fragment,{children:te})}),ne=e!=null&&e.length>0,re=O.length>0,ie={...A.htmlProps.style,...m,...k.tableMinWidth>0?{minWidth:`${k.tableMinWidth}px`}:null},M=(0,I.jsx)(`table`,{ref:h,...C==null?null:{"aria-rowcount":C},...A.htmlProps,...g(s(`table`,void 0,{legacyNames:[`base-table`]}),t(...A.xstyle,f),[A.htmlProps.className,p].filter(Boolean).join(` `)||void 0,ie),...v,children:a||(0,I.jsxs)(I.Fragment,{children:[re&&(0,I.jsx)(Um,{children:(0,I.jsx)(w,{...j.htmlProps,isHeaderRow:!0,xstyle:j.xstyle,children:j.children})}),(0,I.jsx)(Wm,{children:ne?e.map((e,t)=>{let n=r==null?t:typeof r==`function`?r(e):String(e[r]);return(0,I.jsx)(Zm,{item:e,rowIndex:t,rowKey:n,columns:O,plugins:b,textOverflow:o,RowComponent:w,CellComponent:T,ariaRowIndex:x?S+t:void 0},n)}):e!=null&&l!==!1&&(0,I.jsx)(`tr`,{children:(0,I.jsx)(`td`,{colSpan:O.length,children:l??(0,I.jsx)($f,{title:y(`@astryx.table.noData`),isCompact:!0})})})})]})});if(c){let e=Km(b,e=>e.transformScrollWrapper,{htmlProps:{},xstyle:[]});M=(0,I.jsx)(c,{htmlProps:e.htmlProps,xstyle:e.xstyle,beforeTable:e.beforeTable,afterTable:e.afterTable,children:M})}for(let e=b.length-1;e>=0;e--){let t=b[e];if(t.transformTableContext)try{M=t.transformTableContext(M)}catch(e){_(`Table`,`Plugin threw in transformTableContext:`,e)}}return M}var $m=Qm;$m.displayName=`BaseTable`;var eh=[`columnSettings`,`sort`,`tree`,`selection`,`pagination`],th=new Map(eh.map((e,t)=>[e,t]));function nh(e){let t=eh.length;return e.sort(([e],[n])=>(th.get(e)??t)-(th.get(n)??t))}var rh=new Set([`transformColumns`,`transformTable`,`transformHeaderRow`,`transformHeaderCell`,`transformBodyRow`,`transformBodyCell`,`transformScrollWrapper`,`transformTableContext`]);function ih(e,t){let n=Object.keys(t);for(let t of n)rh.has(t)||`${e}${t}${[...rh].join(`, `)}`;for(let r of n)if(rh.has(r)){let n=t[r];n!=null&&typeof n!=`function`&&`${e}${r}`}n.some(e=>rh.has(e)&&typeof t[e]==`function`)||`${e}`}function ah(e,t){let n=(0,F.useRef)(null);if(n.current!=null){let r=n.current;if(r.basePlugins===e&&r.userPlugins===t)return r.result;if(r.basePlugins===e&&oh(r.userPlugins,t))return r.userPlugins=t,r.result}let r=t?nh(Object.entries(t)).map(([,e])=>e):[],i=[...e,...r];if(t)for(let[e,n]of Object.entries(t))ih(e,n);return n.current={basePlugins:e,userPlugins:t,result:i},i}function oh(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var sh={base:{kMv6JI:`xjb2p0i`,kMwMTN:`x1tgivj0`,$$css:!0}},ch={base:{kXHlph:`xw2csxc`,kuHK5b:`x5lxg6s`,$$css:!0},containerBleed:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,kzqmXN:`xx6qvi6`,keoZOQ:`xkibk3`,k1K539:`xlayyun`,$$css:!0}};function lh({children:e,htmlProps:n,xstyle:r,beforeTable:i,afterTable:a}){let o=se(),{ref:c,...l}=n??{};return(0,I.jsxs)(`div`,{ref:c,tabIndex:0,role:`group`,"aria-label":o(`@astryx.table.label`),...l,...g(s(`table-scroll-wrapper`),t(ch.base,ch.containerBleed,...r??[])),children:[i,e,a]})}function uh(){return{transformTable(e){return{...e,xstyle:[...e.xstyle,sh.base]}}}}function dh({density:e=`balanced`,dividers:t=`rows`,isStriped:n=!1,hasHover:r=!1,verticalAlign:i=`middle`,textOverflow:a=`wrap`,plugins:o,columns:s,data:c,ref:l,...u}){let d=(0,F.useMemo)(()=>uh(),[]),f=ah((0,F.useMemo)(()=>[d],[d]),o),p=(0,F.useMemo)(()=>({density:e,dividers:t,isStriped:n,hasHover:r,verticalAlign:i,textOverflow:a}),[e,t,n,r,i,a]);return(0,I.jsx)(zp,{value:p,children:(0,I.jsx)($m,{ref:l,data:c,columns:s,plugins:f,textOverflow:a,scrollWrapper:lh,...u})})}var fh=dh;fh.displayName=`Table`;var ph=[[`path`,{d:`M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]];function mh({size:e=16}){return(0,I.jsx)(Zf,{data:ph,size:e})}var hh={bar:`_bar_2upas_2`,trail:`_trail_2upas_3`,crumb:`_crumb_2upas_4`};function gh({trail:e,actions:t}){return(0,I.jsxs)(ep,{as:`header`,"aria-label":`현재 위치`,gap:3,className:hh.bar,children:[(0,I.jsxs)(ep,{gap:2,className:hh.trail,children:[(0,I.jsx)(mh,{}),(0,I.jsx)(Gf,{}),e.map((t,n)=>(0,I.jsxs)(F.Fragment,{children:[(0,I.jsx)(j,{type:`supporting`,color:`secondary`,children:`/`}),t.to&&n<e.length-1?(0,I.jsx)(on,{to:t.to,search:t.search??{},className:hh.crumb,children:t.label}):(0,I.jsx)(j,{type:`supporting`,maxLines:1,children:t.label})]},n))]}),t]})}export{Nn as $,Hr as A,Ye as At,Un as B,ve as Bt,qf as C,Qe as Ct,Uf as D,Ae as Dt,Vf as E,Ze as Et,wr as F,Ie as Ft,bn as G,zn as H,fe as Ht,tr as I,Te as It,mn as J,yn as K,Yn as L,Ee as Lt,Fr as M,ke as Mt,Pr as N,Fe as Nt,If as O,qe as Ot,Dr as P,Je as Pt,Fn as Q,Jn as R,Se as Rt,Xf as S,Ke as St,Bf as T,Ve as Tt,hn as U,L as Ut,Bn as V,pe as Vt,xn as W,z as X,Sn as Y,Tn as Z,lp as _,ut as _t,Um as a,Rt as at,$f as b,et as bt,Up as c,Mt as ct,Dp as d,Dt as dt,ln as et,yp as f,Tt as ft,up as g,dt as gt,mp as h,lt as ht,Wm as i,zt as it,zr as j,He as jt,Gr as k,Ne as kt,Pp as l,Ct as lt,gp as m,gt as mt,mh as n,on as nt,Hm as o,Ft as ot,vp as p,Et as pt,vn as q,fh as r,Gt as rt,Lm as s,At as st,gh as t,cn as tt,jp as u,kt as ut,np as v,ct as vt,Wf as w,Xe as wt,Zf as x,$e as xt,ep as y,pt as yt,Wn as z,me as zt};
|
|
56
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Wl(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Wl(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var Gl=new Set([`type`,`properties`,`required`,`additionalProperties`]),Kl=[`oneOf`,`anyOf`];function ql(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Jl(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Gl.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??ql(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}ei(n,r,e.length===1?e[0]:Jl(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=ql(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Yl(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Gl)if(t in e)return;let n=t.filter(e=>Kl.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Jl(t);else{let e=n[0],i=Kl.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>Jl([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,zl(e,r))}function Xl(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):zl(i,s),zl(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Wl(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Yl(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}zl(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,ei(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Ql(t,`input`,e.processors),output:Ql(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function K(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return K(r.element,n);if(r.type===`set`)return K(r.valueType,n);if(r.type===`lazy`)return K(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return K(r.innerType,n);if(r.type===`intersection`)return K(r.left,n)||K(r.right,n);if(r.type===`record`||r.type===`map`)return K(r.keyType,n)||K(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:K(r.in,n)||K(r.out,n);if(r.type===`object`){for(let e in r.shape)if(K(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(K(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(K(e,n))return!0;return!!(r.rest&&K(r.rest,n))}return!1}var Zl=(e,t={})=>n=>{let r=Bl({...n,processors:t});return G(e,r),Ul(r,e),Xl(r,e)},Ql=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Bl({...i??{},target:a,io:t,processors:n});return G(e,o),Ul(o,e),Xl(o,e)},$l=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},eu=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},tu=(e,t)=>{$l(e,`minimum`,t),eu(e,`maximum`,t)},nu=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},ru=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},iu=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},au=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},ou=(e,t)=>$l(e,`minimum`,t.minimum),su=(e,t)=>eu(e,`maximum`,t.maximum),cu=e=>(t,n)=>{au(t,n.format);let[r,i]=e[n.format];$l(t,`minimum`,r),eu(t,`maximum`,i)},lu={greater_than:(e,t)=>$l(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>eu(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>nu(e,t.value),number_format:cu(bi),bigint_format:cu(xi),min_length:ou,max_length:su,length_equals:(e,t)=>tu(e,t.length),min_size:ou,max_size:su,size_equals:(e,t)=>tu(e,t.size),string_format:(e,t)=>{au(e,t.format),t.pattern&&ru(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>iu(e,t.mime)};function uu(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)lu[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&$l(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&$l(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&eu(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&eu(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&nu(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&iu(t,i.mime);for(let e of i.patterns??[])ru(t,e);return t}var du={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},fu=new Map([[_s,eo],[ys,to]]),pu=e=>fu.get(e)??e,mu=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=uu(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=du[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(pu);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},hu=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=uu(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Vl(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},gu=(e,t,n,r)=>{n.type=`boolean`},_u=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},vu=(e,t,n,r)=>{n.not={}},yu=(e,t,n,r)=>{let i=e._zod.def,a=Kr(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},bu=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Vl(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Vl(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},xu=(e,t,n,r)=>{Vl(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Su=(e,t,n,r)=>{Vl(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Cu=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=uu(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=G(a.element,t,{...r,path:[...r.path,`items`]})};function wu(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?wu(t.out):t.type===`catch`?wu(t.innerType):e._zod.optin}var Tu=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Vl(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)ei(i.properties,e,G(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?wu(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=G(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Eu=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>G(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Du=(e,t,n,r)=>{let i=e._zod.def,a=G(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=G(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Ou=(e,t,n,r)=>{let i=e._zod.def,a=G(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ku=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Au=Symbol();function ju(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Vl(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Au):JSON.parse(o)}var Mu=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ju(i.defaultValue,e,t,n,r);o!==Au&&(n.default=o)},Nu=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ju(i.defaultValue,e,t,n,r);o!==Au&&(n._prefault=o)},Pu=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Vl(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Fu=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;G(o,t,r);let s=t.seen.get(e);s.ref=o},Iu=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Lu=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ru=new WeakSet([Object.prototype,Error.prototype]);function zu(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Bu=H(`ZodError`,(e,t)=>{ma.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Ru.has(n)||(Ru.add(n),zu(n,`format`,e=>t=>_a(e,t)),zu(n,`flatten`,e=>t=>ga(e,t)),zu(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Jr,2)}),zu(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Jr,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Vu=ya(Bu),Hu=ba(Bu),Uu=xa(Bu),Wu=Ca(Bu),Gu=ka(Bu),Ku=Aa(Bu),qu=ja(Bu),Ju=Ma(Bu),Yu=Na(Bu),Xu=Pa(Bu),Zu=Fa(Bu),Qu=Ia(Bu);function $u(){oa.localeError||sa(Ac())}function ed(){oa.memoizer||sa({memoizer:Dc()})}var q=H(`ZodType`,(e,t)=>($u(),U.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(si(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return _i(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(vf(e,t))},superRefine(e,t){return this.check(yf(e,t))},overwrite(e){return this.check(kl(e))},optional(){return $d(this)},exactOptional(){return tf(this)},nullable(){return rf(this)},nullish(){return $d(rf(this))},nonoptional(e){return uf(this,e)},array(){return X(this)},or(e){return Hd([this,e])},and(e){return Kd(this,e)},transform(e){return mf(this,Zd(e))},default(e){return of(this,e)},prefault(e){return cf(this,e)},catch(e){return ff(this,e)},pipe(e){return mf(this,e)},readonly(){return gf(this)},describe(e){let t=this.clone();return Pc.add(t,{description:e}),t},meta(...e){if(e.length===0)return Pc.get(this);let t=this.clone();return Pc.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Wi(this,`~standard`,{...zo(this),jsonSchema:{input:Ql(this,`input`),output:Ql(this,`output`)}})},set"~standard"(e){Ui(this,`~standard`,e)},parse:function e(t,n){return Vu(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Hu(this,t,n,{callee:e})},safeParse(e,t){return Uu(this,e,t)},async safeParseAsync(e,t){return Wu(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Ui(this,`spa`,e)},validate(e,t){return Ea(this,e,t)},validateAsync(e,t){return Oa(this,e,t)},encode:function e(t,n){return Gu(this,t,n,{callee:e})},decode:function e(t,n){return Ku(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await qu(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Ju(this,t,n,{callee:e})},safeEncode(e,t){return Yu(this,e,t)},safeDecode(e,t){return Xu(this,e,t)},async safeEncodeAsync(e,t){return Zu(this,e,t)},async safeDecodeAsync(e,t){return Qu(this,e,t)},toJSONSchema(e){return Zl(this,{})(e)},get description(){return Pc.get(this)?.description},get _def(){return this._zod.def}}),td=H(`_ZodString`,(e,t)=>{Bo.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mu(e,t,n,r)},Gi({format:e=>uu(e).format??null,minLength:e=>uu(e).minimum??null,maxLength:e=>uu(e).maximum??null},{regex(...e){return this.check(Cl(...e))},includes(...e){return this.check(El(...e))},startsWith(...e){return this.check(Dl(...e))},endsWith(...e){return this.check(Ol(...e))},min(...e){return this.check(xl(...e))},max(...e){return this.check(bl(...e))},length(...e){return this.check(Sl(...e))},nonempty(...e){return this.check(xl(1,...e))},lowercase(e){return this.check(wl(e))},uppercase(e){return this.check(Tl(e))},trim(){return this.check(jl())},normalize(...e){return this.check(Al(...e))},toLowerCase(){return this.check(Ml())},toUpperCase(){return this.check(Nl())},slugify(){return this.check(Pl())}})),nd=H(`ZodString`,(e,t)=>{Bo.init(e,t),td.init(e,t)},{email(e){return this.check(Lc(sd,e))},url(e){return this.check(Uc(dd,e))},jwt(e){return this.check(il(Ed,e))},emoji(e){return this.check(Wc(fd,e))},guid(e){return this.check(Rc(cd,e))},uuid(e){return this.check(zc(ld,e))},uuidv4(e){return this.check(Bc(ld,e))},uuidv6(e){return this.check(Vc(ld,e))},uuidv7(e){return this.check(Hc(ld,e))},nanoid(e){return this.check(Gc(pd,e))},cuid(e){return this.check(Kc(md,e))},cuid2(e){return this.check(qc(hd,e))},ulid(e){return this.check(Jc(gd,e))},base64(e){return this.check(tl(Cd,e))},base64url(e){return this.check(nl(wd,e))},xid(e){return this.check(Yc(_d,e))},ksuid(e){return this.check(Xc(vd,e))},ipv4(e){return this.check(Zc(yd,e))},ipv6(e){return this.check(Qc(bd,e))},cidrv4(e){return this.check($c(xd,e))},cidrv6(e){return this.check(el(Sd,e))},e164(e){return this.check(rl(Td,e))},datetime(e){return this.check(al(rd,e))},date(e){return this.check(ol(id,e))},time(e){return this.check(sl(ad,e))},duration(e){return this.check(cl(od,e))}});function J(e){return Ic(nd,e)}var Y=H(`ZodStringFormat`,(e,t)=>{W.init(e,t),td.init(e,t)}),rd=H(`ZodISODateTime`,(e,t)=>{as.init(e,t),Y.init(e,t)}),id=H(`ZodISODate`,(e,t)=>{os.init(e,t),Y.init(e,t)}),ad=H(`ZodISOTime`,(e,t)=>{ss.init(e,t),Y.init(e,t)}),od=H(`ZodISODuration`,(e,t)=>{cs.init(e,t),Y.init(e,t)}),sd=H(`ZodEmail`,(e,t)=>{Uo.init(e,t),Y.init(e,t)}),cd=H(`ZodGUID`,(e,t)=>{Vo.init(e,t),Y.init(e,t)}),ld=H(`ZodUUID`,(e,t)=>{Ho.init(e,t),Y.init(e,t)});function ud(e){return zc(ld,e)}var dd=H(`ZodURL`,(e,t)=>{Zo.init(e,t),Y.init(e,t)}),fd=H(`ZodEmoji`,(e,t)=>{Qo.init(e,t),Y.init(e,t)}),pd=H(`ZodNanoID`,(e,t)=>{$o.init(e,t),Y.init(e,t)}),md=H(`ZodCUID`,(e,t)=>{es.init(e,t),Y.init(e,t)}),hd=H(`ZodCUID2`,(e,t)=>{ts.init(e,t),Y.init(e,t)}),gd=H(`ZodULID`,(e,t)=>{ns.init(e,t),Y.init(e,t)}),_d=H(`ZodXID`,(e,t)=>{rs.init(e,t),Y.init(e,t)}),vd=H(`ZodKSUID`,(e,t)=>{is.init(e,t),Y.init(e,t)}),yd=H(`ZodIPv4`,(e,t)=>{ls.init(e,t),Y.init(e,t)}),bd=H(`ZodIPv6`,(e,t)=>{fs.init(e,t),Y.init(e,t)}),xd=H(`ZodCIDRv4`,(e,t)=>{ps.init(e,t),Y.init(e,t)}),Sd=H(`ZodCIDRv6`,(e,t)=>{hs.init(e,t),Y.init(e,t)}),Cd=H(`ZodBase64`,(e,t)=>{vs.init(e,t),Y.init(e,t)}),wd=H(`ZodBase64URL`,(e,t)=>{xs.init(e,t),Y.init(e,t)}),Td=H(`ZodE164`,(e,t)=>{Ss.init(e,t),Y.init(e,t)}),Ed=H(`ZodJWT`,(e,t)=>{ws.init(e,t),Y.init(e,t)}),Dd=H(`ZodNumber`,(e,t)=>{Ts.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hu(e,t,n,r),e.isFinite=!0},Gi({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=uu(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=uu(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=uu(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>uu(e).format??null},{gt(e,t){return this.check(_l(e,t))},gte(e,t){return this.check(vl(e,t))},min(e,t){return this.check(vl(e,t))},lt(e,t){return this.check(hl(e,t))},lte(e,t){return this.check(gl(e,t))},max(e,t){return this.check(gl(e,t))},int(e){return this.check(Ad(e))},safe(e){return this.check(Ad(e))},positive(e){return this.check(_l(0,e))},nonnegative(e){return this.check(vl(0,e))},negative(e){return this.check(hl(0,e))},nonpositive(e){return this.check(gl(0,e))},multipleOf(e,t){return this.check(yl(e,t))},step(e,t){return this.check(yl(e,t))},finite(){return this}}));function Od(e){return ll(Dd,e)}var kd=H(`ZodNumberFormat`,(e,t)=>{Es.init(e,t),Dd.init(e,t)});function Ad(e){return ul(kd,e)}var jd=H(`ZodBoolean`,(e,t)=>{Ds.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gu(e,t,n,r)});function Md(e){return dl(jd,e)}var Nd=H(`ZodNull`,(e,t)=>{Os.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_u(e,t,n,r)});function Pd(e){return fl(Nd,e)}var Fd=H(`ZodUnknown`,(e,t)=>{ks.init(e,t),q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Id(){return pl(Fd)}var Ld=H(`ZodNever`,(e,t)=>{As.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vu(e,t,n,r)});function Rd(e){return ml(Ld,e)}var zd=H(`ZodArray`,(e,t)=>{ed(),Ms.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cu(e,t,n,r),e.element=t.element},{min(e,t){return this.check(xl(e,t))},nonempty(e){return this.check(xl(1,e))},max(e,t){return this.check(bl(e,t))},length(e,t){return this.check(Sl(e,t))},unwrap(){return this.element}});function X(e,t){return Fl(zd,e,t)}var Bd=H(`ZodObject`,(e,t)=>{ed(),Rs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tu(e,t,n,r),Zi(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Jd(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(si(this._zod.def,{catchall:e}))},passthrough(){return this.clone(si(this._zod.def,{catchall:Id()}))},loose(){return this.clone(si(this._zod.def,{catchall:Id()}))},strict(){return this.clone(si(this._zod.def,{catchall:Rd()}))},strip(){return this.clone(si(this._zod.def,{catchall:void 0}))},extend(e){return Ti(this,e)},safeExtend(e){return Di(this,e)},merge(e){return Oi(this,e)},pick(e){return Si(this,e)},omit(e){return wi(this,e)},partial(...e){return ki(Qd,this,e[0])},exactPartial(...e){return ki(ef,this,e[0],`exactPartial`)},required(...e){return Ai(lf,this,e[0])}});function Z(e,t){return new Bd({type:`object`,shape:e,catchall:Rd(),...B(t)})}var Vd=H(`ZodUnion`,(e,t)=>{Bs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eu(e,t,n,r),e.options=t.options});function Hd(e,t){return new Vd({type:`union`,options:e,...B(t)})}var Ud=H(`ZodDiscriminatedUnion`,(e,t)=>{Vd.init(e,t),Hs.init(e,t)});function Wd(e,t,n){return new Ud({type:`union`,options:t,discriminator:e,...B(n)})}var Gd=H(`ZodIntersection`,(e,t)=>{Us.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Du(e,t,n,r)});function Kd(e,t){return new Gd({type:`intersection`,left:e,right:t})}var qd=H(`ZodEnum`,(e,t)=>{Ks.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yu(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new qd({...t,checks:[],...B(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new qd({...t,checks:[],...B(r),entries:i})}});function Jd(e,t){return new qd({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}var Yd=H(`ZodLiteral`,(e,t)=>{qs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bu(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Q(e,t){return new Yd({type:`literal`,values:Array.isArray(e)?e:[e],...B(t)})}var Xd=H(`ZodTransform`,(e,t)=>{ed(),Js.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Su(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new aa(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Vi(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Vi(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zd(e){return new Xd({type:`transform`,transform:e})}var Qd=H(`ZodOptional`,(e,t)=>{Xs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $d(e){return new Qd({type:`optional`,innerType:e})}var ef=H(`ZodExactOptional`,(e,t)=>{Zs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tf(e){return new ef({type:`optional`,innerType:e})}var nf=H(`ZodNullable`,(e,t)=>{Qs.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ou(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rf(e){return new nf({type:`nullable`,innerType:e})}var af=H(`ZodDefault`,(e,t)=>{$s.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function of(e,t){return new af({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():mi(t)}})}var sf=H(`ZodPrefault`,(e,t)=>{tc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cf(e,t){return new sf({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():mi(t)}})}var lf=H(`ZodNonOptional`,(e,t)=>{nc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ku(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function uf(e,t){return new lf({type:`nonoptional`,innerType:e,...B(t)})}var df=H(`ZodCatch`,(e,t)=>{ac.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ff(e,t){return new df({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:$i(t)})}var pf=H(`ZodPipe`,(e,t)=>{oc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fu(e,t,n,r),e.in=t.in,e.out=t.out});function mf(e,t){return new pf({type:`pipe`,in:e,out:t})}var hf=H(`ZodReadonly`,(e,t)=>{cc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Iu(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gf(e){return new hf({type:`readonly`,innerType:e})}var _f=H(`ZodCustom`,(e,t)=>{uc.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xu(e,t,n,r)});function vf(e,t={}){return Il(_f,e,t)}function yf(e,t){return Ll(e,t)}function bf(e){return al(rd,e)}function xf(e){return ol(id,e)}var Sf=J().min(1).refine(e=>!e.includes(`\0`)&&!/[\uD800-\uDFFF]/u.test(e),`Paths must be lossless Unicode strings without NUL.`),Cf=Sf.refine(e=>!e.startsWith(`/`)&&!/^[A-Za-z]:/.test(e)&&!(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`).some(e=>e===`.`||e===`..`||e===``)),wf=J().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/).refine(e=>!/^0+$/.test(e)),Tf=Z({commitChanged:Md(),trackedChanges:Md(),untrackedChanges:Md()}).nullable(),Ef=Cf.refine(e=>!e.endsWith(`/`)),Df=Wd(`kind`,[Z({kind:Q(`tracked`),path:Ef,xy:J().regex(/^[.MTAD]{2}$/).refine(e=>e!==`..`),submodule:Tf}),Z({kind:Q(`unmerged`),path:Ef,xy:Jd([`DD`,`AU`,`UD`,`UA`,`DU`,`AA`,`UU`]),submodule:Tf}),Z({kind:Q(`untracked`),path:Cf,xy:Pd(),submodule:Pd()})]),Of=Hd([Z({contract:Q(`repository-status`),version:Q(1),ok:Q(!0),observation:Z({id:ud(),startedAt:bf(),completedAt:bf(),consistency:Q(`best-effort`)}),repository:Z({key:J().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:J().regex(/^worktree:[0-9a-f]{64}$/),rootPath:Sf.refine(e=>e.startsWith(`/`)||/^[A-Za-z]:[/\\]/.test(e)||e.startsWith(`\\\\`)),objectFormat:Jd([`sha1`,`sha256`])}),head:Wd(`state`,[Z({state:Q(`branch`),branch:Sf,commit:wf}),Z({state:Q(`detached`),branch:Pd(),commit:wf}),Z({state:Q(`unborn`),branch:Sf,commit:Pd()})]),changes:X(Df),summary:Z({staged:Ad().nonnegative(),unstaged:Ad().nonnegative(),untracked:Ad().nonnegative(),conflicted:Ad().nonnegative()}),checks:Z({state:Q(`not-run`),reason:Q(`git-status-only`)})}).superRefine((e,t)=>{e.head.commit&&e.head.commit.length!==(e.repository.objectFormat===`sha1`?40:64)&&t.addIssue({code:`custom`,message:`Object ID does not match objectFormat.`,path:[`head`,`commit`]});let n=new Set,r={staged:0,unstaged:0,untracked:0,conflicted:0};for(let i of e.changes)n.has(i.path)&&t.addIssue({code:`custom`,message:`Duplicate path.`,path:[`changes`]}),n.add(i.path),i.kind===`unmerged`?r.conflicted++:i.kind===`untracked`?r.untracked++:(i.xy[0]!==`.`&&r.staged++,i.xy[1]!==`.`&&r.unstaged++);for(let n of[`staged`,`unstaged`,`untracked`,`conflicted`])e.summary[n]!==r[n]&&t.addIssue({code:`custom`,message:`Summary does not match changes.`,path:[`summary`,n]})}),Z({contract:Q(`repository-status`),version:Q(1),ok:Q(!1),error:Z({code:Jd([`GIT_NOT_FOUND`,`GIT_CONTEXT_OVERRIDE`,`NOT_A_REPOSITORY`,`UNSUPPORTED_REPOSITORY`,`GIT_UNSUPPORTED`,`GIT_FAILED`,`INVALID_GIT_OUTPUT`,`UNSUPPORTED_PATH_ENCODING`,`REPOSITORY_CHANGED`,`READ_LIMIT_EXCEEDED`]),message:J().min(1)})})]),kf=Z({contract:Q(`browser-session`),version:Q(1),sessionId:ud(),repository:Z({key:J().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:J().regex(/^worktree:[0-9a-f]{64}$/)})}),Af=Z({contract:Q(`browser-http-error`),version:Q(1),error:Z({code:Jd([`BAD_REQUEST`,`FORBIDDEN`,`NOT_FOUND`,`METHOD_NOT_ALLOWED`,`SESSION_CHANGED`,`SERVER_CLOSING`,`INTERNAL_ERROR`]),message:J().min(1)})});Wd(`ok`,[Z({contract:Q(`project-init`),version:Q(4),ok:Q(!0),outcome:Jd([`planned`,`created`,`already-initialized`]),rootPath:J(),configPath:Q(`.gitifact/config.json`),schemaVersion:Q(1),baseline:Wd(`kind`,[Z({kind:Q(`empty`)}),Z({kind:Q(`commit`),objectFormat:Jd([`sha1`,`sha256`]),commit:J()})]),agentDocs:Z({mode:Jd([`install`,`remove`,`skip`]),paths:X(J())})}),Z({contract:Q(`project-init`),version:Q(4),ok:Q(!1),error:Z({code:J(),message:J()})})]);var jf=Z({id:J(),title:J(),body:J()}),Mf=Z({email:J(),name:J(),commits:Od().int().nonnegative(),latest:J()}),Nf=Z({id:J(),path:J(),title:J(),description:J(),requirements:X(jf),design:Z({title:J(),body:J(),requirements:X(J())}).optional(),contributors:X(Mf),updatedAt:J().nullable()}),Pf=jf.extend({specId:J(),path:J()}).nullable(),Ff=Z({id:J(),kind:Jd([`product`,`guide`]),path:J(),title:J(),body:J(),updatedAt:J().nullable()}),If=Z({contract:Q(`browser-specs`),version:Q(1),sessionId:J(),head:J().nullable(),observedAt:J(),working:Md(),features:X(Nf),documents:X(Ff).default([]),events:X(Z({key:J(),commit:J(),date:J(),author:J(),email:J(),committer:J(),message:J(),id:J(),kind:Jd([`requirement`,`design`,`product`,`guide`]).optional(),types:X(Jd([`created`,`modified`,`moved`,`deleted`])),before:Pf,after:Pf,reasons:X(J())})),contributors:X(Mf),contributorsLimited:Md(),nextCursor:Od().int().nonnegative().nullable(),boundary:Md()}),Lf=X(J().min(1)),Rf=Z({version:J().regex(/^\d+\.\d+\.\d+$/),date:xf(),added:Lf,changed:Lf,removed:Lf,fixed:Lf}).refine(e=>e.added.length+e.changed.length+e.removed.length+e.fixed.length>0,`A version must list at least one change.`);Z({contract:Q(`changelog`),version:Q(1),language:J().regex(/^[a-z]{2}(?:-[A-Z]{2})?$/),fallback:Md(),entries:X(Rf)}).superRefine((e,t)=>{let n=new Set;for(let[r,i]of e.entries.entries())n.has(i.version)&&t.addIssue({code:`custom`,path:[`entries`,r,`version`],message:`Duplicate version.`}),n.add(i.version)});var zf={"about.title":`Gitifact 소개`,"activity.list":`활동 목록`,"activity.noReason":`변경 이유가 기록되지 않았습니다.`,"activity.recent":`최근 명세 활동`,"activity.resizeDetail":`변경 상세 너비 조절`,"api.invalidContract":`서버 응답이 지원하는 계약과 일치하지 않습니다.`,"api.invalidSession":`서버 세션 형식이 호환되지 않습니다.`,"api.invalidSpecs":`명세 응답 형식이 호환되지 않습니다.`,"api.networkError":`로컬 서버에 연결하지 못했습니다. 서버 실행 상태를 확인하세요.`,"api.otherCheckout":`다른 checkout의 응답입니다. 다시 연결하세요.`,"api.serverChanged":`서버가 변경됐습니다. 다시 연결하세요.`,"api.statusMismatch":`서버 상태와 응답 결과가 일치하지 않습니다.`,"api.unreadableResponse":`서버 응답 형식을 확인할 수 없습니다. CLI와 브라우저 버전을 확인하세요.`,"app.rootMissing":`앱을 표시할 root 요소가 없습니다.`,"change.created":`추가`,"change.deleted":`제거`,"change.modified":`변경`,"change.moved":`이동`,"common.inProgress":`작업 중`,"common.path":`경로`,"common.recentChange":`최근 변경`,"common.reconnect":`다시 연결`,"common.refresh":`새로고침`,"common.uncommitted":`미커밋`,"compare.after":`변경 후`,"compare.before":`변경 전`,"compare.hint":`핸들을 오른쪽으로 끌면 변경 전 내용이 드러납니다.`,"compare.reveal":`변경 전 드러내기`,"contributors.activity":`이 참여자의 활동 →`,"contributors.back":`← 참여자`,"contributors.backToList":`참여자 목록으로`,"contributors.cardCommits":`커밋 {count}`,"contributors.cardFeatures":`기능 {count}`,"contributors.count":`참여자 {count}명 · Git author 기준이며 커밋 수는 코드 커밋을 포함합니다.`,"contributors.detail":`참여자 상세`,"contributors.emptyDescription":`검색어를 확인하거나 첫 커밋을 남겨보세요.`,"contributors.emptyTitle":`표시할 참여자가 없습니다`,"contributors.featureShare":`명세 커밋 {commits}개 · 요구사항 {requirements}개`,"contributors.features":`참여한 기능`,"contributors.gitCommits":`Git 커밋 {count}개`,"contributors.latest":`최근 활동 {time}`,"contributors.noRecentActivity":`최근 이력에 이 참여자의 명세 활동이 없습니다. 활동 페이지에서 이전 이력을 더 불러오면 보일 수 있습니다.`,"contributors.noSpecCommits":`명세 폴더를 바꾼 커밋이 없습니다. 코드 커밋 참여와 명세 활동은 다를 수 있습니다.`,"contributors.notFoundDescription":`{email}로 기록된 Git author가 최근 커밋에 없습니다.`,"contributors.notFoundTitle":`참여자를 찾을 수 없습니다`,"design.missingRequirement":`{id} (현재 명세에 없음)`,"design.relatedRequirements":`관련 요구사항`,"documents.activity":`이 문서의 활동 →`,"documents.backToList":`{label} 문서 목록으로`,"documents.browse":`{label} 문서 탐색`,"documents.choose":`폴더를 열거나 문서를 고르세요.`,"documents.document":`{label} 문서`,"documents.emptyDescription":`에이전트와 아키텍처·코드 규칙을 정리하면 이곳에서 볼 수 있습니다.`,"documents.emptyFolder":`비어 있는 폴더입니다.`,"documents.emptyTitle":`{label} 문서가 아직 없습니다`,"documents.notFoundDescription":`{id}는 현재 {label} 문서에 없습니다. 옮겨졌거나 제거된 문서일 수 있습니다.`,"documents.notFoundTitle":`문서를 찾을 수 없습니다`,"documents.openDetail":`상세 보기`,"documents.preview":`문서 미리보기`,"event.changes":`변경 내용`,"event.committer":`커미터 {name}`,"event.currentDocument":`현재 문서 보기 →`,"event.currentFeature":`현재 기능 명세 보기 →`,"event.currentProduct":`현재 제품 개요 보기 →`,"event.deletedContent":`삭제 전 내용`,"event.noContent":`내용이 없습니다.`,"event.noReasons":`기록된 이유가 없습니다.`,"event.reasons":`변경 이유`,"features.back":`← 요구사항`,"features.backToList":`요구사항 목록으로`,"features.changeSearch":`검색어를 바꿔 보세요.`,"features.column.contributors":`참여자`,"features.column.design":`설계`,"features.column.feature":`기능`,"features.column.requirements":`요구사항`,"features.count":`기능 명세 {count}개 · 참여자와 최근 변경은 커밋된 기록 기준입니다.`,"features.detail":`기능 명세`,"features.emptyDescription":`에이전트와 기능 명세를 정리하고 커밋하면 이곳에서 볼 수 있습니다.`,"features.emptyTitle":`일치하는 기능이 없습니다.`,"features.hasDesign":`있음`,"features.history":`기능 변경 이력 →`,"features.index":`명세 목차`,"features.indexTitle":`이 명세의 요구사항`,"features.noDesign":`없음`,"features.noDesignDescription":`에이전트와 구현 방식을 정리하면 이곳에서 볼 수 있습니다.`,"features.noDesignTitle":`아직 작성된 설계가 없습니다.`,"features.noRequirements":`현재 요구사항이 없는 기능입니다.`,"features.notFoundDescription":`{id}는 현재 명세에 없습니다. 이름이 바뀌었거나 제거된 기능일 수 있습니다.`,"features.notFoundTitle":`기능을 찾을 수 없습니다`,"features.requirementCount":`요구사항 {count}개`,"features.requirementHistory":`이 요구사항의 이력 →`,"features.requirementNumber":`요구사항 {number}`,"features.tab.design":`설계`,"features.tab.requirements":`요구사항`,"filters.allAuthors":`모든 작성자`,"filters.allChanges":`모든 변경`,"filters.allDocuments":`전체 명세`,"filters.allFeatures":`모든 기능`,"filters.author":`작성자 필터`,"filters.change":`변경 종류`,"filters.document":`명세 종류`,"filters.feature":`기능 필터`,"filters.search":`검색`,"filters.searchContributors":`이름 또는 이메일 검색`,"filters.searchEvents":`이름 또는 ID 검색`,"filters.searchFeatures":`기능·요구사항 검색`,"git.branch":`브랜치`,"git.changeSummary":`변경 경로 {count}개 · 코드의 첫 글자는 staged, 두 번째는 unstaged이며 .은 변경 없음입니다.`,"git.checksNote":`gitifact 요구사항 검사는 아직 실행하지 않습니다.`,"git.cleanDescription":`작업 트리가 마지막 커밋과 같습니다.`,"git.cleanTitle":`변경된 파일이 없습니다`,"git.column.code":`코드`,"git.column.extra":`추가 정보`,"git.column.path":`경로`,"git.column.state":`상태`,"git.conflict":`충돌`,"git.connecting":`로컬 서버에 연결하고 있습니다.`,"git.noCommits":`아직 커밋이 없습니다`,"git.observedNote":`관측한 Git 상태이며 파일 내용을 고정한 스냅샷은 아닙니다.`,"git.previousResult":`이전 조회 결과입니다. 상단의 조회 시각을 참고하세요.`,"git.reading":`저장소 상태를 읽고 있습니다.`,"git.refresh":`상태 새로고침`,"git.refreshing":`조회 중…`,"git.repository":`저장소`,"git.repositoryState":`저장소 상태`,"git.submoduleCommit":`submodule 커밋 변경`,"git.submoduleTracked":`내부 tracked 변경`,"git.submoduleUntracked":`내부 untracked 변경`,"git.summary":`변경 집계`,"git.viewRequirements":`요구사항 보기 →`,"git.workingNotice":`요구사항·제품 개요·지침 화면은 작업 중인 내용이고, 활동은 커밋된 내용입니다. 커밋은 에이전트에게 요청하세요.`,"git.workingTitle":`미커밋 명세 변경이 있습니다`,"header.location":`현재 위치`,"header.observedAt":`{time} 조회`,"history.changeFilters":`필터를 바꾸거나 이전 이력을 더 불러오세요.`,"history.contributorsLimited":`참여자는 최근 10,000개 Git 커밋 기준입니다.`,"history.emptyDescription":`에이전트와 요구사항을 정리하고 커밋하면 이곳에서 변경 활동을 볼 수 있습니다.`,"history.emptyTitle":`표시할 활동이 없습니다.`,"history.filtersApplyToLoaded":`검색·필터는 불러온 범위에 적용됩니다.`,"history.legacyBoundary":`새 명세 도입 이전의 구형 기록은 표시하지 않습니다.`,"history.loadMore":`이전 이력 더 보기`,"history.loaded":`{count}개 이력을 불러왔습니다.`,"history.loadingMore":`이전 이력 불러오는 중…`,"history.reachedEnd":`마지막 이력까지 확인했습니다.`,"history.retryMore":`이전 이력 다시 불러오기`,"history.selectedMissing":`선택한 변경은 현재 불러온 범위에 없습니다. 이전 이력을 더 불러오세요.`,"history.staleData":`이전 조회 자료입니다. 현재 상태로 확정하지 마세요.`,"kind.design":`설계`,"kind.guide":`지침 문서`,"kind.product":`제품 문서`,"kind.requirement":`요구사항`,"nav.about":`소개`,"nav.contributors":`참여자`,"nav.features":`요구사항`,"nav.git":`Git 상태`,"nav.guides":`지침`,"nav.history":`활동`,"nav.product":`제품 개요`,"notFound.description":`주소를 확인하거나 활동으로 돌아가세요.`,"notFound.home":`처음으로`,"notFound.title":`페이지를 찾을 수 없습니다`,"overview.activityLink":`활동 →`,"overview.allRequirements":`전체 요구사항 →`,"overview.byFeature":`기능별 요구사항`,"overview.byFeatureList":`기능별 요구사항 수`,"overview.commitsByContributor":`참여자별 커밋`,"overview.contributorsLink":`참여자 →`,"overview.emptyDescription":`에이전트와 제품의 목적·대상 사용자·원칙·범위를 정리하면 .gitifact/product/PRODUCT.md로 저장되어 이곳에 나타납니다.`,"overview.emptyTitle":`제품 개요가 아직 없습니다`,"overview.featureRequirements":`{title} 요구사항`,"overview.legend":`{label} 범례`,"overview.loadedEvents":`불러온 활동 {count}건`,"overview.noActivity":`커밋된 명세 활동이 아직 없습니다.`,"overview.noData":`아직 자료가 없습니다.`,"overview.noDesign":`설계 없음`,"overview.noFeatures":`아직 기능 명세가 없습니다.`,"overview.otherContributors":`그 외 {count}명`,"overview.productBody":`제품 설명`,"overview.productHistory":`제품 개요 변경 이력 →`,"overview.recentChangeTypes":`최근 변경 종류`,"overview.requirementCount":`{count}개`,"overview.stat.average":`기능당 평균 {average}개`,"overview.stat.committedOnly":`커밋된 명세 기준`,"overview.stat.contributors":`참여자`,"overview.stat.contributorsDetail":`Git author 기준`,"overview.stat.designRatio":`설계가 있는 기능 비율`,"overview.stat.designs":`설계 작성`,"overview.stat.features":`기능 명세`,"overview.stat.guides":`지침 문서`,"overview.stat.guidesDetail":`아키텍처·코드 규칙`,"overview.stat.includesWorking":`작업 중인 내용 포함`,"overview.stat.requirements":`요구사항`,"overview.summary":`현재 명세 요약`,"overview.topFeatures":`상위 8개 기능입니다.`,"overview.uncommittedToken":`미커밋 변경`,"project.local":`로컬 프로젝트`,"request.failed":`불러오지 못했습니다`,"request.loading":`불러오는 중`,"request.loadingProject":`프로젝트 불러오는 중`,"request.loadingRecords":`프로젝트 기록을 불러오고 있습니다.`,"shell.askAgent":`변경할 내용은 에이전트와 이야기하세요.`,"shell.home":`GITIFACT 홈`,"shell.readOnly":`로컬 프로젝트 · 읽기 전용`,"shell.workingChanges":`미커밋 명세 변경 있음`,"shell.workingChangesTooltip":`미커밋 명세 변경 있음 · Git 상태에서 확인`},Bf=`<p align="center">
|
|
57
|
+
<img src="packages/intro/assets/gitifact-logo.svg" alt="GITIFACT" width="720" />
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
Gitifact는 Git과 Artifact를 합친 이름입니다. 제품의 요구사항과 설계, 에이전트가 참고할 지침을 저장소의 Markdown 문서로 두고 Git으로 관리합니다. 그리고 요구사항이 언제, 왜 추가·변경·삭제됐는지를 함께 남깁니다.
|
|
61
|
+
|
|
62
|
+
## 에이전트에게 시작을 맡기세요
|
|
63
|
+
|
|
64
|
+
아래 프롬프트를 프로젝트에서 사용하는 에이전트에게 전달하세요.
|
|
65
|
+
|
|
66
|
+
\`\`\`text
|
|
67
|
+
이 프로젝트에 gitifact가 없으면 npm install -g gitifact@latest로 설치하고 gitifact init을 실행하세요.
|
|
68
|
+
init이 AGENTS.md 등에 쓴 GITIFACT 블록을 읽고 이번 세션부터 따르세요.
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
Node.js 24.x와 Git이 필요합니다. \`init\`은 프로젝트의 AGENTS.md 같은 에이전트 지침 파일에 작업 규칙 블록을 씁니다. 그 뒤로는 평소처럼 제품을 설명하고 개발을 이어가면 됩니다. CLI를 업데이트했다면 \`init\`을 다시 실행해 블록을 갱신하세요. 명령 목록은 [CLI 안내](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/README.md)에 있습니다.
|
|
72
|
+
|
|
73
|
+
## 제품에 집중할 수 있도록
|
|
74
|
+
|
|
75
|
+
Gitifact의 목표는 에이전트와 함께 제품을 만드는 사람이 제품을 만드는 일 자체에 집중하게 하는 것입니다. 개발자든 비개발자든, CLI·데스크탑 앱·VS Code 어디에서 에이전트와 대화하든 마찬가지입니다.
|
|
76
|
+
|
|
77
|
+
스펙 주도 개발 같은 방법론을 먼저 이해하고 따를 필요는 없습니다. 평소처럼 무엇을 만들지 이야기하고, 구현하고, 고쳐나가면 에이전트가 대화에서 요구사항을 정리하고 그것이 추가·변경·삭제된 이유를 기록합니다. 기록을 위해 명령을 외우거나 문서를 따로 관리하지 않아도 됩니다. Gitifact는 사용자의 작업을 가로막지 않고, 사용자에게 익숙한 방식과 수준에 맞춰 뒤에서 동작하는 것을 지향합니다.
|
|
78
|
+
|
|
79
|
+
이렇게 쌓인 기록은 사람에게는 제품이 어떻게 지금에 이르렀는지를, 에이전트에게는 다음 작업을 이어갈 맥락을 줍니다.
|
|
80
|
+
|
|
81
|
+
## Git만으로 부족했던 것
|
|
82
|
+
|
|
83
|
+
Gitifact는 전혀 새로운 발상에서 나오지 않았습니다. 요구사항과 지침을 저장소의 Markdown으로 두고 에이전트가 읽게 하는 방식은 이미 널리 쓰이고 있고, 스펙 주도 개발 도구들에서도 많은 아이디어를 가져왔습니다. 다만 그 방식들에서 채워지지 않은 부분이 있었습니다. **명세가 언제, 어떤 이유로 바뀌었는가**입니다. 요구사항 문서를 어떤 관점으로 추적할지 다시 생각하게 된 계기는 Anthropic의 [AI-Native SDLC Playbook](https://academy.claude.com/courses/ai-native-sdlc-playbook)이었습니다. 다만 Gitifact가 그 글이 제시한 방식을 그대로 따르지는 않습니다.
|
|
84
|
+
|
|
85
|
+
Git은 뛰어난 추적 도구지만 추적의 단위는 파일과 줄, 그리고 커밋입니다. 반면 요구사항은 문서 안의 한 절이고, 제목이 바뀌거나 다른 문서로 옮겨지기도 합니다. 커밋 메시지는 코드와 문서가 섞인 변경 전체를 한 번에 설명하므로, 특정 요구사항이 왜 바뀌었는지는 여러 커밋의 메시지와 diff, 이미 지나간 대화 속에 흩어집니다. Git이 이 정보를 담지 못한다기보다, 순수한 Markdown 문서와 커밋만으로는 기록을 보는 관점이 한곳에 모이지 않습니다.
|
|
86
|
+
|
|
87
|
+
그래서 Gitifact는 Git 위에 최소한의 장치만 더합니다.
|
|
88
|
+
|
|
89
|
+
- **문서 규칙.** 기능마다 요구사항(requirements.md)과 설계(design.md)를 두고, 요구사항마다 CLI가 발급한 ID를 붙입니다. 제목이나 위치가 바뀌어도 같은 요구사항으로 이어서 추적합니다.
|
|
90
|
+
- **커밋 시점의 연결.** 커밋할 때 바뀐 요구사항과 그 이유를 ID로 묶어 같은 커밋에 담습니다. 이유가 빠진 변경이 있으면 커밋 결과에서 알려줍니다.
|
|
91
|
+
- **이력은 Git에.** 과거 원문, 작성자, 시각을 따로 복제하지 않고 Git 커밋에서 읽습니다. 별도로 남기는 것은 변경 이유와 그 연결뿐입니다.
|
|
92
|
+
|
|
93
|
+
이런 문제는 보통 에이전트 스킬이나 MCP로 풀려고 합니다. 하지만 둘 다 표준화됐어도 에이전트마다 동작 방식이 달라, 이를 지원하려다 보면 도입 과정이 오히려 복잡해질 수 있습니다. Gitifact는 CLI와 AGENTS.md 같은 에이전트 지침 파일만으로 동작하므로, 프로젝트나 모델에 따라 스킬 구성을 따로 고민할 필요가 없습니다.
|
|
94
|
+
|
|
95
|
+
이 기록은 읽기 전용 브라우저에서 요구사항별 활동으로 볼 수 있습니다.
|
|
96
|
+
|
|
97
|
+
## 커밋된 명세를 기준으로
|
|
98
|
+
|
|
99
|
+
작업 중 에이전트와 대화하며 명세를 다듬고, 커밋할 때 최종 변경과 맞는지 확인하는 방식입니다. 초안의 모든 수정 과정을 따로 보존하지 않고 Git에 남은 버전에서 과거 내용과 변경 전후를 읽습니다. 자동 기록은 자동 커밋·푸시 권한이 아니며 프로젝트의 정책을 따릅니다.
|
|
100
|
+
|
|
101
|
+
## 처음부터 완벽하게 정리하지 않아도
|
|
102
|
+
|
|
103
|
+
기존 프로젝트에는 도입한 시점부터 기록을 쌓아가면 됩니다. 유지보수하거나 기능을 추가하면서 해당 영역의 요구사항을 정리하면 되고, 과거 전체를 먼저 문서화해야 시작할 수 있는 흐름은 요구하지 않습니다. 원한다면 에이전트에게 기존 기능을 살펴보고 요구사항과 설계 초안을 함께 정리하도록 맡길 수 있습니다.
|
|
104
|
+
|
|
105
|
+
새 프로젝트라면 처음 아이디어를 나누는 대화부터 시작하면 됩니다. 만들고 싶은 제품을 구체화하는 동안 에이전트가 요구사항과 구현 설계를 함께 정리하고 불명확한 제품 동작을 질문합니다.
|
|
106
|
+
|
|
107
|
+
## 적용 범위와 한계
|
|
108
|
+
|
|
109
|
+
Gitifact는 개인이나 팀이 **하나의 Git 저장소 안에서 제품을 만드는 환경**을 전제로 합니다. 하나의 제품을 여러 저장소로 나누어 운영하는 멀티 레포의 통합 요구사항 관리는 지원하지 않습니다. 이슈 트래커 연계는 검토한 적이 있지만 개발 여부와 일정은 미정입니다.
|
|
110
|
+
|
|
111
|
+
## 프로젝트 상태
|
|
112
|
+
|
|
113
|
+
Markdown 요구사항·설계와 커밋 시점의 변경 이유를 Git에 연결하고, 읽기 전용 브라우저에서 활동·요구사항·참여자를 볼 수 있습니다. 에이전트에게 "gitifact 브라우저를 열어주세요"라고 요청하세요. 이전 Tryce 프로젝트는 \`gitifact migrate\`로 전환합니다.
|
|
114
|
+
|
|
115
|
+
최신 공개 버전은 [npm](https://www.npmjs.com/package/gitifact)에서, 버전별 변경 내역은 [패치노트](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/src/shared/i18n/ko/changelog.md)에서 확인하세요.
|
|
116
|
+
|
|
117
|
+
제품의 목적·원칙·범위는 [제품 개요](https://github.com/dev-goraebap/gitifact/blob/main/.gitifact/product/PRODUCT.md)에서, 기능별 요구사항과 설계는 [요구사항](https://github.com/dev-goraebap/gitifact/tree/main/.gitifact/spec)에서 확인할 수 있습니다.
|
|
118
|
+
|
|
119
|
+
## Gitifact 개발에 참여하려면
|
|
120
|
+
|
|
121
|
+
실행·빌드·검증은 [개발 환경](https://github.com/dev-goraebap/gitifact/blob/main/docs/development.md), 코드 구조는 [아키텍처 지침](https://github.com/dev-goraebap/gitifact/blob/main/.gitifact/guides/architecture.md)을 참고하세요.
|
|
122
|
+
|
|
123
|
+
## 라이선스
|
|
124
|
+
|
|
125
|
+
[MIT](https://github.com/dev-goraebap/gitifact/blob/main/LICENSE). 배포물에 포함된 의존성의 라이선스 고지는 \`dist/THIRD_PARTY_NOTICES.txt\`에 제공합니다.
|
|
126
|
+
`,Vf={ko:zf},Hf={ko:{about:Bf}},Uf=/\{(\w+)\}/g;function Wf(e,t={},n=`ko`){return Vf[n][e].replace(Uf,(e,n)=>n in t?String(t[n]):e)}function Gf(e,t,n=`ko`){return Vf[n][e].split(Uf).map((e,n)=>n%2==0?e:(0,F.createElement)(F.Fragment,{key:n},e in t?t[e]:`{`+e+`}`))}function Kf(e,t=`ko`){return Hf[t][e]}var qf=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`ApiError`}};async function Jf(e,t={}){let n;try{n=await fetch(e,{...t,cache:`no-store`})}catch(e){throw e instanceof Error&&e.name===`AbortError`?e:new qf(Wf(`api.networkError`),`NETWORK_ERROR`)}try{return{response:n,data:await n.json()}}catch{throw new qf(Wf(`api.unreadableResponse`),`INVALID_RESPONSE`)}}var Yf=[`browser-session`,1,window.location.origin];function Xf(e){let t=Af.safeParse(e);throw t.success?new qf(t.data.error.message,t.data.error.code):new qf(Wf(`api.invalidContract`),`INVALID_RESPONSE`)}var Zf=()=>Tr({queryKey:Yf,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!0,queryFn:async({signal:e})=>{let{response:t,data:n}=await Jf(`/api/v1/session`,{signal:e});if(!t.ok)return Xf(n);let r=kf.safeParse(n);if(!r.success)throw new qf(Wf(`api.invalidSession`),`INVALID_RESPONSE`);return r.data}});function Qf(e){return[`repository-status`,1,window.location.origin,e.sessionId,e.repository.key,e.repository.worktreeKey]}async function $f(e,t,n){let{response:r,data:i}=await Jf(`/api/v1/status`+(t?`/refresh`:``),{method:t?`POST`:`GET`,headers:{"X-Gitifact-Session":e.sessionId},...n?{signal:n}:{}}),a=Of.safeParse(i);if(!a.success)return Xf(i);if(!a.data.ok)throw new qf(a.data.error.message,a.data.error.code);if(!r.ok)throw new qf(Wf(`api.statusMismatch`),`INVALID_RESPONSE`);if(a.data.repository.key!==e.repository.key||a.data.repository.worktreeKey!==e.repository.worktreeKey)throw new qf(Wf(`api.otherCheckout`),`SESSION_CHANGED`);return a.data}var ep=e=>Tr({queryKey:Qf(e),staleTime:5e3,retry:!1,queryFn:({signal:t})=>$f(e,!1,t)}),tp=e=>$f(e,!0);function np(){let e=wr(Zf());return e.data?(0,I.jsx)(rp,{session:e.data}):(0,I.jsx)(j,{type:`supporting`,color:`secondary`,children:Wf(`project.local`)})}function rp({session:e}){let t=wr(ep(e)).data?.repository.rootPath;return(0,I.jsx)(j,{type:`supporting`,color:`secondary`,children:t?.split(/[\/]/).filter(Boolean).at(-1)??Wf(`project.local`)})}var ip=e=>Er({queryKey:[`browser-specs`,1,window.location.origin,e.sessionId,e.repository.worktreeKey],initialPageParam:{cursor:0,head:``},staleTime:5e3,retry:!1,queryFn:async({signal:t,pageParam:n})=>{let{response:r,data:i}=await Jf(`/api/v1/specs`+(n.cursor?`?cursor=${n.cursor}&head=${n.head}`:``),{signal:t,headers:{"X-Gitifact-Session":e.sessionId}});if(!r.ok)return Xf(i);let a=If.safeParse(i);if(!a.success)throw new qf(Wf(`api.invalidSpecs`),`INVALID_RESPONSE`);if(a.data.sessionId!==e.sessionId)throw new qf(Wf(`api.serverChanged`),`SESSION_CHANGED`);return a.data},getNextPageParam:e=>e.nextCursor===null?void 0:{cursor:e.nextCursor,head:e.head??``}}),ap={contract:`browser-session`,version:1,sessionId:``,repository:{key:``,worktreeKey:``}},op=/^\.(?:gitifact|tryce)\//;function sp(){let e=wr(Zf()),t=Dr({...ip(e.data??ap),enabled:!1}),n=wr({...ep(e.data??ap),enabled:!!e.data&&!e.error}),r=t.data?.pages[0]?.working,i=n.data?n.data.changes.some(e=>op.test(e.path)):void 0;if(r!==void 0||i!==void 0)return!!r||!!i}function cp({data:e,size:t}){return(0,I.jsx)(`svg`,{viewBox:`0 0 24 24`,width:`${t/16}rem`,height:`${t/16}rem`,style:{flexShrink:0},fill:`none`,"aria-hidden":`true`,focusable:`false`,children:e.map(([e,t],n)=>(0,F.createElement)(e,{...t,key:n}))})}var lp={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k9WMMc:`x2b8uid`,kOIVth:`x18g69wz`,k8WAf4:`xmfvnks`,kg3NbH:`xm7rs69`,$$css:!0},containerCompact:{kOIVth:`x1txdalj`,k8WAf4:`x1na6nto`,kg3NbH:`x1pzlopt`,$$css:!0}};function up({title:e,description:n,icon:r,actions:i,headingLevel:a=3,isCompact:o=!1,xstyle:c,className:l,style:u,ref:d,...f}){let p=`h${a}`;return(0,I.jsxs)(`div`,{ref:d,...f,role:`status`,...g(s(`empty-state`,{variant:o?`compact`:null}),t(lp.container,o&&lp.containerCompact,c),l,u),children:[r!=null&&(0,I.jsx)(`div`,{"aria-hidden":`true`,children:r}),(0,I.jsxs)(`div`,{className:`x78zum5 xdt5ytf x6s0dn4 xxc7z9f`,children:[(0,F.createElement)(p,g(s(`empty-state-title`,{variant:o?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0`},1:{className:`x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib`}}[!!o<<0]),e),n!=null&&(0,I.jsx)(`div`,{...g(s(`empty-state-description`,{variant:o?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4`},1:{className:`x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d`}}[!!o<<0]),children:n})]}),i!=null&&(0,I.jsx)(`div`,{...{0:{className:`x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d`},1:{className:`x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf`}}[!!o<<0],children:i})]})}up.displayName=`EmptyState`;function dp({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,I.jsx)(Wr,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}dp.displayName=`HStack`;function fp(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&e.key!==` `}function pp(e){let{getItemLabels:t,onMatch:n,getCurrentIndex:r,resetMs:i=750,isDisabled:a}=e,o=(0,F.useRef)(``),s=(0,F.useRef)(void 0),c=(0,F.useCallback)(()=>{o.current=``,s.current&&=(clearTimeout(s.current),void 0)},[]),l=(0,F.useCallback)(()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=``,s.current=void 0},i)},[i]);return{onKeyDown:(0,F.useCallback)(e=>{let i=e.key===` `&&!e.ctrlKey&&!e.metaKey&&o.current.length>0;if(!fp(e)&&!i)return!1;let s=t();if(s.length===0)return!1;let c=e.key.toLowerCase(),u=o.current.length>0&&o.current.split(``).every(e=>e===c)?c:o.current+c;o.current=u,l();let d=r?.()??-1,f=s.length,p=d>=0,m=p?d:0,h=p&&u.length===1?1:0;for(let e=0;e<f;e++){let t=(m+h+e+f)%f;if(a?.(t))continue;let r=s[t];if(r!=null&&r.trim().toLowerCase().startsWith(u))return n(t),!0}return!0},[t,n,r,l,a]),reset:c}}var mp=500,hp=10;function gp(e){let{onLongPress:t,disabled:n=!1,delayMs:r=mp,moveCancelPx:i=hp}=e,a=(0,F.useRef)(null),o=(0,F.useRef)(null),s=(0,F.useRef)(t);s.current=t;let c=(0,F.useCallback)(()=>{a.current!=null&&(clearTimeout(a.current),a.current=null),o.current=null},[]),l=(0,F.useCallback)(e=>{if(n)return;if(e.touches.length!==1){c();return}let t=e.touches[0];c(),o.current={x:t.clientX,y:t.clientY},a.current=setTimeout(()=>{let e=o.current;e!=null&&s.current({x:e.x,y:e.y})},r)},[n,r,c]),u=(0,F.useCallback)(e=>{let t=o.current;if(t==null)return;if(e.touches.length!==1){c();return}let n=e.touches[0];(Math.abs(n.clientX-t.x)>i||Math.abs(n.clientY-t.y)>i)&&c()},[i,c]);return(0,F.useEffect)(()=>c,[c]),{onTouchStart:l,onTouchMove:u,onTouchEnd:c,onTouchCancel:c}}var _p={horizontal:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kzqmXN:`xh8yej3`,$$css:!0},vertical:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kZKoxP:`x5yr21d`,$$css:!0}},vp={horizontalLine:{kZKoxP:`xsyqizj`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},verticalLine:{kzqmXN:`xjk4fl7`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},subtle:{kWkggS:`x1m4xfpy`,$$css:!0},strong:{kWkggS:`x7njt3n`,$$css:!0}},yp={horizontal:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,kzqmXN:`xx6qvi6`,$$css:!0},vertical:{keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,kZKoxP:`x12qplqi`,$$css:!0}};function bp({orientation:e=`horizontal`,label:n,variant:r=`subtle`,isFullBleed:i=!1,xstyle:a,className:o,style:c,ref:l,"aria-label":u,"aria-labelledby":d,...f}){let p=e===`horizontal`,m=(0,F.useId)(),h=d??(n&&u==null?m:void 0);return(0,I.jsxs)(`div`,{ref:l,...f,role:`separator`,"aria-orientation":e,"aria-label":u,"aria-labelledby":h,...g(s(`divider`,{variant:r,orientation:e}),t(p?_p.horizontal:_p.vertical,i&&(p?yp.horizontal:yp.vertical),a),o,c),children:[(0,I.jsx)(`div`,{...t(p?vp.horizontalLine:vp.verticalLine,vp[r])}),n&&(0,I.jsx)(`div`,{id:m,...{0:{className:`x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4`},1:{className:`x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82`}}[!p<<0],children:n}),n&&(0,I.jsx)(`div`,{...t(p?vp.horizontalLine:vp.verticalLine,vp[r])})]})}bp.displayName=`Divider`;var xp=(0,F.createContext)(null);xp.displayName=`ItemDescriptionContext`;var Sp=new Set([`option`,`tab`,`row`,`gridcell`,`columnheader`,`rowheader`,`treeitem`]),$={root:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kg3NbH:`xf314gf`,kVAEAm:`x1n2onr6`,kB7OPa:`x9f619`,k9WMMc:`x1yc453h`,kaIpWk:`xh6dtrn`,$$css:!0},alignStart:{kGNEyG:`x1cy8zhl`,$$css:!0},interactive:{kkrTdU:`x1ypdohk x16khyan`,k1ekBW:`x15406qy`,kIyJzY:`xkvfbh3`,kAMwcw:`xlr8y92`,$$css:!0},highlighted:{kWkggS:`x1lmrjuc`,$$css:!0},selected:{kWkggS:`xgcxg3y`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kfzvcC:`x47corl`,$$css:!0},inlineLabel:{kmuXW:`x2lah0s`,$$css:!0},inlineDescription:{kmuXW:`xs83m0k`,k7Eaqz:`xeuugli`,$$css:!0},label:{kMwMTN:`x5tbw38`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},labelSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},labelMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0},description:{kMwMTN:`x1gb3s7i`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},descriptionSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},descriptionMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},Cp={lineClamp:e=>[{kJFfOR:e==null?e:`x1yhjpo9`,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},wp={compact:{k8WAf4:`xu0wf1k`,$$css:!0},balanced:{k8WAf4:`xce4md1`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`xrrkdod`,$$css:!0}};function Tp({as:e=`div`,marker:n,startContent:r,label:i,description:a,endContent:o,align:c=`center`,density:l=`balanced`,labelLines:u,descriptionLines:d,layout:f=`stacked`,onClick:p,interactiveRef:m,href:h,target:_,rel:v,isHighlighted:y=!1,isSelected:b=!1,isDisabled:x=!1,xstyle:S,className:C,style:T,ref:E,role:D,...ee}){let O=re(),A=m!=null,te=(0,F.useRef)(null),{onClick:j}=ve({containerRef:te,interactiveRef:m??void 0,disabled:x});P(`Item`,"`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",A&&(p!=null||h!=null));let ne=p!=null||h!=null||A,{target:ie,rel:ae}=we(_,v),N=D!=null,oe=D!=null&&Sp.has(D),se=(0,F.useId)(),ce=fe(a),le=typeof i==`string`,ue=typeof a==`string`,de=u==null?le?$.labelSingleTruncate:null:u===1?$.labelSingleTruncate:$.labelMultiTruncate,L=f===`inline`&&a!=null,R=d==null?ue||L?$.descriptionSingleTruncate:null:d===1?$.descriptionSingleTruncate:$.descriptionMultiTruncate,pe=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{...t($.label,L&&$.inlineLabel,de,u!=null&&u>1&&Cp.lineClamp(u)),children:i}),a!=null&&(0,I.jsx)(`span`,{id:ce?se:void 0,...t($.description,L&&$.inlineDescription,R,d!=null&&d>1&&Cp.lineClamp(d)),children:a})]}),me=e=>{x||e.target.closest(`button, a, input, select, textarea`)||p?.(e)},he=(0,I.jsxs)(I.Fragment,{children:[n,r!=null&&(0,I.jsx)(`span`,{className:`x3psx0u x78zum5`,children:r}),N||A?(0,I.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}):h==null?p==null?(0,I.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}):(0,I.jsx)(`button`,{type:`button`,onClick:p,disabled:x,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}):(0,I.jsx)(O,{href:h,target:ie,rel:ae,"aria-disabled":x||void 0,tabIndex:x?-1:void 0,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!L<<1|!!x<<0],children:pe}),o!=null&&(0,I.jsx)(`span`,{...{0:{className:`x3psx0u x78zum5 xvc5jky`},1:{className:`x3psx0u x78zum5 xvc5jky xbyyjgo`}}[!!x<<0],children:o})]}),ge=k(E,te);return(0,I.jsx)(e,{ref:A?ge:E,...ee,"aria-selected":oe&&b||void 0,"aria-current":ee[`aria-current`]??(b&&!oe?!0:void 0),"aria-disabled":x||void 0,...g(s(`item`,{density:l,align:c}),w.focusWithin($.root,wp[l],c===`start`&&$.alignStart,ne&&$.interactive,ne&&M.backgroundColor,y&&$.highlighted,b&&$.selected,x&&!N&&$.disabled,S),C,T),role:D,onClick:A?j:N?p:ne?me:void 0,children:(0,I.jsx)(xp,{value:ce?se:null,children:he})})}Tp.displayName=`Item`;var Ep=`(max-width: 768px) and (pointer: coarse)`;function Dp(e){let t=v(Ep);return e===`adaptive`?t?`bottom-sheet`:`popover`:e}function Op(e){let t=0,n=0,r=[];for(let i of e){let e=i.width;if(e?.type===`pixel`)n+=e.value;else{let n=e?.value??1,a=e==null?0:e.minWidth??120;t+=n,r.push({key:i.key,proportion:n,minWidth:a})}}let i=0;if(t>0)for(let e of r){let n=e.minWidth*t/e.proportion;n>i&&(i=n)}let a=n+i,o=new Map;for(let n of e){let e=n.width,r={};if(e?.type===`pixel`)r.width=`${e.value}px`,r.minWidth=`${e.value}px`;else{let n=e?.value??1;t>0&&(r.width=`${n/t*100}%`),e!=null&&(r.minWidth=`${e.minWidth??120}px`)}o.set(n.key,{style:r})}return{columns:o,tableMinWidth:a}}function kp(e=1,t){return{type:`proportional`,value:e,minWidth:t?.minWidth??120}}function Ap(e){return{type:`pixel`,value:e}}function jp(e){if(e.length===0)return e;let t=L(e);return t.toUpperCase()+e.slice(t.length)}function Mp(e,t){let n=e[t];return n==null?``:n instanceof Date?n.toISOString():typeof n==`string`||typeof n==`number`||typeof n==`boolean`||typeof n==`bigint`?String(n):``}function Np(e){return e==null?0:typeof e==`string`?e.length:typeof e==`number`||typeof e==`boolean`?String(e).length:0}function Pp(e){if(e==null||typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`)return 0;let t=String(e),n=0,r=0;for(let e=0;e<=t.length;e++)e===t.length||t[e]===` `||t[e]===` `||t[e]===`
|
|
127
|
+
`?(r>n&&(n=r),r=0):r++;return n}var Fp=60,Ip=8;function Lp(e){if(e.length===0)return[];let t=e[0],n=Object.keys(t),r=e.slice(0,Math.min(5,e.length));return n.map(e=>{let t=jp(e).length,n=t,i=t;for(let t of r){let r=Np(t[e]);r>n&&(n=r);let a=Pp(t[e]);a>i&&(i=a)}return{key:e,headerLen:t,maxContentLen:n,maxWordLen:i}}).map(e=>{let t=e.maxContentLen<=6?1:e.maxContentLen<=15?2:3,n=Math.max(Math.max(e.headerLen,e.maxWordLen)*Ip,Fp);return{key:e.key,header:jp(e.key),width:kp(t,{minWidth:n})}})}var Rp=(0,F.createContext)(null);Rp.displayName=`ListContext`;var zp={list:{kogj98:`x1ghz6dp`,kZCmMZ:`x1c1uobl`,kH6xsr:`x3ct3a4`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,$$css:!0},withDividers:{kOIVth:`xxhr3t`,$$css:!0},withCounter:{kt6KFK:`xif0320`,$$css:!0}},Bp={kt6KFK:`x1khind5`,$$css:!0},Vp={counterStart:e=>[Bp,{"--x-counterReset":`astryx-list ${e}`==null?void 0:`astryx-list ${e}`}]};function Hp({children:e,density:n=`balanced`,hasDividers:r=!1,header:i,listStyle:a=`none`,start:o,xstyle:c,className:l,style:u,"data-testid":d,ref:f,...p}){let m=(0,F.useId)(),h=a===`decimal`,_=h?`ol`:`ul`,v=(0,F.useMemo)(()=>({density:n,hasDividers:r,listStyle:a}),[n,r,a]),y=(0,I.jsx)(_,{ref:f,...p,"data-testid":d,...i==null?null:{"aria-labelledby":m},...h&&o!=null&&o!==1?{start:o}:{},role:`list`,...g(s(`list`,{density:n,listStyle:a}),t(zp.list,r&&zp.withDividers,a!==`none`&&(o!=null&&o!==1?Vp.counterStart(o-1):zp.withCounter),c),l,u),children:e});return i==null?(0,I.jsx)(Rp,{value:v,children:y}):(0,I.jsx)(Rp,{value:v,children:(0,I.jsxs)(`div`,{className:`x78zum5 xdt5ytf`,children:[(0,I.jsx)(`div`,{id:m,className:`x1p37lm5`,children:i}),y]})})}Hp.displayName=`List`;var Up={withCounter:{kAmcRD:`xfrknyr`,$$css:!0},withDivider:{kt9PQ7:`x92x3c3`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Wp={noRadius:{kaIpWk:`x2u8bby`,$$css:!0}};function Gp({label:e,description:t,startContent:n,endContent:r,onClick:i,interactiveRef:a,href:o,target:c,rel:l,isDisabled:u=!1,isSelected:d=!1,xstyle:f,className:p,style:m,ref:h,..._}){let v=(0,F.use)(Rp),y=v?.density??`balanced`,b=v?.hasDividers??!1,x=v?.listStyle??`none`;return(0,I.jsx)(Tp,{as:`li`,ref:h,marker:x===`disc`?(0,I.jsx)(`span`,{className:`xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv`,children:(0,I.jsx)(`span`,{className:`x1v4s8kt xols6we x16rqkct x19aspcf`})}):x===`circle`?(0,I.jsx)(`span`,{className:`xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv`,children:(0,I.jsx)(`span`,{className:`x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w`})}):x===`decimal`?(0,I.jsx)(`span`,{className:`xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5`}):null,startContent:n,label:e,description:t,endContent:r,onClick:i,interactiveRef:a,href:o,target:c,rel:l,isDisabled:u,isSelected:d,density:y,xstyle:[x!==`none`&&Up.withCounter,b&&Up.withDivider,b&&Wp.noRadius,f],...g(s(`list-item`),{className:p,style:m}),..._})}Gp.displayName=`ListItem`;var Kp={x139im0d:`x139im0d`,$$css:!0},qp={cell:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,ks0D6T:`x1m189uc`,$$css:!0}},Jp={cell:{kVQacm:`xb3r6kr`,kHjlTd:`x1mzt3pk`,kTgw9:`x13faqbe`,ks0D6T:`x1m189uc`,$$css:!0}},Yp={compact:{kZCmMZ:`x5uh4xs`,kwRFfy:`xbg7gas`,$$css:!0},balanced:{kZCmMZ:`x9bi00s`,kwRFfy:`xpilulx`,$$css:!0},spacious:{kZCmMZ:`x18c6q21`,kwRFfy:`x1wzlfcn`,$$css:!0}},Xp=(0,F.createContext)(null);Xp.displayName=`TableContext`;var Zp={row:{kWkggS:`x1dnou9g`,"--table-row-overlay":`x1rht92`,$$css:!0}},Qp={row:{kWkggS:`xoevpu5`,"--table-row-overlay":`xc01ov8`,k1ekBW:`x15406qy`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0}},$p={row:{kWkggS:`x1dnou9g xoevpu5`,"--table-row-overlay":`x1rht92 xc01ov8`,k1ekBW:`x15406qy`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0}};function em({children:e,xstyle:n,ref:r,isHeaderRow:i=!1,className:a,style:o,...c}){let l=(0,F.use)(Xp);if(!l)return(0,I.jsx)(`tr`,{ref:r,...c,...g(s(`table-row`),t(Kp,n),a,o),children:e});let u=[];return i||(l.isStriped&&l.hasHover?u.push($p.row):l.isStriped?u.push(Zp.row):l.hasHover&&u.push(Qp.row)),l.dividers===`rows`||l.dividers,n&&u.push(...n),(0,I.jsx)(`tr`,{ref:r,...c,...g(s(`table-row`),t(Kp,...u),a,o),children:e})}em.displayName=`TableRow`;var tm={destructiveAction:{"--_item-label-color":`xufyqxy`,"--_item-description-color":`xqlix59`,kMwMTN:`xjt36v0`,$$css:!0},divider:{kqGvvJ:`xsq74q5`,$$css:!0}};function nm(e,t){return`item-${e.id??t}`}function rm({items:e,onSelect:t,onOpenSubmenu:n}){let r=(e,r)=>{let i=e.items!=null&&e.items.length>0,a=e.variant===`destructive`;return(0,I.jsx)(Gp,{label:e.label,description:e.description,startContent:e.icon?ce(e.icon,{size:`sm`,color:a?`error`:`secondary`}):void 0,endContent:i?(0,I.jsx)(oe,{icon:`chevronRight`,size:`sm`,color:`secondary`,xstyle:pe.mirror}):e.endContent,isDisabled:e.isDisabled,onClick:r=>{f()===`pointer`&&r.currentTarget.blur(),i?n(e):t(e)},xstyle:a&&tm.destructiveAction},nm(e,r))};return(0,I.jsx)(Hp,{density:`spacious`,children:e.map((e,t)=>`type`in e&&e.type===`divider`?(0,I.jsx)(`li`,{role:`presentation`,className:`x3ct3a4`,children:(0,I.jsx)(bp,{xstyle:tm.divider})},`divider-${t}`):`type`in e&&e.type===`section`?(0,I.jsx)(`li`,{role:`presentation`,className:`x3ct3a4`,children:(0,I.jsxs)(`div`,{role:`group`,"aria-label":e.title,className:`x78zum5 xdt5ytf xzye2dw`,children:[e.title&&(0,I.jsx)(Se,{level:4,children:e.title}),(0,I.jsx)(Hp,{density:`spacious`,children:e.items.map(r)})]})},`section-${e.id??t}`):r(e,t))})}rm.displayName=`MenuBottomSheetActionList`;var im=(0,F.createContext)(null);im.displayName=`DropdownMenuContext`;function am(){return(0,F.use)(im)}var om=(0,F.createContext)(null);om.displayName=`DropdownMenuRadioGroupContext`;function sm(e,t){if(t||e.pointerType!==`mouse`)return;let n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus({preventScroll:!0})}var cm={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz x1anq1lc`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},destructive:{kMwMTN:`xjt36v0`,"--_item-label-color":`xufyqxy`,"--_item-description-color":`xqlix59`,$$css:!0}},lm={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}};function um({icon:e,label:t,description:n,onClick:r,isDisabled:i=!1,endContent:a,hasCloseOnSelect:o=!0,variant:c=`default`,xstyle:l,className:u,style:d}){let f=am(),p=f?.menuSize??`md`,m=(0,F.useCallback)(()=>{i||(r?.(),o&&f?.closeMenu())},[i,r,o,f]),h=(0,F.useCallback)(e=>sm(e,i),[i]),_=c===`destructive`;return(0,I.jsx)(Tp,{role:`menuitem`,tabIndex:i?void 0:-1,onPointerMove:h,startContent:e?ce(e,{size:`sm`,color:_?`error`:`secondary`}):void 0,label:t,description:n,endContent:a,onClick:m,isDisabled:i,xstyle:[cm.root,lm[p],_&&cm.destructive,i&&cm.disabled,l],...g(s(`dropdown-menu-item`,{size:p,variant:_?`destructive`:null}),{className:u,style:d})})}um.displayName=`DropdownMenuItem`;var dm={divider:{kqGvvJ:`xsq74q5`,$$css:!0}},fm=s(`dropdown-menu-divider`).className;function pm({xstyle:e,className:t,style:n,ref:r}){return(0,I.jsx)(bp,{ref:r,xstyle:[dm.divider,e],className:t?`${fm} ${t}`:fm,style:n})}pm.displayName=`DropdownMenuDivider`;function mm(e,t,n){let[r,i]=(0,F.useState)(!1),a=(0,F.useCallback)(()=>{let t=e.current;if(!t)return;let n=t.scrollHeight>t.clientHeight+1;i(e=>e===n?e:n)},[e]);return m(()=>{if(!n)return;let t=e.current;if(!t)return;a();let r=typeof ResizeObserver>`u`?null:new ResizeObserver(a),i=typeof MutationObserver>`u`?null:new MutationObserver(a);return r?.observe(t),i?.observe(t,{childList:!0,characterData:!0,subtree:!0}),t.addEventListener(`load`,a,!0),window.addEventListener(`resize`,a),window.visualViewport?.addEventListener(`resize`,a),()=>{r?.disconnect(),i?.disconnect(),t.removeEventListener(`load`,a,!0),window.removeEventListener(`resize`,a),window.visualViewport?.removeEventListener(`resize`,a)}},[n,a,e]),m(()=>{n&&a()},[t,n,a]),r}var hm=new Set([`auto`,`contain`,`fit-content`,`inherit`,`initial`,`max-content`,`min-content`,`revert`,`revert-layer`,`stretch`,`unset`]);function gm(e,t){if(typeof e==`number`)return{property:`minWidth`,value:`min(${e}px, ${t})`};let n=e.trim(),r=n.toLowerCase();return hm.has(r)||r.startsWith(`fit-content(`)?{property:`inlineSize`,value:n}:{property:`minWidth`,value:`min(${n}, ${t})`}}var _m=new Set([`menuitem`,`menuitemradio`,`menuitemcheckbox`]),vm=[..._m].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(`,`),ym=`[role="menu"]`,bm=r[`--spacing-4`];`${bm}${bm}`;var xm=`calc(100vw - ${bm} - ${bm})`;`${bm}${bm}`,`${bm}${bm}`;var Sm={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},open:{kWkggS:`x1lmrjuc`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0}},Cm={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}},wm={kzqmXN:`x1uyokj7`,$$css:!0},Tm={popoverViewport:{kB7OPa:`x9f619`,kskxy:`x1hkkhfe`,$$css:!0},popover:{k7Eaqz:`x12knhqr`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:e==null?e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}],popoverCustomIntrinsicWidth:e=>[wm,{"--x-inlineSize":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function Em(e){let{icon:t,label:n,description:i,isDisabled:a=!1,hasSpinner:o=!1,menuWidth:c,onOpenChange:l,children:u,xstyle:d,className:f,style:m,"data-testid":_,menuDataTestId:v}=e,y=am(),b=y?.menuSize??`md`,x=!a,S=(0,F.useId)(),C=(0,F.useId)(),w=(0,F.useRef)(null),[T,E]=(0,F.useState)(!1),D=h({mode:`context`,lightDismiss:!1,onShow:(0,F.useCallback)(()=>{E(!0),l?.(!0)},[l]),onHide:(0,F.useCallback)(()=>{E(!1),l?.(!1)},[l])}),ee=(0,F.useCallback)(()=>{x&&D.show()},[x,D]),O=(0,F.useCallback)(()=>{D.hide()},[D]),{listRef:k,handleKeyDown:A,focusFirst:te,focusItem:j,ownsEvent:ne,getItems:re}=zr({itemSelector:vm,boundarySelector:ym,wrap:!1,onEscape:()=>P({focusTrigger:!0})}),ie=mm(k,u,T),M=pp({getItemLabels:()=>re().map(e=>e.textContent),onMatch:j,getCurrentIndex:()=>re().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))}),{triggerProps:ae,contentProps:N,confirmHoverOpen:se}=Hr({show:ee,hide:O,isOpen:T,isEnabled:x}),ue=(0,F.useCallback)(e=>{x&&(D.show(),e?.focusFirst&&(te()||k.current?.focus()))},[x,D,te,k]),P=(0,F.useCallback)(e=>{D.hide(),e?.focusTrigger!==!1&&w.current?.focus()},[D]),de=(0,F.useCallback)(e=>{w.current=e,D.ref(e)},[D]),L=(0,F.useCallback)(()=>{if(!a){if(T){if(se()){te()||k.current?.focus();return}P({focusTrigger:!0})}else ue({focusFirst:!0})}},[a,T,ue,P,se,te,k]),fe=(0,F.useCallback)(e=>{if(a)return;let t=typeof window<`u`&&w.current&&window.getComputedStyle(w.current).direction===`rtl`?`ArrowLeft`:`ArrowRight`;(e.key===t||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),ue({focusFirst:!0}))},[a,ue]),R=(0,F.useCallback)(e=>sm(e,a),[a]),me=(0,F.useCallback)(e=>{if(!ne(e))return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),P({focusTrigger:!0});return}if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&_m.has(t.getAttribute(`role`)??``)&&t.click();return}let t=typeof window<`u`&&k.current&&window.getComputedStyle(k.current).direction===`rtl`?`ArrowRight`:`ArrowLeft`;if(e.key===t){e.preventDefault(),P({focusTrigger:!0});return}if(M.onKeyDown(e)){e.preventDefault();return}A(e)},[ne,P,A,M,k]),he=(0,F.useMemo)(()=>({menuSize:b,closeMenu:()=>{P({focusTrigger:!1}),y?.closeMenu()}}),[b,P,y]),ge=o?(0,I.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,I.jsx)(le,{size:`sm`})}):(0,I.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,I.jsx)(oe,{icon:`chevronRight`,size:`sm`,color:`secondary`,xstyle:pe.mirror,...s(`dropdown-menu-indicator-icon`)})}),_e=c?gm(c,xm):null,ve=_e?_e.property===`inlineSize`?Tm.popoverCustomIntrinsicWidth(_e.value):Tm.popoverCustomWidth(_e.value):Tm.popover;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Tp,{ref:e=>de(e),id:C,role:`menuitem`,tabIndex:a?void 0:-1,"aria-haspopup":`menu`,"aria-expanded":T,"aria-controls":T?S:void 0,"aria-disabled":a||void 0,"data-testid":_,onMouseEnter:ae.onMouseEnter,onMouseLeave:ae.onMouseLeave,onPointerMove:R,startContent:t?ce(t,{size:`sm`,color:`secondary`}):void 0,label:n,description:i,endContent:ge,onClick:L,onKeyDown:fe,isDisabled:a,xstyle:[Sm.root,Cm[b],T&&Sm.open,a&&Sm.disabled,d],...g(s(`dropdown-menu-item`,{size:b}),{className:f,style:m})}),D.render((0,I.jsx)(`div`,{ref:k,id:S,role:`menu`,tabIndex:ie?0:-1,"aria-labelledby":C,onKeyDown:me,onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave,"data-testid":v,...g(s(`dropdown-menu`),{0:{className:`x9f619 x78zum5 xdt5ytf x1lsbc85 xs2v1xk x1hkkhfe x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92`},1:{className:`x9f619 x78zum5 xdt5ytf x1lsbc85 xs2v1xk x1hkkhfe x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92 x1odjw0f x6ikm8r xish69e`}}[!!ie<<0]),children:(0,I.jsx)(im,{value:he,children:u})}),{placement:`end`,alignment:`start`,offset:r[`--spacing-1`],xstyle:[Tm.popoverViewport,ve,p.end]})]})}Em.displayName=`DropdownMenuSubMenu`;function Dm(e,t){return`item-${e.id??t}`}function Om(e,t){return`section-${e.id??t}`}function km(e,t){let{items:n,id:r,...i}=e;return(0,I.jsx)(um,{...i},Dm(e,t))}function Am(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];`type`in r&&r.type===`divider`?t.push((0,I.jsx)(pm,{},`divider-${n}`)):`type`in r&&r.type===`section`?t.push((0,I.jsxs)(`div`,{role:`group`,"aria-label":r.title,children:[r.title&&(0,I.jsx)(`div`,{"aria-hidden":`true`,...g(s(`dropdown-menu-section-heading`),{className:`xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o`}),children:r.title}),r.items.map(km)]},Om(r,n))):`type`in r||(r.items&&r.items.length>0?t.push((0,I.jsx)(Em,{icon:r.icon,label:r.label,isDisabled:r.isDisabled,children:Am(r.items)},Dm(r,n))):t.push(km(r,n)))}return t}var jm=(0,F.lazy)(async()=>x(()=>import(`./MenuBottomSheet-BkRC4_VW.js`).then(e=>({default:e.MenuBottomSheet})),__vite__mapDeps([3,1,4,5,6,7,8]))),Mm={trigger:{kVAEAm:`x1n2onr6`,k7VYTy:`xpdipgo`,kO7zv1:`x1winvzj`,kfSwDN:`x87ps6o`,$$css:!0},menu:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kskxy:`xuyqlj2`,kORKVm:`x1odjw0f`,"--_dropdown-menu-radius":`x1fcsqxe`,"--_dropdown-menu-padding":`xgory14`,kmVPX3:`x9epnlk`,kaIpWk:`x1n97fys`,kWkggS:`x1prclbq`,kGVxlE:`x1i5ehqx`,kSiTet:`x1hc1fzr`,k1ekBW:`x19991ni`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,kfSwDN:`x87ps6o`,$$css:!0},popover:{k7Eaqz:`x5w4yej`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}],sheetMenu:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kzqmXN:`xh8yej3`,"--_dropdown-menu-radius":`x1fcsqxe`,"--_dropdown-menu-padding":`xgory14`,kmVPX3:`x9epnlk`,kaIpWk:`x1n97fys`,kWkggS:`x10xzikg`,kI3sdo:`x1a2a7pz`,kfSwDN:`x87ps6o`,$$css:!0},sheetRootHeading:{keTefX:`x6i7dpz`,$$css:!0},sheetViewHeading:{kI3sdo:`x1a2a7pz`,$$css:!0}};function Nm({children:e,menuWidth:n,size:r=`md`,label:i,isDisabled:o=!1,onOpenChange:c,presentation:l=`popover`,ref:u,className:d,style:f,xstyle:m,triggerXstyle:_,"data-testid":v,...y}){let b=se(),x=i??b(`@astryx.contextMenu.label`),S=b(`@astryx.dropdownMenu.back`),C=Dp(l)===`bottom-sheet`,{items:w,menuContent:T,...E}=y,D=w??[],ee=T,O=(0,F.useId)(),A=(0,F.useRef)({x:0,y:0}),te=(0,F.useRef)(null),j=(0,F.useRef)(null),ne=(0,F.useRef)(null),re=(0,F.useRef)(null),[M,ae]=(0,F.useState)(!1),[N,ce]=(0,F.useState)([]),le=N.at(-1),ue=le?.items??D,P=le?.label??x,de=typeof P==`string`?P:x,L=(0,F.useCallback)(e=>{e||ce([]),ae(e),c?.(e)},[c]),fe=h({mode:`context`,onHide:(0,F.useCallback)(()=>{ae(!1),c?.(!1);let e=ne.current;ne.current=null,e&&document.contains(e)&&e.focus()},[c]),onShow:(0,F.useCallback)(()=>{ae(!0),c?.(!0)},[c]),lightDismiss:!1}),R=(0,F.useCallback)(()=>{C?L(!1):fe.hide()},[fe,L,C]),me=(0,F.useCallback)(e=>{e.isDisabled||(e.onClick?.(),e.hasCloseOnSelect!==!1&&R())},[R]);(0,F.useEffect)(()=>{if(!M||N.length===0)return;let e=requestAnimationFrame(()=>{re.current?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(e)},[M,N.length]);let{listRef:he,handleKeyDown:ge,focusFirst:_e,focusItem:ve,ownsEvent:ye,getItems:be}=zr({itemSelector:vm,boundarySelector:ym,wrap:!1,onEscape:R}),xe=pp({getItemLabels:()=>be().map(e=>e.textContent),onMatch:ve,getCurrentIndex:()=>be().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))});(0,F.useEffect)(()=>{if(!M||C)return;let e=e=>{let t=he.current;t&&!t.contains(e.target)&&R()};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[M,R,he,C]),(0,F.useEffect)(()=>{if(!M||C)return;let e=e=>{e.key===`Escape`&&(a(e)||(e.preventDefault(),R()))};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[M,R,C]);let Ce=(0,F.useCallback)(e=>{if(ye(e)){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&_m.has(t.getAttribute(`role`)??``)&&t.click();return}if(e.key===`Tab`){R();return}if(xe.onKeyDown(e)){e.preventDefault();return}ge(e)}},[ge,R,xe,ye]),we=(0,F.useCallback)((e,t,n)=>{A.current={x:e,y:t};let r=te.current;r&&(r.style.left=`${e}px`,r.style.top=`${t}px`),ne.current=document.activeElement instanceof HTMLElement?document.activeElement:n,C?L(!0):(fe.show(),requestAnimationFrame(()=>_e()))},[fe,_e,L,C]),Te=(0,F.useCallback)(e=>{if(o)return;e.preventDefault();let t=j.current?.getBoundingClientRect(),n=e.clientX===0&&e.clientY===0&&e.detail===0,r=n||!t?0:e.clientX-t.left,i=n||!t?t?.height??0:e.clientY-t.top;we(r,i,e.currentTarget)},[o,we]),Ee=gp({disabled:o,onLongPress:(0,F.useCallback)(e=>{let t=j.current?.getBoundingClientRect();we(t?e.x-t.left:e.x,t?e.y-t.top:e.y,j.current)},[we])}),De=n?Mm.popoverCustomWidth(n):Mm.popover,Oe=(0,F.useMemo)(()=>({closeMenu:R,menuSize:r}),[R,r]),ke=w===void 0?ee:Am(D),Ae=(0,I.jsx)(`div`,{ref:he,id:O,role:`menu`,"data-autofocus":C?``:void 0,tabIndex:C?0:-1,"aria-label":x,onKeyDown:Ce,onContextMenu:e=>e.preventDefault(),...g(s(`context-menu`),t(C?Mm.sheetMenu:Mm.menu,m),d,f),children:(0,I.jsx)(im,{value:Oe,children:ke})}),je=w===void 0?Ae:(0,I.jsxs)(`div`,{ref:he,"data-autofocus":``,tabIndex:0,...g(s(`context-menu`),t(Mm.sheetMenu,m),d,f),children:[(0,I.jsxs)(`div`,{className:`x78zum5 x1q0g3np x6s0dn4 xzye2dw x1p37lm5`,children:[N.length>0&&(0,I.jsx)(ie,{label:S,variant:`ghost`,size:`sm`,icon:(0,I.jsx)(oe,{icon:`chevronLeft`,size:`sm`,xstyle:pe.mirror}),isIconOnly:!0,onClick:()=>ce(e=>e.slice(0,-1))}),(0,I.jsx)(Se,{ref:re,level:3,tabIndex:-1,xstyle:[Mm.sheetViewHeading,N.length===0&&Mm.sheetRootHeading],children:P})]}),(0,I.jsx)(rm,{items:ue,onSelect:me,onOpenSubmenu:e=>ce(t=>[...t,e])})]});return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{ref:k(u,j),...E,onContextMenu:Te,...Ee,"data-testid":v,...t(Mm.trigger,..._?Array.isArray(_)?_:[_]:[]),children:[e,(0,I.jsx)(`span`,{ref:k(te,fe.ref),"aria-hidden":`true`,...g({className:`x10l6tqk xnalus7 xqtp20y x47corl`},{style:{left:`${A.current.x}px`,top:`${A.current.y}px`}})})]}),C?(0,I.jsx)(F.Suspense,{fallback:null,children:(0,I.jsx)(jm,{isOpen:M,onOpenChange:L,label:de,children:je})}):fe.render(Ae,{placement:`below`,alignment:`start`,xstyle:[De,p.below]})]})}Nm.displayName=`ContextMenu`;function Pm(e){let t=[],n=new Map;for(let r of e){let e=r.group??`__ungrouped__`,i=n.get(e);i||(i=[],n.set(e,i),t.push(e)),i.push(r)}let r=[];return t.forEach((e,t)=>{t>0&&r.push({type:`divider`});for(let t of n.get(e)??[])r.push({label:typeof t.label==`string`?t.label:t.id,icon:t.checked?(0,I.jsx)(oe,{icon:`check`,size:`xsm`,"aria-hidden":!0}):t.icon,isDisabled:t.disabled,onClick:t.onSelect,variant:t.variant})}),r}function Fm({element:e,getActions:t,triggerXstyle:n}){let[r,i]=(0,F.useState)(null);return(0,I.jsx)(Nm,{items:r??[],triggerXstyle:n,onOpenChange:e=>{i(e?Pm(t()):null)},children:e})}function Im(e,t,n){return typeof t==`function`?(0,I.jsx)(Fm,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:(0,I.jsx)(Nm,{items:Pm(t),triggerXstyle:n,children:e})}function Lm(e,t,n){let r=[];return(e.dividers===`rows`||e.dividers===`grid`)&&r.push(t),(e.dividers===`columns`||e.dividers===`grid`)&&r.push(n),r}function Rm(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function zm(){return(0,F.use)(Xp)}var Bm={compact:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},balanced:{k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0}},Vm={compact:{kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},balanced:{kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0},spacious:{kGuDYH:`xjm74w1`,kB7OPa:`x9f619`,$$css:!0}},Hm={compact:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},balanced:{k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,$$css:!0}},Um={fill:{k1xSpc:`x1lliihq`,kB7OPa:`x9f619`,kZKoxP:`x5yr21d`,kzqmXN:`xh8yej3`,$$css:!0}},Wm={cell:{kZKoxP:`x5yr21d`,$$css:!0}},Gm={cell:{kt9PQ7:`x92x3c3 x1wp2rvj`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Km={cell:{ke9TFa:`xw8tdv1 x1qlsc9e`,k8ry5P:`x18b5jzi`,kBCPoo:`x1gejf6u`,$$css:!0}},qm={middle:{kXLuUW:`xxymvpz`,$$css:!0},top:{kXLuUW:`x16dsc37`,$$css:!0},bottom:{kXLuUW:`x3ajldb`,$$css:!0}};function Jm({children:e,xstyle:n,ref:r,className:i,style:a,contextMenuActions:o,...c}){let l=zm(),u=typeof o==`function`||Array.isArray(o)&&o.length>0,d=l?[u?Vm[l.density]:Bm[l.density],l.textOverflow===`truncate`?qp.cell:Jp.cell,Yp[l.density],qm[l.verticalAlign],...Lm(l,Gm.cell,Km.cell),...u?[Wm.cell]:[]]:[],f=Im(e,o,u&&l?[Um.fill,Hm[l.density]]:u?Um.fill:void 0);return(0,I.jsx)(`td`,{ref:r,...c,...g(s(`table-cell`,{density:l?.density}),t(...Rm(d,n)),i,a),children:f})}Jm.displayName=`TableCell`;var Ym={compact:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kGuDYH:`xcr08ib`,kB7OPa:`x9f619`,$$css:!0},balanced:{k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kGuDYH:`xcr08ib`,kB7OPa:`x9f619`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,kGuDYH:`xcr08ib`,kB7OPa:`x9f619`,$$css:!0}},Xm={cell:{k63SB2:`x2mo6ok`,kMwMTN:`xv1l7n4`,k9WMMc:`x1yc453h`,$$css:!0}},Zm={cell:{kt9PQ7:`x92x3c3`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Qm={cell:{ke9TFa:`xw8tdv1 x1qlsc9e`,k8ry5P:`x18b5jzi`,kBCPoo:`x1gejf6u`,$$css:!0}};function $m({children:e,xstyle:n,ref:r,className:i,style:a,contextMenuActions:o,...c}){let l=zm(),u=[];l&&(u.push(Xm.cell,Ym[l.density],Zm.cell,qp.cell,Yp[l.density]),(l.dividers===`columns`||l.dividers===`grid`)&&u.push(Qm.cell));let d=Im(e,o);return(0,I.jsx)(`th`,{ref:r,...c,...g(s(`table-header-cell`,{density:l?.density}),t(...Rm(u,n)),i,a),children:d})}$m.displayName=`TableHeaderCell`;function eh({ref:e,children:n,xstyle:r,className:i,style:a,...o}){return(0,I.jsx)(`thead`,{ref:e,...g(s(`table-header`),t(r),i,a),...o,children:n})}eh.displayName=`TableHeader`;function th({ref:e,children:n,xstyle:r,className:i,style:a,...o}){return(0,I.jsx)(`tbody`,{ref:e,...g(s(`table-body`),t(r),i,a),...o,children:n})}th.displayName=`TableBody`;var nh={table:{kzqmXN:`xh8yej3`,kLvRdT:`x1mwwwfo`,kheTzg:`x1gukg7c`,kPzzVL:`x140o2bo`,$$css:!0},tableAutoLayout:{kPzzVL:`x1drmoe9`,$$css:!0}};function rh(e,t,n,...r){return e.reduce((e,n,i)=>{let a=t(n);if(!a)return e;try{return a(e,...r)}catch(t){return _(`Table`,`Plugin at index ${i} threw in transform:`,t),e}},n)}var ih=[];function ah(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function oh({item:e,rowIndex:t,rowKey:n,columns:r,plugins:i,textOverflow:a,RowComponent:o,CellComponent:s,ariaRowIndex:c}){let l=r.map((t,n)=>{let o={};t.align&&(o.style={textAlign:t.align});let c=rh(i,e=>e.transformBodyCell,{htmlProps:o,xstyle:[],columnIndex:n,columns:r},t,e,n,r),l=!t.renderCell,u=null;c.isContentSuppressed||(u=l?Mp(e,t.key):t.renderCell?.(e)??null);let d;return d=l&&a===`truncate`&&typeof u==`string`&&u.length>0?(0,I.jsx)(j,{type:`body`,maxLines:1,children:u}):u,(0,I.jsx)(s,{...c.htmlProps,contextMenuActions:c.contextMenuActions,xstyle:c.xstyle,children:d},t.key)}),u=rh(i,e=>e.transformBodyRow,{htmlProps:c==null?{}:{"aria-rowindex":c},xstyle:[],children:(0,I.jsx)(I.Fragment,{children:l})},e,t),d=(0,I.jsx)(o,{ref:u.ref,...u.htmlProps,xstyle:u.xstyle,children:u.children},n);return u.afterRow?(0,I.jsxs)(I.Fragment,{children:[d,u.afterRow]}):d}function sh(e,t){if(e.rowKey!==t.rowKey||e.rowIndex!==t.rowIndex||e.ariaRowIndex!==t.ariaRowIndex||e.columns!==t.columns||e.plugins!==t.plugins||e.textOverflow!==t.textOverflow||e.RowComponent!==t.RowComponent||e.CellComponent!==t.CellComponent)return!1;if(e.item===t.item)return!0;let n=e.item,r=t.item,i=Object.keys(r);if(Object.keys(n).length!==i.length)return!1;for(let e of i)if(n[e]!==r[e])return!1;return!0}var ch=(0,F.memo)(oh,sh);function lh({data:e,columns:n,idKey:r,plugins:i,children:a,textOverflow:o=`wrap`,scrollWrapper:c,emptyState:l,rowIndexStart:u,rowCount:d,xstyle:f,className:p,style:m,ref:h,...v}){let y=se(),b=i??ih,x=u!=null||d!=null,S=u??1,C=x?d??-1:void 0,w=em,T=Jm,E=$m,D=rh(b,e=>e.transformColumns,n??(e?Lp(e):[])),ee=(0,F.useRef)(D);ah(ee.current,D)||(ee.current=D);let O=ee.current,k=Op(O),A=rh(b,e=>e.transformTable,{htmlProps:{},xstyle:a?[nh.table,nh.tableAutoLayout]:[nh.table]}),te=O.map((e,t)=>{let n=e.header??e.key,r={"data-column-key":e.key,scope:`col`};e.align&&(r.style={textAlign:e.align});let i=rh(b,e=>e.transformHeaderCell,{htmlProps:r,xstyle:[],content:n,columnIndex:t,columns:O},e,t,O),a=k.columns.get(e.key)?.style??{},o=i.htmlProps.style,s={...i.htmlProps,style:o?{...a,...o}:a},c=i.content??n,l=typeof c==`string`&&c.length>0?{title:c}:{},{before:u,after:d,overlay:f,below:p}=i,m=u!=null||d!=null||f!=null||p!=null?(0,I.jsxs)(I.Fragment,{children:[u,d==null?c:(0,I.jsxs)(`div`,{className:`x3nfvp2 x6s0dn4 xzye2dw xeuugli`,children:[c,d]}),f,p]}):c;return(0,I.jsx)(E,{...s,...l,contextMenuActions:i.contextMenuActions,xstyle:i.xstyle,children:m},e.key)}),j=rh(b,e=>e.transformHeaderRow,{htmlProps:{},xstyle:[],children:(0,I.jsx)(I.Fragment,{children:te})}),ne=e!=null&&e.length>0,re=O.length>0,ie={...A.htmlProps.style,...m,...k.tableMinWidth>0?{minWidth:`${k.tableMinWidth}px`}:null},M=(0,I.jsx)(`table`,{ref:h,...C==null?null:{"aria-rowcount":C},...A.htmlProps,...g(s(`table`,void 0,{legacyNames:[`base-table`]}),t(...A.xstyle,f),[A.htmlProps.className,p].filter(Boolean).join(` `)||void 0,ie),...v,children:a||(0,I.jsxs)(I.Fragment,{children:[re&&(0,I.jsx)(eh,{children:(0,I.jsx)(w,{...j.htmlProps,isHeaderRow:!0,xstyle:j.xstyle,children:j.children})}),(0,I.jsx)(th,{children:ne?e.map((e,t)=>{let n=r==null?t:typeof r==`function`?r(e):String(e[r]);return(0,I.jsx)(ch,{item:e,rowIndex:t,rowKey:n,columns:O,plugins:b,textOverflow:o,RowComponent:w,CellComponent:T,ariaRowIndex:x?S+t:void 0},n)}):e!=null&&l!==!1&&(0,I.jsx)(`tr`,{children:(0,I.jsx)(`td`,{colSpan:O.length,children:l??(0,I.jsx)(up,{title:y(`@astryx.table.noData`),isCompact:!0})})})})]})});if(c){let e=rh(b,e=>e.transformScrollWrapper,{htmlProps:{},xstyle:[]});M=(0,I.jsx)(c,{htmlProps:e.htmlProps,xstyle:e.xstyle,beforeTable:e.beforeTable,afterTable:e.afterTable,children:M})}for(let e=b.length-1;e>=0;e--){let t=b[e];if(t.transformTableContext)try{M=t.transformTableContext(M)}catch(e){_(`Table`,`Plugin threw in transformTableContext:`,e)}}return M}var uh=lh;uh.displayName=`BaseTable`;var dh=[`columnSettings`,`sort`,`tree`,`selection`,`pagination`],fh=new Map(dh.map((e,t)=>[e,t]));function ph(e){let t=dh.length;return e.sort(([e],[n])=>(fh.get(e)??t)-(fh.get(n)??t))}var mh=new Set([`transformColumns`,`transformTable`,`transformHeaderRow`,`transformHeaderCell`,`transformBodyRow`,`transformBodyCell`,`transformScrollWrapper`,`transformTableContext`]);function hh(e,t){let n=Object.keys(t);for(let t of n)mh.has(t)||`${e}${t}${[...mh].join(`, `)}`;for(let r of n)if(mh.has(r)){let n=t[r];n!=null&&typeof n!=`function`&&`${e}${r}`}n.some(e=>mh.has(e)&&typeof t[e]==`function`)||`${e}`}function gh(e,t){let n=(0,F.useRef)(null);if(n.current!=null){let r=n.current;if(r.basePlugins===e&&r.userPlugins===t)return r.result;if(r.basePlugins===e&&_h(r.userPlugins,t))return r.userPlugins=t,r.result}let r=t?ph(Object.entries(t)).map(([,e])=>e):[],i=[...e,...r];if(t)for(let[e,n]of Object.entries(t))hh(e,n);return n.current={basePlugins:e,userPlugins:t,result:i},i}function _h(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}var vh={base:{kMv6JI:`xjb2p0i`,kMwMTN:`x1tgivj0`,$$css:!0}},yh={base:{kXHlph:`xw2csxc`,kuHK5b:`x5lxg6s`,$$css:!0},containerBleed:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,kzqmXN:`xx6qvi6`,keoZOQ:`xkibk3`,k1K539:`xlayyun`,$$css:!0}};function bh({children:e,htmlProps:n,xstyle:r,beforeTable:i,afterTable:a}){let o=se(),{ref:c,...l}=n??{};return(0,I.jsxs)(`div`,{ref:c,tabIndex:0,role:`group`,"aria-label":o(`@astryx.table.label`),...l,...g(s(`table-scroll-wrapper`),t(yh.base,yh.containerBleed,...r??[])),children:[i,e,a]})}function xh(){return{transformTable(e){return{...e,xstyle:[...e.xstyle,vh.base]}}}}function Sh({density:e=`balanced`,dividers:t=`rows`,isStriped:n=!1,hasHover:r=!1,verticalAlign:i=`middle`,textOverflow:a=`wrap`,plugins:o,columns:s,data:c,ref:l,...u}){let d=(0,F.useMemo)(()=>xh(),[]),f=gh((0,F.useMemo)(()=>[d],[d]),o),p=(0,F.useMemo)(()=>({density:e,dividers:t,isStriped:n,hasHover:r,verticalAlign:i,textOverflow:a}),[e,t,n,r,i,a]);return(0,I.jsx)(Xp,{value:p,children:(0,I.jsx)(uh,{ref:l,data:c,columns:s,plugins:f,textOverflow:a,scrollWrapper:bh,...u})})}var Ch=Sh;Ch.displayName=`Table`;var wh=[[`path`,{d:`M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.5`,key:`0`}]];function Th({size:e=16}){return(0,I.jsx)(cp,{data:wh,size:e})}var Eh={bar:`_bar_2upas_2`,trail:`_trail_2upas_3`,crumb:`_crumb_2upas_4`};function Dh({trail:e,actions:t}){return(0,I.jsxs)(dp,{as:`header`,"aria-label":Wf(`header.location`),gap:3,className:Eh.bar,children:[(0,I.jsxs)(dp,{gap:2,className:Eh.trail,children:[(0,I.jsx)(Th,{}),(0,I.jsx)(np,{}),e.map((t,n)=>(0,I.jsxs)(F.Fragment,{children:[(0,I.jsx)(j,{type:`supporting`,color:`secondary`,children:`/`}),t.to&&n<e.length-1?(0,I.jsx)(on,{to:t.to,search:t.search??{},className:Eh.crumb,children:t.label}):(0,I.jsx)(j,{type:`supporting`,maxLines:1,children:t.label})]},n))]}),t]})}export{z as $,Wf as A,Ae as At,Yn as B,Ee as Bt,ip as C,et as Ct,ep as D,Xe as Dt,Qf as E,Qe as Et,Fr as F,ke as Ft,zn as G,fe as Gt,Wn as H,me as Ht,Pr as I,Fe as It,bn as J,hn as K,L as Kt,Dr as L,Je as Lt,Gr as M,Ne as Mt,Hr as N,Ye as Nt,qf as O,Ve as Ot,zr as P,He as Pt,Sn as Q,wr as R,Ie as Rt,sp as S,pt as St,Zf as T,Ke as Tt,Un as U,ve as Ut,Jn as V,Se as Vt,Bn as W,pe as Wt,vn as X,yn as Y,mn as Z,bp as _,gt as _t,eh as a,on as at,up as b,ut as bt,em as c,Rt as ct,Rp as d,Mt as dt,Tn as et,Ap as f,Ct as ft,xp as g,Et as gt,Tp as h,Tt as ht,th as i,cn as it,Gf as j,qe as jt,Kf as k,Ze as kt,Gp as l,Ft as lt,Dp as m,Dt as mt,Th as n,Nn as nt,$m as o,Gt as ot,kp as p,kt as pt,xn as q,Ch as r,ln as rt,Jm as s,zt as st,Dh as t,Fn as tt,Hp as u,At as ut,pp as v,lt as vt,tp as w,$e as wt,cp as x,ct as xt,dp as y,dt as yt,tr as z,Te as zt};
|