getborg 0.0.119 → 0.0.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FetchHttpClient-C-jciW95.mjs → FetchHttpClient-DkBX_tvM.mjs} +814 -814
- package/dist/{FileSystem-NX0EtGtm.mjs → FileSystem-B8SvsKCB.mjs} +87 -18
- package/dist/{Mime-C6O17O_3.mjs → Mime-mwjBDTG5.mjs} +945 -945
- package/dist/{NodeHttpIncomingMessage-CylGKvlB.mjs → NodeHttpIncomingMessage-Caou0eJc.mjs} +3 -3
- package/dist/{NodeHttpServer-EarHJJzn.mjs → NodeHttpServer-CiwRW4qX.mjs} +7 -7
- package/dist/{NodePtyAdapter-C6ioPYk6.mjs → NodePtyAdapter-DCy0YCxP.mjs} +2 -2
- package/dist/{NodeServices-C18DO3cx.mjs → NodeServices-KA4IGVlf.mjs} +4 -4
- package/dist/{NodeSqliteClient-CWkKfsSo.mjs → NodeSqliteClient-y7W-gFvl.mjs} +3 -3
- package/dist/{NodeStream-1N7oXzTp.mjs → NodeStream-Cwt3mZYs.mjs} +2 -2
- package/dist/{SqlClient-Cusaqpaw.mjs → SqlClient-D-oF89aw.mjs} +2 -2
- package/dist/bin.mjs +29698 -21001
- package/dist/{borgTelemetryNode-CHLcRFOW.mjs → borgTelemetryNode-BTLPaUwA.mjs} +5 -5
- package/dist/client/.vite/manifest.json +396 -320
- package/dist/client/assets/{ArrowRight-CgvCTAzu.js → ArrowRight-D8u8fAtz.js} +2 -2
- package/dist/client/assets/{ArrowSquareOut-C1CwJQ7R.js → ArrowSquareOut-B_f6YUhV.js} +2 -2
- package/dist/client/assets/{ArrowsClockwise-CBwAQTtQ.js → ArrowsClockwise-DQYZ1Xbo.js} +2 -2
- package/dist/client/assets/{CaretLeft-Bk0n02vc.js → CaretLeft-CfrkuxuJ.js} +2 -2
- package/dist/client/assets/ChatMarkdown-Ch9PipMk.js +249 -0
- package/dist/client/assets/CircleNotch-BcVOnWaH.js +2 -0
- package/dist/client/assets/DesignWorkspace-CrijZIpE.js +3 -0
- package/dist/client/assets/DiffPanel-Bbs-arXF.js +2 -0
- package/dist/client/assets/DiffWorkerPoolProvider-B-AH2sbL.js +10 -0
- package/dist/client/assets/{DocxPreview-B7-febv_.js → DocxPreview-HXde7oD1.js} +4 -4
- package/dist/client/assets/FilePreviewPanel-DkspqFyX.js +2237 -0
- package/dist/client/assets/HtmlPreview-pfh_hRgS.js +2 -0
- package/dist/client/assets/{PdfPreview-W5mTp32l.js → PdfPreview-VSGe6F9I.js} +3 -3
- package/dist/client/assets/PptxPreview-CZZ5e7rI.js +3 -0
- package/dist/client/assets/PreviewPanel-C_WqPJu_.js +2 -0
- package/dist/client/assets/PullRequestCodeTab-DLajHhi9.js +6 -0
- package/dist/client/assets/PullRequestReactions-BJ4eU_08.js +12 -0
- package/dist/client/assets/{RightPanelResizeHandle-DBci-Ee2.js → RightPanelResizeHandle-XlC9gY5e.js} +2 -2
- package/dist/client/assets/VirtualizedFile-qiRlyNDc.js +2 -0
- package/dist/client/assets/XlsxPreview-BPtt3tW-.js +3 -0
- package/dist/client/assets/accountData-BKyjOPQm.js +16 -0
- package/dist/client/assets/assetUrls-33nMWFnF.js +2 -0
- package/dist/client/assets/assets-1BW7ZJgz.js +2 -0
- package/dist/client/assets/{browserHistoryStore-DLbnuO9R.js → browserHistoryStore-CEVJXGfr.js} +3 -3
- package/dist/client/assets/browserRecording-BavNt16V.js +2 -0
- package/dist/client/assets/clientAnalytics-ChPHl8_D.js +1 -0
- package/dist/client/assets/clientPersistenceStorage-CeJLSpQl.js +2 -0
- package/dist/client/assets/combobox-CQHB5X6j.js +2 -0
- package/dist/client/assets/composerMentionDrag-CdTT1rUK.js +2 -0
- package/dist/client/assets/designCanvas.logic-DduGt5E7.js +8 -0
- package/dist/client/assets/{designOpenFileContext-CCL9VKvQ.js → designOpenFileContext-CMKir5dG.js} +2 -2
- package/dist/client/assets/{diffFileContents-CgDa-z2d.js → diffFileContents-CHRsIT6_.js} +3 -3
- package/dist/client/assets/{empty-CLS3rXBc.js → empty-DUUjhkFh.js} +2 -2
- package/dist/client/assets/entities-BtD3_L53.js +2 -0
- package/dist/client/assets/followUpQueuePersistence-C_pFQCnT.js +1 -0
- package/dist/client/assets/{index-DnoL7z0M.js → index-DrITfTBh.js} +3 -3
- package/dist/client/assets/{input-BbliVf4z.js → input-CyCAHFxI.js} +2 -2
- package/dist/client/assets/{lib-CySB76JU.js → lib-BRpsbmNP.js} +2 -2
- package/dist/client/assets/main-Bi6AoLeM.js +167 -0
- package/dist/client/assets/main-C0iNAqq8.css +2 -0
- package/dist/client/assets/{pdf-CdULDwXT.js → pdf-C3xMIdpt.js} +2 -2
- package/dist/client/assets/popover-BXSj56CI.js +2 -0
- package/dist/client/assets/pptxDocument-BnTLF4HV.js +3 -0
- package/dist/client/assets/projectFilesQueryState-Cs5skZOc.js +2 -0
- package/dist/client/assets/queries-BevoHPqY.js +2 -0
- package/dist/client/assets/{scroll-area-BW5o0Izf.js → scroll-area-DAaT-DGF.js} +36 -36
- package/dist/client/assets/session-Dmu9Hk5C.js +68 -0
- package/dist/client/assets/spinner-K3N_kbJr.js +2 -0
- package/dist/client/assets/textarea-BT0tVWKM.js +2 -0
- package/dist/client/assets/{toggle-DwBa6pBo.js → toggle-Sui8J_p3.js} +2 -2
- package/dist/client/assets/toggle-group-BDgfPfOF.js +2 -0
- package/dist/client/assets/useSettings-GEQSU1F5.js +5 -0
- package/dist/client/assets/{useWorkspaceMutationRefresh-DLI4brDf.js → useWorkspaceMutationRefresh-ApasU6PB.js} +2 -2
- package/dist/client/assets/utils-ClZ5OxbV.js +30 -0
- package/dist/client/assets/xlsxDocument-SRKfhPKH.js +2 -0
- package/dist/client/index.html +1 -1
- package/dist/service-launcher.mjs +1 -1
- package/package.json +2 -2
- package/dist/client/assets/ChatMarkdown-6kh9qKYW.js +0 -249
- package/dist/client/assets/DesignWorkspace-DPuyt5mw.js +0 -3
- package/dist/client/assets/DiffPanel-DzRhendL.js +0 -2
- package/dist/client/assets/DiffWorkerPoolProvider-BU7l1oGv.js +0 -10
- package/dist/client/assets/FilePreviewPanel-B3x43muL.js +0 -2231
- package/dist/client/assets/HtmlPreview-DY3PT2FT.js +0 -2
- package/dist/client/assets/PptxPreview-B02U0OAE.js +0 -3
- package/dist/client/assets/PreviewPanel-DhzZlEWJ.js +0 -2
- package/dist/client/assets/PullRequestCodeTab-CoB5ByAD.js +0 -6
- package/dist/client/assets/PullRequestReactions-DVg6Hz1F.js +0 -12
- package/dist/client/assets/VirtualizedFile-Bz5fGbNr.js +0 -2
- package/dist/client/assets/XlsxPreview-8ACeuCsx.js +0 -3
- package/dist/client/assets/accountData-C4ZvicpJ.js +0 -16
- package/dist/client/assets/assetUrls-CbeTQh3H.js +0 -2
- package/dist/client/assets/browserRecording-DpmNgRt_.js +0 -2
- package/dist/client/assets/clientPersistenceStorage-BlYjZvCd.js +0 -2
- package/dist/client/assets/combobox-CByZwSML.js +0 -2
- package/dist/client/assets/composerMentionDrag-1fGsNlV_.js +0 -2
- package/dist/client/assets/designCanvas.logic-BaQE_ItM.js +0 -8
- package/dist/client/assets/entities-DPi_gbtI.js +0 -2
- package/dist/client/assets/main-Ck7oK5At.js +0 -161
- package/dist/client/assets/main-YscGsfgO.css +0 -2
- package/dist/client/assets/popover-CFDsW-_z.js +0 -2
- package/dist/client/assets/pptxDocument-Dh-M0DL5.js +0 -3
- package/dist/client/assets/projectFilesQueryState-CmtzaSrb.js +0 -2
- package/dist/client/assets/queries-DRotn4pk.js +0 -2
- package/dist/client/assets/session-D3Szkrpk.js +0 -67
- package/dist/client/assets/spinner-DHhZaoFg.js +0 -2
- package/dist/client/assets/textarea-5SMJbr7K.js +0 -5
- package/dist/client/assets/toggle-group-BU7-0DcW.js +0 -2
- package/dist/client/assets/utils-DgzD4MA_.js +0 -30
- package/dist/client/assets/xlsxDocument-BMNJtufK.js +0 -2
package/dist/client/assets/{designOpenFileContext-CCL9VKvQ.js → designOpenFileContext-CMKir5dG.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{y as t}from"./accountData-C4ZvicpJ.js";import{wo as n}from"./utils-DgzD4MA_.js";import{Er as r}from"./textarea-5SMJbr7K.js";var i=e(t(),1),a=typeof window<`u`?i.useLayoutEffect:i.useEffect;function o(e){let t=i.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ee(e,t,n={},r={}){i.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function s(e){let t=i.useRef(null);return i.useImperativeHandle(e,()=>t.current,[]),t}function c(e){let t=r();return i.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function l(e){let t=r(),n=c(),o=i.useRef(null);return a(()=>{o.current!==e&&(n(e),o.current=e)},[t,e,n]),null}var te=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z`}))]]),ne=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z`}))]]),u=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M200,164v8h12a12,12,0,0,1,0,24H200v12a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm100,8a40,40,0,0,1-40,40H112a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,168,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,144,180ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,57V80h23Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm72,108.53a8.18,8.18,0,0,1-8.25,7.47H192v16h15.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H192v15.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152.53ZM64,144H48a8,8,0,0,0-8,8v55.73A8.17,8.17,0,0,0,47.47,216,8,8,0,0,0,56,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,64,144Zm-.35,40H56V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,63.65,184ZM128,144H112a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,128,144Zm-.49,56H120V160h8a20,20,0,0,1,20,20.77C147.58,191.59,138.34,200,127.51,200Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,152a4,4,0,0,1-4,4H188v24h20a4,4,0,0,1,0,8H188v20a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h32A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm80,8a32,32,0,0,1-32,32H112a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h16A32,32,0,0,1,160,180Zm-8,0a24,24,0,0,0-24-24H116v48h12A24,24,0,0,0,152,180ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z`}))]]),d=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64ZM160,216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Z`}))]]),f=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,36H140V24a12,12,0,0,0-24,0V36H40A20,20,0,0,0,20,56V176a20,20,0,0,0,20,20H71l-16.4,20.5a12,12,0,0,0,18.74,15l28.4-35.5h52.46l28.4,35.5a12,12,0,0,0,18.74-15L185,196h31a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,136H44V60H212Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,56V176a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,136H40V56H216V176Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,42H134V24a6,6,0,0,0-12,0V42H40A14,14,0,0,0,26,56V176a14,14,0,0,0,14,14H83.52L59.31,220.25a6,6,0,0,0,9.38,7.5L98.88,190h58.24l30.19,37.75a6,6,0,0,0,9.38-7.5L172.48,190H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42Zm2,134a2,2,0,0,1-2,2H40a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,136H40V56H216V176Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,44H132V24a4,4,0,0,0-8,0V44H40A12,12,0,0,0,28,56V176a12,12,0,0,0,12,12H87.68l-26.8,33.5a4,4,0,1,0,6.24,5L97.92,188h60.16l30.8,38.5a4,4,0,0,0,6.24-5L168.32,188H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,132a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Z`}))]]),p=Object.defineProperty,m=Object.defineProperties,re=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,_=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ae=(e,t)=>{for(var n in t||={})g.call(t,n)&&_(e,n,t[n]);if(h)for(var n of h(t))ie.call(t,n)&&_(e,n,t[n]);return e},oe=(e,t)=>m(e,re(t)),v=(0,i.forwardRef)((e,t)=>i.createElement(n,oe(ae({ref:t},e),{weights:te})));v.displayName=`ArrowsOutSimple`;var y=Object.defineProperty,b=Object.defineProperties,x=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,T=(e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||={})C.call(t,n)&&T(e,n,t[n]);if(S)for(var n of S(t))w.call(t,n)&&T(e,n,t[n]);return e},D=(e,t)=>b(e,x(t)),O=(0,i.forwardRef)((e,t)=>i.createElement(n,D(E({ref:t},e),{weights:ne})));O.displayName=`DownloadSimple`;var k=Object.defineProperty,A=Object.defineProperties,j=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,F=(e,t,n)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||={})N.call(t,n)&&F(e,n,t[n]);if(M)for(var n of M(t))P.call(t,n)&&F(e,n,t[n]);return e},L=(e,t)=>A(e,j(t)),R=(0,i.forwardRef)((e,t)=>i.createElement(n,L(I({ref:t},e),{weights:u})));R.displayName=`FilePdf`;var z=Object.defineProperty,B=Object.defineProperties,V=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,G=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})U.call(t,n)&&G(e,n,t[n]);if(H)for(var n of H(t))W.call(t,n)&&G(e,n,t[n]);return e},q=(e,t)=>B(e,V(t)),J=(0,i.forwardRef)((e,t)=>i.createElement(n,q(K({ref:t},e),{weights:d})));J.displayName=`Monitor`;var Y=Object.defineProperty,se=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,Z=(e,t,n)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,de=(e,t)=>{for(var n in t||={})le.call(t,n)&&Z(e,n,t[n]);if(X)for(var n of X(t))ue.call(t,n)&&Z(e,n,t[n]);return e},fe=(e,t)=>se(e,ce(t)),Q=(0,i.forwardRef)((e,t)=>i.createElement(n,fe(de({ref:t},e),{weights:f})));Q.displayName=`Presentation`;var $=(0,i.createContext)(null);function pe(){return(0,i.useContext)($)}export{R as a,l as c,ee as d,a as f,J as i,c as l,pe as n,O as o,o as p,Q as r,v as s,$ as t,s as u};
|
|
2
|
-
//# sourceMappingURL=designOpenFileContext-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{y as t}from"./accountData-BKyjOPQm.js";import{Eo as n}from"./utils-ClZ5OxbV.js";import{Vt as r}from"./textarea-BT0tVWKM.js";var i=e(t(),1),a=typeof window<`u`?i.useLayoutEffect:i.useEffect;function o(e){let t=i.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ee(e,t,n={},r={}){i.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function s(e){let t=i.useRef(null);return i.useImperativeHandle(e,()=>t.current,[]),t}function c(e){let t=r();return i.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function l(e){let t=r(),n=c(),o=i.useRef(null);return a(()=>{o.current!==e&&(n(e),o.current=e)},[t,e,n]),null}var te=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,48V96a12,12,0,0,1-24,0V77l-39.51,39.52a12,12,0,0,1-17-17L179,60H160a12,12,0,0,1,0-24h48A12,12,0,0,1,220,48ZM99.51,139.51,60,179V160a12,12,0,0,0-24,0v48a12,12,0,0,0,12,12H96a12,12,0,0,0,0-24H77l39.52-39.51a12,12,0,0,0-17-17Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M117.66,138.34a8,8,0,0,1,0,11.32L83.31,184l18.35,18.34A8,8,0,0,1,96,216H48a8,8,0,0,1-8-8V160a8,8,0,0,1,13.66-5.66L72,172.69l34.34-34.35A8,8,0,0,1,117.66,138.34ZM208,40H160a8,8,0,0,0-5.66,13.66L172.69,72l-34.35,34.34a8,8,0,0,0,11.32,11.32L184,83.31l18.34,18.35A8,8,0,0,0,216,96V48A8,8,0,0,0,208,40Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,48V96a8,8,0,0,1-16,0V67.31l-50.34,50.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM106.34,138.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l50.35-50.34a8,8,0,0,0-11.32-11.32Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M212,48V96a4,4,0,0,1-8,0V57.66l-57.17,57.17a4,4,0,0,1-5.66-5.66L198.34,52H160a4,4,0,0,1,0-8h48A4,4,0,0,1,212,48ZM109.17,141.17,52,198.34V160a4,4,0,0,0-8,0v48a4,4,0,0,0,4,4H96a4,4,0,0,0,0-8H57.66l57.17-57.17a4,4,0,0,0-5.66-5.66Z`}))]]),ne=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z`}))]]),u=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M200,164v8h12a12,12,0,0,1,0,24H200v12a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm100,8a40,40,0,0,1-40,40H112a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,168,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,144,180ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,57V80h23Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,88H152V32Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm72,108.53a8.18,8.18,0,0,1-8.25,7.47H192v16h15.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H192v15.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152.53ZM64,144H48a8,8,0,0,0-8,8v55.73A8.17,8.17,0,0,0,47.47,216,8,8,0,0,0,56,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,64,144Zm-.35,40H56V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,63.65,184ZM128,144H112a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,128,144Zm-.49,56H120V160h8a20,20,0,0,1,20,20.77C147.58,191.59,138.34,200,127.51,200Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M220,152a4,4,0,0,1-4,4H188v24h20a4,4,0,0,1,0,8H188v20a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h32A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm80,8a32,32,0,0,1-32,32H112a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h16A32,32,0,0,1,160,180Zm-8,0a24,24,0,0,0-24-24H116v48h12A24,24,0,0,0,152,180ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z`}))]]),d=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,36H48A28,28,0,0,0,20,64V176a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V64A28,28,0,0,0,208,36Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-40,52a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,228Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,64V176a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208A16,16,0,0,1,224,64Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M232,64V176a24,24,0,0,1-24,24H48a24,24,0,0,1-24-24V64A24,24,0,0,1,48,40H208A24,24,0,0,1,232,64ZM160,216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,42H48A22,22,0,0,0,26,64V176a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V64A22,22,0,0,0,208,42Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V64A10,10,0,0,1,48,54H208a10,10,0,0,1,10,10Zm-52,48a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,224Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,40H48A24,24,0,0,0,24,64V176a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V64A24,24,0,0,0,208,40Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H208a8,8,0,0,1,8,8Zm-48,48a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,224Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M208,44H48A20,20,0,0,0,28,64V176a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V64A12,12,0,0,1,48,52H208a12,12,0,0,1,12,12Zm-56,48a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,224Z`}))]]),f=new Map([[`bold`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,36H140V24a12,12,0,0,0-24,0V36H40A20,20,0,0,0,20,56V176a20,20,0,0,0,20,20H71l-16.4,20.5a12,12,0,0,0,18.74,15l28.4-35.5h52.46l28.4,35.5a12,12,0,0,0,18.74-15L185,196h31a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,136H44V60H212Z`}))],[`duotone`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M224,56V176a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z`,opacity:`0.2`}),i.createElement(`path`,{d:`M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,136H40V56H216V176Z`}))],[`fill`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Z`}))],[`light`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,42H134V24a6,6,0,0,0-12,0V42H40A14,14,0,0,0,26,56V176a14,14,0,0,0,14,14H83.52L59.31,220.25a6,6,0,0,0,9.38,7.5L98.88,190h58.24l30.19,37.75a6,6,0,0,0,9.38-7.5L172.48,190H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42Zm2,134a2,2,0,0,1-2,2H40a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2Z`}))],[`regular`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,40H136V24a8,8,0,0,0-16,0V40H40A16,16,0,0,0,24,56V176a16,16,0,0,0,16,16H79.36L57.75,219a8,8,0,0,0,12.5,10l29.59-37h56.32l29.59,37a8,8,0,1,0,12.5-10l-21.61-27H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,136H40V56H216V176Z`}))],[`thin`,i.createElement(i.Fragment,null,i.createElement(`path`,{d:`M216,44H132V24a4,4,0,0,0-8,0V44H40A12,12,0,0,0,28,56V176a12,12,0,0,0,12,12H87.68l-26.8,33.5a4,4,0,1,0,6.24,5L97.92,188h60.16l30.8,38.5a4,4,0,0,0,6.24-5L168.32,188H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,132a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4Z`}))]]),p=Object.defineProperty,m=Object.defineProperties,re=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable,_=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ae=(e,t)=>{for(var n in t||={})g.call(t,n)&&_(e,n,t[n]);if(h)for(var n of h(t))ie.call(t,n)&&_(e,n,t[n]);return e},oe=(e,t)=>m(e,re(t)),v=(0,i.forwardRef)((e,t)=>i.createElement(n,oe(ae({ref:t},e),{weights:te})));v.displayName=`ArrowsOutSimple`;var y=Object.defineProperty,b=Object.defineProperties,x=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,T=(e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>{for(var n in t||={})C.call(t,n)&&T(e,n,t[n]);if(S)for(var n of S(t))w.call(t,n)&&T(e,n,t[n]);return e},D=(e,t)=>b(e,x(t)),O=(0,i.forwardRef)((e,t)=>i.createElement(n,D(E({ref:t},e),{weights:ne})));O.displayName=`DownloadSimple`;var k=Object.defineProperty,A=Object.defineProperties,j=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable,F=(e,t,n)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||={})N.call(t,n)&&F(e,n,t[n]);if(M)for(var n of M(t))P.call(t,n)&&F(e,n,t[n]);return e},L=(e,t)=>A(e,j(t)),R=(0,i.forwardRef)((e,t)=>i.createElement(n,L(I({ref:t},e),{weights:u})));R.displayName=`FilePdf`;var z=Object.defineProperty,B=Object.defineProperties,V=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,G=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||={})U.call(t,n)&&G(e,n,t[n]);if(H)for(var n of H(t))W.call(t,n)&&G(e,n,t[n]);return e},q=(e,t)=>B(e,V(t)),J=(0,i.forwardRef)((e,t)=>i.createElement(n,q(K({ref:t},e),{weights:d})));J.displayName=`Monitor`;var Y=Object.defineProperty,se=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,Z=(e,t,n)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,de=(e,t)=>{for(var n in t||={})le.call(t,n)&&Z(e,n,t[n]);if(X)for(var n of X(t))ue.call(t,n)&&Z(e,n,t[n]);return e},fe=(e,t)=>se(e,ce(t)),Q=(0,i.forwardRef)((e,t)=>i.createElement(n,fe(de({ref:t},e),{weights:f})));Q.displayName=`Presentation`;var $=(0,i.createContext)(null);function pe(){return(0,i.useContext)($)}export{R as a,l as c,ee as d,a as f,J as i,c as l,pe as n,O as o,o as p,Q as r,v as s,$ as t,s as u};
|
|
2
|
+
//# sourceMappingURL=designOpenFileContext-CMKir5dG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{v as t,y as n}from"./accountData-C4ZvicpJ.js";import{Bo as r,Lo as i,wo as a}from"./utils-DgzD4MA_.js";import{Zt as o}from"./session-D3Szkrpk.js";import{B as s,G as c,H as l,Hn as u,Mt as d,R as f,U as p,V as m,W as h,Yn as g,ar as _,jt as v,lr as y,mr as b,nr as x,or as S,pr as C,tr as w,ur as T,z as E}from"./scroll-area-BW5o0Izf.js";import{c as ee,n as D,o as O}from"./DiffWorkerPoolProvider-BU7l1oGv.js";import{r as k,t as A}from"./VirtualizedFile-Bz5fGbNr.js";var j=e(n(),1),M=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M100,28H64A20,20,0,0,0,44,48V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,100,28ZM96,204H68V52H96ZM192,28H156a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,192,28Zm-4,176H160V52h28Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M112,48V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,112,48Zm80-8H152a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8h40a8,8,0,0,0,8-8V48A8,8,0,0,0,192,40Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M120,48V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V48A16,16,0,0,1,64,32h40A16,16,0,0,1,120,48Zm72-16H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M104,34H64A14,14,0,0,0,50,48V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,104,34Zm2,174a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM192,34H152a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,192,34Zm2,174a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M104,36H64A12,12,0,0,0,52,48V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,104,36Zm4,172a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM192,36H152a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,192,36Zm4,172a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4Z`}))]]),te=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z`}))]]),N=Object.defineProperty,P=Object.defineProperties,F=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,z=(e,t,n)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||={})L.call(t,n)&&z(e,n,t[n]);if(I)for(var n of I(t))R.call(t,n)&&z(e,n,t[n]);return e},V=(e,t)=>P(e,F(t)),H=(0,j.forwardRef)((e,t)=>j.createElement(a,V(B({ref:t},e),{weights:M})));H.displayName=`Columns`;var ne=Object.defineProperty,U=Object.defineProperties,W=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,oe=(e,t,n)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,se=(e,t)=>{for(var n in t||={})ie.call(t,n)&&oe(e,n,t[n]);if(re)for(var n of re(t))ae.call(t,n)&&oe(e,n,t[n]);return e},ce=(e,t)=>U(e,W(t)),le=(0,j.forwardRef)((e,t)=>j.createElement(a,ce(se({ref:t},e),{weights:te})));le.displayName=`Rows`;function ue(e,t){return e.length>0&&e.every(e=>t.has(e))}function de(e,t){return ue(e,t)?new Set:new Set(e)}function fe(e,t){return e==null||t==null?e===t:e.header!==t.header||e.footer!==t.footer?!1:pe(e.items,t.items)}function pe(e,t){if(e==null||t==null)return e===t;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r==null||i==null||r.id!==i.id||r.type!==i.type||r.element!==i.element||r.version!==i.version)return!1}return!0}function me(e,t,n){let r=document.createElement(`div`);return r.style.display=`flow-root`,e===`header`?(r.setAttribute(x,``),t.before(r)):(r.setAttribute(w,``),t.after(r)),n?.observe(r),r}function he(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function G(e){let t=window.devicePixelRatio??1;return Math.round(e*t)/t}var ge=`theme.disableLineNumbers.overflow.themeType.disableFileHeader.disableVirtualizationBuffers.preferredHighlighter.useCSSClasses.useTokenTransformer.tokenizeMaxLineLength.tokenizeMaxLength.unsafeCSS.diffStyle.diffIndicators.disableBackground.expandUnchanged.loadDiffFiles.collapsedContextThreshold.lineDiffType.maxLineDiffLength.expansionLineCount.lineHoverHighlight.enableTokenInteractionsOnWhitespace.enableGutterUtility.__debugPointerEvents.enableLineSelection.controlledSelection.disableErrorHandling`.split(`.`),_e=[`theme`,`disableLineNumbers`,`overflow`,`themeType`,`disableFileHeader`,`disableVirtualizationBuffers`,`preferredHighlighter`,`useCSSClasses`,`useTokenTransformer`,`tokenizeMaxLineLength`,`tokenizeMaxLength`,`unsafeCSS`,`lineHoverHighlight`,`enableTokenInteractionsOnWhitespace`,`enableGutterUtility`,`__debugPointerEvents`,`enableLineSelection`,`controlledSelection`,`disableErrorHandling`],ve=new Set([`useTokenTransformer`,`enableGutterUtility`,`enableLineSelection`,`lineHoverHighlight`]),ye=[`renderCustomHeader`,`renderHeaderPrefix`,`renderHeaderFilenameSuffix`,`renderHeaderMetadata`,`renderAnnotation`,`renderGutterUtility`,`onPostRender`,`onGutterUtilityClick`,`onLineClick`,`onLineNumberClick`,`onLineEnter`,`onLineLeave`,`onTokenClick`,`onTokenEnter`,`onTokenLeave`],be=[`onLineSelected`,`onLineSelectionStart`,`onLineSelectionChange`,`onLineSelectionEnd`],xe=Symbol(`CodeView.itemOptionsState`);function Se(e,t){Object.defineProperty(e,xe,{configurable:!1,enumerable:!1,value:t})}function K(e){return e[xe]}function q(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get(){return n(this)}})}var Ce=120,we=`--diffs-overflow-override`,J=12e6,Te=1e6,Ee=2e6,De=J-Ee,Oe=J-Te,ke=(()=>{let{navigator:e}=globalThis,t=e.userAgent,n=/iP(?:hone|ad|od)/.test(t),r=e.platform===`MacIntel`&&e.maxTouchPoints>1;return(n||r)&&/AppleWebKit/.test(t)&&/Safari/.test(t)&&!/(CriOS|FxiOS|EdgiOS|OPiOS)/.test(t)})(),Ae=class e{static __STOP=!1;static __lastScrollPosition=0;type=`advanced`;config={overscrollSize:200,intersectionObserverMargin:0,resizeDebugging:!1};items=[];idToItem=new Map;selectedLines=null;itemEditors=new Map;attachedEditors=new Set;instanceToItem=new Map;layoutDirtyIndex;pendingLayoutReset;renderOptionsRevision=0;slotCoordinator;slotSnapshot;scrollListeners=new Set;scrollHeight=0;containerHeight=-1;scrollTop=0;scrollPageOffset=0;scrollDirty=!0;scrollInteractionFixTimer;pointerEventsDisabled=!1;codeOverflowFix=!1;height=0;heightDirty=!0;windowSpecs={top:0,bottom:0};renderState={scrollTop:-1,firstIndex:-1,lastIndex:-1,stickyHeight:0,stickyTop:-1,stickyBottom:-1};itemMetricsCache=_;fileOptionsPrototype;diffOptionsPrototype;pendingScrollTarget;pendingLayoutAnchor;shouldFixContainerFocus=!1;scrollAnimation;root;resizeObserver;container=document.createElement(`div`);stickyContainer=document.createElement(`div`);stickyOffset=document.createElement(`div`);header={element:void 0,render:void 0,height:0};footer={element:void 0,render:void 0,height:0};elementPool=[];elementPoolVersion=0;elementPoolTracker=new WeakMap;pendingElementPool=[];options;workerManager;isReadySubscription;isContainerManaged;constructor(e={theme:T},t,n=!1){this.options=e,this.computeMetricsCache(e.itemMetrics),this.fileOptionsPrototype=this.createFileOptionsPrototype(),this.diffOptionsPrototype=this.createDiffOptionsPrototype(),this.workerManager=t,this.isContainerManaged=n,this.stickyOffset.style.contain=`layout size`,this.stickyContainer.style.position=`sticky`,this.stickyContainer.style.width=`100%`,this.stickyContainer.style.contain=`layout style inline-size`,this.stickyContainer.style.isolation=`isolate`,this.stickyContainer.style.display=`flex`,this.stickyContainer.style.flexDirection=`column`}getLayout(){return this.options.layout??S}getItemTopOffset(){return this.getLayout().paddingTop+this.header.height}computeMetricsCache(e){return this.itemMetricsCache={hunkLineCount:e?.hunkLineCount??_.hunkLineCount,lineHeight:e?.lineHeight??_.lineHeight,diffHeaderHeight:e?.diffHeaderHeight??_.diffHeaderHeight,hunkSeparatorHeight:e?.hunkSeparatorHeight,spacing:e?.spacing??_.spacing,paddingTop:e?.paddingTop,paddingBottom:e?.paddingBottom},this.itemMetricsCache}getSmoothScrollSettings(){return this.options.smoothScrollSettings??y}shouldDisablePointerEvents(){return this.options.pointerEventsOnScroll!==!0}shouldValidateItemHeights(){return C&&this.options.__devOnlyValidateItemHeights===!0}validateRenderedItemHeight(e){if(!this.shouldValidateItemHeights()||e.element==null)return;let t=e.instance.getAdvancedStickySpecs();if(t==null)return;let n=t.height,r=e.element.getBoundingClientRect().height;n!==r&&console.error(`CodeView: reconciled item height does not match DOM height`,{id:e.item.id,type:e.type,index:e.index,version:e.version,expectedHeight:n,actualHeight:r,delta:r-n,stickyTopOffset:t.topOffset,virtualizedHeight:e.instance.getVirtualizedHeight(),top:e.top,scrollTop:this.getScrollTop(),windowSpecs:{...this.windowSpecs},element:e.element,instance:e.instance})}validateStickyContainerHeight(){if(!this.shouldValidateItemHeights())return;let{firstIndex:e,lastIndex:t,stickyHeight:n,stickyTop:r,stickyBottom:i}=this.renderState;if(e===-1||t===-1)return;let a=this.stickyContainer.getBoundingClientRect().height;Math.abs(a-n)<1||console.error(`CodeView: sticky container height does not match computed layout`,{computedStickyHeight:n,actualStickyHeight:a,delta:a-n,stickyTop:r,stickyBottom:i,firstIndex:e,lastIndex:t,firstStickySpecs:this.items[e]?.instance.getAdvancedStickySpecs(),lastStickySpecs:this.items[t]?.instance.getAdvancedStickySpecs(),scrollTop:this.getScrollTop(),scrollPageOffset:this.scrollPageOffset,windowSpecs:{...this.windowSpecs},stickyContainer:this.stickyContainer})}clearScrollInteractionTimer(){this.scrollInteractionFixTimer!=null&&(clearTimeout(this.scrollInteractionFixTimer),this.scrollInteractionFixTimer=void 0)}suspendScrollInteractions(){this.clearScrollInteractionTimer(),this.shouldDisablePointerEvents()&&!this.pointerEventsDisabled&&(this.stickyContainer.style.pointerEvents=`none`,this.pointerEventsDisabled=!0),ke&&!this.codeOverflowFix&&(this.stickyContainer.style.setProperty(we,`hidden`),this.codeOverflowFix=!0),this.scrollInteractionFixTimer=setTimeout(this.restoreScrollInteractions,Ce)}restoreScrollInteractions=()=>{this.clearScrollInteractionTimer(),this.pointerEventsDisabled&&=(this.stickyContainer.style.removeProperty(`pointer-events`),!1),this.codeOverflowFix&&=(this.stickyContainer.style.setProperty(we,`auto`),!1)};syncLayout(){let{gap:e,paddingBottom:t,paddingTop:n}=this.getLayout();this.stickyContainer.style.gap=`${e}px`,this.container?.style.setProperty(`margin-top`,`${n}px`),this.container?.style.setProperty(`margin-bottom`,`${t}px`)}reconcileHeaderFooterHosts(){let e=this.reconcileHost(`header`),t=this.reconcileHost(`footer`);return e||t}reconcileHost(e){let{root:t,container:n}=this;if(t==null||n==null)return!1;let r=e===`header`?this.header:this.footer,i=e===`header`?this.options.renderCodeViewHeader:this.options.renderCodeViewFooter;if(i==null)return r.element==null?!1:(this.resizeObserver?.unobserve(r.element),r.element.remove(),r.element=void 0,r.render=void 0,this.setHostHeight(r,0),!1);if(r.element!=null&&i===r.render)return!1;let a=r.element??me(e,n,this.resizeObserver);r.element=a;let o=i();return o==null?!this.isContainerManaged&&a.children.length>0&&(a.textContent=``):a.replaceChildren(o),r.render=i,!0}setHostHeight(e,t){e.height!==t&&(e.height=t,this.scrollDirty=!0)}measureMountedHosts(){this.header.element!=null&&this.setHostHeight(this.header,this.header.element.getBoundingClientRect().height),this.footer.element!=null&&this.setHostHeight(this.footer,this.footer.element.getBoundingClientRect().height)}setup(t){if(this.root!=null)throw Error(`CodeView.setup: already setup`);this.workerManager?.subscribeToThemeChanges(this),this.root=t,this.root.style.overflowAnchor=`none`,this.root.hasAttribute(`tabindex`)||(this.root.tabIndex=-1),this.container??=document.createElement(`div`),this.container.style.contain=`layout style`,this.syncLayout(),this.container.appendChild(this.stickyOffset),this.container.appendChild(this.stickyContainer),this.root.appendChild(this.container),this.scrollDirty=!0,this.heightDirty=!0,this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.stickyContainer),this.root.addEventListener(`scroll`,this.handleScroll,{passive:!0}),this.root.addEventListener(`wheel`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`touchstart`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`pointerdown`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`keydown`,this.clearPendingScroll,{passive:!0}),this.resizeObserver.observe(this.root),this.render(!0),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,this.scrollTo({type:`position`,position:e.__lastScrollPosition,behavior:`instant`})):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)}}reset(){m(this.computeRenderRangeAndEmit),this.clearReadySubscription(),this.restoreScrollInteractions(),this.cleanAllRenderedItems();for(let e of this.itemEditors.values())e.editor.cleanUp();this.itemEditors.clear(),this.attachedEditors.clear(),this.selectedLines=null,this.items.length=0,this.idToItem.clear(),this.instanceToItem.clear(),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,this.stickyContainer.textContent=``,this.stickyOffset.style.height=``,this.container?.style.removeProperty(`height`),this.containerHeight=-1,this.windowSpecs={top:0,bottom:0},this.pendingLayoutAnchor=void 0,this.shouldFixContainerFocus=!1,this.height=0,this.scrollTop=0,this.scrollPageOffset=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.resetRenderState(),this.isContainerManaged||this.flushSlotCoordinator()}cleanUp(){this.reset(),this.clearElementPool(),this.restoreScrollInteractions(),this.workerManager?.unsubscribeToThemeChanges(this),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleScroll),this.root?.removeEventListener(`wheel`,this.clearPendingScroll),this.root?.removeEventListener(`touchstart`,this.clearPendingScroll),this.root?.removeEventListener(`pointerdown`,this.clearPendingScroll),this.root?.removeEventListener(`keydown`,this.clearPendingScroll),this.root?.style.removeProperty(`overflow-anchor`),this.container?.remove(),this.stickyOffset.remove(),this.stickyContainer.remove(),this.stickyContainer.textContent=``,this.header.element?.remove(),this.header.element=void 0,this.header.render=void 0,this.header.height=0,this.footer.element?.remove(),this.footer.element=void 0,this.footer.render=void 0,this.footer.height=0,this.root=void 0,this.container=void 0}cleanAllRenderedItems(){if(this.renderState.firstIndex!==-1)for(let e=this.renderState.firstIndex;e<=this.renderState.lastIndex;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.cleanAllRenderedItems: Item does not exist at index: ${e}`);this.releaseRenderedItem(t)}}primeScrollTarget(e){e.type!==`position`&&this.idToItem.get(e.id)?.instance.primeHighlightCache()}getElementPoolLimit(){let e=this.getHeight()+this.config.overscrollSize*2,{diffHeaderHeight:t}=this.itemMetricsCache;return Math.max(8,Math.ceil(e/Math.max(t,10))+1)*(this.isContainerManaged?2:1)}acquireElement(){this.promotePendingPooledElements();let e=this.elementPool.pop();for(;e!=null&&!this.isElementPoolGenerationCurrent(e);)e=this.elementPool.pop();return e??=document.createElement(b),this.markElementPoolGenerationCurrent(e),e}releaseRenderedItem(e){let{element:t}=e;t!=null&&this.renderedItemOwnsFocus(t)&&(this.shouldFixContainerFocus=!0),e.instance.cleanUp(!0),this.attachedEditors.delete(e.item.id),e.element=void 0,t!=null&&(t.remove(),this.cleanElement(t),this.queueElementForPool(t))}renderedItemOwnsFocus(e){let{activeElement:t}=document;return t===e||e.contains(t)||e.shadowRoot?.activeElement!=null}fixContainerFocus(){this.shouldFixContainerFocus&&(this.shouldFixContainerFocus=!1,this.root?.focus({preventScroll:!0}))}cleanElement(e){let{shadowRoot:t}=e;if(t!=null)for(let e of Array.from(t.children))Fe(e)||e.remove();this.isContainerManaged||e.replaceChildren()}queueElementForPool(e){let t=this.getElementPoolLimit();!this.isElementPoolGenerationCurrent(e)||this.getElementPoolSize()>=t||(this.isElementClean(e)?this.elementPool.push(e):this.pendingElementPool.push(e))}promotePendingPooledElements(){if(this.pendingElementPool.length===0)return;let{pendingElementPool:e}=this;this.pendingElementPool=[];let t=this.getElementPoolLimit();for(let n of e)this.isElementPoolGenerationCurrent(n)&&this.isElementClean(n)&&this.elementPool.length<t?this.elementPool.push(n):this.isElementPoolGenerationCurrent(n)&&this.getElementPoolSize()<t&&this.pendingElementPool.push(n)}isElementClean(e){return e.childNodes.length===0}getElementPoolSize(){return this.elementPool.length+this.pendingElementPool.length}clearElementPool(){this.elementPool.length=0,this.pendingElementPool.length=0}invalidateElementPool(){this.elementPoolVersion++,this.clearElementPool()}markElementPoolGenerationCurrent(e){this.elementPoolTracker.set(e,this.elementPoolVersion)}isElementPoolGenerationCurrent(e){return this.elementPoolTracker.get(e)===this.elementPoolVersion}resolveEffectiveScrollBehavior(e,t){return he()?`instant`:e.behavior===`smooth-auto`?Math.abs(t-this.getScrollTop())<=this.getHeight()*10?`smooth`:`instant`:e.behavior??`instant`}scrollTo(e){if(this.root==null)return;let t=this.normalizeScrollTarget(e);if(t==null)return;let n=this.resolveScrollTargetTop(t);n!=null&&(this.primeScrollTarget(t),this.resolveEffectiveScrollBehavior(t,n)===`smooth`?this.scrollAnimation??={position:this.getScrollTop(),velocity:0,lastTimestamp:performance.now()}:this.scrollAnimation=void 0,this.suspendScrollInteractions(),this.pendingLayoutAnchor=void 0,this.pendingScrollTarget=t,this.render())}setSelectedLines(e,t){this.applySelectedLines(e,t)}getSelectedLines(){return this.selectedLines}clearSelectedLines(e){this.applySelectedLines(null,e)}getItem(e){return this.idToItem.get(e)?.item}getEditor(e){return this.itemEditors.get(e)?.editor}updateItem(e){let t=this.idToItem.get(e.id);return t==null?(console.error(`CodeView.updateItem: unknown item id "${e.id}"`),!1):this.syncItemRecord(t,e)?(this.markItemLayoutDirty(t),this.scrollDirty=!0,this.render(),this.syncSelection(),this.syncItemEditors(),!0):!1}updateItemId(e,t){if(e===t)return!0;let n=this.idToItem.get(e);if(n==null)return console.error(`CodeView.updateItemId: unknown item id "${e}"`),!1;if(this.idToItem.has(t))return console.error(`CodeView.updateItemId: duplicate item id "${t}"`),!1;this.idToItem.delete(e),n.item.id=t,this.idToItem.set(t,n),this.updateItemOptionsId(n.instance.options,t),this.selectedLines?.id===e&&(this.selectedLines={...this.selectedLines,id:t},this.options.onSelectedLinesChange?.(this.selectedLines));let r=this.itemEditors.get(e);return r!=null&&(r.state.id=t,this.itemEditors.delete(e),this.itemEditors.set(t,r),this.attachedEditors.delete(e)&&this.attachedEditors.add(t)),this.renamePendingScrollTarget(e,t),this.renamePendingLayoutAnchor(e,t),this.render(),!0}addItem(e){this.addItems([e])}addItems(e){this.appendItemsInternal(e),this.syncSelection(),this.syncItemEditors()}setItems(e){if(e.length===0){let e=[];for(let t of this.itemEditors.values()){let{lastChange:n}=t.state;n!=null&&e.push(n)}this.reset();for(let{item:t,file:n,lineAnnotations:r}of e)this.options.onItemEditComplete?.(t,n,r)}else this.items.length===0?this.appendItemsInternal(e):this.tryAppendItems(e)||this.reconcileItems(e);this.syncSelection(),this.syncItemEditors()}appendItemsInternal(e,t=!0){if(e.length===0)return;let n=this.getLayout(),r=this.items.length===0?0:this.scrollHeight+n.gap,i=r;for(let t=0;t<e.length;t++){let i=e[t];if(i==null)throw Error(`CodeView.appendItemsInternal: missing input item`);if(this.idToItem.has(i.id))throw Error(`CodeView.addItem: duplicate id "${i.id}"`);let a=this.createItem(i,this.items.length,r);this.items.push(a),this.idToItem.set(a.item.id,a),this.instanceToItem.set(a.instance,a),a.height=je(a),r+=a.height+n.gap}this.scrollHeight=r-n.gap,this.scrollDirty=!0,t&&(this.canSkipRenderForAppend(i)?this.syncContainerHeight():this.render())}canSkipRenderForAppend(e){return this.container!=null&&this.renderState.firstIndex!==-1&&this.pendingScrollTarget==null&&this.scrollAnimation==null&&this.layoutDirtyIndex==null&&e>this.windowSpecs.bottom}onThemeChange(){this.invalidateElementPool()}setOptions(e){if(e==null)return;this.capturePendingLayoutAnchor();let{options:t}=this,n=this.getLayout(),{itemMetricsCache:r}=this;Me(t,e)&&this.invalidateElementPool(),this.options=e;let i=this.computeMetricsCache(e.itemMetrics),a=!h(r,i),o=!h(n,this.getLayout());o&&this.syncLayout();let s=a||Ne(t,e);if(s){let n=this.pendingLayoutReset;this.pendingLayoutReset={metrics:a?i:n?.metrics,resetFileLayoutCache:!0,resetDiffLayoutCache:!0,includeEstimatedDiffHeights:n?.includeEstimatedDiffHeights===!0||a||Pe(t,e)}}(o||s)&&(this.markLayoutDirtyFromIndex(0),this.scrollDirty=!0),p(t,e)||this.renderOptionsRevision++,this.syncItemEditors();let c=t.renderCodeViewHeader!==e.renderCodeViewHeader||t.renderCodeViewFooter!==e.renderCodeViewFooter;!this.isContainerManaged&&(this.items.length>0||c)&&this.render()}capturePendingLayoutAnchor(){this.root==null||this.items.length===0||this.pendingScrollTarget!=null||(this.pendingLayoutAnchor=this.getScrollAnchor(this.getScrollTop()))}render(t=!1){e.__STOP||(t?(m(this.computeRenderRangeAndEmit),this.computeRenderRangeAndEmit()):l(this.computeRenderRangeAndEmit))}isReady(){let{workerManager:e}=this;return e==null||e.isInitialized()||e.getStats().workersFailed?(this.clearReadySubscription(),!0):(this.isReadySubscription??=e.subscribeToStatChanges(e=>{e.managerState!==`initialized`&&!e.workersFailed||(this.clearReadySubscription(),this.render(!0))}),e.getStats().managerState===`waiting`&&e.initialize().catch(()=>{}),!1)}clearReadySubscription(){this.isReadySubscription!=null&&(this.isReadySubscription(),this.isReadySubscription=void 0)}instanceChanged(e,t){let n=this.instanceToItem.get(e);if(n==null)throw Error(`CodeView.instanceChanged: An instance has changed that is not registered`);t&&this.markItemLayoutDirty(n),this.render()}getWindowSpecs(){return this.windowSpecs}getContainerElement(){return this.root}getHeaderElement(){return this.header.element}getFooterElement(){return this.footer.element}getRenderedItems(){let{firstIndex:e,lastIndex:t}=this.renderState;if(e===-1||t===-1||t<e)return[];let n=[];for(let r=e;r<=t;r++){let e=this.items[r];e?.element!=null&&(e.type===`diff`?n.push({id:e.item.id,type:`diff`,item:e.item,version:e.version,element:e.element,instance:e.instance}):n.push({id:e.item.id,type:`file`,item:e.item,version:e.version,element:e.element,instance:e.instance}))}return n}setSlotCoordinator(e){return e===this.slotCoordinator?!1:(this.slotCoordinator=e,this.slotSnapshot=void 0,!0)}getSlotSnapshot(e){return this.buildSlotSnapshot(e)}buildSlotSnapshot(e){let t=Be(this.getRenderedItems(),e),{element:n}=this.header,{element:r}=this.footer;if(!(t==null&&n==null&&r==null))return{items:t,header:n,footer:r}}subscribeToScroll(e){return this.scrollListeners.add(e),()=>{this.scrollListeners.delete(e)}}getLocalTopForInstance(e){let t=this.instanceToItem.get(e);if(t==null)throw Error(`CodeView.getLocalTopForInstance: unknown virtualized instance`);return t.top}getTopForItem(e){let t=this.idToItem.get(e);if(t!=null)return t.top+this.getItemTopOffset()}createItem(e,t,n){let{itemMetricsCache:r}=this;if(e.type===`diff`){let i=new D(this.createDiffOptions(e.id),this,r,this.workerManager,this.isContainerManaged);return{type:`diff`,item:e,version:e.version,index:t,top:n,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:i}}let i=new A(this.createFileOptions(e.id),this,r,this.workerManager,this.isContainerManaged);return{type:`file`,item:e,version:e.version,index:t,top:n,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:i}}applySelectedLines(e,t){let{selectedLines:n}=this;e==null&&n==null||e!=null&&n?.id===e.id&&s(n.range,e.range)||(n!=null&&n.id!==e?.id&&this.idToItem.get(n.id)?.instance.setSelectedLines(null,{notify:!1}),this.selectedLines=e,this.idToItem.get(e?.id??``)?.instance.setSelectedLines(e?.range??null,t))}syncSelection(){if(this.selectedLines==null)return;let e=this.idToItem.get(this.selectedLines.id);if(e==null){this.selectedLines=null;return}e.instance.setSelectedLines(this.selectedLines.range,{notify:!1})}isItemInEditMode(e){return this.options.createEditor!=null&&e.item.edit===!0&&e.item.collapsed!==!0}isReceiverEdited(e,t){let n=K(e);if(n==null)return!1;let r=this.getItemOptions(n,t);return r!=null&&this.isItemInEditMode(r)}attachItemEditor(e){let{id:t}=e.item,{createEditor:n}=this.options;if(n==null||e.element==null||this.attachedEditors.has(t)||!this.isItemInEditMode(e))return;let r=this.itemEditors.get(t);if(r==null){let e={id:t},i=n({onChange:(t,n)=>{let r=this.idToItem.get(e.id);r!=null&&(e.lastChange={item:r.item,file:t,lineAnnotations:n},this.options.onItemEditChange?.(r.item,t,n))}});if(i==null)return;r={editor:i,state:e},this.itemEditors.set(t,r)}this.selectedLines?.id===t&&this.applySelectedLines(null,{notify:!1}),r.editor.edit(e.instance),this.attachedEditors.add(t)}syncItemEditors(){if(this.itemEditors.size===0)return;let e=[];for(let[t,n]of this.itemEditors){let r=this.idToItem.get(t);if(r!=null&&this.isItemInEditMode(r))continue;n.editor.cleanUp(),this.itemEditors.delete(t),this.attachedEditors.delete(t);let i=r?.item??n.state.lastChange?.item;i?.type===`diff`&&(r!=null&&r.type===`diff`&&r.instance.completeEditSession()&&(this.markItemLayoutDirty(r),this.render()),O(i.fileDiff));let{lastChange:a}=n.state;a!=null&&e.push(r==null?a:{...a,item:r.item})}for(let{item:t,file:n,lineAnnotations:r}of e)this.options.onItemEditComplete?.(t,n,r)}renamePendingScrollTarget(e,t){let{pendingScrollTarget:n}=this;n==null||n.type===`position`||n.id!==e||(this.pendingScrollTarget={...n,id:t})}renamePendingLayoutAnchor(e,t){this.pendingLayoutAnchor?.id===e&&(this.pendingLayoutAnchor.id=t)}createFileOptionsPrototype(){let e={};for(let t of _e)ve.has(t)||q(e,t,()=>this.options[t]);q(e,`useTokenTransformer`,e=>this.isReceiverEdited(e,`file`)?!0:this.options.useTokenTransformer),q(e,`enableGutterUtility`,e=>this.isReceiverEdited(e,`file`)?!1:this.options.enableGutterUtility),q(e,`enableLineSelection`,e=>this.isReceiverEdited(e,`file`)?!1:this.options.enableLineSelection),q(e,`lineHoverHighlight`,e=>this.isReceiverEdited(e,`file`)?`disabled`:this.options.lineHoverHighlight),q(e,`stickyHeader`,()=>this.options.stickyHeaders),q(e,`collapsed`,e=>{let t=K(e);if(t!=null)return this.getItemOptions(t,`file`)?.item.collapsed});for(let t of ye)this.defineItemSharedCallback(e,`file`,t);for(let t of be)this.defineItemSelectionCallback(e,`file`,t);return e}createDiffOptionsPrototype(){let e={};for(let t of ge)ve.has(t)||q(e,t,()=>this.options[t]);q(e,`useTokenTransformer`,e=>this.isReceiverEdited(e,`diff`)?!0:this.options.useTokenTransformer),q(e,`enableGutterUtility`,e=>this.isReceiverEdited(e,`diff`)?!1:this.options.enableGutterUtility),q(e,`enableLineSelection`,e=>this.isReceiverEdited(e,`diff`)?!1:this.options.enableLineSelection),q(e,`lineHoverHighlight`,e=>this.isReceiverEdited(e,`diff`)?`disabled`:this.options.lineHoverHighlight),q(e,`stickyHeader`,()=>this.options.stickyHeaders),q(e,`hunkSeparators`,()=>this.options.hunkSeparators),q(e,`collapsed`,e=>{let t=K(e);if(t!=null)return this.getItemOptions(t,`diff`)?.item.collapsed});for(let t of ye)this.defineItemSharedCallback(e,`diff`,t);for(let t of be)this.defineItemSelectionCallback(e,`diff`,t);return e}createFileOptions(e){let t=Object.create(this.fileOptionsPrototype);return Se(t,{id:e}),t}createDiffOptions(e){let t=Object.create(this.diffOptionsPrototype);return Se(t,{id:e}),t}updateItemOptionsId(e,t){let n=K(e);if(n==null)throw Error(`CodeView.updateItemOptionsId: No valid state`);n.id=t}getItemOptions(e,t){let n=this.idToItem.get(e.id);if(!(n==null||n.type!==t))return n}defineItemSharedCallback(e,t,n){q(e,n,e=>{if(this.options[n]==null)return;let r=K(e);if(r==null)return;let i=r.callbackCache??={},a=i[n];return a??(a=((...e)=>{let i=this.getItemOptions(r,t);if(i==null)return;let a=this.options[n];return a?.(...e,i)}),i[n]=a),a})}defineItemSelectionCallback(e,t,n){q(e,n,e=>{if(this.options.enableLineSelection!==!0)return;let r=K(e);if(r==null)return;let i=this.getItemOptions(r,t);if(i!=null&&this.isItemInEditMode(i))return;let a=r.callbackCache??={},o=a[n];return o??(o=(e=>{let i=this.getItemOptions(r,t);if(i==null)return;let a=e==null?null:{id:i.item.id,range:e};this.options.controlledSelection!==!0&&(e!=null||this.selectedLines?.id===i.item.id)&&this.applySelectedLines(a,{notify:!1}),this.options.onSelectedLinesChange?.(a);let o=this.options[n];return o?.(e,i)}),a[n]=o),o})}markLayoutDirtyFromIndex(e){this.layoutDirtyIndex=Math.min(this.layoutDirtyIndex??e,e)}markItemLayoutDirty(e){if(this.items[e.index]!==e)throw Error(`CodeView.markItemLayoutDirty: unknown item id "${e.item.id}"`);this.markLayoutDirtyFromIndex(e.index)}tryAppendItems(e){if(e.length<=this.items.length)return!1;for(let t=0;t<this.items.length;t++){let n=this.items[t];if(n==null)throw Error(`CodeView.tryAppendItems: missing existing item`);let r=e[t];if(r==null||n.item.id!==r.id||n.type!==r.type)return!1}for(let t=0;t<this.items.length;t++){let n=this.items[t];if(n==null)throw Error(`CodeView.tryAppendItems: missing existing item`);let r=e[t];if(r==null)throw Error(`CodeView.tryAppendItems: append candidate missing prefix item`);this.syncItemRecord(n,r)&&this.markLayoutDirtyFromIndex(t)}return this.appendItemsInternal(e.slice(this.items.length),!1),this.scrollDirty=!0,this.render(),!0}reconcileItems(e){let{items:t,idToItem:n}=this,r=new Set(t),i=[],a=new Map,o=new Map,s;for(let c=0;c<e.length;c++){let l=e[c];if(l==null)throw Error(`CodeView.reconcileItems: missing input item`);if(a.has(l.id))throw Error(`CodeView.setItems: duplicate id "${l.id}"`);let u=n.get(l.id),d=u!=null&&u.type===l.type?u:this.createItem(l,c,0);d.index=c,u!=null&&u.type===l.type?(r.delete(u),this.syncItemRecord(d,l)&&(s=Math.min(s??c,c))):s=Math.min(s??c,c),t[c]!==d&&(s=Math.min(s??c,c)),i.push(d),a.set(l.id,d),o.set(d.instance,d)}for(let e=0;e<t.length;e++){let n=t[e];if(n==null||!r.has(n))continue;this.releaseRenderedItem(n);let a=Math.max(i.length-1,0);s=Math.min(s??a,a)}s!=null&&(this.items=i,this.idToItem=a,this.instanceToItem=o,this.renderState.firstIndex>=i.length?this.resetRenderState():this.renderState.lastIndex>=i.length&&(this.renderState.lastIndex=i.length-1),this.markLayoutDirtyFromIndex(s),this.scrollDirty=!0,this.render())}syncItemRecord(e,t){if(e.type!==t.type)throw Error(`CodeView.syncItemRecord: type mismatch for id "${t.id}"`);return e.version===t.version?!1:(e.item=t,e.version=t.version,e.renderedOptionsRevision=-1,!0)}getMaxScrollTopForHeight(e){let{paddingBottom:t,paddingTop:n}=this.getLayout();return Math.max(n+this.header.height+e+this.footer.height+t-this.getHeight(),0)}getMaxScrollTop(){return this.getMaxScrollTopForHeight(this.getScrollHeight())}shouldRebaseScroll(){return this.getMaxScrollTop()>Oe}getPagedScrollHeight(){return this.shouldRebaseScroll()?Math.min(this.getScrollHeight(),J):this.getScrollHeight()}getMaxPagedScrollTop(){return this.getMaxScrollTopForHeight(this.getPagedScrollHeight())}clampPagedScrollTop(e){let t=this.getMaxPagedScrollTop();return Math.max(0,Math.min(e,t))}clampScrollTop(e){let t=this.getMaxScrollTop();return Math.max(0,Math.min(e,t))}getMaxScrollPageOffset(){return Math.max(this.getMaxScrollTop()-this.getMaxPagedScrollTop(),0)}clampScrollPageOffset(e){let t=this.getMaxScrollPageOffset();return Math.max(0,Math.min(e,t))}resolveScrollPageWindow(e,t){let n=G(this.clampPagedScrollTop(t)),r=this.clampScrollPageOffset(e-n);return n=G(this.clampPagedScrollTop(e-r)),r=this.clampScrollPageOffset(e-n),{pagedScrollTop:n,scrollPageOffset:r}}resolvePagedScrollPosition(e){if(!this.shouldRebaseScroll())return{pagedScrollTop:this.clampPagedScrollTop(e),scrollPageOffset:0};let t=this.clampScrollPageOffset(this.scrollPageOffset),n=e-t,r=this.getMaxPagedScrollTop(),i=this.getMaxScrollPageOffset(),a=n>Oe&&t<i,o=n<Te&&t>0;return n<0||n>r||a||o?this.resolveScrollPageWindow(e,o?Math.min(De,r):Ee):{pagedScrollTop:G(this.clampPagedScrollTop(n)),scrollPageOffset:t}}needsScrollPageUpdate(e){let t=G(this.clampScrollTop(e)),{scrollPageOffset:n}=this.resolvePagedScrollPosition(t);return n!==this.scrollPageOffset}getPagedLayoutTop(e){return this.shouldRebaseScroll()?Math.max(e-this.scrollPageOffset,0):e}getStickyHeaderOffset(){return this.options.stickyHeaders===!0&&this.options.disableFileHeader!==!0?this.itemMetricsCache.diffHeaderHeight:0}getScrollTargetRect(e){let t=this.idToItem.get(e.id);if(t==null){console.warn(`CodeView.scrollTo: unknown item id "${e.id}"`);return}if(e.type===`item`)return{top:t.top,height:t.height};if(e.type===`range`){let n=this.getRangeScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve range ${Ie(e.range)} for item "${e.id}"`);return}return{top:t.top+n.top,height:n.height}}let n=this.getLineScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve line ${e.lineNumber} for item "${e.id}"`);return}return{top:t.top+n.top,height:n.height}}normalizeScrollTarget(e){if(e.type===`position`||e.align!==`nearest`)return e;let t=this.getScrollTargetRect(e);if(t==null)return;let n=e.offset??0,r=this.getItemTopOffset()+t.top,i=r+t.height,a=this.getScrollTop(),o=a+(e.type===`line`||e.type===`range`?this.getStickyHeaderOffset():0),s=a+this.getHeight();if(!(r-n<=o&&i+n>=s)){if(r-n<o)return{...e,align:`start`};if(i+n>s)return{...e,align:`end`}}}resolveScrollTargetTop(e){if(e.type===`position`){let t=this.clampScrollTop(e.position);return t===e.position?this.clampScrollTop(e.position-this.getStickyHeaderOffset()):t}let t=this.idToItem.get(e.id);if(t==null){console.warn(`CodeView.scrollTo: unknown item id "${e.id}"`);return}if(e.type===`item`)return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top,t.height,e.align,e.offset));if(e.type===`range`){let n=this.getRangeScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve range ${Ie(e.range)} for item "${e.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top+n.top,n.height,e.align,e.offset,this.getStickyHeaderOffset()))}let n=this.getLineScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve line ${e.lineNumber} for item "${e.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top+n.top,n.height,e.align,e.offset,this.getStickyHeaderOffset()))}resolveAlignedScrollPosition(e,t,n,r=0,i=0){e+=this.getItemTopOffset();let a=this.getHeight();return n===`center`&&t+r<a?e-(a-t)/2+r:n===`end`?e-(a-t)+r:e-i-r}getLineScrollPosition(e,t){return e.type===`diff`?e.instance.getLinePosition(t.lineNumber,t.side):e.instance.getLinePosition(t.lineNumber)}getRangeScrollPosition(e,t){let{range:n}=t,r=this.getLineScrollPosition(e,{type:`line`,id:t.id,lineNumber:n.start,side:n.side}),i=this.getLineScrollPosition(e,{type:`line`,id:t.id,lineNumber:n.end,side:n.endSide??n.side});if(r==null||i==null)return;let a=r.top,o=a+r.height,s=i.top,c=s+i.height,l=Math.min(a,s);return{top:l,height:Math.max(o,c)-l}}computeTargetScrollTopForFrame(e,t){if(this.pendingScrollTarget==null)return e;let n=this.resolveScrollTargetTop(this.pendingScrollTarget);if(n==null)return e;let{scrollAnimation:r}=this;return r==null?n:this.computeSpringStep(r,n,t).position}computeSpringStep(e,t,n){let r=Math.max(0,n-e.lastTimestamp),{omega:i}=this.getSmoothScrollSettings(),a=Math.exp(-i*r),o=e.position-t,s=e.velocity+i*o;return{position:t+(o+s*r)*a,velocity:(s*(1-i*r)-i*o)*a}}advanceScrollAnimation(e,t){if(this.pendingScrollTarget==null)return;let n=this.resolveScrollTargetTop(this.pendingScrollTarget);if(n==null){this.pendingScrollTarget=void 0,this.scrollAnimation=void 0;return}let r=this.scrollAnimation;if(r==null)return n;r.position+=t;let{position:i,velocity:a}=this.computeSpringStep(r,n,e);r.lastTimestamp=e,r.position=i,r.velocity=a;let{positionEpsilon:o,velocityEpsilon:s}=this.getSmoothScrollSettings();return Math.abs(n-i)<=o&&Math.abs(a)<=s?(r.position=n,r.velocity=0,this.scrollAnimation=void 0,n):r.position}computeRenderRangeAndEmit=(t=performance.now())=>{if(e.__STOP||this.container==null||!this.isReady())return;let n=this.getHeight(),r=this.getScrollTop(),i=r,a=this.pendingLayoutAnchor!=null,o=this.getScrollAnchor(i);if(this.layoutDirtyIndex!=null&&(this.recomputeLayout(this.layoutDirtyIndex,this.pendingLayoutReset),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,a=!0),a&&o!=null){let e=this.resolveAnchoredScrollTop(o);if(e!=null){let t=e-i;i=e,this.scrollAnimation!=null&&(this.scrollAnimation.position+=t)}}a&&(i=this.clampScrollTop(i),this.syncContainerHeight());let s=this.computeTargetScrollTopForFrame(i,t),c=!a&&(this.renderState.scrollTop===-1||Math.abs(s-this.renderState.scrollTop)>n+this.config.overscrollSize*2);c&&(o=void 0),this.windowSpecs=E({scrollTop:s-this.header.height,height:n,scrollHeight:this.getScrollHeight(),fitPerfectly:c,fitPerfectlyOverscroll:this.getFitPerfectlyOverscroll(),overscrollSize:this.config.overscrollSize});let l=r;(this.pendingScrollTarget!=null&&s!==l||this.needsScrollPageUpdate(s))&&(this.applyScrollFix(s,l,this.windowSpecs),l=s);let{top:u,bottom:d}=this.windowSpecs,{firstIndex:f,lastIndex:p}=this.renderState;if(f>=0)for(let e=f;e<=p;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.computeRenderRangeAndEmit: No item at index: ${e}`);t.top>u-t.height&&t.top<=d||this.releaseRenderedItem(t)}let m=this.reconcileHeaderFooterHosts(),h,g=new Set,_=this.findFirstVisibleIndex(u),v=this.findLastVisibleIndex(d);for(let e=_;e<=v;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.computeRenderRangeAndEmit: missing item`);let{instance:n}=t;t.element==null?(t.element=this.acquireElement(),Re(this.stickyContainer,t.element,h),n.virtualizedSetup(),Y(t,t.element)&&(t.renderedOptionsRevision=this.renderOptionsRevision,g.add(t)),h=t.element):(Re(this.stickyContainer,t.element,h),Y(t,void 0,t.renderedOptionsRevision!==this.renderOptionsRevision)&&(t.renderedOptionsRevision=this.renderOptionsRevision,g.add(t)),h=t.element),t.item.edit===!0&&this.attachItemEditor(t)}this.renderState.firstIndex=_<=v?_:-1,this.renderState.lastIndex=v,this.flushSlotCoordinator(),this.flushManagers(g),m&&this.measureMountedHosts(),this.reconcileRenderedItems(g),this.syncContainerHeight(),this.updateStickyPositioning();let y=o==null?void 0:this.resolveAnchoredScrollTop(o);o===this.pendingLayoutAnchor&&(this.pendingLayoutAnchor=void 0);let b=y==null?0:y-i,x=s,S=!1;if(this.pendingScrollTarget!=null){let e=this.advanceScrollAnimation(t,b);e==null?x=i:(x=e,S=!0)}else x=y??s;x!==l&&(this.applyScrollFix(x,l,this.windowSpecs),l=x),S&&this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.renderState.scrollTop=G(l),this.updateStickyPositioning(),this.validateStickyContainerHeight(),this.fixContainerFocus(),(c||this.scrollAnimation!=null)&&this.render()};flushManagers(e){for(let t of e)t.instance.flushManagers()}syncContainerHeight(){let e=this.getPagedScrollHeight();this.container==null||this.containerHeight===e||(this.container.style.height=`${e}px`,this.containerHeight=e)}getStickyBounds(e){let{firstIndex:t,lastIndex:n}=e==null?this.renderState:{firstIndex:this.findFirstVisibleIndex(e.top),lastIndex:this.findLastVisibleIndex(e.bottom)};if(t===-1||n===-1||t>n)return;let r=this.items[t]?.instance.getAdvancedStickySpecs(e),i=this.items[n]?.instance.getAdvancedStickySpecs(e);if(!(r==null||i==null))return{stickyTop:this.getPagedLayoutTop(Math.max(r.topOffset,0)),stickyBottom:this.getPagedLayoutTop(i.topOffset+i.height)}}applyStickyPositioning({stickyTop:e,stickyBottom:t}){let n=this.getHeight(),{itemMetricsCache:r}=this,i=t-e;this.renderState.stickyHeight=i,this.renderState.stickyTop=e,this.renderState.stickyBottom=t,this.stickyOffset.style.height=`${e}px`;let a=(Math.random()*r.lineHeight>>0)*-1,o=-Math.max(i+a,0)+n;this.stickyContainer.style.top=`${o}px`,this.stickyContainer.style.bottom=`${o+r.diffHeaderHeight}px`}syncPagedScrollScaffolding(e){this.syncContainerHeight();let t=this.getStickyBounds(e);t!=null&&this.applyStickyPositioning(t)}reconcileRenderedItems(e){let{firstIndex:t,lastIndex:n}=this.renderState;if(t===-1)return;let r=-1,i=!1;for(let a=t;a<this.items.length&&!(!i&&a>n);a++){let t=this.items[a];if(t==null)throw Error(`CodeView.reconcileRenderedItems: Invalid item`);r===-1?r=t.top:t.top!==r&&(t.top=r,t.instance.syncVirtualizedTop(),i=!0),(e==null?a<=n:e.has(t))&&(t.instance.reconcileHeights()&&(i=!0,t.height=t.instance.getVirtualizedHeight()),this.validateRenderedItemHeight(t)),r+=t.instance.getVirtualizedHeight(),a<this.items.length-1&&(r+=this.getLayout().gap)}i&&r!=null&&(this.scrollDirty=!0,this.scrollHeight=r)}updateStickyPositioning(){let e=this.getStickyBounds();if(e==null)return;let{stickyTop:t,stickyBottom:n}=e;n-t===this.renderState.stickyHeight&&t===this.renderState.stickyTop&&n===this.renderState.stickyBottom||this.applyStickyPositioning(e)}handleScroll=()=>{e.__STOP||(this.suspendScrollInteractions(),this.scrollDirty=!0,this.notifyScroll(),this.render())};clearPendingScroll=()=>{this.pendingScrollTarget=void 0,this.pendingLayoutAnchor=void 0,this.scrollAnimation=void 0};handleResize=e=>{for(let t of e)if(t.target===this.stickyContainer){if(t.borderBoxSize[0].blockSize!==this.renderState.stickyHeight){let e=this.getScrollTop(),t=this.getScrollAnchor(e);this.reconcileRenderedItems(),this.updateStickyPositioning();let n=t==null?void 0:this.resolveAnchoredScrollTop(t);if(n!=null){let t=n-e;this.applyScrollFix(n,e,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=t)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0)}}else if(t.target===this.header.element||t.target===this.footer.element){let e=t.target===this.header.element?this.header:this.footer,n=t.borderBoxSize[0].blockSize;if(n!==e.height){let t=this.getScrollTop(),r=this.getScrollAnchor(t);this.setHostHeight(e,n);let i=r==null?void 0:this.resolveAnchoredScrollTop(r);if(i!=null){let e=i-t;this.applyScrollFix(i,t,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=e)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.render()}}else this.scrollDirty=!0,this.heightDirty=!0,this.render()};getScrollAnchorViewportTop(e,t){return e<t?t+this.getStickyHeaderOffset():t}getScrollAnchor(e){if(this.pendingLayoutAnchor!=null)return this.pendingLayoutAnchor;if(e<=0)return;let{firstIndex:t,lastIndex:n,stickyTop:r,stickyBottom:i}=this.renderState;if(t===-1||n===-1)return;let a=this.getHeight();if(!(r===-1||i===-1))for(let r=t;r<=n;r++){let t=this.items[r];if(t==null)continue;let n=this.getItemTopOffset()+t.top;if(n+t.height<=e)continue;if(n>=e+a)break;if(n>=e)return{type:`item`,id:t.item.id,viewportOffset:n-e};let i=this.getScrollAnchorViewportTop(n,e)-n,o=t.instance.getNumericScrollAnchor(i);if(o!=null){let r=n+o.top;return{type:`line`,id:t.item.id,lineNumber:o.lineNumber,side:o.side,viewportOffset:r-e}}}}resolveAnchoredScrollTop(e){let t=this.idToItem.get(e.id);if(t==null)return;let n=this.getItemTopOffset();if(e.type===`item`){let r=n+t.top;return this.clampScrollTop(r-e.viewportOffset)}let r=t.type===`diff`?t.instance.getLinePosition(e.lineNumber,e.side):t.instance.getLinePosition(e.lineNumber);if(r==null)return;let i=n+t.top+r.top;return this.clampScrollTop(i-e.viewportOffset)}applyScrollFix(e,t,n){if(this.root==null)return;let r=G(this.clampScrollTop(e)),i=G(t),{scrollPageOffset:a}=this,o=G(this.clampPagedScrollTop(i-a)),{pagedScrollTop:s,scrollPageOffset:c}=this.resolvePagedScrollPosition(r),l=s,u=a!==c;r===this.renderState.scrollTop&&r===i&&l===o&&!u||(this.suspendScrollInteractions(),(l!==o||u)&&(this.scrollPageOffset=c,this.syncPagedScrollScaffolding(n)),l!==o&&this.root.scrollTo({top:l,behavior:`instant`}),this.renderState.scrollTop=r,this.scrollTop=r,this.scrollDirty=!1)}isPendingTargetSettled(e){let t=this.resolveScrollTargetTop(e);return t==null?!0:G(this.getScrollTop())===G(t)}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root?.scrollTop??0;return this.scrollTop=this.clampScrollTop(e+this.scrollPageOffset),this.scrollTop}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root?.getBoundingClientRect().height??0,this.height):this.height}getScrollHeight(){return this.scrollHeight}flushSlotCoordinator(){if(this.slotCoordinator==null)return;let e=this.buildSlotSnapshot(this.slotCoordinator);fe(this.slotSnapshot,e)||(this.slotSnapshot=e,this.slotCoordinator.onSnapshotChange(e))}notifyScroll(){if(this.scrollListeners.size===0)return;let e=this.getScrollTop();for(let t of this.scrollListeners)t(e,this)}findFirstVisibleIndex(e){let t=0,n=this.items.length-1,r=this.items.length;for(;t<=n;){let i=t+n>>1,a=this.items[i];if(a==null)throw Error(`CodeView.findFirstVisibleIndex: invalid item index`);a.top+a.height>e?(r=i,n=i-1):t=i+1}return r}findLastVisibleIndex(e){let t=0,n=this.items.length-1,r=-1;for(;t<=n;){let i=t+n>>1,a=this.items[i];if(a==null)throw Error(`CodeView.findLastVisibleIndex: invalid item index`);a.top<=e?(r=i,t=i+1):n=i-1}return r}recomputeLayout(e=0,t){if(this.items.length===0){this.scrollHeight=0;return}let n=this.getLayout(),r=0;if(e>0){let t=this.items[e-1];if(t==null)throw Error(`CodeView.recomputeLayout: invalid dirty index`);r=t.top+t.height+n.gap}for(let i=e;i<this.items.length;i++){let e=this.items[i];if(e==null)throw Error(`CodeView.recomputeLayout: invalid item index`);if(e.top=r,e.type===`diff`){let n=e.instance.consumeCodeViewLayoutChanges(e.item.fileDiff);n!=null&&Object.assign(e.item.fileDiff,n),e.height=e.instance.prepareCodeViewItem(e.item.fileDiff,r,t,e.item.annotations??[])}else e.height=e.instance.prepareCodeViewItem(e.item.file,r,t,e.item.annotations??[]);r+=e.height,i<this.items.length-1&&(r+=n.gap)}r!==this.scrollHeight&&(this.scrollDirty=!0),this.scrollHeight=r}resetRenderState(){this.renderState.scrollTop=-1,this.renderState.firstIndex=-1,this.renderState.lastIndex=-1,this.renderState.stickyHeight=0,this.renderState.stickyTop=-1,this.renderState.stickyBottom=-1}getFitPerfectlyOverscroll(){return this.getLayout().gap+this.itemMetricsCache.diffHeaderHeight}};function je(e){return e.instance.cleanUp(!0),e.type===`diff`?e.instance.prepareCodeViewItem(e.item.fileDiff,e.top,void 0,e.item.annotations??[]):e.instance.prepareCodeViewItem(e.item.file,e.top,void 0,e.item.annotations??[])}function Me(e,t){return!v(e.theme??T,t.theme??T)||(e.themeType??`system`)!==(t.themeType??`system`)||e.unsafeCSS!==t.unsafeCSS}function Ne(e,t){return(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS||(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function Pe(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function Fe(e){return e instanceof SVGElement?!0:f(e)&&(e.hasAttribute(`data-core-css`)||e.hasAttribute(`data-theme-css`)||e.hasAttribute(`data-unsafe-css`))}function Ie(e){let t=Le(e.start,e.side),n=Le(e.end,e.endSide??e.side);return t===n?t:`${t}-${n}`}function Le(e,t){return t==null?`${e}`:`${t===`deletions`?`D`:`A`}${e}`}function Y(e,t,n=!1){return e.type===`diff`?e.instance.render({deferManagers:!0,fileContainer:t,fileDiff:e.item.fileDiff,forceRender:n,lineAnnotations:e.item.annotations??[]}):e.instance.render({deferManagers:!0,fileContainer:t,file:e.item.file,forceRender:n,lineAnnotations:e.item.annotations??[]})}function Re(e,t,n){if(n==null){e.firstChild!==t&&e.prepend(t);return}n.nextSibling!==t&&n.after(t)}function ze(e){return(e.annotations?.length??0)>0}function Be(e,{hasHeaderRenderers:t,hasAnnotationRenderer:n,hasGutterRenderer:r}){if(e.length===0)return;if(t||r)return e;if(!n)return;let i=[];for(let t of e)ze(t.item)&&i.push(t);return i.length>0?i:void 0}var X=e(i(),1),Z=r(),Ve=typeof window>`u`?j.useEffect:j.useLayoutEffect;function He(e){return{instance:void 0,items:void 0,controlled:e,managedOptions:void 0,disableFlushSync:!1,slotCoordinator:void 0}}function Ue(e,t){let{className:n,containerRef:r,createEditor:i,disableWorkerPool:a=!1,initialItems:o,items:s,onItemEditChange:l,onItemEditComplete:u,onScroll:f,onSelectedLinesChange:m,options:h,renderAnnotation:g,renderCodeViewFooter:_,renderCodeViewHeader:v,renderCustomHeader:y,renderGutterUtility:b,renderHeaderFilenameSuffix:x,renderHeaderMetadata:S,renderHeaderPrefix:C,selectedLines:w,style:T}=e,E=s!==void 0,ee=(0,j.useContext)(c),D=(0,j.useRef)(He(E)),O=y!=null,k=g!=null,A=b!=null,M=O||C!=null||x!=null||S!=null,te=M||k||A,N=v!=null,P=_!=null,F=d(e=>{m?.(e)}),I=w!==void 0,L=d(e=>i?.(e)),R=d((e,t,n)=>{l?.(e,t,n)}),z=d((e,t,n)=>{u?.(e,t,n)}),B=(0,j.useMemo)(()=>Je({options:h,hasCustomHeader:O,hasGutterRenderer:A,hasCodeViewHeader:N,hasCodeViewFooter:P,onSelectedLinesChange:m==null?void 0:F,controlledSelection:I,createEditor:i==null?void 0:L,onItemEditChange:l==null?void 0:R,onItemEditComplete:u==null?void 0:z}),[h,O,A,N,P,m,F,I,i,L,l,R,u,z]),[V]=(0,j.useState)(()=>qe()),[,H]=(0,j.useState)({}),ne=d(e=>{D.current.instance!=null&&(e==null||e!==D.current.instance.getContainerElement())&&(D.current.instance.cleanUp(),V.publish(void 0),D.current=He(E)),e!=null&&e!==D.current.instance?.getContainerElement()&&(D.current.instance=new Ae(B,a?void 0:ee,!0),D.current.instance.setup(e)),typeof r==`function`?r(e):r!=null&&(r.current=e)}),U=d(e=>{D.current.disableFlushSync?V.publish(e):(0,X.flushSync)(()=>{V.publish(e)})}),W=(0,j.useMemo)(()=>{if(!(!M&&!k&&!A&&!N&&!P))return{hasHeaderRenderers:M,hasAnnotationRenderer:k,hasGutterRenderer:A,onSnapshotChange:U}},[U,k,A,M,N,P]);return Ve(()=>f==null?void 0:D.current.instance?.subscribeToScroll(f)),Ve(()=>{let{instance:e,controlled:t,items:n,managedOptions:r,slotCoordinator:i}=D.current;if(e!=null)try{D.current.disableFlushSync=!0;let a=!1;if(p(B,r)||(D.current.managedOptions=B,e.setOptions(B),a=!0),t!==E){console.error(`CodeView: cannot switch between controlled and uncontrolled modes. Remount with a new key instead.`);return}if(E)s!==n&&(Ke(n,s)?D.current.items=s:Ge(n,s)?(D.current.items=s,e.addItems(s.slice(n.length))):(D.current.items=s,e.setItems(s),a=!0));else if(n==null){let t=o??[];D.current.items=t,t.length>0&&(e.setItems(t),a=!0)}w!==void 0&&e.setSelectedLines(w,{notify:!1});let c=e.setSlotCoordinator(W),l=!1;W!==i&&((W==null||i==null)&&(l=!0),D.current.slotCoordinator=W),(a||c)&&e.render(!0),c&&W==null&&V.publish(void 0),l&&H({})}finally{D.current.disableFlushSync=!1}}),(0,j.useImperativeHandle)(t,()=>({addItems(e){let{controlled:t,instance:n}=D.current;Q(t,`addItems`),n==null?console.error(`CodeView.addItems: no valid instance to append items with`,e):n.addItems(e)},getItem(e){let{instance:t}=D.current;if(t==null){console.error(`CodeView.getItem: no valid instance exists`,e);return}else return t.getItem(e)},updateItem(e){let{controlled:t,instance:n}=D.current;return Q(t,`updateItem`),n==null?(console.error(`CodeView.updateItem: no valid instance to update item with`,e),!1):n.updateItem(e)},updateItemId(e,t){let{controlled:n,instance:r}=D.current;return Q(n,`updateItemId`),r==null?(console.error(`CodeView.updateItemId: no valid instance to update item id with`,e,t),!1):r.updateItemId(e,t)},scrollTo(e){let{instance:t}=D.current;t==null?console.error(`CodeView.scrollTo: no valid instance to scroll with`,e):t.scrollTo(e)},setSelectedLines(e){let{instance:t}=D.current;t==null?console.error(`CodeView.setSelectedLines: no valid instance to update selection with`,e):(t.setSelectedLines(e,{notify:!1}),F(e))},getSelectedLines(){let{instance:e}=D.current;return e==null?(console.error(`CodeView.getSelectedLines: no valid instance exists`),null):e.getSelectedLines()},clearSelectedLines(){let{instance:e}=D.current;e==null?console.error(`CodeView.clearSelectedLines: no valid instance to update selection with`):(e.clearSelectedLines({notify:!1}),F(null))},getEditor(e){let{instance:t}=D.current;if(t==null){console.error(`CodeView.getEditor: no valid instance exists`,e);return}return t.getEditor(e)},getInstance(){return D.current.instance}}),[F]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{ref:ne,className:n,style:T}),(te||N||P)&&(0,Z.jsx)(Ye,{managedContentStore:V,renderCustomHeader:y,renderHeaderPrefix:C,renderHeaderFilenameSuffix:x,renderHeaderMetadata:S,renderAnnotation:g,renderGutterUtility:b,renderCodeViewHeader:v,renderCodeViewFooter:_})]})}var We=(0,j.forwardRef)(Ue);function Ge(e,t){if(e==null||t.length<=e.length)return!1;if(e.length===0)return!0;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function Ke(e,t){if(e==null||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Q(e,t){if(e)throw Error(`CodeView.${t} cannot be used when CodeView is controlled. Use initialItems for imperative item updates.`)}function qe(){let e,t=new Set;return{getSnapshot(){return e},publish(n){if(!fe(e,n)){e=n;for(let e of t)e()}},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Je({options:e,hasCustomHeader:t,hasGutterRenderer:n,hasCodeViewHeader:r,hasCodeViewFooter:i,onSelectedLinesChange:a,controlledSelection:o,createEditor:s,onItemEditChange:c,onItemEditComplete:l}){return!t&&!n&&!r&&!i&&a==null&&!o&&s==null&&c==null&&l==null?e??{}:(e={...e,controlledSelection:o,onSelectedLinesChange:a},s!=null&&(e.createEditor=s),c!=null&&(e.onItemEditChange=c),l!=null&&(e.onItemEditComplete=l),t&&(e.renderCustomHeader=$),n&&(e.renderGutterUtility=$),r&&(e.renderCodeViewHeader=$),i&&(e.renderCodeViewFooter=$),e)}var Ye=(0,j.memo)(function({managedContentStore:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o,renderCodeViewHeader:s,renderCodeViewFooter:c}){"use no memo";let l=d(t=>e.subscribe(t)),u=d(()=>e.getSnapshot()),f=(0,j.useSyncExternalStore)(l,u,u),p=``;for(let e of f?.items??[])p+=`${e.id}:${e.version}:${e.type}`;return(0,Z.jsxs)(Z.Fragment,{children:[(0,j.useMemo)(()=>f?.items?.map(e=>(0,X.createPortal)(Xe({renderedItem:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o}),e.element,e.id)),[t,n,r,i,a,o,p]),(0,j.useMemo)(()=>s!=null&&f?.header!=null?(0,X.createPortal)(s(),f.header):null,[s,f?.header]),(0,j.useMemo)(()=>c!=null&&f?.footer!=null?(0,X.createPortal)(c(),f.footer):null,[c,f?.footer])]})});function Xe({renderedItem:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o}){if(e.type===`diff`){let{item:s,instance:c}=e;return ee({fileDiff:s.fileDiff,renderCustomHeader:t==null?void 0:()=>t(s),renderHeaderPrefix:n==null?void 0:()=>n(s),renderHeaderFilenameSuffix:r==null?void 0:()=>r(s),renderHeaderMetadata:i==null?void 0:()=>i(s),renderAnnotation:a==null?void 0:e=>a(e,s),lineAnnotations:s.annotations,renderGutterUtility:o==null?void 0:e=>o(e,s),getHoveredLine:c.getHoveredLine})}else{let{item:s,instance:c}=e;return k({file:s.file,renderCustomHeader:t==null?void 0:()=>t(s),renderHeaderPrefix:n==null?void 0:()=>n(s),renderHeaderFilenameSuffix:r==null?void 0:()=>r(s),renderHeaderMetadata:i==null?void 0:()=>i(s),renderAnnotation:a==null?void 0:e=>a(e,s),lineAnnotations:s.annotations,renderGutterUtility:o==null?void 0:e=>o(e,s),getHoveredLine:c.getHoveredLine})}}function $(){}var Ze=t(),Qe=`${u}
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{v as t,y as n}from"./accountData-BKyjOPQm.js";import{Eo as r,Ho as i,zo as a}from"./utils-ClZ5OxbV.js";import{on as o}from"./session-Dmu9Hk5C.js";import{B as s,G as c,H as l,Jn as u,Mt as d,Nt as f,R as p,U as m,V as h,W as g,br as _,cr as v,dr as y,fr as b,gr as x,hr as S,sr as C,tr as w,yr as T,z as E}from"./scroll-area-DAaT-DGF.js";import{c as ee,n as D,o as O}from"./DiffWorkerPoolProvider-B-AH2sbL.js";import{r as k,t as A}from"./VirtualizedFile-qiRlyNDc.js";var j=e(n(),1),M=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M100,28H64A20,20,0,0,0,44,48V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,100,28ZM96,204H68V52H96ZM192,28H156a20,20,0,0,0-20,20V208a20,20,0,0,0,20,20h36a20,20,0,0,0,20-20V48A20,20,0,0,0,192,28Zm-4,176H160V52h28Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M112,48V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8h40A8,8,0,0,1,112,48Zm80-8H152a8,8,0,0,0-8,8V208a8,8,0,0,0,8,8h40a8,8,0,0,0,8-8V48A8,8,0,0,0,192,40Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M120,48V208a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V48A16,16,0,0,1,64,32h40A16,16,0,0,1,120,48Zm72-16H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M104,34H64A14,14,0,0,0,50,48V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,104,34Zm2,174a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2ZM192,34H152a14,14,0,0,0-14,14V208a14,14,0,0,0,14,14h40a14,14,0,0,0,14-14V48A14,14,0,0,0,192,34Zm2,174a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2h40a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M104,32H64A16,16,0,0,0,48,48V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,104,32Zm0,176H64V48h40ZM192,32H152a16,16,0,0,0-16,16V208a16,16,0,0,0,16,16h40a16,16,0,0,0,16-16V48A16,16,0,0,0,192,32Zm0,176H152V48h40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M104,36H64A12,12,0,0,0,52,48V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,104,36Zm4,172a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4ZM192,36H152a12,12,0,0,0-12,12V208a12,12,0,0,0,12,12h40a12,12,0,0,0,12-12V48A12,12,0,0,0,192,36Zm4,172a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4h40a4,4,0,0,1,4,4Z`}))]]),te=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z`}))]]),N=Object.defineProperty,P=Object.defineProperties,F=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,L=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,z=(e,t,n)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||={})L.call(t,n)&&z(e,n,t[n]);if(I)for(var n of I(t))R.call(t,n)&&z(e,n,t[n]);return e},V=(e,t)=>P(e,F(t)),H=(0,j.forwardRef)((e,t)=>j.createElement(r,V(B({ref:t},e),{weights:M})));H.displayName=`Columns`;var ne=Object.defineProperty,U=Object.defineProperties,W=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,oe=(e,t,n)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,se=(e,t)=>{for(var n in t||={})ie.call(t,n)&&oe(e,n,t[n]);if(re)for(var n of re(t))ae.call(t,n)&&oe(e,n,t[n]);return e},ce=(e,t)=>U(e,W(t)),le=(0,j.forwardRef)((e,t)=>j.createElement(r,ce(se({ref:t},e),{weights:te})));le.displayName=`Rows`;function ue(e,t){return e.length>0&&e.every(e=>t.has(e))}function de(e,t){return ue(e,t)?new Set:new Set(e)}function fe(e,t){return e==null||t==null?e===t:e.header!==t.header||e.footer!==t.footer?!1:pe(e.items,t.items)}function pe(e,t){if(e==null||t==null)return e===t;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r==null||i==null||r.id!==i.id||r.type!==i.type||r.element!==i.element||r.version!==i.version)return!1}return!0}function me(e,t,n){let r=document.createElement(`div`);return r.style.display=`flow-root`,e===`header`?(r.setAttribute(v,``),t.before(r)):(r.setAttribute(C,``),t.after(r)),n?.observe(r),r}function he(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function G(e){let t=window.devicePixelRatio??1;return Math.round(e*t)/t}var ge=`theme.disableLineNumbers.overflow.themeType.disableFileHeader.disableVirtualizationBuffers.preferredHighlighter.useCSSClasses.useTokenTransformer.tokenizeMaxLineLength.tokenizeMaxLength.unsafeCSS.diffStyle.diffIndicators.disableBackground.expandUnchanged.loadDiffFiles.collapsedContextThreshold.lineDiffType.maxLineDiffLength.expansionLineCount.lineHoverHighlight.enableTokenInteractionsOnWhitespace.enableGutterUtility.__debugPointerEvents.enableLineSelection.controlledSelection.disableErrorHandling`.split(`.`),_e=[`theme`,`disableLineNumbers`,`overflow`,`themeType`,`disableFileHeader`,`disableVirtualizationBuffers`,`preferredHighlighter`,`useCSSClasses`,`useTokenTransformer`,`tokenizeMaxLineLength`,`tokenizeMaxLength`,`unsafeCSS`,`lineHoverHighlight`,`enableTokenInteractionsOnWhitespace`,`enableGutterUtility`,`__debugPointerEvents`,`enableLineSelection`,`controlledSelection`,`disableErrorHandling`],ve=new Set([`useTokenTransformer`,`enableGutterUtility`,`enableLineSelection`,`lineHoverHighlight`]),ye=[`renderCustomHeader`,`renderHeaderPrefix`,`renderHeaderFilenameSuffix`,`renderHeaderMetadata`,`renderAnnotation`,`renderGutterUtility`,`onPostRender`,`onGutterUtilityClick`,`onLineClick`,`onLineNumberClick`,`onLineEnter`,`onLineLeave`,`onTokenClick`,`onTokenEnter`,`onTokenLeave`],be=[`onLineSelected`,`onLineSelectionStart`,`onLineSelectionChange`,`onLineSelectionEnd`],xe=Symbol(`CodeView.itemOptionsState`);function Se(e,t){Object.defineProperty(e,xe,{configurable:!1,enumerable:!1,value:t})}function K(e){return e[xe]}function q(e,t,n){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get(){return n(this)}})}var Ce=120,we=`--diffs-overflow-override`,J=12e6,Te=1e6,Ee=2e6,De=J-Ee,Oe=J-Te,ke=(()=>{let{navigator:e}=globalThis,t=e.userAgent,n=/iP(?:hone|ad|od)/.test(t),r=e.platform===`MacIntel`&&e.maxTouchPoints>1;return(n||r)&&/AppleWebKit/.test(t)&&/Safari/.test(t)&&!/(CriOS|FxiOS|EdgiOS|OPiOS)/.test(t)})(),Ae=class e{static __STOP=!1;static __lastScrollPosition=0;type=`advanced`;config={overscrollSize:200,intersectionObserverMargin:0,resizeDebugging:!1};items=[];idToItem=new Map;selectedLines=null;itemEditors=new Map;attachedEditors=new Set;instanceToItem=new Map;layoutDirtyIndex;pendingLayoutReset;renderOptionsRevision=0;slotCoordinator;slotSnapshot;scrollListeners=new Set;scrollHeight=0;containerHeight=-1;scrollTop=0;scrollPageOffset=0;scrollDirty=!0;scrollInteractionFixTimer;pointerEventsDisabled=!1;codeOverflowFix=!1;height=0;heightDirty=!0;windowSpecs={top:0,bottom:0};renderState={scrollTop:-1,firstIndex:-1,lastIndex:-1,stickyHeight:0,stickyTop:-1,stickyBottom:-1};itemMetricsCache=y;fileOptionsPrototype;diffOptionsPrototype;pendingScrollTarget;pendingLayoutAnchor;shouldFixContainerFocus=!1;scrollAnimation;root;resizeObserver;container=document.createElement(`div`);stickyContainer=document.createElement(`div`);stickyOffset=document.createElement(`div`);header={element:void 0,render:void 0,height:0};footer={element:void 0,render:void 0,height:0};elementPool=[];elementPoolVersion=0;elementPoolTracker=new WeakMap;pendingElementPool=[];options;workerManager;isReadySubscription;isContainerManaged;constructor(e={theme:x},t,n=!1){this.options=e,this.computeMetricsCache(e.itemMetrics),this.fileOptionsPrototype=this.createFileOptionsPrototype(),this.diffOptionsPrototype=this.createDiffOptionsPrototype(),this.workerManager=t,this.isContainerManaged=n,this.stickyOffset.style.contain=`layout size`,this.stickyContainer.style.position=`sticky`,this.stickyContainer.style.width=`100%`,this.stickyContainer.style.contain=`layout style inline-size`,this.stickyContainer.style.isolation=`isolate`,this.stickyContainer.style.display=`flex`,this.stickyContainer.style.flexDirection=`column`}getLayout(){return this.options.layout??b}getItemTopOffset(){return this.getLayout().paddingTop+this.header.height}computeMetricsCache(e){return this.itemMetricsCache={hunkLineCount:e?.hunkLineCount??y.hunkLineCount,lineHeight:e?.lineHeight??y.lineHeight,diffHeaderHeight:e?.diffHeaderHeight??y.diffHeaderHeight,hunkSeparatorHeight:e?.hunkSeparatorHeight,spacing:e?.spacing??y.spacing,paddingTop:e?.paddingTop,paddingBottom:e?.paddingBottom},this.itemMetricsCache}getSmoothScrollSettings(){return this.options.smoothScrollSettings??S}shouldDisablePointerEvents(){return this.options.pointerEventsOnScroll!==!0}shouldValidateItemHeights(){return T&&this.options.__devOnlyValidateItemHeights===!0}validateRenderedItemHeight(e){if(!this.shouldValidateItemHeights()||e.element==null)return;let t=e.instance.getAdvancedStickySpecs();if(t==null)return;let n=t.height,r=e.element.getBoundingClientRect().height;n!==r&&console.error(`CodeView: reconciled item height does not match DOM height`,{id:e.item.id,type:e.type,index:e.index,version:e.version,expectedHeight:n,actualHeight:r,delta:r-n,stickyTopOffset:t.topOffset,virtualizedHeight:e.instance.getVirtualizedHeight(),top:e.top,scrollTop:this.getScrollTop(),windowSpecs:{...this.windowSpecs},element:e.element,instance:e.instance})}validateStickyContainerHeight(){if(!this.shouldValidateItemHeights())return;let{firstIndex:e,lastIndex:t,stickyHeight:n,stickyTop:r,stickyBottom:i}=this.renderState;if(e===-1||t===-1)return;let a=this.stickyContainer.getBoundingClientRect().height;Math.abs(a-n)<1||console.error(`CodeView: sticky container height does not match computed layout`,{computedStickyHeight:n,actualStickyHeight:a,delta:a-n,stickyTop:r,stickyBottom:i,firstIndex:e,lastIndex:t,firstStickySpecs:this.items[e]?.instance.getAdvancedStickySpecs(),lastStickySpecs:this.items[t]?.instance.getAdvancedStickySpecs(),scrollTop:this.getScrollTop(),scrollPageOffset:this.scrollPageOffset,windowSpecs:{...this.windowSpecs},stickyContainer:this.stickyContainer})}clearScrollInteractionTimer(){this.scrollInteractionFixTimer!=null&&(clearTimeout(this.scrollInteractionFixTimer),this.scrollInteractionFixTimer=void 0)}suspendScrollInteractions(){this.clearScrollInteractionTimer(),this.shouldDisablePointerEvents()&&!this.pointerEventsDisabled&&(this.stickyContainer.style.pointerEvents=`none`,this.pointerEventsDisabled=!0),ke&&!this.codeOverflowFix&&(this.stickyContainer.style.setProperty(we,`hidden`),this.codeOverflowFix=!0),this.scrollInteractionFixTimer=setTimeout(this.restoreScrollInteractions,Ce)}restoreScrollInteractions=()=>{this.clearScrollInteractionTimer(),this.pointerEventsDisabled&&=(this.stickyContainer.style.removeProperty(`pointer-events`),!1),this.codeOverflowFix&&=(this.stickyContainer.style.setProperty(we,`auto`),!1)};syncLayout(){let{gap:e,paddingBottom:t,paddingTop:n}=this.getLayout();this.stickyContainer.style.gap=`${e}px`,this.container?.style.setProperty(`margin-top`,`${n}px`),this.container?.style.setProperty(`margin-bottom`,`${t}px`)}reconcileHeaderFooterHosts(){let e=this.reconcileHost(`header`),t=this.reconcileHost(`footer`);return e||t}reconcileHost(e){let{root:t,container:n}=this;if(t==null||n==null)return!1;let r=e===`header`?this.header:this.footer,i=e===`header`?this.options.renderCodeViewHeader:this.options.renderCodeViewFooter;if(i==null)return r.element==null?!1:(this.resizeObserver?.unobserve(r.element),r.element.remove(),r.element=void 0,r.render=void 0,this.setHostHeight(r,0),!1);if(r.element!=null&&i===r.render)return!1;let a=r.element??me(e,n,this.resizeObserver);r.element=a;let o=i();return o==null?!this.isContainerManaged&&a.children.length>0&&(a.textContent=``):a.replaceChildren(o),r.render=i,!0}setHostHeight(e,t){e.height!==t&&(e.height=t,this.scrollDirty=!0)}measureMountedHosts(){this.header.element!=null&&this.setHostHeight(this.header,this.header.element.getBoundingClientRect().height),this.footer.element!=null&&this.setHostHeight(this.footer,this.footer.element.getBoundingClientRect().height)}setup(t){if(this.root!=null)throw Error(`CodeView.setup: already setup`);this.workerManager?.subscribeToThemeChanges(this),this.root=t,this.root.style.overflowAnchor=`none`,this.root.hasAttribute(`tabindex`)||(this.root.tabIndex=-1),this.container??=document.createElement(`div`),this.container.style.contain=`layout style`,this.syncLayout(),this.container.appendChild(this.stickyOffset),this.container.appendChild(this.stickyContainer),this.root.appendChild(this.container),this.scrollDirty=!0,this.heightDirty=!0,this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.stickyContainer),this.root.addEventListener(`scroll`,this.handleScroll,{passive:!0}),this.root.addEventListener(`wheel`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`touchstart`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`pointerdown`,this.clearPendingScroll,{passive:!0}),this.root.addEventListener(`keydown`,this.clearPendingScroll,{passive:!0}),this.resizeObserver.observe(this.root),this.render(!0),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,this.scrollTo({type:`position`,position:e.__lastScrollPosition,behavior:`instant`})):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)}}reset(){h(this.computeRenderRangeAndEmit),this.clearReadySubscription(),this.restoreScrollInteractions(),this.cleanAllRenderedItems();for(let e of this.itemEditors.values())e.editor.cleanUp();this.itemEditors.clear(),this.attachedEditors.clear(),this.selectedLines=null,this.items.length=0,this.idToItem.clear(),this.instanceToItem.clear(),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,this.stickyContainer.textContent=``,this.stickyOffset.style.height=``,this.container?.style.removeProperty(`height`),this.containerHeight=-1,this.windowSpecs={top:0,bottom:0},this.pendingLayoutAnchor=void 0,this.shouldFixContainerFocus=!1,this.height=0,this.scrollTop=0,this.scrollPageOffset=0,this.scrollHeight=0,this.scrollDirty=!0,this.heightDirty=!0,this.resetRenderState(),this.isContainerManaged||this.flushSlotCoordinator()}cleanUp(){this.reset(),this.clearElementPool(),this.restoreScrollInteractions(),this.workerManager?.unsubscribeToThemeChanges(this),this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleScroll),this.root?.removeEventListener(`wheel`,this.clearPendingScroll),this.root?.removeEventListener(`touchstart`,this.clearPendingScroll),this.root?.removeEventListener(`pointerdown`,this.clearPendingScroll),this.root?.removeEventListener(`keydown`,this.clearPendingScroll),this.root?.style.removeProperty(`overflow-anchor`),this.container?.remove(),this.stickyOffset.remove(),this.stickyContainer.remove(),this.stickyContainer.textContent=``,this.header.element?.remove(),this.header.element=void 0,this.header.render=void 0,this.header.height=0,this.footer.element?.remove(),this.footer.element=void 0,this.footer.render=void 0,this.footer.height=0,this.root=void 0,this.container=void 0}cleanAllRenderedItems(){if(this.renderState.firstIndex!==-1)for(let e=this.renderState.firstIndex;e<=this.renderState.lastIndex;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.cleanAllRenderedItems: Item does not exist at index: ${e}`);this.releaseRenderedItem(t)}}primeScrollTarget(e){e.type!==`position`&&this.idToItem.get(e.id)?.instance.primeHighlightCache()}getElementPoolLimit(){let e=this.getHeight()+this.config.overscrollSize*2,{diffHeaderHeight:t}=this.itemMetricsCache;return Math.max(8,Math.ceil(e/Math.max(t,10))+1)*(this.isContainerManaged?2:1)}acquireElement(){this.promotePendingPooledElements();let e=this.elementPool.pop();for(;e!=null&&!this.isElementPoolGenerationCurrent(e);)e=this.elementPool.pop();return e??=document.createElement(_),this.markElementPoolGenerationCurrent(e),e}releaseRenderedItem(e){let{element:t}=e;t!=null&&this.renderedItemOwnsFocus(t)&&(this.shouldFixContainerFocus=!0),e.instance.cleanUp(!0),this.attachedEditors.delete(e.item.id),e.element=void 0,t!=null&&(t.remove(),this.cleanElement(t),this.queueElementForPool(t))}renderedItemOwnsFocus(e){let{activeElement:t}=document;return t===e||e.contains(t)||e.shadowRoot?.activeElement!=null}fixContainerFocus(){this.shouldFixContainerFocus&&(this.shouldFixContainerFocus=!1,this.root?.focus({preventScroll:!0}))}cleanElement(e){let{shadowRoot:t}=e;if(t!=null)for(let e of Array.from(t.children))Fe(e)||e.remove();this.isContainerManaged||e.replaceChildren()}queueElementForPool(e){let t=this.getElementPoolLimit();!this.isElementPoolGenerationCurrent(e)||this.getElementPoolSize()>=t||(this.isElementClean(e)?this.elementPool.push(e):this.pendingElementPool.push(e))}promotePendingPooledElements(){if(this.pendingElementPool.length===0)return;let{pendingElementPool:e}=this;this.pendingElementPool=[];let t=this.getElementPoolLimit();for(let n of e)this.isElementPoolGenerationCurrent(n)&&this.isElementClean(n)&&this.elementPool.length<t?this.elementPool.push(n):this.isElementPoolGenerationCurrent(n)&&this.getElementPoolSize()<t&&this.pendingElementPool.push(n)}isElementClean(e){return e.childNodes.length===0}getElementPoolSize(){return this.elementPool.length+this.pendingElementPool.length}clearElementPool(){this.elementPool.length=0,this.pendingElementPool.length=0}invalidateElementPool(){this.elementPoolVersion++,this.clearElementPool()}markElementPoolGenerationCurrent(e){this.elementPoolTracker.set(e,this.elementPoolVersion)}isElementPoolGenerationCurrent(e){return this.elementPoolTracker.get(e)===this.elementPoolVersion}resolveEffectiveScrollBehavior(e,t){return he()?`instant`:e.behavior===`smooth-auto`?Math.abs(t-this.getScrollTop())<=this.getHeight()*10?`smooth`:`instant`:e.behavior??`instant`}scrollTo(e){if(this.root==null)return;let t=this.normalizeScrollTarget(e);if(t==null)return;let n=this.resolveScrollTargetTop(t);n!=null&&(this.primeScrollTarget(t),this.resolveEffectiveScrollBehavior(t,n)===`smooth`?this.scrollAnimation??={position:this.getScrollTop(),velocity:0,lastTimestamp:performance.now()}:this.scrollAnimation=void 0,this.suspendScrollInteractions(),this.pendingLayoutAnchor=void 0,this.pendingScrollTarget=t,this.render())}setSelectedLines(e,t){this.applySelectedLines(e,t)}getSelectedLines(){return this.selectedLines}clearSelectedLines(e){this.applySelectedLines(null,e)}getItem(e){return this.idToItem.get(e)?.item}getEditor(e){return this.itemEditors.get(e)?.editor}updateItem(e){let t=this.idToItem.get(e.id);return t==null?(console.error(`CodeView.updateItem: unknown item id "${e.id}"`),!1):this.syncItemRecord(t,e)?(this.markItemLayoutDirty(t),this.scrollDirty=!0,this.render(),this.syncSelection(),this.syncItemEditors(),!0):!1}updateItemId(e,t){if(e===t)return!0;let n=this.idToItem.get(e);if(n==null)return console.error(`CodeView.updateItemId: unknown item id "${e}"`),!1;if(this.idToItem.has(t))return console.error(`CodeView.updateItemId: duplicate item id "${t}"`),!1;this.idToItem.delete(e),n.item.id=t,this.idToItem.set(t,n),this.updateItemOptionsId(n.instance.options,t),this.selectedLines?.id===e&&(this.selectedLines={...this.selectedLines,id:t},this.options.onSelectedLinesChange?.(this.selectedLines));let r=this.itemEditors.get(e);return r!=null&&(r.state.id=t,this.itemEditors.delete(e),this.itemEditors.set(t,r),this.attachedEditors.delete(e)&&this.attachedEditors.add(t)),this.renamePendingScrollTarget(e,t),this.renamePendingLayoutAnchor(e,t),this.render(),!0}addItem(e){this.addItems([e])}addItems(e){this.appendItemsInternal(e),this.syncSelection(),this.syncItemEditors()}setItems(e){if(e.length===0){let e=[];for(let t of this.itemEditors.values()){let{lastChange:n}=t.state;n!=null&&e.push(n)}this.reset();for(let{item:t,file:n,lineAnnotations:r}of e)this.options.onItemEditComplete?.(t,n,r)}else this.items.length===0?this.appendItemsInternal(e):this.tryAppendItems(e)||this.reconcileItems(e);this.syncSelection(),this.syncItemEditors()}appendItemsInternal(e,t=!0){if(e.length===0)return;let n=this.getLayout(),r=this.items.length===0?0:this.scrollHeight+n.gap,i=r;for(let t=0;t<e.length;t++){let i=e[t];if(i==null)throw Error(`CodeView.appendItemsInternal: missing input item`);if(this.idToItem.has(i.id))throw Error(`CodeView.addItem: duplicate id "${i.id}"`);let a=this.createItem(i,this.items.length,r);this.items.push(a),this.idToItem.set(a.item.id,a),this.instanceToItem.set(a.instance,a),a.height=je(a),r+=a.height+n.gap}this.scrollHeight=r-n.gap,this.scrollDirty=!0,t&&(this.canSkipRenderForAppend(i)?this.syncContainerHeight():this.render())}canSkipRenderForAppend(e){return this.container!=null&&this.renderState.firstIndex!==-1&&this.pendingScrollTarget==null&&this.scrollAnimation==null&&this.layoutDirtyIndex==null&&e>this.windowSpecs.bottom}onThemeChange(){this.invalidateElementPool()}setOptions(e){if(e==null)return;this.capturePendingLayoutAnchor();let{options:t}=this,n=this.getLayout(),{itemMetricsCache:r}=this;Me(t,e)&&this.invalidateElementPool(),this.options=e;let i=this.computeMetricsCache(e.itemMetrics),a=!g(r,i),o=!g(n,this.getLayout());o&&this.syncLayout();let s=a||Ne(t,e);if(s){let n=this.pendingLayoutReset;this.pendingLayoutReset={metrics:a?i:n?.metrics,resetFileLayoutCache:!0,resetDiffLayoutCache:!0,includeEstimatedDiffHeights:n?.includeEstimatedDiffHeights===!0||a||Pe(t,e)}}(o||s)&&(this.markLayoutDirtyFromIndex(0),this.scrollDirty=!0),m(t,e)||this.renderOptionsRevision++,this.syncItemEditors();let c=t.renderCodeViewHeader!==e.renderCodeViewHeader||t.renderCodeViewFooter!==e.renderCodeViewFooter;!this.isContainerManaged&&(this.items.length>0||c)&&this.render()}capturePendingLayoutAnchor(){this.root==null||this.items.length===0||this.pendingScrollTarget!=null||(this.pendingLayoutAnchor=this.getScrollAnchor(this.getScrollTop()))}render(t=!1){e.__STOP||(t?(h(this.computeRenderRangeAndEmit),this.computeRenderRangeAndEmit()):l(this.computeRenderRangeAndEmit))}isReady(){let{workerManager:e}=this;return e==null||e.isInitialized()||e.getStats().workersFailed?(this.clearReadySubscription(),!0):(this.isReadySubscription??=e.subscribeToStatChanges(e=>{e.managerState!==`initialized`&&!e.workersFailed||(this.clearReadySubscription(),this.render(!0))}),e.getStats().managerState===`waiting`&&e.initialize().catch(()=>{}),!1)}clearReadySubscription(){this.isReadySubscription!=null&&(this.isReadySubscription(),this.isReadySubscription=void 0)}instanceChanged(e,t){let n=this.instanceToItem.get(e);if(n==null)throw Error(`CodeView.instanceChanged: An instance has changed that is not registered`);t&&this.markItemLayoutDirty(n),this.render()}getWindowSpecs(){return this.windowSpecs}getContainerElement(){return this.root}getHeaderElement(){return this.header.element}getFooterElement(){return this.footer.element}getRenderedItems(){let{firstIndex:e,lastIndex:t}=this.renderState;if(e===-1||t===-1||t<e)return[];let n=[];for(let r=e;r<=t;r++){let e=this.items[r];e?.element!=null&&(e.type===`diff`?n.push({id:e.item.id,type:`diff`,item:e.item,version:e.version,element:e.element,instance:e.instance}):n.push({id:e.item.id,type:`file`,item:e.item,version:e.version,element:e.element,instance:e.instance}))}return n}setSlotCoordinator(e){return e===this.slotCoordinator?!1:(this.slotCoordinator=e,this.slotSnapshot=void 0,!0)}getSlotSnapshot(e){return this.buildSlotSnapshot(e)}buildSlotSnapshot(e){let t=Be(this.getRenderedItems(),e),{element:n}=this.header,{element:r}=this.footer;if(!(t==null&&n==null&&r==null))return{items:t,header:n,footer:r}}subscribeToScroll(e){return this.scrollListeners.add(e),()=>{this.scrollListeners.delete(e)}}getLocalTopForInstance(e){let t=this.instanceToItem.get(e);if(t==null)throw Error(`CodeView.getLocalTopForInstance: unknown virtualized instance`);return t.top}getTopForItem(e){let t=this.idToItem.get(e);if(t!=null)return t.top+this.getItemTopOffset()}createItem(e,t,n){let{itemMetricsCache:r}=this;if(e.type===`diff`){let i=new D(this.createDiffOptions(e.id),this,r,this.workerManager,this.isContainerManaged);return{type:`diff`,item:e,version:e.version,index:t,top:n,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:i}}let i=new A(this.createFileOptions(e.id),this,r,this.workerManager,this.isContainerManaged);return{type:`file`,item:e,version:e.version,index:t,top:n,height:0,element:void 0,renderedOptionsRevision:this.renderOptionsRevision,instance:i}}applySelectedLines(e,t){let{selectedLines:n}=this;e==null&&n==null||e!=null&&n?.id===e.id&&s(n.range,e.range)||(n!=null&&n.id!==e?.id&&this.idToItem.get(n.id)?.instance.setSelectedLines(null,{notify:!1}),this.selectedLines=e,this.idToItem.get(e?.id??``)?.instance.setSelectedLines(e?.range??null,t))}syncSelection(){if(this.selectedLines==null)return;let e=this.idToItem.get(this.selectedLines.id);if(e==null){this.selectedLines=null;return}e.instance.setSelectedLines(this.selectedLines.range,{notify:!1})}isItemInEditMode(e){return this.options.createEditor!=null&&e.item.edit===!0&&e.item.collapsed!==!0}isReceiverEdited(e,t){let n=K(e);if(n==null)return!1;let r=this.getItemOptions(n,t);return r!=null&&this.isItemInEditMode(r)}attachItemEditor(e){let{id:t}=e.item,{createEditor:n}=this.options;if(n==null||e.element==null||this.attachedEditors.has(t)||!this.isItemInEditMode(e))return;let r=this.itemEditors.get(t);if(r==null){let e={id:t},i=n({onChange:(t,n)=>{let r=this.idToItem.get(e.id);r!=null&&(e.lastChange={item:r.item,file:t,lineAnnotations:n},this.options.onItemEditChange?.(r.item,t,n))}});if(i==null)return;r={editor:i,state:e},this.itemEditors.set(t,r)}this.selectedLines?.id===t&&this.applySelectedLines(null,{notify:!1}),r.editor.edit(e.instance),this.attachedEditors.add(t)}syncItemEditors(){if(this.itemEditors.size===0)return;let e=[];for(let[t,n]of this.itemEditors){let r=this.idToItem.get(t);if(r!=null&&this.isItemInEditMode(r))continue;n.editor.cleanUp(),this.itemEditors.delete(t),this.attachedEditors.delete(t);let i=r?.item??n.state.lastChange?.item;i?.type===`diff`&&(r!=null&&r.type===`diff`&&r.instance.completeEditSession()&&(this.markItemLayoutDirty(r),this.render()),O(i.fileDiff));let{lastChange:a}=n.state;a!=null&&e.push(r==null?a:{...a,item:r.item})}for(let{item:t,file:n,lineAnnotations:r}of e)this.options.onItemEditComplete?.(t,n,r)}renamePendingScrollTarget(e,t){let{pendingScrollTarget:n}=this;n==null||n.type===`position`||n.id!==e||(this.pendingScrollTarget={...n,id:t})}renamePendingLayoutAnchor(e,t){this.pendingLayoutAnchor?.id===e&&(this.pendingLayoutAnchor.id=t)}createFileOptionsPrototype(){let e={};for(let t of _e)ve.has(t)||q(e,t,()=>this.options[t]);q(e,`useTokenTransformer`,e=>this.isReceiverEdited(e,`file`)?!0:this.options.useTokenTransformer),q(e,`enableGutterUtility`,e=>this.isReceiverEdited(e,`file`)?!1:this.options.enableGutterUtility),q(e,`enableLineSelection`,e=>this.isReceiverEdited(e,`file`)?!1:this.options.enableLineSelection),q(e,`lineHoverHighlight`,e=>this.isReceiverEdited(e,`file`)?`disabled`:this.options.lineHoverHighlight),q(e,`stickyHeader`,()=>this.options.stickyHeaders),q(e,`collapsed`,e=>{let t=K(e);if(t!=null)return this.getItemOptions(t,`file`)?.item.collapsed});for(let t of ye)this.defineItemSharedCallback(e,`file`,t);for(let t of be)this.defineItemSelectionCallback(e,`file`,t);return e}createDiffOptionsPrototype(){let e={};for(let t of ge)ve.has(t)||q(e,t,()=>this.options[t]);q(e,`useTokenTransformer`,e=>this.isReceiverEdited(e,`diff`)?!0:this.options.useTokenTransformer),q(e,`enableGutterUtility`,e=>this.isReceiverEdited(e,`diff`)?!1:this.options.enableGutterUtility),q(e,`enableLineSelection`,e=>this.isReceiverEdited(e,`diff`)?!1:this.options.enableLineSelection),q(e,`lineHoverHighlight`,e=>this.isReceiverEdited(e,`diff`)?`disabled`:this.options.lineHoverHighlight),q(e,`stickyHeader`,()=>this.options.stickyHeaders),q(e,`hunkSeparators`,()=>this.options.hunkSeparators),q(e,`collapsed`,e=>{let t=K(e);if(t!=null)return this.getItemOptions(t,`diff`)?.item.collapsed});for(let t of ye)this.defineItemSharedCallback(e,`diff`,t);for(let t of be)this.defineItemSelectionCallback(e,`diff`,t);return e}createFileOptions(e){let t=Object.create(this.fileOptionsPrototype);return Se(t,{id:e}),t}createDiffOptions(e){let t=Object.create(this.diffOptionsPrototype);return Se(t,{id:e}),t}updateItemOptionsId(e,t){let n=K(e);if(n==null)throw Error(`CodeView.updateItemOptionsId: No valid state`);n.id=t}getItemOptions(e,t){let n=this.idToItem.get(e.id);if(!(n==null||n.type!==t))return n}defineItemSharedCallback(e,t,n){q(e,n,e=>{if(this.options[n]==null)return;let r=K(e);if(r==null)return;let i=r.callbackCache??={},a=i[n];return a??(a=((...e)=>{let i=this.getItemOptions(r,t);if(i==null)return;let a=this.options[n];return a?.(...e,i)}),i[n]=a),a})}defineItemSelectionCallback(e,t,n){q(e,n,e=>{if(this.options.enableLineSelection!==!0)return;let r=K(e);if(r==null)return;let i=this.getItemOptions(r,t);if(i!=null&&this.isItemInEditMode(i))return;let a=r.callbackCache??={},o=a[n];return o??(o=(e=>{let i=this.getItemOptions(r,t);if(i==null)return;let a=e==null?null:{id:i.item.id,range:e};this.options.controlledSelection!==!0&&(e!=null||this.selectedLines?.id===i.item.id)&&this.applySelectedLines(a,{notify:!1}),this.options.onSelectedLinesChange?.(a);let o=this.options[n];return o?.(e,i)}),a[n]=o),o})}markLayoutDirtyFromIndex(e){this.layoutDirtyIndex=Math.min(this.layoutDirtyIndex??e,e)}markItemLayoutDirty(e){if(this.items[e.index]!==e)throw Error(`CodeView.markItemLayoutDirty: unknown item id "${e.item.id}"`);this.markLayoutDirtyFromIndex(e.index)}tryAppendItems(e){if(e.length<=this.items.length)return!1;for(let t=0;t<this.items.length;t++){let n=this.items[t];if(n==null)throw Error(`CodeView.tryAppendItems: missing existing item`);let r=e[t];if(r==null||n.item.id!==r.id||n.type!==r.type)return!1}for(let t=0;t<this.items.length;t++){let n=this.items[t];if(n==null)throw Error(`CodeView.tryAppendItems: missing existing item`);let r=e[t];if(r==null)throw Error(`CodeView.tryAppendItems: append candidate missing prefix item`);this.syncItemRecord(n,r)&&this.markLayoutDirtyFromIndex(t)}return this.appendItemsInternal(e.slice(this.items.length),!1),this.scrollDirty=!0,this.render(),!0}reconcileItems(e){let{items:t,idToItem:n}=this,r=new Set(t),i=[],a=new Map,o=new Map,s;for(let c=0;c<e.length;c++){let l=e[c];if(l==null)throw Error(`CodeView.reconcileItems: missing input item`);if(a.has(l.id))throw Error(`CodeView.setItems: duplicate id "${l.id}"`);let u=n.get(l.id),d=u!=null&&u.type===l.type?u:this.createItem(l,c,0);d.index=c,u!=null&&u.type===l.type?(r.delete(u),this.syncItemRecord(d,l)&&(s=Math.min(s??c,c))):s=Math.min(s??c,c),t[c]!==d&&(s=Math.min(s??c,c)),i.push(d),a.set(l.id,d),o.set(d.instance,d)}for(let e=0;e<t.length;e++){let n=t[e];if(n==null||!r.has(n))continue;this.releaseRenderedItem(n);let a=Math.max(i.length-1,0);s=Math.min(s??a,a)}s!=null&&(this.items=i,this.idToItem=a,this.instanceToItem=o,this.renderState.firstIndex>=i.length?this.resetRenderState():this.renderState.lastIndex>=i.length&&(this.renderState.lastIndex=i.length-1),this.markLayoutDirtyFromIndex(s),this.scrollDirty=!0,this.render())}syncItemRecord(e,t){if(e.type!==t.type)throw Error(`CodeView.syncItemRecord: type mismatch for id "${t.id}"`);return e.version===t.version?!1:(e.item=t,e.version=t.version,e.renderedOptionsRevision=-1,!0)}getMaxScrollTopForHeight(e){let{paddingBottom:t,paddingTop:n}=this.getLayout();return Math.max(n+this.header.height+e+this.footer.height+t-this.getHeight(),0)}getMaxScrollTop(){return this.getMaxScrollTopForHeight(this.getScrollHeight())}shouldRebaseScroll(){return this.getMaxScrollTop()>Oe}getPagedScrollHeight(){return this.shouldRebaseScroll()?Math.min(this.getScrollHeight(),J):this.getScrollHeight()}getMaxPagedScrollTop(){return this.getMaxScrollTopForHeight(this.getPagedScrollHeight())}clampPagedScrollTop(e){let t=this.getMaxPagedScrollTop();return Math.max(0,Math.min(e,t))}clampScrollTop(e){let t=this.getMaxScrollTop();return Math.max(0,Math.min(e,t))}getMaxScrollPageOffset(){return Math.max(this.getMaxScrollTop()-this.getMaxPagedScrollTop(),0)}clampScrollPageOffset(e){let t=this.getMaxScrollPageOffset();return Math.max(0,Math.min(e,t))}resolveScrollPageWindow(e,t){let n=G(this.clampPagedScrollTop(t)),r=this.clampScrollPageOffset(e-n);return n=G(this.clampPagedScrollTop(e-r)),r=this.clampScrollPageOffset(e-n),{pagedScrollTop:n,scrollPageOffset:r}}resolvePagedScrollPosition(e){if(!this.shouldRebaseScroll())return{pagedScrollTop:this.clampPagedScrollTop(e),scrollPageOffset:0};let t=this.clampScrollPageOffset(this.scrollPageOffset),n=e-t,r=this.getMaxPagedScrollTop(),i=this.getMaxScrollPageOffset(),a=n>Oe&&t<i,o=n<Te&&t>0;return n<0||n>r||a||o?this.resolveScrollPageWindow(e,o?Math.min(De,r):Ee):{pagedScrollTop:G(this.clampPagedScrollTop(n)),scrollPageOffset:t}}needsScrollPageUpdate(e){let t=G(this.clampScrollTop(e)),{scrollPageOffset:n}=this.resolvePagedScrollPosition(t);return n!==this.scrollPageOffset}getPagedLayoutTop(e){return this.shouldRebaseScroll()?Math.max(e-this.scrollPageOffset,0):e}getStickyHeaderOffset(){return this.options.stickyHeaders===!0&&this.options.disableFileHeader!==!0?this.itemMetricsCache.diffHeaderHeight:0}getScrollTargetRect(e){let t=this.idToItem.get(e.id);if(t==null){console.warn(`CodeView.scrollTo: unknown item id "${e.id}"`);return}if(e.type===`item`)return{top:t.top,height:t.height};if(e.type===`range`){let n=this.getRangeScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve range ${Ie(e.range)} for item "${e.id}"`);return}return{top:t.top+n.top,height:n.height}}let n=this.getLineScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve line ${e.lineNumber} for item "${e.id}"`);return}return{top:t.top+n.top,height:n.height}}normalizeScrollTarget(e){if(e.type===`position`||e.align!==`nearest`)return e;let t=this.getScrollTargetRect(e);if(t==null)return;let n=e.offset??0,r=this.getItemTopOffset()+t.top,i=r+t.height,a=this.getScrollTop(),o=a+(e.type===`line`||e.type===`range`?this.getStickyHeaderOffset():0),s=a+this.getHeight();if(!(r-n<=o&&i+n>=s)){if(r-n<o)return{...e,align:`start`};if(i+n>s)return{...e,align:`end`}}}resolveScrollTargetTop(e){if(e.type===`position`){let t=this.clampScrollTop(e.position);return t===e.position?this.clampScrollTop(e.position-this.getStickyHeaderOffset()):t}let t=this.idToItem.get(e.id);if(t==null){console.warn(`CodeView.scrollTo: unknown item id "${e.id}"`);return}if(e.type===`item`)return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top,t.height,e.align,e.offset));if(e.type===`range`){let n=this.getRangeScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve range ${Ie(e.range)} for item "${e.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top+n.top,n.height,e.align,e.offset,this.getStickyHeaderOffset()))}let n=this.getLineScrollPosition(t,e);if(n==null){console.warn(`CodeView.scrollTo: unable to resolve line ${e.lineNumber} for item "${e.id}"`);return}return this.clampScrollTop(this.resolveAlignedScrollPosition(t.top+n.top,n.height,e.align,e.offset,this.getStickyHeaderOffset()))}resolveAlignedScrollPosition(e,t,n,r=0,i=0){e+=this.getItemTopOffset();let a=this.getHeight();return n===`center`&&t+r<a?e-(a-t)/2+r:n===`end`?e-(a-t)+r:e-i-r}getLineScrollPosition(e,t){return e.type===`diff`?e.instance.getLinePosition(t.lineNumber,t.side):e.instance.getLinePosition(t.lineNumber)}getRangeScrollPosition(e,t){let{range:n}=t,r=this.getLineScrollPosition(e,{type:`line`,id:t.id,lineNumber:n.start,side:n.side}),i=this.getLineScrollPosition(e,{type:`line`,id:t.id,lineNumber:n.end,side:n.endSide??n.side});if(r==null||i==null)return;let a=r.top,o=a+r.height,s=i.top,c=s+i.height,l=Math.min(a,s);return{top:l,height:Math.max(o,c)-l}}computeTargetScrollTopForFrame(e,t){if(this.pendingScrollTarget==null)return e;let n=this.resolveScrollTargetTop(this.pendingScrollTarget);if(n==null)return e;let{scrollAnimation:r}=this;return r==null?n:this.computeSpringStep(r,n,t).position}computeSpringStep(e,t,n){let r=Math.max(0,n-e.lastTimestamp),{omega:i}=this.getSmoothScrollSettings(),a=Math.exp(-i*r),o=e.position-t,s=e.velocity+i*o;return{position:t+(o+s*r)*a,velocity:(s*(1-i*r)-i*o)*a}}advanceScrollAnimation(e,t){if(this.pendingScrollTarget==null)return;let n=this.resolveScrollTargetTop(this.pendingScrollTarget);if(n==null){this.pendingScrollTarget=void 0,this.scrollAnimation=void 0;return}let r=this.scrollAnimation;if(r==null)return n;r.position+=t;let{position:i,velocity:a}=this.computeSpringStep(r,n,e);r.lastTimestamp=e,r.position=i,r.velocity=a;let{positionEpsilon:o,velocityEpsilon:s}=this.getSmoothScrollSettings();return Math.abs(n-i)<=o&&Math.abs(a)<=s?(r.position=n,r.velocity=0,this.scrollAnimation=void 0,n):r.position}computeRenderRangeAndEmit=(t=performance.now())=>{if(e.__STOP||this.container==null||!this.isReady())return;let n=this.getHeight(),r=this.getScrollTop(),i=r,a=this.pendingLayoutAnchor!=null,o=this.getScrollAnchor(i);if(this.layoutDirtyIndex!=null&&(this.recomputeLayout(this.layoutDirtyIndex,this.pendingLayoutReset),this.layoutDirtyIndex=void 0,this.pendingLayoutReset=void 0,a=!0),a&&o!=null){let e=this.resolveAnchoredScrollTop(o);if(e!=null){let t=e-i;i=e,this.scrollAnimation!=null&&(this.scrollAnimation.position+=t)}}a&&(i=this.clampScrollTop(i),this.syncContainerHeight());let s=this.computeTargetScrollTopForFrame(i,t),c=!a&&(this.renderState.scrollTop===-1||Math.abs(s-this.renderState.scrollTop)>n+this.config.overscrollSize*2);c&&(o=void 0),this.windowSpecs=E({scrollTop:s-this.header.height,height:n,scrollHeight:this.getScrollHeight(),fitPerfectly:c,fitPerfectlyOverscroll:this.getFitPerfectlyOverscroll(),overscrollSize:this.config.overscrollSize});let l=r;(this.pendingScrollTarget!=null&&s!==l||this.needsScrollPageUpdate(s))&&(this.applyScrollFix(s,l,this.windowSpecs),l=s);let{top:u,bottom:d}=this.windowSpecs,{firstIndex:f,lastIndex:p}=this.renderState;if(f>=0)for(let e=f;e<=p;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.computeRenderRangeAndEmit: No item at index: ${e}`);t.top>u-t.height&&t.top<=d||this.releaseRenderedItem(t)}let m=this.reconcileHeaderFooterHosts(),h,g=new Set,_=this.findFirstVisibleIndex(u),v=this.findLastVisibleIndex(d);for(let e=_;e<=v;e++){let t=this.items[e];if(t==null)throw Error(`CodeView.computeRenderRangeAndEmit: missing item`);let{instance:n}=t;t.element==null?(t.element=this.acquireElement(),Re(this.stickyContainer,t.element,h),n.virtualizedSetup(),Y(t,t.element)&&(t.renderedOptionsRevision=this.renderOptionsRevision,g.add(t)),h=t.element):(Re(this.stickyContainer,t.element,h),Y(t,void 0,t.renderedOptionsRevision!==this.renderOptionsRevision)&&(t.renderedOptionsRevision=this.renderOptionsRevision,g.add(t)),h=t.element),t.item.edit===!0&&this.attachItemEditor(t)}this.renderState.firstIndex=_<=v?_:-1,this.renderState.lastIndex=v,this.flushSlotCoordinator(),this.flushManagers(g),m&&this.measureMountedHosts(),this.reconcileRenderedItems(g),this.syncContainerHeight(),this.updateStickyPositioning();let y=o==null?void 0:this.resolveAnchoredScrollTop(o);o===this.pendingLayoutAnchor&&(this.pendingLayoutAnchor=void 0);let b=y==null?0:y-i,x=s,S=!1;if(this.pendingScrollTarget!=null){let e=this.advanceScrollAnimation(t,b);e==null?x=i:(x=e,S=!0)}else x=y??s;x!==l&&(this.applyScrollFix(x,l,this.windowSpecs),l=x),S&&this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.renderState.scrollTop=G(l),this.updateStickyPositioning(),this.validateStickyContainerHeight(),this.fixContainerFocus(),(c||this.scrollAnimation!=null)&&this.render()};flushManagers(e){for(let t of e)t.instance.flushManagers()}syncContainerHeight(){let e=this.getPagedScrollHeight();this.container==null||this.containerHeight===e||(this.container.style.height=`${e}px`,this.containerHeight=e)}getStickyBounds(e){let{firstIndex:t,lastIndex:n}=e==null?this.renderState:{firstIndex:this.findFirstVisibleIndex(e.top),lastIndex:this.findLastVisibleIndex(e.bottom)};if(t===-1||n===-1||t>n)return;let r=this.items[t]?.instance.getAdvancedStickySpecs(e),i=this.items[n]?.instance.getAdvancedStickySpecs(e);if(!(r==null||i==null))return{stickyTop:this.getPagedLayoutTop(Math.max(r.topOffset,0)),stickyBottom:this.getPagedLayoutTop(i.topOffset+i.height)}}applyStickyPositioning({stickyTop:e,stickyBottom:t}){let n=this.getHeight(),{itemMetricsCache:r}=this,i=t-e;this.renderState.stickyHeight=i,this.renderState.stickyTop=e,this.renderState.stickyBottom=t,this.stickyOffset.style.height=`${e}px`;let a=(Math.random()*r.lineHeight>>0)*-1,o=-Math.max(i+a,0)+n;this.stickyContainer.style.top=`${o}px`,this.stickyContainer.style.bottom=`${o+r.diffHeaderHeight}px`}syncPagedScrollScaffolding(e){this.syncContainerHeight();let t=this.getStickyBounds(e);t!=null&&this.applyStickyPositioning(t)}reconcileRenderedItems(e){let{firstIndex:t,lastIndex:n}=this.renderState;if(t===-1)return;let r=-1,i=!1;for(let a=t;a<this.items.length&&!(!i&&a>n);a++){let t=this.items[a];if(t==null)throw Error(`CodeView.reconcileRenderedItems: Invalid item`);r===-1?r=t.top:t.top!==r&&(t.top=r,t.instance.syncVirtualizedTop(),i=!0),(e==null?a<=n:e.has(t))&&(t.instance.reconcileHeights()&&(i=!0,t.height=t.instance.getVirtualizedHeight()),this.validateRenderedItemHeight(t)),r+=t.instance.getVirtualizedHeight(),a<this.items.length-1&&(r+=this.getLayout().gap)}i&&r!=null&&(this.scrollDirty=!0,this.scrollHeight=r)}updateStickyPositioning(){let e=this.getStickyBounds();if(e==null)return;let{stickyTop:t,stickyBottom:n}=e;n-t===this.renderState.stickyHeight&&t===this.renderState.stickyTop&&n===this.renderState.stickyBottom||this.applyStickyPositioning(e)}handleScroll=()=>{e.__STOP||(this.suspendScrollInteractions(),this.scrollDirty=!0,this.notifyScroll(),this.render())};clearPendingScroll=()=>{this.pendingScrollTarget=void 0,this.pendingLayoutAnchor=void 0,this.scrollAnimation=void 0};handleResize=e=>{for(let t of e)if(t.target===this.stickyContainer){if(t.borderBoxSize[0].blockSize!==this.renderState.stickyHeight){let e=this.getScrollTop(),t=this.getScrollAnchor(e);this.reconcileRenderedItems(),this.updateStickyPositioning();let n=t==null?void 0:this.resolveAnchoredScrollTop(t);if(n!=null){let t=n-e;this.applyScrollFix(n,e,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=t)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0)}}else if(t.target===this.header.element||t.target===this.footer.element){let e=t.target===this.header.element?this.header:this.footer,n=t.borderBoxSize[0].blockSize;if(n!==e.height){let t=this.getScrollTop(),r=this.getScrollAnchor(t);this.setHostHeight(e,n);let i=r==null?void 0:this.resolveAnchoredScrollTop(r);if(i!=null){let e=i-t;this.applyScrollFix(i,t,this.windowSpecs),this.scrollAnimation!=null&&(this.scrollAnimation.position+=e)}this.pendingScrollTarget!=null&&this.isPendingTargetSettled(this.pendingScrollTarget)&&(this.pendingScrollTarget=void 0,this.scrollAnimation=void 0),this.render()}}else this.scrollDirty=!0,this.heightDirty=!0,this.render()};getScrollAnchorViewportTop(e,t){return e<t?t+this.getStickyHeaderOffset():t}getScrollAnchor(e){if(this.pendingLayoutAnchor!=null)return this.pendingLayoutAnchor;if(e<=0)return;let{firstIndex:t,lastIndex:n,stickyTop:r,stickyBottom:i}=this.renderState;if(t===-1||n===-1)return;let a=this.getHeight();if(!(r===-1||i===-1))for(let r=t;r<=n;r++){let t=this.items[r];if(t==null)continue;let n=this.getItemTopOffset()+t.top;if(n+t.height<=e)continue;if(n>=e+a)break;if(n>=e)return{type:`item`,id:t.item.id,viewportOffset:n-e};let i=this.getScrollAnchorViewportTop(n,e)-n,o=t.instance.getNumericScrollAnchor(i);if(o!=null){let r=n+o.top;return{type:`line`,id:t.item.id,lineNumber:o.lineNumber,side:o.side,viewportOffset:r-e}}}}resolveAnchoredScrollTop(e){let t=this.idToItem.get(e.id);if(t==null)return;let n=this.getItemTopOffset();if(e.type===`item`){let r=n+t.top;return this.clampScrollTop(r-e.viewportOffset)}let r=t.type===`diff`?t.instance.getLinePosition(e.lineNumber,e.side):t.instance.getLinePosition(e.lineNumber);if(r==null)return;let i=n+t.top+r.top;return this.clampScrollTop(i-e.viewportOffset)}applyScrollFix(e,t,n){if(this.root==null)return;let r=G(this.clampScrollTop(e)),i=G(t),{scrollPageOffset:a}=this,o=G(this.clampPagedScrollTop(i-a)),{pagedScrollTop:s,scrollPageOffset:c}=this.resolvePagedScrollPosition(r),l=s,u=a!==c;r===this.renderState.scrollTop&&r===i&&l===o&&!u||(this.suspendScrollInteractions(),(l!==o||u)&&(this.scrollPageOffset=c,this.syncPagedScrollScaffolding(n)),l!==o&&this.root.scrollTo({top:l,behavior:`instant`}),this.renderState.scrollTop=r,this.scrollTop=r,this.scrollDirty=!1)}isPendingTargetSettled(e){let t=this.resolveScrollTargetTop(e);return t==null?!0:G(this.getScrollTop())===G(t)}getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root?.scrollTop??0;return this.scrollTop=this.clampScrollTop(e+this.scrollPageOffset),this.scrollTop}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root?.getBoundingClientRect().height??0,this.height):this.height}getScrollHeight(){return this.scrollHeight}flushSlotCoordinator(){if(this.slotCoordinator==null)return;let e=this.buildSlotSnapshot(this.slotCoordinator);fe(this.slotSnapshot,e)||(this.slotSnapshot=e,this.slotCoordinator.onSnapshotChange(e))}notifyScroll(){if(this.scrollListeners.size===0)return;let e=this.getScrollTop();for(let t of this.scrollListeners)t(e,this)}findFirstVisibleIndex(e){let t=0,n=this.items.length-1,r=this.items.length;for(;t<=n;){let i=t+n>>1,a=this.items[i];if(a==null)throw Error(`CodeView.findFirstVisibleIndex: invalid item index`);a.top+a.height>e?(r=i,n=i-1):t=i+1}return r}findLastVisibleIndex(e){let t=0,n=this.items.length-1,r=-1;for(;t<=n;){let i=t+n>>1,a=this.items[i];if(a==null)throw Error(`CodeView.findLastVisibleIndex: invalid item index`);a.top<=e?(r=i,t=i+1):n=i-1}return r}recomputeLayout(e=0,t){if(this.items.length===0){this.scrollHeight=0;return}let n=this.getLayout(),r=0;if(e>0){let t=this.items[e-1];if(t==null)throw Error(`CodeView.recomputeLayout: invalid dirty index`);r=t.top+t.height+n.gap}for(let i=e;i<this.items.length;i++){let e=this.items[i];if(e==null)throw Error(`CodeView.recomputeLayout: invalid item index`);if(e.top=r,e.type===`diff`){let n=e.instance.consumeCodeViewLayoutChanges(e.item.fileDiff);n!=null&&Object.assign(e.item.fileDiff,n),e.height=e.instance.prepareCodeViewItem(e.item.fileDiff,r,t,e.item.annotations??[])}else e.height=e.instance.prepareCodeViewItem(e.item.file,r,t,e.item.annotations??[]);r+=e.height,i<this.items.length-1&&(r+=n.gap)}r!==this.scrollHeight&&(this.scrollDirty=!0),this.scrollHeight=r}resetRenderState(){this.renderState.scrollTop=-1,this.renderState.firstIndex=-1,this.renderState.lastIndex=-1,this.renderState.stickyHeight=0,this.renderState.stickyTop=-1,this.renderState.stickyBottom=-1}getFitPerfectlyOverscroll(){return this.getLayout().gap+this.itemMetricsCache.diffHeaderHeight}};function je(e){return e.instance.cleanUp(!0),e.type===`diff`?e.instance.prepareCodeViewItem(e.item.fileDiff,e.top,void 0,e.item.annotations??[]):e.instance.prepareCodeViewItem(e.item.file,e.top,void 0,e.item.annotations??[])}function Me(e,t){return!d(e.theme??x,t.theme??x)||(e.themeType??`system`)!==(t.themeType??`system`)||e.unsafeCSS!==t.unsafeCSS}function Ne(e,t){return(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS||(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function Pe(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function Fe(e){return e instanceof SVGElement?!0:p(e)&&(e.hasAttribute(`data-core-css`)||e.hasAttribute(`data-theme-css`)||e.hasAttribute(`data-unsafe-css`))}function Ie(e){let t=Le(e.start,e.side),n=Le(e.end,e.endSide??e.side);return t===n?t:`${t}-${n}`}function Le(e,t){return t==null?`${e}`:`${t===`deletions`?`D`:`A`}${e}`}function Y(e,t,n=!1){return e.type===`diff`?e.instance.render({deferManagers:!0,fileContainer:t,fileDiff:e.item.fileDiff,forceRender:n,lineAnnotations:e.item.annotations??[]}):e.instance.render({deferManagers:!0,fileContainer:t,file:e.item.file,forceRender:n,lineAnnotations:e.item.annotations??[]})}function Re(e,t,n){if(n==null){e.firstChild!==t&&e.prepend(t);return}n.nextSibling!==t&&n.after(t)}function ze(e){return(e.annotations?.length??0)>0}function Be(e,{hasHeaderRenderers:t,hasAnnotationRenderer:n,hasGutterRenderer:r}){if(e.length===0)return;if(t||r)return e;if(!n)return;let i=[];for(let t of e)ze(t.item)&&i.push(t);return i.length>0?i:void 0}var X=e(a(),1),Z=i(),Ve=typeof window>`u`?j.useEffect:j.useLayoutEffect;function He(e){return{instance:void 0,items:void 0,controlled:e,managedOptions:void 0,disableFlushSync:!1,slotCoordinator:void 0}}function Ue(e,t){let{className:n,containerRef:r,createEditor:i,disableWorkerPool:a=!1,initialItems:o,items:s,onItemEditChange:l,onItemEditComplete:u,onScroll:d,onSelectedLinesChange:p,options:h,renderAnnotation:g,renderCodeViewFooter:_,renderCodeViewHeader:v,renderCustomHeader:y,renderGutterUtility:b,renderHeaderFilenameSuffix:x,renderHeaderMetadata:S,renderHeaderPrefix:C,selectedLines:w,style:T}=e,E=s!==void 0,ee=(0,j.useContext)(c),D=(0,j.useRef)(He(E)),O=y!=null,k=g!=null,A=b!=null,M=O||C!=null||x!=null||S!=null,te=M||k||A,N=v!=null,P=_!=null,F=f(e=>{p?.(e)}),I=w!==void 0,L=f(e=>i?.(e)),R=f((e,t,n)=>{l?.(e,t,n)}),z=f((e,t,n)=>{u?.(e,t,n)}),B=(0,j.useMemo)(()=>Je({options:h,hasCustomHeader:O,hasGutterRenderer:A,hasCodeViewHeader:N,hasCodeViewFooter:P,onSelectedLinesChange:p==null?void 0:F,controlledSelection:I,createEditor:i==null?void 0:L,onItemEditChange:l==null?void 0:R,onItemEditComplete:u==null?void 0:z}),[h,O,A,N,P,p,F,I,i,L,l,R,u,z]),[V]=(0,j.useState)(()=>qe()),[,H]=(0,j.useState)({}),ne=f(e=>{D.current.instance!=null&&(e==null||e!==D.current.instance.getContainerElement())&&(D.current.instance.cleanUp(),V.publish(void 0),D.current=He(E)),e!=null&&e!==D.current.instance?.getContainerElement()&&(D.current.instance=new Ae(B,a?void 0:ee,!0),D.current.instance.setup(e)),typeof r==`function`?r(e):r!=null&&(r.current=e)}),U=f(e=>{D.current.disableFlushSync?V.publish(e):(0,X.flushSync)(()=>{V.publish(e)})}),W=(0,j.useMemo)(()=>{if(!(!M&&!k&&!A&&!N&&!P))return{hasHeaderRenderers:M,hasAnnotationRenderer:k,hasGutterRenderer:A,onSnapshotChange:U}},[U,k,A,M,N,P]);return Ve(()=>d==null?void 0:D.current.instance?.subscribeToScroll(d)),Ve(()=>{let{instance:e,controlled:t,items:n,managedOptions:r,slotCoordinator:i}=D.current;if(e!=null)try{D.current.disableFlushSync=!0;let a=!1;if(m(B,r)||(D.current.managedOptions=B,e.setOptions(B),a=!0),t!==E){console.error(`CodeView: cannot switch between controlled and uncontrolled modes. Remount with a new key instead.`);return}if(E)s!==n&&(Ke(n,s)?D.current.items=s:Ge(n,s)?(D.current.items=s,e.addItems(s.slice(n.length))):(D.current.items=s,e.setItems(s),a=!0));else if(n==null){let t=o??[];D.current.items=t,t.length>0&&(e.setItems(t),a=!0)}w!==void 0&&e.setSelectedLines(w,{notify:!1});let c=e.setSlotCoordinator(W),l=!1;W!==i&&((W==null||i==null)&&(l=!0),D.current.slotCoordinator=W),(a||c)&&e.render(!0),c&&W==null&&V.publish(void 0),l&&H({})}finally{D.current.disableFlushSync=!1}}),(0,j.useImperativeHandle)(t,()=>({addItems(e){let{controlled:t,instance:n}=D.current;Q(t,`addItems`),n==null?console.error(`CodeView.addItems: no valid instance to append items with`,e):n.addItems(e)},getItem(e){let{instance:t}=D.current;if(t==null){console.error(`CodeView.getItem: no valid instance exists`,e);return}else return t.getItem(e)},updateItem(e){let{controlled:t,instance:n}=D.current;return Q(t,`updateItem`),n==null?(console.error(`CodeView.updateItem: no valid instance to update item with`,e),!1):n.updateItem(e)},updateItemId(e,t){let{controlled:n,instance:r}=D.current;return Q(n,`updateItemId`),r==null?(console.error(`CodeView.updateItemId: no valid instance to update item id with`,e,t),!1):r.updateItemId(e,t)},scrollTo(e){let{instance:t}=D.current;t==null?console.error(`CodeView.scrollTo: no valid instance to scroll with`,e):t.scrollTo(e)},setSelectedLines(e){let{instance:t}=D.current;t==null?console.error(`CodeView.setSelectedLines: no valid instance to update selection with`,e):(t.setSelectedLines(e,{notify:!1}),F(e))},getSelectedLines(){let{instance:e}=D.current;return e==null?(console.error(`CodeView.getSelectedLines: no valid instance exists`),null):e.getSelectedLines()},clearSelectedLines(){let{instance:e}=D.current;e==null?console.error(`CodeView.clearSelectedLines: no valid instance to update selection with`):(e.clearSelectedLines({notify:!1}),F(null))},getEditor(e){let{instance:t}=D.current;if(t==null){console.error(`CodeView.getEditor: no valid instance exists`,e);return}return t.getEditor(e)},getInstance(){return D.current.instance}}),[F]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`div`,{ref:ne,className:n,style:T}),(te||N||P)&&(0,Z.jsx)(Ye,{managedContentStore:V,renderCustomHeader:y,renderHeaderPrefix:C,renderHeaderFilenameSuffix:x,renderHeaderMetadata:S,renderAnnotation:g,renderGutterUtility:b,renderCodeViewHeader:v,renderCodeViewFooter:_})]})}var We=(0,j.forwardRef)(Ue);function Ge(e,t){if(e==null||t.length<=e.length)return!1;if(e.length===0)return!0;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function Ke(e,t){if(e==null||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Q(e,t){if(e)throw Error(`CodeView.${t} cannot be used when CodeView is controlled. Use initialItems for imperative item updates.`)}function qe(){let e,t=new Set;return{getSnapshot(){return e},publish(n){if(!fe(e,n)){e=n;for(let e of t)e()}},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function Je({options:e,hasCustomHeader:t,hasGutterRenderer:n,hasCodeViewHeader:r,hasCodeViewFooter:i,onSelectedLinesChange:a,controlledSelection:o,createEditor:s,onItemEditChange:c,onItemEditComplete:l}){return!t&&!n&&!r&&!i&&a==null&&!o&&s==null&&c==null&&l==null?e??{}:(e={...e,controlledSelection:o,onSelectedLinesChange:a},s!=null&&(e.createEditor=s),c!=null&&(e.onItemEditChange=c),l!=null&&(e.onItemEditComplete=l),t&&(e.renderCustomHeader=$),n&&(e.renderGutterUtility=$),r&&(e.renderCodeViewHeader=$),i&&(e.renderCodeViewFooter=$),e)}var Ye=(0,j.memo)(function({managedContentStore:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o,renderCodeViewHeader:s,renderCodeViewFooter:c}){"use no memo";let l=f(t=>e.subscribe(t)),u=f(()=>e.getSnapshot()),d=(0,j.useSyncExternalStore)(l,u,u),p=``;for(let e of d?.items??[])p+=`${e.id}:${e.version}:${e.type}`;return(0,Z.jsxs)(Z.Fragment,{children:[(0,j.useMemo)(()=>d?.items?.map(e=>(0,X.createPortal)(Xe({renderedItem:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o}),e.element,e.id)),[t,n,r,i,a,o,p]),(0,j.useMemo)(()=>s!=null&&d?.header!=null?(0,X.createPortal)(s(),d.header):null,[s,d?.header]),(0,j.useMemo)(()=>c!=null&&d?.footer!=null?(0,X.createPortal)(c(),d.footer):null,[c,d?.footer])]})});function Xe({renderedItem:e,renderCustomHeader:t,renderHeaderPrefix:n,renderHeaderFilenameSuffix:r,renderHeaderMetadata:i,renderAnnotation:a,renderGutterUtility:o}){if(e.type===`diff`){let{item:s,instance:c}=e;return ee({fileDiff:s.fileDiff,renderCustomHeader:t==null?void 0:()=>t(s),renderHeaderPrefix:n==null?void 0:()=>n(s),renderHeaderFilenameSuffix:r==null?void 0:()=>r(s),renderHeaderMetadata:i==null?void 0:()=>i(s),renderAnnotation:a==null?void 0:e=>a(e,s),lineAnnotations:s.annotations,renderGutterUtility:o==null?void 0:e=>o(e,s),getHoveredLine:c.getHoveredLine})}else{let{item:s,instance:c}=e;return k({file:s.file,renderCustomHeader:t==null?void 0:()=>t(s),renderHeaderPrefix:n==null?void 0:()=>n(s),renderHeaderFilenameSuffix:r==null?void 0:()=>r(s),renderHeaderMetadata:i==null?void 0:()=>i(s),renderAnnotation:a==null?void 0:e=>a(e,s),lineAnnotations:s.annotations,renderGutterUtility:o==null?void 0:e=>o(e,s),getHoveredLine:c.getHoveredLine})}}function $(){}var Ze=t(),Qe=`${u}
|
|
2
2
|
:is(
|
|
3
3
|
[data-line],
|
|
4
4
|
[data-line-annotation],
|
|
@@ -244,5 +244,5 @@ import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{v as t,y as n}from"./a
|
|
|
244
244
|
transition: none;
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
`;function $e(e){let t=(0,Ze.c)(18),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({options:r,viewerRef:o,className:n,unsafeCSSExtra:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===o?s=t[7]:(s=o?{ref:o}:{},t[6]=o,t[7]=s);let c=n?`diff-render-surface [--code-background:var(--background)] outline-none ${n}`:`diff-render-surface [--code-background:var(--background)] outline-none`,l=a?`${Qe}\n${a}`:Qe,u,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u={diffHeaderHeight:32,hunkSeparatorHeight:24,spacing:0,paddingTop:0,paddingBottom:8},d={paddingTop:0,paddingBottom:0,gap:0},t[8]=u,t[9]=d):(u=t[8],d=t[9]);let f;t[10]!==r||t[11]!==l?(f={...r,unsafeCSS:l,itemMetrics:u,layout:d},t[10]=r,t[11]=l,t[12]=f):f=t[12];let p;return t[13]!==i||t[14]!==s||t[15]!==c||t[16]!==f?(p=(0,Z.jsx)(We,{...i,...s,className:c,options:f}),t[13]=i,t[14]=s,t[15]=c,t[16]=f,t[17]=p):p=t[17],p}function et(e,t){return async n=>{let r=
|
|
248
|
-
//# sourceMappingURL=diffFileContents-
|
|
247
|
+
`;function $e(e){let t=(0,Ze.c)(18),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({options:r,viewerRef:o,className:n,unsafeCSSExtra:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s;t[6]===o?s=t[7]:(s=o?{ref:o}:{},t[6]=o,t[7]=s);let c=n?`diff-render-surface [--code-background:var(--background)] outline-none ${n}`:`diff-render-surface [--code-background:var(--background)] outline-none`,l=a?`${Qe}\n${a}`:Qe,u,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u={diffHeaderHeight:32,hunkSeparatorHeight:24,spacing:0,paddingTop:0,paddingBottom:8},d={paddingTop:0,paddingBottom:0,gap:0},t[8]=u,t[9]=d):(u=t[8],d=t[9]);let f;t[10]!==r||t[11]!==l?(f={...r,unsafeCSS:l,itemMetrics:u,layout:d},t[10]=r,t[11]=l,t[12]=f):f=t[12];let p;return t[13]!==i||t[14]!==s||t[15]!==c||t[16]!==f?(p=(0,Z.jsx)(We,{...i,...s,className:c,options:f}),t[13]=i,t[14]=s,t[15]=c,t[16]=f,t[17]=p):p=t[17],p}function et(e,t){return async n=>{let r=w(n),i=n.prevName?w({...n,name:n.prevName}):r,a=await e({changeType:n.type,oldPath:i,newPath:r}),o={name:r,contents:a.newContents,cacheKey:`${t}:new:${r}`};return n.type===`rename-pure`?{oldFile:null,newFile:o}:{oldFile:{name:i,contents:a.oldContents,cacheKey:`${t}:old:${i}`},newFile:o}}}function tt(e,t){return et(async({changeType:n,oldPath:r,newPath:i})=>{let a=await e({environmentId:t.environmentId,input:{cwd:t.cwd,threadId:t.threadId,sourceKind:t.sourceKind,changeType:n,baseRef:t.baseRef,headRef:t.headRef,oldPath:r,newPath:i}});if(a._tag!==`Success`)throw o(a);return a.value},t.cacheKey)}function nt(e,t){return et(async({changeType:n,oldPath:r,newPath:i})=>{let a=await e({environmentId:t.environmentId,input:{...t.reference,...t.commit===null?{}:{commit:t.commit},changeType:n,oldPath:r,newPath:i}});if(a._tag!==`Success`)throw o(a);return a.value},t.cacheKey)}export{de as a,ue as i,nt as n,le as o,$e as r,H as s,tt as t};
|
|
248
|
+
//# sourceMappingURL=diffFileContents-CHRsIT6_.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{v as t,y as n}from"./accountData-C4ZvicpJ.js";import{Bo as r,do as i,t as a,wo as o}from"./utils-DgzD4MA_.js";import"./textarea-5SMJbr7K.js";import{t as s}from"./input-BbliVf4z.js";var c=e(n(),1),l=new Map([[`bold`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),c.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),u=Object.defineProperty,d=Object.defineProperties,f=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||={})m.call(t,n)&&g(e,n,t[n]);if(p)for(var n of p(t))h.call(t,n)&&g(e,n,t[n]);return e},v=(e,t)=>d(e,f(t)),y=(0,c.forwardRef)((e,t)=>c.createElement(o,v(_({ref:t},e),{weights:l})));y.displayName=`ArrowClockwise`;var b=t(),x=r(),S=i(`relative inline-flex w-full min-w-0 items-center rounded-[var(--control-radius)] border text-base text-foreground ring-ring/24 transition-shadow has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/64 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/16 has-[textarea]:h-auto has-data-[align=block-end]:h-auto has-data-[align=block-start]:h-auto has-data-[align=block-end]:flex-col has-data-[align=block-start]:flex-col has-[input:focus-visible,textarea:focus-visible]:border-ring has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/36 has-autofill:bg-foreground/4 has-[input:disabled,textarea:disabled]:opacity-64 has-[input:disabled,textarea:disabled,input:focus-visible,textarea:focus-visible,input[aria-invalid],textarea[aria-invalid]]:shadow-none has-[input:focus-visible,textarea:focus-visible]:ring-[3px] sm:text-sm dark:has-autofill:bg-foreground/8 dark:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/24 has-data-[align=inline-start]:**:[[data-size=sm]_input]:ps-1.5 has-data-[align=inline-end]:**:[[data-size=sm]_input]:pe-1.5 *:[[data-slot=input-control],[data-slot=textarea-control]]:contents *:[[data-slot=input-control],[data-slot=textarea-control]]:before:hidden has-[[data-align=block-start],[data-align=block-end]]:**:[input]:h-auto has-data-[align=inline-start]:**:[input]:ps-2 has-data-[align=inline-end]:**:[input]:pe-2 has-data-[align=block-end]:**:[input]:pt-1.5 has-data-[align=block-start]:**:[input]:pb-1.5 **:[textarea]:min-h-20.5 **:[textarea]:resize-none **:[textarea]:py-[calc(--spacing(3)-1px)] **:[textarea]:max-sm:min-h-23.5 **:[textarea_button]:rounded-[calc(var(--control-radius)-1px)]`,{defaultVariants:{variant:`default`},variants:{variant:{default:`border-input bg-background not-dark:bg-clip-padding shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--control-radius)-1px)] not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_-1px_--theme(--color-white/6%)]`,ghost:`border-transparent bg-transparent shadow-none hover:bg-muted/40 has-[input:focus-visible,textarea:focus-visible]:bg-background`}}});function C(e){let t=(0,b.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o;t[4]!==n||t[5]!==i?(o=a(S({variant:i}),n),t[4]=n,t[5]=i,t[6]=o):o=t[6];let s;return t[7]!==r||t[8]!==o?(s=(0,x.jsx)(`div`,{className:o,"data-slot":`input-group`,role:`group`,...r}),t[7]=r,t[8]=o,t[9]=s):s=t[9],s}var w=i(`[&_svg]:-mx-0.5 flex h-auto cursor-text select-none items-center justify-center gap-2 leading-none [&>kbd]:rounded-[calc(var(--radius)-5px)] in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 not-has-[button]:**:[svg:not([class*='opacity-'])]:opacity-80`,{defaultVariants:{align:`inline-start`},variants:{align:{"block-end":`order-last w-full justify-start px-[calc(--spacing(3)-1px)] pb-[calc(--spacing(3)-1px)] [.border-t]:pt-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]`,"block-start":`order-first w-full justify-start px-[calc(--spacing(3)-1px)] pt-[calc(--spacing(3)-1px)] [.border-b]:pb-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]`,"inline-end":`has-[>:last-child[data-slot=badge]]:-me-1.5 has-[>button]:-me-2 order-last pe-[calc(--spacing(3)-1px)] has-[>kbd:last-child]:me-[-0.35rem] [[data-size=sm]+&]:pe-[calc(--spacing(2.5)-1px)]`,"inline-start":`has-[>:last-child[data-slot=badge]]:-ms-1.5 has-[>button]:-ms-2 order-first ps-[calc(--spacing(3)-1px)] has-[>kbd:last-child]:ms-[-0.35rem] [[data-size=sm]+&]:ps-[calc(--spacing(2.5)-1px)]`}}});function T(e){let t=(0,b.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=i===void 0?`inline-start`:i,s;t[4]!==o||t[5]!==n?(s=a(w({align:o}),n),t[4]=o,t[5]=n,t[6]=s):s=t[6];let c;return t[7]!==o||t[8]!==r||t[9]!==s?(c=(0,x.jsx)(`div`,{className:s,"data-align":o,"data-slot":`input-group-addon`,onMouseDown:E,...r}),t[7]=o,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function E(e){if(e.target.closest(`button, a, input, select, textarea, [role='button'], [role='combobox'], [role='listbox'], [data-slot='select-trigger']`))return;e.preventDefault();let t=e.currentTarget.parentElement,n=t?.querySelector(`input, textarea`);n&&!t?.querySelector(`input:focus, textarea:focus`)&&n.focus()}function D(e){let t=(0,b.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,x.jsx)(s,{className:n,unstyled:!0,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function O(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance p-6 text-center md:p-12`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,x.jsx)(`div`,{className:i,"data-slot":`empty`,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function k(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex max-w-sm flex-col items-center text-center`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-header`,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}var A=i(`flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent`,icon:`relative flex size-10 shrink-0 items-center justify-center rounded-control bg-canvas-quiet text-foreground [&_svg:not([class*='size-'])]:size-4.5`}}});function j(e){let t=(0,b.c)(21),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let o=i===void 0?`default`:i,s;t[4]===n?s=t[5]:(s=a(`relative mb-6`,n),t[4]=n,t[5]=s);let c;t[6]!==n||t[7]!==o?(c=o===`icon`&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{"aria-hidden":`true`,className:a(A({className:n,variant:o}),`-translate-x-0.5 -rotate-10 pointer-events-none absolute bottom-px origin-bottom-left scale-84 shadow-none`)}),(0,x.jsx)(`div`,{"aria-hidden":`true`,className:a(A({className:n,variant:o}),`pointer-events-none absolute bottom-px origin-bottom-right translate-x-0.5 rotate-10 scale-84 shadow-none`)})]}),t[6]=n,t[7]=o,t[8]=c):c=t[8];let l;t[9]!==n||t[10]!==o?(l=a(A({className:n,variant:o})),t[9]=n,t[10]=o,t[11]=l):l=t[11];let u;t[12]!==r||t[13]!==l?(u=(0,x.jsx)(`div`,{className:l,...r}),t[12]=r,t[13]=l,t[14]=u):u=t[14];let d;return t[15]!==r||t[16]!==s||t[17]!==c||t[18]!==u||t[19]!==o?(d=(0,x.jsxs)(`div`,{className:s,"data-slot":`empty-media`,"data-variant":o,...r,children:[c,u]}),t[15]=r,t[16]=s,t[17]=c,t[18]=u,t[19]=o,t[20]=d):d=t[20],d}function M(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`font-serif text-[26px] font-normal leading-[1.15] tracking-[-0.01em]`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-title`,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function N(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`text-muted-foreground text-sm [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-description`,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}function P(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=a(`flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-content`,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}export{j as a,T as c,k as i,D as l,P as n,M as o,N as r,C as s,O as t,y as u};
|
|
2
|
-
//# sourceMappingURL=empty-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{v as t,y as n}from"./accountData-BKyjOPQm.js";import{Eo as r,Ho as i,mo as a,t as o}from"./utils-ClZ5OxbV.js";import"./textarea-BT0tVWKM.js";import{t as s}from"./input-CyCAHFxI.js";var c=e(n(),1),l=new Map([[`bold`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),c.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,c.createElement(c.Fragment,null,c.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),u=Object.defineProperty,d=Object.defineProperties,f=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,g=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||={})m.call(t,n)&&g(e,n,t[n]);if(p)for(var n of p(t))h.call(t,n)&&g(e,n,t[n]);return e},v=(e,t)=>d(e,f(t)),y=(0,c.forwardRef)((e,t)=>c.createElement(r,v(_({ref:t},e),{weights:l})));y.displayName=`ArrowClockwise`;var b=t(),x=i(),S=a(`relative inline-flex w-full min-w-0 items-center rounded-[var(--control-radius)] border text-base text-foreground ring-ring/24 transition-shadow has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/64 has-[input:focus-visible,textarea:focus-visible]:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/16 has-[textarea]:h-auto has-data-[align=block-end]:h-auto has-data-[align=block-start]:h-auto has-data-[align=block-end]:flex-col has-data-[align=block-start]:flex-col has-[input:focus-visible,textarea:focus-visible]:border-ring has-[input[aria-invalid],textarea[aria-invalid]]:border-destructive/36 has-autofill:bg-foreground/4 has-[input:disabled,textarea:disabled]:opacity-64 has-[input:disabled,textarea:disabled,input:focus-visible,textarea:focus-visible,input[aria-invalid],textarea[aria-invalid]]:shadow-none has-[input:focus-visible,textarea:focus-visible]:ring-[3px] sm:text-sm dark:has-autofill:bg-foreground/8 dark:has-[input[aria-invalid],textarea[aria-invalid]]:ring-destructive/24 has-data-[align=inline-start]:**:[[data-size=sm]_input]:ps-1.5 has-data-[align=inline-end]:**:[[data-size=sm]_input]:pe-1.5 *:[[data-slot=input-control],[data-slot=textarea-control]]:contents *:[[data-slot=input-control],[data-slot=textarea-control]]:before:hidden has-[[data-align=block-start],[data-align=block-end]]:**:[input]:h-auto has-data-[align=inline-start]:**:[input]:ps-2 has-data-[align=inline-end]:**:[input]:pe-2 has-data-[align=block-end]:**:[input]:pt-1.5 has-data-[align=block-start]:**:[input]:pb-1.5 **:[textarea]:min-h-20.5 **:[textarea]:resize-none **:[textarea]:py-[calc(--spacing(3)-1px)] **:[textarea]:max-sm:min-h-23.5 **:[textarea_button]:rounded-[calc(var(--control-radius)-1px)]`,{defaultVariants:{variant:`default`},variants:{variant:{default:`border-input bg-background not-dark:bg-clip-padding shadow-xs/5 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--control-radius)-1px)] not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:not-has-[input:disabled,textarea:disabled]:not-has-[input:focus-visible,textarea:focus-visible]:not-has-[input[aria-invalid],textarea[aria-invalid]]:before:shadow-[0_-1px_--theme(--color-white/6%)]`,ghost:`border-transparent bg-transparent shadow-none hover:bg-muted/40 has-[input:focus-visible,textarea:focus-visible]:bg-background`}}});function C(e){let t=(0,b.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]!==n||t[5]!==i?(a=o(S({variant:i}),n),t[4]=n,t[5]=i,t[6]=a):a=t[6];let s;return t[7]!==r||t[8]!==a?(s=(0,x.jsx)(`div`,{className:a,"data-slot":`input-group`,role:`group`,...r}),t[7]=r,t[8]=a,t[9]=s):s=t[9],s}var w=a(`[&_svg]:-mx-0.5 flex h-auto cursor-text select-none items-center justify-center gap-2 leading-none [&>kbd]:rounded-[calc(var(--radius)-5px)] in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4.5 sm:in-[[data-slot=input-group]:has([data-slot=input-control],[data-slot=textarea-control])]:[&_svg:not([class*='size-'])]:size-4 not-has-[button]:**:[svg:not([class*='opacity-'])]:opacity-80`,{defaultVariants:{align:`inline-start`},variants:{align:{"block-end":`order-last w-full justify-start px-[calc(--spacing(3)-1px)] pb-[calc(--spacing(3)-1px)] [.border-t]:pt-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]`,"block-start":`order-first w-full justify-start px-[calc(--spacing(3)-1px)] pt-[calc(--spacing(3)-1px)] [.border-b]:pb-[calc(--spacing(3)-1px)] [[data-size=sm]+&]:px-[calc(--spacing(2.5)-1px)]`,"inline-end":`has-[>:last-child[data-slot=badge]]:-me-1.5 has-[>button]:-me-2 order-last pe-[calc(--spacing(3)-1px)] has-[>kbd:last-child]:me-[-0.35rem] [[data-size=sm]+&]:pe-[calc(--spacing(2.5)-1px)]`,"inline-start":`has-[>:last-child[data-slot=badge]]:-ms-1.5 has-[>button]:-ms-2 order-first ps-[calc(--spacing(3)-1px)] has-[>kbd:last-child]:ms-[-0.35rem] [[data-size=sm]+&]:ps-[calc(--spacing(2.5)-1px)]`}}});function T(e){let t=(0,b.c)(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,align:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`inline-start`:i,s;t[4]!==a||t[5]!==n?(s=o(w({align:a}),n),t[4]=a,t[5]=n,t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==r||t[9]!==s?(c=(0,x.jsx)(`div`,{className:s,"data-align":a,"data-slot":`input-group-addon`,onMouseDown:E,...r}),t[7]=a,t[8]=r,t[9]=s,t[10]=c):c=t[10],c}function E(e){if(e.target.closest(`button, a, input, select, textarea, [role='button'], [role='combobox'], [role='listbox'], [data-slot='select-trigger']`))return;e.preventDefault();let t=e.currentTarget.parentElement,n=t?.querySelector(`input, textarea`);n&&!t?.querySelector(`input:focus, textarea:focus`)&&n.focus()}function D(e){let t=(0,b.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;return t[3]!==n||t[4]!==r?(i=(0,x.jsx)(s,{className:n,unstyled:!0,...r}),t[3]=n,t[4]=r,t[5]=i):i=t[5],i}function O(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance p-6 text-center md:p-12`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,x.jsx)(`div`,{className:i,"data-slot":`empty`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function k(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex max-w-sm flex-col items-center text-center`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var A=a(`flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{defaultVariants:{variant:`default`},variants:{variant:{default:`bg-transparent`,icon:`relative flex size-10 shrink-0 items-center justify-center rounded-control bg-canvas-quiet text-foreground [&_svg:not([class*='size-'])]:size-4.5`}}});function j(e){let t=(0,b.c)(21),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,variant:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`default`:i,s;t[4]===n?s=t[5]:(s=o(`relative mb-6`,n),t[4]=n,t[5]=s);let c;t[6]!==n||t[7]!==a?(c=a===`icon`&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`div`,{"aria-hidden":`true`,className:o(A({className:n,variant:a}),`-translate-x-0.5 -rotate-10 pointer-events-none absolute bottom-px origin-bottom-left scale-84 shadow-none`)}),(0,x.jsx)(`div`,{"aria-hidden":`true`,className:o(A({className:n,variant:a}),`pointer-events-none absolute bottom-px origin-bottom-right translate-x-0.5 rotate-10 scale-84 shadow-none`)})]}),t[6]=n,t[7]=a,t[8]=c):c=t[8];let l;t[9]!==n||t[10]!==a?(l=o(A({className:n,variant:a})),t[9]=n,t[10]=a,t[11]=l):l=t[11];let u;t[12]!==r||t[13]!==l?(u=(0,x.jsx)(`div`,{className:l,...r}),t[12]=r,t[13]=l,t[14]=u):u=t[14];let d;return t[15]!==r||t[16]!==s||t[17]!==c||t[18]!==u||t[19]!==a?(d=(0,x.jsxs)(`div`,{className:s,"data-slot":`empty-media`,"data-variant":a,...r,children:[c,u]}),t[15]=r,t[16]=s,t[17]=c,t[18]=u,t[19]=a,t[20]=d):d=t[20],d}function M(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`font-serif text-[26px] font-normal leading-[1.15] tracking-[-0.01em]`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function N(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-muted-foreground text-sm [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function P(e){let t=(0,b.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,x.jsx)(`div`,{className:i,"data-slot":`empty-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{j as a,T as c,k as i,D as l,P as n,M as o,N as r,C as s,O as t,y as u};
|
|
2
|
+
//# sourceMappingURL=empty-DUUjhkFh.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as e,v as t}from"./accountData-BKyjOPQm.js";import{dt as n,gt as r,ht as i,mt as a,yo as o}from"./utils-ClZ5OxbV.js";import{Cn as s,Dn as c,On as l,et as u,jn as d,p as f}from"./session-Dmu9Hk5C.js";import{St as p,T as m,it as h,w as g}from"./textarea-BT0tVWKM.js";import{H as _}from"./useSettings-GEQSU1F5.js";var v=new Set([`pull-request`]);function y(e,t){return t||!v.has(e)}function b(e,t){return e.filter(e=>y(e.kind,t))}var ee=e(`borgcode:right-panel-state:v2`),x=12,S=e=>e.endsWith(`:pull-requests-panel`),C={isOpen:!1,activeSurfaceId:null,surfaces:[]},w=e=>{switch(e){case`diff`:return{id:`diff`,kind:e};case`files`:return{id:`files`,kind:e};case`file-preview`:return{id:`file-preview`,kind:e,relativePath:null,revealLine:null,revealRequestId:0};case`agents`:return{id:`agents`,kind:e}}},T=e=>e?{id:`browser:${e}`,kind:`preview`,resourceId:e}:{id:`browser:new`,kind:`preview`,resourceId:null},E=(e,t,n)=>({id:`file:${e}`,kind:`file`,relativePath:e,revealLine:t,revealRequestId:n}),te=e=>({id:`terminal:${e}`,kind:`terminal`,resourceId:e,terminalIds:[e],activeTerminalId:e});function ne(e){return`pull-request:${e.environmentId===void 0?``:`${encodeURIComponent(e.environmentId)}:`}${encodeURIComponent(e.projectId)}:${encodeURIComponent(e.repository)}:${e.number}`}function D(e){return{id:ne(e),kind:`pull-request`,...e.environmentId===void 0?{}:{environmentId:e.environmentId},projectId:e.projectId,repository:e.repository,number:e.number}}function re(e,t,n){return e[t]?.state===n.state&&e[t]?.isDraft===n.isDraft?e:{...e,[t]:n}}var O=(e,t,n=!0)=>({isOpen:!0,surfaces:e.surfaces.some(e=>e.id===t.id)?e.surfaces:[...e.surfaces,t],activeSurfaceId:n?t.id:e.activeSurfaceId}),k=(e,t,n)=>{let r=e[t]??C,i=n(r);if(!i.isOpen&&i.activeSurfaceId===null&&i.surfaces.length===0){if(!(t in e))return e;let{[t]:n,...r}=e;return r}return i===r?e:{...e,[t]:i}};function A(e){return e===void 0||!Number.isFinite(e)?null:Math.max(1,Math.trunc(e))}function j(e){return!e||typeof e!=`object`?{byThreadKey:{}}:{byThreadKey:`byThreadKey`in e&&e.byThreadKey&&typeof e.byThreadKey==`object`?Object.fromEntries(Object.entries(e.byThreadKey).filter(([e])=>!S(e)).map(([e,t])=>{let n=t&&typeof t==`object`?t:null,r=Array.isArray(n?.surfaces)?n.surfaces.flatMap(e=>{let t=e.kind;if(t===`plan`||t===`design`)return[];if(e.kind===`file`){let t=typeof e.revealLine==`number`&&Number.isFinite(e.revealLine)?Math.max(1,Math.trunc(e.revealLine)):null,n=typeof e.revealRequestId==`number`&&Number.isSafeInteger(e.revealRequestId)&&e.revealRequestId>=0?e.revealRequestId:0;return[{...e,revealLine:t,revealRequestId:n}]}if(e.kind===`pull-request`){if(typeof e.projectId!=`string`||typeof e.repository!=`string`||typeof e.number!=`number`||!Number.isSafeInteger(e.number)||e.number<1)return[];let{environmentId:t,...n}=e;return[D({...n,...typeof t==`string`?{environmentId:t}:{}})]}if(e.kind!==`terminal`)return[e];if(!(`resourceId`in e)||typeof e.resourceId!=`string`||e.id!==`terminal:${e.resourceId}`)return[];let n=`terminalIds`in e&&Array.isArray(e.terminalIds)?[...new Set(e.terminalIds.filter(e=>typeof e==`string`))]:[e.resourceId],r=`activeTerminalId`in e&&typeof e.activeTerminalId==`string`&&n.includes(e.activeTerminalId)?e.activeTerminalId:n[0]??e.resourceId;return[{...e,terminalIds:n.length>0?n:[e.resourceId],activeTerminalId:r}]}):[],i=n?.activeSurfaceId,a=r.some(e=>e.id===i)?i??null:i===`pull-request`?r.find(e=>e.kind===`pull-request`)?.id??null:null,o=r.length>0&&(typeof n?.isOpen==`boolean`?n.isOpen:a!==null);return[e,{isOpen:o,surfaces:r,activeSurfaceId:a??(o?r[0]?.id??null:null)}]})):{}}}var M=r()(i(e=>({byThreadKey:{},open:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>n===`preview`?O(e,e.surfaces.find(e=>e.kind===`preview`)??T(null)):O(e,w(n)))})),openBrowser:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=T(n),r=n?e.surfaces.filter(e=>e.id!==`browser:new`):e.surfaces;return O({...e,surfaces:r},t)})})),selectFilePreview:(t,n,r)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.find(e=>e.kind===`file-preview`),i={id:`file-preview`,kind:`file-preview`,relativePath:n,revealLine:A(r),revealRequestId:(t?.kind===`file-preview`?t.revealRequestId:0)+1};return O({...e,surfaces:e.surfaces.map(e=>e.kind===`file-preview`?i:e)},i)})})),openPullRequest:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>O(e,D(n)))})),openFile:(t,n,r)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.filter(e=>e.kind!==`files`),i=`file:${n}`,a=t.find(e=>e.id===i&&e.kind===`file`),o=E(n,A(r),(a?.revealRequestId??0)+1);return{isOpen:!0,activeSurfaceId:o.id,surfaces:a?t.map(e=>e.id===o.id?o:e):[...t,o]}})})),openTerminal:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>O(e,te(n)))})),splitTerminal:(t,n,r,i=`horizontal`)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>({...e,isOpen:!0,activeSurfaceId:n,surfaces:e.surfaces.map(e=>{if(e.id!==n||e.kind!==`terminal`)return e;let{splitDirection:t,...a}=e;return{...a,terminalIds:e.terminalIds.includes(r)?e.terminalIds:[...e.terminalIds,r],activeTerminalId:r,...i===`vertical`?{splitDirection:`vertical`}:{}}})}))})),activateTerminal:(t,n,r)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>({...e,activeSurfaceId:n,surfaces:e.surfaces.map(e=>e.id===n&&e.kind===`terminal`&&e.terminalIds.includes(r)?{...e,activeTerminalId:r}:e)}))})),closeTerminal:(t,n,r)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.find(e=>e.id===n&&e.kind===`terminal`);if(!t||t.kind!==`terminal`)return e;let i=t.terminalIds.filter(e=>e!==r);if(i.length===0){let t=e.surfaces.findIndex(e=>e.id===n),r=e.surfaces.filter(e=>e.id!==n),i=r[Math.min(t,r.length-1)]??null;return{...e,isOpen:r.length>0&&e.isOpen,surfaces:r,activeSurfaceId:e.activeSurfaceId===n?i?.id??null:e.activeSurfaceId}}return{...e,surfaces:e.surfaces.map(e=>e.id===n&&e.kind===`terminal`?{...e,terminalIds:i,activeTerminalId:e.activeTerminalId===r?i.at(-1)??i[0]:e.activeTerminalId}:e)}})})),activateSurface:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>e.surfaces.some(e=>e.id===n)?{...e,isOpen:!0,activeSurfaceId:n}:e)})),closeSurface:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.findIndex(e=>e.id===n);if(t<0)return e;let r=e.surfaces.filter(e=>e.id!==n);if(e.activeSurfaceId!==n)return{...e,isOpen:r.length>0&&e.isOpen,surfaces:r};let i=r[Math.min(t,r.length-1)]??null;return{...e,isOpen:r.length>0&&e.isOpen,surfaces:r,activeSurfaceId:i?.id??null}})})),closeOtherSurfaces:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.find(e=>e.id===n);return!t||e.surfaces.length===1?e:{...e,isOpen:!0,surfaces:[t],activeSurfaceId:t.id}})})),closeSurfacesToRight:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.findIndex(e=>e.id===n);if(t<0||t===e.surfaces.length-1)return e;let r=e.surfaces.slice(0,t+1),i=r.some(t=>t.id===e.activeSurfaceId);return{...e,surfaces:r,activeSurfaceId:i?e.activeSurfaceId:n}})})),closeAllSurfaces:t=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>e.surfaces.length===0?e:{...e,isOpen:!1,surfaces:[],activeSurfaceId:null})})),reconcileBrowserSurfaces:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=new Set(n.map(e=>`browser:${e}`)),r=e.surfaces.filter(e=>e.kind!==`preview`),i=e.surfaces.filter(e=>e.kind===`preview`&&e.id!==`browser:new`&&t.has(e.id)),a=new Set(i.map(e=>e.id)),o=n.filter(e=>!a.has(`browser:${e}`)).map(e=>T(e)),s=[...r,...i,...o],c=s.some(t=>t.id===e.activeSurfaceId),l=s.find(e=>e.kind===`preview`);return{...e,surfaces:s,activeSurfaceId:c?e.activeSurfaceId:l?.id??s[0]?.id??null}})})),reconcileFileSurfaces:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{if(n)return e;let t=e.surfaces.filter(e=>e.kind!==`files`&&e.kind!==`file`);if(t.length===e.surfaces.length)return e;let r=t.some(t=>t.id===e.activeSurfaceId);return{...e,isOpen:t.length>0?e.isOpen:!1,surfaces:t,activeSurfaceId:r?e.activeSurfaceId:t.at(-1)?.id??null}})})),show:t=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>e.isOpen?e:{...e,isOpen:!0})})),close:t=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>e.isOpen?{...e,isOpen:!1}:e)})),toggleVisibility:t=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>({...e,isOpen:!e.isOpen}))})),toggle:(t,n)=>e(e=>({byThreadKey:k(e.byThreadKey,o(t),e=>{let t=e.surfaces.find(t=>t.id===e.activeSurfaceId);return e.isOpen&&t?.kind===n?{...e,isOpen:!1}:n===`preview`?O(e,e.surfaces.find(e=>e.kind===`preview`)??T(null)):O(e,w(n))})})),removeThread:t=>e(e=>{let n=o(t);if(!(n in e.byThreadKey))return e;let{[n]:r,...i}=e.byThreadKey;return{byThreadKey:i}})}),{name:ee,version:x,storage:a(()=>n(typeof window<`u`?window.localStorage:void 0)),partialize:e=>({byThreadKey:Object.fromEntries(Object.entries(e.byThreadKey).filter(([e])=>!S(e)))}),migrate:j}));function N(e,t){return t?e[o(t)]??C:C}function P(e,t){let n=N(e,t);return n.isOpen?n.surfaces.find(e=>e.id===n.activeSurfaceId)?.kind??null:null}function F(e,t){return N(e,t).isOpen?I(e,t):null}function I(e,t){let n=N(e,t);return n.surfaces.find(e=>e.id===n.activeSurfaceId)??null}var L=t(),R=Object.freeze([]),z=Object.freeze([]),B=Object.freeze([]),V=Object.freeze([]),H=Object.freeze([]),U=l(null).pipe(d(`web-project:empty`));l(R).pipe(d(`web-project-refs:empty`));var W=l(z).pipe(d(`web-thread-refs:empty`)),G=l(null).pipe(d(`web-thread-shell:empty`)),K=l(null).pipe(d(`web-thread-detail:empty`)),q=l(`empty`).pipe(d(`web-thread-status:empty`));l(B).pipe(d(`web-thread-messages:empty`)),l(V).pipe(d(`web-thread-activities:empty`)),l(H).pipe(d(`web-thread-proposed-plans:empty`)),l(null).pipe(d(`web-thread-session:empty`));var J=l(null).pipe(c,d(`web-active-environment-id`));function Y(){return s(J)}function X(e){f.set(J,e)}function ie(){return s(m.threadRefsAtom)}function ae(e){let t=(0,L.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?W:m.environmentThreadRefsAtom(e),t[0]=e,t[1]=n),s(n)}function oe(){return s(h.projectsAtom)}function se(){return s(_)}function ce(){return s(m.threadShellsAtom)}function le(){return s(p)}function ue(e){let t=(0,L.c)(2),n;return t[0]===e?n=t[1]:(n=m.threadShellsForProjectRefsAtom(e),t[0]=e,t[1]=n),s(n)}function de(e){let t=(0,L.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?U:h.projectAtom(e),t[0]=e,t[1]=n),s(n)}function Z(e){let t=(0,L.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?G:m.threadShellAtom(e),t[0]=e,t[1]=n),s(n)}function Q(e){let t=(0,L.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?K:g.detailAtom(e),t[0]=e,t[1]=n),s(n)}function fe(e){let t=(0,L.c)(2),n;return t[0]===e?n=t[1]:(n=e===null?q:g.statusAtom(e),t[0]=e,t[1]=n),s(n)}function pe(e,t){return e!==null&&(!t.waitForShell||t.shellExists)?e:null}function me(e,t){let n=(0,L.c)(7),r=Z(e),i=r!==null,a=t?.waitForShell===!0,o;n[0]!==e||n[1]!==i||n[2]!==a?(o=pe(e,{shellExists:i,waitForShell:a}),n[0]=e,n[1]=i,n[2]=a,n[3]=o):o=n[3];let s=Q(o),c;return n[4]!==s||n[5]!==r?(c=u(s,r),n[4]=s,n[5]=r,n[6]=c):c=n[6],c}function he(e){return f.get(h.projectAtom(e))}function ge(e){return f.get(m.threadShellAtom(e))}function $(e){return f.get(_).get(e)?.environment.capabilities.threadSettlement===!0}function _e(e){return f.get(_).get(e)?.environment.capabilities.threadSnooze===!0}function ve(e){return f.get(_).get(e)?.environment.capabilities.threadPublish===!0}function ye(e){return f.get(_).get(e)?.environment.capabilities.threadPinning===!0}function be(e){return f.get(_).get(e)?.environment.capabilities.threadTitleRegeneration===!0}function xe(e){return f.get(_).get(e)?.environment.capabilities.threadPinReorder===!0}function Se(e){return f.get(m.environmentThreadRefsAtom(e))}function Ce(){return f.get(m.threadShellsAtom)}export{re as A,ue as C,F as D,P as E,b as M,I as O,ce as S,y as T,se as _,_e as a,ie as b,he as c,X as d,Y as f,oe as g,de as h,$ as i,M as j,N as k,ge as l,ae as m,ye as n,be as o,le as p,ve as r,Se as s,xe as t,Ce as u,me as v,fe as w,Z as x,Q as y};
|
|
2
|
+
//# sourceMappingURL=entities-BtD3_L53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,d as t,f as n,g as r,h as i,l as a,m as o,o as s,p as c,s as l,u}from"./main-Bi6AoLeM.js";export{s as ENVIRONMENT_CHANGE_STORAGE_KEY,l as FOLLOW_UP_QUEUE_STORAGE_KEY,e as MAX_PERSISTED_QUEUE_IMAGE_CHARS,a as clearFollowUpQueuesEnvironment,u as fromPersistedFollowUpQueue,t as planFollowUpQueueRecovery,n as queuedFileUploadId,c as readEnvironmentChangeAnnouncement,o as rebindPersistedFollowUpQueues,i as startFollowUpQueuePersistence,r as toPersistedFollowUpQueues};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-
|
|
2
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=78,t=[[e,0,0],[0,0,e],[-78,0,0],[0,0,-78]],n=[1,0,0,0,1,0,0,0,1],r=[2600,3400,2900,3800,3100],i=[`y`,`x`,`y`,`x`,`x`],a=t.flatMap((n,r)=>{let i=t[(r+1)%t.length];return[!0,!1].map(t=>{let r=t?n:i,a=t?i:n,o=[0,t?-78:e,0],s=r.map((e,t)=>(a[t]-e)/100),c=r.map((e,t)=>(o[t]-(e+a[t])/2)/100),l=[s[1]*c[2]-s[2]*c[1],s[2]*c[0]-s[0]*c[2],s[0]*c[1]-s[1]*c[0]],u=Math.hypot(...l),d=l.map(e=>e/u);return{normal:d,vertices:[r,a,o],transform:`matrix3d(${s[0]},${s[1]},${s[2]},0,${c[0]},${c[1]},${c[2]},0,${d[0]},${d[1]},${d[2]},0,${r[0]},${r[1]},${r[2]},1)`}})});function o(e,t){return Array.from({length:9},(n,r)=>{let i=Math.floor(r/3),a=r%3;return[0,1,2].reduce((n,r)=>n+e[i*3+r]*t[r*3+a],0)})}function s(e,t){let n=Math.cos(t*Math.PI/180),r=Math.sin(t*Math.PI/180);return e===`x`?[1,0,0,0,n,-r,0,r,n]:[n,0,r,0,1,0,-r,0,n]}var c=o(s(`x`,-8),s(`y`,-24));function l(e){let t=o(c,e);return`matrix3d(${t[0]},${t[3]},${t[6]},0,${t[1]},${t[4]},${t[7]},0,${t[2]},${t[5]},${t[8]},0,0,0,0,1)`}function u(e){let t=a.map(({normal:t})=>{let n=[0,1,2].map(n=>[0,1,2].reduce((r,i)=>r+e[n*3+i]*t[i],0));return n[0]-n[1]+n[2]});return t.indexOf(Math.max(...t))}function d(e,t){let n=o(c,t),r=a[e].vertices.map(e=>[n[0]*e[0]+n[1]*e[1]+n[2]*e[2],n[3]*e[0]+n[4]*e[1]+n[5]*e[2]]),i=[[0,0],[100,0],[50,100]],s=0,l=1/0;for(let e=0;e<3;e++){let t=r[e],n=r[(e+1)%3],i=Math.abs(n[1]-t[1])/Math.hypot(n[0]-t[0],n[1]-t[1]);i<l&&(s=e,l=i)}let u=i[s],d=i[(s+1)%3];r[s][0]>r[(s+1)%3][0]&&([u,d]=[d,u]);let f=i[(s+2)%3];return`matrix(${(d[0]-u[0])/100},${(d[1]-u[1])/100},${(f[0]-(u[0]+d[0])/2)/100},${(f[1]-(u[1]+d[1])/2)/100},${u[0]},${u[1]})`}function f(){let e=[],t=n;for(let n=0;n<20;n++){let r=i[n%i.length],a=o(s(r,90),t).map(Math.round);e.push({axis:r,before:t,after:a}),t=a}let c=e.reduce((e,t,n)=>e+r[n%r.length],0),f=0,p=[],m=a.map(()=>[]),h=a.map(()=>[]),g=[];for(let[t,n]of e.entries()){let e=u(n.before),i=u(n.after),a=r[t%r.length],_=a-850;g.push([f,f+_-100]);for(let[e,t]of[[0,0],[_,0],[_+140,-4],[_+570,92],[_+720,90],[a,90]])p.push({offset:(f+e)/c,transform:l(o(s(n.axis,t),n.before)),easing:`cubic-bezier(0.22, 0.8, 0.32, 1)`});for(let[t,r]of m.entries()){for(let[e,r]of[[0,n.before],[_+300,n.before],[_+301,n.after],[a,n.after]])h[t].push({offset:(f+e)/c,transform:d(t,r)});for(let[n,o]of[[0,t===e],[_-100,t===e],[_+60,!1],[_+640,!1],[a,t===i]])r.push({offset:(f+n)/c,transform:`scaleY(${+!!o})`})}f+=a}return{turns:p,eyes:m,orientations:h,rests:g,duration:c}}var p=f();function m(e){let t=(e%p.duration+p.duration)%p.duration;for(let[e,n]of p.rests){if(t<e)return e-t;if(t<=n)return 0}return p.duration-t+p.rests[0][0]}var h=`modulepreload`,g=function(e){return`/`+e},_={},v=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../../../../vite/packages/vite/src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=g(t,n),t=s(t),t in _)return;_[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:h,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},y=document.getElementById(`boot-shell-card`);if(y){y.innerHTML=`<span class="borg-prism" aria-hidden="true" style="width:80px;height:80px;--borg-prism-scale:${80/176}"><span class="borg-prism-scale"><span class="borg-prism-turn" style="transform:${l(n)}">${a.map((e,t)=>`<svg class="borg-prism-face" viewBox="0 0 100 100" style="transform:${e.transform}"><defs><mask id="boot-borg-${t}"><rect width="100" height="100" fill="white"/><g class="borg-prism-eye-orientation" style="transform:${d(t,n)}"><g class="borg-prism-eyes" fill="black" style="transform:scaleY(${+(t===0)})"><path d="M31.5 27.83 L31.5 33.99 C31.5 41.91 44.5 41.91 44.5 33.99 L44.5 27.83 Z M55.5 27.83 L55.5 33.99 C55.5 41.91 68.5 41.91 68.5 33.99 L68.5 27.83 Z"/></g></g></mask></defs><path d="M6.24 2 L93.76 2 Q97 2 95.55 4.9 L51.45 93.1 Q50 96 48.55 93.1 L4.45 4.9 Q3 2 6.24 2 Z" fill="currentColor" mask="url(#boot-borg-${t})"/></svg>`).join(``)}</span></span></span>`;let e=y.querySelector(`.borg-prism-turn`),t=window.matchMedia(`(prefers-reduced-motion: reduce)`),r=[],i=()=>{r.forEach(e=>document.hidden?e.pause():e.play())},o=()=>{if(r.forEach(e=>e.cancel()),r=[],t.matches)return;let n={duration:p.duration,iterations:1/0};r.push(e.animate(p.turns,n)),e.querySelectorAll(`.borg-prism-eyes`).forEach((e,t)=>{r.push(e.animate(p.eyes[t],n))}),e.querySelectorAll(`.borg-prism-eye-orientation`).forEach((e,t)=>{r.push(e.animate(p.orientations[t],n))});let a=document.timeline.currentTime;typeof a==`number`&&r.forEach(e=>{e.startTime=a}),i()};o(),t.addEventListener(`change`,o),document.addEventListener(`visibilitychange`,i);let s=new MutationObserver(()=>{y.isConnected||(r.forEach(e=>e.cancel()),t.removeEventListener(`change`,o),document.removeEventListener(`visibilitychange`,i),s.disconnect())});s.observe(document.getElementById(`root`),{childList:!0,subtree:!0})}v(()=>import(`./main-
|
|
3
|
-
//# sourceMappingURL=index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/main-Bi6AoLeM.js","assets/rolldown-runtime-DAXXjFlN.js","assets/accountData-BKyjOPQm.js","assets/utils-ClZ5OxbV.js","assets/session-Dmu9Hk5C.js","assets/queries-BevoHPqY.js","assets/textarea-BT0tVWKM.js","assets/useSettings-GEQSU1F5.js","assets/clientPersistenceStorage-CeJLSpQl.js","assets/CircleNotch-BcVOnWaH.js","assets/designOpenFileContext-CMKir5dG.js","assets/empty-DUUjhkFh.js","assets/input-CyCAHFxI.js","assets/browserRecording-BavNt16V.js","assets/RightPanelResizeHandle-XlC9gY5e.js","assets/browserHistoryStore-CEVJXGfr.js","assets/entities-BtD3_L53.js","assets/env-71Gq9H0m.js","assets/ArrowRight-D8u8fAtz.js","assets/ArrowSquareOut-B_f6YUhV.js","assets/scroll-area-DAaT-DGF.js","assets/lib-BpnzBIoA.js","assets/ArrowsClockwise-DQYZ1Xbo.js","assets/ChatMarkdown-Ch9PipMk.js","assets/assets-1BW7ZJgz.js","assets/assetUrls-33nMWFnF.js","assets/lib-CCiVGdun.js","assets/designCanvas.logic-DduGt5E7.js","assets/projectFilesQueryState-Cs5skZOc.js","assets/designCanvas-CfWhq9nr.css","assets/CaretLeft-CfrkuxuJ.js","assets/toggle-Sui8J_p3.js","assets/PullRequestReactions-BJ4eU_08.js","assets/popover-BXSj56CI.js","assets/composerMentionDrag-CdTT1rUK.js","assets/combobox-CQHB5X6j.js","assets/useWorkspaceMutationRefresh-ApasU6PB.js","assets/DiffWorkerPoolProvider-B-AH2sbL.js","assets/toggle-group-BDgfPfOF.js","assets/spinner-K3N_kbJr.js","assets/zipGuard-BHHl8sLU.js","assets/main-C0iNAqq8.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=78,t=[[e,0,0],[0,0,e],[-78,0,0],[0,0,-78]],n=[1,0,0,0,1,0,0,0,1],r=[2600,3400,2900,3800,3100],i=[`y`,`x`,`y`,`x`,`x`],a=t.flatMap((n,r)=>{let i=t[(r+1)%t.length];return[!0,!1].map(t=>{let r=t?n:i,a=t?i:n,o=[0,t?-78:e,0],s=r.map((e,t)=>(a[t]-e)/100),c=r.map((e,t)=>(o[t]-(e+a[t])/2)/100),l=[s[1]*c[2]-s[2]*c[1],s[2]*c[0]-s[0]*c[2],s[0]*c[1]-s[1]*c[0]],u=Math.hypot(...l),d=l.map(e=>e/u);return{normal:d,vertices:[r,a,o],transform:`matrix3d(${s[0]},${s[1]},${s[2]},0,${c[0]},${c[1]},${c[2]},0,${d[0]},${d[1]},${d[2]},0,${r[0]},${r[1]},${r[2]},1)`}})});function o(e,t){return Array.from({length:9},(n,r)=>{let i=Math.floor(r/3),a=r%3;return[0,1,2].reduce((n,r)=>n+e[i*3+r]*t[r*3+a],0)})}function s(e,t){let n=Math.cos(t*Math.PI/180),r=Math.sin(t*Math.PI/180);return e===`x`?[1,0,0,0,n,-r,0,r,n]:[n,0,r,0,1,0,-r,0,n]}var c=o(s(`x`,-8),s(`y`,-24));function l(e){let t=o(c,e);return`matrix3d(${t[0]},${t[3]},${t[6]},0,${t[1]},${t[4]},${t[7]},0,${t[2]},${t[5]},${t[8]},0,0,0,0,1)`}function u(e){let t=a.map(({normal:t})=>{let n=[0,1,2].map(n=>[0,1,2].reduce((r,i)=>r+e[n*3+i]*t[i],0));return n[0]-n[1]+n[2]});return t.indexOf(Math.max(...t))}function d(e,t){let n=o(c,t),r=a[e].vertices.map(e=>[n[0]*e[0]+n[1]*e[1]+n[2]*e[2],n[3]*e[0]+n[4]*e[1]+n[5]*e[2]]),i=[[0,0],[100,0],[50,100]],s=0,l=1/0;for(let e=0;e<3;e++){let t=r[e],n=r[(e+1)%3],i=Math.abs(n[1]-t[1])/Math.hypot(n[0]-t[0],n[1]-t[1]);i<l&&(s=e,l=i)}let u=i[s],d=i[(s+1)%3];r[s][0]>r[(s+1)%3][0]&&([u,d]=[d,u]);let f=i[(s+2)%3];return`matrix(${(d[0]-u[0])/100},${(d[1]-u[1])/100},${(f[0]-(u[0]+d[0])/2)/100},${(f[1]-(u[1]+d[1])/2)/100},${u[0]},${u[1]})`}function f(){let e=[],t=n;for(let n=0;n<20;n++){let r=i[n%i.length],a=o(s(r,90),t).map(Math.round);e.push({axis:r,before:t,after:a}),t=a}let c=e.reduce((e,t,n)=>e+r[n%r.length],0),f=0,p=[],m=a.map(()=>[]),h=a.map(()=>[]),g=[];for(let[t,n]of e.entries()){let e=u(n.before),i=u(n.after),a=r[t%r.length],_=a-850;g.push([f,f+_-100]);for(let[e,t]of[[0,0],[_,0],[_+140,-4],[_+570,92],[_+720,90],[a,90]])p.push({offset:(f+e)/c,transform:l(o(s(n.axis,t),n.before)),easing:`cubic-bezier(0.22, 0.8, 0.32, 1)`});for(let[t,r]of m.entries()){for(let[e,r]of[[0,n.before],[_+300,n.before],[_+301,n.after],[a,n.after]])h[t].push({offset:(f+e)/c,transform:d(t,r)});for(let[n,o]of[[0,t===e],[_-100,t===e],[_+60,!1],[_+640,!1],[a,t===i]])r.push({offset:(f+n)/c,transform:`scaleY(${+!!o})`})}f+=a}return{turns:p,eyes:m,orientations:h,rests:g,duration:c}}var p=f();function m(e){let t=(e%p.duration+p.duration)%p.duration;for(let[e,n]of p.rests){if(t<e)return e-t;if(t<=n)return 0}return p.duration-t+p.rests[0][0]}var h=`modulepreload`,g=function(e){return`/`+e},_={},v=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,new URL(`../../../../../../vite/packages/vite/src/node/plugins/importAnalysisBuild.ts`,import.meta.url)).href}r=o(t.map(t=>{if(t=g(t,n),t=s(t),t in _)return;_[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:h,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},y=document.getElementById(`boot-shell-card`);if(y){y.innerHTML=`<span class="borg-prism" aria-hidden="true" style="width:80px;height:80px;--borg-prism-scale:${80/176}"><span class="borg-prism-scale"><span class="borg-prism-turn" style="transform:${l(n)}">${a.map((e,t)=>`<svg class="borg-prism-face" viewBox="0 0 100 100" style="transform:${e.transform}"><defs><mask id="boot-borg-${t}"><rect width="100" height="100" fill="white"/><g class="borg-prism-eye-orientation" style="transform:${d(t,n)}"><g class="borg-prism-eyes" fill="black" style="transform:scaleY(${+(t===0)})"><path d="M31.5 27.83 L31.5 33.99 C31.5 41.91 44.5 41.91 44.5 33.99 L44.5 27.83 Z M55.5 27.83 L55.5 33.99 C55.5 41.91 68.5 41.91 68.5 33.99 L68.5 27.83 Z"/></g></g></mask></defs><path d="M6.24 2 L93.76 2 Q97 2 95.55 4.9 L51.45 93.1 Q50 96 48.55 93.1 L4.45 4.9 Q3 2 6.24 2 Z" fill="currentColor" mask="url(#boot-borg-${t})"/></svg>`).join(``)}</span></span></span>`;let e=y.querySelector(`.borg-prism-turn`),t=window.matchMedia(`(prefers-reduced-motion: reduce)`),r=[],i=()=>{r.forEach(e=>document.hidden?e.pause():e.play())},o=()=>{if(r.forEach(e=>e.cancel()),r=[],t.matches)return;let n={duration:p.duration,iterations:1/0};r.push(e.animate(p.turns,n)),e.querySelectorAll(`.borg-prism-eyes`).forEach((e,t)=>{r.push(e.animate(p.eyes[t],n))}),e.querySelectorAll(`.borg-prism-eye-orientation`).forEach((e,t)=>{r.push(e.animate(p.orientations[t],n))});let a=document.timeline.currentTime;typeof a==`number`&&r.forEach(e=>{e.startTime=a}),i()};o(),t.addEventListener(`change`,o),document.addEventListener(`visibilitychange`,i);let s=new MutationObserver(()=>{y.isConnected||(r.forEach(e=>e.cancel()),t.removeEventListener(`change`,o),document.removeEventListener(`visibilitychange`,i),s.disconnect())});s.observe(document.getElementById(`root`),{childList:!0,subtree:!0})}v(()=>import(`./main-Bi6AoLeM.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41]));export{d as a,p as i,a as n,l as o,n as r,m as s,v as t};
|
|
3
|
+
//# sourceMappingURL=index-DrITfTBh.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{y as t}from"./accountData-
|
|
2
|
-
//# sourceMappingURL=input-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{y as t}from"./accountData-BKyjOPQm.js";import{Ho as n,t as r}from"./utils-ClZ5OxbV.js";import{n as i}from"./textarea-BT0tVWKM.js";var a=e(t()),o=n(),s=a.forwardRef(function(e,t){return(0,o.jsx)(i,{ref:t,...e})});function c({className:e,size:t=`default`,unstyled:n=!1,nativeInput:i=!1,...a}){let c=r(`h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none placeholder:text-placeholder sm:h-7.5 sm:leading-7.5 [transition:background-color_5000000s_ease-in-out_0s]`,t===`compact`&&`h-7 px-[calc(--spacing(2.5)-1px)] text-xs leading-7 sm:h-7 sm:leading-7`,t===`sm`&&`h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5`,t===`lg`&&`h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5`,a.type===`search`&&`[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none`,a.type===`file`&&`text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm`),l;if(i){let{style:e,onValueChange:n,...r}=a;l=(0,o.jsx)(`input`,{className:c,"data-slot":`input`,size:typeof t==`number`?t:void 0,style:typeof e==`function`?void 0:e,...r})}else l=(0,o.jsx)(s,{className:c,"data-slot":`input`,size:typeof t==`number`?t:void 0,...a});return(0,o.jsx)(`span`,{className:r(!n&&`relative inline-flex w-full rounded-control border border-input bg-canvas-quiet text-base text-foreground transition-[border-color,box-shadow] has-aria-invalid:border-destructive/50 has-focus-visible:border-ring has-focus-visible:ring-2 has-focus-visible:ring-selection has-autofill:bg-foreground/4 has-disabled:opacity-64 sm:text-sm`,!n&&t===`compact`&&`rounded-small`,e)||void 0,"data-size":t,"data-slot":`input-control`,children:l})}export{c as t};
|
|
2
|
+
//# sourceMappingURL=input-CyCAHFxI.js.map
|