@shapio/cms 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/admin/assets/{AssetTile-CaYPqR_F.js → AssetTile-_qRYsivK.js} +2 -2
  2. package/dist/admin/assets/{AssetTile-CaYPqR_F.js.map → AssetTile-_qRYsivK.js.map} +1 -1
  3. package/dist/admin/assets/{AssistError-drmpXSbS.js → AssistError-CMXQWiQo.js} +2 -2
  4. package/dist/admin/assets/{AssistError-drmpXSbS.js.map → AssistError-CMXQWiQo.js.map} +1 -1
  5. package/dist/admin/assets/{BlockMenuItems-D-jZ0oaU.js → BlockMenuItems-WIrbyv1a.js} +2 -2
  6. package/dist/admin/assets/{BlockMenuItems-D-jZ0oaU.js.map → BlockMenuItems-WIrbyv1a.js.map} +1 -1
  7. package/dist/admin/assets/{Body-Gn_z2KPN.js → Body-BYc1IVsQ.js} +2 -2
  8. package/dist/admin/assets/{Body-Gn_z2KPN.js.map → Body-BYc1IVsQ.js.map} +1 -1
  9. package/dist/admin/assets/Builder-CwHpRhZN.js +2 -0
  10. package/dist/admin/assets/Builder-CwHpRhZN.js.map +1 -0
  11. package/dist/admin/assets/{CodeEditor-CzRU6och.js → CodeEditor-NMvrWgxT.js} +2 -2
  12. package/dist/admin/assets/{CodeEditor-CzRU6och.js.map → CodeEditor-NMvrWgxT.js.map} +1 -1
  13. package/dist/admin/assets/{ConfirmDialog-DZRJfdvH.js → ConfirmDialog-Rd6WDt6q.js} +2 -2
  14. package/dist/admin/assets/{ConfirmDialog-DZRJfdvH.js.map → ConfirmDialog-Rd6WDt6q.js.map} +1 -1
  15. package/dist/admin/assets/{CopyButton-h4HYhnYp.js → CopyButton-B0RuxynJ.js} +2 -2
  16. package/dist/admin/assets/{CopyButton-h4HYhnYp.js.map → CopyButton-B0RuxynJ.js.map} +1 -1
  17. package/dist/admin/assets/{CursorPager-H4SpVYw7.js → CursorPager-CQZsKNxR.js} +2 -2
  18. package/dist/admin/assets/{CursorPager-H4SpVYw7.js.map → CursorPager-CQZsKNxR.js.map} +1 -1
  19. package/dist/admin/assets/{FocalPoint-CSeKI4Iw.js → FocalPoint-BYu2fOTb.js} +2 -2
  20. package/dist/admin/assets/{FocalPoint-CSeKI4Iw.js.map → FocalPoint-BYu2fOTb.js.map} +1 -1
  21. package/dist/admin/assets/{Form-DF_YmR1G.js → Form-CiZUsLPp.js} +2 -2
  22. package/dist/admin/assets/{Form-DF_YmR1G.js.map → Form-CiZUsLPp.js.map} +1 -1
  23. package/dist/admin/assets/{FormCheckboxGroup-V3IKrvzc.js → FormCheckboxGroup-Bz8KERs1.js} +2 -2
  24. package/dist/admin/assets/{FormCheckboxGroup-V3IKrvzc.js.map → FormCheckboxGroup-Bz8KERs1.js.map} +1 -1
  25. package/dist/admin/assets/{FormRadioGroup-DIv-MYgn.js → FormRadioGroup-c-wyx7dq.js} +2 -2
  26. package/dist/admin/assets/{FormRadioGroup-DIv-MYgn.js.map → FormRadioGroup-c-wyx7dq.js.map} +1 -1
  27. package/dist/admin/assets/{FormSelectField-CUhaPIMY.js → FormSelectField-ijG9qPpb.js} +2 -2
  28. package/dist/admin/assets/{FormSelectField-CUhaPIMY.js.map → FormSelectField-ijG9qPpb.js.map} +1 -1
  29. package/dist/admin/assets/{FormSwitchField-DW8ysyk_.js → FormSwitchField-Bp3hNpeP.js} +2 -2
  30. package/dist/admin/assets/{FormSwitchField-DW8ysyk_.js.map → FormSwitchField-Bp3hNpeP.js.map} +1 -1
  31. package/dist/admin/assets/{FormTextareaField-DbqZ-MwI.js → FormTextareaField-BSKMqHcW.js} +2 -2
  32. package/dist/admin/assets/{FormTextareaField-DbqZ-MwI.js.map → FormTextareaField-BSKMqHcW.js.map} +1 -1
  33. package/dist/admin/assets/{HintedLabel-BlLtqVVz.js → HintedLabel-BrLH4NQW.js} +2 -2
  34. package/dist/admin/assets/{HintedLabel-BlLtqVVz.js.map → HintedLabel-BrLH4NQW.js.map} +1 -1
  35. package/dist/admin/assets/{InfoHint-bYMd_t0J.js → InfoHint-Dyzyf59c.js} +2 -2
  36. package/dist/admin/assets/{InfoHint-bYMd_t0J.js.map → InfoHint-Dyzyf59c.js.map} +1 -1
  37. package/dist/admin/assets/{InsertMenuItem-D2HGERzb.js → InsertMenuItem-BvRDuXtd.js} +2 -2
  38. package/dist/admin/assets/{InsertMenuItem-D2HGERzb.js.map → InsertMenuItem-BvRDuXtd.js.map} +1 -1
  39. package/dist/admin/assets/{Match-GDx_orOH.js → Match-Bixf1ygj.js} +2 -2
  40. package/dist/admin/assets/{Match-GDx_orOH.js.map → Match-Bixf1ygj.js.map} +1 -1
  41. package/dist/admin/assets/{QueryView-UBO-U5Wo.js → QueryView--_vvV7dC.js} +2 -2
  42. package/dist/admin/assets/{QueryView-UBO-U5Wo.js.map → QueryView--_vvV7dC.js.map} +1 -1
  43. package/dist/admin/assets/{RadioTile-CJbIIV8t.js → RadioTile-BCp6auUz.js} +2 -2
  44. package/dist/admin/assets/{RadioTile-CJbIIV8t.js.map → RadioTile-BCp6auUz.js.map} +1 -1
  45. package/dist/admin/assets/{RichTextField-M7HyUhYF.js → RichTextField-fWNjndUc.js} +2 -2
  46. package/dist/admin/assets/{RichTextField-M7HyUhYF.js.map → RichTextField-fWNjndUc.js.map} +1 -1
  47. package/dist/admin/assets/{RowTitle-DoxDM1XL.js → RowTitle-B4CE8tt7.js} +2 -2
  48. package/dist/admin/assets/{RowTitle-DoxDM1XL.js.map → RowTitle-B4CE8tt7.js.map} +1 -1
  49. package/dist/admin/assets/{SecretReveal-kCkLH5jg.js → SecretReveal-BhSqdWqh.js} +2 -2
  50. package/dist/admin/assets/{SecretReveal-kCkLH5jg.js.map → SecretReveal-BhSqdWqh.js.map} +1 -1
  51. package/dist/admin/assets/{SharedGlyph-D1OMHXPf.js → SharedGlyph-71FTypoi.js} +2 -2
  52. package/dist/admin/assets/{SharedGlyph-D1OMHXPf.js.map → SharedGlyph-71FTypoi.js.map} +1 -1
  53. package/dist/admin/assets/StepList-CZJmwy9e.js +2 -0
  54. package/dist/admin/assets/StepList-CZJmwy9e.js.map +1 -0
  55. package/dist/admin/assets/Structure-Dk87778W.js +2 -0
  56. package/dist/admin/assets/{Structure-CO4aJZVP.js.map → Structure-Dk87778W.js.map} +1 -1
  57. package/dist/admin/assets/{SuggestAltButton-CbRUxD5s.js → SuggestAltButton-CxS8IR6m.js} +2 -2
  58. package/dist/admin/assets/{SuggestAltButton-CbRUxD5s.js.map → SuggestAltButton-CxS8IR6m.js.map} +1 -1
  59. package/dist/admin/assets/{Thumbnail-D1XuDElk.js → Thumbnail-BwbCNpgQ.js} +2 -2
  60. package/dist/admin/assets/{Thumbnail-D1XuDElk.js.map → Thumbnail-BwbCNpgQ.js.map} +1 -1
  61. package/dist/admin/assets/{UnsavedChangesGuard-C1n7egF6.js → UnsavedChangesGuard-C6nD55Fn.js} +2 -2
  62. package/dist/admin/assets/{UnsavedChangesGuard-C1n7egF6.js.map → UnsavedChangesGuard-C6nD55Fn.js.map} +1 -1
  63. package/dist/admin/assets/{UserAvatar-Bl32IpG_.js → UserAvatar-D7IbSpsP.js} +2 -2
  64. package/dist/admin/assets/{UserAvatar-Bl32IpG_.js.map → UserAvatar-D7IbSpsP.js.map} +1 -1
  65. package/dist/admin/assets/{badge-ydvfgE8a.js → badge-vLiQczOd.js} +2 -2
  66. package/dist/admin/assets/{badge-ydvfgE8a.js.map → badge-vLiQczOd.js.map} +1 -1
  67. package/dist/admin/assets/{changeSets-DgfCKja3.js → changeSets-D5VevASj.js} +2 -2
  68. package/dist/admin/assets/{changeSets-DgfCKja3.js.map → changeSets-D5VevASj.js.map} +1 -1
  69. package/dist/admin/assets/{constants-esJAnNTh.js → constants-CKGh8uwT.js} +2 -2
  70. package/dist/admin/assets/{constants-esJAnNTh.js.map → constants-CKGh8uwT.js.map} +1 -1
  71. package/dist/admin/assets/{content-DsMSB6Wb.js → content-Cbavyq0x.js} +3 -3
  72. package/dist/admin/assets/{content-DsMSB6Wb.js.map → content-Cbavyq0x.js.map} +1 -1
  73. package/dist/admin/assets/{contentTypes-C-AKiYu1.js → contentTypes-DzQ_0v36.js} +2 -2
  74. package/dist/admin/assets/{contentTypes-C-AKiYu1.js.map → contentTypes-DzQ_0v36.js.map} +1 -1
  75. package/dist/admin/assets/{develop-DL-2W9jv.js → develop-BDqMOEql.js} +2 -2
  76. package/dist/admin/assets/{develop-DL-2W9jv.js.map → develop-BDqMOEql.js.map} +1 -1
  77. package/dist/admin/assets/{dropdown-menu-C53v9ioW.js → dropdown-menu-CVAnm22s.js} +2 -2
  78. package/dist/admin/assets/{dropdown-menu-C53v9ioW.js.map → dropdown-menu-CVAnm22s.js.map} +1 -1
  79. package/dist/admin/assets/es2015-BKfbx3rz.js +42 -0
  80. package/dist/admin/assets/es2015-BKfbx3rz.js.map +1 -0
  81. package/dist/admin/assets/{field-W1dB_h6d.js → field-Bg-JRgsB.js} +2 -2
  82. package/dist/admin/assets/{field-W1dB_h6d.js.map → field-Bg-JRgsB.js.map} +1 -1
  83. package/dist/admin/assets/{fileRoute-DzWMBrRx.js → fileRoute-DQCI1nMN.js} +2 -2
  84. package/dist/admin/assets/{fileRoute-DzWMBrRx.js.map → fileRoute-DQCI1nMN.js.map} +1 -1
  85. package/dist/admin/assets/{followPlural-D-5ZJqJF.js → followPlural-D0bENI5E.js} +2 -2
  86. package/dist/admin/assets/{followPlural-D-5ZJqJF.js.map → followPlural-D0bENI5E.js.map} +1 -1
  87. package/dist/admin/assets/{inbox-DUqOrFEA.js → inbox-Dfy4YBZ2.js} +2 -2
  88. package/dist/admin/assets/{inbox-DUqOrFEA.js.map → inbox-Dfy4YBZ2.js.map} +1 -1
  89. package/dist/admin/assets/{index-D03RZB7e.js → index-M4TUI1dl.js} +4 -4
  90. package/dist/admin/assets/{index-D03RZB7e.js.map → index-M4TUI1dl.js.map} +1 -1
  91. package/dist/admin/assets/{labels-CHE0gg1n.js → labels-BrwwGWnv.js} +2 -2
  92. package/dist/admin/assets/{labels-CHE0gg1n.js.map → labels-BrwwGWnv.js.map} +1 -1
  93. package/dist/admin/assets/{media-BUUEsWxd.js → media-DBdx-UmR.js} +2 -2
  94. package/dist/admin/assets/{media-BUUEsWxd.js.map → media-DBdx-UmR.js.map} +1 -1
  95. package/dist/admin/assets/{network-Bolr2lmf.js → network-BpbMYp6D.js} +2 -2
  96. package/dist/admin/assets/{network-Bolr2lmf.js.map → network-BpbMYp6D.js.map} +1 -1
  97. package/dist/admin/assets/{publishing-ClNjPLQ9.js → publishing-CpSDO3M7.js} +2 -2
  98. package/dist/admin/assets/{publishing-ClNjPLQ9.js.map → publishing-CpSDO3M7.js.map} +1 -1
  99. package/dist/admin/assets/{radio-group-rFxn7cz2.js → radio-group-DQ3sC1ol.js} +2 -2
  100. package/dist/admin/assets/{radio-group-rFxn7cz2.js.map → radio-group-DQ3sC1ol.js.map} +1 -1
  101. package/dist/admin/assets/{searchSchemas-C4qp-vCa.js → searchSchemas-D4S2ceA0.js} +2 -2
  102. package/dist/admin/assets/{searchSchemas-C4qp-vCa.js.map → searchSchemas-D4S2ceA0.js.map} +1 -1
  103. package/dist/admin/assets/{sections-C7Z6Xd8r.js → sections-Cl1LrzqH.js} +2 -2
  104. package/dist/admin/assets/{sections-C7Z6Xd8r.js.map → sections-Cl1LrzqH.js.map} +1 -1
  105. package/dist/admin/assets/{select-DUhL27UN.js → select-DjCAH45V.js} +2 -2
  106. package/dist/admin/assets/{select-DUhL27UN.js.map → select-DjCAH45V.js.map} +1 -1
  107. package/dist/admin/assets/{seo-l1ZORjtv.js → seo-DJ4k3LtY.js} +2 -2
  108. package/dist/admin/assets/{seo-l1ZORjtv.js.map → seo-DJ4k3LtY.js.map} +1 -1
  109. package/dist/admin/assets/{settings-DgoG3H8C.js → settings-DRZ33PTg.js} +2 -2
  110. package/dist/admin/assets/{settings-DgoG3H8C.js.map → settings-DRZ33PTg.js.map} +1 -1
  111. package/dist/admin/assets/{shapes-BZ87ap5s.js → shapes-BJe3IMuj.js} +5 -5
  112. package/dist/admin/assets/{shapes-BZ87ap5s.js.map → shapes-BJe3IMuj.js.map} +1 -1
  113. package/dist/admin/assets/{skeleton-Dyi_b1wq.js → skeleton-D4eOLKLY.js} +2 -2
  114. package/dist/admin/assets/{skeleton-Dyi_b1wq.js.map → skeleton-D4eOLKLY.js.map} +1 -1
  115. package/dist/admin/assets/src-DUpL-qwG.js +7 -0
  116. package/dist/admin/assets/src-DUpL-qwG.js.map +1 -0
  117. package/dist/admin/assets/{switch-C3dDDUIk.js → switch-B2R13aVU.js} +2 -2
  118. package/dist/admin/assets/{switch-C3dDDUIk.js.map → switch-B2R13aVU.js.map} +1 -1
  119. package/dist/admin/assets/{theme-DPe080iG.js → theme-X-qeg74W.js} +2 -2
  120. package/dist/admin/assets/{theme-DPe080iG.js.map → theme-X-qeg74W.js.map} +1 -1
  121. package/dist/admin/assets/{titles-C5PaMgFJ.js → titles-CLh5ftA2.js} +2 -2
  122. package/dist/admin/assets/{titles-C5PaMgFJ.js.map → titles-CLh5ftA2.js.map} +1 -1
  123. package/dist/admin/assets/{tooltip-BEaZkRPK.js → tooltip-u2epXfJF.js} +2 -2
  124. package/dist/admin/assets/{tooltip-BEaZkRPK.js.map → tooltip-u2epXfJF.js.map} +1 -1
  125. package/dist/admin/assets/{useContentSchema-wLDa2L3f.js → useContentSchema-DaQHlL19.js} +2 -2
  126. package/dist/admin/assets/{useContentSchema-wLDa2L3f.js.map → useContentSchema-DaQHlL19.js.map} +1 -1
  127. package/dist/admin/assets/{useDiscardGuard-WTUINqD5.js → useDiscardGuard-BVJGUCiH.js} +2 -2
  128. package/dist/admin/assets/{useDiscardGuard-WTUINqD5.js.map → useDiscardGuard-BVJGUCiH.js.map} +1 -1
  129. package/dist/admin/assets/{useMediaPickerDialog-CFN9ZKfe.js → useMediaPickerDialog-C23eOHQR.js} +2 -2
  130. package/dist/admin/assets/{useMediaPickerDialog-CFN9ZKfe.js.map → useMediaPickerDialog-C23eOHQR.js.map} +1 -1
  131. package/dist/admin/assets/{useMediaUploader-B42H_CMG.js → useMediaUploader-CTViR0LX.js} +2 -2
  132. package/dist/admin/assets/{useMediaUploader-B42H_CMG.js.map → useMediaUploader-CTViR0LX.js.map} +1 -1
  133. package/dist/admin/assets/{useResolvedScheme-aV0QDPi3.js → useResolvedScheme-Cg8TdO85.js} +2 -2
  134. package/dist/admin/assets/{useResolvedScheme-aV0QDPi3.js.map → useResolvedScheme-Cg8TdO85.js.map} +1 -1
  135. package/dist/admin/assets/{zod-C-k48Hnc.js → zod-D5i60ErJ.js} +2 -2
  136. package/dist/admin/assets/{zod-C-k48Hnc.js.map → zod-D5i60ErJ.js.map} +1 -1
  137. package/dist/admin/index.html +27 -27
  138. package/dist/cli.js +10 -3
  139. package/dist/cli.js.map +1 -1
  140. package/dist/index.d.ts +7 -2
  141. package/dist/index.js +1 -1
  142. package/dist/{s3Adapter-sL1zP4Zl.js → s3Adapter-CtPzkzf0.js} +2 -2
  143. package/dist/{s3Adapter-sL1zP4Zl.js.map → s3Adapter-CtPzkzf0.js.map} +1 -1
  144. package/dist/{worker-DMES6pqh.js → worker-DRCCGGjl.js} +3823 -3719
  145. package/dist/worker-DRCCGGjl.js.map +1 -0
  146. package/package.json +5 -5
  147. package/dist/admin/assets/Builder-DyCcikfS.js +0 -2
  148. package/dist/admin/assets/Builder-DyCcikfS.js.map +0 -1
  149. package/dist/admin/assets/StepList-BIQjDaWQ.js +0 -2
  150. package/dist/admin/assets/StepList-BIQjDaWQ.js.map +0 -1
  151. package/dist/admin/assets/Structure-CO4aJZVP.js +0 -2
  152. package/dist/admin/assets/es2015-DrAA1N2V.js +0 -42
  153. package/dist/admin/assets/es2015-DrAA1N2V.js.map +0 -1
  154. package/dist/admin/assets/src-BcLeD2-K.js +0 -7
  155. package/dist/admin/assets/src-BcLeD2-K.js.map +0 -1
  156. package/dist/worker-DMES6pqh.js.map +0 -1
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./dist-jDxVK91P.js","./dist-Di89fgee.js","./dist-Cfu6KUZc.js","./w3c-keyname-BOAvb0qz.js","./dist-HPrLaCdJ.js","./dist-fd2QE3bn.js","./dist-DwkwzYJW.js","./dist-BhQ65Acq.js","./dist-D2B8BMRO.js","./dist-BfNf0WNB.js","./dist-D84PCcMJ.js","./dist-Bj80Zlqp.js","./dist-BPSNVOQB.js","./dist-ACUwt7Zp.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{n as r}from"./createLucideIcon-CqygG5K6.js";import{t as i,w as a}from"./InfoHint-bYMd_t0J.js";import{t as o}from"./cn-DVhJ55Mo.js";import{t as s}from"./useShortcutLabel-BJMslX8p.js";import{t as c}from"./preload-helper-BaNbYf_w.js";import{i as l,n as u}from"./props-SeFhTMCi.js";import{r as d}from"./labels-CHE0gg1n.js";import{n as f,t as p}from"./baseExtensions-TVKN1UwW.js";var m=e(t(),1),h={plain:()=>Promise.resolve([]),html:()=>c(async()=>{let{html:e}=await import(`./dist-jDxVK91P.js`);return{html:e}},__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).then(({html:e})=>e({autoCloseTags:!1})),css:()=>c(async()=>{let{css:e}=await import(`./dist-D2B8BMRO.js`);return{css:e}},__vite__mapDeps([8,5,2,3,4]),import.meta.url).then(({css:e})=>e()),javascript:()=>c(async()=>{let{javascript:e}=await import(`./dist-BfNf0WNB.js`);return{javascript:e}},__vite__mapDeps([9,6,2,3,7,4]),import.meta.url).then(({javascript:e})=>e()),json:()=>c(async()=>{let{json:e}=await import(`./dist-D84PCcMJ.js`);return{json:e}},__vite__mapDeps([10,11,2,3,4]),import.meta.url).then(({json:e})=>e()),yaml:()=>c(async()=>{let{yaml:e}=await import(`./dist-BPSNVOQB.js`);return{yaml:e}},__vite__mapDeps([12,2,3,4]),import.meta.url).then(({yaml:e})=>e()),markdown:()=>c(async()=>{let{markdown:e}=await import(`./dist-ACUwt7Zp.js`);return{markdown:e}},__vite__mapDeps([13,2,3,7,1,4,5,6]),import.meta.url).then(({markdown:e})=>e())},g=e=>h[e](),_=[],v=e=>{let[t,n]=(0,m.useState)();return(0,m.useEffect)(()=>{let t=!0;return g(e).then(r=>{t&&n({language:e,extension:r})},t=>a(t,`Loading ${e} highlighting`)),()=>{t=!1}},[e]),t?.language===e?t.extension:_},y=e(n(),1),b=12,x=e=>{let{t}=r(),{inputId:n,labelId:a,describedBy:c,value:h,onChange:g,onBlur:_,readOnly:x,disabled:S,validation:C,field:w}=e,T=e.definition.type===`code`?e.definition.settings.language:`plain`,E=u(e,`rows`)??b,D=`${n}-keys`,O=s(`]`),k=s(`[`),A=v(T),j=x||S,M=(0,m.useMemo)(()=>[...p({id:n,labelledBy:a,describedBy:[c,D].filter(Boolean).join(` `),invalid:C.invalid,readOnly:j}),A],[n,a,c,D,C.invalid,j,A]),N=(0,m.useCallback)(e=>g(e===``?null:e),[g]);return(0,y.jsxs)(`div`,{className:`space-y-1`,children:[(0,y.jsx)(`div`,{onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||_()},style:{"--code-rows":E},className:o(`h-[calc(var(--code-rows)*1.3rem+1rem+2px)] overflow-hidden rounded-lg border border-input bg-card focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50`,C.invalid&&`border-destructive ring-destructive/20 dark:ring-destructive/40`,S&&`opacity-50`),children:(0,y.jsx)(f,{value:l(h),onChange:N,extensions:M})}),(0,y.jsxs)(`div`,{className:`flex items-center gap-1 text-meta text-muted-foreground`,children:[(0,y.jsx)(`span`,{children:d(T)}),(0,y.jsx)(i,{about:w.label,id:D,children:t(`content.fields.code.keys`,{indent:O,outdent:k})})]})]})};export{x as CodeEditor};
3
- //# sourceMappingURL=CodeEditor-CzRU6och.js.map
2
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{n as r}from"./createLucideIcon-CqygG5K6.js";import{t as i,w as a}from"./InfoHint-Dyzyf59c.js";import{t as o}from"./cn-DVhJ55Mo.js";import{t as s}from"./useShortcutLabel-BJMslX8p.js";import{t as c}from"./preload-helper-BaNbYf_w.js";import{i as l,n as u}from"./props-SeFhTMCi.js";import{r as d}from"./labels-BrwwGWnv.js";import{n as f,t as p}from"./baseExtensions-TVKN1UwW.js";var m=e(t(),1),h={plain:()=>Promise.resolve([]),html:()=>c(async()=>{let{html:e}=await import(`./dist-jDxVK91P.js`);return{html:e}},__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url).then(({html:e})=>e({autoCloseTags:!1})),css:()=>c(async()=>{let{css:e}=await import(`./dist-D2B8BMRO.js`);return{css:e}},__vite__mapDeps([8,5,2,3,4]),import.meta.url).then(({css:e})=>e()),javascript:()=>c(async()=>{let{javascript:e}=await import(`./dist-BfNf0WNB.js`);return{javascript:e}},__vite__mapDeps([9,6,2,3,7,4]),import.meta.url).then(({javascript:e})=>e()),json:()=>c(async()=>{let{json:e}=await import(`./dist-D84PCcMJ.js`);return{json:e}},__vite__mapDeps([10,11,2,3,4]),import.meta.url).then(({json:e})=>e()),yaml:()=>c(async()=>{let{yaml:e}=await import(`./dist-BPSNVOQB.js`);return{yaml:e}},__vite__mapDeps([12,2,3,4]),import.meta.url).then(({yaml:e})=>e()),markdown:()=>c(async()=>{let{markdown:e}=await import(`./dist-ACUwt7Zp.js`);return{markdown:e}},__vite__mapDeps([13,2,3,7,1,4,5,6]),import.meta.url).then(({markdown:e})=>e())},g=e=>h[e](),_=[],v=e=>{let[t,n]=(0,m.useState)();return(0,m.useEffect)(()=>{let t=!0;return g(e).then(r=>{t&&n({language:e,extension:r})},t=>a(t,`Loading ${e} highlighting`)),()=>{t=!1}},[e]),t?.language===e?t.extension:_},y=e(n(),1),b=12,x=e=>{let{t}=r(),{inputId:n,labelId:a,describedBy:c,value:h,onChange:g,onBlur:_,readOnly:x,disabled:S,validation:C,field:w}=e,T=e.definition.type===`code`?e.definition.settings.language:`plain`,E=u(e,`rows`)??b,D=`${n}-keys`,O=s(`]`),k=s(`[`),A=v(T),j=x||S,M=(0,m.useMemo)(()=>[...p({id:n,labelledBy:a,describedBy:[c,D].filter(Boolean).join(` `),invalid:C.invalid,readOnly:j}),A],[n,a,c,D,C.invalid,j,A]),N=(0,m.useCallback)(e=>g(e===``?null:e),[g]);return(0,y.jsxs)(`div`,{className:`space-y-1`,children:[(0,y.jsx)(`div`,{onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||_()},style:{"--code-rows":E},className:o(`h-[calc(var(--code-rows)*1.3rem+1rem+2px)] overflow-hidden rounded-lg border border-input bg-card focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50`,C.invalid&&`border-destructive ring-destructive/20 dark:ring-destructive/40`,S&&`opacity-50`),children:(0,y.jsx)(f,{value:l(h),onChange:N,extensions:M})}),(0,y.jsxs)(`div`,{className:`flex items-center gap-1 text-meta text-muted-foreground`,children:[(0,y.jsx)(`span`,{children:d(T)}),(0,y.jsx)(i,{about:w.label,id:D,children:t(`content.fields.code.keys`,{indent:O,outdent:k})})]})]})};export{x as CodeEditor};
3
+ //# sourceMappingURL=CodeEditor-NMvrWgxT.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";ihBAOMA,EAAoE,CACxE,UAAa,QAAQ,QAAQ,CAAC,CAAC,EAC/B,SAAAC,EAAA,UAAkD,IAAE,cAAxC,OAAO,oCAAyB,4DAAM,CAAE,UAAWC,EAAK,CAAE,cAAe,EAAM,CAAC,CAAC,EAC7F,QAAAD,EAAA,UAAgD,IAAE,aAAvC,OAAO,mCAAwB,sDAAM,CAAE,SAAUE,EAAI,CAAC,EACjE,eAAAF,EAAA,UAA8D,IAAE,oBAA9C,OAAO,0CAA+B,wDAAM,CAAE,gBAAiBG,EAAW,CAAC,EAC7F,SAAAH,EAAA,UAAkD,IAAE,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CACZ,CAAC,EACDD,CACF,EACA,CAACJ,EAASW,EAASC,EAAab,EAAQc,EAAW,QAASR,EAAQD,CAAe,CACrF,EACMU,GAAA,EAAeC,eAAa,GAAiBC,EAASC,IAAS,GAAK,KAAOA,CAAI,EAAG,CAACD,CAAQ,CAAC,EAMlG,OACE,EAAAE,EAAA,MAAC,MAAD,CAAK,UAAU,YAAf,WACE,EAAAA,EAAA,KAAC,MAAD,CACE,OARc,GAAsC,CACnDC,EAAM,cAAc,SAASA,EAAM,aAAa,GACnDC,EAAO,CAEX,EAKM,MAAO,CAAE,cAAevB,CAAK,EAC7B,UAAWwB,EACT,+KACAR,EAAW,SAAW,kEACtBN,GAAY,YACd,EAEA,YAAAW,EAAA,KAACI,EAAD,CAAY,MAAOC,EAAUC,CAAK,EAAG,SAAUV,EAA0B,YAAa,EACnF,IACL,EAAAI,EAAA,MAAC,MAAD,CAAK,UAAU,0DAAf,WACE,EAAAA,EAAA,KAAC,OAAD,UAAOO,EAAW1C,CAAQ,CAAQ,IAClC,EAAAmC,EAAA,KAACQ,EAAD,CAAU,MAAOC,EAAM,MAAO,GAAI5B,EAC/B,WAAE,2BAA4B,CAAE,SAAQ,SAAQ,CAAC,CAC1C,EACP,CACF,KAET","names":["LOADERS","__vitePreload","html","css","javascript","json","yaml","markdown","languageExtension","language","NONE","useLanguageExtension","loaded","setLoaded","useState","import_react","current","reportError","error","DEFAULT_ROWS","CodeEditor","useTranslation","props","rows","numberOption","hintId","inputId","indent","useShortcutLabel","outdent","languageSupport","locked","readOnly","disabled","extensions","useMemo","baseExtensions","labelId","describedBy","validation","handleChange","useCallback","onChange","text","import_jsx_runtime","event","onBlur","cn","CodeMirror","textValue","value","valueLabel","InfoHint","field"],"ignoreList":[],"sources":["../../src/components/CodeMirror/helpers/languages.ts","../../src/fields/CodeEditor/hooks/useLanguageExtension.ts","../../src/fields/CodeEditor/index.tsx"],"sourcesContent":["import type { Extension } from '@codemirror/state';\nimport type { CodeLanguage } from '@shapio/schema';\n\n/**\n * Language support per code language, each pack its own chunk: loaded only when an editor for that language\n * opens. HTML closes no tags on its own (no editor here inserts text the person did not type).\n */\nconst LOADERS: Readonly<Record<CodeLanguage, () => Promise<Extension>>> = {\n plain: () => Promise.resolve([]),\n html: () => import('@codemirror/lang-html').then(({ html }) => html({ autoCloseTags: false })),\n css: () => import('@codemirror/lang-css').then(({ css }) => css()),\n javascript: () => import('@codemirror/lang-javascript').then(({ javascript }) => javascript()),\n json: () => import('@codemirror/lang-json').then(({ json }) => json()),\n yaml: () => import('@codemirror/lang-yaml').then(({ yaml }) => yaml()),\n markdown: () => import('@codemirror/lang-markdown').then(({ markdown }) => markdown()),\n};\n\nexport const languageExtension = (language: CodeLanguage): Promise<Extension> => LOADERS[language]();\n","import type { Extension } from '@codemirror/state';\nimport type { CodeLanguage } from '@shapio/schema';\nimport { useEffect, useState } from 'react';\nimport { languageExtension } from '@/components/CodeMirror/helpers/languages';\nimport { reportError } from '@/helpers/reportError';\n\nconst NONE: Extension = [];\n\n/**\n * The language support for a code field, loaded on demand. Until its pack arrives (and if it fails to load)\n * the editor shows plain text; the editor reconfigures when it lands.\n */\nexport const useLanguageExtension = (language: CodeLanguage): Extension => {\n const [loaded, setLoaded] = useState<{ language: CodeLanguage; extension: Extension }>();\n useEffect(() => {\n let current = true;\n languageExtension(language).then(\n (extension) => {\n if (current) {\n setLoaded({ language, extension });\n }\n },\n (error: unknown) => reportError(error, `Loading ${language} highlighting`),\n );\n return () => {\n current = false;\n };\n }, [language]);\n return loaded?.language === language ? loaded.extension : NONE;\n};\n","import type { CSSProperties, FocusEvent } from 'react';\nimport { useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { CodeMirror } from '@/components/CodeMirror';\nimport { baseExtensions } from '@/components/CodeMirror/helpers/baseExtensions';\nimport { InfoHint } from '@/components/InfoHint';\nimport { valueLabel } from '@/features/Models/helpers/labels';\nimport { useShortcutLabel } from '@/features/Shell/hooks/useShortcutLabel';\nimport { cn } from '@/helpers/cn';\nimport { numberOption, textValue } from '../helpers/props';\nimport type { BuiltInEditorProps } from '../types';\nimport { useLanguageExtension } from './hooks/useLanguageExtension';\n\nconst DEFAULT_ROWS = 12;\n\n/**\n * `codeEditor`: a `code` field's text in CodeMirror, highlighted for the field's language (its pack loads on\n * demand). Shapio never changes the code: the text is the value, and an empty editor is `null`. Tab moves on,\n * as everywhere in the admin; the hint says how to indent. Loaded lazily with its own chunk.\n */\nexport const CodeEditor = (props: BuiltInEditorProps) => {\n const { t } = useTranslation();\n const { inputId, labelId, describedBy, value, onChange, onBlur, readOnly, disabled, validation, field } =\n props;\n const language = props.definition.type === 'code' ? props.definition.settings.language : 'plain';\n const rows = numberOption(props, 'rows') ?? DEFAULT_ROWS;\n const hintId = `${inputId}-keys`;\n const indent = useShortcutLabel(']');\n const outdent = useShortcutLabel('[');\n const languageSupport = useLanguageExtension(language);\n const locked = readOnly || disabled;\n const extensions = useMemo(\n () => [\n ...baseExtensions({\n id: inputId,\n labelledBy: labelId,\n describedBy: [describedBy, hintId].filter(Boolean).join(' '),\n invalid: validation.invalid,\n readOnly: locked,\n }),\n languageSupport,\n ],\n [inputId, labelId, describedBy, hintId, validation.invalid, locked, languageSupport],\n );\n const handleChange = useCallback((text: string) => onChange(text === '' ? null : text), [onChange]);\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n onBlur();\n }\n };\n return (\n <div className=\"space-y-1\">\n <div\n onBlur={handleBlur}\n style={{ '--code-rows': rows } as CSSProperties}\n className={cn(\n 'h-[calc(var(--code-rows)*1.3rem+1rem+2px)] overflow-hidden rounded-lg border border-input bg-card focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50',\n validation.invalid && 'border-destructive ring-destructive/20 dark:ring-destructive/40',\n disabled && 'opacity-50',\n )}\n >\n <CodeMirror value={textValue(value)} onChange={handleChange} extensions={extensions} />\n </div>\n <div className=\"flex items-center gap-1 text-meta text-muted-foreground\">\n <span>{valueLabel(language)}</span>\n <InfoHint about={field.label} id={hintId}>\n {t('content.fields.code.keys', { indent, outdent })}\n </InfoHint>\n </div>\n </div>\n );\n};\n"],"file":"CodeEditor-CzRU6och.js"}
1
+ {"version":3,"mappings":";ihBAOMA,EAAoE,CACxE,UAAa,QAAQ,QAAQ,CAAC,CAAC,EAC/B,SAAAC,EAAA,UAAkD,IAAE,cAAxC,OAAO,oCAAyB,4DAAM,CAAE,UAAWC,EAAK,CAAE,cAAe,EAAM,CAAC,CAAC,EAC7F,QAAAD,EAAA,UAAgD,IAAE,aAAvC,OAAO,mCAAwB,sDAAM,CAAE,SAAUE,EAAI,CAAC,EACjE,eAAAF,EAAA,UAA8D,IAAE,oBAA9C,OAAO,0CAA+B,wDAAM,CAAE,gBAAiBG,EAAW,CAAC,EAC7F,SAAAH,EAAA,UAAkD,IAAE,cAAxC,OAAO,oCAAyB,wDAAM,CAAE,UAAWI,EAAK,CAAC,EACrE,SAAAJ,EAAA,UAAkD,IAAE,cAAxC,OAAO,oCAAyB,qDAAM,CAAE,UAAWK,EAAK,CAAC,EACrE,aAAAL,EAAA,UAA0D,IAAE,kBAA5C,OAAO,wCAA6B,6DAAM,CAAE,cAAeM,EAAS,CAAC,CACvF,EAEaC,EAAqB,GAA+CR,EAAQS,EAAS,CAAC,ECX7FC,EAAkB,CAAC,EAMZC,EAAwB,GAAsC,CACzE,GAAM,CAACC,EAAQC,IAAA,EAAaC,YAA2D,EAevF,OAdA,EAAAC,EAAA,eAAgB,CACd,IAAIC,EAAU,GASd,OARAR,EAAkBC,CAAQ,CAAC,CAAC,KACzB,GAAc,CACTO,GACFH,EAAU,CAAE,WAAU,WAAU,CAAC,CAErC,EACC,GAAmBI,EAAYC,EAAO,WAAWT,EAAS,cAAc,CAC3E,MACa,CACX,EAAU,EACZ,CACF,EAAG,CAACA,CAAQ,CAAC,EACNG,GAAQ,WAAaH,EAAWG,EAAO,UAAYF,CAC5D,aChBMS,EAAe,GAORC,EAAc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I5B,EAC/B,WAAE,2BAA4B,CAAE,SAAQ,SAAQ,CAAC,CAC1C,EACP,CACF,KAET","names":["LOADERS","__vitePreload","html","css","javascript","json","yaml","markdown","languageExtension","language","NONE","useLanguageExtension","loaded","setLoaded","useState","import_react","current","reportError","error","DEFAULT_ROWS","CodeEditor","useTranslation","props","rows","numberOption","hintId","inputId","indent","useShortcutLabel","outdent","languageSupport","locked","readOnly","disabled","extensions","useMemo","baseExtensions","labelId","describedBy","validation","handleChange","useCallback","onChange","text","import_jsx_runtime","event","onBlur","cn","CodeMirror","textValue","value","valueLabel","InfoHint","field"],"ignoreList":[],"sources":["../../src/components/CodeMirror/helpers/languages.ts","../../src/fields/CodeEditor/hooks/useLanguageExtension.ts","../../src/fields/CodeEditor/index.tsx"],"sourcesContent":["import type { Extension } from '@codemirror/state';\nimport type { CodeLanguage } from '@shapio/schema';\n\n/**\n * Language support per code language, each pack its own chunk: loaded only when an editor for that language\n * opens. HTML closes no tags on its own (no editor here inserts text the person did not type).\n */\nconst LOADERS: Readonly<Record<CodeLanguage, () => Promise<Extension>>> = {\n plain: () => Promise.resolve([]),\n html: () => import('@codemirror/lang-html').then(({ html }) => html({ autoCloseTags: false })),\n css: () => import('@codemirror/lang-css').then(({ css }) => css()),\n javascript: () => import('@codemirror/lang-javascript').then(({ javascript }) => javascript()),\n json: () => import('@codemirror/lang-json').then(({ json }) => json()),\n yaml: () => import('@codemirror/lang-yaml').then(({ yaml }) => yaml()),\n markdown: () => import('@codemirror/lang-markdown').then(({ markdown }) => markdown()),\n};\n\nexport const languageExtension = (language: CodeLanguage): Promise<Extension> => LOADERS[language]();\n","import type { Extension } from '@codemirror/state';\nimport type { CodeLanguage } from '@shapio/schema';\nimport { useEffect, useState } from 'react';\nimport { languageExtension } from '@/components/CodeMirror/helpers/languages';\nimport { reportError } from '@/helpers/reportError';\n\nconst NONE: Extension = [];\n\n/**\n * The language support for a code field, loaded on demand. Until its pack arrives (and if it fails to load)\n * the editor shows plain text; the editor reconfigures when it lands.\n */\nexport const useLanguageExtension = (language: CodeLanguage): Extension => {\n const [loaded, setLoaded] = useState<{ language: CodeLanguage; extension: Extension }>();\n useEffect(() => {\n let current = true;\n languageExtension(language).then(\n (extension) => {\n if (current) {\n setLoaded({ language, extension });\n }\n },\n (error: unknown) => reportError(error, `Loading ${language} highlighting`),\n );\n return () => {\n current = false;\n };\n }, [language]);\n return loaded?.language === language ? loaded.extension : NONE;\n};\n","import type { CSSProperties, FocusEvent } from 'react';\nimport { useCallback, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { CodeMirror } from '@/components/CodeMirror';\nimport { baseExtensions } from '@/components/CodeMirror/helpers/baseExtensions';\nimport { InfoHint } from '@/components/InfoHint';\nimport { valueLabel } from '@/features/Models/helpers/labels';\nimport { useShortcutLabel } from '@/features/Shell/hooks/useShortcutLabel';\nimport { cn } from '@/helpers/cn';\nimport { numberOption, textValue } from '../helpers/props';\nimport type { BuiltInEditorProps } from '../types';\nimport { useLanguageExtension } from './hooks/useLanguageExtension';\n\nconst DEFAULT_ROWS = 12;\n\n/**\n * `codeEditor`: a `code` field's text in CodeMirror, highlighted for the field's language (its pack loads on\n * demand). Shapio never changes the code: the text is the value, and an empty editor is `null`. Tab moves on,\n * as everywhere in the admin; the hint says how to indent. Loaded lazily with its own chunk.\n */\nexport const CodeEditor = (props: BuiltInEditorProps) => {\n const { t } = useTranslation();\n const { inputId, labelId, describedBy, value, onChange, onBlur, readOnly, disabled, validation, field } =\n props;\n const language = props.definition.type === 'code' ? props.definition.settings.language : 'plain';\n const rows = numberOption(props, 'rows') ?? DEFAULT_ROWS;\n const hintId = `${inputId}-keys`;\n const indent = useShortcutLabel(']');\n const outdent = useShortcutLabel('[');\n const languageSupport = useLanguageExtension(language);\n const locked = readOnly || disabled;\n const extensions = useMemo(\n () => [\n ...baseExtensions({\n id: inputId,\n labelledBy: labelId,\n describedBy: [describedBy, hintId].filter(Boolean).join(' '),\n invalid: validation.invalid,\n readOnly: locked,\n }),\n languageSupport,\n ],\n [inputId, labelId, describedBy, hintId, validation.invalid, locked, languageSupport],\n );\n const handleChange = useCallback((text: string) => onChange(text === '' ? null : text), [onChange]);\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n onBlur();\n }\n };\n return (\n <div className=\"space-y-1\">\n <div\n onBlur={handleBlur}\n style={{ '--code-rows': rows } as CSSProperties}\n className={cn(\n 'h-[calc(var(--code-rows)*1.3rem+1rem+2px)] overflow-hidden rounded-lg border border-input bg-card focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50',\n validation.invalid && 'border-destructive ring-destructive/20 dark:ring-destructive/40',\n disabled && 'opacity-50',\n )}\n >\n <CodeMirror value={textValue(value)} onChange={handleChange} extensions={extensions} />\n </div>\n <div className=\"flex items-center gap-1 text-meta text-muted-foreground\">\n <span>{valueLabel(language)}</span>\n <InfoHint about={field.label} id={hintId}>\n {t('content.fields.code.keys', { indent, outdent })}\n </InfoHint>\n </div>\n </div>\n );\n};\n"],"file":"CodeEditor-NMvrWgxT.js"}
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{t as r}from"./loader-circle-C-9trZPI.js";import{C as i,D as a,E as o,S as s,T as c,b as l,g as u,w as d,x as f,y as p}from"./badge-ydvfgE8a.js";import{n as m,t as h}from"./createLucideIcon-CqygG5K6.js";import{a as g,i as _,n as v,r as y,x as b}from"./InfoHint-bYMd_t0J.js";import{b as x,d as S,h as C,m as w,p as T,u as E,x as D}from"./es2015-DrAA1N2V.js";import{a as O,c as k,i as A,o as j}from"./skeleton-Dyi_b1wq.js";import{o as M,t as N,v as P}from"./field-W1dB_h6d.js";import{t as F}from"./cn-DVhJ55Mo.js";var I={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};I.node;var L=h(I),R=e(t(),1),z=e(n(),1),ee=Object.defineProperty,B=(e,t)=>ee(e,`name`,{value:t,configurable:!0}),[te,ne]=w(`AlertDialog`,[a]),V=a(),re=B(e=>{let{__scopeAlertDialog:t,...n}=e,r=V(t);return(0,z.jsx)(p,{...r,...n,modal:!0})},`AlertDialog`);R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(o,{...i,...r,ref:t})},`AlertDialogTrigger`));var ie=B(e=>{let{__scopeAlertDialog:t,...n}=e,r=V(t);return(0,z.jsx)(d,{...r,...n})},`AlertDialogPortal`),ae=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=V(n);return(0,z.jsx)(i,{...a,...r,ref:t})},`AlertDialogOverlay`)),[oe,se]=te(`AlertDialogContent`),ce=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=V(n),o=R.useRef(null),s=x(t,o),c=R.useRef(null);return(0,z.jsx)(oe,{scope:n,cancelRef:c,children:(0,z.jsx)(f,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:T(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),le=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(c,{...i,...r,ref:t})},`AlertDialogTitle`)),ue=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(s,{...i,...r,ref:t})},`AlertDialogDescription`)),de=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(l,{...i,...r,ref:t})},`AlertDialogAction`)),fe=`AlertDialogCancel`,pe=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=se(fe,n),a=V(n),o=x(t,i);return(0,z.jsx)(l,{...a,...r,ref:o})},`AlertDialogCancel`)),me=re,he=ie,ge=ae,_e=ce,ve=de,ye=pe,be=le,xe=ue,Se=Object.defineProperty,H=(e,t)=>Se(e,`name`,{value:t,configurable:!0}),U=`Checkbox`,[Ce,we]=w(U),[Te,W]=Ce(U);function G(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=S({prop:n,defaultProp:i??!1,onChange:c,caller:U}),[m,h]=R.useState(null),[g,_]=R.useState(null),v=R.useRef(!1),[y,b]=R.useReducer(e=>e+1,0),x=!m||!!o||!!m.closest(`form`),C={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:b,required:l,defaultChecked:!q(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,z.jsx)(Te,{scope:t,...C,children:K(d)?d(C):r})}H(G,`CheckboxProvider`);var Ee=`CheckboxTrigger`,De=R.forwardRef(H(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=W(Ee,e),g=x(i,u),_=R.useRef(c);return R.useEffect(()=>{let e=a?.form;if(e){let t=H(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,z.jsx)(C.button,{type:`button`,role:`checkbox`,"aria-checked":q(c)?`mixed`:c,"aria-required":l,"data-state":J(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:g,onKeyDown:T(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:T(n,e=>{p(),d(e=>q(e)?!0:!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),Oe=R.forwardRef(H(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,z.jsx)(G,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(De,{...d,ref:t,__scopeCheckbox:n}),e&&(0,z.jsx)(Me,{__scopeCheckbox:n})]})})},`Checkbox`)),ke=`CheckboxIndicator`,Ae=R.forwardRef(H(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=W(ke,n);return(0,z.jsx)(E,{present:r||q(a.checked)||a.checked===!0,children:(0,z.jsx)(C.span,{"data-state":J(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),je=`CheckboxBubbleInput`,Me=R.forwardRef(H(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=W(je,e),g=x(r,h),_=b(i),v=R.useRef(!1),y=R.useRef(s),S=R.useRef(o);R.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==S.current;S.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});e.indeterminate=q(s),n.call(e,!q(s)&&s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let w=R.useRef(!q(s)&&s);return(0,z.jsx)(C.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??w.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:T(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function K(e){return typeof e==`function`}H(K,`isFunction`);function q(e){return e===`indeterminate`}H(q,`isIndeterminate`);function J(e){return q(e)?`indeterminate`:e?`checked`:`unchecked`}H(J,`getState`);var Ne=j(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/30 bg-destructive-muted text-destructive *:data-[slot=alert-description]:text-destructive [&>svg]:text-current`,warning:`border-warning/30 bg-warning-muted text-warning *:data-[slot=alert-description]:text-warning [&>svg]:text-current`,info:`border-border bg-muted text-foreground *:data-[slot=alert-description]:text-muted-foreground dark:border-info/30 dark:bg-info-muted dark:text-info dark:*:data-[slot=alert-description]:text-info [&>svg]:text-info`,success:`border-success/30 bg-success-muted text-success *:data-[slot=alert-description]:text-success [&>svg]:text-current`}},defaultVariants:{variant:`default`}});function Y({className:e,variant:t,...n}){return(0,z.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:F(Ne({variant:t}),e),...n})}function Pe({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-title`,className:F(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function X({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-description`,className:F(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}var Z=({error:e})=>e?(0,z.jsxs)(Y,{variant:`destructive`,children:[(0,z.jsx)(L,{"aria-hidden":`true`}),(0,z.jsx)(X,{children:D(e)})]}):null,Fe=e=>{let{title:t,description:n,confirmLabel:i,cancelLabel:a,pendingLabel:o,tone:s,onConfirm:c,align:l=`end`,side:d=`bottom`,onCloseAutoFocus:f}=e,{t:p}=m(),h=(0,R.useId)(),b=(0,R.useId)(),x=(0,R.useRef)(null),S=(0,R.useRef)(null),[C,w]=(0,R.useState)(!1),[T,E]=(0,R.useState)(!1),[D,O]=(0,R.useState)(null),k=e.trigger===void 0?e.open:C,j=t=>{t&&O(null),e.trigger===void 0?e.onOpenChange(t):w(t)},M=e=>T&&!e?void 0:j(e),N=()=>{let e=c();if(!(e instanceof Promise)){j(!1);return}E(!0),O(null),e.then(()=>{E(!1),j(!1)},e=>{E(!1),O(e)})},P=u(e=>{e.preventDefault(),(s===`danger`?x:S).current?.focus()},f);return(0,z.jsxs)(v,{open:k,onOpenChange:M,modal:!0,children:[e.trigger===void 0?(0,z.jsx)(y,{asChild:!0,children:e.children}):(0,z.jsx)(g,{asChild:!0,children:e.trigger}),(0,z.jsxs)(_,{role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":h,"aria-describedby":n?b:void 0,align:l,side:d,className:`w-80 space-y-4`,...P,children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`p`,{id:h,className:`text-sm font-semibold`,children:t}),n?(0,z.jsx)(`p`,{id:b,className:`text-meta text-muted-foreground`,children:n}):null]}),(0,z.jsx)(Z,{error:D}),(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(A,{ref:x,type:`button`,size:`sm`,variant:`outline`,disabled:T,onClick:()=>j(!1),children:a??p(`common.cancel`)}),(0,z.jsx)(A,{ref:S,type:`button`,size:`sm`,variant:s===`danger`?`destructive`:`default`,disabled:T,"aria-busy":T||void 0,onClick:N,children:T?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(r,{className:`animate-spin`,"aria-hidden":`true`}),o??i]}):i})]})]})]})};function Q({className:e,...t}){return(0,z.jsx)(Oe,{"data-slot":`checkbox`,className:F(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary`,e),...t,children:(0,z.jsx)(Ae,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:t.checked===`indeterminate`?(0,z.jsx)(P,{className:`size-3.5`}):(0,z.jsx)(k,{className:`size-3.5`})})})}function Ie({...e}){return(0,z.jsx)(me,{"data-slot":`alert-dialog`,...e})}function Le({...e}){return(0,z.jsx)(he,{"data-slot":`alert-dialog-portal`,...e})}function $({className:e,...t}){return(0,z.jsx)(ge,{"data-slot":`alert-dialog-overlay`,className:F(`fixed inset-0 z-50 bg-overlay/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Re({className:e,size:t=`default`,onOpenAutoFocus:n,onCloseAutoFocus:r,...i}){let a=u(n,r);return(0,z.jsxs)(Le,{children:[(0,z.jsx)($,{}),(0,z.jsx)(_e,{"data-slot":`alert-dialog-content`,"data-size":t,className:F(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-card p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...i,...a})]})}function ze({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:F(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function Be({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:F(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function Ve({className:e,...t}){return(0,z.jsx)(be,{"data-slot":`alert-dialog-title`,className:F(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function He({className:e,...t}){return(0,z.jsx)(xe,{"data-slot":`alert-dialog-description`,className:F(`text-sm text-muted-foreground`,e),...t})}function Ue({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,z.jsx)(A,{variant:t,size:n,asChild:!0,children:(0,z.jsx)(ve,{"data-slot":`alert-dialog-action`,className:F(e),...r})})}function We({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,z.jsx)(A,{variant:t,size:n,asChild:!0,children:(0,z.jsx)(ye,{"data-slot":`alert-dialog-cancel`,className:F(e),...r})})}var Ge=({open:e,onOpenChange:t,title:n,description:i,confirmLabel:a,cancelLabel:o,destructive:s=!1,onConfirm:c,acknowledgement:l,pending:u,pendingLabel:d,error:f})=>{let{t:p}=m(),h=(0,R.useId)(),[g,_]=(0,R.useState)(!1),[v,y]=(0,R.useState)(e);e!==v&&(y(e),e&&_(!1));let b=u!==void 0,x=u===!0,S=l!==void 0&&!g,C=O({variant:s?`destructive`:`default`});return(0,z.jsx)(Ie,{open:e,onOpenChange:e=>x&&!e?void 0:t(e),children:(0,z.jsxs)(Re,{children:[(0,z.jsxs)(ze,{children:[(0,z.jsx)(Ve,{children:n}),(0,z.jsx)(He,{children:i})]}),l?(0,z.jsxs)(N,{orientation:`horizontal`,children:[(0,z.jsx)(Q,{id:h,checked:g,disabled:x,onCheckedChange:e=>_(e===!0)}),(0,z.jsx)(M,{htmlFor:h,className:`font-normal`,children:l})]}):null,b?(0,z.jsx)(Z,{error:f}):null,(0,z.jsxs)(Be,{children:[(0,z.jsx)(We,{disabled:x,children:o??p(`common.cancel`)}),b?(0,z.jsx)(A,{type:`button`,variant:s?`destructive`:`default`,disabled:x||S,"aria-busy":x||void 0,onClick:c,children:x?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(r,{className:`animate-spin`,"aria-hidden":`true`}),d??a]}):a}):(0,z.jsx)(Ue,{className:C,disabled:S,onClick:c,children:a})]})]})})};export{Y as a,L as c,Z as i,Q as n,X as o,Fe as r,Pe as s,Ge as t};
2
- //# sourceMappingURL=ConfirmDialog-DZRJfdvH.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{t as r}from"./loader-circle-C-9trZPI.js";import{C as i,D as a,E as o,S as s,T as c,b as l,g as u,w as d,x as f,y as p}from"./badge-vLiQczOd.js";import{n as m,t as h}from"./createLucideIcon-CqygG5K6.js";import{a as g,i as _,n as v,r as y,x as b}from"./InfoHint-Dyzyf59c.js";import{b as x,d as S,h as C,m as w,p as T,u as E,x as D}from"./es2015-BKfbx3rz.js";import{a as O,c as k,i as A,o as j}from"./skeleton-D4eOLKLY.js";import{o as M,t as N,v as P}from"./field-Bg-JRgsB.js";import{t as F}from"./cn-DVhJ55Mo.js";var I={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};I.node;var L=h(I),R=e(t(),1),z=e(n(),1),ee=Object.defineProperty,B=(e,t)=>ee(e,`name`,{value:t,configurable:!0}),[te,ne]=w(`AlertDialog`,[a]),V=a(),re=B(e=>{let{__scopeAlertDialog:t,...n}=e,r=V(t);return(0,z.jsx)(p,{...r,...n,modal:!0})},`AlertDialog`);R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(o,{...i,...r,ref:t})},`AlertDialogTrigger`));var ie=B(e=>{let{__scopeAlertDialog:t,...n}=e,r=V(t);return(0,z.jsx)(d,{...r,...n})},`AlertDialogPortal`),ae=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,a=V(n);return(0,z.jsx)(i,{...a,...r,ref:t})},`AlertDialogOverlay`)),[oe,se]=te(`AlertDialogContent`),ce=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,children:r,...i}=e,a=V(n),o=R.useRef(null),s=x(t,o),c=R.useRef(null);return(0,z.jsx)(oe,{scope:n,cancelRef:c,children:(0,z.jsx)(f,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:T(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})},`AlertDialogContent`)),le=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(c,{...i,...r,ref:t})},`AlertDialogTitle`)),ue=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(s,{...i,...r,ref:t})},`AlertDialogDescription`)),de=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,i=V(n);return(0,z.jsx)(l,{...i,...r,ref:t})},`AlertDialogAction`)),fe=`AlertDialogCancel`,pe=R.forwardRef(B(function(e,t){let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=se(fe,n),a=V(n),o=x(t,i);return(0,z.jsx)(l,{...a,...r,ref:o})},`AlertDialogCancel`)),me=re,he=ie,ge=ae,_e=ce,ve=de,ye=pe,be=le,xe=ue,Se=Object.defineProperty,H=(e,t)=>Se(e,`name`,{value:t,configurable:!0}),U=`Checkbox`,[Ce,we]=w(U),[Te,W]=Ce(U);function G(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=S({prop:n,defaultProp:i??!1,onChange:c,caller:U}),[m,h]=R.useState(null),[g,_]=R.useState(null),v=R.useRef(!1),[y,b]=R.useReducer(e=>e+1,0),x=!m||!!o||!!m.closest(`form`),C={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,userInteractionCount:y,onUserInteraction:b,required:l,defaultChecked:!q(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,z.jsx)(Te,{scope:t,...C,children:K(d)?d(C):r})}H(G,`CheckboxProvider`);var Ee=`CheckboxTrigger`,De=R.forwardRef(H(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,onUserInteraction:p,isFormControl:m,bubbleInput:h}=W(Ee,e),g=x(i,u),_=R.useRef(c);return R.useEffect(()=>{let e=a?.form;if(e){let t=H(()=>d(_.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,z.jsx)(C.button,{type:`button`,role:`checkbox`,"aria-checked":q(c)?`mixed`:c,"aria-required":l,"data-state":J(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:g,onKeyDown:T(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:T(n,e=>{p(),d(e=>q(e)?!0:!e),h&&m&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})},`CheckboxTrigger`)),Oe=R.forwardRef(H(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,z.jsx)(G,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(De,{...d,ref:t,__scopeCheckbox:n}),e&&(0,z.jsx)(Me,{__scopeCheckbox:n})]})})},`Checkbox`)),ke=`CheckboxIndicator`,Ae=R.forwardRef(H(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=W(ke,n);return(0,z.jsx)(E,{present:r||q(a.checked)||a.checked===!0,children:(0,z.jsx)(C.span,{"data-state":J(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),je=`CheckboxBubbleInput`,Me=R.forwardRef(H(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,hasConsumerStoppedPropagationRef:a,userInteractionCount:o,checked:s,defaultChecked:c,required:l,disabled:u,name:d,value:f,form:p,bubbleInput:m,setBubbleInput:h}=W(je,e),g=x(r,h),_=b(i),v=R.useRef(!1),y=R.useRef(s),S=R.useRef(o);R.useEffect(()=>{let e=m;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=o!==S.current;S.current=o;let i=y.current!==s;y.current=s;let c=!(r&&a.current);if(i&&n){v.current=!r;let t=new Event(`click`,{bubbles:c});e.indeterminate=q(s),n.call(e,!q(s)&&s),e.dispatchEvent(t),v.current=!1}},[m,s,a,o]);let w=R.useRef(!q(s)&&s);return(0,z.jsx)(C.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:c??w.current,required:l,disabled:u,name:d,value:f,form:p,...n,tabIndex:-1,ref:g,onClick:T(t,e=>{v.current&&e.stopPropagation()}),style:{...n.style,..._,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function K(e){return typeof e==`function`}H(K,`isFunction`);function q(e){return e===`indeterminate`}H(q,`isIndeterminate`);function J(e){return q(e)?`indeterminate`:e?`checked`:`unchecked`}H(J,`getState`);var Ne=j(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`border-destructive/30 bg-destructive-muted text-destructive *:data-[slot=alert-description]:text-destructive [&>svg]:text-current`,warning:`border-warning/30 bg-warning-muted text-warning *:data-[slot=alert-description]:text-warning [&>svg]:text-current`,info:`border-border bg-muted text-foreground *:data-[slot=alert-description]:text-muted-foreground dark:border-info/30 dark:bg-info-muted dark:text-info dark:*:data-[slot=alert-description]:text-info [&>svg]:text-info`,success:`border-success/30 bg-success-muted text-success *:data-[slot=alert-description]:text-success [&>svg]:text-current`}},defaultVariants:{variant:`default`}});function Y({className:e,variant:t,...n}){return(0,z.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:F(Ne({variant:t}),e),...n})}function Pe({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-title`,className:F(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function X({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-description`,className:F(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}var Z=({error:e})=>e?(0,z.jsxs)(Y,{variant:`destructive`,children:[(0,z.jsx)(L,{"aria-hidden":`true`}),(0,z.jsx)(X,{children:D(e)})]}):null,Fe=e=>{let{title:t,description:n,confirmLabel:i,cancelLabel:a,pendingLabel:o,tone:s,onConfirm:c,align:l=`end`,side:d=`bottom`,onCloseAutoFocus:f}=e,{t:p}=m(),h=(0,R.useId)(),b=(0,R.useId)(),x=(0,R.useRef)(null),S=(0,R.useRef)(null),[C,w]=(0,R.useState)(!1),[T,E]=(0,R.useState)(!1),[D,O]=(0,R.useState)(null),k=e.trigger===void 0?e.open:C,j=t=>{t&&O(null),e.trigger===void 0?e.onOpenChange(t):w(t)},M=e=>T&&!e?void 0:j(e),N=()=>{let e=c();if(!(e instanceof Promise)){j(!1);return}E(!0),O(null),e.then(()=>{E(!1),j(!1)},e=>{E(!1),O(e)})},P=u(e=>{e.preventDefault(),(s===`danger`?x:S).current?.focus()},f);return(0,z.jsxs)(v,{open:k,onOpenChange:M,modal:!0,children:[e.trigger===void 0?(0,z.jsx)(y,{asChild:!0,children:e.children}):(0,z.jsx)(g,{asChild:!0,children:e.trigger}),(0,z.jsxs)(_,{role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":h,"aria-describedby":n?b:void 0,align:l,side:d,className:`w-80 space-y-4`,...P,children:[(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsx)(`p`,{id:h,className:`text-sm font-semibold`,children:t}),n?(0,z.jsx)(`p`,{id:b,className:`text-meta text-muted-foreground`,children:n}):null]}),(0,z.jsx)(Z,{error:D}),(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(A,{ref:x,type:`button`,size:`sm`,variant:`outline`,disabled:T,onClick:()=>j(!1),children:a??p(`common.cancel`)}),(0,z.jsx)(A,{ref:S,type:`button`,size:`sm`,variant:s===`danger`?`destructive`:`default`,disabled:T,"aria-busy":T||void 0,onClick:N,children:T?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(r,{className:`animate-spin`,"aria-hidden":`true`}),o??i]}):i})]})]})]})};function Q({className:e,...t}){return(0,z.jsx)(Oe,{"data-slot":`checkbox`,className:F(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary`,e),...t,children:(0,z.jsx)(Ae,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:t.checked===`indeterminate`?(0,z.jsx)(P,{className:`size-3.5`}):(0,z.jsx)(k,{className:`size-3.5`})})})}function Ie({...e}){return(0,z.jsx)(me,{"data-slot":`alert-dialog`,...e})}function Le({...e}){return(0,z.jsx)(he,{"data-slot":`alert-dialog-portal`,...e})}function $({className:e,...t}){return(0,z.jsx)(ge,{"data-slot":`alert-dialog-overlay`,className:F(`fixed inset-0 z-50 bg-overlay/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Re({className:e,size:t=`default`,onOpenAutoFocus:n,onCloseAutoFocus:r,...i}){let a=u(n,r);return(0,z.jsxs)(Le,{children:[(0,z.jsx)($,{}),(0,z.jsx)(_e,{"data-slot":`alert-dialog-content`,"data-size":t,className:F(`group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-card p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg`,e),...i,...a})]})}function ze({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:F(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function Be({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:F(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function Ve({className:e,...t}){return(0,z.jsx)(be,{"data-slot":`alert-dialog-title`,className:F(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function He({className:e,...t}){return(0,z.jsx)(xe,{"data-slot":`alert-dialog-description`,className:F(`text-sm text-muted-foreground`,e),...t})}function Ue({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,z.jsx)(A,{variant:t,size:n,asChild:!0,children:(0,z.jsx)(ve,{"data-slot":`alert-dialog-action`,className:F(e),...r})})}function We({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,z.jsx)(A,{variant:t,size:n,asChild:!0,children:(0,z.jsx)(ye,{"data-slot":`alert-dialog-cancel`,className:F(e),...r})})}var Ge=({open:e,onOpenChange:t,title:n,description:i,confirmLabel:a,cancelLabel:o,destructive:s=!1,onConfirm:c,acknowledgement:l,pending:u,pendingLabel:d,error:f})=>{let{t:p}=m(),h=(0,R.useId)(),[g,_]=(0,R.useState)(!1),[v,y]=(0,R.useState)(e);e!==v&&(y(e),e&&_(!1));let b=u!==void 0,x=u===!0,S=l!==void 0&&!g,C=O({variant:s?`destructive`:`default`});return(0,z.jsx)(Ie,{open:e,onOpenChange:e=>x&&!e?void 0:t(e),children:(0,z.jsxs)(Re,{children:[(0,z.jsxs)(ze,{children:[(0,z.jsx)(Ve,{children:n}),(0,z.jsx)(He,{children:i})]}),l?(0,z.jsxs)(N,{orientation:`horizontal`,children:[(0,z.jsx)(Q,{id:h,checked:g,disabled:x,onCheckedChange:e=>_(e===!0)}),(0,z.jsx)(M,{htmlFor:h,className:`font-normal`,children:l})]}):null,b?(0,z.jsx)(Z,{error:f}):null,(0,z.jsxs)(Be,{children:[(0,z.jsx)(We,{disabled:x,children:o??p(`common.cancel`)}),b?(0,z.jsx)(A,{type:`button`,variant:s?`destructive`:`default`,disabled:x||S,"aria-busy":x||void 0,onClick:c,children:x?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(r,{className:`animate-spin`,"aria-hidden":`true`}),d??a]}):a}):(0,z.jsx)(Ue,{className:C,disabled:S,onClick:c,children:a})]})]})})};export{Y as a,L as c,Z as i,Q as n,X as o,Fe as r,Pe as s,Ge as t};
2
+ //# sourceMappingURL=ConfirmDialog-Rd6WDt6q.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmDialog-DZRJfdvH.js","names":["__defProp","__name","AlertDialog","DialogPrimitive.Root","DialogPrimitive.Trigger","AlertDialogPortal","DialogPrimitive.Portal","AlertDialogOverlay","DialogPrimitive.Overlay","AlertDialogContent","DialogPrimitive.Content","AlertDialogTitle","DialogPrimitive.Title","AlertDialogDescription","DialogPrimitive.Description","AlertDialogAction","DialogPrimitive.Close","AlertDialogCancel","Checkbox","Fragment","AlertCircle","useId","useRef","useState","_Fragment","Loader2","CheckboxPrimitive.Root","CheckboxPrimitive.Indicator","MinusIcon","CheckIcon","AlertDialogPrimitive.Root","AlertDialogPrimitive.Portal","AlertDialogPrimitive.Overlay","AlertDialogPrimitive.Content","AlertDialogPrimitive.Title","AlertDialogPrimitive.Description","AlertDialogPrimitive.Action","AlertDialogPrimitive.Cancel","useId","useState","_Fragment","Loader2","__toESM","require_jsx_runtime","LoaderCircle","DialogOverlay","createDialogScope","DialogTrigger","DialogDescription","DialogTitle","DialogClose","useReturnFocus","DialogPortal","DialogContent","Dialog","useTranslation","createLucideIcon","PopoverTrigger","PopoverContent","Popover","PopoverAnchor","useSize","useComposedRefs","useControllableState","Primitive","createContextScope","composeEventHandlers","Presence","describeError","buttonVariants","Check","Button","cva","FieldLabel","Field","Minus","cn","__iconData","CircleAlert","import_react","require_react","import_jsx_runtime","__defProp$1","__name$1","target","createAlertDialogContext","createAlertDialogScope","useDialogScope","AlertDialog$1","alertDialogProps","props","dialogScope","__scopeAlertDialog","triggerProps","forwardedRef","AlertDialogPortal$1","portalProps","AlertDialogOverlay$1","overlayProps","AlertDialogContentProvider","useAlertDialogContentContext","AlertDialogContent$1","contentProps","contentRef","composedRefs","cancelRef","event","AlertDialogTitle$1","titleProps","AlertDialogDescription$1","descriptionProps","AlertDialogAction$1","actionProps","CANCEL_NAME","AlertDialogCancel$1","cancelProps","ref","Root2","Portal2","Overlay2","Content2","Action","Cancel","Title2","Description2","__defProp","__name","CHECKBOX_NAME","createCheckboxContext","createCheckboxScope","CheckboxProviderImpl","useCheckboxContext","CheckboxProvider","checkedProp","checked","setChecked","defaultChecked","onCheckedChange","control","setControl","bubbleInput","setBubbleInput","hasConsumerStoppedPropagationRef","userInteractionCount","onUserInteraction","count","isFormControl","form","context","__scopeCheckbox","isFunction","internal_do_not_use_render","children","TRIGGER_NAME","CheckboxTrigger","checkboxProps","initialCheckedStateRef","reset","isIndeterminate","required","getState","disabled","onKeyDown","onClick","prevChecked","Checkbox$1","CheckboxBubbleInput","INDICATOR_NAME","CheckboxIndicator","indicatorProps","forceMount","BUBBLE_INPUT_NAME","controlSize","shouldStopClickPropagationRef","prevCheckedRef","prevUserInteractionCountRef","input","inputProto","isUserInteraction","checkedChanged","bubbles","defaultCheckedRef","value","alertVariants","Alert","className","AlertTitle","AlertDescription","FormError","error","InlineConfirm","titleId","descriptionId","confirmRef","uncontrolledOpen","setUncontrolledOpen","pending","setPending","setError","open","changeOpen","next","requestOpenChange","confirm","result","onConfirm","reason","returnFocus","tone","onCloseAutoFocus","description","title","cancelLabel","t","pendingLabel","confirmLabel","Checkbox","AlertDialog","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent","onOpenAutoFocus","size","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","AlertDialogCancel","ConfirmDialog","acknowledgementId","acknowledged","setAcknowledged","wasOpen","setWasOpen","isAsync","busy","blocked","acknowledgement","confirmClassName","destructive","onOpenChange"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/circle-alert.mjs","../../../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.23_@types+react-dom@19.3.0_@types+react@19.3.0__@types_490aa920fbab0adbc2c4344386ab6831/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-checkbox@1.3.11_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_c6d869b9fcc94d95bd12a12175a8f53a/node_modules/@radix-ui/react-checkbox/dist/index.mjs","../../src/components/ui/alert.tsx","../../src/components/FormError/index.tsx","../../src/components/InlineConfirm/index.tsx","../../src/components/ui/checkbox.tsx","../../src/components/ui/alert-dialog.tsx","../../src/components/ConfirmDialog/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-alert\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"8\", y2: \"12\", key: \"1pkeuh\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"16\", y2: \"16\", key: \"4dfq90\" }]\n ],\n aliases: [\"alert-circle\"]\n};\n__iconData.node;\nconst CircleAlert = createLucideIcon(__iconData);\n\nexport { __iconData, CircleAlert as default };\n//# sourceMappingURL=circle-alert.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = /* @__PURE__ */ __name((props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n}, \"AlertDialog\");\nvar AlertDialogTrigger = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogTrigger2(props, forwardedRef) {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }, \"AlertDialogTrigger\")\n);\nvar AlertDialogPortal = /* @__PURE__ */ __name((props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n}, \"AlertDialogPortal\");\nvar AlertDialogOverlay = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogOverlay2(props, forwardedRef) {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }, \"AlertDialogOverlay\")\n);\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar AlertDialogContent = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogContent2(props, forwardedRef) {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsx(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children\n }\n ) });\n }, \"AlertDialogContent\")\n);\nvar AlertDialogTitle = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogTitle2(props, forwardedRef) {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }, \"AlertDialogTitle\")\n);\nvar AlertDialogDescription = React.forwardRef(/* @__PURE__ */ __name(function AlertDialogDescription2(props, forwardedRef) {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n}, \"AlertDialogDescription\"));\nvar AlertDialogAction = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogAction2(props, forwardedRef) {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }, \"AlertDialogAction\")\n);\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogCancel2(props, forwardedRef) {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }, \"AlertDialogCancel\")\n);\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/checkbox.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar CHECKBOX_NAME = \"Checkbox\";\nvar [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\nvar [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);\nfunction CheckboxProvider(props) {\n const {\n __scopeCheckbox,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = \"on\",\n // @ts-expect-error\n internal_do_not_use_render\n } = props;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: CHECKBOX_NAME\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const [userInteractionCount, onUserInteraction] = React.useReducer(\n (count) => count + 1,\n 0\n );\n const isFormControl = control ? !!form || !!control.closest(\"form\") : (\n // We set this to true by default so that events bubble to forms without JS (SSR)\n true\n );\n const context = {\n checked,\n disabled,\n setChecked,\n control,\n setControl,\n name,\n form,\n value,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n onUserInteraction,\n required,\n defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,\n isFormControl,\n bubbleInput,\n setBubbleInput\n };\n return /* @__PURE__ */ jsx(\n CheckboxProviderImpl,\n {\n scope: __scopeCheckbox,\n ...context,\n children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children\n }\n );\n}\n__name(CheckboxProvider, \"CheckboxProvider\");\nvar TRIGGER_NAME = \"CheckboxTrigger\";\nvar CheckboxTrigger = /* @__PURE__ */ React.forwardRef(\n /* @__PURE__ */ __name(function CheckboxTrigger2({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) {\n const {\n control,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n onUserInteraction,\n isFormControl,\n bubbleInput\n } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const form = control?.form;\n if (form) {\n const reset = /* @__PURE__ */ __name(() => setChecked(initialCheckedStateRef.current), \"reset\");\n form.addEventListener(\"reset\", reset);\n return () => form.removeEventListener(\"reset\", reset);\n }\n }, [control, setChecked]);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"checkbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...checkboxProps,\n ref: composedRefs,\n onKeyDown: composeEventHandlers(onKeyDown, (event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onClick: composeEventHandlers(onClick, (event) => {\n onUserInteraction();\n setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n );\n }, \"CheckboxTrigger\")\n);\nvar Checkbox = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function Checkbox2(props, forwardedRef) {\n const {\n __scopeCheckbox,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...checkboxProps\n } = props;\n return /* @__PURE__ */ jsx(\n CheckboxProvider,\n {\n __scopeCheckbox,\n checked,\n defaultChecked,\n disabled,\n required,\n onCheckedChange,\n name,\n form,\n value,\n internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n CheckboxTrigger,\n {\n ...checkboxProps,\n ref: forwardedRef,\n __scopeCheckbox\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n CheckboxBubbleInput,\n {\n __scopeCheckbox\n }\n )\n ] })\n }\n );\n }, \"Checkbox\")\n);\nvar INDICATOR_NAME = \"CheckboxIndicator\";\nvar CheckboxIndicator = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function CheckboxIndicator2(props, forwardedRef) {\n const { __scopeCheckbox, forceMount, ...indicatorProps } = props;\n const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(context.checked) || context.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef,\n style: { pointerEvents: \"none\", ...props.style }\n }\n )\n }\n );\n }, \"CheckboxIndicator\")\n);\nvar BUBBLE_INPUT_NAME = \"CheckboxBubbleInput\";\nvar CheckboxBubbleInput = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function CheckboxBubbleInput2({ __scopeCheckbox, onClick, ...props }, forwardedRef) {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput\n } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const controlSize = useSize(control);\n const shouldStopClickPropagationRef = React.useRef(false);\n const prevCheckedRef = React.useRef(checked);\n const prevUserInteractionCountRef = React.useRef(userInteractionCount);\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n const isUserInteraction = userInteractionCount !== prevUserInteractionCountRef.current;\n prevUserInteractionCountRef.current = userInteractionCount;\n const checkedChanged = prevCheckedRef.current !== checked;\n prevCheckedRef.current = checked;\n const bubbles = !(isUserInteraction && hasConsumerStoppedPropagationRef.current);\n if (checkedChanged && setChecked) {\n shouldStopClickPropagationRef.current = !isUserInteraction;\n const event = new Event(\"click\", { bubbles });\n input.indeterminate = isIndeterminate(checked);\n setChecked.call(input, isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n shouldStopClickPropagationRef.current = false;\n }\n }, [bubbleInput, checked, hasConsumerStoppedPropagationRef, userInteractionCount]);\n const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: defaultChecked ?? defaultCheckedRef.current,\n required,\n disabled,\n name,\n value,\n form,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n onClick: composeEventHandlers(onClick, (event) => {\n if (shouldStopClickPropagationRef.current) {\n event.stopPropagation();\n }\n }),\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0,\n // We transform because the input is absolutely positioned but we have\n // rendered it **after** the button. This pulls it back to sit on top\n // of the button.\n transform: \"translateX(-100%)\"\n }\n }\n );\n }, \"CheckboxBubbleInput\")\n);\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n__name(isFunction, \"isFunction\");\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\n__name(isIndeterminate, \"isIndeterminate\");\nfunction getState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\n__name(getState, \"getState\");\nexport {\n Checkbox,\n CheckboxIndicator,\n CheckboxIndicator as Indicator,\n Checkbox as Root,\n createCheckboxScope,\n CheckboxBubbleInput as unstable_BubbleInput,\n CheckboxBubbleInput as unstable_CheckboxBubbleInput,\n CheckboxProvider as unstable_CheckboxProvider,\n CheckboxTrigger as unstable_CheckboxTrigger,\n CheckboxProvider as unstable_Provider,\n CheckboxTrigger as unstable_Trigger\n};\n//# sourceMappingURL=index.mjs.map\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '@/helpers/cn';\n\nconst alertVariants = cva(\n 'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'border-destructive/30 bg-destructive-muted text-destructive *:data-[slot=alert-description]:text-destructive [&>svg]:text-current',\n // Shapio: status alerts on the status tokens (DESIGN.md).\n warning:\n 'border-warning/30 bg-warning-muted text-warning *:data-[slot=alert-description]:text-warning [&>svg]:text-current',\n // Light: a neutral note with a cobalt icon (no blue surfaces outside the info chip); dark keeps the tint.\n info: 'border-border bg-muted text-foreground *:data-[slot=alert-description]:text-muted-foreground dark:border-info/30 dark:bg-info-muted dark:text-info dark:*:data-[slot=alert-description]:text-info [&>svg]:text-info',\n success:\n 'border-success/30 bg-success-muted text-success *:data-[slot=alert-description]:text-success [&>svg]:text-current',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div data-slot=\"alert\" role=\"alert\" className={cn(alertVariants({ variant }), className)} {...props} />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n 'col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { AlertCircle } from 'lucide-react';\nimport { Alert, AlertDescription } from '@/components/ui/alert';\nimport { describeError } from '@/helpers/describeError';\n\ntype FormErrorProps = { error: unknown };\n\n/** The server's answer to a failed form submission, shown above the submit button and announced. */\nexport const FormError = ({ error }: FormErrorProps) => {\n if (!error) {\n return null;\n }\n return (\n <Alert variant=\"destructive\">\n <AlertCircle aria-hidden=\"true\" />\n <AlertDescription>{describeError(error)}</AlertDescription>\n </Alert>\n );\n};\n","import { Loader2 } from 'lucide-react';\nimport { useId, useRef, useState, type ReactElement } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { useReturnFocus } from '@/hooks/useReturnFocus';\nimport { FormError } from '../FormError';\n\ntype InlineConfirmCommonProps = {\n /** The question, and the popover's accessible name (\"Delete “Hero”?\"). */\n title: string;\n /** The consequence, in one line. */\n description?: string;\n confirmLabel: string;\n cancelLabel?: string;\n /** Shown on Confirm while an async `onConfirm` runs. */\n pendingLabel?: string;\n /** `danger`: red Confirm, focus starts on Cancel. `default`: primary Confirm, focus starts on it. */\n tone: 'danger' | 'default';\n /**\n * Runs on Confirm. Return nothing to close at once; return a promise (`mutateAsync`) to keep the popover\n * open with a spinner until it settles: it closes when it resolves and shows the error when it rejects.\n */\n onConfirm: () => void | Promise<unknown>;\n align?: 'start' | 'center' | 'end';\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Runs as the popover closes, before focus returns to the opener. Call `event.preventDefault()` to keep\n * focus where it is (e.g. on a `SecretReveal` that a confirmed rotate just showed).\n */\n onCloseAutoFocus?: (event: Event) => void;\n};\n\n/** Trigger mode: the popover opens from this button (it gets `aria-expanded` and returns focus to it). */\ntype TriggerModeProps = InlineConfirmCommonProps & {\n trigger: ReactElement;\n open?: never;\n onOpenChange?: never;\n children?: never;\n};\n\n/**\n * Anchored mode, for actions in a menu (a menu item disappears with its menu): the caller opens it (from\n * the item's `onSelect`) and the popover points at `children`, usually the menu's own trigger button.\n */\ntype AnchoredModeProps = InlineConfirmCommonProps & {\n trigger?: never;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n children: ReactElement;\n};\n\ntype InlineConfirmProps = TriggerModeProps | AnchoredModeProps;\n\n/**\n * Confirms a routine destructive or consequential action where it was asked for (DESIGN.md \"Dialogs\"): a\n * modal popover with role `alertdialog`, the question, one line of consequence and Cancel / Confirm. Escape\n * or a click outside cancels, Enter activates the focused button, focus returns to the opener.\n */\nexport const InlineConfirm = (props: InlineConfirmProps) => {\n const {\n title,\n description,\n confirmLabel,\n cancelLabel,\n pendingLabel,\n tone,\n onConfirm,\n align = 'end',\n side = 'bottom',\n onCloseAutoFocus,\n } = props;\n const { t } = useTranslation();\n const titleId = useId();\n const descriptionId = useId();\n const cancelRef = useRef<HTMLButtonElement>(null);\n const confirmRef = useRef<HTMLButtonElement>(null);\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const [pending, setPending] = useState(false);\n const [error, setError] = useState<unknown>(null);\n const open = props.trigger === undefined ? props.open : uncontrolledOpen;\n\n const changeOpen = (next: boolean) => {\n if (next) {\n setError(null);\n }\n if (props.trigger === undefined) {\n props.onOpenChange(next);\n } else {\n setUncontrolledOpen(next);\n }\n };\n // Nothing dismisses it while the action runs.\n const requestOpenChange = (next: boolean) => (pending && !next ? undefined : changeOpen(next));\n\n const confirm = () => {\n const result = onConfirm();\n if (!(result instanceof Promise)) {\n changeOpen(false);\n return;\n }\n setPending(true);\n setError(null);\n result.then(\n () => {\n setPending(false);\n changeOpen(false);\n },\n (reason: unknown) => {\n // Already logged and toasted by the mutation cache; shown here too, beside the action that failed.\n setPending(false);\n setError(reason);\n },\n );\n };\n\n const returnFocus = useReturnFocus((event) => {\n event.preventDefault();\n (tone === 'danger' ? cancelRef : confirmRef).current?.focus();\n }, onCloseAutoFocus);\n\n return (\n <Popover open={open} onOpenChange={requestOpenChange} modal>\n {props.trigger === undefined ? (\n <PopoverAnchor asChild>{props.children}</PopoverAnchor>\n ) : (\n <PopoverTrigger asChild>{props.trigger}</PopoverTrigger>\n )}\n <PopoverContent\n role=\"alertdialog\"\n // Modal like Radix's own dialogs: focus is trapped and the rest of the page is aria-hidden. Declaring\n // it lets assistive technology (and axe's aria-hidden-focus rule) know the hidden page is inert.\n aria-modal=\"true\"\n aria-labelledby={titleId}\n aria-describedby={description ? descriptionId : undefined}\n align={align}\n side={side}\n className=\"w-80 space-y-4\"\n {...returnFocus}\n >\n <div className=\"space-y-1\">\n <p id={titleId} className=\"text-sm font-semibold\">\n {title}\n </p>\n {description ? (\n <p id={descriptionId} className=\"text-meta text-muted-foreground\">\n {description}\n </p>\n ) : null}\n </div>\n <FormError error={error} />\n <div className=\"flex justify-end gap-2\">\n <Button\n ref={cancelRef}\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={pending}\n onClick={() => changeOpen(false)}\n >\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button\n ref={confirmRef}\n type=\"button\"\n size=\"sm\"\n variant={tone === 'danger' ? 'destructive' : 'default'}\n disabled={pending}\n aria-busy={pending || undefined}\n onClick={confirm}\n >\n {pending ? (\n <>\n <Loader2 className=\"animate-spin\" aria-hidden=\"true\" />\n {pendingLabel ?? confirmLabel}\n </>\n ) : (\n confirmLabel\n )}\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n );\n};\n","import { CheckIcon, MinusIcon } from 'lucide-react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\nimport { cn } from '@/helpers/cn';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n {props.checked === 'indeterminate' ? (\n <MinusIcon className=\"size-3.5\" />\n ) : (\n <CheckIcon className=\"size-3.5\" />\n )}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n","'use client';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport * as React from 'react';\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/helpers/cn';\nimport { useReturnFocus } from '@/hooks/useReturnFocus';\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-overlay/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = 'default',\n onOpenAutoFocus,\n onCloseAutoFocus,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n size?: 'default' | 'sm';\n}) {\n const returnFocus = useReturnFocus(onOpenAutoFocus, onCloseAutoFocus);\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n 'group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-card p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg',\n className,\n )}\n {...props}\n {...returnFocus}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n 'text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n variant = 'default',\n size = 'default',\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Action data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />\n </Button>\n );\n}\n\nfunction AlertDialogCancel({\n className,\n variant = 'outline',\n size = 'default',\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Cancel data-slot=\"alert-dialog-cancel\" className={cn(className)} {...props} />\n </Button>\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n","import { Loader2 } from 'lucide-react';\nimport { useId, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@/components/ui/alert-dialog';\nimport { Button, buttonVariants } from '@/components/ui/button';\nimport { Checkbox } from '@/components/ui/checkbox';\nimport { Field, FieldLabel } from '@/components/ui/field';\nimport { FormError } from '../FormError';\n\ntype ConfirmDialogProps = {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n title: string;\n description: string;\n confirmLabel: string;\n cancelLabel?: string;\n destructive?: boolean;\n onConfirm: () => void;\n /** When set, Confirm stays disabled until this statement is checked (unticked on every open). */\n acknowledgement?: string;\n /**\n * Async mode: pass the mutation's pending state. Confirm then doesn't close the dialog; the caller closes\n * it on success. While pending, Confirm shows `pendingLabel` and the dialog can't be dismissed.\n */\n pending?: boolean;\n pendingLabel?: string;\n /** The failed attempt's error, shown above the buttons (async mode). */\n error?: unknown;\n};\n\n/**\n * A blocking yes/no question, kept only for irreversible acknowledgements (DESIGN.md \"Dialogs\"). Focus starts\n * on Cancel (Radix default).\n */\nexport const ConfirmDialog = ({\n open,\n onOpenChange,\n title,\n description,\n confirmLabel,\n cancelLabel,\n destructive = false,\n onConfirm,\n acknowledgement,\n pending,\n pendingLabel,\n error,\n}: ConfirmDialogProps) => {\n const { t } = useTranslation();\n const acknowledgementId = useId();\n const [acknowledged, setAcknowledged] = useState(false);\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) {\n setAcknowledged(false);\n }\n }\n const isAsync = pending !== undefined;\n const busy = pending === true;\n const blocked = acknowledgement !== undefined && !acknowledged;\n const confirmClassName = buttonVariants({ variant: destructive ? 'destructive' : 'default' });\n return (\n <AlertDialog open={open} onOpenChange={(next) => (busy && !next ? undefined : onOpenChange(next))}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{title}</AlertDialogTitle>\n <AlertDialogDescription>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n {acknowledgement ? (\n <Field orientation=\"horizontal\">\n <Checkbox\n id={acknowledgementId}\n checked={acknowledged}\n disabled={busy}\n onCheckedChange={(checked) => setAcknowledged(checked === true)}\n />\n <FieldLabel htmlFor={acknowledgementId} className=\"font-normal\">\n {acknowledgement}\n </FieldLabel>\n </Field>\n ) : null}\n {isAsync ? <FormError error={error} /> : null}\n <AlertDialogFooter>\n <AlertDialogCancel disabled={busy}>{cancelLabel ?? t('common.cancel')}</AlertDialogCancel>\n {isAsync ? (\n <Button\n type=\"button\"\n variant={destructive ? 'destructive' : 'default'}\n disabled={busy || blocked}\n aria-busy={busy || undefined}\n onClick={onConfirm}\n >\n {busy ? (\n <>\n <Loader2 className=\"animate-spin\" aria-hidden=\"true\" />\n {pendingLabel ?? confirmLabel}\n </>\n ) : (\n confirmLabel\n )}\n </Button>\n ) : (\n <AlertDialogAction className={confirmClassName} disabled={blocked} onClick={onConfirm}>\n {confirmLabel}\n </AlertDialogAction>\n )}\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"ignoreList":[0,1,2],"mappings":"0oBASA,IAAM6E,EAAa,CACjB,KAAM,eACN,KAAM,GACN,KAAM,CACJ,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,IAAK,QAAS,CAAC,EACzD,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,IAAK,GAAI,KAAM,IAAK,QAAS,CAAC,EACjE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,QAAS,GAAI,KAAM,G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,CAAA,CACD,CAAA,CAAA,CACT,CAAA,CAEjB"}
1
+ {"version":3,"file":"ConfirmDialog-Rd6WDt6q.js","names":["__defProp","__name","AlertDialog","DialogPrimitive.Root","DialogPrimitive.Trigger","AlertDialogPortal","DialogPrimitive.Portal","AlertDialogOverlay","DialogPrimitive.Overlay","AlertDialogContent","DialogPrimitive.Content","AlertDialogTitle","DialogPrimitive.Title","AlertDialogDescription","DialogPrimitive.Description","AlertDialogAction","DialogPrimitive.Close","AlertDialogCancel","Checkbox","Fragment","AlertCircle","useId","useRef","useState","_Fragment","Loader2","CheckboxPrimitive.Root","CheckboxPrimitive.Indicator","MinusIcon","CheckIcon","AlertDialogPrimitive.Root","AlertDialogPrimitive.Portal","AlertDialogPrimitive.Overlay","AlertDialogPrimitive.Content","AlertDialogPrimitive.Title","AlertDialogPrimitive.Description","AlertDialogPrimitive.Action","AlertDialogPrimitive.Cancel","useId","useState","_Fragment","Loader2","__toESM","require_jsx_runtime","LoaderCircle","DialogOverlay","createDialogScope","DialogTrigger","DialogDescription","DialogTitle","DialogClose","useReturnFocus","DialogPortal","DialogContent","Dialog","useTranslation","createLucideIcon","PopoverTrigger","PopoverContent","Popover","PopoverAnchor","useSize","useComposedRefs","useControllableState","Primitive","createContextScope","composeEventHandlers","Presence","describeError","buttonVariants","Check","Button","cva","FieldLabel","Field","Minus","cn","__iconData","CircleAlert","import_react","require_react","import_jsx_runtime","__defProp$1","__name$1","target","createAlertDialogContext","createAlertDialogScope","useDialogScope","AlertDialog$1","alertDialogProps","props","dialogScope","__scopeAlertDialog","triggerProps","forwardedRef","AlertDialogPortal$1","portalProps","AlertDialogOverlay$1","overlayProps","AlertDialogContentProvider","useAlertDialogContentContext","AlertDialogContent$1","contentProps","contentRef","composedRefs","cancelRef","event","AlertDialogTitle$1","titleProps","AlertDialogDescription$1","descriptionProps","AlertDialogAction$1","actionProps","CANCEL_NAME","AlertDialogCancel$1","cancelProps","ref","Root2","Portal2","Overlay2","Content2","Action","Cancel","Title2","Description2","__defProp","__name","CHECKBOX_NAME","createCheckboxContext","createCheckboxScope","CheckboxProviderImpl","useCheckboxContext","CheckboxProvider","checkedProp","checked","setChecked","defaultChecked","onCheckedChange","control","setControl","bubbleInput","setBubbleInput","hasConsumerStoppedPropagationRef","userInteractionCount","onUserInteraction","count","isFormControl","form","context","__scopeCheckbox","isFunction","internal_do_not_use_render","children","TRIGGER_NAME","CheckboxTrigger","checkboxProps","initialCheckedStateRef","reset","isIndeterminate","required","getState","disabled","onKeyDown","onClick","prevChecked","Checkbox$1","CheckboxBubbleInput","INDICATOR_NAME","CheckboxIndicator","indicatorProps","forceMount","BUBBLE_INPUT_NAME","controlSize","shouldStopClickPropagationRef","prevCheckedRef","prevUserInteractionCountRef","input","inputProto","isUserInteraction","checkedChanged","bubbles","defaultCheckedRef","value","alertVariants","Alert","className","AlertTitle","AlertDescription","FormError","error","InlineConfirm","titleId","descriptionId","confirmRef","uncontrolledOpen","setUncontrolledOpen","pending","setPending","setError","open","changeOpen","next","requestOpenChange","confirm","result","onConfirm","reason","returnFocus","tone","onCloseAutoFocus","description","title","cancelLabel","t","pendingLabel","confirmLabel","Checkbox","AlertDialog","AlertDialogPortal","AlertDialogOverlay","AlertDialogContent","onOpenAutoFocus","size","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","AlertDialogCancel","ConfirmDialog","acknowledgementId","acknowledged","setAcknowledged","wasOpen","setWasOpen","isAsync","busy","blocked","acknowledgement","confirmClassName","destructive","onOpenChange"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/circle-alert.mjs","../../../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.23_@types+react-dom@19.3.0_@types+react@19.3.0__@types_490aa920fbab0adbc2c4344386ab6831/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-checkbox@1.3.11_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_c6d869b9fcc94d95bd12a12175a8f53a/node_modules/@radix-ui/react-checkbox/dist/index.mjs","../../src/components/ui/alert.tsx","../../src/components/FormError/index.tsx","../../src/components/InlineConfirm/index.tsx","../../src/components/ui/checkbox.tsx","../../src/components/ui/alert-dialog.tsx","../../src/components/ConfirmDialog/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"circle-alert\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"8\", y2: \"12\", key: \"1pkeuh\" }],\n [\"line\", { x1: \"12\", x2: \"12.01\", y1: \"16\", y2: \"16\", key: \"4dfq90\" }]\n ],\n aliases: [\"alert-circle\"]\n};\n__iconData.node;\nconst CircleAlert = createLucideIcon(__iconData);\n\nexport { __iconData, CircleAlert as default };\n//# sourceMappingURL=circle-alert.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/alert-dialog.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { createDialogScope } from \"@radix-ui/react-dialog\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ROOT_NAME = \"AlertDialog\";\nvar [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [\n createDialogScope\n]);\nvar useDialogScope = createDialogScope();\nvar AlertDialog = /* @__PURE__ */ __name((props) => {\n const { __scopeAlertDialog, ...alertDialogProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...dialogScope, ...alertDialogProps, modal: true });\n}, \"AlertDialog\");\nvar AlertDialogTrigger = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogTrigger2(props, forwardedRef) {\n const { __scopeAlertDialog, ...triggerProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });\n }, \"AlertDialogTrigger\")\n);\nvar AlertDialogPortal = /* @__PURE__ */ __name((props) => {\n const { __scopeAlertDialog, ...portalProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { ...dialogScope, ...portalProps });\n}, \"AlertDialogPortal\");\nvar AlertDialogOverlay = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogOverlay2(props, forwardedRef) {\n const { __scopeAlertDialog, ...overlayProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });\n }, \"AlertDialogOverlay\")\n);\nvar CONTENT_NAME = \"AlertDialogContent\";\nvar [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);\nvar AlertDialogContent = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogContent2(props, forwardedRef) {\n const { __scopeAlertDialog, children, ...contentProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const cancelRef = React.useRef(null);\n return /* @__PURE__ */ jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsx(\n DialogPrimitive.Content,\n {\n role: \"alertdialog\",\n ...dialogScope,\n ...contentProps,\n ref: composedRefs,\n onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {\n event.preventDefault();\n cancelRef.current?.focus({ preventScroll: true });\n }),\n onPointerDownOutside: (event) => event.preventDefault(),\n onInteractOutside: (event) => event.preventDefault(),\n children\n }\n ) });\n }, \"AlertDialogContent\")\n);\nvar AlertDialogTitle = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogTitle2(props, forwardedRef) {\n const { __scopeAlertDialog, ...titleProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Title, { ...dialogScope, ...titleProps, ref: forwardedRef });\n }, \"AlertDialogTitle\")\n);\nvar AlertDialogDescription = React.forwardRef(/* @__PURE__ */ __name(function AlertDialogDescription2(props, forwardedRef) {\n const { __scopeAlertDialog, ...descriptionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });\n}, \"AlertDialogDescription\"));\nvar AlertDialogAction = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogAction2(props, forwardedRef) {\n const { __scopeAlertDialog, ...actionProps } = props;\n const dialogScope = useDialogScope(__scopeAlertDialog);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...actionProps, ref: forwardedRef });\n }, \"AlertDialogAction\")\n);\nvar CANCEL_NAME = \"AlertDialogCancel\";\nvar AlertDialogCancel = React.forwardRef(\n /* @__PURE__ */ __name(function AlertDialogCancel2(props, forwardedRef) {\n const { __scopeAlertDialog, ...cancelProps } = props;\n const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);\n const dialogScope = useDialogScope(__scopeAlertDialog);\n const ref = useComposedRefs(forwardedRef, cancelRef);\n return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });\n }, \"AlertDialogCancel\")\n);\nvar Root2 = AlertDialog;\nvar Trigger2 = AlertDialogTrigger;\nvar Portal2 = AlertDialogPortal;\nvar Overlay2 = AlertDialogOverlay;\nvar Content2 = AlertDialogContent;\nvar Action = AlertDialogAction;\nvar Cancel = AlertDialogCancel;\nvar Title2 = AlertDialogTitle;\nvar Description2 = AlertDialogDescription;\nexport {\n Action,\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n Cancel,\n Content2 as Content,\n Description2 as Description,\n Overlay2 as Overlay,\n Portal2 as Portal,\n Root2 as Root,\n Title2 as Title,\n Trigger2 as Trigger,\n createAlertDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/checkbox.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar CHECKBOX_NAME = \"Checkbox\";\nvar [createCheckboxContext, createCheckboxScope] = createContextScope(CHECKBOX_NAME);\nvar [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);\nfunction CheckboxProvider(props) {\n const {\n __scopeCheckbox,\n checked: checkedProp,\n children,\n defaultChecked,\n disabled,\n form,\n name,\n onCheckedChange,\n required,\n value = \"on\",\n // @ts-expect-error\n internal_do_not_use_render\n } = props;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: CHECKBOX_NAME\n });\n const [control, setControl] = React.useState(null);\n const [bubbleInput, setBubbleInput] = React.useState(null);\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const [userInteractionCount, onUserInteraction] = React.useReducer(\n (count) => count + 1,\n 0\n );\n const isFormControl = control ? !!form || !!control.closest(\"form\") : (\n // We set this to true by default so that events bubble to forms without JS (SSR)\n true\n );\n const context = {\n checked,\n disabled,\n setChecked,\n control,\n setControl,\n name,\n form,\n value,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n onUserInteraction,\n required,\n defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,\n isFormControl,\n bubbleInput,\n setBubbleInput\n };\n return /* @__PURE__ */ jsx(\n CheckboxProviderImpl,\n {\n scope: __scopeCheckbox,\n ...context,\n children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children\n }\n );\n}\n__name(CheckboxProvider, \"CheckboxProvider\");\nvar TRIGGER_NAME = \"CheckboxTrigger\";\nvar CheckboxTrigger = /* @__PURE__ */ React.forwardRef(\n /* @__PURE__ */ __name(function CheckboxTrigger2({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) {\n const {\n control,\n value,\n disabled,\n checked,\n required,\n setControl,\n setChecked,\n hasConsumerStoppedPropagationRef,\n onUserInteraction,\n isFormControl,\n bubbleInput\n } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setControl);\n const initialCheckedStateRef = React.useRef(checked);\n React.useEffect(() => {\n const form = control?.form;\n if (form) {\n const reset = /* @__PURE__ */ __name(() => setChecked(initialCheckedStateRef.current), \"reset\");\n form.addEventListener(\"reset\", reset);\n return () => form.removeEventListener(\"reset\", reset);\n }\n }, [control, setChecked]);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"checkbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...checkboxProps,\n ref: composedRefs,\n onKeyDown: composeEventHandlers(onKeyDown, (event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onClick: composeEventHandlers(onClick, (event) => {\n onUserInteraction();\n setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);\n if (bubbleInput && isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n );\n }, \"CheckboxTrigger\")\n);\nvar Checkbox = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function Checkbox2(props, forwardedRef) {\n const {\n __scopeCheckbox,\n name,\n checked,\n defaultChecked,\n required,\n disabled,\n value,\n onCheckedChange,\n form,\n ...checkboxProps\n } = props;\n return /* @__PURE__ */ jsx(\n CheckboxProvider,\n {\n __scopeCheckbox,\n checked,\n defaultChecked,\n disabled,\n required,\n onCheckedChange,\n name,\n form,\n value,\n internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n CheckboxTrigger,\n {\n ...checkboxProps,\n ref: forwardedRef,\n __scopeCheckbox\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n CheckboxBubbleInput,\n {\n __scopeCheckbox\n }\n )\n ] })\n }\n );\n }, \"Checkbox\")\n);\nvar INDICATOR_NAME = \"CheckboxIndicator\";\nvar CheckboxIndicator = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function CheckboxIndicator2(props, forwardedRef) {\n const { __scopeCheckbox, forceMount, ...indicatorProps } = props;\n const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(context.checked) || context.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef,\n style: { pointerEvents: \"none\", ...props.style }\n }\n )\n }\n );\n }, \"CheckboxIndicator\")\n);\nvar BUBBLE_INPUT_NAME = \"CheckboxBubbleInput\";\nvar CheckboxBubbleInput = /* @__PURE__ */ React.forwardRef(\n // blank line to reduce diff noise\n /* @__PURE__ */ __name(function CheckboxBubbleInput2({ __scopeCheckbox, onClick, ...props }, forwardedRef) {\n const {\n control,\n hasConsumerStoppedPropagationRef,\n userInteractionCount,\n checked,\n defaultChecked,\n required,\n disabled,\n name,\n value,\n form,\n bubbleInput,\n setBubbleInput\n } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);\n const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);\n const controlSize = useSize(control);\n const shouldStopClickPropagationRef = React.useRef(false);\n const prevCheckedRef = React.useRef(checked);\n const prevUserInteractionCountRef = React.useRef(userInteractionCount);\n React.useEffect(() => {\n const input = bubbleInput;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n const isUserInteraction = userInteractionCount !== prevUserInteractionCountRef.current;\n prevUserInteractionCountRef.current = userInteractionCount;\n const checkedChanged = prevCheckedRef.current !== checked;\n prevCheckedRef.current = checked;\n const bubbles = !(isUserInteraction && hasConsumerStoppedPropagationRef.current);\n if (checkedChanged && setChecked) {\n shouldStopClickPropagationRef.current = !isUserInteraction;\n const event = new Event(\"click\", { bubbles });\n input.indeterminate = isIndeterminate(checked);\n setChecked.call(input, isIndeterminate(checked) ? false : checked);\n input.dispatchEvent(event);\n shouldStopClickPropagationRef.current = false;\n }\n }, [bubbleInput, checked, hasConsumerStoppedPropagationRef, userInteractionCount]);\n const defaultCheckedRef = React.useRef(isIndeterminate(checked) ? false : checked);\n return /* @__PURE__ */ jsx(\n Primitive.input,\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: defaultChecked ?? defaultCheckedRef.current,\n required,\n disabled,\n name,\n value,\n form,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n onClick: composeEventHandlers(onClick, (event) => {\n if (shouldStopClickPropagationRef.current) {\n event.stopPropagation();\n }\n }),\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0,\n // We transform because the input is absolutely positioned but we have\n // rendered it **after** the button. This pulls it back to sit on top\n // of the button.\n transform: \"translateX(-100%)\"\n }\n }\n );\n }, \"CheckboxBubbleInput\")\n);\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n__name(isFunction, \"isFunction\");\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\n__name(isIndeterminate, \"isIndeterminate\");\nfunction getState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\n__name(getState, \"getState\");\nexport {\n Checkbox,\n CheckboxIndicator,\n CheckboxIndicator as Indicator,\n Checkbox as Root,\n createCheckboxScope,\n CheckboxBubbleInput as unstable_BubbleInput,\n CheckboxBubbleInput as unstable_CheckboxBubbleInput,\n CheckboxProvider as unstable_CheckboxProvider,\n CheckboxTrigger as unstable_CheckboxTrigger,\n CheckboxProvider as unstable_Provider,\n CheckboxTrigger as unstable_Trigger\n};\n//# sourceMappingURL=index.mjs.map\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { cn } from '@/helpers/cn';\n\nconst alertVariants = cva(\n 'relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'border-destructive/30 bg-destructive-muted text-destructive *:data-[slot=alert-description]:text-destructive [&>svg]:text-current',\n // Shapio: status alerts on the status tokens (DESIGN.md).\n warning:\n 'border-warning/30 bg-warning-muted text-warning *:data-[slot=alert-description]:text-warning [&>svg]:text-current',\n // Light: a neutral note with a cobalt icon (no blue surfaces outside the info chip); dark keeps the tint.\n info: 'border-border bg-muted text-foreground *:data-[slot=alert-description]:text-muted-foreground dark:border-info/30 dark:bg-info-muted dark:text-info dark:*:data-[slot=alert-description]:text-info [&>svg]:text-info',\n success:\n 'border-success/30 bg-success-muted text-success *:data-[slot=alert-description]:text-success [&>svg]:text-current',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div data-slot=\"alert\" role=\"alert\" className={cn(alertVariants({ variant }), className)} {...props} />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn('col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n 'col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertTitle, AlertDescription };\n","import { AlertCircle } from 'lucide-react';\nimport { Alert, AlertDescription } from '@/components/ui/alert';\nimport { describeError } from '@/helpers/describeError';\n\ntype FormErrorProps = { error: unknown };\n\n/** The server's answer to a failed form submission, shown above the submit button and announced. */\nexport const FormError = ({ error }: FormErrorProps) => {\n if (!error) {\n return null;\n }\n return (\n <Alert variant=\"destructive\">\n <AlertCircle aria-hidden=\"true\" />\n <AlertDescription>{describeError(error)}</AlertDescription>\n </Alert>\n );\n};\n","import { Loader2 } from 'lucide-react';\nimport { useId, useRef, useState, type ReactElement } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { useReturnFocus } from '@/hooks/useReturnFocus';\nimport { FormError } from '../FormError';\n\ntype InlineConfirmCommonProps = {\n /** The question, and the popover's accessible name (\"Delete “Hero”?\"). */\n title: string;\n /** The consequence, in one line. */\n description?: string;\n confirmLabel: string;\n cancelLabel?: string;\n /** Shown on Confirm while an async `onConfirm` runs. */\n pendingLabel?: string;\n /** `danger`: red Confirm, focus starts on Cancel. `default`: primary Confirm, focus starts on it. */\n tone: 'danger' | 'default';\n /**\n * Runs on Confirm. Return nothing to close at once; return a promise (`mutateAsync`) to keep the popover\n * open with a spinner until it settles: it closes when it resolves and shows the error when it rejects.\n */\n onConfirm: () => void | Promise<unknown>;\n align?: 'start' | 'center' | 'end';\n side?: 'top' | 'right' | 'bottom' | 'left';\n /**\n * Runs as the popover closes, before focus returns to the opener. Call `event.preventDefault()` to keep\n * focus where it is (e.g. on a `SecretReveal` that a confirmed rotate just showed).\n */\n onCloseAutoFocus?: (event: Event) => void;\n};\n\n/** Trigger mode: the popover opens from this button (it gets `aria-expanded` and returns focus to it). */\ntype TriggerModeProps = InlineConfirmCommonProps & {\n trigger: ReactElement;\n open?: never;\n onOpenChange?: never;\n children?: never;\n};\n\n/**\n * Anchored mode, for actions in a menu (a menu item disappears with its menu): the caller opens it (from\n * the item's `onSelect`) and the popover points at `children`, usually the menu's own trigger button.\n */\ntype AnchoredModeProps = InlineConfirmCommonProps & {\n trigger?: never;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n children: ReactElement;\n};\n\ntype InlineConfirmProps = TriggerModeProps | AnchoredModeProps;\n\n/**\n * Confirms a routine destructive or consequential action where it was asked for (DESIGN.md \"Dialogs\"): a\n * modal popover with role `alertdialog`, the question, one line of consequence and Cancel / Confirm. Escape\n * or a click outside cancels, Enter activates the focused button, focus returns to the opener.\n */\nexport const InlineConfirm = (props: InlineConfirmProps) => {\n const {\n title,\n description,\n confirmLabel,\n cancelLabel,\n pendingLabel,\n tone,\n onConfirm,\n align = 'end',\n side = 'bottom',\n onCloseAutoFocus,\n } = props;\n const { t } = useTranslation();\n const titleId = useId();\n const descriptionId = useId();\n const cancelRef = useRef<HTMLButtonElement>(null);\n const confirmRef = useRef<HTMLButtonElement>(null);\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const [pending, setPending] = useState(false);\n const [error, setError] = useState<unknown>(null);\n const open = props.trigger === undefined ? props.open : uncontrolledOpen;\n\n const changeOpen = (next: boolean) => {\n if (next) {\n setError(null);\n }\n if (props.trigger === undefined) {\n props.onOpenChange(next);\n } else {\n setUncontrolledOpen(next);\n }\n };\n // Nothing dismisses it while the action runs.\n const requestOpenChange = (next: boolean) => (pending && !next ? undefined : changeOpen(next));\n\n const confirm = () => {\n const result = onConfirm();\n if (!(result instanceof Promise)) {\n changeOpen(false);\n return;\n }\n setPending(true);\n setError(null);\n result.then(\n () => {\n setPending(false);\n changeOpen(false);\n },\n (reason: unknown) => {\n // Already logged and toasted by the mutation cache; shown here too, beside the action that failed.\n setPending(false);\n setError(reason);\n },\n );\n };\n\n const returnFocus = useReturnFocus((event) => {\n event.preventDefault();\n (tone === 'danger' ? cancelRef : confirmRef).current?.focus();\n }, onCloseAutoFocus);\n\n return (\n <Popover open={open} onOpenChange={requestOpenChange} modal>\n {props.trigger === undefined ? (\n <PopoverAnchor asChild>{props.children}</PopoverAnchor>\n ) : (\n <PopoverTrigger asChild>{props.trigger}</PopoverTrigger>\n )}\n <PopoverContent\n role=\"alertdialog\"\n // Modal like Radix's own dialogs: focus is trapped and the rest of the page is aria-hidden. Declaring\n // it lets assistive technology (and axe's aria-hidden-focus rule) know the hidden page is inert.\n aria-modal=\"true\"\n aria-labelledby={titleId}\n aria-describedby={description ? descriptionId : undefined}\n align={align}\n side={side}\n className=\"w-80 space-y-4\"\n {...returnFocus}\n >\n <div className=\"space-y-1\">\n <p id={titleId} className=\"text-sm font-semibold\">\n {title}\n </p>\n {description ? (\n <p id={descriptionId} className=\"text-meta text-muted-foreground\">\n {description}\n </p>\n ) : null}\n </div>\n <FormError error={error} />\n <div className=\"flex justify-end gap-2\">\n <Button\n ref={cancelRef}\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n disabled={pending}\n onClick={() => changeOpen(false)}\n >\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button\n ref={confirmRef}\n type=\"button\"\n size=\"sm\"\n variant={tone === 'danger' ? 'destructive' : 'default'}\n disabled={pending}\n aria-busy={pending || undefined}\n onClick={confirm}\n >\n {pending ? (\n <>\n <Loader2 className=\"animate-spin\" aria-hidden=\"true\" />\n {pendingLabel ?? confirmLabel}\n </>\n ) : (\n confirmLabel\n )}\n </Button>\n </div>\n </PopoverContent>\n </Popover>\n );\n};\n","import { CheckIcon, MinusIcon } from 'lucide-react';\nimport { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\nimport { cn } from '@/helpers/cn';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary dark:data-[state=indeterminate]:bg-primary',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none\"\n >\n {props.checked === 'indeterminate' ? (\n <MinusIcon className=\"size-3.5\" />\n ) : (\n <CheckIcon className=\"size-3.5\" />\n )}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n","'use client';\n\nimport { AlertDialog as AlertDialogPrimitive } from 'radix-ui';\nimport * as React from 'react';\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/helpers/cn';\nimport { useReturnFocus } from '@/hooks/useReturnFocus';\n\nfunction AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />;\n}\n\nfunction AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\n\nfunction AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />;\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-overlay/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogContent({\n className,\n size = 'default',\n onOpenAutoFocus,\n onCloseAutoFocus,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {\n size?: 'default' | 'sm';\n}) {\n const returnFocus = useReturnFocus(onOpenAutoFocus, onCloseAutoFocus);\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n data-size={size}\n className={cn(\n 'group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border bg-card p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg',\n className,\n )}\n {...props}\n {...returnFocus}\n />\n </AlertDialogPortal>\n );\n}\n\nfunction AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\n 'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n 'flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\n 'text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-sm text-muted-foreground', className)}\n {...props}\n />\n );\n}\n\nfunction AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-media\"\n className={cn(\n \"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDialogAction({\n className,\n variant = 'default',\n size = 'default',\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Action data-slot=\"alert-dialog-action\" className={cn(className)} {...props} />\n </Button>\n );\n}\n\nfunction AlertDialogCancel({\n className,\n variant = 'outline',\n size = 'default',\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &\n Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>) {\n return (\n <Button variant={variant} size={size} asChild>\n <AlertDialogPrimitive.Cancel data-slot=\"alert-dialog-cancel\" className={cn(className)} {...props} />\n </Button>\n );\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogMedia,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n};\n","import { Loader2 } from 'lucide-react';\nimport { useId, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from '@/components/ui/alert-dialog';\nimport { Button, buttonVariants } from '@/components/ui/button';\nimport { Checkbox } from '@/components/ui/checkbox';\nimport { Field, FieldLabel } from '@/components/ui/field';\nimport { FormError } from '../FormError';\n\ntype ConfirmDialogProps = {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n title: string;\n description: string;\n confirmLabel: string;\n cancelLabel?: string;\n destructive?: boolean;\n onConfirm: () => void;\n /** When set, Confirm stays disabled until this statement is checked (unticked on every open). */\n acknowledgement?: string;\n /**\n * Async mode: pass the mutation's pending state. Confirm then doesn't close the dialog; the caller closes\n * it on success. While pending, Confirm shows `pendingLabel` and the dialog can't be dismissed.\n */\n pending?: boolean;\n pendingLabel?: string;\n /** The failed attempt's error, shown above the buttons (async mode). */\n error?: unknown;\n};\n\n/**\n * A blocking yes/no question, kept only for irreversible acknowledgements (DESIGN.md \"Dialogs\"). Focus starts\n * on Cancel (Radix default).\n */\nexport const ConfirmDialog = ({\n open,\n onOpenChange,\n title,\n description,\n confirmLabel,\n cancelLabel,\n destructive = false,\n onConfirm,\n acknowledgement,\n pending,\n pendingLabel,\n error,\n}: ConfirmDialogProps) => {\n const { t } = useTranslation();\n const acknowledgementId = useId();\n const [acknowledged, setAcknowledged] = useState(false);\n const [wasOpen, setWasOpen] = useState(open);\n if (open !== wasOpen) {\n setWasOpen(open);\n if (open) {\n setAcknowledged(false);\n }\n }\n const isAsync = pending !== undefined;\n const busy = pending === true;\n const blocked = acknowledgement !== undefined && !acknowledged;\n const confirmClassName = buttonVariants({ variant: destructive ? 'destructive' : 'default' });\n return (\n <AlertDialog open={open} onOpenChange={(next) => (busy && !next ? undefined : onOpenChange(next))}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>{title}</AlertDialogTitle>\n <AlertDialogDescription>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n {acknowledgement ? (\n <Field orientation=\"horizontal\">\n <Checkbox\n id={acknowledgementId}\n checked={acknowledged}\n disabled={busy}\n onCheckedChange={(checked) => setAcknowledged(checked === true)}\n />\n <FieldLabel htmlFor={acknowledgementId} className=\"font-normal\">\n {acknowledgement}\n </FieldLabel>\n </Field>\n ) : null}\n {isAsync ? <FormError error={error} /> : null}\n <AlertDialogFooter>\n <AlertDialogCancel disabled={busy}>{cancelLabel ?? t('common.cancel')}</AlertDialogCancel>\n {isAsync ? (\n <Button\n type=\"button\"\n variant={destructive ? 'destructive' : 'default'}\n disabled={busy || blocked}\n aria-busy={busy || undefined}\n onClick={onConfirm}\n >\n {busy ? (\n <>\n <Loader2 className=\"animate-spin\" aria-hidden=\"true\" />\n {pendingLabel ?? confirmLabel}\n </>\n ) : (\n confirmLabel\n )}\n </Button>\n ) : (\n <AlertDialogAction className={confirmClassName} disabled={blocked} onClick={onConfirm}>\n {confirmLabel}\n </AlertDialogAction>\n )}\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n};\n"],"ignoreList":[0,1,2],"mappings":"0oBASA,IAAM6E,EAAa,CACjB,KAAM,eACN,KAAM,GACN,KAAM,CACJ,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,IAAK,QAAS,CAAC,EACzD,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,IAAK,GAAI,KAAM,IAAK,QAAS,CAAC,EACjE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,QAAS,GAAI,KAAM,GAAI,KAAM,IAAK,QAAS,CAAC,CACvE,EACA,QAAS,CAAC,cAAc,CAC1B,EACAA,EAAW,KACX,IAAMC,EAActB,EAAiBqB,CAAU,wBCnB3C7E,GAAY,OAAO,eACnBC,GAAU,EAAQ,IAAUD,GAAUoF,EAAQ,OAAQ,CAAE,QAAO,aAAc,EAAK,CAAC,EAWnF,CAACC,GAA0BC,IAA0BrB,EAAmB,cAAW,CACrFnB,CACF,CAAC,EACGyC,EAAiBzC,EAAkB,EACnC5C,GAA8BiF,EAAQ,GAAU,CAClD,GAAM,CAAE,qBAAoB,GAAGM,GAAqBC,EAC9CC,EAAcJ,EAAeK,CAAkB,EACrD,OAAuB,EAAAX,EAAA,IAAA,CAAI9E,EAAsB,CAAE,GAAGwF,EAAa,GAAGF,EAAkB,MAAO,EAAK,CAAC,CACvG,EAAG,aAAa,EACZV,EAA2B,WACbI,EAAO,SAA6B,EAAO,EAAc,CACvE,GAAM,CAAE,qBAA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AQ,CAAA,EAAI,MACzC,EAAA3G,EAAA,KAAA,CAAC+I,GAAD,CAAA,SAAA,EACE,EAAA/I,EAAA,IAAA,CAACmJ,GAAD,CAAmB,SAAUQ,EAAO,SAAAxB,GAAeC,EAAE,eAAe,CAAqB,CAAA,EACxFsB,GACC,EAAA1J,EAAA,IAAA,CAACV,EAAD,CACE,KAAK,SACL,QAASyK,EAAc,cAAgB,UACvC,SAAUJ,GAAQC,EAClB,YAAWD,GAAQ,IAAA,GACnB,QAAS/B,EAER,SAAA+B,GACC,EAAA3J,EAAA,KAAA,CAAAzC,EAAAA,SAAA,CAAA,SAAA,EACE,EAAAyC,EAAA,IAAA,CAACxC,EAAD,CAAS,UAAU,eAAe,cAAY,MAAQ,CAAA,EACrD6K,GAAgBC,CACjB,CAAA,CAAA,EAEFA,CAEI,CAAA,GAER,EAAAtI,EAAA,IAAA,CAACkJ,GAAD,CAAmB,UAAWY,EAAkB,SAAUF,EAAS,QAAShC,EACzE,SAAAU,CACgB,CAAA,CAEJ,CAAA,CAAA,CACD,CAAA,CAAA,CACT,CAAA,CAEjB"}
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{n as r}from"./createLucideIcon-CqygG5K6.js";import{w as i}from"./InfoHint-bYMd_t0J.js";import{c as a,i as o}from"./skeleton-Dyi_b1wq.js";import{t as s}from"./copy-B5owk67M.js";var c=e(t(),1),l=e(n(),1),u=2e3,d=({value:e,ref:t})=>{let{t:n}=r(),[d,f]=(0,c.useState)(!1),p=async()=>{try{await navigator.clipboard.writeText(e),f(!0),setTimeout(()=>f(!1),u)}catch(e){i(e,`copy to clipboard`)}};return(0,l.jsxs)(o,{ref:t,type:`button`,variant:`outline`,onClick:()=>void p(),children:[d?(0,l.jsx)(a,{"aria-hidden":`true`}):(0,l.jsx)(s,{"aria-hidden":`true`}),(0,l.jsx)(`span`,{"aria-live":`polite`,children:n(d?`common.copied`:`common.copy`)})]})};export{d as t};
2
- //# sourceMappingURL=CopyButton-h4HYhnYp.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{n as r}from"./createLucideIcon-CqygG5K6.js";import{w as i}from"./InfoHint-Dyzyf59c.js";import{c as a,i as o}from"./skeleton-D4eOLKLY.js";import{t as s}from"./copy-B5owk67M.js";var c=e(t(),1),l=e(n(),1),u=2e3,d=({value:e,ref:t})=>{let{t:n}=r(),[d,f]=(0,c.useState)(!1),p=async()=>{try{await navigator.clipboard.writeText(e),f(!0),setTimeout(()=>f(!1),u)}catch(e){i(e,`copy to clipboard`)}};return(0,l.jsxs)(o,{ref:t,type:`button`,variant:`outline`,onClick:()=>void p(),children:[d?(0,l.jsx)(a,{"aria-hidden":`true`}):(0,l.jsx)(s,{"aria-hidden":`true`}),(0,l.jsx)(`span`,{"aria-live":`polite`,children:n(d?`common.copied`:`common.copy`)})]})};export{d as t};
2
+ //# sourceMappingURL=CopyButton-B0RuxynJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CopyButton-h4HYhnYp.js","names":["useState","__toESM","require_jsx_runtime","useTranslation","reportError","Check","Button","Copy","import_react","require_react","import_jsx_runtime","COPIED_RESET_MS","CopyButton","copied","setCopied","copy","value","error","t"],"sources":["../../src/components/CopyButton/index.tsx"],"sourcesContent":["import { Check, Copy } from 'lucide-react';\nimport { useState, type Ref } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { reportError } from '@/helpers/reportError';\n\ntype CopyButtonProps = {\n value: string;\n /** For a caller that moves focus to the button (SecretReveal on mount). */\n ref?: Ref<HTMLButtonElement>;\n};\n\nconst COPIED_RESET_MS = 2000;\n\nexport const CopyButton = ({ value, ref }: CopyButtonProps) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(value);\n setCopied(true);\n setTimeout(() => setCopied(false), COPIED_RESET_MS);\n } catch (error) {\n reportError(error, 'copy to clipboard');\n }\n };\n return (\n <Button ref={ref} type=\"button\" variant=\"outline\" onClick={() => void copy()}>\n {copied ? <Check aria-hidden=\"true\" /> : <Copy aria-hidden=\"true\" />}\n <span aria-live=\"polite\">{copied ? t('common.copied') : t('common.copy')}</span>\n </Button>\n );\n};\n"],"mappings":"qVAYMW,EAAkB,IAEXC,GAAc,CAAE,QAAO,SAA2B,CAC7D,GAAM,CAAE,KAAMT,EAAe,EACvB,CAACU,EAAQC,IAAA,EAAad,EAAAA,SAAAA,CAAS,EAAK,EACpCe,EAAO,SAAY,CACvB,GAAI,CACF,MAAM,UAAU,UAAU,UAAUC,CAAK,EACzCF,EAAU,EAAI,EACd,eAAiBA,EAAU,EAAK,EAAGH,CAAe,CACpD,OAASM,EAAO,CACdb,EAAYa,EAAO,mBAAmB,CACxC,CACF,EACA,OACE,EAAAP,EAAA,KAAA,CAACJ,EAAD,CAAa,MAAK,KAAK,SAAS,QAAQ,UAAU,YAAe,KAAKS,EAAK,EAA3E,SAAA,CACGF,GAAS,EAAAH,EAAA,IAAA,CAACL,EAAD,CAAO,cAAY,MAAQ,CAAA,GAAI,EAAAK,EAAA,IAAA,CAACH,EAAD,CAAM,cAAY,MAAQ,CAAA,GACnE,EAAAG,EAAA,IAAA,CAAC,OAAD,CAAM,YAAU,SAAU,SAASQ,EAATL,EAAW,gBAAqB,aAAa,CAAQ,CAAA,CACzE,GAEZ"}
1
+ {"version":3,"file":"CopyButton-B0RuxynJ.js","names":["useState","__toESM","require_jsx_runtime","useTranslation","reportError","Check","Button","Copy","import_react","require_react","import_jsx_runtime","COPIED_RESET_MS","CopyButton","copied","setCopied","copy","value","error","t"],"sources":["../../src/components/CopyButton/index.tsx"],"sourcesContent":["import { Check, Copy } from 'lucide-react';\nimport { useState, type Ref } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { reportError } from '@/helpers/reportError';\n\ntype CopyButtonProps = {\n value: string;\n /** For a caller that moves focus to the button (SecretReveal on mount). */\n ref?: Ref<HTMLButtonElement>;\n};\n\nconst COPIED_RESET_MS = 2000;\n\nexport const CopyButton = ({ value, ref }: CopyButtonProps) => {\n const { t } = useTranslation();\n const [copied, setCopied] = useState(false);\n const copy = async () => {\n try {\n await navigator.clipboard.writeText(value);\n setCopied(true);\n setTimeout(() => setCopied(false), COPIED_RESET_MS);\n } catch (error) {\n reportError(error, 'copy to clipboard');\n }\n };\n return (\n <Button ref={ref} type=\"button\" variant=\"outline\" onClick={() => void copy()}>\n {copied ? <Check aria-hidden=\"true\" /> : <Copy aria-hidden=\"true\" />}\n <span aria-live=\"polite\">{copied ? t('common.copied') : t('common.copy')}</span>\n </Button>\n );\n};\n"],"mappings":"qVAYMW,EAAkB,IAEXC,GAAc,CAAE,QAAO,SAA2B,CAC7D,GAAM,CAAE,KAAMT,EAAe,EACvB,CAACU,EAAQC,IAAA,EAAad,EAAAA,SAAAA,CAAS,EAAK,EACpCe,EAAO,SAAY,CACvB,GAAI,CACF,MAAM,UAAU,UAAU,UAAUC,CAAK,EACzCF,EAAU,EAAI,EACd,eAAiBA,EAAU,EAAK,EAAGH,CAAe,CACpD,OAASM,EAAO,CACdb,EAAYa,EAAO,mBAAmB,CACxC,CACF,EACA,OACE,EAAAP,EAAA,KAAA,CAACJ,EAAD,CAAa,MAAK,KAAK,SAAS,QAAQ,UAAU,YAAe,KAAKS,EAAK,EAA3E,SAAA,CACGF,GAAS,EAAAH,EAAA,IAAA,CAACL,EAAD,CAAO,cAAY,MAAQ,CAAA,GAAI,EAAAK,EAAA,IAAA,CAACH,EAAD,CAAM,cAAY,MAAQ,CAAA,GACnE,EAAAG,EAAA,IAAA,CAAC,OAAD,CAAM,YAAU,SAAU,SAASQ,EAATL,EAAW,gBAAqB,aAAa,CAAQ,CAAA,CACzE,GAEZ"}
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./jsx-runtime-DREnUpxT.js";import{n,t as r}from"./createLucideIcon-CqygG5K6.js";import{i,s as a}from"./skeleton-Dyi_b1wq.js";import{t as o}from"./chevron-left-CZXrLV99.js";import{t as s}from"./cn-DVhJ55Mo.js";var c={name:`chevrons-left`,size:24,node:[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]};c.node;var l=r(c),u=e(t(),1),d=({onFirst:e,onPrevious:t,onNext:r,className:c})=>{let{t:d}=n();return(0,u.jsxs)(`nav`,{"aria-label":d(`common.pagination`),className:s(`flex items-center justify-end gap-2`,c),children:[(0,u.jsx)(i,{variant:`outline`,size:`icon-sm`,"aria-label":d(`common.first`),disabled:!e,onClick:e,children:(0,u.jsx)(l,{"aria-hidden":`true`})}),(0,u.jsx)(i,{variant:`outline`,size:`icon-sm`,"aria-label":d(`common.previous`),disabled:!t,onClick:t,children:(0,u.jsx)(o,{"aria-hidden":`true`})}),(0,u.jsx)(i,{variant:`outline`,size:`icon-sm`,"aria-label":d(`common.next`),disabled:!r,onClick:r,children:(0,u.jsx)(a,{"aria-hidden":`true`})})]})};export{d as t};
2
- //# sourceMappingURL=CursorPager-H4SpVYw7.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./jsx-runtime-DREnUpxT.js";import{n,t as r}from"./createLucideIcon-CqygG5K6.js";import{i,s as a}from"./skeleton-D4eOLKLY.js";import{t as o}from"./chevron-left-CZXrLV99.js";import{t as s}from"./cn-DVhJ55Mo.js";var c={name:`chevrons-left`,size:24,node:[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]};c.node;var l=r(c),u=e(t(),1),d=({onFirst:e,onPrevious:t,onNext:r,className:c})=>{let{t:d}=n();return(0,u.jsxs)(`nav`,{"aria-label":d(`common.pagination`),className:s(`flex items-center justify-end gap-2`,c),children:[(0,u.jsx)(i,{variant:`outline`,size:`icon-sm`,"aria-label":d(`common.first`),disabled:!e,onClick:e,children:(0,u.jsx)(l,{"aria-hidden":`true`})}),(0,u.jsx)(i,{variant:`outline`,size:`icon-sm`,"aria-label":d(`common.previous`),disabled:!t,onClick:t,children:(0,u.jsx)(o,{"aria-hidden":`true`})}),(0,u.jsx)(i,{variant:`outline`,size:`icon-sm`,"aria-label":d(`common.next`),disabled:!r,onClick:r,children:(0,u.jsx)(a,{"aria-hidden":`true`})})]})};export{d as t};
2
+ //# sourceMappingURL=CursorPager-CQZsKNxR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CursorPager-H4SpVYw7.js","names":["__toESM","createLucideIcon","ChevronRight","ChevronLeft","cn","__iconData","ChevronsLeft","import_jsx_runtime","require_jsx_runtime","CursorPager","useTranslation","t","className","Button","onFirst","onPrevious","onNext"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/chevrons-left.mjs","../../src/components/CursorPager/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"chevrons-left\",\n size: 24,\n node: [\n [\"path\", { d: \"m11 17-5-5 5-5\", key: \"13zhaf\" }],\n [\"path\", { d: \"m18 17-5-5 5-5\", key: \"h8a8et\" }]\n ]\n};\n__iconData.node;\nconst ChevronsLeft = createLucideIcon(__iconData);\n\nexport { __iconData, ChevronsLeft as default };\n//# sourceMappingURL=chevrons-left.mjs.map\n","import { ChevronLeft, ChevronRight, ChevronsLeft } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/helpers/cn';\n\ntype CursorPagerProps = {\n /** Undefined when already on the first page. */\n onFirst: (() => void) | undefined;\n onPrevious: (() => void) | undefined;\n /** Undefined when there is no further page. */\n onNext: (() => void) | undefined;\n className?: string;\n};\n\n/** Paging for cursor-paginated lists (newest first, no total): Newest, Previous, Next as icon buttons. */\nexport const CursorPager = ({ onFirst, onPrevious, onNext, className }: CursorPagerProps) => {\n const { t } = useTranslation();\n return (\n <nav aria-label={t('common.pagination')} className={cn('flex items-center justify-end gap-2', className)}>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('common.first')}\n disabled={!onFirst}\n onClick={onFirst}\n >\n <ChevronsLeft aria-hidden=\"true\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('common.previous')}\n disabled={!onPrevious}\n onClick={onPrevious}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('common.next')}\n disabled={!onNext}\n onClick={onNext}\n >\n <ChevronRight aria-hidden=\"true\" />\n </Button>\n </nav>\n );\n};\n"],"ignoreList":[0],"mappings":"kRASA,IAAMK,EAAa,CACjB,KAAM,gBACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,QAAS,CAAC,EAC/C,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,QAAS,CAAC,CACjD,CACF,EACAA,EAAW,KACX,IAAMC,EAAeL,EAAiBI,CAAU,aCHnCI,GAAe,CAAE,UAAS,aAAY,SAAQ,eAAkC,CAC3F,GAAM,CAAE,KAAMC,EAAe,EAC7B,OACE,EAAAH,EAAA,KAAA,CAAC,MAAD,CAAK,aAAYI,EAAE,mBAAmB,EAAG,UAAWP,EAAG,sCAAuCQ,CAAS,EAAvG,SAAA,EACE,EAAAL,EAAA,IAAA,CAACM,EAAD,CACE,QAAQ,UACR,KAAK,UACL,aAAYF,EAAE,cAAc,EAC5B,SAAU,CAACG,EACX,QAASA,EAET,UAAA,EAAAP,EAAA,IAAA,CAACD,EAAD,CAAc,cAAY,MAAQ,CAAA,CAC5B,CAAA,GACR,EAAAC,EAAA,IAAA,CAACM,EAAD,CACE,QAAQ,UACR,KAAK,UACL,aAAYF,EAAE,iBAAiB,EAC/B,SAAU,CAACI,EACX,QAASA,EAET,UAAA,EAAAR,EAAA,IAAA,CAACJ,EAAD,CAAa,cAAY,MAAQ,CAAA,CAC3B,CAAA,GACR,EAAAI,EAAA,IAAA,CAACM,EAAD,CACE,QAAQ,UACR,KAAK,UACL,aAAYF,EAAE,aAAa,EAC3B,SAAU,CAACK,EACX,QAASA,EAET,UAAA,EAAAT,EAAA,IAAA,CAACL,EAAD,CAAc,cAAY,MAAQ,CAAA,CAC5B,CAAA,CACL,GAET"}
1
+ {"version":3,"file":"CursorPager-CQZsKNxR.js","names":["__toESM","createLucideIcon","ChevronRight","ChevronLeft","cn","__iconData","ChevronsLeft","import_jsx_runtime","require_jsx_runtime","CursorPager","useTranslation","t","className","Button","onFirst","onPrevious","onNext"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/chevrons-left.mjs","../../src/components/CursorPager/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"chevrons-left\",\n size: 24,\n node: [\n [\"path\", { d: \"m11 17-5-5 5-5\", key: \"13zhaf\" }],\n [\"path\", { d: \"m18 17-5-5 5-5\", key: \"h8a8et\" }]\n ]\n};\n__iconData.node;\nconst ChevronsLeft = createLucideIcon(__iconData);\n\nexport { __iconData, ChevronsLeft as default };\n//# sourceMappingURL=chevrons-left.mjs.map\n","import { ChevronLeft, ChevronRight, ChevronsLeft } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { cn } from '@/helpers/cn';\n\ntype CursorPagerProps = {\n /** Undefined when already on the first page. */\n onFirst: (() => void) | undefined;\n onPrevious: (() => void) | undefined;\n /** Undefined when there is no further page. */\n onNext: (() => void) | undefined;\n className?: string;\n};\n\n/** Paging for cursor-paginated lists (newest first, no total): Newest, Previous, Next as icon buttons. */\nexport const CursorPager = ({ onFirst, onPrevious, onNext, className }: CursorPagerProps) => {\n const { t } = useTranslation();\n return (\n <nav aria-label={t('common.pagination')} className={cn('flex items-center justify-end gap-2', className)}>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('common.first')}\n disabled={!onFirst}\n onClick={onFirst}\n >\n <ChevronsLeft aria-hidden=\"true\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('common.previous')}\n disabled={!onPrevious}\n onClick={onPrevious}\n >\n <ChevronLeft aria-hidden=\"true\" />\n </Button>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('common.next')}\n disabled={!onNext}\n onClick={onNext}\n >\n <ChevronRight aria-hidden=\"true\" />\n </Button>\n </nav>\n );\n};\n"],"ignoreList":[0],"mappings":"kRASA,IAAMK,EAAa,CACjB,KAAM,gBACN,KAAM,GACN,KAAM,CACJ,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,QAAS,CAAC,EAC/C,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,QAAS,CAAC,CACjD,CACF,EACAA,EAAW,KACX,IAAMC,EAAeL,EAAiBI,CAAU,aCHnCI,GAAe,CAAE,UAAS,aAAY,SAAQ,eAAkC,CAC3F,GAAM,CAAE,KAAMC,EAAe,EAC7B,OACE,EAAAH,EAAA,KAAA,CAAC,MAAD,CAAK,aAAYI,EAAE,mBAAmB,EAAG,UAAWP,EAAG,sCAAuCQ,CAAS,EAAvG,SAAA,EACE,EAAAL,EAAA,IAAA,CAACM,EAAD,CACE,QAAQ,UACR,KAAK,UACL,aAAYF,EAAE,cAAc,EAC5B,SAAU,CAACG,EACX,QAASA,EAET,UAAA,EAAAP,EAAA,IAAA,CAACD,EAAD,CAAc,cAAY,MAAQ,CAAA,CAC5B,CAAA,GACR,EAAAC,EAAA,IAAA,CAACM,EAAD,CACE,QAAQ,UACR,KAAK,UACL,aAAYF,EAAE,iBAAiB,EAC/B,SAAU,CAACI,EACX,QAASA,EAET,UAAA,EAAAR,EAAA,IAAA,CAACJ,EAAD,CAAa,cAAY,MAAQ,CAAA,CAC3B,CAAA,GACR,EAAAI,EAAA,IAAA,CAACM,EAAD,CACE,QAAQ,UACR,KAAK,UACL,aAAYF,EAAE,aAAa,EAC3B,SAAU,CAACK,EACX,QAASA,EAET,UAAA,EAAAT,EAAA,IAAA,CAACL,EAAD,CAAc,cAAY,MAAQ,CAAA,CAC5B,CAAA,CACL,GAET"}
@@ -1,2 +1,2 @@
1
- import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{n as r,t as i}from"./createLucideIcon-CqygG5K6.js";import{t as a}from"./InfoHint-bYMd_t0J.js";import{i as o,n as s}from"./skeleton-Dyi_b1wq.js";import{c,o as l,s as u,t as d}from"./field-W1dB_h6d.js";var f={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};f.node;var p=i(f),m=e(t(),1),h=e(n(),1),g=100,_={x:.5,y:.5},v=e=>Math.min(1,Math.max(0,e)),y=({imageUrl:e,value:t,onChange:n})=>{let{t:i}=r(),f=(0,m.useId)(),y=t??_,b=e=>{let t=e.currentTarget.getBoundingClientRect();n({x:v((e.clientX-t.left)/t.width),y:v((e.clientY-t.top)/t.height)})},x=(e,t)=>{let r=Number(t);t!==``&&Number.isFinite(r)&&n({...y,[e]:v(r/g)})};return(0,h.jsxs)(c,{"aria-labelledby":`${f}-title`,children:[(0,h.jsxs)(u,{variant:`label`,className:`flex items-center gap-1`,children:[(0,h.jsx)(`span`,{id:`${f}-title`,children:i(`media.focal.title`)}),(0,h.jsx)(a,{about:i(`media.focal.title`),children:i(`media.focal.hint`)})]}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,onClick:b,className:`relative w-fit max-w-full cursor-crosshair overflow-hidden rounded-lg border`,style:{"--focal-x":`${y.x*g}%`,"--focal-y":`${y.y*g}%`},children:[(0,h.jsx)(`img`,{src:e,alt:``,className:`block max-h-64 w-auto`,draggable:!1}),t?(0,h.jsx)(`span`,{className:`absolute top-[var(--focal-y)] left-[var(--focal-x)] flex size-6 -translate-1/2 items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground shadow`,children:(0,h.jsx)(p,{className:`size-3.5`})}):null]}),(0,h.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,h.jsxs)(d,{className:`w-28`,children:[(0,h.jsx)(l,{htmlFor:`${f}-x`,children:i(`media.focal.x`)}),(0,h.jsx)(s,{id:`${f}-x`,type:`number`,min:0,max:g,step:1,value:t?Math.round(t.x*g):``,placeholder:i(`media.focal.unset`),onChange:e=>x(`x`,e.target.value)})]}),(0,h.jsxs)(d,{className:`w-28`,children:[(0,h.jsx)(l,{htmlFor:`${f}-y`,children:i(`media.focal.y`)}),(0,h.jsx)(s,{id:`${f}-y`,type:`number`,min:0,max:g,step:1,value:t?Math.round(t.y*g):``,placeholder:i(`media.focal.unset`),onChange:e=>x(`y`,e.target.value)})]}),(0,h.jsx)(o,{type:`button`,variant:`ghost`,size:`sm`,disabled:!t,onClick:()=>n(null),children:i(`media.focal.clear`)})]})]})};export{p as n,y as t};
2
- //# sourceMappingURL=FocalPoint-CSeKI4Iw.js.map
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{t}from"./react-CQOZoUwg.js";import{t as n}from"./jsx-runtime-DREnUpxT.js";import{n as r,t as i}from"./createLucideIcon-CqygG5K6.js";import{t as a}from"./InfoHint-Dyzyf59c.js";import{i as o,n as s}from"./skeleton-D4eOLKLY.js";import{c,o as l,s as u,t as d}from"./field-Bg-JRgsB.js";var f={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};f.node;var p=i(f),m=e(t(),1),h=e(n(),1),g=100,_={x:.5,y:.5},v=e=>Math.min(1,Math.max(0,e)),y=({imageUrl:e,value:t,onChange:n})=>{let{t:i}=r(),f=(0,m.useId)(),y=t??_,b=e=>{let t=e.currentTarget.getBoundingClientRect();n({x:v((e.clientX-t.left)/t.width),y:v((e.clientY-t.top)/t.height)})},x=(e,t)=>{let r=Number(t);t!==``&&Number.isFinite(r)&&n({...y,[e]:v(r/g)})};return(0,h.jsxs)(c,{"aria-labelledby":`${f}-title`,children:[(0,h.jsxs)(u,{variant:`label`,className:`flex items-center gap-1`,children:[(0,h.jsx)(`span`,{id:`${f}-title`,children:i(`media.focal.title`)}),(0,h.jsx)(a,{about:i(`media.focal.title`),children:i(`media.focal.hint`)})]}),(0,h.jsxs)(`div`,{"aria-hidden":`true`,onClick:b,className:`relative w-fit max-w-full cursor-crosshair overflow-hidden rounded-lg border`,style:{"--focal-x":`${y.x*g}%`,"--focal-y":`${y.y*g}%`},children:[(0,h.jsx)(`img`,{src:e,alt:``,className:`block max-h-64 w-auto`,draggable:!1}),t?(0,h.jsx)(`span`,{className:`absolute top-[var(--focal-y)] left-[var(--focal-x)] flex size-6 -translate-1/2 items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground shadow`,children:(0,h.jsx)(p,{className:`size-3.5`})}):null]}),(0,h.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,h.jsxs)(d,{className:`w-28`,children:[(0,h.jsx)(l,{htmlFor:`${f}-x`,children:i(`media.focal.x`)}),(0,h.jsx)(s,{id:`${f}-x`,type:`number`,min:0,max:g,step:1,value:t?Math.round(t.x*g):``,placeholder:i(`media.focal.unset`),onChange:e=>x(`x`,e.target.value)})]}),(0,h.jsxs)(d,{className:`w-28`,children:[(0,h.jsx)(l,{htmlFor:`${f}-y`,children:i(`media.focal.y`)}),(0,h.jsx)(s,{id:`${f}-y`,type:`number`,min:0,max:g,step:1,value:t?Math.round(t.y*g):``,placeholder:i(`media.focal.unset`),onChange:e=>x(`y`,e.target.value)})]}),(0,h.jsx)(o,{type:`button`,variant:`ghost`,size:`sm`,disabled:!t,onClick:()=>n(null),children:i(`media.focal.clear`)})]})]})};export{p as n,y as t};
2
+ //# sourceMappingURL=FocalPoint-BYu2fOTb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocalPoint-CSeKI4Iw.js","names":["useId","__toESM","require_jsx_runtime","useTranslation","createLucideIcon","InfoHint","Button","Input","FieldLabel","FieldLegend","Field","__iconData","Crosshair","import_react","require_react","import_jsx_runtime","PERCENT","CENTRE","clamp","value","FocalPoint","id","point","place","box","event","onChange","setAxis","number","text","axis","FieldSet","t","imageUrl"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/crosshair.mjs","../../src/components/FocalPoint/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"crosshair\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"22\", x2: \"18\", y1: \"12\", y2: \"12\", key: \"l9bcsi\" }],\n [\"line\", { x1: \"6\", x2: \"2\", y1: \"12\", y2: \"12\", key: \"13hhkx\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"6\", y2: \"2\", key: \"10w3f3\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"22\", y2: \"18\", key: \"15g9kq\" }]\n ]\n};\n__iconData.node;\nconst Crosshair = createLucideIcon(__iconData);\n\nexport { __iconData, Crosshair as default };\n//# sourceMappingURL=crosshair.mjs.map\n","import type { MediaFocalPoint } from '@shapio/client';\nimport { Crosshair } from 'lucide-react';\nimport { useId, type CSSProperties, type MouseEvent } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { InfoHint } from '@/components/InfoHint';\nimport { Button } from '@/components/ui/button';\nimport { Field, FieldLabel, FieldLegend, FieldSet } from '@/components/ui/field';\nimport { Input } from '@/components/ui/input';\n\ntype FocalPointProps = {\n imageUrl: string;\n value: MediaFocalPoint | null;\n onChange: (value: MediaFocalPoint | null) => void;\n};\n\nconst PERCENT = 100;\nconst CENTRE: MediaFocalPoint = { x: 0.5, y: 0.5 };\n\nconst clamp = (value: number) => Math.min(1, Math.max(0, value));\n\n/**\n * The point crops keep in view. Click the image to place it; the percentage inputs are the keyboard path\n * (the image itself is a pointer shortcut and hidden from assistive technology).\n */\nexport const FocalPoint = ({ imageUrl, value, onChange }: FocalPointProps) => {\n const { t } = useTranslation();\n // Unique per instance: the media details sheet and the entry's settings drawer can both show one.\n const id = useId();\n const point = value ?? CENTRE;\n const place = (event: MouseEvent<HTMLDivElement>) => {\n const box = event.currentTarget.getBoundingClientRect();\n onChange({\n x: clamp((event.clientX - box.left) / box.width),\n y: clamp((event.clientY - box.top) / box.height),\n });\n };\n const setAxis = (axis: 'x' | 'y', text: string) => {\n const number = Number(text);\n if (text !== '' && Number.isFinite(number)) {\n onChange({ ...point, [axis]: clamp(number / PERCENT) });\n }\n };\n return (\n <FieldSet aria-labelledby={`${id}-title`}>\n <FieldLegend variant=\"label\" className=\"flex items-center gap-1\">\n <span id={`${id}-title`}>{t('media.focal.title')}</span>\n <InfoHint about={t('media.focal.title')}>{t('media.focal.hint')}</InfoHint>\n </FieldLegend>\n <div\n aria-hidden=\"true\"\n onClick={place}\n className=\"relative w-fit max-w-full cursor-crosshair overflow-hidden rounded-lg border\"\n style={\n { '--focal-x': `${point.x * PERCENT}%`, '--focal-y': `${point.y * PERCENT}%` } as CSSProperties\n }\n >\n <img src={imageUrl} alt=\"\" className=\"block max-h-64 w-auto\" draggable={false} />\n {value ? (\n <span className=\"absolute top-[var(--focal-y)] left-[var(--focal-x)] flex size-6 -translate-1/2 items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground shadow\">\n <Crosshair className=\"size-3.5\" />\n </span>\n ) : null}\n </div>\n <div className=\"flex flex-wrap items-end gap-3\">\n <Field className=\"w-28\">\n <FieldLabel htmlFor={`${id}-x`}>{t('media.focal.x')}</FieldLabel>\n <Input\n id={`${id}-x`}\n type=\"number\"\n min={0}\n max={PERCENT}\n step={1}\n value={value ? Math.round(value.x * PERCENT) : ''}\n placeholder={t('media.focal.unset')}\n onChange={(event) => setAxis('x', event.target.value)}\n />\n </Field>\n <Field className=\"w-28\">\n <FieldLabel htmlFor={`${id}-y`}>{t('media.focal.y')}</FieldLabel>\n <Input\n id={`${id}-y`}\n type=\"number\"\n min={0}\n max={PERCENT}\n step={1}\n value={value ? Math.round(value.y * PERCENT) : ''}\n placeholder={t('media.focal.unset')}\n onChange={(event) => setAxis('y', event.target.value)}\n />\n </Field>\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" disabled={!value} onClick={() => onChange(null)}>\n {t('media.focal.clear')}\n </Button>\n </div>\n </FieldSet>\n );\n};\n"],"ignoreList":[0],"mappings":"mVASA,IAAMW,EAAa,CACjB,KAAM,YACN,KAAM,GAC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P,EAAAV,EAAA,KAAA,CAACL,EAAD,CAAO,UAAU,OAAjB,SAAA,EACE,EAAAK,EAAA,IAAA,CAACP,EAAD,CAAY,QAAS,GAAGa,EAAG,IAAM,SAAAW,EAAE,eAAe,CAAc,CAAA,GAChE,EAAAjB,EAAA,IAAA,CAACR,EAAD,CACE,GAAI,GAAGc,EAAG,IACV,KAAK,SACL,IAAK,EACL,IAAKL,EACL,KAAM,EACN,MAAOG,EAAQ,KAAK,MAAMA,EAAM,EAAIH,CAAO,EAAI,GAC/C,YAAagB,EAAE,mBAAmB,EAClC,SAAW,GAAUL,EAAQ,IAAKF,EAAM,OAAO,KAAK,CACrD,CAAA,CACI,KACP,EAAAV,EAAA,IAAA,CAACT,EAAD,CAAQ,KAAK,SAAS,QAAQ,QAAQ,KAAK,KAAK,SAAU,CAACa,EAAO,YAAeO,EAAS,IAAI,EAC3F,SAAAM,EAAE,mBAAmB,CAChB,CAAA,CACL,GACG,GAEd"}
1
+ {"version":3,"file":"FocalPoint-BYu2fOTb.js","names":["useId","__toESM","require_jsx_runtime","useTranslation","createLucideIcon","InfoHint","Button","Input","FieldLabel","FieldLegend","Field","__iconData","Crosshair","import_react","require_react","import_jsx_runtime","PERCENT","CENTRE","clamp","value","FocalPoint","id","point","place","box","event","onChange","setAxis","number","text","axis","FieldSet","t","imageUrl"],"sources":["../../../../node_modules/.pnpm/lucide-react@1.49.0_@types+react@19.3.0_react@19.3.0/node_modules/lucide-react/dist/esm/icons/crosshair.mjs","../../src/components/FocalPoint/index.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.49.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"crosshair\",\n size: 24,\n node: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"line\", { x1: \"22\", x2: \"18\", y1: \"12\", y2: \"12\", key: \"l9bcsi\" }],\n [\"line\", { x1: \"6\", x2: \"2\", y1: \"12\", y2: \"12\", key: \"13hhkx\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"6\", y2: \"2\", key: \"10w3f3\" }],\n [\"line\", { x1: \"12\", x2: \"12\", y1: \"22\", y2: \"18\", key: \"15g9kq\" }]\n ]\n};\n__iconData.node;\nconst Crosshair = createLucideIcon(__iconData);\n\nexport { __iconData, Crosshair as default };\n//# sourceMappingURL=crosshair.mjs.map\n","import type { MediaFocalPoint } from '@shapio/client';\nimport { Crosshair } from 'lucide-react';\nimport { useId, type CSSProperties, type MouseEvent } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { InfoHint } from '@/components/InfoHint';\nimport { Button } from '@/components/ui/button';\nimport { Field, FieldLabel, FieldLegend, FieldSet } from '@/components/ui/field';\nimport { Input } from '@/components/ui/input';\n\ntype FocalPointProps = {\n imageUrl: string;\n value: MediaFocalPoint | null;\n onChange: (value: MediaFocalPoint | null) => void;\n};\n\nconst PERCENT = 100;\nconst CENTRE: MediaFocalPoint = { x: 0.5, y: 0.5 };\n\nconst clamp = (value: number) => Math.min(1, Math.max(0, value));\n\n/**\n * The point crops keep in view. Click the image to place it; the percentage inputs are the keyboard path\n * (the image itself is a pointer shortcut and hidden from assistive technology).\n */\nexport const FocalPoint = ({ imageUrl, value, onChange }: FocalPointProps) => {\n const { t } = useTranslation();\n // Unique per instance: the media details sheet and the entry's settings drawer can both show one.\n const id = useId();\n const point = value ?? CENTRE;\n const place = (event: MouseEvent<HTMLDivElement>) => {\n const box = event.currentTarget.getBoundingClientRect();\n onChange({\n x: clamp((event.clientX - box.left) / box.width),\n y: clamp((event.clientY - box.top) / box.height),\n });\n };\n const setAxis = (axis: 'x' | 'y', text: string) => {\n const number = Number(text);\n if (text !== '' && Number.isFinite(number)) {\n onChange({ ...point, [axis]: clamp(number / PERCENT) });\n }\n };\n return (\n <FieldSet aria-labelledby={`${id}-title`}>\n <FieldLegend variant=\"label\" className=\"flex items-center gap-1\">\n <span id={`${id}-title`}>{t('media.focal.title')}</span>\n <InfoHint about={t('media.focal.title')}>{t('media.focal.hint')}</InfoHint>\n </FieldLegend>\n <div\n aria-hidden=\"true\"\n onClick={place}\n className=\"relative w-fit max-w-full cursor-crosshair overflow-hidden rounded-lg border\"\n style={\n { '--focal-x': `${point.x * PERCENT}%`, '--focal-y': `${point.y * PERCENT}%` } as CSSProperties\n }\n >\n <img src={imageUrl} alt=\"\" className=\"block max-h-64 w-auto\" draggable={false} />\n {value ? (\n <span className=\"absolute top-[var(--focal-y)] left-[var(--focal-x)] flex size-6 -translate-1/2 items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground shadow\">\n <Crosshair className=\"size-3.5\" />\n </span>\n ) : null}\n </div>\n <div className=\"flex flex-wrap items-end gap-3\">\n <Field className=\"w-28\">\n <FieldLabel htmlFor={`${id}-x`}>{t('media.focal.x')}</FieldLabel>\n <Input\n id={`${id}-x`}\n type=\"number\"\n min={0}\n max={PERCENT}\n step={1}\n value={value ? Math.round(value.x * PERCENT) : ''}\n placeholder={t('media.focal.unset')}\n onChange={(event) => setAxis('x', event.target.value)}\n />\n </Field>\n <Field className=\"w-28\">\n <FieldLabel htmlFor={`${id}-y`}>{t('media.focal.y')}</FieldLabel>\n <Input\n id={`${id}-y`}\n type=\"number\"\n min={0}\n max={PERCENT}\n step={1}\n value={value ? Math.round(value.y * PERCENT) : ''}\n placeholder={t('media.focal.unset')}\n onChange={(event) => setAxis('y', event.target.value)}\n />\n </Field>\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" disabled={!value} onClick={() => onChange(null)}>\n {t('media.focal.clear')}\n </Button>\n </div>\n </FieldSet>\n );\n};\n"],"ignoreList":[0],"mappings":"mVASA,IAAMW,EAAa,CACjB,KAAM,YACN,KAAM,GACN,KAAM,CACJ,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,IAAK,QAAS,CAAC,EACzD,CAAC,OAAQ,CAAE,GA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