gitifact 0.8.6 → 0.9.0
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 +14 -36
- package/dist/browser/assets/{HgiRefresh-CnBE2KZ8.js → HgiRefresh-CmdxsKUC.js} +1 -1
- package/dist/browser/assets/{Markdown-75QVB57V.js → Markdown-BpWtY88p.js} +1 -1
- package/dist/browser/assets/{Selector-E8jyEKNB.js → Selector-Dji19JSe.js} +1 -1
- package/dist/browser/assets/{Tab-C-PhLRIZ.js → Tab-BY4IuGKn.js} +1 -1
- package/dist/browser/assets/{Table-Cr2jvka_.js → Table-Dm6wz2kf.js} +2 -2
- package/dist/browser/assets/{Token-BBk7tRek.js → Token-9hr7eTF1.js} +1 -1
- package/dist/browser/assets/about-C3KamVtV.js +3 -0
- package/dist/browser/assets/activity-timeline-BdRnSGAp.js +2 -0
- package/dist/browser/assets/changelog-C8_hi0cv.js +1 -0
- package/dist/browser/assets/commit-BWyvKMHI.js +4 -0
- package/dist/browser/assets/contributors-Bk_xjPNJ.js +1 -0
- package/dist/browser/assets/{contributors._email-CEcZZfAR.js → contributors._email-C8GGV2IN.js} +1 -1
- package/dist/browser/assets/{contributors.index-DNMBFxLb.js → contributors.index-BKMSdIFJ.js} +1 -1
- package/dist/browser/assets/dashboard.index-COyVOMnD.js +1 -0
- package/dist/browser/assets/{document-odLLdugz.js → document-BbL374wf.js} +4 -4
- package/dist/browser/assets/{document-Cmx0e6kz.css → document-DXzNxu17.css} +1 -1
- package/dist/browser/assets/document-Dtyl4_It.js +2 -0
- package/dist/browser/assets/features-B1FsIXwk.js +2 -0
- package/dist/browser/assets/{features._featureId-Cmg8-2ku.js → features._featureId-DT63dqjw.js} +1 -1
- package/dist/browser/assets/{features.index-CBz7BmRW.js → features.index-BGBefKJN.js} +1 -1
- package/dist/browser/assets/getting-started-CCqN7NFk.js +1 -0
- package/dist/browser/assets/git-CzKF2N75.js +1 -0
- package/dist/browser/assets/index-DsduXf6u.js +49 -0
- package/dist/browser/assets/{load-more-BVsXjzHC.js → load-more-COb87OhG.js} +1 -1
- package/dist/browser/assets/page-header-Cs2fqdqC.js +246 -0
- package/dist/browser/assets/{records._recordId-DF-NkdBL.js → records._recordId-DP2stdvW.js} +1 -1
- package/dist/browser/assets/{records.commits._commit-BBf_rxHJ.js → records.commits._commit-DQlC8mSd.js} +1 -1
- package/dist/browser/assets/{records.docs._docId-Diev5opj.js → records.docs._docId-C7snDAo3.js} +1 -1
- package/dist/browser/assets/{records.index-DPWv9blV.js → records.index-DRPp4IAb.js} +1 -1
- package/dist/browser/assets/{records.working-D5xv-dTD.js → records.working-Qv9R2KgB.js} +1 -1
- package/dist/browser/assets/{settings-N1hE7l-i.js → settings-DDEler3s.js} +1 -1
- package/dist/browser/assets/useInfiniteQuery-IoAmrFi4.js +1 -0
- package/dist/browser/assets/{useKeyboardHint-CGJ2GVT3.js → useKeyboardHint-Wwnf-tpi.js} +1 -1
- package/dist/browser/index.html +18 -24
- package/dist/i18n/en/block.md +7 -7
- package/dist/i18n/en/changelog.md +14 -0
- package/dist/i18n/en/docs/commit.md +1 -1
- package/dist/i18n/en/docs/design.md +3 -3
- package/dist/i18n/en/docs/migrate.md +31 -34
- package/dist/i18n/en/docs/records.md +2 -2
- package/dist/i18n/en/docs/spec.md +1 -1
- package/dist/i18n/en/docs/workflow.md +12 -12
- package/dist/i18n/en/docs/writing.md +4 -4
- package/dist/i18n/ko/block.md +7 -7
- package/dist/i18n/ko/changelog.md +14 -0
- package/dist/i18n/ko/docs/commit.md +1 -1
- package/dist/i18n/ko/docs/design.md +3 -3
- package/dist/i18n/ko/docs/migrate.md +30 -33
- package/dist/i18n/ko/docs/records.md +2 -2
- package/dist/i18n/ko/docs/spec.md +1 -1
- package/dist/i18n/ko/docs/workflow.md +12 -12
- package/dist/i18n/ko/docs/writing.md +4 -4
- package/dist/launcher/cli.mjs +77 -0
- package/dist/main.js +274 -586
- package/package.json +3 -3
- package/dist/browser/assets/MetadataListItem-BEwPg27H.js +0 -1
- package/dist/browser/assets/about-C3ewDfU2.js +0 -3
- package/dist/browser/assets/activity-timeline-B3s0viEt.js +0 -2
- package/dist/browser/assets/changelog-DkRd6I8J.js +0 -1
- package/dist/browser/assets/commit-BHwKZ7hK.js +0 -4
- package/dist/browser/assets/contributor-2mkEa2Wo.css +0 -1
- package/dist/browser/assets/contributor-CqqvzxLh.js +0 -1
- package/dist/browser/assets/contributors-CuMPZx6_.js +0 -1
- package/dist/browser/assets/dashboard.index-nV7KwM5H.js +0 -1
- package/dist/browser/assets/document-BnxE7Txb.js +0 -2
- package/dist/browser/assets/features-C0YzZiS-.js +0 -2
- package/dist/browser/assets/getting-started-CaOhGSBe.js +0 -1
- package/dist/browser/assets/git-DwAnKiiN.js +0 -1
- package/dist/browser/assets/index-BljzO9go.js +0 -49
- package/dist/browser/assets/instructions-2OUMP-vh.css +0 -1
- package/dist/browser/assets/instructions-DWS_nwe0.js +0 -1
- package/dist/browser/assets/instructions._instructionId-l7aWWvfx.js +0 -1
- package/dist/browser/assets/instructions.agents-t7hMe4Pv.js +0 -1
- package/dist/browser/assets/instructions.index-CHVCQBSH.js +0 -1
- package/dist/browser/assets/lazyRouteComponent-BZI8yQj_.js +0 -1
- package/dist/browser/assets/page-header-CRcXie4p.js +0 -248
- package/dist/browser/assets/project-instructions-DsWrw-nY.jpg +0 -0
- package/dist/browser/assets/useInfiniteQuery-CrEm5UW2.js +0 -1
- package/dist/i18n/en/docs/instructions.md +0 -94
- package/dist/i18n/ko/docs/instructions.md +0 -94
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Tooltip-MoU3alsv.js","assets/rolldown-runtime-hePW80VL.js","assets/themeProps-CkLe5zXY.js","assets/useIsomorphicLayoutEffect-BiEJxDg_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,t}from"./rolldown-runtime-hePW80VL.js";import{E as n,K as r,S as i,V as a,_ as o,d as s,g as c,h as l,l as u,m as d,n as f,q as p,u as m,v as h,w as g,x as _,y as v}from"./themeProps-CkLe5zXY.js";import{c as y,s as b,t as x}from"./useIsomorphicLayoutEffect-BiEJxDg_.js";import{a as S}from"./useMediaQuery-twbHF0pO.js";import{A as C,B as w,C as T,D as E,E as ee,F as D,I as te,L as ne,M as O,N as re,O as ie,P as ae,R as oe,T as se,V as ce,W as le,_ as k,b as A,j as ue,k as de,t as fe,w as j,z as pe}from"./Icon-DPaLmsmh.js";import{t as me}from"./preload-helper-BZ1Pz5am.js";import{t as he}from"./useScrollLock-D-Y-zHSV.js";import{t as ge}from"./container.stylex-rwI38dw9.js";var M=e(p(),1),_e={"gettingStarted.title":`시작하기`,"nav.gettingStarted":`시작하기`,"about.title":`Gitifact 소개`,"activity.changedRecords":`이 결정으로 바뀐 문서`,"activity.list":`결정기록 목록`,"activity.moreRecords":`문서 {count}건 더 →`,"activity.recent":`최근 명세 활동`,"activity.recordCount":`문서 {count}건`,"activity.today":`오늘`,"activity.yesterday":`어제`,"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.recentChange":`최근 변경`,"common.reconnect":`다시 연결`,"common.refresh":`새로고침`,"stale.title":`새 변경이 있습니다`,"stale.description":`이 화면을 읽은 뒤 문서나 커밋이 바뀌었습니다. 새로 고침하면 지금 상태로 다시 읽습니다.`,"state.added":`커밋 전: 추가`,"state.modified":`커밋 전: 변경`,"state.deleted":`커밋 전: 삭제 예정`,"working.title":`커밋 전`,"working.description":`아직 커밋하지 않은 결정기록과, 마지막 커밋 뒤에 바뀐 문서입니다. 비교는 마지막 커밋과 지금 파일 사이입니다.`,"working.summary":`결정기록 {records}건 · 바뀐 문서 {documents}개`,"working.withoutRecord":`결정기록 없는 변경 {count}개`,"working.moreRecords":`결정기록 {count}건 더 →`,"working.noRecords":`아직 쓴 결정기록이 없습니다.`,"working.noDocuments":`마지막 커밋 뒤에 바뀐 문서가 없습니다.`,"working.noExplained":`이 기록이 가리키는 문서 중 바뀐 것이 없습니다.`,"working.draft":`초안`,"common.description":`{title} 설명`,"common.uncommitted":`미커밋`,"contributors.activity":`이 참여자의 활동 →`,"contributors.back":`← 참여자`,"contributors.backToList":`참여자 목록으로`,"contributors.cardCommits":`커밋 {count}`,"contributors.cardFeatures":`기능 {count}`,"contributors.count":`참여자 {count}명 · Git author 기준이며 커밋 수는 코드 커밋을 포함합니다.`,"contributors.more":`참여자 더 보기`,"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가 HEAD의 커밋에 없습니다.`,"contributors.notFoundTitle":`참여자를 찾을 수 없습니다`,"design.missingRequirement":`{id} (현재 명세에 없음)`,"design.relatedRequirements":`관련 요구사항`,"event.committer":`커미터 {name}`,"event.noContent":`내용이 없습니다.`,"features.back":`← 기능별 요구사항`,"features.backToList":`기능별 요구사항 목록으로`,"features.changeFilters":`검색어나 필터를 바꿔 보세요.`,"features.column.contributors":`참여자`,"features.column.feature":`기능`,"features.column.requirements":`요구사항`,"features.count":`기능 명세 {count}개`,"features.detail":`기능 명세`,"features.requirementShare":`{title} 요구사항 비율`,"features.designMark":`설계 {count} →`,"features.acceptanceCount":`수용 조건 {count}`,"features.moreRequirements":`요구사항 {count}개 더 →`,"features.more":`기능 더 보기`,"features.emptyDescription":`에이전트와 기능 명세를 정리하고 커밋하면 이곳에서 볼 수 있습니다.`,"features.emptyTitle":`일치하는 기능이 없습니다.`,"features.history":`이 기능의 변경 이력 →`,"features.index":`명세 목차`,"features.indexTitle":`이 명세의 요구사항`,"features.noDesignMark":`설계 없음`,"features.noDesignDescription":`에이전트와 구현 방식을 정리하면 이곳에서 볼 수 있습니다.`,"features.noDesignTitle":`아직 작성된 설계가 없습니다.`,"features.noRequirements":`현재 요구사항이 없는 기능입니다.`,"features.ofTotal":` (전체 {total}개 중)`,"features.countNote":`참여자와 최근 변경은 커밋된 기록 기준입니다.`,"features.notFoundDescription":`{id}는 현재 명세에 없습니다. 이름이 바뀌었거나 제거된 기능일 수 있습니다.`,"features.notFoundTitle":`기능을 찾을 수 없습니다`,"features.requirementCount":`요구사항 {count}개`,"features.requirementHistory":`이 요구사항의 변경 이력 →`,"features.requirementNumber":`요구사항 {number}`,"features.usecase":`유즈케이스`,"features.tab.design":`설계`,"features.tab.requirements":`요구사항`,"filters.allAuthors":`모든 작성자`,"filters.allDocuments":`모든 문서 종류`,"filters.allContributors":`모든 참여자`,"filters.allDesigns":`설계 전체`,"filters.author":`작성자 필터`,"filters.contributor":`참여자 필터`,"filters.document":`문서 종류`,"filters.design":`설계 여부`,"filters.designMissing":`설계 없음`,"filters.designWritten":`설계 있음`,"filters.search":`검색`,"filters.searchContributors":`이름 또는 이메일 검색`,"filters.searchEvents":`기록·문서 제목, ID, 해시 검색`,"filters.searchFeatures":`기능·요구사항 검색`,"filters.target":`대상 필터`,"filters.allTargets":`모든 대상`,"filters.record":`결정기록 필터`,"filters.allRecords":`모든 변경`,"filters.recordMissing":`결정기록 없는 변경`,"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.shown":`커밋 {total}개 중 {shown}개를 보고 있습니다.`,"history.emptyDescription":`에이전트와 요구사항을 정리하고 커밋하면 이곳에서 결정기록과 문서 변경을 볼 수 있습니다.`,"history.emptyTitle":`표시할 기록이 없습니다.`,"history.loadMore":`이전 이력 더 보기`,"history.loadingMore":`이전 이력 불러오는 중…`,"history.reachedEnd":`마지막 이력까지 확인했습니다.`,"history.retryMore":`이전 이력 다시 불러오기`,"history.staleData":`이전 조회 자료입니다. 현재 상태로 확정하지 마세요.`,"kind.design":`설계`,"kind.requirement":`요구사항`,"markdown.alertCaution":`주의`,"markdown.alertImportant":`중요`,"markdown.alertNote":`참고`,"markdown.alertTip":`팁`,"markdown.alertWarning":`경고`,"markdown.diagram":`다이어그램`,"markdown.diagramFailed":`다이어그램을 그릴 수 없어 원문을 그대로 보여 줍니다. {message}`,"nav.about":`소개`,"nav.contributors":`참여자`,"nav.features":`기능별 요구사항`,"nav.git":`Git 상태`,"nav.history":`결정기록`,"nav.product":`대시보드`,"notFound.description":`주소를 확인하거나 대시보드로 돌아가세요.`,"notFound.home":`처음으로`,"notFound.title":`페이지를 찾을 수 없습니다`,"overview.commitsByContributor":`참여자별 커밋`,"overview.contributorsLink":`참여자 →`,"overview.legend":`{label} 범례`,"overview.noData":`아직 자료가 없습니다.`,"overview.otherContributors":`그 외 {count}명`,"overview.recentActivity":`최신 활동`,"overview.recentChangeTypes":`변경 종류`,"overview.pulse":`최근 {days}일 변경`,"overview.activityLink":`결정기록 →`,"overview.totalEvents":`전체 활동 {count}건`,"overview.noActivity":`커밋된 명세 활동이 아직 없습니다.`,"overview.stat.contributors":`참여자`,"overview.stat.features":`기능 명세`,"overview.stat.requirements":`요구사항`,"overview.summary":`현재 명세 요약`,"overview.uncommittedToken":`미커밋 변경`,"project.local":`로컬 프로젝트`,"request.failed":`불러오지 못했습니다`,"request.loading":`불러오는 중`,"request.loadingProject":`프로젝트 불러오는 중`,"request.loadingRecords":`프로젝트 기록을 불러오고 있습니다.`,"shell.home":`GITIFACT 홈`,"shell.workingChanges":`미커밋 명세 변경 있음`,"shell.workingChangesTooltip":`미커밋 명세 변경 있음 · Git 상태에서 확인`,"nav.changelog":`패치노트`,"shell.version":`v{version}`,"shell.versionTooltip":`패치노트 보기`,"changelog.title":`패치노트`,"changelog.subtitle":`설치된 버전까지의 변경 내역입니다.`,"changelog.release":`{version} 변경 내역`,"changelog.current":`사용 중`,"changelog.added":`추가`,"changelog.changed":`변경`,"changelog.removed":`제거`,"changelog.fixed":`수정`,"changelog.empty":`기록된 변경 내역이 없습니다.`,"changelog.fallback":`이 언어의 패치노트가 없어 기본 언어로 보여 줍니다.`,"api.invalidChangelog":`패치노트 응답이 지원하는 형식과 일치하지 않습니다.`,"nav.settings":`설정`,"search.empty":`검색할 문서가 없습니다.`,"search.emptyDescription":`요구사항이나 지침을 저장하면 여기에서 찾을 수 있습니다.`,"search.group.design":`설계`,"search.group.record":`결정기록`,"search.group.commit":`커밋`,"search.more":`{count}개 더 보기`,"search.group.feature":`기능 명세`,"search.group.requirement":`요구사항`,"search.group.recent":`최근 변경`,"search.hint.close":`닫기`,"search.hint.move":`이동`,"search.hint.open":`열기`,"search.label":`문서 검색`,"search.loading":`문서를 읽는 중…`,"search.noMatch":`일치하는 문서가 없습니다.`,"search.noMatchDescription":`다른 낱말로 찾아보세요. 제목과 본문을 함께 봅니다.`,"search.open":`문서 검색 열기`,"search.placeholder":`요구사항·설계·지침·결정기록 검색`,"search.trigger":`검색`,"settings.title":`설정`,"settings.subtitle":`이 브라우저에만 저장되며 프로젝트에는 아무것도 기록하지 않습니다.`,"settings.mode":`화면 모드`,"settings.modeHint":`시스템을 고르면 운영체제의 밝은·어두운 설정을 따릅니다.`,"settings.mode.system":`시스템`,"settings.mode.light":`라이트`,"settings.mode.dark":`다크`,"settings.palette":`색 조합`,"settings.paletteHint":`모든 조합은 라이트와 다크를 함께 갖습니다. 글자는 무채색에 가깝게 두고 바탕에만 은은한 색을 입혔습니다.`,"settings.palette.stone":`스톤`,"settings.palette.stoneHint":`따뜻한 회색과 잉크색 강조. 기본값`,"settings.palette.sage":`세이지 & 크림`,"settings.palette.sageHint":`은은한 녹색과 따뜻한 크림색. 부드럽고 편안한 조합`,"settings.palette.slate":`슬레이트 & 블루`,"settings.palette.slateHint":`푸른 회색과 선명한 파랑. 작업 도구다운 또렷한 조합`,"settings.palette.clay":`샌드 & 클레이`,"settings.palette.clayHint":`모래빛 바탕과 적갈색 강조. 따뜻하면서 개성이 있는 조합`,"settings.palette.olive":`올리브 & 웜그레이`,"settings.palette.oliveHint":`따뜻한 무채색 바탕에 짙은 올리브 그린. 세이지보다 진하고 또렷한 조합`,"kind.wiki":`위키 페이지`,"design.sources":`참고 문서`,"link.missing":`페이지가 없습니다: {path}`,"link.outside":`브라우저 밖의 파일입니다`,"link.copied":`경로를 복사했습니다`,"link.copyFailed":`경로를 복사하지 못했습니다: {path}`,"settings.language":`언어`,"settings.language.system":`브라우저 설정`,"shell.githubTooltip":`Gitifact GitHub 저장소 (새 탭)`,"kind.feature":`기능 개요`,"features.designIndex":`설계 목차`,"features.designIndexTitle":`이 기능의 설계`,"features.requirementDesigns":`이 요구사항의 설계`,"diff.fields":`바뀐 항목`,"diff.body":`본문 변경`,"diff.unfold":`바뀌지 않은 {count}줄 펼치기`,"diff.bodyUnchanged":`본문은 바뀌지 않았습니다.`,"source.title":`같은 커밋의 소스 변경`,"source.count":`파일 {count}개`,"source.more":`파일 더 보기`,"source.none":`이 커밋은 문서 밖의 파일을 바꾸지 않았습니다.`,"source.listLoading":`바뀐 파일을 불러오는 중`,"source.listFailed":`바뀐 파일을 불러오지 못했습니다.`,"source.fileLoading":`파일 변경을 불러오는 중`,"source.fileFailed":`파일 변경을 불러오지 못했습니다.`,"source.binary":`텍스트가 아닌 파일이라 줄 비교를 보이지 않습니다.`,"source.tooLarge":`파일이 커서(512KB 초과) 줄 비교를 보이지 않습니다.`,"source.fileDiff":`{path} 변경`,"source.added":`추가`,"source.modified":`변경`,"source.deleted":`삭제`,"source.renamed":`이동`,"commit.title":`커밋 상세`,"commit.moreDocuments":`문서 더 보기`,"commit.moreRecords":`이 커밋의 기록 더 보기`,"commit.noDocuments":`이 커밋은 문서를 바꾸지 않았습니다.`,"commit.noDocumentsDescription":`아래에서 이 커밋이 바꾼 소스 파일을 볼 수 있습니다.`,"commit.documentHistory":`이 문서의 변경 이력 →`,"event.currentFeature":`현재 기능 명세 보기 →`,"header.trail":`이동 경로`,"commit.back":`← 결정기록`,"features.requirementHistoryLabel":`변경 이력`,"features.designHistory":`이 설계의 변경 이력 →`,"features.designNumber":`설계 {number}`,"pageDescription.features":`기능별 최신 요구사항과 수용 조건, 관련 설계를 살펴봅니다.`,"pageDescription.history":`문서가 왜 바뀌었는지 결정기록과 변경 이력을 따라 읽습니다.`,"kind.instruction":`지침`,"activity.noRecord":`결정기록 없이 바뀐 문서`,"event.records":`결정기록`,"event.noRecord":`결정기록 없이 바뀐 문서`,"event.noRecords":`이 커밋에는 결정기록이 없습니다.`,"record.section.decision":`결정`,"record.section.context":`맥락`,"record.section.alternatives":`검토한 대안`,"activity.commitRecords":`기록 {count}건`,"activity.moreCommitRecords":`기록 {count}건 더 →`,"activity.otherDocuments":`이 결정의 다른 문서 {count}건 →`,"activity.otherRecords":`이 커밋의 다른 결정기록 {count}건 →`,"activity.otherUnrecorded":`결정기록 없는 문서 {count}건 →`,"commit.documents":`바뀐 문서`,"commit.tab.records":`결정기록`,"commit.tab.documents":`문서`,"commit.tab.code":`코드`,"record.title":`결정기록 상세`,"record.missing":`이 커밋에서 결정기록을 찾지 못했습니다.`,"record.documents":`이 결정으로 바뀐 문서`,"record.otherRecords":`같은 커밋의 다른 기록 {count}건 →`,"record.codeFiles":`코드 변경 {count}개 파일 →`,"commit.notFoundTitle":`커밋을 찾을 수 없습니다`,"commit.notFoundDescription":`{commit}(으)로 시작하는 커밋이 HEAD의 이력에 없거나 여러 개입니다. 해시를 더 길게 적어 보세요.`,"commit.backToList":`결정기록으로`,"docHistory.title":`문서 변경 이력`,"docHistory.current":`지금 문서 보기`,"docHistory.gone":`지금 작업 폴더에는 없는 문서입니다`,"docHistory.summary":`커밋 {commits}개 · 결정기록이 붙은 커밋 {recorded}개 · 결정기록 없이 바뀐 커밋 {missing}개`,"docHistory.commits":`이 문서를 바꾼 커밋`,"docHistory.compare":`변경 비교 →`,"docHistory.noRecord":`결정기록 없이 바뀜`,"docHistory.open":`맥락·대안 펼치기`,"docHistory.close":`접기`,"docHistory.more":`이전 커밋 더 보기`,"docHistory.notFoundTitle":`문서를 찾을 수 없습니다`,"docHistory.notFoundDescription":`{id}는 작업 폴더에도 HEAD의 이력에도 없습니다.`},ve={"gettingStarted.title":`Get started`,"nav.gettingStarted":`Get started`,"about.title":`About Gitifact`,"activity.changedRecords":`Documents this decision changed`,"activity.list":`Decision record list`,"activity.moreRecords":`{count} more documents →`,"activity.recent":`Recent specification activity`,"activity.recordCount":`Documents: {count}`,"activity.today":`Today`,"activity.yesterday":`Yesterday`,"api.invalidContract":`The server response does not match a supported contract.`,"api.invalidSession":`The server session format is incompatible.`,"api.invalidSpecs":`The specification response format is incompatible.`,"api.networkError":`Could not connect to the local server. Check that it is running.`,"api.otherCheckout":`This response belongs to a different checkout. Reconnect to continue.`,"api.serverChanged":`The server has changed. Reconnect to continue.`,"api.statusMismatch":`The HTTP status and response result do not match.`,"api.unreadableResponse":`Could not read the response format. Check the CLI and browser versions.`,"app.rootMissing":`The root element for the app is missing.`,"change.created":`Added`,"change.deleted":`Removed`,"change.modified":`Changed`,"change.moved":`Moved`,"common.inProgress":`In progress`,"common.recentChange":`Last changed`,"common.reconnect":`Reconnect`,"common.refresh":`Refresh`,"stale.title":`There are new changes`,"stale.description":`Documents or commits changed after this screen was read. Refresh to read them again as they are now.`,"state.added":`Uncommitted: added`,"state.modified":`Uncommitted: modified`,"state.deleted":`Uncommitted: to be deleted`,"working.title":`Not committed yet`,"working.description":`Records not committed yet, and documents changed since the last commit. Differences are between the last commit and the files now.`,"working.summary":`{records} records · {documents} changed documents`,"working.withoutRecord":`{count} changes without a record`,"working.moreRecords":`{count} more records →`,"working.noRecords":`No record written yet.`,"working.noDocuments":`No document changed since the last commit.`,"working.noExplained":`None of the documents this record names has changed.`,"working.draft":`Draft`,"common.description":`About {title}`,"common.uncommitted":`Uncommitted`,"contributors.activity":`Contributor activity →`,"contributors.back":`← Contributors`,"contributors.backToList":`Back to contributors`,"contributors.cardCommits":`Commits: {count}`,"contributors.cardFeatures":`Features: {count}`,"contributors.count":`Contributors: {count} · Based on Git authors; counts include code commits.`,"contributors.more":`More contributors`,"contributors.detail":`Contributor details`,"contributors.emptyDescription":`Check your search or create the first commit.`,"contributors.emptyTitle":`No contributors to show`,"contributors.featureShare":`Specification commits: {commits} · Requirements: {requirements}`,"contributors.features":`Contributed features`,"contributors.gitCommits":`Git commits: {count}`,"contributors.latest":`Last active {time}`,"contributors.noRecentActivity":`No specification activity by this contributor in the recent history. Older activity may be available on the activity page.`,"contributors.noSpecCommits":`No commits changed a specification folder. Code contributions and specification activity may differ.`,"contributors.notFoundDescription":`No Git author with the email {email} was found in recent commits.`,"contributors.notFoundTitle":`Contributor not found`,"design.missingRequirement":`{id} (not in current specifications)`,"design.relatedRequirements":`Related requirements`,"event.committer":`Committer: {name}`,"event.noContent":`No content.`,"features.back":`← Feature requirements`,"features.backToList":`Back to feature requirements`,"features.changeFilters":`Try different search terms or filters.`,"features.column.contributors":`Contributors`,"features.column.feature":`Feature`,"features.column.requirements":`Requirements`,"features.count":`Feature specifications: {count}`,"features.detail":`Feature specification`,"features.requirementShare":`Requirement share for {title}`,"features.designMark":`Design {count} →`,"features.acceptanceCount":`{count} criteria`,"features.moreRequirements":`{count} more requirements →`,"features.more":`More features`,"features.emptyDescription":`Ask your agent to write and commit feature specifications to see them here.`,"features.emptyTitle":`No matching features.`,"features.history":`Change history of this feature →`,"features.index":`Specification contents`,"features.indexTitle":`Requirements in this specification`,"features.noDesignMark":`No design`,"features.noDesignDescription":`Work out the implementation with your agent to see the design here.`,"features.noDesignTitle":`No design yet.`,"features.noRequirements":`This feature has no current requirements.`,"features.ofTotal":` (of {total})`,"features.countNote":`Contributors and last changes are based on committed records.`,"features.notFoundDescription":`{id} is not in the current specifications. It may have been renamed or removed.`,"features.notFoundTitle":`Feature not found`,"features.requirementCount":`Requirements: {count}`,"features.requirementHistory":`Change history of this requirement →`,"features.requirementNumber":`Requirement {number}`,"features.usecase":`Use case`,"features.tab.design":`Design`,"features.tab.requirements":`Requirements`,"filters.allAuthors":`All authors`,"filters.allDocuments":`All document kinds`,"filters.allContributors":`All contributors`,"filters.allDesigns":`All designs`,"filters.author":`Filter by author`,"filters.contributor":`Filter by contributor`,"filters.document":`Document kind`,"filters.design":`Design status`,"filters.designMissing":`No design`,"filters.designWritten":`Has design`,"filters.search":`Search`,"filters.searchContributors":`Search names or emails`,"filters.searchEvents":`Search record and document titles, IDs or hashes`,"filters.searchFeatures":`Search features and requirements`,"filters.target":`Target filter`,"filters.allTargets":`All targets`,"filters.record":`Record filter`,"filters.allRecords":`All changes`,"filters.recordMissing":`Changes without a record`,"git.branch":`Branch`,"git.changeSummary":`Changed paths: {count} · The first character is staged, the second is unstaged; . means unchanged.`,"git.checksNote":`Gitifact requirement checks are not run yet.`,"git.cleanDescription":`The working tree matches the last commit.`,"git.cleanTitle":`No changed files`,"git.column.code":`Code`,"git.column.extra":`Details`,"git.column.path":`Path`,"git.column.state":`Status`,"git.conflict":`Conflict`,"git.connecting":`Connecting to the local server.`,"git.noCommits":`No commits yet`,"git.observedNote":`This is an observation of Git status, not a fixed snapshot of file contents.`,"git.previousResult":`Previous result. See the observation time above.`,"git.reading":`Reading repository status.`,"git.refresh":`Refresh status`,"git.refreshing":`Reading…`,"git.repository":`Repository`,"git.repositoryState":`Repository status`,"git.submoduleCommit":`Submodule commit changed`,"git.submoduleTracked":`Tracked changes inside submodule`,"git.submoduleUntracked":`Untracked changes inside submodule`,"git.summary":`Change summary`,"git.viewRequirements":`View requirements →`,"git.workingNotice":`Overview and feature requirements show your working files; decision records show what is committed. Ask your agent to commit changes.`,"git.workingTitle":`Uncommitted specification changes`,"header.location":`Current location`,"header.observedAt":`Read at {time}`,"history.changeFilters":`Try different filters or search terms.`,"history.shown":`Showing {shown} of {total} commits.`,"history.emptyDescription":`Ask your agent to write and commit requirements to see records and document changes here.`,"history.emptyTitle":`Nothing to show yet.`,"history.loadMore":`Load older history`,"history.loadingMore":`Loading older history…`,"history.reachedEnd":`You have reached the end of the history.`,"history.retryMore":`Retry loading older history`,"history.staleData":`Previous result. It may not reflect the current state.`,"kind.design":`Design`,"kind.requirement":`Requirement`,"markdown.alertCaution":`Caution`,"markdown.alertImportant":`Important`,"markdown.alertNote":`Note`,"markdown.alertTip":`Tip`,"markdown.alertWarning":`Warning`,"markdown.diagram":`Diagram`,"markdown.diagramFailed":`Could not render the diagram. Showing its source instead. {message}`,"nav.about":`About`,"nav.contributors":`Contributors`,"nav.features":`Feature requirements`,"nav.git":`Git status`,"nav.history":`Decision records`,"nav.product":`Dashboard`,"notFound.description":`Check the address or return to the overview.`,"notFound.home":`Home`,"notFound.title":`Page not found`,"overview.commitsByContributor":`Commits by contributor`,"overview.contributorsLink":`Contributors →`,"overview.legend":`{label} legend`,"overview.noData":`No data yet.`,"overview.otherContributors":`{count} other contributors`,"overview.recentActivity":`Latest activity`,"overview.recentChangeTypes":`Change types`,"overview.pulse":`Changes over {days} days`,"overview.activityLink":`Decision records →`,"overview.totalEvents":`Total activity: {count}`,"overview.noActivity":`No committed specification activity yet.`,"overview.stat.contributors":`Contributors`,"overview.stat.features":`Feature specifications`,"overview.stat.requirements":`Requirements`,"overview.summary":`Current specifications`,"overview.uncommittedToken":`Uncommitted changes`,"project.local":`Local project`,"request.failed":`Could not load`,"request.loading":`Loading`,"request.loadingProject":`Loading project`,"request.loadingRecords":`Loading project records.`,"shell.home":`GITIFACT home`,"shell.workingChanges":`Uncommitted specification changes`,"shell.workingChangesTooltip":`Uncommitted specification changes · See Git status`,"nav.changelog":`Release notes`,"shell.version":`v{version}`,"shell.versionTooltip":`View release notes`,"changelog.title":`Release notes`,"changelog.subtitle":`Changes through the installed version.`,"changelog.release":`Release {version}`,"changelog.current":`Current`,"changelog.added":`Added`,"changelog.changed":`Changed`,"changelog.removed":`Removed`,"changelog.fixed":`Fixed`,"changelog.empty":`No release notes available.`,"changelog.fallback":`Release notes are unavailable in this language. Showing the default language.`,"api.invalidChangelog":`The release notes response format is incompatible.`,"nav.settings":`Settings`,"search.empty":`No documents to search.`,"search.emptyDescription":`Save requirements or instructions to find them here.`,"search.group.design":`Designs`,"search.group.record":`Decision records`,"search.group.commit":`Commits`,"search.more":`{count} more`,"search.group.feature":`Feature specifications`,"search.group.requirement":`Requirements`,"search.group.recent":`Recent changes`,"search.hint.close":`Close`,"search.hint.move":`Move`,"search.hint.open":`Open`,"search.label":`Search documents`,"search.loading":`Reading documents…`,"search.noMatch":`No matching documents.`,"search.noMatchDescription":`Try another term. Search includes titles and content.`,"search.open":`Open document search`,"search.placeholder":`Search requirements, designs, instructions and records`,"search.trigger":`Search`,"settings.title":`Settings`,"settings.subtitle":`Saved only in this browser. Nothing is written to the project.`,"settings.mode":`Appearance`,"settings.modeHint":`System follows your operating system's light or dark setting.`,"settings.mode.system":`System`,"settings.mode.light":`Light`,"settings.mode.dark":`Dark`,"settings.palette":`Color palette`,"settings.paletteHint":`Each palette includes light and dark modes, with neutral text and subtly tinted backgrounds.`,"settings.palette.stone":`Stone`,"settings.palette.stoneHint":`Warm gray with ink accents. Default.`,"settings.palette.sage":`Sage & cream`,"settings.palette.sageHint":`Muted green and warm cream.`,"settings.palette.slate":`Slate & blue`,"settings.palette.slateHint":`Blue-gray with clear blue accents.`,"settings.palette.clay":`Sand & clay`,"settings.palette.clayHint":`Sandy backgrounds with reddish-brown accents.`,"settings.palette.olive":`Olive & warm gray`,"settings.palette.oliveHint":`Warm neutrals with deep olive green. Darker than sage.`,"kind.wiki":`Wiki page`,"design.sources":`References`,"link.missing":`Page not found: {path}`,"link.outside":`File outside the browser`,"link.copied":`Path copied`,"link.copyFailed":`Could not copy path: {path}`,"settings.language":`Language`,"settings.language.system":`Browser default`,"shell.githubTooltip":`Gitifact on GitHub (opens in a new tab)`,"kind.feature":`Feature overview`,"features.designIndex":`Design index`,"features.designIndexTitle":`Designs of this feature`,"features.requirementDesigns":`Designs for this requirement`,"diff.fields":`Changed fields`,"diff.body":`Body changes`,"diff.unfold":`Show {count} unchanged lines`,"diff.bodyUnchanged":`The body did not change.`,"source.title":`Source changed in the same commit`,"source.count":`{count} files`,"source.more":`More files`,"source.none":`This commit changed no files outside the documents.`,"source.listLoading":`Loading the changed files`,"source.listFailed":`Could not load the changed files.`,"source.fileLoading":`Loading the file change`,"source.fileFailed":`Could not load the file change.`,"source.binary":`Not a text file, so no line comparison is shown.`,"source.tooLarge":`The file is too large (over 512 KB) for a line comparison.`,"source.fileDiff":`Changes to {path}`,"source.added":`Added`,"source.modified":`Modified`,"source.deleted":`Deleted`,"source.renamed":`Moved`,"commit.title":`Commit`,"commit.moreDocuments":`More documents`,"commit.moreRecords":`More records of this commit`,"commit.noDocuments":`This commit changed no documents.`,"commit.noDocumentsDescription":`The source files it changed are below.`,"commit.documentHistory":`Change history of this document →`,"event.currentFeature":`Open the current feature →`,"header.trail":`Breadcrumb`,"commit.back":`← Decision records`,"features.requirementHistoryLabel":`History`,"features.designHistory":`Change history of this design →`,"features.designNumber":`Design {number}`,"pageDescription.features":`Browse the latest requirements, acceptance criteria, and related designs by feature.`,"pageDescription.history":`Follow decision records and changes to see why documents changed.`,"kind.instruction":`Instruction`,"activity.noRecord":`Changed without a record`,"event.records":`Decision records`,"event.noRecord":`Changed without a record`,"event.noRecords":`This commit has no records.`,"record.section.decision":`Decision`,"record.section.context":`Context`,"record.section.alternatives":`Alternatives considered`,"activity.commitRecords":`Records: {count}`,"activity.moreCommitRecords":`{count} more records →`,"activity.otherDocuments":`{count} other documents of this decision →`,"activity.otherRecords":`{count} other records in this commit →`,"activity.otherUnrecorded":`{count} documents without a record →`,"commit.documents":`Changed documents`,"commit.tab.records":`Records`,"commit.tab.documents":`Documents`,"commit.tab.code":`Code`,"record.title":`Decision record`,"record.missing":`This commit does not hold that decision record.`,"record.documents":`Documents this decision changed`,"record.otherRecords":`{count} other records in this commit →`,"record.codeFiles":`Code changes in {count} files →`,"commit.notFoundTitle":`Commit not found`,"commit.notFoundDescription":`No commit in HEAD's history starts with {commit}, or more than one does. Try more of the hash.`,"commit.backToList":`Back to decision records`,"docHistory.title":`Document change history`,"docHistory.current":`Open the document`,"docHistory.gone":`The working tree no longer holds this document`,"docHistory.summary":`{commits} commits · {recorded} with a decision record · {missing} changed without one`,"docHistory.commits":`Commits that changed this document`,"docHistory.compare":`Compare the change →`,"docHistory.noRecord":`Changed without a decision record`,"docHistory.open":`Show context and alternatives`,"docHistory.close":`Hide`,"docHistory.more":`Show earlier commits`,"docHistory.notFoundTitle":`Document not found`,"docHistory.notFoundDescription":`Neither the working tree nor HEAD's history has {id}.`};function ye(e){return/^ko(?:[-_]|$)/i.test(e)?`ko`:`en`}var be=`gitifact-language`,xe=new Set;function Se(){try{let e=localStorage.getItem(be);return e===`ko`||e===`en`?e:`system`}catch{return`system`}}var Ce=Se(),we=()=>Ce,Te=()=>Ce===`system`?ye(navigator.language):Ce;function Ee(){document.documentElement.lang=Te(),xe.forEach(e=>e())}function De(e){if([`system`,`ko`,`en`].includes(e)){Ce=e;try{localStorage.setItem(be,e)}catch{}Ee()}}window.addEventListener(`storage`,e=>{(e.key===be||e.key===null)&&(Ce=Se(),Ee())}),window.addEventListener(`languagechange`,Ee);var Oe=e=>(xe.add(e),()=>{xe.delete(e)}),ke=()=>(0,M.useSyncExternalStore)(Oe,Te),Ae=()=>(0,M.useSyncExternalStore)(Oe,we);document.documentElement.lang=Te();var je=`<p align="center">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/dev-goraebap/gitifact/main/packages/intro/assets/gitifact-logo.svg" alt="GITIFACT" width="720" />
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+
[한국어](https://github.com/dev-goraebap/gitifact/blob/main/README.ko.md)
|
|
7
|
+
|
|
8
|
+
Gitifact is an open-source CLI that keeps the requirements, designs, and reasons for changes that come out of conversations with AI agents in the same repository as your source code, in the same commits.
|
|
9
|
+
|
|
10
|
+
As you keep building with your agent the way you already do, it helps the context of "what this product does right now" and "why this code changed" stay in Git alongside the code.
|
|
11
|
+
|
|
12
|
+
## Can't I just search git log?
|
|
13
|
+
|
|
14
|
+
You can have your agent read git log and diffs. But as you keep building a product with an agent, some questions are hard to answer from the change history alone.
|
|
15
|
+
|
|
16
|
+
- **What exactly does this product do right now?**
|
|
17
|
+
Code shows what it does now, but not which behavior is a rule to keep and which just happened to turn out that way. Looking for that intent in git log rarely works, because commit messages seldom record the reason.
|
|
18
|
+
Gitifact keeps the behavior the product must guarantee as requirements, so the agent reads what it has to keep before changing the code. Features that need technical structure also get design documents, so the agent can check the implementation context.
|
|
19
|
+
|
|
20
|
+
- **Why was this decided, and what was ruled out?**
|
|
21
|
+
Commit messages usually record only what was done. "We tried B instead of A and dropped it because of this problem" rarely makes it into a commit message. A new agent session that doesn't know the earlier conversation may propose an option that was already considered and dropped.
|
|
22
|
+
A Gitifact decision record keeps the context that called for the decision and what was chosen, along with the alternatives that were considered and why they were dropped. The agent checks the related decisions before changing the code, which cuts down on proposing options that were already ruled out.
|
|
23
|
+
|
|
24
|
+
- **What happens to the history when files move or split?**
|
|
25
|
+
Git tracks changes by file path and line. When a refactor splits code into several files or moves a folder, the per-file diff breaks and the earlier context becomes hard to follow.
|
|
26
|
+
Gitifact gives each requirement and design a unique ID and links documents and decisions with Git trailers at commit time. Even when a file is renamed or moved to another folder, the decisions a document went through stay queryable by its ID.
|
|
27
|
+
|
|
28
|
+
- **Do I have to update the documents for every trial and error?**
|
|
29
|
+
Revising documents at every step of a conversation where you try things quickly and roll them back breaks the flow of development. During the conversation, the agent refines a draft of the requirements while it changes the code.
|
|
30
|
+
When the work is done and not yet committed, the agent offers to commit. It also offers to commit before moving on to the next task, so the decisions and changes of two tasks don't get mixed. It commits only when you allow it or the project has a policy for it (pushing is a separate request), and at that point it puts the settled documents, decision records, code, and tests into one commit.
|
|
31
|
+
|
|
32
|
+
- **If it's just a rule, won't records get skipped eventually?**
|
|
33
|
+
A resolution to "always update the docs" is easy to forget in the middle of busy development. Gitifact checks the documents with its CLI. If an existing document changed without a decision record explaining it, a draft is left, or a reference is broken, it says so before the commit, which helps keep records from going missing.
|
|
34
|
+
|
|
35
|
+
## Getting started
|
|
36
|
+
|
|
37
|
+
In a project you're starting or one already underway, give this prompt to the agent you use:
|
|
38
|
+
|
|
39
|
+
\`\`\`text
|
|
40
|
+
Run npx --yes gitifact init in this project.
|
|
41
|
+
If the command is blocked, don't hand it to me: show me the exact command and ask for my approval.
|
|
42
|
+
Read the GITIFACT block that init adds to AGENTS.md or the relevant agent instructions file, and follow it from this session onward.
|
|
43
|
+
\`\`\`
|
|
44
|
+
|
|
45
|
+
From then on, describe the feature you want to build or the behavior you want to change, as usual.
|
|
46
|
+
|
|
47
|
+
- Before writing code, the agent checks the related requirements and designs, and writes a draft first when needed.
|
|
48
|
+
- It asks only about unclear product behavior and decides the rest itself.
|
|
49
|
+
- When it changes an existing requirement or picks one of several options, it writes a decision record.
|
|
50
|
+
- When the work is done without a commit, or before moving on to the next task, the agent offers to commit. Once you approve (or under the project's policy), it puts the documents, decision records, code, and tests into one commit. (Pushing is a separate request.)
|
|
51
|
+
- To see the recorded documents and decision history, ask "Open the Gitifact browser."
|
|
52
|
+
|
|
53
|
+
When a newer version is out, gitifact commands say so and your agent asks whether to update. To run commands yourself, see the [CLI guide](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/README.md).
|
|
54
|
+
|
|
55
|
+
## How it fits together
|
|
56
|
+
|
|
57
|
+
The source of the records is the Markdown documents and commit history in your Git repository.
|
|
58
|
+
|
|
59
|
+
\`\`\`mermaid
|
|
60
|
+
flowchart LR
|
|
61
|
+
A["AGENTS.md<br/>instruction block"] -->|which command, when| G["Agent"]
|
|
62
|
+
G -->|through the launcher| C["Gitifact CLI"]
|
|
63
|
+
C -->|write · check| D["Markdown documents<br/>requirements · designs · decision records"]
|
|
64
|
+
C -->|commit| K["Git commit<br/>documents · records · code"]
|
|
65
|
+
K --> B["Browser viewer<br/>read-only"]
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
- **AGENTS.md (instruction block):** \`init\` writes a block into your agent instruction file. It says only which command to use when; the agent reads the detailed formats from the built-in guides (\`gitifact guide show\`) when it needs them.
|
|
69
|
+
- **Launcher and CLI:** A launcher file in the repository fetches the CLI version the project is set to into your user cache and runs it. Each project uses its own version without a global installation.
|
|
70
|
+
- **Documents:**
|
|
71
|
+
- **Requirements and designs:** The behavior and acceptance criteria the product must keep, and its technical structure, kept as Markdown documents.
|
|
72
|
+
- **Decision records:** Records of why a document changed: the context, the decision, and the alternatives considered.
|
|
73
|
+
- **Commits and trailers:** The CLI puts the changed documents, decision records, and code into one commit and links the commit to the documents with Git trailers.
|
|
74
|
+
- **Built-in browser viewer:** A local web app opened with \`gitifact browser\`. It reads the files and history of your local Git repository and shows the specifications by feature, the flow of decision records, and contributors, read-only.
|
|
75
|
+
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+

|
|
79
|
+
|
|
80
|
+
## Principles and scope
|
|
81
|
+
|
|
82
|
+
- **Markdown and Git history are the source:** Every record is a plain Markdown file and a standard Git commit. If you stop using Gitifact, the requirements and decision records you wrote stay in your repository's Git history as they are.
|
|
83
|
+
- **Adopt it gradually:** There's no need to go back and document past history; start recording from the features you add or change next.
|
|
84
|
+
- **One Git repository:** Gitifact assumes product development and its records live within one Git repository (a single project or a monorepo).
|
|
85
|
+
|
|
86
|
+
## Project status
|
|
87
|
+
|
|
88
|
+
Gitifact connects Markdown requirements, designs, and decision records to Git commits. The browser viewer shows decision records, requirements, and contributors. Ask your agent to “Open the Gitifact browser.”
|
|
89
|
+
|
|
90
|
+
Find the latest published version on [npm](https://www.npmjs.com/package/gitifact) and version-by-version changes in the [release notes](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/src/shared/i18n/en/changelog.md).
|
|
91
|
+
|
|
92
|
+
This document describes the product's purpose, principles, and scope. Feature requirements and designs live in the [specifications](https://github.com/dev-goraebap/gitifact/tree/main/.gitifact/spec).
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
[MIT](https://github.com/dev-goraebap/gitifact/blob/main/LICENSE).
|
|
97
|
+
`,Me="# Getting started\n\n[한국어](https://github.com/dev-goraebap/gitifact/blob/main/packages/intro/ko/getting-started.md)\n\n## Install and set up\n\nGive this prompt to the agent you use in your project:\n\n```text\nRun npx --yes gitifact init in this project.\nIf the command is blocked, don't hand it to me: show me the exact command and ask for my approval.\nRead the GITIFACT block that init adds to AGENTS.md or the relevant agent instructions file, and follow it from this session onward.\n```\n\n## Keep developing\n\nAfter setup, ask your agent to work as usual.\n\n```text\nLet users delete their posts.\n```\n\nThe agent organizes requirements and designs as the GITIFACT block instructs. When the work is ready, ask it to “Commit the changes.” It will include the relevant specifications and reasons along with the code.\n\nFor an existing project, you can start with the features you work on next. To document the whole product first, ask:\n\n```text\nDocument this project's requirements and designs.\n```\n\n## View documents and history\n\nTell your agent what you want to see. For example:\n\n- “I'd like to see the requirements.”\n- “Show me the product specifications.”\n- “Show me recent changes.”\n- “Open the Gitifact browser.”\n\nThe browser viewer includes:\n\n| Page | Contents |\n| :--- | :--- |\n| Dashboard | Project size and recent activity |\n| Features | Current requirements and designs by feature |\n| Decision records | Committed decision records and the before/after content of the documents they explain |\n| Contributors | Contributions by Git author |\n| Git status | Changed files in the working directory |\n\nRequirements and designs show the working copy. Decision records show committed history.\n\n## Send feedback on Gitifact\n\nTo report a bug in Gitifact or suggest an improvement, tell your agent.\n\n```text\nReport this bug to Gitifact as an issue.\n```\n\nThe agent shows you the title and body first and sends the issue to the Gitifact repository once you confirm. If the GitHub CLI (`gh`) is signed in, the issue is created under your account; otherwise you get the new-issue page with everything filled in. Only the Gitifact, OS and Node versions are appended; no project files are sent.\n\n## Language\n\nChoose English, 한국어, or Browser default in the viewer's Settings. The selection is saved in that browser. Project documents stay in their original language.\n\nThe CLI follows your environment's language and uses English for unsupported languages. To choose explicitly, use `gitifact --lang en <command>` or `gitifact --lang ko <command>`. You can also set `GITIFACT_LANG` to `en` or `ko` for your shell. The language of the GITIFACT blocks is recorded as `language` in `.gitifact/config.json` and stays through updates unless you supply `--lang`.\n\n## Update\n\nWhen a newer version is out, or a teammate moves the project to one, gitifact commands print a one-line notice before their output. Your agent then shows the update command and asks whether to update now or later, and once you allow it, runs it itself. You can also ask at any time:\n\n```text\nUpdate Gitifact.\n```\n\nTo update, run `npx --yes gitifact@<new-version> update` once. `update` moves the GITIFACT block in your agent instruction files, the project's version (`cli`) in `.gitifact/config.json` and the launcher `.gitifact/bin/cli.mjs` to the new version. Commit them, and teammates' launchers fetch the new version on their next run. To update later, `gitifact update --later` quiets that version's notice for 24 hours. Restart the browser server with the new version.\n\n> [!IMPORTANT]\n> From 0.8.3, `.gitifact/config.json` records `cli` and `language`. CLI 0.8.2 and earlier cannot read it and stop with `INVALID_CONFIG`, so move everyone to 0.8.3 or later before updating.\n\nProjects recorded with 0.7 (storage schemaVersion 2) need a one-time move, because the document layout changed in 0.8.0. After an update your agent tells you so, and if you agree it moves the documents following `gitifact guide show migrate`, keeping their IDs and reasons.\n\n## Run commands yourself\n\nGitifact requires Node.js 24.x and Git. Run commands inside the target Git repository.\n\n```sh\nnpx --yes gitifact init\nnode .gitifact/bin/cli.mjs browser\n```\n\nOpen the local URL printed by `browser`. Press Ctrl+C in the terminal to stop the server.\n\nThe launcher `init` writes, `.gitifact/bin/cli.mjs`, fetches the `cli` version in `.gitifact/config.json` into this computer's user cache on its first run and runs that version from then on. Nothing is installed globally, and projects on different versions do not affect each other. Commit the launcher, and teammates who clone the repository use it as it is. Agents run commands through the launcher too. If the agent tool blocks a command, the agent points you to that tool's approval (a prompt or a permission setting).\n\nIf Windows PowerShell says `npx.ps1` cannot be loaded, running scripts is disabled. Use `npx.cmd` instead.\n\n> [!NOTE]\n> To type a short `gitifact` in the terminal, you can still install it globally with `npm install -g gitifact`. When the global installation and the project's version differ, commands print a notice first.\n\n### Common commands\n\n`gitifact` in the tables below is the launcher `node .gitifact/bin/cli.mjs` (or a global installation).\n\n| Command | Purpose |\n| :--- | :--- |\n| `gitifact init --dry-run` | Preview setup without changing files |\n| `gitifact init` | Set up Gitifact and install or refresh agent instructions |\n| `gitifact browser` | Start the browser viewer |\n| `gitifact update --check` | Check for a newer version without changing files |\n| `gitifact update` | Move the GITIFACT block and the project's version to the installed version |\n| `gitifact update --later` | Quiet the announced newer version for 24 hours |\n| `gitifact guide list` | List agent guide topics |\n| `gitifact guide show spec` | Requirement file format and writing rules |\n| `gitifact guide show design` | Feature design rules |\n| `gitifact guide show records` | When to write a decision record and its format |\n| `gitifact guide show commit` | Commit changes with their records and related files |\n\n### Read documents and commit\n\nRequirements and designs are Markdown files under `.gitifact/` that you edit directly. New documents are created through the CLI, which issues their IDs.\n\n| Command | Purpose |\n| :--- | :--- |\n| `gitifact specs list` | Features, requirements and designs (IDs, titles, descriptions, no bodies); filter with `--uncovered`, `--changed-since`, `--q` and more |\n| `gitifact specs show <ID>` | A document's source and the designs pointing to it; `--ref <commit>` for past text |\n| `gitifact records list --doc <ID>` | Decision records and commits for a document |\n| `gitifact specs new requirement <feature>/<name>` | Create a document with an issued ID and a skeleton |\n| `gitifact check` | Check format, IDs and references across all documents |\n| `gitifact changes list` | Documents changed since HEAD, uncommitted records, and changes without a record |\n| `gitifact changes commit --file <input-file> --dry-run` | Preview the commit without changing files |\n| `gitifact changes commit --file <input-file>` | Commit the selected documents, records and related files |\n\nSee `gitifact guide show commit` for the input format.\n\n### Setup and runtime options\n\n| Option | Purpose |\n| :--- | :--- |\n| `gitifact init --agent codex` | Install instructions for a tool: `claude`, `cursor`, `codex`, `hermes`, or `all` |\n| `gitifact init --skip-agents` | Set up without changing agent instruction files |\n| `gitifact init --remove-agents` | Remove GITIFACT blocks from agent instructions |\n| `gitifact browser --port 4317` | Choose the browser server port |\n| `gitifact --lang en <command>` | Use English for output and any generated agent blocks |\n\n`--remove-agents` removes only GITIFACT blocks; it preserves project records.\n\nAdd `--help` to any command to see its options.\n",Ne=`<p align="center">
|
|
98
|
+
<img src="packages/intro/assets/gitifact-logo.svg" alt="GITIFACT" width="720" />
|
|
99
|
+
</p>
|
|
100
|
+
|
|
101
|
+
[English](https://github.com/dev-goraebap/gitifact/blob/main/README.md)
|
|
102
|
+
|
|
103
|
+
Gitifact는 AI 에이전트와 대화하며 나온 요구사항, 설계, 변경 이유를 소스 코드와 같은 저장소에서, 같은 커밋으로 관리하는 오픈소스 CLI 도구입니다.
|
|
104
|
+
|
|
105
|
+
평소처럼 에이전트와 대화하며 제품을 만드는 흐름 속에서 "이 제품이 지금 무슨 동작을 하는지", "이 코드는 왜 이렇게 바뀌었는지"라는 맥락이 코드와 함께 Git에 조용히 남도록 돕습니다.
|
|
106
|
+
|
|
107
|
+
## 그냥 git log를 찾아보면 안 되나요?
|
|
108
|
+
|
|
109
|
+
에이전트에게 git log와 diff를 읽게 할 수는 있습니다. 하지만 에이전트와 함께 제품을 계속 만들어갈 때, 과거 변경 이력만으로는 답하기 어려운 질문들이 생깁니다.
|
|
110
|
+
|
|
111
|
+
- **지금 이 제품은 정확히 무슨 동작을 하나요?**
|
|
112
|
+
코드는 지금 무엇을 하는지는 보여 주지만, 어떤 동작이 지켜야 할 규칙이고 어떤 것이 우연히 그렇게 된 것인지는 알려 주지 않습니다. 그 의도를 git log에서 찾으려 해도 커밋 메시지에 이유가 남아 있는 경우는 드뭅니다.
|
|
113
|
+
Gitifact는 제품이 보장해야 할 동작을 요구사항으로 따로 두어, 에이전트가 코드를 고치기 전에 무엇을 지켜야 하는지 읽게 합니다. 기술 구조가 필요한 기능은 설계 문서도 함께 두어 구현 맥락을 확인하게 합니다.
|
|
114
|
+
|
|
115
|
+
- **이 결정은 왜 내렸고, 어떤 대안을 버렸나요?**
|
|
116
|
+
커밋 메시지에는 대개 '무엇을 했는지'만 적힙니다. "A 대신 B를 시도했다가 이런 문제가 있어서 버렸다"는 이야기는 커밋 메시지에 거의 남지 않습니다. 이전 대화를 모르는 새 세션의 에이전트는 이미 검토 끝에 버린 안을 다시 제안하기도 합니다.
|
|
117
|
+
Gitifact의 결정기록은 그 결정이 필요했던 맥락과 선택한 내용뿐 아니라, 검토했다가 버린 대안과 그 까닭까지 함께 남깁니다. 에이전트가 코드를 고치기 전에 관련 결정 흐름을 확인해, 이미 검토 끝에 버린 안을 다시 제안하는 일을 줄이게 합니다.
|
|
118
|
+
|
|
119
|
+
- **파일을 옮기거나 쪼개면 이전 이력은 어떻게 되나요?**
|
|
120
|
+
Git은 파일 경로와 줄 단위로 변경을 추적합니다. 리팩터링으로 코드를 여러 파일로 쪼개거나 폴더를 옮기면 파일 단위 diff가 끊겨 과거 변경 맥락을 따라가기 어려워집니다.
|
|
121
|
+
Gitifact는 요구사항과 설계마다 고유 ID를 부여하고, 커밋할 때 Git 트레일러로 문서와 결정 흐름을 연결합니다. 파일 이름이 바뀌거나 다른 폴더로 이동하더라도 문서 ID를 통해 그 문서가 거쳐 온 결정 흐름을 계속 조회할 수 있게 합니다.
|
|
122
|
+
|
|
123
|
+
- **중간 시행착오마다 문서를 다 고쳐야 하나요?**
|
|
124
|
+
화면을 보며 빠르게 시도하고 되돌리는 대화 과정마다 문서를 개정하면 개발 흐름이 끊깁니다. 대화 중에는 에이전트가 요구사항 초안을 다듬으며 코드를 수정하게 둡니다.
|
|
125
|
+
작업을 마친 뒤 아직 커밋하지 않았으면 에이전트가 먼저 커밋을 제안합니다. 커밋하지 않은 채 다음 작업으로 넘어가려 할 때도, 두 작업의 결정과 변경이 섞이기 전에 커밋하자고 제안합니다. 실제 커밋은 사용자가 허락하거나 프로젝트 정책이 있을 때만 수행하며(푸시는 별도로 요청받습니다), 그 시점에 정리된 문서, 결정기록, 코드, 테스트를 한 커밋으로 묶어 Git에 남깁니다.
|
|
126
|
+
|
|
127
|
+
- **규칙만 정해두면 결국 기록을 빼먹지 않나요?**
|
|
128
|
+
"문서를 꼭 갱신하자"는 다짐은 바쁜 개발 중에 쉽게 잊힙니다. Gitifact는 CLI로 문서 상태를 검사합니다. 기존 문서를 고쳤는데 설명하는 결정기록이 없거나, 초안 상태가 남아 있거나 끊긴 참조가 있으면 커밋 전에 알려주어 기록 누락을 줄이도록 돕습니다.
|
|
129
|
+
|
|
130
|
+
## 시작하기
|
|
131
|
+
|
|
132
|
+
진행 중인 프로젝트나 새 프로젝트에서, 사용하는 에이전트에게 아래 프롬프트를 건네면 됩니다.
|
|
133
|
+
|
|
134
|
+
\`\`\`text
|
|
135
|
+
이 프로젝트에서 npx --yes gitifact init을 실행하세요.
|
|
136
|
+
명령이 막히면 저에게 넘기지 말고 명령을 그대로 보여 주며 허용을 물어보세요.
|
|
137
|
+
init이 AGENTS.md 등에 쓴 GITIFACT 블록을 읽고 이번 세션부터 따르세요.
|
|
138
|
+
\`\`\`
|
|
139
|
+
|
|
140
|
+
그다음부터는 평소처럼 만들고 싶은 기능이나 바꾸고 싶은 동작을 이야기하면 됩니다.
|
|
141
|
+
|
|
142
|
+
- 에이전트는 코드를 작성하기 전에 관련 요구사항과 설계를 확인하고, 필요한 경우 초안을 먼저 작성합니다.
|
|
143
|
+
- 불명확한 제품 동작만 질문하고, 나머지는 판단해 진행합니다.
|
|
144
|
+
- 기존 요구사항을 수정하거나 여러 대안 중 하나를 고르면 결정기록을 작성합니다.
|
|
145
|
+
- 작업을 마쳤을 때 커밋하지 않았거나 다음 작업으로 넘어가려 하면 에이전트가 먼저 커밋을 제안합니다. 사용자가 승인하면(또는 프로젝트 정책에 따라) 문서, 결정기록, 코드, 테스트를 한 커밋으로 묶어 커밋합니다. (푸시는 별도로 요청받습니다.)
|
|
146
|
+
- 기록된 문서와 결정 이력을 확인하고 싶다면 "gitifact 브라우저를 열어주세요"라고 요청하면 됩니다.
|
|
147
|
+
|
|
148
|
+
새 버전이 나오면 gitifact 명령이 알려 주고, 에이전트가 업데이트할지 묻습니다. 직접 명령을 실행하려면 [CLI 안내](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/README.md)를 참고하세요.
|
|
149
|
+
|
|
150
|
+
## 구조
|
|
151
|
+
|
|
152
|
+
기록의 원본은 Git 저장소 안의 Markdown 문서와 커밋 이력입니다.
|
|
153
|
+
|
|
154
|
+
\`\`\`mermaid
|
|
155
|
+
flowchart LR
|
|
156
|
+
A["AGENTS.md<br/>지침 블록"] -->|언제 어떤 명령을 쓸지| G["에이전트"]
|
|
157
|
+
G -->|실행기로 호출| C["Gitifact CLI"]
|
|
158
|
+
C -->|작성 · 검사| D["Markdown 문서<br/>요구사항 · 설계 · 결정기록"]
|
|
159
|
+
C -->|커밋| K["Git 커밋<br/>문서 · 기록 · 코드"]
|
|
160
|
+
K --> B["브라우저 뷰어<br/>읽기 전용"]
|
|
161
|
+
\`\`\`
|
|
162
|
+
|
|
163
|
+
- **AGENTS.md (지침 블록):** \`init\`이 에이전트 지침 파일에 블록을 작성합니다. 언제 어떤 명령을 써야 하는지만 담겨 있으며, 상세한 형식은 에이전트가 필요할 때 내장 가이드(\`gitifact guide show\`)로 찾아 읽습니다.
|
|
164
|
+
- **실행기와 CLI:** 저장소에 포함된 실행기 파일이 프로젝트 기준 버전의 CLI를 사용자 캐시에 받아 실행합니다. 전역 설치 없이 프로젝트마다 지정된 버전을 사용합니다.
|
|
165
|
+
- **문서:**
|
|
166
|
+
- **요구사항과 설계:** 제품이 지켜야 할 동작과 수용 조건, 그리고 기술 구조를 Markdown 문서로 유지합니다.
|
|
167
|
+
- **결정기록:** 문서가 왜 그렇게 바뀌었는지의 맥락과 결정, 검토한 대안을 담는 기록입니다.
|
|
168
|
+
- **커밋과 트레일러:** CLI가 바뀐 문서, 결정기록, 코드를 한 커밋에 담고, Git 트레일러로 커밋과 문서를 연결합니다.
|
|
169
|
+
- **내장 브라우저 뷰어:** \`gitifact browser\`로 열리는 로컬 웹 앱입니다. 로컬 Git 저장소의 파일과 이력을 읽어 기능별 명세, 결정기록의 흐름, 참여자 현황을 읽기 전용으로 보여줍니다.
|
|
170
|
+
|
|
171
|
+

|
|
172
|
+
|
|
173
|
+

|
|
174
|
+
|
|
175
|
+
## 원칙과 범위
|
|
176
|
+
|
|
177
|
+
- **Markdown과 Git 이력이 원본입니다:** 모든 기록은 일반 Markdown 파일과 표준 Git 커밋으로 관리합니다. Gitifact를 더 이상 사용하지 않더라도 작성된 요구사항과 결정기록은 저장소의 Git 이력에 그대로 남습니다.
|
|
178
|
+
- **점진적으로 도입할 수 있습니다:** 이전 이력을 거슬러 올라가 문서화할 필요 없이, 새로 추가하거나 수정하는 기능부터 기록을 시작하면 됩니다.
|
|
179
|
+
- **단일 Git 저장소에 집중합니다:** 하나의 Git 저장소(단일 프로젝트 또는 모노레포) 안에서 제품 개발과 기록 관리가 완결되는 구조를 전제로 합니다.
|
|
180
|
+
|
|
181
|
+
## 프로젝트 상태
|
|
182
|
+
|
|
183
|
+
Markdown 요구사항·설계와 결정기록을 Git 커밋에 연결하고, 브라우저 뷰어에서 결정기록·요구사항·참여자를 볼 수 있습니다. 에이전트에게 "gitifact 브라우저를 열어주세요"라고 요청하세요.
|
|
184
|
+
|
|
185
|
+
최신 공개 버전은 [npm](https://www.npmjs.com/package/gitifact)에서, 버전별 변경 내역은 [패치노트](https://github.com/dev-goraebap/gitifact/blob/main/apps/cli/src/shared/i18n/ko/changelog.md)에서 확인하세요.
|
|
186
|
+
|
|
187
|
+
제품의 목적·원칙·범위는 이 문서에서, 기능별 요구사항과 설계는 [요구사항](https://github.com/dev-goraebap/gitifact/tree/main/.gitifact/spec)에서 확인할 수 있습니다.
|
|
188
|
+
|
|
189
|
+
## 라이선스
|
|
190
|
+
|
|
191
|
+
[MIT](https://github.com/dev-goraebap/gitifact/blob/main/LICENSE).
|
|
192
|
+
`,Pe="# 시작하기\n\n## 설치와 도입\n\n프로젝트에서 사용하는 에이전트에게 아래 내용을 전달하세요.\n\n```text\n이 프로젝트에서 npx --yes gitifact init을 실행하세요.\n명령이 막히면 저에게 넘기지 말고 명령을 그대로 보여 주며 허용을 물어보세요.\ninit이 AGENTS.md 등에 쓴 GITIFACT 블록을 읽고 이번 세션부터 따르세요.\n```\n\n## 개발 이어가기\n\n도입 후에는 평소처럼 에이전트에게 작업을 요청하세요.\n\n```text\n게시물을 삭제할 수 있게 해주세요.\n```\n\n에이전트가 GITIFACT 블록의 안내에 따라 요구사항과 설계를 정리합니다. 작업을 마친 뒤 “커밋해주세요”라고 요청하면 관련 명세와 변경 이유도 코드와 함께 기록합니다.\n\n기존 프로젝트는 앞으로 작업하는 기능부터 기록할 수 있습니다. 전체 요구사항을 먼저 정리하고 싶다면 이렇게 요청하세요.\n\n```text\n이 프로젝트의 요구사항과 설계를 정리해주세요.\n```\n\n## 문서와 변경 이력 확인하기\n\n보고 싶은 내용을 에이전트에게 말하면 됩니다. 예를 들어 다음과 같이 요청할 수 있습니다.\n\n- “요구사항을 확인하고 싶어요.”\n- “제품 명세를 보고 싶어요.”\n- “최근 변경 이력을 보여주세요.”\n- “gitifact 브라우저를 열어주세요.”\n\n브라우저 뷰어에서 다음 내용을 확인할 수 있습니다.\n\n| 화면 | 확인할 내용 |\n| :--- | :--- |\n| 대시보드 | 프로젝트 규모와 최신 활동 |\n| 기능별 요구사항 | 현재 요구사항과 기능별 설계 |\n| 결정기록 | 커밋된 결정기록과 그 기록이 설명하는 문서의 변경 전후 내용 |\n| 참여자 | Git 작성자별 참여 내역 |\n| Git 상태 | 현재 작업 폴더의 변경 파일 |\n\n요구사항·설계에는 작업 중인 내용이, 결정기록에는 커밋된 이력이 보입니다.\n\n## Gitifact에 의견 보내기\n\nGitifact를 쓰다가 만난 버그나 바라는 개선은 에이전트에게 말하면 됩니다.\n\n```text\nGitifact에 이 버그를 이슈로 남겨주세요.\n```\n\n에이전트가 제목과 본문 초안을 보여 주고, 확인하면 Gitifact 저장소에 이슈를 보냅니다. GitHub CLI(`gh`)에 로그인되어 있으면 내 계정으로 바로 만들고, 아니면 내용을 채운 이슈 작성 페이지 주소를 알려 줍니다. 본문 끝에는 Gitifact·운영체제·Node 버전만 붙고 프로젝트 파일은 보내지 않습니다.\n\n## 언어 설정\n\n브라우저 설정에서 한국어, English, 브라우저 설정 중 하나를 고를 수 있습니다. 선택은 해당 브라우저에 저장되며 프로젝트 문서의 언어는 바꾸지 않습니다.\n\nCLI는 실행 환경의 언어를 따르고, 지원하지 않는 언어이면 영어를 사용합니다. 직접 지정하려면 `gitifact --lang ko <명령>` 또는 `gitifact --lang en <명령>`을 사용하세요. 셸의 `GITIFACT_LANG` 환경변수에 `ko`나 `en`을 지정할 수도 있습니다. GITIFACT 블록의 언어는 `.gitifact/config.json`의 `language`에 기록되며, `--lang`을 지정하지 않는 한 업데이트 후에도 유지됩니다.\n\n## 업데이트\n\n새 버전이 나오거나 팀원이 프로젝트를 새 버전으로 올리면 gitifact 명령의 출력 앞에 안내가 한 줄 나옵니다. 에이전트는 이 안내를 보면 업데이트 명령을 보여 주며 지금 업데이트할지 나중에 할지 묻고, 허용하면 직접 실행합니다. 원할 때 직접 요청해도 됩니다.\n\n```text\nGitifact를 업데이트해주세요.\n```\n\n업데이트는 `npx --yes gitifact@<새 버전> update` 한 번입니다. `update`는 에이전트 지침의 GITIFACT 블록, `.gitifact/config.json`의 프로젝트 기준 버전(`cli`), 실행기 `.gitifact/bin/cli.mjs`를 새 버전으로 바꿉니다. 이 파일들을 커밋하면 팀원의 실행기도 다음 실행에서 새 버전을 받습니다. 나중에 하려면 `gitifact update --later`로 그 버전의 안내를 24시간 쉴 수 있습니다. 브라우저 서버도 새 버전으로 다시 열면 됩니다.\n\n> [!IMPORTANT]\n> 0.8.3부터 `.gitifact/config.json`에 `cli`와 `language`를 적습니다. 0.8.2 이하 CLI는 이 설정을 읽지 못하고 `INVALID_CONFIG`로 멈추므로, 팀원 모두 0.8.3 이상으로 올린 뒤 업데이트하세요.\n\n0.7로 기록한 프로젝트(저장 규약 schemaVersion 2)는 0.8.0에서 문서 구조가 바뀌어 한 번 옮겨야 합니다. 업데이트하면 에이전트가 이를 알리고, 동의하면 `gitifact guide show migrate`의 절차로 기존 ID와 변경 이유를 그대로 둔 채 문서를 옮깁니다.\n\n## 직접 명령 실행하기\n\nNode.js 24.x와 Git이 설치된 환경에서, 대상 Git 저장소 안에서 실행하세요.\n\n```sh\nnpx --yes gitifact init\nnode .gitifact/bin/cli.mjs browser\n```\n\n`browser`가 출력한 로컬 주소를 열면 됩니다. 서버는 터미널에서 Ctrl+C로 종료합니다.\n\n`init`이 만드는 실행기 `.gitifact/bin/cli.mjs`는 처음 실행할 때 `.gitifact/config.json`의 `cli` 버전을 이 컴퓨터의 사용자 캐시에 한 번 받고, 그다음부터 그 버전으로 실행합니다. 전역 설치가 필요 없고, 프로젝트마다 다른 버전을 써도 서로 영향이 없습니다. 실행기를 커밋하면 저장소를 받은 팀원도 그대로 씁니다. 에이전트도 이 실행기로 명령을 실행합니다. 에이전트 도구가 명령을 막으면 그 도구의 승인 방식(승인 창이나 권한 설정)을 안내합니다.\n\nWindows PowerShell에서 `npx.ps1`을 로드할 수 없다는 오류가 나면 스크립트 실행이 막힌 것입니다. `npx.cmd`로 실행하세요.\n\n> [!NOTE]\n> 터미널에서 짧게 `gitifact`로 치고 싶다면 `npm install -g gitifact`로 전역 설치해도 됩니다. 전역 설치본과 프로젝트 기준 버전이 다르면 명령 앞에 안내가 나옵니다.\n\n### 자주 쓰는 명령\n\n아래 표의 `gitifact`는 실행기 `node .gitifact/bin/cli.mjs`(또는 전역 설치본)입니다.\n\n| 명령 | 용도 |\n| :--- | :--- |\n| `gitifact init --dry-run` | 파일을 바꾸기 전에 도입 계획 확인 |\n| `gitifact init` | 프로젝트에 Gitifact 도입, 에이전트 지침 설치·갱신 |\n| `gitifact browser` | 브라우저 뷰어 실행 |\n| `gitifact update --check` | 파일 변경 없이 새 버전 확인 |\n| `gitifact update` | 설치한 버전으로 GITIFACT 블록과 프로젝트 기준 버전 갱신 |\n| `gitifact update --later` | 안내된 새 버전을 24시간 동안 안내하지 않음 |\n| `gitifact guide list` | 에이전트 작업 지침의 주제 목록 |\n| `gitifact guide show spec` | 요구사항 파일 형식과 작성 규칙 |\n| `gitifact guide show design` | 기능 설계 작성 규칙 |\n| `gitifact guide show records` | 결정기록을 쓰는 때와 형식 |\n| `gitifact guide show commit` | 결정기록과 관련 파일을 함께 커밋하는 방법 |\n\n### 문서 조회와 커밋\n\n요구사항·설계는 `.gitifact/` 아래의 Markdown 파일이며 직접 고칩니다. 새 문서는 CLI로 만들어 ID를 받습니다.\n\n| 명령 | 용도 |\n| :--- | :--- |\n| `gitifact specs list` | 기능·요구사항·설계 목록(본문 없이 ID·제목·설명). `--uncovered`·`--changed-since`·`--q` 등으로 거른다 |\n| `gitifact specs show <ID>` | 문서 원문과 그 문서를 가리키는 설계. `--ref <커밋>`으로 과거 원문 |\n| `gitifact records list --doc <ID>` | 문서의 결정기록과 커밋 |\n| `gitifact specs new requirement <기능>/<이름>` | ID를 발급하고 뼈대를 채운 새 문서 생성 |\n| `gitifact check` | 모든 문서의 형식·ID·참조 검사 |\n| `gitifact changes list` | HEAD 이후 바뀐 문서, 커밋하지 않은 결정기록, 기록 없는 변경 |\n| `gitifact changes commit --file <입력 파일> --dry-run` | 파일을 바꾸지 않고 커밋 계획 확인 |\n| `gitifact changes commit --file <입력 파일>` | 고른 문서·결정기록·관련 파일 커밋 |\n\n커밋 입력 형식은 `gitifact guide show commit`에서 확인할 수 있습니다.\n\n### 도입과 실행 옵션\n\n| 옵션 | 용도 |\n| :--- | :--- |\n| `gitifact init --agent codex` | 특정 도구의 지침 파일에 설치. `claude`, `cursor`, `codex`, `hermes`, `all` 지원 |\n| `gitifact init --skip-agents` | 에이전트 지침 파일을 수정하지 않고 도입 |\n| `gitifact init --remove-agents` | 에이전트 지침의 GITIFACT 블록 제거 |\n| `gitifact browser --port 4317` | 브라우저 서버의 포트 지정 |\n\n`--remove-agents`는 에이전트 지침의 GITIFACT 블록만 제거하며, 프로젝트 기록은 유지합니다.\n\n각 명령에 `--help`를 붙이면 사용할 수 있는 옵션을 확인할 수 있습니다.\n",Fe={ko:_e,en:ve},Ie={ko:{about:Ne,gettingStarted:Pe},en:{about:je,gettingStarted:Me}},Le=/\{(\w+)\}/g;function N(e,t={},n=Te()){return Fe[n][e].replace(Le,(e,n)=>n in t?String(t[n]):e)}function Re(e,t,n=Te()){return Fe[n][e].split(Le).map((e,n)=>n%2==0?e:(0,M.createElement)(M.Fragment,{key:n},e in t?t[e]:`{`+e+`}`))}function ze(e,t=Te()){return Ie[t][e]}var P=u();function Be(...e){return t=>{for(let n of e)if(n?.(t),t.defaultPrevented)return}}var Ve=[`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 Ue(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(Ve)&&!n.matches(He))return!0;n=n.parentElement}return!1}function We(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 Ge({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return(0,M.useEffect)(()=>{let t=e.current;t&&t.setAttribute(`data-pressable-container`,`true`)},[e]),{onClick:(0,M.useCallback)(o=>{if(a)return;let s=e.current;if(!s||We(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&Ue(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,M.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||!Ue(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a])}}var Ke=(0,M.lazy)(async()=>me(()=>import(`./Tooltip-MoU3alsv.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2,3])));function qe(e){return e===`display-1`||e===`display-2`||e===`display-3`}var Je={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function Ye({level:e,type:t,weight:n,accessibilityLevel:i,color:a=`primary`,display:o=`block`,maxLines:s=0,hasTruncateTooltip:c=!0,wordBreak:l,textWrap:u,justify:d=`start`,hasCapsize:p=!1,hasStrikethrough:m=!1,xstyle:h,className:g,style:_,children:v,ref:y,...b}){let x=Je[e],T=i&&i!==e?{"aria-level":i}:{},ce=l??(s===1?`break-all`:`break-word`),le=s>0||p?`block`:o,k=t&&qe(t)?t:void 0,A=E({maxLines:s}),fe=typeof c==`string`?c:`above`,j=s>0&&c!==!1&&A.isTruncated,me=(0,M.useRef)(null),he=ee(y,A.ref,me),ge=s>1?{WebkitLineClamp:s}:void 0;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(x,{ref:he,...S(f(`heading`,{level:e,color:a,type:t,weight:n}),r(de[se(a)],k?D[k]:ae[e],k&&ue[k],n&&pe[n],s===1?ne.singleLine:s>1?ne.multiLine:O[le],s>0&&w[ce],u&&te[u],d!==`start`&&re[d],p&&ie.enabled,m&&C.strikethrough,h),g,{..._,...ge}),...T,...b,children:v}),j&&(0,P.jsx)(M.Suspense,{fallback:null,children:(0,P.jsx)(Ke,{anchorRef:me,content:(0,P.jsx)(`span`,{...r(oe.content),children:A.fullText}),placement:fe})})]})}Ye.displayName=`Heading`;var Xe=M.use,Ze=M.useLayoutEffect;function Qe(e,t,n){M.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 $e(e){let t=M.useRef(null);return M.useImperativeHandle(e,()=>t.current,[]),t}function et(e){return e[e.length-1]}function tt(e,t){return typeof e==`function`?e(t):e}var nt=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;function it(e){for(let t in e)if(nt.call(e,t))return!0;return!1}var at=()=>Object.create(null),ot=(e,t)=>st(e,t,at);function st(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=dt(e)&&dt(i);if(!a&&!(lt(e)&<(i)))return i;let o=a?e:ct(e);if(!o)return i;let s=a?i:ct(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:nt.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=st(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ct(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(!rt.call(e,r))return!1;t.push(r)}return t}function lt(e){if(!ut(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ut(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ut(e){return Object.prototype.toString.call(e)===`[object Object]`}function dt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ft(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(!ft(e[r],t[r],n))return!1;return!0}if(lt(e)&<(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!ft(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||!ft(e[o],t[o],n)))return!1;return i===a}return!1}function pt(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 mt=/[\x00-\x1f\x7f"<>`{}]/g;function ht(e){return e.replace(mt,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function gt(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 ht(t)}var _t=[`http:`,`https:`,`mailto:`,`tel:`];function vt(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 yt=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function bt(e,t){if(!e)return!1;if(yt.test(e))return!0;let n=vt(e);return n?!t.has(n):!1}function xt(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+=gt(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=gt(r?e.slice(r):e)}return t}function St(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ct(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 wt(){throw Error(`Invariant failed`)}function Tt(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 Et=4,Dt=5;function Ot(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 kt(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=Ot(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=jt(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=Mt(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=jt(r);e.kind=Dt,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=jt(r);e.kind=Et,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)kt(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 jt(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 Mt(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 Nt(e,t){let n=jt(`/`),r=new Uint16Array(6),i=[];for(let t of e)kt(!1,r,t,1,n,0,i);for(let e of i)e.sort(At);t.masksTree=n,t.flatCache=Tt(1e3)}function Pt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=zt(e,t.masksTree);return t.flatCache.set(e,r),r}function Ft(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=jt(`/`),kt(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),zt(r,o,n)}function It(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=zt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Vt(a.route)),t.matchCache.set(r,a),a}function Lt(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Rt(e,t=!1,n){let r=jt(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;kt(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&wt(),o[e.id]=e,c!==0&&e.path){let t=Lt(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(At);return{processedTree:{segmentTree:r,singleCache:Tt(1e3),matchCache:Tt(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function zt(e,t,n=!1){let r=e.split(`/`),i=Ut(e,r,t,n);if(!i)return null;let[a]=Bt(e,r,i);return{route:i.node.route,rawParams:a}}function Bt(e,t,n){let r=Ht(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===Et)break;if(u.kind===Dt){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 Vt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ht(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ut(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!et(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&&!qt(l,n))continue;if(i.parse){if(!Kt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Et&&qt(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===Et||i.kind===2)&&qt(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&&(Kt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Gt(f,o))return n;qt(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+Wt(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+Wt(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+Wt(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+Wt(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 Wt(e,t){return 2**(e-t-1)}function Gt(e,t){return e===2**(t-1)-1}function Kt(e,t,n){let r,i;try{[r,i]=Bt(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 qt(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===Et)>(e.node.kind===Et)||t.node.kind===Et==(e.node.kind===Et)&&t.node.depth>e.node.depth)))}function Jt(e){return Yt(e.filter(e=>e!==void 0).join(`/`))}function Yt(e){return e.replace(/\/{2,}/g,`/`)}function Xt(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Zt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Qt(e){return Zt(Xt(e))}function $t(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function en({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=Yt(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=Yt(e)),o=e.split(`/`);o.length>1&&et(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&&(et(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Yt(s):s)||`/`;return a&&r&&r.set(a,c),c}function tn(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 nn(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>an(e,n)).join(`/`):an(r,n):r}function rn({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=Ot(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=nn(`_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=nn(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=nn(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function an(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var on=`Error preloading route! ☝️`;function sn({children:e,fallback:t=null}){return(0,P.jsx)(M.Fragment,{children:cn()?e:t})}function cn(){return M.useSyncExternalStore(ln,()=>!0,()=>!1)}function ln(){return()=>{}}var un=M.createContext(null);function dn(e){return M.useContext(un)}var fn=t((e=>{var t=p();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 c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),pn=t(((e,t)=>{t.exports=fn()})),mn=t((e=>{var t=p(),n=pn();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,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),hn=t(((e,t)=>{t.exports=mn()}))();function gn(e,t){return e===t}function _n(e,t=e=>e,n){let r=n?.compare??gn,i=(0,M.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,M.useCallback)(()=>e.get(),[e]);return(0,hn.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function vn(e){let t=dn();return M.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function yn(e){let t=M.useRef(e);return ft(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function bn(e,t){return e[0]===t[0]&&e[1]===t[1]}function xn(e,t){let n=typeof e==`string`&&vt(e);if(n)return t.has(n)?e:null}function Sn(e,t,n,r,i){let a=$t(e.pathname,r),o=$t(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!ft(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function Cn(e,t){let n=dn(),r=$e(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:ee,params:D,search:te,hash:ne,state:O,mask:re,reloadDocument:ie,unsafeRelative:ae,from:oe,_fromLocation:se,...ce}=e,le=s,k=cn(),A=yn(e.search),ue=yn(e.params),de=yn(o),fe=M.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,A,ue,e.state,e.mask,e.unsafeRelative]),j=M.useCallback(e=>{let t=xn(le,n.protocolAllowlist);if(t!==void 0)return[t??void 0];let r=n.buildLocation({_fromLocation:e,...fe}),i=jn(r,n,v);return[i,!v&&(!i||vt(i))?void 0:Sn(e,r,de,n.basepath,k)]},[de,v,k,fe,n,le]),[pe,me]=_n(n.stores.location,j,{compare:bn}),he=me===void 0?pe:void 0,ge=v||pe===void 0,_e=M.useRef(!1),ve=e.reloadDocument||he||ge?!1:c??n.options.defaultPreload,ye=l??n.options.defaultPreloadDelay??0,be=M.useCallback(()=>{n.preloadRoute(fe).catch(e=>{console.warn(e),console.warn(on)})},[n,fe]),xe=M.useCallback(e=>{if(!e){kn(r);return}if(!(e.isIntersecting??ve===`intent`)){e.isIntersecting===!1&&kn(r);return}if(!ye){be();return}On.has(r)||On.set(r,setTimeout(()=>{On.delete(r),be()},ye))},[be,r,ve,ye]);if(Qe(r,xe,ve!==`viewport`),M.useEffect(()=>{_e.current||ve===`render`&&(be(),_e.current=!0)},[be,ve]),he)return{...ce,ref:r,href:he,...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 Se=tt(me?i:a,{})??(me?Tn:wn),Ce=Se.className,we=b?Ce?`${b} ${Ce}`:b:Ce,Te=Se.style,Ee=y&&Te?{...y,...Te}:y||Te,De=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!ge&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...fe,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:ee}))},Oe=()=>{ve===`intent`&&be()},ke=()=>{ve===`intent`&&kn(r)};return{...ce,...Se,href:pe,ref:r,onClick:An(x,De),onBlur:An(S,ke),onFocus:An(C,xe),onMouseEnter:An(w,xe),onMouseLeave:An(T,ke),onTouchStart:An(E,Oe),disabled:!!ge,target:_,...Ee&&{style:Ee},...we&&{className:we},...ge&&En,...me&&Dn}}var wn={},Tn={className:`active`},En={role:`link`,"aria-disabled":!0},Dn={"data-status":`active`,"aria-current":`page`},On=new WeakMap,kn=e=>{clearTimeout(On.get(e)),On.delete(e)},An=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function jn(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||!bt(i,t.protocolAllowlist))return i}var Mn=M.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Cn(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 M.createElement(n||`a`,a,o)});function Nn(e){return!e||typeof window>`u`?!1:window.getComputedStyle(e).direction===`rtl`}var Pn=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function Fn(e){if(e.isContentEditable)return e;let t=e.closest(`[contenteditable]`);return t&&t.getAttribute(`contenteditable`)!==`false`?t:null}function In(e,t){if(!(e instanceof HTMLElement))return!1;let n=Fn(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`&&Pn.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 Ln(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,M.useRef)(null),u=(0,M.useCallback)(e=>e.getAttribute(`aria-disabled`)===`true`||e.disabled===!0||e.hasAttribute(`disabled`),[]),d=(0,M.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,M.useCallback)(e=>{let t=l.current;if(!t||!n)return!0;let r=e.target;return!r||r.closest(n)===t},[n]),p=(0,M.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]),m=(0,M.useCallback)(()=>{let e=d(),t=document.activeElement;return e.findIndex(e=>e===t||e.contains(t))},[d]),h=(0,M.useCallback)((e,t)=>{e.getAttribute(`tabindex`)!==String(t)&&e.setAttribute(`tabindex`,String(t))},[]),g=(0,M.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)h(t,t===n?0:-1)},[d,u,h]);x(()=>{s&&g()});let _=(0,M.useCallback)((e,t)=>{let n=e[t];if(n){if(s)for(let t of e)h(t,t===n?0:-1);n.focus()}},[s,h]),v=(0,M.useCallback)(e=>{let t=d();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1));_(t,n)},[d,_]),y=(0,M.useCallback)(()=>{let e=d(),t=p(e,0,1,!1);return t!==-1&&(_(e,t),!0)},[d,p,_]),b=(0,M.useCallback)(()=>{let e=d(),t=p(e,e.length-1,-1,!1);return t!==-1&&(_(e,t),!0)},[d,p,_]),S=(0,M.useCallback)(()=>{s&&g()},[s,g]);return{listRef:l,handleKeyDown:(0,M.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`?Nn(l.current):!1;s.push(t?`ArrowLeft`:`ArrowRight`),u.push(t?`ArrowRight`:`ArrowLeft`)}n&&(s.push(`ArrowDown`),u.push(`ArrowUp`));let h=s.includes(e.key),g=u.includes(e.key),v=o&&e.key===`Home`,x=o&&e.key===`End`;if(!h&&!g&&!v&&!x||c&&(In(e.target,e.key)||In(document.activeElement,e.key)))return;let S=m(),C=d();if(h){let e=S===-1?0:S+1,t=p(C,e,1,r);t!==-1&&_(C,t)}else if(g){let e=S===-1?C.length-1:S-1,t=p(C,e,-1,r);t!==-1&&_(C,t)}else v?y():x&&b();e.preventDefault()},[m,d,r,a,o,c,p,_,y,b,i,f]),handleFocus:S,focusItem:v,focusFirst:y,focusLast:b,ownsEvent:f,getItems:d}}function Rn(){if(typeof navigator>`u`)return!1;let e=`userAgentData`in navigator?navigator.userAgentData:null;if(e&&typeof e==`object`&&`platform`in e){let t=e.platform,n=typeof t==`string`?t.trim():``;if(n!==``&&n.toLowerCase()!==`unknown`)return/mac/i.test(n)}return/Mac|iPhone|iPad|iPod/.test(navigator.platform??``)}var zn={esc:`escape`,space:` `,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`,return:`enter`,plus:`+`};function Bn(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`}function Vn(e,t,n){let r=e.toLowerCase().split(`+`).map(e=>e.trim()).filter(Boolean);if(r.length===0)return!1;let i=r[r.length-1],a=new Set(r.slice(0,-1)),o=a.has(`mod`),s=a.has(`ctrl`)||o&&!n,c=a.has(`meta`)||o&&n,l=a.has(`alt`),u=a.has(`shift`);if(t.ctrlKey!==s||t.metaKey!==c||t.altKey!==l||u&&!t.shiftKey)return!1;let d=zn[i]??i;return t.key.toLowerCase()===d}function Hn(e){let t=(0,M.useRef)(e);(0,M.useEffect)(()=>{t.current=e}),(0,M.useEffect)(()=>{let e=Rn(),n=n=>{if(n.defaultPrevented)return;let r=Bn(n.target);for(let i of t.current)if(!i.isDisabled&&(!r||i.allowInInputs)&&Vn(i.keys,n,e)){n.preventDefault(),i.onPress(n);return}};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[])}var Un={wrapper:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kOIVth:`xzye2dw`,kmuXW:`x2lah0s`,$$css:!0}},Wn={ctrl:`⌃`,alt:`⌥`,shift:`⇧`,enter:`↵`,backspace:`⌫`,escape:`Esc`,tab:`⇥`,up:`↑`,down:`↓`,left:`←`,right:`→`,plus:`+`};function Gn(e,t){return e===`mod`?t?`⌘`:`Ctrl`:Wn[e]??e.toUpperCase()}var Kn={ctrl:`Control`,alt:`Alt`,shift:`Shift`,enter:`Enter`,backspace:`Backspace`,escape:`Escape`,tab:`Tab`,up:`Up arrow`,down:`Down arrow`,left:`Left arrow`,right:`Right arrow`,plus:`Plus`};function qn(e,t){return e===`mod`?t?`Command`:`Control`:Kn[e]??e.toUpperCase()}function Jn(){return()=>{}}function Yn(){return!1}function Xn({keys:e,ref:t,xstyle:n,className:i,style:a,...o}){let s=(0,M.useSyncExternalStore)(Jn,Rn,Yn),c=e.split(`+`).map(e=>e.trim().toLowerCase()),l=c.map(e=>qn(e,s)).join(` + `);return(0,P.jsx)(`span`,{...o,ref:t,role:`img`,"aria-label":l,...S(f(`kbd`),r(Un.wrapper,n),i,a),children:c.map(e=>(0,P.jsx)(`kbd`,{"aria-hidden":`true`,className:`x3nfvp2 x6s0dn4 xl56j7k x16asifk x1grt7ep x7a5moj xx3sua9 x17x4s8c xlxy82 x1q0q8m5 xib2hle xv1l7n4 x9ynric x141an7d x1e4wzip x1ltkj2j x87ps6o`,children:Gn(e,s)},e))})}Xn.displayName=`Kbd`;var Zn={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 Qn({title:e,description:t,icon:n,actions:i,headingLevel:a=3,isCompact:o=!1,xstyle:s,className:c,style:l,ref:u,...d}){let p=`h${a}`;return(0,P.jsxs)(`div`,{ref:u,...d,role:`status`,...S(f(`empty-state`,{variant:o?`compact`:null}),r(Zn.container,o&&Zn.containerCompact,s),c,l),children:[n!=null&&(0,P.jsx)(`div`,{"aria-hidden":`true`,children:n}),(0,P.jsxs)(`div`,{className:`x78zum5 xdt5ytf x6s0dn4 xxc7z9f`,children:[(0,M.createElement)(p,S(f(`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),t!=null&&(0,P.jsx)(`div`,{...S(f(`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:t})]}),i!=null&&(0,P.jsx)(`div`,{...{0:{className:`x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d`},1:{className:`x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf`}}[!!o<<0],children:i})]})}Qn.displayName=`EmptyState`;var $n={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},er={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}},tr={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},nr={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},rr={stack:{k1xSpc:`x78zum5`,$$css:!0}},ir={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 ar({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[rr.stack,tr[t],n!=null&&ir[n],e!=null&&$n[e],r!=null&&er[r],i!=null&&nr[i]]}var or={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function sr({direction:e=`vertical`,hAlign:t,vAlign:n,justify:a,align:o,gap:s,padding:c,paddingInline:l,paddingInlineStart:u,paddingInlineEnd:d,paddingBlock:p,paddingBlockStart:m,paddingBlockEnd:g,isScrollable:y,width:b,height:x,maxWidth:C,minHeight:w,wrap:T,as:E=`div`,xstyle:ee,className:D,style:te,children:ne,ref:O,...re}){let ie=t??(e===`horizontal`?a:o),ae=n??(e===`horizontal`?o:a),oe=e===`horizontal`?ie:ae,se=e===`horizontal`?ae:ie,ce=u??l??c,le=d??l??c,k=m??p??c,A=g??p??c,ue=r(...ar({direction:e,crossAlign:se,mainAlign:oe,gap:s,wrap:T}),ce!=null&&i[ce],le!=null&&_[le],k!=null&&v[k],A!=null&&h[A],y&&or.scrollable,ee),de={...b!=null&&{width:typeof b==`number`?`${b}px`:b},...x!=null&&{height:typeof x==`number`?`${x}px`:x},...C!=null&&{maxWidth:typeof C==`number`?`${C}px`:C},...w!=null&&{minHeight:typeof w==`number`?`${w}px`:w}};return(0,M.createElement)(E,{ref:O,...S(f(`stack`,{direction:e,gap:s,wrap:T}),ue,D,{...te,...de}),...re},ne)}sr.displayName=`Stack`;function cr({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,P.jsx)(sr,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}cr.displayName=`VStack`;function lr({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,P.jsx)(sr,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}lr.displayName=`HStack`;function ur({data:e,size:t}){return(0,P.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,M.createElement)(e,{...t,key:n}))})}var dr=M.createContext(void 0),fr=e=>{let t=M.useContext(dr);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},pr=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,P.jsx)(dr.Provider,{value:e,children:t})),mr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},hr=new class{#e=mr;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 gr(e){setTimeout(e,0)}var _r=typeof window>`u`||`Deno`in globalThis;function vr(){}function yr(e,t){return typeof e==`function`?e(t):e}function br(e){return typeof e==`number`&&e>=0&&e!==1/0}function xr(e,t){return Math.max(e+(t||0)-Date.now(),0)}function F(e,t){return typeof e==`function`?e(t):e}function Sr(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==wr(o,t.options))return!1}else if(!Er(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 Cr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Tr(t.options.mutationKey)!==Tr(a))return!1}else if(!Er(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wr(e,t){return(t?.queryKeyHashFn||Tr)(e)}function Tr(e){return JSON.stringify(e,(e,t)=>jr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Er(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(!Er(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Er(e[r],t[r]))return!1;return!0}return!1}var Dr=Object.prototype.hasOwnProperty;function Or(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Ar(e)&&Ar(t);if(!r&&!(jr(e)&&jr(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:Dr.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Or(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function kr(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 Ar(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function jr(e){if(!Mr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!Mr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function Mr(e){return Object.prototype.toString.call(e)===`[object Object]`}function Nr(e){return new Promise(t=>{hr.setTimeout(t,e)})}function Pr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Or(e,t)}function Fr(e){return e}function Ir(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Lr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Rr=Symbol();function zr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Rr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Br(e,t){return typeof e==`function`?e(...t):!!e}function Vr(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 Hr=()=>_r,Ur=()=>Hr(),Wr=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(){}},Gr=new class extends Wr{#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`}},Kr=gr;function qr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Kr,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 Jr=qr(),Yr=new class extends Wr{#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 Xr(e){return Math.min(1e3*2**e,3e4)}function Zr(e){return(e??`online`)!==`online`||Yr.isOnline()}var Qr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function $r(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(vr);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new Qr(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Gr.isFocused()&&(e.networkMode===`always`||Yr.isOnline())&&e.canRun(),p=()=>Zr(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??(Ur()?0:3),a=e.retryDelay??Xr,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),Nr(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 ei=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),br(this.gcTime)&&(this.#e=hr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ur()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(hr.clearTimeout(this.#e),this.#e=void 0)}};function ti(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=>{Vr(e,()=>t.signal,()=>n=!0)},u=zr(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?Lr:Ir;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ri:ni,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:ni(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 ni(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 ri(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ii(e,t){return t?ni(e,t)!=null:!1}function ai(e,t){return!t||!e.getPreviousPageParam?!1:ri(e,t)!=null}var oi=class extends ei{#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=li(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=li(this.options);e.data!==void 0&&(this.setState(ci(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Pr(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(vr).catch(vr):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=>F(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Rr||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>F(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:!xr(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=zr(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`?ti(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=$r({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Qr&&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 Qr){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,...si(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...ci(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),Jr.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function si(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Zr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function ci(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function li(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 ui=class extends Wr{#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),fi(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pi(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pi(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 F(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&&!kr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&mi(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||F(this.options.enabled,this.#t)!==F(t.enabled,this.#t)||F(this.options.staleTime,this.#t)!==F(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||F(this.options.enabled,this.#t)!==F(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 kr(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(vr)),t}#h(e){return!Ur()&&F(this.options.enabled,this.#t)!==!1&&br(e)}#g(){this.#b();let e=F(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=xr(this.#r.dataUpdatedAt,e)+1;this.#u=hr.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=hr.setInterval(()=>{(this.options.refetchIntervalInBackground||Gr.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(hr.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(hr.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&&fi(e,t),o=i&&mi(e,n,t,r);(a||o)&&(l={...l,...si(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=Pr(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=Pr(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:hi(e,t),refetch:this.refetch,isEnabled:F(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),kr(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)})})();Jr.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 di(e,t){return F(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||F(t.retryOnMount,e)!==!1)}function fi(e,t){return di(e,t)||e.state.data!==void 0&&pi(e,t,t.refetchOnMount)}function pi(e,t,n){if(F(t.enabled,e)!==!1&&F(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&hi(e,t)}return!1}function mi(e,t,n,r){return(e!==t||F(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&hi(e,n)}function hi(e,t){return F(t.enabled,e)!==!1&&e.isStaleByTime(F(t.staleTime,e))}var gi=M.createContext(!1),_i=()=>M.useContext(gi);gi.Provider;function vi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yi=M.createContext(vi()),bi=()=>M.useContext(yi),xi=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Br(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Si=e=>{M.useEffect(()=>{e.clearReset()},[e])},Ci=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Br(n,[e.error,r])),wi=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))}},Ti=(e,t)=>e?.suspense&&t.isPending,Ei=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Di(e,t,n){let r=_i(),i=bi(),a=fr(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,wi(o),xi(o,i,s),Si(i);let[l]=M.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(M.useSyncExternalStore(M.useCallback(e=>{let t=d?l.subscribe(Jr.batchCalls(e)):vr;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),M.useEffect(()=>{l.setOptions(o)},[o,l]),Ti(o,u))throw Ei(o,l,i);if(Ci({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Oi(e,t){return Di(e,ui,t)}function ki(e){return e}function Ai(e){return e}var ji=(0,M.createContext)(null);ji.displayName=`LayoutAreaContext`;var Mi=(0,M.createContext)({hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1});Mi.displayName=`LayoutSlotsContext`;var Ni=(0,M.createContext)(null);Ni.displayName=`LayoutDividerContext`;var Pi={reset:{kAzted:`x2lwn1j`,k7Eaqz:`xeuugli`,$$css:!0}},Fi={center:{kSGwAc:`xamitd3`,$$css:!0},end:{kSGwAc:`xpvyfi4`,$$css:!0},start:{kSGwAc:`xqcrz7y`,$$css:!0},stretch:{kSGwAc:`xkh2ocl`,$$css:!0}},Ii={fill:{kzQI83:`x1iyjqo2`,$$css:!0},static:{kzQI83:`x1c4vz4f`,kmuXW:`x2lah0s`,$$css:!0}};function Li({crossAlignSelf:e,size:t}={}){return[Pi.reset,Ii[t??`static`],e!=null&&Fi[e]]}function Ri(e){if(e==null||typeof e==`number`)return!0;let t=e.trim().toLowerCase();return t.includes(`%`)?!1:t===`0`||/^-?(?:\d+(?:\.\d+)?|\.\d+)[a-z]+$/.test(t)||/^(?:calc|min|max|clamp)\(/.test(t)}var zi={layoutOuter:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,$$css:!0},layoutInner:{"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,"--layout-content-width":`x15lplax`,"--layout-alignment-width":`x19kr0ht`,$$css:!0},fill:{kZKoxP:`x12qplqi`,kskxy:`xenllk4`,$$css:!0},auto:{kAzted:`x1us19tq`,$$css:!0},middle:{kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,$$css:!0},middleQuery:{k9g6sI:`xsw3flo`,$$css:!0},singleColumnContent:{kzqmXN:`xh8yej3`,ks0D6T:`xjl2t3p xpgkkid`,kUOVxO:`xvueqy4`,$$css:!0},singlePanelMiddle:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,ks0D6T:`xjl2t3p xnpzo02`,kUOVxO:`xvueqy4 xb0m1lw`,$$css:!0},singleStartPanel:{kZCmMZ:`x1vvd0s7`,$$css:!0},singleEndPanel:{kwRFfy:`xxdn8bs`,$$css:!0},fullBleed:{"--layout-padding-outer-x":`x1wbjvqu`,"--layout-padding-outer-y":`xzxxx64`,$$css:!0}},Bi={kzqmXN:`xh8yej3`,kUOVxO:`xvueqy4`,$$css:!0},Vi={contentWidthVar:e=>[{"--layout-content-width":(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x4906uf`,$$css:!0},{"--x---layout-content-width":(typeof e==`number`?`${e}px`:e)==null?void 0:typeof e==`number`?`${e}px`:e}],contentAlignmentWidthVar:e=>[{"--layout-alignment-width":(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x1b1nz06`,$$css:!0},{"--x---layout-alignment-width":(typeof e==`number`?`${e}px`:e)==null?void 0:typeof e==`number`?`${e}px`:e}],contentWidth:e=>[Bi,{ks0D6T:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xf68679`,$$css:!0},{"--x-maxWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]};function Hi({area:e,children:t}){return t==null?null:(0,P.jsx)(ji,{value:e,children:t})}var Ui={"x-default-marker":`x-default-marker`,$$css:!0};function Wi({children:e,content:t,contentWidth:n,defaultHasDividers:i,end:a,footer:o,header:s,height:u=`fill`,padding:d,ref:p,start:m,xstyle:h,className:g,style:_}){let v=u===`fill`,y=t??e,b=(0,M.useMemo)(()=>i==null?null:{defaultHasDividers:i},[i]),x=s!=null,C=o!=null,w=m!=null,T=a!=null,E=w&&T,ee=w!==T,D=n!=null&&Ri(n),te=(0,M.useMemo)(()=>({hasHeader:x,hasFooter:C,hasStart:w,hasEnd:T}),[x,C,w,T]),ne=(0,P.jsx)(Mi,{value:te,children:(0,P.jsx)(`div`,{ref:p,...S(f(`layout`,{height:u}),r(zi.layoutOuter,v?zi.fill:zi.auto,h),g,_),children:(0,P.jsxs)(`div`,{...r(Ui,zi.layoutInner,...ar({direction:`vertical`}),v?zi.fill:zi.auto,d===0&&zi.fullBleed,d!=null&&l[d],d!=null&&c[d],n!=null&&Vi.contentWidthVar(n),D&&Vi.contentAlignmentWidthVar(n)),children:[(0,P.jsx)(Hi,{area:`header`,children:s}),(0,P.jsxs)(`div`,{...r(...ar({direction:`horizontal`}),zi.middle,n!=null&&(!D||E)&&Vi.contentWidth(n),D&&!E&&zi.middleQuery,D&&ee&&zi.singlePanelMiddle,D&&w&&!T&&zi.singleStartPanel,D&&!w&&T&&zi.singleEndPanel),children:[(0,P.jsx)(Hi,{area:`start`,children:m}),(0,P.jsx)(`div`,{...r(...Li({size:`fill`}),D&&!w&&!T&&zi.singleColumnContent),children:(0,P.jsx)(Hi,{area:`content`,children:y})}),(0,P.jsx)(Hi,{area:`end`,children:a})]}),(0,P.jsx)(Hi,{area:`footer`,children:o})]})})});return b==null?ne:(0,P.jsx)(Ni,{value:b,children:ne})}Wi.displayName=`Layout`;var Gi={header:{kmuXW:`x2lah0s`,$$css:!0},inner:{kB7OPa:`x9f619`,ks0D6T:`xjl2t3p`,kUOVxO:`xvueqy4`,kZCmMZ:`x139j0dd`,kwRFfy:`xpc6k2p`,kLKAdn:`x81pis9`,kGO01o:`xg476vw`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,"--container-padding-block-start":`xzz8v79`,"--container-padding-block-end":`xi9ns85`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},divider:{kt9PQ7:`xso031l`,kfdmCh:`x1q0q8m5`,kL6WhQ:`xw8gpjh`,$$css:!0}},Ki={sizing:e=>[{kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function qi({children:e,hasDivider:t,height:n,label:i,padding:a,paddingBlockEnd:o,role:c,xstyle:l,className:u,style:p,ref:_,...v}){let y=(0,M.use)(Ni),b=t??y?.defaultHasDividers??!1,x=a===0;return(0,P.jsx)(`div`,{ref:_,role:c,"aria-label":i,"data-divider":b||void 0,...S(f(`layout-header`),r(Gi.header,Ki.sizing(n??null),b&&Gi.divider,l),u,p),...v,children:(0,P.jsx)(`div`,{...r(Gi.inner,x&&Gi.fullBleed,a!=null&&g[a],a!=null&&d[a],a!=null&&s[a],a!=null&&m[a],o!=null&&h[o],o!=null&&m[o]),children:e})})}qi.displayName=`LayoutHeader`;var Ji={content:{kB7OPa:`x9f619`,kZKoxP:`x5yr21d`,kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,kVQacm:`x7giv3`,kZCmMZ:`xwjyata`,kwRFfy:`x1peupej`,kLKAdn:`xqty4a x1ioh5az`,kGO01o:`xg476vw xsg11nj`,"--container-padding-inline-start":`x408pgh`,"--container-padding-inline-end":`xikqloz`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`xi9ns85`,$$css:!0},noStart:{kZCmMZ:`x139j0dd`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,$$css:!0},noEnd:{kwRFfy:`xpc6k2p`,$$css:!0},noHeader:{kLKAdn:`x81pis9`,"--container-padding-block-start":`xzz8v79`,$$css:!0},noFooter:{kGO01o:`xon7vh3`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},scrollable:{kVQacm:`xysyzu8`,$$css:!0},constrainedNoPanelsStart:{kZCmMZ:`xhlv5e7`,$$css:!0},constrainedNoPanelsEnd:{kwRFfy:`x1ahicqp`,$$css:!0},constrainedSingleStartPanel:{kwRFfy:`xy07wb4`,$$css:!0},constrainedSingleEndPanel:{kZCmMZ:`xxjme2g`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0}};function Yi({children:e,isScrollable:t=!0,padding:n,label:i,role:a,xstyle:o,className:c,style:l,ref:u,...p}){let{hasHeader:h,hasFooter:_,hasStart:v,hasEnd:y}=(0,M.use)(Mi),b=n===0;return(0,P.jsx)(`div`,{ref:u,role:a,"aria-label":i,...S(f(`layout-content`),r(Ji.content,!v&&!b&&n==null&&Ji.noStart,!y&&!b&&n==null&&Ji.noEnd,!h&&!b&&n==null&&Ji.noHeader,!_&&!b&&n==null&&Ji.noFooter,t&&Ji.scrollable,b&&Ji.fullBleed,n!=null&&g[n],n!=null&&d[n],n!=null&&s[n],n!=null&&m[n],!v&&!y&&!b&&Ji.constrainedNoPanelsStart,!v&&!y&&!b&&Ji.constrainedNoPanelsEnd,v&&!y&&!b&&Ji.constrainedSingleStartPanel,!v&&y&&!b&&Ji.constrainedSingleEndPanel,o),c,l),...p,children:e})}Yi.displayName=`LayoutContent`;function Xi(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 Zi(e,t=`|`){return e.map(e=>Sa(e)).join(t)}function Qi(e,t){return typeof t==`bigint`?t.toString():t}var $i=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 ea(e){return new $i(e)}function ta(e){return e==null}function na(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ra(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 ia(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function aa(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function oa(e){return aa(e._zod.def)??e._zod.def.shape}function sa(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return ia(this,t,e),e},enumerable:!0,configurable:!0})}function ca(e,t,n){t in e?ia(e,t,n):e[t]=n}function la(e,t,n,r){let i=oa(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?sa(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ca(e,a,r?r(n.value,a):n.value))}}function ua(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?sa(e,n,()=>t[n]):ca(e,n,r.value))}}function da(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function fa(e){return JSON.stringify(e)}function pa(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ma=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function ha(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ga=ea(()=>{if(uo.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function _a(e){if(ha(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return ha(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function va(e){return _a(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var ya=new Set([`string`,`number`,`symbol`]);function ba(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function xa(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function I(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 Sa(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ca(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var wa={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ta={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ea(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 la(i,e,Da(e,t)),xa(e,da(n,{shape:i,checks:[]}))}function Da(e,t){let n=oa(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 Oa(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(Da(e,t)),a={};return la(a,e,Reflect.ownKeys(oa(e)).filter(e=>!i.has(e))),xa(e,da(n,{shape:a,checks:[]}))}function ka(e,t){if(!_a(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=oa(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 xa(e,da(e._zod.def,{shape:Aa(e,t)}))}function Aa(e,t){let n={};return la(n,e,Reflect.ownKeys(oa(e))),ua(n,t),n}function ja(e,t){if(!_a(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return xa(e,da(e._zod.def,{shape:Aa(e,t)}))}function Ma(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 la(n,e,Reflect.ownKeys(oa(e))),la(n,t,Reflect.ownKeys(oa(t))),xa(e,da(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Na(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(Da(t,n)):void 0,o={};return la(o,t,Reflect.ownKeys(oa(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),xa(t,da(t._zod.def,{shape:o,checks:[]}))}function Pa(e,t,n){let r=n?new Set(Da(t,n)):void 0,i={};return la(i,t,Reflect.ownKeys(oa(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),xa(t,da(t._zod.def,{shape:i}))}function Fa(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 Ia(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 La(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ra(e){return typeof e==`string`?e:e?.message}function za(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ba(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:Ra(e.inst?._zod.def?.error?.(e))??Ra(a?.(e))??Ra(t?.error?.(e))??Ra(n.customError?.(e))??Ra(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 Va=/[\uD800-\uDBFF]/;function Ha(e){let t=e.length;if(!Va.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 Ua(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Wa(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 Ga(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ka(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Xa(e,n,r.value)}}function qa(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ja(e,t,n){return qa(e,t,n,!1)}function Ya(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return qa(this,n,r(this))},set(e){qa(this,n,e)}})}return t}function Xa(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:qa(this,t,n.bind(this))},set(e){qa(this,t,e)}})}function Za(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Qa,$a=!1,eo={configurable:!0,get(){$a=!0}};function L(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Qa!==e._zod){Qa=void 0;return}Qa=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,eo);let e=$a;$a=!1;try{let r=n(this);return $a?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),$a||=e,r}catch(n){throw delete this[t],$a||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function to(e,t,n,r){let i=Za(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 no=`~constantCatch`;function ro(e){let t=()=>e;return t[no]=!0,t}var io,ao={value:void 0,enumerable:!1},oo=`captureStackTrace`in Error?Error:null;function so(e){let t=oo;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return oo=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function R(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){ao.value=new a(r);try{Object.defineProperty(n,"_zod",ao)}finally{ao.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),Ka(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?so(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 co=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},lo=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(io=globalThis).__zod_globalConfig??(io.__zod_globalConfig={});var uo=globalThis.__zod_globalConfig;function fo(e){return e&&Object.assign(uo,e),uo}function po(){let e=this._zod;return e.message??=JSON.stringify(e.def,Qi,2),e.message}function mo(e){this._zod.message=e}var ho={get:po,set:mo,enumerable:!0,configurable:!0},go={value:void 0,enumerable:!1},_o=new WeakSet([Object.prototype,Error.prototype]),vo=(e,t)=>{e.name=`$ZodError`,go.value=t,Object.defineProperty(e,"issues",go),go.value=void 0,Object.defineProperty(e,"message",ho);let n=Object.getPrototypeOf(e);_o.has(n)||(_o.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})}}))},yo=R(`$ZodError`,vo);R(`$ZodError`,vo,void 0,{Parent:Error});function bo(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 xo(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?bo(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function So(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 Co(e,t){return{callee:t?.callee??e,Err:t?.Err}}var wo=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 co;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ba(e,o,fo())));throw ma(n,a?.callee??t),n}return s.value};return t},To=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=>Ba(e,o,fo())));throw ma(n,a?.callee??t),n}return s.value};return t},Eo=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 co;return a.issues.length?Do(e,a.issues,i):{success:!0,data:a.value}};function Do(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ba(e,n,fo()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Oo=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?Do(e,a.issues,i):{success:!0,data:a.value}},ko=Symbol.for(`zod.compile.invalid`),Ao=Symbol.for(`zod.compile.fallback`),jo=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==ko)return!0;if(r.definite===!0&&n===void 0)return!1}return Mo(e,t,n)});function Mo(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Ao]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new co;return a.issues.length===0}var No=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},Po=e=>{let t=wo(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Co(n,a))};return n},Fo=e=>{let t=wo(e),n=(e,r,i,a)=>t(e,r,i,Co(n,a));return n},Io=e=>{let t=To(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Co(n,a))};return n},Lo=e=>{let t=To(e),n=async(e,r,i,a)=>await t(e,r,i,Co(n,a));return n},Ro=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Eo(e)(t,n,i)},zo=e=>(t,n,r)=>Eo(e)(t,n,r),Bo=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Oo(e)(t,n,i)},Vo=e=>async(t,n,r)=>Oo(e)(t,n,r),Ho=/^[cC][0-9a-z]{6,}$/,Uo=/^[0-9a-z]+$/,Wo=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Go=/^[0-9a-vA-V]{20}$/,Ko=/^[A-Za-z0-9]{27}$/,qo=/^[a-zA-Z0-9_-]{21}$/;function Jo(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Yo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Xo=/^([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})$/,Zo=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)$/,Qo=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$o=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function es(){return new RegExp($o,`u`)}var ts=/^(?:(?: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])$/,ns=/^(([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}|:))$/,rs=/^((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])$/,is=/^(([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])$/,as=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,os=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ss=/^https?$/,cs=/^\+[1-9]\d{6,14}$/,ls=`(?:(?:\\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 us(e){return RegExp(`^${e}$`)}var ds=us(ls);function fs(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 ps(e){return RegExp(`^${fs(e)}$`)}function ms(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${fs({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${fs({precision:e.precision})}`:n;return RegExp(`^${ls}T(?:${r})$`)}var hs=/^[\s\S]{0,}$/,gs=/^-?\d+(?:\.\d+)?$/,_s=/^(?:true|false)$/i,vs=/^null$/i,ys=/^[^A-Z]*$/,bs=/^[^a-z]*$/,xs=R(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Ss=e=>{let t=e.value;return!ta(t)&&t.length!==void 0},Cs={number:`number`,bigint:`bigint`,object:`date`},ws=R(`$ZodCheckLessThan`,(e,t)=>{xs.init(e,t);let n=Cs[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Cs[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})}}),Ts=R(`$ZodCheckGreaterThan`,(e,t)=>{xs.init(e,t);let n=Cs[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Cs[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})}}),Es=R(`$ZodCheckMultipleOf`,(e,t)=>{xs.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):ra(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})}}),Ds=R(`$ZodCheckNumberFormat`,(e,t)=>{xs.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=wa[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})}}),Os=R(`$ZodCheckMaxLength`,(e,t)=>{var n;xs.init(e,t),(n=e._zod.def).when??(n.when=Ss),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ha(r):i)<=t.maximum)return;let a=Ua(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ks=R(`$ZodCheckMinLength`,(e,t)=>{var n;xs.init(e,t),(n=e._zod.def).when??(n.when=Ss),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Ha(r):i)>=t.minimum)return;let a=Ua(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),As=R(`$ZodCheckLengthEquals`,(e,t)=>{var n;xs.init(e,t),(n=e._zod.def).when??(n.when=Ss),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ha(r):i;if(a===t.length)return;let o=Ua(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})}}),js=R(`$ZodCheckStringFormat`,(e,t)=>{var n,r;xs.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=()=>{})}),Ms=R(`$ZodCheckRegex`,(e,t)=>{js.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})}}),Ns=R(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ys,js.init(e,t)}),Ps=R(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=bs,js.init(e,t)}),Fs=R(`$ZodCheckIncludes`,(e,t)=>{xs.init(e,t);let n=ba(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})}}),Is=R(`$ZodCheckStartsWith`,(e,t)=>{xs.init(e,t);let n=RegExp(`^${ba(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})}}),Ls=R(`$ZodCheckEndsWith`,(e,t)=>{xs.init(e,t);let n=RegExp(`.*${ba(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})}}),Rs=R(`$ZodCheckOverwrite`,(e,t)=>{xs.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),zs=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(`
|
|
193
|
+
`).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(`
|
|
194
|
+
`)}\n};`)(...Object.values(this.closed))}},Bs={major:4,minor:6,patch:4},z=R(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Bs;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=Fa(t),a;for(let o of n){if(o._zod.def.when){if(Ia(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 co;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(za(t.issues,n,e),i||=Fa(t,n))});else{if(t.issues.length===n)continue;za(t.issues,n,e),i||=Fa(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Fa(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new co;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 co;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ja(this,`~standard`,Us(this))},set"~standard"(e){qa(this,`~standard`,e)}}),Vs=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ba(e,t,fo()))}:{value:e.value};async function Hs(e,t){let n={async:!0};return Vs(await e._zod.run({value:t,issues:[]},n),n)}function Us(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Vs(r,n)}catch{}return Hs(e,t)},vendor:`zod`,version:1}}var Ws=R(`$ZodString`,(e,t)=>{z.init(e,t),e._zod.pattern=t.pattern??hs,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}}),B=R(`$ZodStringFormat`,(e,t)=>{js.init(e,t),Ws.init(e,t)}),Gs=R(`$ZodGUID`,(e,t)=>{t.pattern??=Xo,B.init(e,t)}),Ks=R(`$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??=Zo(e)}else t.pattern??=Zo();B.init(e,t)}),qs=R(`$ZodEmail`,(e,t)=>{t.pattern??=Qo,B.init(e,t)});function Js(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Ys(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Js(e)||2:Xs(e,t)}function Xs(e,t){if(!t.normalize&&t.protocol?.source===ss.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 Zs=/[\t\n\r]/g;function Qs(e){return e.replace(Zs,``)}function $s(e,t){return t.lastIndex=0,t.test(e.hostname)}function ec(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var tc=R(`$ZodURL`,(e,t)=>{B.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Ys(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=Qs(r);return}t.hostname&&!$s(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&&!ec(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:Qs(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),nc=R(`$ZodEmoji`,(e,t)=>{t.pattern??=es(),B.init(e,t)}),rc=R(`$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?qo:Jo(t.length),B.init(e,t)}),ic=R(`$ZodCUID`,(e,t)=>{t.pattern??=Ho,B.init(e,t)}),ac=R(`$ZodCUID2`,(e,t)=>{t.pattern??=Uo,B.init(e,t)}),oc=R(`$ZodULID`,(e,t)=>{t.pattern??=Wo,B.init(e,t)}),sc=R(`$ZodXID`,(e,t)=>{t.pattern??=Go,B.init(e,t)}),cc=R(`$ZodKSUID`,(e,t)=>{t.pattern??=Ko,B.init(e,t)}),lc=R(`$ZodISODateTime`,(e,t)=>{t.pattern??=ms(t),B.init(e,t)}),uc=R(`$ZodISODate`,(e,t)=>{t.pattern??=ds,B.init(e,t)}),dc=R(`$ZodISOTime`,(e,t)=>{t.pattern??=ps(t),B.init(e,t)}),fc=R(`$ZodISODuration`,(e,t)=>{t.pattern??=Yo,B.init(e,t)}),pc=R(`$ZodIPv4`,(e,t)=>{t.pattern??=ts,B.init(e,t)}),mc=/^[0-9a-fA-F:.]+$/;function hc(e){return mc.test(e)?Js(`http://[${e}]`):!1}var gc=R(`$ZodIPv6`,(e,t)=>{t.pattern??=ns,B.init(e,t),e._zod.check=n=>{hc(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),_c=R(`$ZodCIDRv4`,(e,t)=>{t.pattern??=rs,B.init(e,t)});function vc(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:hc(n)}var yc=R(`$ZodCIDRv6`,(e,t)=>{t.pattern??=is,B.init(e,t),e._zod.check=n=>{vc(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function bc(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var xc=/^[0-9a-zA-Z+/]*={0,2}$/,Sc=R(`$ZodBase64`,(e,t)=>{t.pattern??=xc,B.init(e,t),e._zod.check=n=>{bc(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Cc=/^[A-Za-z0-9_-]*$/;function wc(e){if(!Cc.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return bc(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Tc=R(`$ZodBase64URL`,(e,t)=>{t.pattern??=Cc,B.init(e,t),e._zod.check=n=>{wc(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Ec=R(`$ZodE164`,(e,t)=>{t.pattern??=cs,B.init(e,t)});function Dc(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 Oc=R(`$ZodJWT`,(e,t)=>{B.init(e,t),e._zod.check=n=>{Dc(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),kc=R(`$ZodNumber`,(e,t)=>{z.init(e,t),e._zod.pattern=gs,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}}),Ac=R(`$ZodNumberFormat`,(e,t)=>{Ds.init(e,t),kc.init(e,t)}),jc=R(`$ZodBoolean`,(e,t)=>{z.init(e,t),e._zod.pattern=_s,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}}),Mc=R(`$ZodNull`,(e,t)=>{z.init(e,t),e._zod.pattern=vs,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}}),Nc=R(`$ZodUnknown`,(e,t)=>{z.init(e,t),e._zod.parse=e=>e}),Pc=R(`$ZodNever`,(e,t)=>{z.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Fc(e,t,n){e.issues.length&&t.issues.push(...La(n,e.issues)),t.value[n]=e.value}var Ic=R(`$ZodArray`,(e,t)=>{z.init(e,t);let n=uo.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=>Fc(t,r,e)));else if(Fc(c,r,e),s&&c.issues.length!==0&&Fa(c))break}return o.length?Promise.all(o).then(()=>r):r}});function Lc(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(...La(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 Rc=[];function zc(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Rc,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=Ca(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Bc(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(Fa(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=>Lc(e,n,i,t,d,f))):Lc(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 Vc=R(`$ZodObject`,(e,t)=>{z.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=ea(()=>zc(t));L(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)||ia(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=ha,o=t.catchall,s,c=uo.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(Fa(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=>Lc(n,t,e,r,a,o))):Lc(s,t,e,r,a,o)}return o?Bc(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Hc=R(`$ZodObjectJIT`,(e,t)=>{Vc.init(e,t);let n=e._zod.parse,r=ea(()=>zc(t)),i=uo.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new zs([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
195
|
+
let ${e}_ab = false;
|
|
196
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
197
|
+
const iss = ${e}.issues[i];
|
|
198
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
199
|
+
payload.issues.push(iss);
|
|
200
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
201
|
+
}
|
|
202
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
203
|
+
payload.value = newResult;
|
|
204
|
+
return payload;
|
|
205
|
+
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:fa(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
206
|
+
const ${n}_present = ${i};
|
|
207
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
208
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (${e}) {
|
|
212
|
+
newResult[${r}] = ${n}.value;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
`)}else f?(o.write(`
|
|
217
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
218
|
+
}
|
|
219
|
+
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
220
|
+
if (${n}.value !== undefined || ${i}) {
|
|
221
|
+
newResult[${r}] = ${n}.value;
|
|
222
|
+
}
|
|
223
|
+
`)):o.write(`
|
|
224
|
+
const ${n}_present = ${i};
|
|
225
|
+
if (${n}.issues.length) {${c(n,r)}
|
|
226
|
+
}
|
|
227
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
228
|
+
payload.issues.push({
|
|
229
|
+
code: "invalid_type",
|
|
230
|
+
expected: "nonoptional",
|
|
231
|
+
input: undefined,
|
|
232
|
+
path: [${r}]
|
|
233
|
+
});
|
|
234
|
+
if (ctx && ctx.abortEarly) {
|
|
235
|
+
payload.value = newResult;
|
|
236
|
+
return payload;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (${n}_present) {
|
|
241
|
+
newResult[${r}] = ${n}.value;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=ha,c=!uo.jitless,l=c&&ga.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?Bc([],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 Uc(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=>!Fa(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=>Ba(e,r,fo())))}),t)}var Wc=R(`$ZodUnion`,(e,t)=>{z.init(e,t),L(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),L(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),L(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)))}),L(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=>na(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=>Uc(t,r,e,i)):Uc(o,r,e,i)}});function Gc(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 Kc=R(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Wc.init(e,t);let n=e._zod.parse;L(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)||ia(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=aa(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ea(()=>Gc(t));e._zod.parse=(i,a)=>{let o=i.value;if(!ha(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)}}),qc=R(`$ZodIntersection`,(e,t)=>{z.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])=>Yc(e,t,n)):Yc(e,i,a)}});function Jc(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_a(e)&&_a(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=Jc(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=Jc(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 Yc(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=Jc(t.value,n.value);if(!c.valid){if(Fa(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Xc=R(`$ZodEnum`,(e,t)=>{z.init(e,t);let n=Xi(t.entries),r=new Set(n);e._zod.values=r,L(e,`pattern`,e=>{let t=Xi(e.def.entries).filter(e=>ya.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ba(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}}),Zc=R(`$ZodLiteral`,(e,t)=>{z.init(e,t);let n=new Set(t.values);e._zod.values=n,L(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ba(e):e?ba(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}}),Qc=R(`$ZodTransform`,(e,t)=>{z.init(e,t),e._zod.optin=`optional`,uo.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new lo(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 co;return n.value=i,n}});function $c(e,t){return e.value=t.issues.length?void 0:t.value,e}var el=R(`$ZodOptional`,(e,t)=>{z.init(e,t),L(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,L(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),L(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${na(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=>$c(e,t)):$c(e,r)}return t.innerType._zod.run(e,n)}}),tl=R(`$ZodExactOptional`,(e,t)=>{el.init(e,t),L(e,`values`,e=>e.def.innerType._zod.values),L(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),nl=R(`$ZodNullable`,(e,t)=>{z.init(e,t),L(e,`optin`,e=>e.def.innerType._zod.optin),L(e,`optout`,e=>e.def.innerType._zod.optout),L(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${na(t.source)}|null)$`):void 0}),L(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)}),rl=R(`$ZodDefault`,(e,t)=>{z.init(e,t),e._zod.optin=`defaulted`,L(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=>il(e,t)):il(r,t)}});function il(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var al=R(`$ZodPrefault`,(e,t)=>{z.init(e,t),e._zod.optin=`defaulted`,L(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))}),ol=R(`$ZodNonOptional`,(e,t)=>{z.init(e,t),L(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=>sl(t,e)):sl(i,e)}});function sl(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 cl(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ba(e,r,fo()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ll=R(`$ZodCatch`,(e,t)=>{z.init(e,t),L(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),L(e,`optout`,e=>e.def.innerType._zod.optout),L(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=>cl(e,r,t,n)):cl(e,r,t,n)}}),ul=R(`$ZodPipe`,(e,t)=>{z.init(e,t),L(e,`values`,e=>e.def.in._zod.values),L(e,`optin`,e=>e.def.in._zod.optin),L(e,`optout`,e=>e.def.out._zod.optout),L(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=>dl(e,t.in,n)):dl(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>dl(e,t.out,n)):dl(r,t.out,n)}});function dl(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 fl=R(`$ZodReadonly`,(e,t)=>{z.init(e,t),L(e,`propValues`,e=>e.def.innerType._zod.propValues),L(e,`values`,e=>e.def.innerType._zod.values),L(e,`optin`,e=>e.def.innerType?._zod?.optin),L(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(pl):pl(r)}});function pl(e){return e.memo||(e.value=Object.freeze(e.value)),e}var ml=R(`$ZodCustom`,(e,t)=>{xs.init(e,t),z.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=>hl(t,n,r,e));hl(i,n,r,e)}});function hl(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(Ga(e))}}var gl=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},_l=`~memo`,vl=[];function yl(e){return typeof e==`object`&&!!e}function bl(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var xl=new WeakMap,Sl=0,Cl=1,wl=2;function Tl(e,t,n){let r=xl.get(e);if(r!==void 0)return r?wl:Sl;if(t.has(e))return wl;t.add(e);let i=Sl,a=e=>{if(i!==wl&&e?._zod){let r=Tl(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Sl;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Cl:o.value?._zod?Tl(o.value,t,n):Sl;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=aa(c);s(e?o(e,!0):Cl),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?Tl(r,t,!1):Cl);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),El(e,i)}function El(e,t){return t!==Cl&&xl.set(e,t===wl),t}function Dl(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Ol,kl=[],Al={alloc(e,t,n){let r=Ol;if(!r)return n;Ol=void 0;let i={value:n,issues:null};return r.set(t.value,i),kl.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`&&Ml(n,e.value))throw new gl;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=Tl(e,new Set,!1);if(i===Sl)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===wl||r?n=!0:r=!0}let l=s.value;if(!yl(l))return t(s,c);let u=c[_l];u||(u={buckets:new WeakMap,backEdges:void 0},c[_l]=u);let d;i===c?d=a:(d=Dl(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(...bl(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Ol=d;let p=kl.length,m=t(s,c);Ol=void 0;let h=kl.length>p?kl.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?bl(e.issues):vl),e)):(h&&(h.issues=m.issues.length?bl(m.issues):vl),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function jl(){return Al}function Ml(e,t){let n=e[_l]?.backEdges;return n!==void 0&&yl(t)&&n.has(t)}var Nl=()=>{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(Wa(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Sa(e.values[0])}`:`Invalid option: expected one of ${Zi(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`:``}: ${Zi(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 Pl(){return{localeError:Nl()}}var Fl,Il=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 Ll(){return new Il}(Fl=globalThis).__zod_globalRegistry??(Fl.__zod_globalRegistry=Ll());var Rl=globalThis.__zod_globalRegistry;function zl(e){return e.checks&&=[...e.checks],e}function Bl(e,t){return new e(zl({type:`string`,...I(t)}))}function Vl(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...I(t)})}function Hl(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...I(t)})}function Ul(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...I(t)})}function Wl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...I(t)})}function Gl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...I(t)})}function Kl(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...I(t)})}function ql(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...I(t)})}function Jl(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...I(t)})}function Yl(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...I(t)})}function Xl(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...I(t)})}function Zl(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...I(t)})}function Ql(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...I(t)})}function $l(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...I(t)})}function eu(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...I(t)})}function tu(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...I(t)})}function nu(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...I(t)})}function ru(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...I(t)})}function iu(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...I(t)})}function au(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...I(t)})}function ou(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...I(t)})}function su(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...I(t)})}function cu(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...I(t)})}function lu(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...I(t)})}function uu(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...I(t)})}function du(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...I(t)})}function fu(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...I(t)})}function pu(e,t){return new e(zl({type:`number`,checks:[],...I(t)}))}function mu(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...I(t)})}function hu(e,t){return new e({type:`boolean`,...I(t)})}function gu(e,t){return new e({type:`null`,...I(t)})}function _u(e){return new e({type:`unknown`})}function vu(e,t){return new e({type:`never`,...I(t)})}function yu(e,t){return new ws({check:`less_than`,...I(t),value:e,inclusive:!1})}function bu(e,t){return new ws({check:`less_than`,...I(t),value:e,inclusive:!0})}function xu(e,t){return new Ts({check:`greater_than`,...I(t),value:e,inclusive:!1})}function Su(e,t){return new Ts({check:`greater_than`,...I(t),value:e,inclusive:!0})}function Cu(e,t){return new Es({check:`multiple_of`,...I(t),value:e})}function wu(e,t){return new Os({check:`max_length`,...I(t),maximum:e})}function Tu(e,t){return new ks({check:`min_length`,...I(t),minimum:e})}function Eu(e,t){return new As({check:`length_equals`,...I(t),length:e})}function Du(e,t){return new Ms({check:`string_format`,format:`regex`,...I(t),pattern:e})}function Ou(e){return new Ns({check:`string_format`,format:`lowercase`,...I(e)})}function ku(e){return new Ps({check:`string_format`,format:`uppercase`,...I(e)})}function Au(e,t){return new Fs({check:`string_format`,format:`includes`,...I(t),includes:e})}function ju(e,t){return new Is({check:`string_format`,format:`starts_with`,...I(t),prefix:e})}function Mu(e,t){return new Ls({check:`string_format`,format:`ends_with`,...I(t),suffix:e})}function Nu(e){return new Rs({check:`overwrite`,tx:e})}function Pu(e){return Nu(t=>t.normalize(e))}function Fu(){return Nu(e=>e.trim())}function Iu(){return Nu(e=>e.toLowerCase())}function Lu(){return Nu(e=>e.toUpperCase())}function Ru(){return Nu(e=>pa(e))}function zu(e,t,n){return new e({type:`array`,element:t,...I(n)})}function Bu(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...I(n)})}function Vu(e,t){let n=Hu(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ga(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(Ga(r))}},e(t.value,t)),t);return n}function Hu(e,t){let n=new xs({check:`custom`,...I(t)});return n._zod.check=e,n}function Uu(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&ia(e,t,n[t]);return e}function Wu(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??Rl,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 Gu(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 V(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,V(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Uu(o.schema,c),t.io===`input`&&H(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 Ku(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function qu(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}/${Ku(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+Ku(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>
|
|
245
|
+
|
|
246
|
+
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 Ju(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;Ju(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 Yu=new Set([`type`,`properties`,`required`,`additionalProperties`]),Xu=[`oneOf`,`anyOf`];function Zu(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function Qu(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!Yu.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]??Zu(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}ia(n,r,e.length===1?e[0]:Qu(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=Zu(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 $u(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of Yu)if(t in e)return;let n=t.filter(e=>Xu.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=Qu(t);else{let e=n[0],i=Xu.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=>Qu([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Uu(e,r))}function ed(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)):Uu(i,s),Uu(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())Ju(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)??[])$u(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)}Uu(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,ia(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:nd(t,`input`,e.processors),output:nd(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function H(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 H(r.element,n);if(r.type===`set`)return H(r.valueType,n);if(r.type===`lazy`)return H(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 H(r.innerType,n);if(r.type===`intersection`)return H(r.left,n)||H(r.right,n);if(r.type===`record`||r.type===`map`)return H(r.keyType,n)||H(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:H(r.in,n)||H(r.out,n);if(r.type===`object`){for(let e in r.shape)if(H(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(H(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(H(e,n))return!0;return!!(r.rest&&H(r.rest,n))}return!1}var td=(e,t={})=>n=>{let r=Wu({...n,processors:t});return V(e,r),qu(r,e),ed(r,e)},nd=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Wu({...i??{},target:a,io:t,processors:n});return V(e,o),qu(o,e),ed(o,e)},rd=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},id=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ad=(e,t)=>{rd(e,`minimum`,t),id(e,`maximum`,t)},od=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},sd=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},cd=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ld=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},ud=(e,t)=>rd(e,`minimum`,t.minimum),dd=(e,t)=>id(e,`maximum`,t.maximum),fd=e=>(t,n)=>{ld(t,n.format);let[r,i]=e[n.format];rd(t,`minimum`,r),id(t,`maximum`,i)},pd={greater_than:(e,t)=>rd(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>id(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>od(e,t.value),number_format:fd(wa),bigint_format:fd(Ta),min_length:ud,max_length:dd,length_equals:(e,t)=>ad(e,t.length),min_size:ud,max_size:dd,size_equals:(e,t)=>ad(e,t.size),string_format:(e,t)=>{ld(e,t.format),t.pattern&&sd(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)=>cd(e,t.mime)};function md(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)pd[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&rd(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&rd(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&id(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&id(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&od(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&cd(t,i.mime);for(let e of i.patterns??[])sd(t,e);return t}var hd={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},gd=new Map([[xc,as],[Cc,os]]),_d=e=>gd.get(e)??e,vd=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=md(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=hd[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(_d);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}))])}},yd=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=md(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)):Gu(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}))])}},bd=(e,t,n,r)=>{n.type=`boolean`},xd=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Sd=(e,t,n,r)=>{n.not={}},Cd=(e,t,n,r)=>{let i=e._zod.def,a=Xi(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},wd=(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(Gu(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Gu(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}},Td=(e,t,n,r)=>{Gu(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Ed=(e,t,n,r)=>{Gu(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Dd=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=md(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=V(a.element,t,{...r,path:[...r.path,`items`]})};function Od(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Od(t.out):t.type===`catch`?Od(t.innerType):e._zod.optin}var kd=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Gu(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)ia(i.properties,e,V(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`?Od(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=V(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Ad=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>V(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},jd=(e,t,n,r)=>{let i=e._zod.def,a=V(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=V(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)},Md=(e,t,n,r)=>{let i=e._zod.def,a=V(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`}]},Nd=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Pd=Symbol();function Fd(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Gu(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Pd):JSON.parse(o)}var Id=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Fd(i.defaultValue,e,t,n,r);o!==Pd&&(n.default=o)},Ld=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Fd(i.defaultValue,e,t,n,r);o!==Pd&&(n._prefault=o)},Rd=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Gu(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},zd=(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;V(o,t,r);let s=t.seen.get(e);s.ref=o},Bd=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Vd=(e,t,n,r)=>{let i=e._zod.def;V(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Hd=new WeakSet([Object.prototype,Error.prototype]);function Ud(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 Wd=R(`ZodError`,(e,t)=>{yo.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Hd.has(n)||(Hd.add(n),Ud(n,`format`,e=>t=>So(e,t)),Ud(n,`flatten`,e=>t=>xo(e,t)),Ud(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Qi,2)}),Ud(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Qi,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Gd=wo(Wd),Kd=To(Wd),qd=Eo(Wd),Jd=Oo(Wd),Yd=Po(Wd),Xd=Fo(Wd),Zd=Io(Wd),Qd=Lo(Wd),$d=Ro(Wd),ef=zo(Wd),tf=Bo(Wd),nf=Vo(Wd);function rf(){uo.localeError||fo(Pl())}function af(){uo.memoizer||fo({memoizer:jl()})}var U=R(`ZodType`,(e,t)=>(rf(),z.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(da(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 xa(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(bp(e,t))},superRefine(e,t){return this.check(xp(e,t))},overwrite(e){return this.check(Nu(e))},optional(){return np(this)},exactOptional(){return ip(this)},nullable(){return op(this)},nullish(){return np(op(this))},nonoptional(e){return fp(this,e)},array(){return q(this)},or(e){return Kf([this,e])},and(e){return Xf(this,e)},transform(e){return gp(this,ep(e))},default(e){return cp(this,e)},prefault(e){return up(this,e)},catch(e){return mp(this,e)},pipe(e){return gp(this,e)},readonly(){return vp(this)},describe(e){let t=this.clone();return Rl.add(t,{description:e}),t},meta(...e){if(e.length===0)return Rl.get(this);let t=this.clone();return Rl.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 Ja(this,`~standard`,{...Us(this),jsonSchema:{input:nd(this,`input`),output:nd(this,`output`)}})},set"~standard"(e){qa(this,`~standard`,e)},parse:function e(t,n){return Gd(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await Kd(this,t,n,{callee:e})},safeParse(e,t){return qd(this,e,t)},async safeParseAsync(e,t){return Jd(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){qa(this,`spa`,e)},validate(e,t){return jo(this,e,t)},validateAsync(e,t){return No(this,e,t)},encode:function e(t,n){return Yd(this,t,n,{callee:e})},decode:function e(t,n){return Xd(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Zd(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Qd(this,t,n,{callee:e})},safeEncode(e,t){return $d(this,e,t)},safeDecode(e,t){return ef(this,e,t)},async safeEncodeAsync(e,t){return tf(this,e,t)},async safeDecodeAsync(e,t){return nf(this,e,t)},toJSONSchema(e){return td(this,{})(e)},get description(){return Rl.get(this)?.description},get _def(){return this._zod.def}}),of=R(`_ZodString`,(e,t)=>{Ws.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vd(e,t,n,r)},Ya({format:e=>md(e).format??null,minLength:e=>md(e).minimum??null,maxLength:e=>md(e).maximum??null},{regex(...e){return this.check(Du(...e))},includes(...e){return this.check(Au(...e))},startsWith(...e){return this.check(ju(...e))},endsWith(...e){return this.check(Mu(...e))},min(...e){return this.check(Tu(...e))},max(...e){return this.check(wu(...e))},length(...e){return this.check(Eu(...e))},nonempty(...e){return this.check(Tu(1,...e))},lowercase(e){return this.check(Ou(e))},uppercase(e){return this.check(ku(e))},trim(){return this.check(Fu())},normalize(...e){return this.check(Pu(...e))},toLowerCase(){return this.check(Iu())},toUpperCase(){return this.check(Lu())},slugify(){return this.check(Ru())}})),sf=R(`ZodString`,(e,t)=>{Ws.init(e,t),of.init(e,t)},{email(e){return this.check(Vl(ff,e))},url(e){return this.check(ql(gf,e))},jwt(e){return this.check(cu(jf,e))},emoji(e){return this.check(Jl(_f,e))},guid(e){return this.check(Hl(pf,e))},uuid(e){return this.check(Ul(mf,e))},uuidv4(e){return this.check(Wl(mf,e))},uuidv6(e){return this.check(Gl(mf,e))},uuidv7(e){return this.check(Kl(mf,e))},nanoid(e){return this.check(Yl(vf,e))},cuid(e){return this.check(Xl(yf,e))},cuid2(e){return this.check(Zl(bf,e))},ulid(e){return this.check(Ql(xf,e))},base64(e){return this.check(au(Of,e))},base64url(e){return this.check(ou(kf,e))},xid(e){return this.check($l(Sf,e))},ksuid(e){return this.check(eu(Cf,e))},ipv4(e){return this.check(tu(wf,e))},ipv6(e){return this.check(nu(Tf,e))},cidrv4(e){return this.check(ru(Ef,e))},cidrv6(e){return this.check(iu(Df,e))},e164(e){return this.check(su(Af,e))},datetime(e){return this.check(lu(cf,e))},date(e){return this.check(uu(lf,e))},time(e){return this.check(du(uf,e))},duration(e){return this.check(fu(df,e))}});function W(e){return Bl(sf,e)}var G=R(`ZodStringFormat`,(e,t)=>{B.init(e,t),of.init(e,t)}),cf=R(`ZodISODateTime`,(e,t)=>{lc.init(e,t),G.init(e,t)}),lf=R(`ZodISODate`,(e,t)=>{uc.init(e,t),G.init(e,t)}),uf=R(`ZodISOTime`,(e,t)=>{dc.init(e,t),G.init(e,t)}),df=R(`ZodISODuration`,(e,t)=>{fc.init(e,t),G.init(e,t)}),ff=R(`ZodEmail`,(e,t)=>{qs.init(e,t),G.init(e,t)}),pf=R(`ZodGUID`,(e,t)=>{Gs.init(e,t),G.init(e,t)}),mf=R(`ZodUUID`,(e,t)=>{Ks.init(e,t),G.init(e,t)});function hf(e){return Ul(mf,e)}var gf=R(`ZodURL`,(e,t)=>{tc.init(e,t),G.init(e,t)}),_f=R(`ZodEmoji`,(e,t)=>{nc.init(e,t),G.init(e,t)}),vf=R(`ZodNanoID`,(e,t)=>{rc.init(e,t),G.init(e,t)}),yf=R(`ZodCUID`,(e,t)=>{ic.init(e,t),G.init(e,t)}),bf=R(`ZodCUID2`,(e,t)=>{ac.init(e,t),G.init(e,t)}),xf=R(`ZodULID`,(e,t)=>{oc.init(e,t),G.init(e,t)}),Sf=R(`ZodXID`,(e,t)=>{sc.init(e,t),G.init(e,t)}),Cf=R(`ZodKSUID`,(e,t)=>{cc.init(e,t),G.init(e,t)}),wf=R(`ZodIPv4`,(e,t)=>{pc.init(e,t),G.init(e,t)}),Tf=R(`ZodIPv6`,(e,t)=>{gc.init(e,t),G.init(e,t)}),Ef=R(`ZodCIDRv4`,(e,t)=>{_c.init(e,t),G.init(e,t)}),Df=R(`ZodCIDRv6`,(e,t)=>{yc.init(e,t),G.init(e,t)}),Of=R(`ZodBase64`,(e,t)=>{Sc.init(e,t),G.init(e,t)}),kf=R(`ZodBase64URL`,(e,t)=>{Tc.init(e,t),G.init(e,t)}),Af=R(`ZodE164`,(e,t)=>{Ec.init(e,t),G.init(e,t)}),jf=R(`ZodJWT`,(e,t)=>{Oc.init(e,t),G.init(e,t)}),Mf=R(`ZodNumber`,(e,t)=>{kc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yd(e,t,n,r),e.isFinite=!0},Ya({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=md(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=md(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=md(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>md(e).format??null},{gt(e,t){return this.check(xu(e,t))},gte(e,t){return this.check(Su(e,t))},min(e,t){return this.check(Su(e,t))},lt(e,t){return this.check(yu(e,t))},lte(e,t){return this.check(bu(e,t))},max(e,t){return this.check(bu(e,t))},int(e){return this.check(Pf(e))},safe(e){return this.check(Pf(e))},positive(e){return this.check(xu(0,e))},nonnegative(e){return this.check(Su(0,e))},negative(e){return this.check(yu(0,e))},nonpositive(e){return this.check(bu(0,e))},multipleOf(e,t){return this.check(Cu(e,t))},step(e,t){return this.check(Cu(e,t))},finite(){return this}}));function K(e){return pu(Mf,e)}var Nf=R(`ZodNumberFormat`,(e,t)=>{Ac.init(e,t),Mf.init(e,t)});function Pf(e){return mu(Nf,e)}var Ff=R(`ZodBoolean`,(e,t)=>{jc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bd(e,t,n,r)});function If(e){return hu(Ff,e)}var Lf=R(`ZodNull`,(e,t)=>{Mc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xd(e,t,n,r)});function Rf(e){return gu(Lf,e)}var zf=R(`ZodUnknown`,(e,t)=>{Nc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Bf(){return _u(zf)}var Vf=R(`ZodNever`,(e,t)=>{Pc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sd(e,t,n,r)});function Hf(e){return vu(Vf,e)}var Uf=R(`ZodArray`,(e,t)=>{af(),Ic.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dd(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Tu(e,t))},nonempty(e){return this.check(Tu(1,e))},max(e,t){return this.check(wu(e,t))},length(e,t){return this.check(Eu(e,t))},unwrap(){return this.element}});function q(e,t){return zu(Uf,e,t)}var Wf=R(`ZodObject`,(e,t)=>{af(),Hc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kd(e,t,n,r),to(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return Y(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(da(this._zod.def,{catchall:e}))},passthrough(){return this.clone(da(this._zod.def,{catchall:Bf()}))},loose(){return this.clone(da(this._zod.def,{catchall:Bf()}))},strict(){return this.clone(da(this._zod.def,{catchall:Hf()}))},strip(){return this.clone(da(this._zod.def,{catchall:void 0}))},extend(e){return ka(this,e)},safeExtend(e){return ja(this,e)},merge(e){return Ma(this,e)},pick(e){return Ea(this,e)},omit(e){return Oa(this,e)},partial(...e){return Na(tp,this,e[0])},exactPartial(...e){return Na(rp,this,e[0],`exactPartial`)},required(...e){return Pa(dp,this,e[0])}});function J(e,t){return new Wf({type:`object`,shape:e,catchall:Hf(),...I(t)})}var Gf=R(`ZodUnion`,(e,t)=>{Wc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ad(e,t,n,r),e.options=t.options});function Kf(e,t){return new Gf({type:`union`,options:e,...I(t)})}var qf=R(`ZodDiscriminatedUnion`,(e,t)=>{Gf.init(e,t),Kc.init(e,t)});function Jf(e,t,n){return new qf({type:`union`,options:t,discriminator:e,...I(n)})}var Yf=R(`ZodIntersection`,(e,t)=>{qc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jd(e,t,n,r)});function Xf(e,t){return new Yf({type:`intersection`,left:e,right:t})}var Zf=R(`ZodEnum`,(e,t)=>{Xc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cd(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 Zf({...t,checks:[],...I(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 Zf({...t,checks:[],...I(r),entries:i})}});function Y(e,t){return new Zf({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...I(t)})}var Qf=R(`ZodLiteral`,(e,t)=>{Zc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wd(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 X(e,t){return new Qf({type:`literal`,values:Array.isArray(e)?e:[e],...I(t)})}var $f=R(`ZodTransform`,(e,t)=>{af(),Qc.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ed(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new lo(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ga(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(Ga(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function ep(e){return new $f({type:`transform`,transform:e})}var tp=R(`ZodOptional`,(e,t)=>{el.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function np(e){return new tp({type:`optional`,innerType:e})}var rp=R(`ZodExactOptional`,(e,t)=>{tl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ip(e){return new rp({type:`optional`,innerType:e})}var ap=R(`ZodNullable`,(e,t)=>{nl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Md(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function op(e){return new ap({type:`nullable`,innerType:e})}var sp=R(`ZodDefault`,(e,t)=>{rl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Id(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function cp(e,t){return new sp({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():va(t)}})}var lp=R(`ZodPrefault`,(e,t)=>{al.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ld(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function up(e,t){return new lp({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():va(t)}})}var dp=R(`ZodNonOptional`,(e,t)=>{ol.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function fp(e,t){return new dp({type:`nonoptional`,innerType:e,...I(t)})}var pp=R(`ZodCatch`,(e,t)=>{ll.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function mp(e,t){return new pp({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ro(t)})}var hp=R(`ZodPipe`,(e,t)=>{ul.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zd(e,t,n,r),e.in=t.in,e.out=t.out});function gp(e,t){return new hp({type:`pipe`,in:e,out:t})}var _p=R(`ZodReadonly`,(e,t)=>{fl.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bd(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vp(e){return new _p({type:`readonly`,innerType:e})}var yp=R(`ZodCustom`,(e,t)=>{ml.init(e,t),U.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Td(e,t,n,r)});function bp(e,t={}){return Bu(yp,e,t)}function xp(e,t){return Vu(e,t)}function Sp(e){return lu(cf,e)}function Cp(e){return uu(lf,e)}var wp=W().min(1).refine(e=>!e.includes(`\0`)&&!/[\uD800-\uDFFF]/u.test(e),`Paths must be lossless Unicode strings without NUL.`),Tp=wp.refine(e=>!e.startsWith(`/`)&&!/^[A-Za-z]:/.test(e)&&!(e.endsWith(`/`)?e.slice(0,-1):e).split(`/`).some(e=>e===`.`||e===`..`||e===``)),Ep=W().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/).refine(e=>!/^0+$/.test(e)),Dp=J({commitChanged:If(),trackedChanges:If(),untrackedChanges:If()}).nullable(),Op=Tp.refine(e=>!e.endsWith(`/`)),kp=Jf(`kind`,[J({kind:X(`tracked`),path:Op,xy:W().regex(/^[.MTAD]{2}$/).refine(e=>e!==`..`),submodule:Dp}),J({kind:X(`unmerged`),path:Op,xy:Y([`DD`,`AU`,`UD`,`UA`,`DU`,`AA`,`UU`]),submodule:Dp}),J({kind:X(`untracked`),path:Tp,xy:Rf(),submodule:Rf()})]),Ap=Kf([J({contract:X(`repository-status`),version:X(1),ok:X(!0),observation:J({id:hf(),startedAt:Sp(),completedAt:Sp(),consistency:X(`best-effort`)}),repository:J({key:W().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:W().regex(/^worktree:[0-9a-f]{64}$/),rootPath:wp.refine(e=>e.startsWith(`/`)||/^[A-Za-z]:[/\\]/.test(e)||e.startsWith(`\\\\`)),objectFormat:Y([`sha1`,`sha256`])}),head:Jf(`state`,[J({state:X(`branch`),branch:wp,commit:Ep}),J({state:X(`detached`),branch:Rf(),commit:Ep}),J({state:X(`unborn`),branch:wp,commit:Rf()})]),changes:q(kp),summary:J({staged:Pf().nonnegative(),unstaged:Pf().nonnegative(),untracked:Pf().nonnegative(),conflicted:Pf().nonnegative()}),checks:J({state:X(`not-run`),reason:X(`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]})}),J({contract:X(`repository-status`),version:X(1),ok:X(!1),error:J({code:Y([`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:W().min(1)})})]),jp=J({contract:X(`browser-http-error`),version:X(1),error:J({code:Y([`BAD_REQUEST`,`FORBIDDEN`,`NOT_FOUND`,`METHOD_NOT_ALLOWED`,`SESSION_CHANGED`,`SERVER_CLOSING`,`INTERNAL_ERROR`]),message:W().min(1)})}),Mp=Y([`committed`,`added`,`modified`,`deleted`]),Np={state:Mp,previousPath:W().optional()},Pp=J({email:W(),name:W(),commits:K().int().nonnegative(),latest:W()}),Fp=J({id:W().optional(),title:W().optional(),path:W().optional(),url:W().optional(),note:W().optional()}),Ip=Y([`default`,`usecase`]),Lp=J({id:W(),path:W(),title:W(),description:W(),order:K().int().nonnegative(),style:Ip.optional(),body:W(),...Np}),Rp=J({id:W(),path:W(),title:W(),description:W(),order:K().int().nonnegative(),body:W(),requirements:q(W()),sources:q(Fp),...Np}),zp=J({id:W(),path:W(),title:W(),description:W(),body:W(),...Np,requirements:q(Lp),designs:q(Rp),contributors:q(Pp),updatedAt:W().nullable()}),Bp=J({code:W(),path:W(),message:W()}),Z=W().regex(/^(?:[a-f0-9]{40}|[a-f0-9]{64})$/),Vp=J({id:W(),path:W(),title:W(),state:Mp,requirements:q(J({id:W(),path:W(),title:W(),description:W()})),designs:q(J({id:W(),path:W(),title:W()}))}),Hp=J({contract:X(`browser-checkout`),version:X(2),sessionId:W(),head:Z.nullable(),observedAt:W(),working:If(),stamp:W(),problems:q(Bp),index:J({features:q(Vp),people:q(J({name:W(),email:W()}))})}),Up=J({id:W(),path:W(),title:W(),description:W(),state:Mp,designs:K().int().nonnegative(),contributors:q(Pp),updatedAt:W().nullable(),requirementCount:K().int().nonnegative(),requirements:q(J({id:W(),title:W(),description:W(),state:Mp,acceptance:K().int().positive().nullable(),designed:If()})),hidden:K().int().nonnegative()}),Wp=J({contract:X(`browser-features`),version:X(1),sessionId:W(),total:K().int().nonnegative(),all:K().int().nonnegative(),requirements:K().int().nonnegative(),mostRequirements:K().int().nonnegative(),next:W().nullable(),features:q(Up)}),Gp=J({contract:X(`browser-feature`),version:X(2),sessionId:W(),feature:zp}),Kp=J({contract:X(`browser-contributors`),version:X(1),sessionId:W(),total:K().int().nonnegative(),next:W().nullable(),people:q(J({email:W(),name:W(),commits:K().int().nonnegative(),latest:W(),features:K().int().nonnegative()}))}),qp=J({contract:X(`browser-contributor`),version:X(1),sessionId:W(),person:Pp,features:q(J({id:W(),title:W(),commits:K().int().nonnegative(),requirements:K().int().nonnegative()}))}),Jp=Y([`feature`,`requirement`,`design`,`wiki`,`instruction`]),Yp=J({id:W(),title:W(),specId:W(),path:W()}).nullable(),Xp=J({id:W(),kind:Jp,title:W(),description:W(),body:W(),specId:W(),path:W(),order:K().int().optional(),style:Ip.optional(),requirements:q(W()).optional(),sources:q(Fp).optional()}).nullable(),Zp=Y([`created`,`modified`,`moved`,`deleted`]),Qp=J({key:Y([`context`,`decision`,`alternatives`]),body:W()}),$p=J({id:W(),title:W(),sections:q(Qp)}),em=J({key:W(),commit:Z,date:W(),author:W(),email:W(),committer:W(),message:W(),id:W(),kind:Jp,types:q(Zp),before:Yp,after:Yp,records:q($p)}),tm=J({contract:X(`browser-history`),version:X(7),sessionId:W(),head:Z,total:K().int().nonnegative(),commits:K().int().nonnegative(),next:Z.nullable(),events:q(em),whole:q(J({commit:Z,documents:K().int().nonnegative(),unrecorded:K().int().nonnegative(),records:q(J({id:W(),documents:K().int().positive()}))})),kinds:q(Jp)}),nm=J({contract:X(`browser-history-summary`),version:X(5),sessionId:W(),head:Z,people:J({total:K().int().nonnegative(),top:q(Pp),rest:J({count:K().int().nonnegative(),commits:K().int().nonnegative()})}),total:K().int().nonnegative(),byType:J({created:K().int().nonnegative(),modified:K().int().nonnegative(),moved:K().int().nonnegative(),deleted:K().int().nonnegative()}),pulse:q(J({date:W(),count:K().int().positive()})),recent:q(J({commit:Z,count:K().int().positive(),events:q(em)}))}),rm=Y([`feature`,`requirement`,`design`,`record`,`commit`]),im=J({id:W(),kind:rm,title:W(),where:W(),line:W(),featureId:W().optional(),commit:Z.optional()}),am=J({contract:X(`browser-search`),version:X(4),sessionId:W(),query:W(),groups:q(J({group:Kf([rm,X(`recent`)]),total:K().int().nonnegative(),next:W().nullable(),hits:q(im)}))}),om=Z,sm=e=>W().regex(/^(0|[1-9]\d{0,6})$/).transform(Number).pipe(K().int().min(0).max(e));J({head:om,after:Z.optional(),limit:sm(50).pipe(K().min(1)).optional(),target:W().regex(/^[SI]-[a-z2-7]{10}$/).optional(),document:Jp.optional(),record:X(`missing`).optional(),author:W().min(1).max(320).optional(),q:W().max(200).optional()}),J({head:om});var cm=W().regex(/^S-[a-z2-7]{10}$/);J({q:W().max(200).optional(),design:Y([`yes`,`no`]).optional(),author:W().min(1).max(320).optional(),sort:Y([`title`,`requirements`,`updated`]).optional(),dir:Y([`asc`,`desc`]).optional(),after:cm.optional(),limit:sm(50).pipe(K().min(1)).optional()}),J({id:cm}),J({q:W().max(200).optional(),after:W().min(1).max(320).optional(),limit:sm(50).pipe(K().min(1)).optional()}),J({email:W().min(1).max(320)}),J({q:W().max(200),head:om.optional(),group:rm.optional(),after:W().min(1).max(200).optional(),limit:sm(50).pipe(K().min(1)).optional()}),J({lang:W().regex(/^[a-z]{2}(?:-[A-Z]{2})?$/).optional()});var lm=Y([`added`,`modified`,`deleted`,`renamed`]),um=J({path:W(),previousPath:W().optional(),status:lm,additions:K().int().nonnegative().nullable(),deletions:K().int().nonnegative().nullable()}),dm=J({contract:X(`browser-commit-files`),version:X(2),sessionId:W(),commit:Z,total:K().int().nonnegative(),next:W().nullable(),files:q(um)}),fm=J({contract:X(`browser-commit-file`),version:X(1),sessionId:W(),commit:Z,file:um,before:W().nullable(),after:W().nullable(),binary:If(),tooLarge:If()});J({commit:Z,after:W().min(1).max(4096).optional(),limit:sm(100).pipe(K().min(1)).optional()}),J({commit:Z,path:W().min(1).max(4096)});var pm=J({contract:X(`browser-commit`),version:X(4),sessionId:W(),commit:Z,author:W(),email:W(),committer:W(),date:W(),message:W(),total:K().int().nonnegative(),next:W().nullable(),changes:q(em)}),mm=W().regex(/^(?:DR|H)-[A-Za-z0-9_-]{1,64}$/);J({commit:Z,after:W().min(1).max(200).optional(),limit:sm(100).pipe(K().min(1)).optional(),record:mm.optional()});var hm=J({contract:X(`browser-commit-change`),version:X(2),sessionId:W(),commit:Z,event:em,before:Xp,after:Xp});J({commit:Z,id:W().min(1).max(100)});var gm=J({contract:X(`browser-record`),version:X(2),sessionId:W(),head:Z,id:mm,commit:Z,record:$p,others:K().int().nonnegative()});J({head:Z,id:mm});var _m=J({contract:X(`browser-document-history`),version:X(1),sessionId:W(),head:Z,doc:J({id:W(),title:W().nullable(),kind:Jp.nullable(),path:W().nullable()}),total:K().int().nonnegative(),recorded:K().int().nonnegative(),withoutRecord:K().int().nonnegative(),next:Z.nullable(),events:q(em)});J({head:Z,id:W().regex(/^[SRDWI]-[a-z2-7]{10}$/),after:Z.optional(),limit:sm(50).pipe(K().min(1)).optional()});var vm=J({id:W(),kind:Jp,title:W(),path:W(),previousPath:W().optional(),types:q(Zp)}),ym=J({id:W(),title:W(),docs:q(W()),sections:q(Qp),draft:If()}),bm=J({contract:X(`browser-working`),version:X(1),sessionId:W(),head:Z.nullable(),records:q(ym),changes:q(vm),withoutRecord:q(W())}),xm=J({contract:X(`browser-working-change`),version:X(2),sessionId:W(),change:vm,before:Xp,after:Xp});J({id:W().regex(/^[SRDWI]-[a-z2-7]{10}$/)});var Sm=J({contract:X(`browser-stamp`),version:X(1),sessionId:W(),stamp:W()}),Cm=q(W().min(1)),wm=J({version:W().regex(/^\d+\.\d+\.\d+$/),date:Cp(),added:Cm,changed:Cm,removed:Cm,fixed:Cm}).refine(e=>e.added.length+e.changed.length+e.removed.length+e.fixed.length>0,`A version must list at least one change.`),Tm=J({contract:X(`changelog`),version:X(1),language:W().regex(/^[a-z]{2}(?:-[A-Z]{2})?$/),fallback:If(),entries:q(wm)}).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)}),Em=W().regex(/^\d+\.\d+\.\d+$/),Dm=J({status:Y([`checking`,`available`,`up-to-date`,`unavailable`,`disabled`]),latestVersion:Em.nullable()}).refine(e=>(e.status===`available`||e.status===`up-to-date`)==(e.latestVersion!==null),`latestVersion is set exactly when the check produced a result.`);Jf(`ok`,[J({contract:X(`project-init`),version:X(8),ok:X(!0),outcome:Y([`planned`,`created`,`already-initialized`]),rootPath:W(),configPath:X(`.gitifact/config.json`),schemaVersion:X(3),baseline:Jf(`kind`,[J({kind:X(`empty`)}),J({kind:X(`commit`),objectFormat:Y([`sha1`,`sha256`]),commit:W()})]),agentDocs:J({mode:Y([`install`,`remove`,`skip`]),paths:q(W())}),lineEndings:J({path:X(`.gitifact/.gitattributes`),created:If()}),update:Dm,install:J({npx:W().min(1),npmGlobal:W().min(1)}).nullable()}),J({contract:X(`project-init`),version:X(8),ok:X(!1),error:J({code:W(),message:W()})})]);var Om=Y([`untracked`,`other-changes`,`commit-failed`]),km=J({state:Y([`not-requested`,`nothing`,`committed`,`skipped`]),commit:W().nullable(),paths:q(W()),message:W().nullable(),reason:Om.nullable(),detail:W().nullable()}).refine(e=>e.state===`committed`==(e.commit!==null)&&e.state===`skipped`==(e.reason!==null),`commit is set exactly when committed, reason exactly when skipped.`);Jf(`ok`,[J({contract:X(`update`),version:X(6),ok:X(!0),cliVersion:W().min(1),update:Dm,install:J({npmGlobal:W().min(1)}).nullable(),agentDocs:J({state:Y([`refreshed`,`current`,`kept`,`not-initialized`,`no-block`]),paths:q(W()),missing:q(W())}),project:J({state:Y([`written`,`current`,`not-initialized`]),cli:W().min(1).nullable()}),commit:km,migrationRequired:If()}),J({contract:X(`update`),version:X(6),ok:X(!1),error:J({code:W(),message:W()})})]),J({contract:X(`update-later`),version:X(1),ok:X(!0),cliVersion:W().min(1),later:J({version:W().min(1),until:Sp()}).nullable()});var Am=J({contract:X(`browser-session`),version:X(3),sessionId:hf(),repository:J({key:W().regex(/^repo:[0-9a-f]{64}$/),worktreeKey:W().regex(/^worktree:[0-9a-f]{64}$/)}),cliVersion:W().regex(/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/)});J({contract:X(`update-check`),version:X(1),ok:X(!0),cliVersion:W().min(1),update:Dm.refine(e=>e.status!==`checking`,`The check must have finished.`),command:W().min(1).nullable()}).refine(e=>e.update.status===`available`==(e.command!==null),`An update command is present exactly when a newer release is available.`);var jm=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`ApiError`}};async function Mm(e,t={}){let n,r=new Headers(t.headers);r.set(`Accept-Language`,Te());try{n=await fetch(e,{...t,headers:r,cache:`no-store`})}catch(e){throw e instanceof Error&&e.name===`AbortError`?e:new jm(N(`api.networkError`),`NETWORK_ERROR`)}try{return{response:n,data:await n.json()}}catch{throw new jm(N(`api.unreadableResponse`),`INVALID_RESPONSE`)}}var Nm=[`browser-session`,3,window.location.origin];function Pm(e){let t=jp.safeParse(e);throw t.success?new jm(t.data.error.message,t.data.error.code):new jm(N(`api.invalidContract`),`INVALID_RESPONSE`)}var Fm=()=>ki({queryKey:Nm,staleTime:0,retry:!1,refetchOnWindowFocus:!0,queryFn:async({signal:e})=>{let{response:t,data:n}=await Mm(`/api/v1/session`,{signal:e});if(!t.ok)return Pm(n);let r=Am.safeParse(n);if(!r.success)throw new jm(N(`api.invalidSession`),`INVALID_RESPONSE`);return r.data}});function Im(e){return[`repository-status`,1,window.location.origin,e.sessionId,e.repository.key,e.repository.worktreeKey]}async function Lm(e,t,n){let{response:r,data:i}=await Mm(`/api/v1/status`+(t?`/refresh`:``),{method:t?`POST`:`GET`,headers:{"X-Gitifact-Session":e.sessionId},...n?{signal:n}:{}}),a=Ap.safeParse(i);if(!a.success)return Pm(i);if(!a.data.ok)throw new jm(a.data.error.message,a.data.error.code);if(!r.ok)throw new jm(N(`api.statusMismatch`),`INVALID_RESPONSE`);if(a.data.repository.key!==e.repository.key||a.data.repository.worktreeKey!==e.repository.worktreeKey)throw new jm(N(`api.otherCheckout`),`SESSION_CHANGED`);return a.data}var Rm=e=>ki({queryKey:Im(e),staleTime:5e3,retry:!1,queryFn:({signal:t})=>Lm(e,!1,t)}),zm=e=>Lm(e,!0);function Bm(){ke();let e=Oi(Fm());return e.data?(0,P.jsx)(Vm,{session:e.data}):(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:N(`project.local`)})}function Vm({session:e}){ke();let t=Oi(Rm(e)).data?.repository.rootPath;return(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:t?.split(/[\/]/).filter(Boolean).at(-1)??N(`project.local`)})}async function Q(e,t,n,r){let{response:i,data:a}=await Mm(t,{...r?{signal:r}:{},headers:{"X-Gitifact-Session":e.sessionId}});if(!i.ok)return Pm(a);let o=n.safeParse(a);if(!o.success)throw new jm(N(`api.invalidSpecs`),`INVALID_RESPONSE`);if(o.data.sessionId!==e.sessionId)throw new jm(N(`api.serverChanged`),`SESSION_CHANGED`);return o.data}var $=e=>[window.location.origin,e.sessionId,e.repository.worktreeKey],Hm=e=>ki({queryKey:[`browser-checkout`,2,...$(e)],staleTime:1/0,retry:!1,queryFn:({signal:t})=>Q(e,`/api/v1/checkout`,Hp,t)}),Um=[`browser-features`,`browser-feature`,`browser-contributors`,`browser-contributor`],Wm=(e,t)=>Ai({queryKey:[`browser-features`,1,...$(e),t],initialPageParam:void 0,staleTime:1/0,retry:!1,queryFn:({signal:n,pageParam:r})=>{let i=new URLSearchParams;for(let[e,n]of Object.entries(t))n&&i.set(e,n);return r&&i.set(`after`,r),Q(e,`/api/v1/features?`+i,Wp,n)},getNextPageParam:e=>e.next??void 0}),Gm=(e,t)=>ki({queryKey:[`browser-feature`,2,...$(e),t],staleTime:1/0,retry:!1,queryFn:({signal:n})=>Q(e,`/api/v1/feature?id=`+encodeURIComponent(t),Gp,n)}),Km=(e,t)=>Ai({queryKey:[`browser-contributors`,1,...$(e),t??``],initialPageParam:void 0,staleTime:1/0,retry:!1,queryFn:({signal:n,pageParam:r})=>{let i=new URLSearchParams;return t&&i.set(`q`,t),r&&i.set(`after`,r),Q(e,`/api/v1/contributors?`+i,Kp,n)},getNextPageParam:e=>e.next??void 0}),qm=(e,t)=>ki({queryKey:[`browser-contributor`,1,...$(e),t],staleTime:1/0,retry:!1,queryFn:({signal:n})=>Q(e,`/api/v1/contributor?email=`+encodeURIComponent(t),qp,n)}),Jm=e=>ki({queryKey:[`browser-stamp`,1,...$(e)],staleTime:0,gcTime:0,retry:!1,queryFn:({signal:t})=>Q(e,`/api/v1/stamp`,Sm,t)}),Ym=e=>ki({queryKey:[`browser-working`,1,...$(e)],staleTime:1/0,retry:!1,queryFn:({signal:t})=>Q(e,`/api/v1/working`,bm,t)}),Xm=(e,t)=>ki({queryKey:[`browser-working-change`,2,...$(e),t],staleTime:1/0,retry:!1,queryFn:({signal:n})=>Q(e,`/api/v1/working/change?id=`+encodeURIComponent(t),xm,n)}),Zm=(e,t,n,r=20)=>Ai({queryKey:[`browser-history`,7,...$(e),t,n,r],initialPageParam:void 0,staleTime:1/0,retry:!1,queryFn:({signal:i,pageParam:a})=>{let o=new URLSearchParams({head:t,limit:String(r)});a&&o.set(`after`,a);for(let[e,t]of Object.entries(n))t&&o.set(e,t);return Q(e,`/api/v1/history?`+o,tm,i)},getNextPageParam:e=>e.next??void 0}),Qm=(e,t)=>ki({queryKey:[`browser-history-summary`,5,...$(e),t],staleTime:1/0,retry:!1,queryFn:({signal:n})=>Q(e,`/api/v1/history/summary?head=`+t,nm,n)}),$m=(e,t,n)=>Ai({queryKey:[`browser-document-history`,1,...$(e),t,n],initialPageParam:void 0,staleTime:1/0,retry:!1,queryFn:({signal:r,pageParam:i})=>{let a=new URLSearchParams({head:t,id:n});return i&&a.set(`after`,i),Q(e,`/api/v1/document-history?`+a,_m,r)},getNextPageParam:e=>e.next??void 0}),eh=(e,t,n)=>Ai({queryKey:[`browser-commit`,4,...$(e),t,n??``],initialPageParam:void 0,staleTime:1/0,retry:!1,queryFn:({signal:r,pageParam:i})=>{let a=new URLSearchParams({commit:t});return n&&a.set(`record`,n),i&&a.set(`after`,i),Q(e,`/api/v1/commit?`+a,pm,r)},getNextPageParam:e=>e.next??void 0}),th=(e,t,n)=>ki({queryKey:[`browser-commit-change`,2,...$(e),t,n],staleTime:1/0,retry:!1,queryFn:({signal:r})=>Q(e,`/api/v1/commit/change?`+new URLSearchParams({commit:t,id:n}),hm,r)}),nh=(e,t,n)=>ki({queryKey:[`browser-record`,2,...$(e),t,n],staleTime:1/0,retry:!1,queryFn:({signal:r})=>Q(e,`/api/v1/record?head=`+t+`&id=`+encodeURIComponent(n),gm,r)}),rh=(e,t)=>Ai({queryKey:[`browser-commit-files`,2,...$(e),t],initialPageParam:void 0,staleTime:1/0,retry:!1,queryFn:({signal:n,pageParam:r})=>{let i=new URLSearchParams({commit:t});return r&&i.set(`after`,r),Q(e,`/api/v1/commit/files?`+i,dm,n)},getNextPageParam:e=>e.next??void 0}),ih=(e,t,n)=>ki({queryKey:[`browser-commit-file`,1,...$(e),t,n],staleTime:1/0,retry:!1,queryFn:({signal:r})=>Q(e,`/api/v1/commit/file?`+new URLSearchParams({commit:t,path:n}),fm,r)}),ah=(e,t)=>ki({queryKey:[`browser-commit-named`,1,...$(e),t],staleTime:1/0,retry:!1,queryFn:async({signal:n})=>{let r=(await Q(e,`/api/v1/search?`+new URLSearchParams({q:t,group:`commit`,limit:`2`}),am,n)).groups[0];return r?.total===1?r.hits[0]?.commit??null:null}});function oh(e,t,n,r){let i=new URLSearchParams({q:t});return r&&(i.set(`group`,r.group),i.set(`after`,r.after)),Q(e,`/api/v1/search?`+i,am,n)}var sh=(e,t)=>ki({queryKey:[`changelog`,1,window.location.origin,e.sessionId,t],staleTime:1/0,retry:!1,queryFn:async({signal:n})=>{let{response:r,data:i}=await Mm(`/api/v1/changelog?lang=`+t,{signal:n,headers:{"X-Gitifact-Session":e.sessionId}});if(!r.ok)return Pm(i);let a=Tm.safeParse(i);if(!a.success)throw new jm(N(`api.invalidChangelog`),`INVALID_RESPONSE`);return a.data}}),ch={contract:`browser-session`,version:3,sessionId:``,repository:{key:``,worktreeKey:``},cliVersion:`0.0.0`},lh=/^\.gitifact\//;function uh(){let e=Oi(Fm()),t=Oi({...Hm(e.data??ch),enabled:!1}),n=Oi({...Rm(e.data??ch),enabled:!!e.data&&!e.error}),r=t.data?.working,i=n.data?n.data.changes.some(e=>lh.test(e.path)):void 0;if(r!==void 0||i!==void 0)return!!r||!!i}var dh=e=>e.then(()=>void 0,()=>void 0);async function fh(e){let t=await e.ensureQueryData(Fm()).catch(()=>void 0);if(!t)return{};let n=await e.ensureQueryData(Hm(t)).catch(()=>void 0);return n?{session:t,checkout:n}:{session:t}}var ph=(0,M.createContext)(null);ph.displayName=`DialogContext`;function mh(){return(0,M.use)(ph)}function hh(e,t=16){let n=e.getBoundingClientRect(),r=n.left+n.width/2-window.innerWidth/2,i=n.top+n.height/2-window.innerHeight/2,a=Math.sqrt(r*r+i*i)||1;return{x:Math.round(r/a*t),y:Math.round(i/a*t)}}`${a[`--spacing-4`]}`,`${a[`--spacing-4`]}`,`${a[`--spacing-4`]}`,`${a[`--spacing-4`]}`,`${a[`--spacing-4`]}`,`${a[`--spacing-4`]}`;var gh={dialog:{kVAEAm:`xixxii4`,kogj98:`x1bpp3o7`,kmVPX3:`x1717udv`,kWkggS:`x10xzikg`,"--_dialog-radius":`xvuvksw`,kaIpWk:`xuacgfc`,kGVxlE:`x1kcpxr7`,k1xSpc:`x1s85apg`,kXwgrk:`xdt5ytf`,kZKoxP:`xg7h5cd`,kZeWKH:`xish69e`,kSiTet:`xg01cxk`,k44tkh:`xqgcaz`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},open:{k1xSpc:`x78zum5`,kSiTet:`x1hc1fzr`,kKVMdj:`x1ewfqum x1aquc0h`,$$css:!0},backdrop:{kGyWv1:`xnixb3f`,kba3nw:`x1abwkk1`,$$css:!0},fullscreen:{kzqmXN:`x1o6l61p`,kZKoxP:`xtdtrs8`,ks0D6T:`xlbgzzq`,kskxy:`x1wj9ous`,kaIpWk:`x2u8bby`,kogj98:`x1ghz6dp`,kpwlN0:`x10a8y8t`,$$css:!0},fullscreenOpen:{kKVMdj:`xqcmdr3 x1aquc0h`,$$css:!0},fullscreenSafeArea:{kLKAdn:`x15ld1ci`,kGO01o:`x1rgxemn`,kZCmMZ:`xqmdmw x1i7f2ot`,kwRFfy:`x1by8st6 xtjjor6`,$$css:!0},inner:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kUk6DE:`x12lumcd`,kAzted:`x2lwn1j`,kVQacm:`xb3r6kr`,kaIpWk:`x1pjcqnp`,$$css:!0},inlineWrapper:{kmVPX3:`x1717udv`,kWkggS:`x10xzikg`,"--_dialog-radius":`xvuvksw`,kaIpWk:`xuacgfc`,kGVxlE:`x1kcpxr7`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kZKoxP:`xg7h5cd`,kZeWKH:`xish69e`,$$css:!0}},_h=a[`--spacing-4`],vh=`min(100%, ${`calc(100dvw - ${_h} - ${_h})`})`;function yh(e){return typeof e==`number`?`${e}px`:e}function bh(e,t){return{width:yh(e),maxWidth:vh,maxHeight:yh(t)}}var xh={kogj98:`x1ghz6dp`,$$css:!0},Sh={sizing:(e,t,n)=>[{kzqmXN:e==null?e:`x5lhr3w`,ks0D6T:t==null?t:`xf68679`,kskxy:n==null?n:`x1jols5v`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-maxWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(t),"--x-maxHeight":(e=>typeof e==`number`?e+`px`:e??void 0)(n)}],position:(e,t,n,r)=>[xh,{k87sOh:e==null?e:`xjbys53`,kLqNvP:t==null?t:`x1lxsm33`,kt4wiu:n==null?n:`xqxgn94`,krVfgx:r==null?r:`x1nqzi6q`,$$css:!0},{"--x-top":(e=>typeof e==`number`?e+`px`:e??void 0)(e),"--x-insetInlineStart":(e=>typeof e==`number`?e+`px`:e??void 0)(t),"--x-insetInlineEnd":(e=>typeof e==`number`?e+`px`:e??void 0)(n),"--x-bottom":(e=>typeof e==`number`?e+`px`:e??void 0)(r)}]};function Ch(e){return typeof e==`number`?`${e}px`:e}function wh(e){let{top:t,bottom:n,start:r,end:i}=e;return{top:t===void 0?`auto`:Ch(t),bottom:n===void 0?`auto`:Ch(n),insetInlineStart:r===void 0?`auto`:Ch(r),insetInlineEnd:i===void 0?`auto`:Ch(i)}}function Th({isOpen:e,isInline:t=!1,onOpenChange:i,width:a=400,maxHeight:c=`75dvh`,position:l,variant:u=`standard`,purpose:p=`info`,padding:h,children:_,xstyle:v,className:x,style:C,ref:w,...T}){let E=h==null,D=h??4,te=n[D],ne=u===`fullscreen`,O=ne?null:bh(a,c),re=(0,M.useId)(),ie=(0,M.useMemo)(()=>({isInline:t,titleId:re}),[t,re]),ae=T[`aria-label`]!=null||T[`aria-labelledby`]!=null,oe=(0,M.useRef)(null),se=(0,M.useCallback)(e=>{oe.current=e,e&&!ae&&(e.querySelector(`#${CSS.escape(re)}`)==null?e.removeAttribute(`aria-labelledby`):e.setAttribute(`aria-labelledby`,re))},[re,ae]),ce=ee(w,se),k=(0,M.useRef)(null),A=p!==`required`,ue=p===`info`;(0,M.useEffect)(()=>{if(t)return;let n=oe.current;if(n){if(e){k.current=document.activeElement;let e=k.current;if(e&&e!==document.body){let t=hh(e);n.style.setProperty(`--dialog-dir-x`,`${t.x}px`),n.style.setProperty(`--dialog-dir-y`,`${t.y}px`)}else n.style.setProperty(`--dialog-dir-x`,`0px`),n.style.setProperty(`--dialog-dir-y`,`16px`);if(!n.open){n.showModal();let e=n.querySelector(`[data-autofocus]`);e&&e.focus()}}else n.open&&n.close(),k.current?.focus(),k.current=null}},[e,t]),he(e&&!t);let{shouldDismissOnCloseRequest:de}=b({isActive:e,isEnabled:!t,escapeBehavior:A?`close`:`block`,onDismiss:()=>{i(!1)}}),fe=(0,M.useRef)(!1);(0,M.useEffect)(()=>{let n=oe.current?.querySelector(`#${CSS.escape(re)}`)!=null;e&&!t&&!ae&&!n&&!fe.current&&(fe.current=!0)},[e,t,ae,re]);let j=e=>{e.target===e.currentTarget&&ue&&i(!1)},pe=e=>{e.preventDefault(),de()&&A&&i(!1)},me=(0,P.jsx)(`div`,{...r(gh.inner,...ge(E?{useThemeDefault:`dialog`,maxHeight:O?.maxHeight}:{paddingInnerX:te,paddingInnerY:te,paddingOuterX:te,paddingOuterY:te,maxHeight:O?.maxHeight}),!E&&D!==4&&g[D],!E&&D!==4&&d[D],!E&&D!==4&&s[D],!E&&D!==4&&m[D],ne&&E&&gh.fullscreenSafeArea),children:(0,P.jsx)(ph,{value:ie,children:_})}),_e=l!=null&&!ne,{open:ve,...ye}=T;return t?e?(0,P.jsx)(`div`,{...ye,...S(f(`dialog`,{variant:u}),r(gh.inlineWrapper,o.reset,O&&Sh.sizing(O.width,O.maxWidth,O.maxHeight),ne&&gh.fullscreen,v),x,C),"data-testid":T[`data-testid`],children:(0,P.jsx)(y,{children:me})}):null:(0,P.jsx)(`dialog`,{ref:ce,...ye,...S(f(`dialog`,{variant:u}),le.focusVisible(gh.dialog,o.reset,e&&gh.open,gh.backdrop,O&&Sh.sizing(O.width,O.maxWidth,O.maxHeight),_e&&(()=>{let e=wh(l);return Sh.position(e.top,e.insetInlineStart,e.insetInlineEnd,e.bottom)})(),ne&&gh.fullscreen,ne&&e&&gh.fullscreenOpen,v),x,C),onClick:j,onCancel:pe,"aria-modal":`true`,...p===`required`?{role:`alertdialog`}:void 0,children:(0,P.jsx)(y,{children:me})})}Th.displayName=`Dialog`;var Eh={footer:{kmuXW:`x2lah0s`,$$css:!0},inner:{kB7OPa:`x9f619`,ks0D6T:`xjl2t3p`,kUOVxO:`xvueqy4`,kZCmMZ:`x139j0dd`,kwRFfy:`xpc6k2p`,kLKAdn:`xqty4a`,kGO01o:`xon7vh3`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},divider:{kEafiO:`x178xt8z`,kPef9Z:`x13fuv20`,kLZC3w:`x1pc3f07`,$$css:!0}},Dh={sizing:e=>[{kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function Oh({children:e,hasDivider:t,height:n,label:i,padding:a,role:o,xstyle:c,className:l,style:u,ref:p,...h}){let _=(0,M.use)(Ni),v=t??_?.defaultHasDividers??!1,y=a===0;return(0,P.jsx)(`div`,{ref:p,role:o,"aria-label":i,"data-divider":v||void 0,...S(f(`layout-footer`),r(Eh.footer,Dh.sizing(n??null),v&&Eh.divider,c),l,u),...h,children:(0,P.jsx)(`div`,{...r(Eh.inner,y&&Eh.fullBleed,a!=null&&g[a],a!=null&&d[a],a!=null&&s[a],a!=null&&m[a]),children:e})})}Oh.displayName=`LayoutFooter`;function kh({isOpen:e,highlightedIndex:t,setHighlightedIndex:n,getOptionId:r,itemCount:i}){let a=(0,M.useRef)(!1),o=(0,M.useCallback)(e=>{e!==t&&(a.current=!0),n(e)},[t,n]);return(0,M.useEffect)(()=>{if(a.current){a.current=!1;return}!e||t<0||document.getElementById(r(t))?.scrollIntoView?.({block:`nearest`})},[e,t,r,i]),o}var Ah=1;function jh(e){let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t}function Mh({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:r,anchorRef:i}){let[a,o]=(0,M.useState)(0),[s,c]=(0,M.useState)(!1),l=(0,M.useCallback)((e,t)=>{o(e),c(t)},[]);return x(()=>{if(!e){l(0,!1);return}if(!r.current||!i.current){l(0,!0);return}let a=`${n}-item-${t>=0?t:0}`,o=document.getElementById(a);if(!o){l(0,!0);return}let s=r.current,c=i.current.getBoundingClientRect(),u=s.offsetHeight;if(u<=0){l(0,!0);return}let d=jh(o)-jh(s)-s.scrollTop+o.offsetHeight/2,f=c.top+c.height/2-d-Ah,p=window.innerHeight,m=Math.max(0,p-u),h=Math.min(Math.max(f,0),m),g=Math.max(0,c.bottom-h);l(g,!0)},[e,t,n,r,i,l]),{offset:a,isPositioned:s}}function Nh({selectableItems:e,value:t,isDisabled:n=!1,isOpen:r,hasSearch:i=!1,onOpen:a,onClose:o,onSelect:s,onClear:c,onSearchSeed:l,listboxId:u}){let[d,f]=(0,M.useState)(-1),p=(0,M.useCallback)(e=>`${u}-item-${e}`,[u]),m=(0,M.useCallback)(()=>e.map((e,t)=>e.disabled?-1:t).filter(e=>e>=0),[e]),h=(0,M.useCallback)(()=>e.findIndex(e=>e.value===t),[e,t]),g=(0,M.useCallback)(()=>{f(-1),o()},[o]),_=(0,M.useCallback)(e=>{e.disabled||(s?.(e.value),g())},[s,g]),v=(0,M.useCallback)(()=>{if(!n){if(r)g();else if(a()!==!1&&!i){let e=h();f(e>=0?e:0)}}},[n,r,a,g,h,i]),y=kh({isOpen:r,highlightedIndex:d,setHighlightedIndex:f,getOptionId:p}),b=(0,M.useCallback)((e,t)=>{e.disabled||y(t)},[y]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:p,onTriggerClick:v,onKeyDown:(0,M.useCallback)(o=>{if(n)return;let s=m();switch(o.key){case`ArrowDown`:if(o.preventDefault(),!r)a()!==!1&&f(0);else{let e=s.indexOf(d),t=Math.min(e+1,s.length-1);f(s[t]??d)}break;case`ArrowUp`:if(o.preventDefault(),!r)a()!==!1&&f(e.length-1);else{let e=s.indexOf(d),t=Math.max(e-1,0);f(s[t]??d)}break;case` `:if(i)break;case`Enter`:if(o.preventDefault(),r&&d>=0){let t=e[d];t&&!t.disabled&&_(t)}else if(!r&&a()!==!1&&!i){let e=h();f(e>=0?e:0)}break;case`Escape`:r&&(o.preventDefault(),g());break;case`Tab`:r&&g();break;case`Home`:o.preventDefault(),r&&s.length>0&&f(s[0]);break;case`End`:o.preventDefault(),r&&s.length>0&&f(s[s.length-1]);break;case`PageUp`:o.preventDefault(),r&&s.length>0&&f(s[0]);break;case`PageDown`:o.preventDefault(),r&&s.length>0&&f(s[s.length-1]);break;case`Delete`:case`Backspace`:!i&&!r&&c!=null&&t!=null&&(o.preventDefault(),c());break;default:i&&l&&o.key.length===1&&!o.ctrlKey&&!o.metaKey&&(r||a()!==!1)&&l(o.key)}},[n,r,a,g,e,d,_,h,m,i,c,l,t]),onItemSelect:_,onItemMouseEnter:b}}var Ph=(0,M.createContext)(null);Ph.displayName=`CommandPaletteContext`;function Fh(){return(0,M.use)(Ph)}var Ih={list:{kORKVm:`x1odjw0f`,kskxy:`xmz0i5r`,kmVPX3:`x9epnlk`,kUk6DE:`x98rzlu`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,$$css:!0}};function Lh({children:e,label:t,ref:n,xstyle:i,className:a,style:o,...s}){let c=k(),l=t??c(`@astryx.commandPalette.list.label`),u=Fh();return(0,P.jsx)(`div`,{ref:n,...s,id:u?.listId,role:`listbox`,"aria-label":l,...S(f(`command-palette-list`),r(Ih.list,i),a,o),children:e})}Lh.displayName=`CommandPaletteList`;var Rh={item:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,kg3NbH:`xrrkdod`,k8WAf4:`xce4md1`,kaIpWk:`xx3sua9`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,kfSwDN:`x87ps6o`,$$css:!0},itemHighlighted:{kWkggS:`x1lmrjuc`,$$css:!0},itemDisabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},itemSelected:{kWkggS:`xgcxg3y`,$$css:!0}};function zh({value:e,onSelect:t,isHighlighted:n,isSelected:i,isDisabled:a=!1,children:o,ref:s,xstyle:c,className:l,style:u,onClick:d,onMouseEnter:p,...m}){let h=Fh(),g=mh()?.isInline===!0,_=(0,M.useRef)(null),v=(0,M.useRef)(!1),y=(0,M.useMemo)(()=>h?.selectableItems.findIndex(t=>t.value===e)??-1,[h?.selectableItems,e]),b=n??(h?h.highlightedIndex===y&&y>=0:!1),x=i??(h?h.value===e:!1);(0,M.useEffect)(()=>{if(h)return;let e=g&&!v.current;v.current=!0,!e&&b&&_.current&&_.current.scrollIntoView?.({block:`nearest`})},[h,b,g]);let C=(0,M.useCallback)(()=>{a||(t?.(e),h&&(h.selectItem(e),h.onClose()))},[a,e,t,h]);return(0,P.jsx)(`div`,{ref:ee(s,_),...m,id:h&&y>=0?h.getItemId(y):void 0,role:`option`,"aria-selected":x,"aria-disabled":a||void 0,"data-value":e,onClick:Be(d,C),onMouseEnter:p,...S(f(`command-palette-item`),r(Rh.item,!a&&A.backgroundColor,b&&Rh.itemHighlighted,x&&Rh.itemSelected,a&&Rh.itemDisabled,c),l,u),children:o})}zh.displayName=`CommandPaletteItem`;var Bh={group:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,k8WAf4:`xu0wf1k`,$$css:!0}};function Vh({heading:e,children:t,ref:n,xstyle:i,className:a,style:o,...s}){return(0,P.jsxs)(`div`,{ref:n,role:`group`,"aria-label":e,...S(f(`command-palette-group`),r(Bh.group,i),a,o),...s,children:[(0,P.jsx)(`div`,{"aria-hidden":`true`,...S(f(`command-palette-group-heading`),{className:`xrrkdod xu0wf1k x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o`}),children:e}),t]})}Vh.displayName=`CommandPaletteGroup`;var Hh={wrapper:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kg3NbH:`x1pzlopt`,k8WAf4:`x8o8v82`,kmuXW:`x2lah0s`,$$css:!0}};function Uh({value:e,onValueChange:t,placeholder:n,label:i,hasAutoFocus:a=!0,endContent:o,onChange:s,onKeyDown:c,ref:l,xstyle:u,className:d,style:p,...m}){let h=k(),g=n??h(`@astryx.commandPalette.input.placeholder`),_=Fh(),v=mh(),y=(0,M.useRef)(null),b=e??_?.search,x=t??_?.setSearch,C=a&&v?.isInline!==!0;(0,M.useEffect)(()=>{C&&y.current&&requestAnimationFrame(()=>{y.current?.focus()})},[C]);let w=(0,M.useCallback)(e=>{c?.(e),!e.defaultPrevented&&_?.onKeyDown(e)},[_,c]);return(0,P.jsxs)(`div`,{...S(f(`command-palette-input`),r(Hh.wrapper,u),d,p),children:[(0,P.jsx)(`span`,{className:`x78zum5 x6s0dn4 x2lah0s xv1l7n4`,children:(0,P.jsx)(fe,{icon:`search`,size:`sm`,color:`inherit`})}),(0,P.jsx)(`input`,{ref:ee(l,y),type:`text`,role:`combobox`,"aria-expanded":_?.isOpen??!0,"aria-autocomplete":`list`,"aria-controls":_?.listId,"aria-activedescendant":_&&_.highlightedIndex>=0?_.getItemId(_.highlightedIndex):void 0,"aria-label":i??g,placeholder:g,value:b,"data-autofocus":C||void 0,onChange:e=>{x?.(e.target.value),s?.(e)},onKeyDown:w,className:`x98rzlu xeuugli x1a2a7pz xjbqb8w x1tgivj0 x9ynric xjm74w1 x6pjikd xw6l6zx x1717udv xeyghm5`,...m}),(_?.isBusy||o)&&(0,P.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw x2lah0s`,children:[_?.isBusy&&(0,P.jsx)(`span`,{className:`x78zum5 x6s0dn4 x2lah0s xv1l7n4 x1hc1fzr x19991ni xjd9b36 x5h36tt x4itv7f`,children:(0,P.jsx)(T,{size:`sm`})}),o]}),` `]})}Uh.displayName=`CommandPaletteInput`;var Wh={footer:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x18g69wz`,kg3NbH:`x1pzlopt`,k8WAf4:`xce4md1`,kmuXW:`x2lah0s`,kMv6JI:`x9ynric`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,kMwMTN:`xv1l7n4`,$$css:!0}};function Gh({children:e,ref:t,xstyle:n,className:i,style:a,...o}){let s=k();return(0,P.jsx)(`div`,{ref:t,...S(f(`command-palette-footer`),r(Wh.footer,n),i,a),...o,children:e??(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw`,children:[(0,P.jsx)(Xn,{keys:`up`}),(0,P.jsx)(Xn,{keys:`down`}),s(`@astryx.commandPalette.footer.navigate`)]}),(0,P.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw`,children:[(0,P.jsx)(Xn,{keys:`enter`}),s(`@astryx.commandPalette.footer.select`)]}),(0,P.jsxs)(`span`,{className:`x78zum5 x6s0dn4 xzye2dw`,children:[(0,P.jsx)(Xn,{keys:`escape`}),s(`@astryx.commandPalette.footer.close`)]})]})})}Gh.displayName=`CommandPaletteFooter`;var Kh={empty:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k8WAf4:`xmfvnks`,kg3NbH:`x1pzlopt`,kMv6JI:`x9ynric`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,kMwMTN:`xv1l7n4`,k9WMMc:`x2b8uid`,$$css:!0}};function qh({ref:e,children:t,xstyle:n,className:i,style:a,...o}){return(0,P.jsx)(`div`,{ref:e,...S(f(`command-palette-empty`),r(Kh.empty,n),i,a),...o,children:t})}qh.displayName=`CommandPaletteEmpty`;function Jh(e){let t=e.auxiliaryData;return typeof t?.group==`string`?t.group:void 0}function Yh(e){if(!e.some(e=>Jh(e)!=null))return e.map(e=>({value:e.id,label:e.label}));let t=[],n=new Map,r=[];for(let i of e){let e=Jh(i);e==null?r.push(i):(n.has(e)||(t.push(e),n.set(e,[])),n.get(e)?.push(i))}let i=[];for(let e of t)for(let t of n.get(e)??[])i.push({value:t.id,label:t.label});for(let e of r)i.push({value:e.id,label:e.label});return i}function Xh(e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n].value;t.has(r)||t.set(r,n)}return e=>t.get(e)}function Zh({items:e,value:t,renderItem:n}){let r=e=>(0,P.jsx)(zh,{value:e.id,children:n?n(e,e.id===t):e.label},e.id);if(!e.some(e=>Jh(e)!=null))return(0,P.jsx)(P.Fragment,{children:e.map(r)});let i=[],a=new Map,o=[];for(let t of e){let e=Jh(t);e==null?o.push(t):(a.has(e)||(i.push(e),a.set(e,[])),a.get(e)?.push(t))}return(0,P.jsxs)(P.Fragment,{children:[i.map(e=>(0,P.jsx)(Vh,{heading:e,children:(a.get(e)??[]).map(r)},e)),o.map(r)]})}function Qh({ref:e,isOpen:t,isInline:n,onOpenChange:r,searchSource:i,input:a,footer:o,renderItem:s,emptySearchText:c,emptyBootstrapText:l,value:u,onValueChange:d,label:f,width:p=640,maxHeight:m=480,...h}){let g=k(),_=f??g(`@astryx.commandPalette.label`),v=c??g(`@astryx.commandPalette.emptySearch`),y=l??g(`@astryx.commandPalette.emptyBootstrap`),b=(0,M.useId)(),[x,S]=(0,M.useState)(``),[C,w]=(0,M.useState)(``),[T,E]=(0,M.useState)([]),[ee,D]=(0,M.useTransition)(),[te,ne]=(0,M.useOptimistic)(x),[O,re]=(0,M.useOptimistic)(T),ie=ee,ae=(0,M.useRef)(0),oe=ce(),se=u??C,le=(0,M.useCallback)(e=>{u===void 0&&w(e),d?.(e)},[u,d]),A=(0,M.useMemo)(()=>Yh(O),[O]),ue=(0,M.useMemo)(()=>Xh(A),[A]),de=(0,M.useCallback)(()=>{ae.current++,S(``),E([]),u===void 0&&w(``),i.cancel?.(),oe(``),r(!1)},[r,i,u,oe]),fe=(0,M.useCallback)(e=>{le(e)},[le]),j=Nh({selectableItems:A,value:se,isOpen:!0,onOpen:()=>{},onClose:()=>{},onSelect:e=>{fe(e),de()},listboxId:b}),pe=(0,M.useCallback)(e=>{i.cancel?.();let t=++ae.current;D(async()=>{let r=e===``;if(r||oe(g(`@astryx.commandPalette.loading`)),!r&&T.length>0){let t=e.toLowerCase().trim();re(T.filter(e=>e.label.toLowerCase().includes(t)))}let a=r?i.bootstrap():i.search(e),o=await Promise.resolve(a);if(ae.current===t&&(S(e),re(o),E(o),r?oe(``):o.length===0?oe(g(`@astryx.commandPalette.noResultsFor`,{query:e})):oe(g(`@astryx.commandPalette.resultCount`,{count:o.length})),r&&se!=null&&se!==``)){let e=o.findIndex(e=>e.id===se);if(e>=0){if(n){let t=o[e];t&&j.onItemMouseEnter({value:t.id},e)}else j.setHighlightedIndex(e)}}})},[i,T,D,se,n,j,re,oe,g]),me=(0,M.useRef)(pe);me.current=pe,(0,M.useEffect)(()=>{t&&me.current(``)},[t]);let he=(0,M.useCallback)(e=>{if(e.key===`Escape`){e.preventDefault(),de();return}if(e.key===`Enter`){if(e.preventDefault(),j.highlightedIndex>=0&&j.highlightedIndex<A.length){let e=A[j.highlightedIndex];e&&!e.disabled&&(fe(e.value),de())}return}e.key!==` `&&j.onKeyDown(e)},[j,de,A,fe]),ge=(0,M.useCallback)(e=>{let t=e.target.closest?.(`[role="option"]`);if(!t||t.getAttribute(`aria-disabled`)===`true`)return;let n=t.getAttribute(`data-value`);if(n==null)return;let r=ue(n);r!==void 0&&j.onItemMouseEnter(A[r],r)},[j,A,ue]),_e=(0,M.useMemo)(()=>({search:te,setSearch:e=>{D(()=>{ne(e)}),pe(e)},value:se,setValue:le,listId:b,highlightedIndex:j.highlightedIndex,setHighlightedIndex:j.setHighlightedIndex,getItemId:j.getItemId,selectableItems:A,searchResults:O,selectItem:fe,onKeyDown:he,onClose:de,isOpen:t,isBusy:ie}),[te,ne,pe,se,le,b,j.highlightedIndex,j.setHighlightedIndex,j.getItemId,A,O,fe,he,de,t,ie]),ve=x===``&&O.length===0,ye=x!==``&&O.length===0,be;return be=ve?(0,P.jsx)(qh,{children:y}):ye?(0,P.jsx)(qh,{children:v}):(0,P.jsx)(Zh,{items:O,value:se,renderItem:s}),(0,P.jsx)(Th,{ref:e,isOpen:t,isInline:n,onOpenChange:e=>{e?r(!0):de()},width:p,maxHeight:m,purpose:`info`,"aria-label":_,...h,children:(0,P.jsx)(Ph,{value:_e,children:(0,P.jsx)(Wi,{defaultHasDividers:!0,header:(0,P.jsx)(qi,{hasDivider:!0,padding:0,children:a??(0,P.jsx)(Uh,{})}),content:(0,P.jsx)(Yi,{padding:0,children:(0,P.jsx)(Lh,{onMouseOver:ge,children:be})}),footer:(0,P.jsx)(Oh,{hasDivider:!0,padding:0,children:o??(0,P.jsx)(Gh,{})})})})})}Qh.displayName=`CommandPalette`;var $h=1e3,eg=100,tg={root:{kWkggS:`xprdx6m x1j0df82 x1o55y2u`,kSiTet:`xvpkmg4 x1tbh5bv`,$$css:!0},animate:{kILWW9:`xpz12be`,k44tkh:`xqgcaz`,ko0y90:`xa4qsjk`,kKVMdj:`xeuoslp x1aquc0h`,kyAemX:`x193epu2`,$$css:!0}},ng={0:{kaIpWk:`xwksslw`,$$css:!0},1:{kaIpWk:`xx3sua9`,$$css:!0},2:{kaIpWk:`xh6dtrn`,$$css:!0},3:{kaIpWk:`x1hviunn`,$$css:!0},4:{kaIpWk:`x1hviunn`,$$css:!0},none:{kaIpWk:`x2u8bby`,$$css:!0},rounded:{kaIpWk:`xjspbzw`,$$css:!0}},rg={kKxzle:`xvo38ju`,$$css:!0},ig={animationDelay:e=>[rg,{"--x-animationDelay":(e=>typeof e==`number`?e+`ms`:e??void 0)(`${$h+eg*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x5lhr3w`,kZKoxP:(typeof t==`number`?`${t}px`:t)==null?typeof t==`number`?`${t}px`:t:`x16ye13r`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e),"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof t==`number`?`${t}px`:t)}]};function ag({width:e=`100%`,height:t=`100%`,radius:n=3,index:i=0,"data-testid":a,xstyle:o,className:s,style:c,ref:l,...u}){return(0,P.jsx)(`div`,{ref:l,"aria-hidden":`true`,"data-testid":a,...S(f(`skeleton`),r(tg.root,tg.animate,ng[n],ig.dimensions(e,t),ig.animationDelay(i),o),s,c),...u})}ag.displayName=`Skeleton`;var og={empty:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M70%20167Q60%20121%2055%2077Q52%2061%2067%2062L97%2060Q105%2060%20113%2077L133%2077M209%2083L248%2081Q264%2080%20260%2096'/%3e%3cpath%20d='M72%20166Q77%20141%2084%20119Q88%20108%20100%20109L141%20108Q151%20105%20160%2097L251%2094Q267%2093%20261%20109L245%20170Q243%20179%20230%20180Q162%20183%2087%20183Q70%20182%2072%20166Z'/%3e%3cpath%20d='M115%20105Q142%2081%20164%2032Q195%2038%20231%2035Q224%2065%20205%2094M174%2055Q189%2056%20207%2059M164%2073L197%2077'/%3e%3cpath%20d='M39%20181Q41%20169%2038%20157M24%20184Q38%20181%2052%20183M38%20159Q20%20162%2018%20146Q33%20143%2038%20159ZM39%20154Q39%20140%2054%20137Q58%20150%2039%20154Z'/%3e%3cpath%20d='M128%2046L121%2039M143%2036L141%2027'%20stroke='%23a7ac93'/%3e%3cpath%20d='M91%20162L98%20141M99%20169L108%20139M110%20171L118%20148'%20stroke-width='1.2'%20opacity='.4'/%3e%3c/g%3e%3c/svg%3e`,search:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M207%20108Q215%2073%20192%2048Q176%2027%20144%2029Q112%2028%2092%2052Q71%2077%2079%20112Q87%20145%20119%20157Q155%20173%20185%20148Q197%20138%20202%20124'/%3e%3cpath%20d='M197%20101Q201%2073%20183%2053Q168%2037%20143%2038Q114%2036%2096%2060Q79%2084%2090%20114Q101%20143%20129%20149Q158%20157%20181%20137Q191%20128%20195%20118'/%3e%3cpath%20d='M195%20140Q208%20146%20218%20154M207%20128L230%20143M218%20154Q214%20164%20226%20174L263%20197Q279%20207%20288%20192Q296%20180%20282%20170L241%20144Q230%20136%20221%20147'/%3e%3cpath%20d='M69%20148Q52%20171%2032%20178Q69%20188%20109%20187L124%20169M208%2074Q215%2057%20233%2063Q257%2070%20256%2096Q256%20121%20236%20125M232%2062Q231%2052%20239%2045M242%2062L248%2053M226%2091L226%2092M242%2095L242%2096M231%20107Q236%20111%20241%20107'/%3e%3cpath%20d='M111%2060Q121%2049%20136%2047M64%2047L55%2042M75%2034L73%2025'%20stroke='%23a7ac93'/%3e%3cpath%20d='M233%20164L249%20174M233%20172L247%20181'%20stroke-width='1.2'%20opacity='.45'/%3e%3c/g%3e%3c/svg%3e`,"not-found":`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M30%2069Q29%2059%2039%2060L75%2059L93%2080Q95%20130%2093%20172Q65%20177%2030%20174Q27%20126%2030%2069ZM75%2060Q73%2069%2077%2078L92%2080M43%20101Q57%20100%2077%20104M44%20119L69%20120'/%3e%3cpath%20d='M114%20173Q110%20125%20114%2064Q131%2061%20155%2063L174%2083Q175%20124%20171%20175Q142%20173%20114%20173Z'%20stroke-dasharray='3%208'%20stroke='%23a0a98c'/%3e%3cpath%20d='M156%2064L155%2081L171%2084'%20stroke-dasharray='3%206'/%3e%3cpath%20d='M194%2067Q215%2069%20234%2075L251%2095L247%20122M192%2069L180%20165Q203%20173%20233%20176M235%2077L234%2094L249%2097M201%20108L230%20114M199%20125L220%20130'/%3e%3cpath%20d='M244%20147Q250%20125%20269%20128Q286%20132%20289%20159Q291%20182%20269%20186Q247%20187%20239%20168Q234%20156%20244%20155M267%20127Q266%20116%20275%20109M279%20129L287%20119M256%20152L256%20153M276%20154L276%20155M264%20168Q270%20172%20275%20166M256%20186L254%20191M274%20186L278%20191'/%3e%3cpath%20d='M135%2041L131%2032M150%2042L155%2032'%20stroke='%23a7ac93'/%3e%3c/g%3e%3c/svg%3e`,error:`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20320%20220'%3e%3cg%20fill='none'%20stroke='%2384927c'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='M25%20153Q45%20164%2072%20151M26%20159Q46%20174%2074%20158M74%20144Q76%20126%2087%20123M74%20159L88%20160M122%20101Q94%20101%2089%20131Q83%20156%20109%20169L122%20170M125%2097Q136%2092%20143%2099Q148%20134%20143%20176Q132%20181%20123%20174Q119%20135%20125%2097ZM134%20113L134%20128M134%20147L134%20161'/%3e%3cpath%20d='M203%20113Q191%20111%20187%20117Q185%20123%20202%20123M203%20152Q186%20148%20187%20156Q188%20161%20202%20160M207%2099Q213%2093%20223%2098Q227%20132%20223%20176Q212%20181%20204%20174Q201%20135%20207%2099ZM225%20105Q250%20108%20254%20134Q255%20161%20226%20169M254%20150Q276%20168%20298%20153M255%20158Q280%20176%20301%20160'/%3e%3cpath%20d='M173%20102L158%20133L174%20131L162%20161'%20stroke='%23b0a078'/%3e%3cpath%20d='M252%2093Q241%2076%20248%2061Q259%2041%20277%2048Q294%2058%20293%2082Q292%20101%20277%20109M264%2048Q264%2037%20273%2032M277%2048L285%2039M259%2073L259%2074M278%2077L278%2078M266%2090Q271%2094%20276%2089M269%20108Q252%20103%20249%20114'/%3e%3cpath%20d='M113%2072L108%2062M130%2069L135%2060'%20stroke='%23a7ac93'/%3e%3cpath%20d='M101%20146L104%20159M108%20146L111%20161'%20stroke-width='1.2'%20opacity='.4'/%3e%3c/g%3e%3c/svg%3e`};function sg({kind:e,compact:t=!1}){return(0,P.jsx)(`img`,{src:og[e],alt:``,"aria-hidden":`true`,width:320,height:220,style:{display:`block`,width:t?`10rem`:`min(18rem, 60vw)`,maxWidth:`100%`,height:`auto`}})}function cg({kind:e=`empty`,style:t,...n}){return(0,P.jsx)(Qn,{...n,icon:(0,P.jsx)(sg,{kind:e,compact:n.isCompact??!1}),style:{width:`100%`,minHeight:n.isCompact?void 0:`min(30rem, 65vh)`,...t}})}var lg=!1,ug=new Set,dg=()=>{ug.forEach(e=>e())};function fg(){lg||(lg=!0,dg())}function pg(){lg&&(lg=!1,dg())}function mg(e){e!==lg&&(lg=e,dg())}var hg=e=>(ug.add(e),()=>{ug.delete(e)}),gg=()=>(0,M.useSyncExternalStore)(hg,()=>lg),_g={palette:`_palette_483jg_3`,loading:`_loading_483jg_9`,loadingHeading:`_loadingHeading_483jg_10`,loadingRow:`_loadingRow_483jg_11`,row:`_row_483jg_14`,head:`_head_483jg_15`,hit:`_hit_483jg_19`,trigger:`_trigger_483jg_21`,oneLine:`_oneLine_483jg_28`,more:`_more_483jg_30`},vg=()=>({feature:N(`search.group.feature`),requirement:N(`search.group.requirement`),design:N(`search.group.design`),record:N(`search.group.record`),commit:N(`search.group.commit`),recent:N(`search.group.recent`)});function yg(e){if(e.kind===`record`)return{to:`/records/$recordId`,params:{recordId:e.id}};if(e.kind===`commit`)return{to:`/records/commits/$commit`,params:{commit:e.id}};let t={featureId:e.featureId??``};return e.kind===`requirement`?{to:`/features/$featureId`,params:t,search:{tab:`requirements`},hash:e.id}:e.kind===`design`?{to:`/features/$featureId`,params:t,search:{tab:`design`},hash:e.id}:{to:`/features/$featureId`,params:t}}function bg(e){return e.flatMap(e=>[...e.hits.map(t=>({id:t.kind+`:`+t.id,label:t.title,auxiliaryData:{group:vg()[e.group],kind:t.kind,where:t.where,line:t.line,target:yg(t)}})),...e.next?[{id:`more:`+e.group,label:N(`search.more`,{count:e.total-e.hits.length}),auxiliaryData:{group:vg()[e.group],kind:`more`,where:``,line:``,more:e.group}}]:[]])}function xg(e,t){if(!t)return e;let n=e.toLowerCase().indexOf(t);return n<0?e:(0,P.jsxs)(P.Fragment,{children:[e.slice(0,n),(0,P.jsx)(`mark`,{className:_g.hit,children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}var Sg={bootstrap:()=>[],search:()=>[]},Cg=e=>(0,P.jsxs)(cr,{gap:2,className:_g.loadingRow,"aria-hidden":`true`,children:[(0,P.jsx)(ag,{index:e,width:`${44-e*5}%`,height:`var(--spacing-5)`}),(0,P.jsx)(ag,{index:e,width:`${88-e*7}%`,height:`var(--spacing-3)`})]},e),wg=(e,t,n)=>(0,P.jsxs)(cr,{gap:0,"aria-hidden":`true`,children:[(0,P.jsx)(cr,{gap:0,className:_g.loadingHeading,children:(0,P.jsx)(ag,{index:e,width:t,height:`var(--spacing-3)`})}),n.map(Cg)]},e),Tg=()=>(0,P.jsxs)(cr,{gap:0,role:`status`,"aria-label":N(`search.loading`),"aria-busy":`true`,className:_g.loading,children:[wg(0,`4rem`,[0,1,2]),wg(1,`5.5rem`,[3,4])]}),Eg=()=>(0,P.jsx)(cg,{kind:`search`,isCompact:!0,title:N(`search.noMatch`),description:N(`search.noMatchDescription`)}),Dg=()=>(0,P.jsx)(cg,{kind:`empty`,isCompact:!0,title:N(`search.empty`),description:N(`search.emptyDescription`)}),Og=()=>(0,P.jsx)(Gh,{children:(0,P.jsxs)(lr,{gap:4,children:[(0,P.jsxs)(lr,{gap:2,children:[(0,P.jsx)(Xn,{keys:`up`}),(0,P.jsx)(Xn,{keys:`down`}),(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:N(`search.hint.move`)})]}),(0,P.jsxs)(lr,{gap:2,children:[(0,P.jsx)(Xn,{keys:`enter`}),(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:N(`search.hint.open`)})]}),(0,P.jsxs)(lr,{gap:2,children:[(0,P.jsx)(Xn,{keys:`escape`}),(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:N(`search.hint.close`)})]})]})});function kg(){ke();let e=gg();Hn([{keys:`mod+k`,onPress:fg,allowInInputs:!0}]);let t=Oi(Fm());return t.data?(0,P.jsx)(Ag,{session:t.data,isOpen:e}):(0,P.jsx)(Qh,{isOpen:e,onOpenChange:mg,searchSource:Sg,label:N(`search.label`),width:720,className:_g.palette,input:(0,P.jsx)(Uh,{placeholder:N(`search.placeholder`)}),footer:Og(),emptyBootstrapText:Tg(),emptySearchText:Tg()})}function Ag({session:e,isOpen:t}){ke();let n=vn(),r=(0,M.useRef)({query:``,groups:[]}),[i,a]=(0,M.useState)(!0),o=(0,M.useMemo)(()=>({bootstrap:async()=>{try{return bg((await oh(e,``)).groups)}catch{return[]}finally{a(!1)}},search:async(t,n)=>{let i=t.trim();if(!i)return[];if(i===r.current.query)return bg(r.current.groups);let a=await oh(e,i,n);return r.current={query:i,groups:a.groups},bg(a.groups)}}),[e]),s=(0,M.useRef)(``),c=(0,M.useRef)([]),l=(0,M.useRef)(o);l.current=o;let[u,d]=(0,M.useState)(!1),f=(0,M.useMemo)(()=>{let e,t,n=[],i=e=>{let t=n;n=[],d(!1);for(let n of t)n(e)};return{bootstrap:()=>l.current.bootstrap().then(e=>c.current=e),search:a=>new Promise(o=>{n.push(o),clearTimeout(e);let u=()=>{t?.abort();let e=t=new AbortController;l.current.search(a,e.signal).then(t=>{e.signal.aborted||(s.current=a.trim().toLowerCase(),i(c.current=t))}).catch(()=>{e.signal.aborted||i(c.current=[])})};a.trim()&&a.trim()===r.current.query?u():e=setTimeout(u,500)}),cancel:()=>{clearTimeout(e),t?.abort(),i(c.current)}}},[]),p=(0,M.useRef)(void 0),m=(0,M.useRef)(null),h=async t=>{let{query:n,groups:i}=r.current,a=i.find(e=>e.group===t);if(a?.next)try{let[o]=(await oh(e,n,void 0,{group:t,after:a.next})).groups;o&&(r.current={query:n,groups:i.map(e=>e.group===t?{...e,hits:[...e.hits,...o.hits],next:o.next}:e)})}catch{}p.current=void 0;let o=m.current;o&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`).set.call(o,n),o.dispatchEvent(new Event(`input`,{bubbles:!0})),o.focus())},g=e=>{if(!e)return;let t=e.auxiliaryData;if(t.more){p.current=t.more,h(t.more);return}let{to:r,params:i,search:a,hash:o}=t.target;pg(),n({to:r,params:i??{},search:a??{},...o?{hash:o}:{}})};return(0,P.jsx)(Qh,{isOpen:t,onOpenChange:e=>{(e||!p.current)&&mg(e)},searchSource:f,label:N(`search.label`),width:720,className:_g.palette,input:(0,P.jsx)(Uh,{ref:m,placeholder:N(`search.placeholder`),onKeyDown:e=>{if(e.key!==`Enter`||e.currentTarget.getAttribute(`aria-activedescendant`))return;let t=c.current[0];t&&(e.preventDefault(),g(t))},onChange:e=>{d(e.currentTarget.value.trim()!==``)}}),footer:Og(),emptySearchText:u?Tg():Eg(),emptyBootstrapText:i||u||p.current?Tg():Dg(),renderItem:e=>{let t=e.auxiliaryData;if(t.kind===`more`)return(0,P.jsx)(j,{type:`supporting`,color:`secondary`,className:_g.more,children:e.label});let n=s.current;return(0,P.jsxs)(cr,{gap:1,className:_g.row,children:[(0,P.jsxs)(lr,{gap:3,className:_g.head,children:[(0,P.jsx)(j,{weight:`semibold`,className:_g.oneLine,children:xg(e.label,n)}),(0,P.jsx)(j,{type:`supporting`,color:`secondary`,className:_g.oneLine,children:t.where})]}),t.line&&(0,P.jsx)(j,{type:`supporting`,color:`secondary`,className:_g.oneLine,children:xg(t.line,n)})]})},onValueChange:e=>{g(c.current.find(t=>t.id===e))}})}var jg=[[`path`,{d:`M17 17L21 21`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`0`}],[`path`,{d:`M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.5`,key:`1`}]];function Mg(){return ke(),(0,P.jsxs)(`button`,{type:`button`,className:_g.trigger,onClick:fg,"aria-label":N(`search.open`),"aria-keyshortcuts":`Meta+K Control+K`,children:[(0,P.jsx)(ur,{data:jg,size:16}),(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:N(`search.trigger`)}),(0,P.jsx)(Xn,{keys:`mod+k`})]})}var Ng=[[`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 Pg({size:e=16}){return(0,P.jsx)(ur,{data:Ng,size:e})}var Fg={bar:`_bar_r3105_2`,trail:`_trail_r3105_3`,crumb:`_crumb_r3105_4`,tools:`_tools_r3105_7`};function Ig({trail:e,actions:t}){return ke(),(0,P.jsxs)(lr,{as:`header`,"aria-label":N(`header.location`),gap:3,className:Fg.bar,children:[(0,P.jsxs)(lr,{as:`nav`,"aria-label":N(`header.trail`),gap:2,className:Fg.trail,children:[(0,P.jsx)(Pg,{}),(0,P.jsx)(Bm,{}),e.map((t,n)=>(0,P.jsxs)(M.Fragment,{children:[(0,P.jsx)(j,{type:`supporting`,color:`secondary`,children:`/`}),t.to&&n<e.length-1?(0,P.jsx)(Mn,{to:t.to,search:t.search??{},className:Fg.crumb,children:t.label}):(0,P.jsx)(j,{type:`supporting`,maxLines:1,children:t.label})]},n))]}),(0,P.jsxs)(lr,{gap:3,className:Fg.tools,children:[(0,P.jsx)(Mg,{}),t]})]})}export{Tr as $,st as $t,zm as A,Xt as At,Oi as B,_t as Bt,Wm as C,un as Ct,Qm as D,Jt as Dt,Jm as E,rn as Et,Yi as F,Ft,ai as G,tt as Gt,ui as H,xt as Ht,qi as I,Nt as It,Yr as J,bt as Jt,ei as K,vt as Kt,Wi as L,Rt as Lt,Im as M,Vt as Mt,Rm as N,Pt as Nt,Xm as O,en as Ot,jm as P,It as Pt,yr as Q,yt as Qt,Mi as R,Tt as Rt,Gm as S,dn as St,nh as T,tn as Tt,oi as U,ft as Ut,Di as V,Ct as Vt,ii as W,St as Wt,Gr as X,et as Xt,Jr as Y,pt as Yt,Wr as Z,ot as Zt,ah as _,Ln as _t,ag as a,Be as an,Er as at,Km as b,vn as bt,fh as c,Re as cn,Br as ct,sh as d,ke as dn,fr as dt,Xe as en,wr as et,Hm as f,Ae as fn,ur as ft,rh as g,Xn as gt,ih as h,Qn as ht,cg as i,Ge as in,vr as it,Fm as j,Zt as jt,Ym as k,Qt as kt,dh as l,Te as ln,Rr as lt,th as m,cr as mt,jg as n,Ye as nn,Cr as nt,Nh as o,ze as on,F as ot,Um as p,lr as pt,$r as q,it as qt,kg as r,Ve as rn,Sr as rt,Mh as s,N as sn,kr as st,Ig as t,Ze as tn,Fr as tt,uh as u,De as un,pr as ut,eh as v,Nn as vt,Zm as w,sn as wt,$m as x,_n as xt,qm as y,Mn as yt,ji as z,wt as zt};
|