@eigenpal/docx-js-editor 0.0.19 → 0.0.21

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 (201) hide show
  1. package/README.md +83 -0
  2. package/dist/{ClipboardManager-EZ0C6Onq.d.cts → ClipboardManager-B1jZrC6h.d.cts} +1 -1
  3. package/dist/{ClipboardManager-D6dkOFg6.d.ts → ClipboardManager-jqJVxB6g.d.ts} +1 -1
  4. package/dist/{DocumentAgent-BcCDg7i2.d.ts → DocumentAgent-CnJ9AEl_.d.cts} +31 -3
  5. package/dist/{DocumentAgent-B0EC8lPC.d.cts → DocumentAgent-CrbsDniO.d.ts} +31 -3
  6. package/dist/{FindReplaceDialog-AWQXKEUQ.js → FindReplaceDialog-AQFR4OCT.js} +1 -2
  7. package/dist/FindReplaceDialog-J3DI3U5I.cjs +1 -0
  8. package/dist/{FootnotePropertiesDialog-73VT2ZVZ.cjs → FootnotePropertiesDialog-DO5DCAW6.cjs} +1 -2
  9. package/dist/{FootnotePropertiesDialog-ZM3EF3EF.js → FootnotePropertiesDialog-YYIZU5U6.js} +1 -2
  10. package/dist/{HyperlinkDialog-BA25XUT5.js → HyperlinkDialog-HGZ2S37Z.js} +1 -2
  11. package/dist/HyperlinkDialog-PEPS3C2G.cjs +1 -0
  12. package/dist/{ImagePositionDialog-AIAMKPFK.js → ImagePositionDialog-DQ4JWS4F.js} +1 -2
  13. package/dist/{ImagePositionDialog-KMK7ROV2.cjs → ImagePositionDialog-UYXYHSP4.cjs} +1 -2
  14. package/dist/{ImagePropertiesDialog-ERFCUVCW.js → ImagePropertiesDialog-GJMGLM6G.js} +1 -2
  15. package/dist/{ImagePropertiesDialog-USMMRK6X.cjs → ImagePropertiesDialog-V6SVKINO.cjs} +1 -2
  16. package/dist/{TablePropertiesDialog-72CIUAZT.cjs → TablePropertiesDialog-A36OXG3A.cjs} +1 -2
  17. package/dist/{TablePropertiesDialog-EMUEVYB3.js → TablePropertiesDialog-STZOGHJB.js} +1 -2
  18. package/dist/{agentApi-BFVyKagE.d.cts → agentApi-DfsWRyrP.d.cts} +1 -1
  19. package/dist/{agentApi-BFVyKagE.d.ts → agentApi-DfsWRyrP.d.ts} +1 -1
  20. package/dist/{chunk-FDANI5P4.cjs → chunk-2VHQ7YOQ.cjs} +1 -2
  21. package/dist/chunk-2Y6FLZ5Q.js +3 -0
  22. package/dist/chunk-32HMU2UV.js +111 -0
  23. package/dist/chunk-4CUGBNL2.cjs +1 -0
  24. package/dist/chunk-5GFXHUMP.js +1 -0
  25. package/dist/chunk-6NDMKJIE.js +9 -0
  26. package/dist/chunk-6NYA53QC.cjs +258 -0
  27. package/dist/chunk-7KJ3YVDQ.js +10 -0
  28. package/dist/{chunk-JOYPFQW2.js → chunk-AARNCPWR.js} +1 -2
  29. package/dist/{chunk-4QT5LPBA.cjs → chunk-B7TICMXD.cjs} +16 -17
  30. package/dist/{chunk-2QOEHCBX.js → chunk-BUEMG4NW.js} +1 -2
  31. package/dist/{chunk-CV5WFE7K.js → chunk-CLDB6TL7.js} +2 -3
  32. package/dist/{chunk-M2T6XKT5.js → chunk-CTYOM6BE.js} +1 -2
  33. package/dist/chunk-EH3NY2DQ.cjs +26 -0
  34. package/dist/{chunk-FGVGZLBL.js → chunk-FVUGBRDD.js} +1 -2
  35. package/dist/chunk-FXJAIFPR.js +59 -0
  36. package/dist/chunk-GICVJSFJ.cjs +9 -0
  37. package/dist/{chunk-Y6VCTLCJ.js → chunk-H5NTJZO4.js} +1 -2
  38. package/dist/chunk-HT2Z33YM.cjs +111 -0
  39. package/dist/chunk-JRRTZZ72.cjs +1 -0
  40. package/dist/{chunk-T2HQYRA7.cjs → chunk-NVAQQYBJ.cjs} +1 -2
  41. package/dist/chunk-P3AEZKQO.cjs +3 -0
  42. package/dist/{chunk-GWBTKVFD.cjs → chunk-P7ZF45KZ.cjs} +1 -2
  43. package/dist/{chunk-QEBO3EQP.cjs → chunk-PCJ5ACUV.cjs} +1 -2
  44. package/dist/{chunk-Q6HUGWO6.js → chunk-PJVI53AH.js} +1 -2
  45. package/dist/chunk-Q7YYC75E.js +258 -0
  46. package/dist/{chunk-7JSPKVOW.js → chunk-QVPR2W5S.js} +1 -2
  47. package/dist/{chunk-XZNOV52K.cjs → chunk-TAF6KYDM.cjs} +4 -5
  48. package/dist/chunk-USRMBYI6.js +3 -0
  49. package/dist/chunk-UTWPV2I4.js +26 -0
  50. package/dist/{chunk-DJAEBZ33.cjs → chunk-VTAS7VZ6.cjs} +1 -2
  51. package/dist/chunk-XQNCLN4T.cjs +3 -0
  52. package/dist/{chunk-S26DZVRQ.cjs → chunk-XS2AQFMF.cjs} +1 -2
  53. package/dist/chunk-Y6QBJGMO.cjs +59 -0
  54. package/dist/{chunk-WD2HTKRR.cjs → chunk-YS7FDEZ4.cjs} +1 -2
  55. package/dist/chunk-ZTVQA46Q.js +1 -0
  56. package/dist/{clipboard-beGtyabO.d.ts → clipboard-BE8E-szx.d.ts} +1 -1
  57. package/dist/{clipboard-CqE-UZ2d.d.cts → clipboard-DkfAv07F.d.cts} +1 -1
  58. package/dist/{colorResolver-B5YbO_a4.d.ts → colorResolver-CYttioMe.d.ts} +46 -3
  59. package/dist/{colorResolver-Cu46bSKr.d.cts → colorResolver-Dr8kQZAQ.d.cts} +46 -3
  60. package/dist/core-plugins-reexport.cjs +1 -2
  61. package/dist/core-plugins-reexport.d.cts +4 -4
  62. package/dist/core-plugins-reexport.d.ts +4 -4
  63. package/dist/core-plugins-reexport.js +1 -2
  64. package/dist/core-reexport.cjs +1 -2
  65. package/dist/core-reexport.d.cts +10 -10
  66. package/dist/core-reexport.d.ts +10 -10
  67. package/dist/core-reexport.js +1 -2
  68. package/dist/executor-JGWZ7S6Z.cjs +1 -0
  69. package/dist/executor-L2MVKMXO.js +1 -0
  70. package/dist/{fontLoader-CFKpg0Ri.d.ts → fontLoader-BsqQnB4v.d.ts} +1 -1
  71. package/dist/{fontLoader-HZYfILUm.d.cts → fontLoader-DECXIoMr.d.cts} +1 -1
  72. package/dist/headless-reexport.cjs +4 -5
  73. package/dist/headless-reexport.d.cts +7 -7
  74. package/dist/headless-reexport.d.ts +7 -7
  75. package/dist/headless-reexport.js +4 -5
  76. package/dist/index.cjs +6 -7
  77. package/dist/index.css +0 -1
  78. package/dist/index.d.cts +12 -12
  79. package/dist/index.d.ts +12 -12
  80. package/dist/index.js +6 -7
  81. package/dist/lib-GD2QD2JK.js +1 -0
  82. package/dist/lib-HOLGQI5K.cjs +1 -0
  83. package/dist/mcp-reexport.cjs +9 -10
  84. package/dist/mcp-reexport.d.cts +2 -2
  85. package/dist/mcp-reexport.d.ts +2 -2
  86. package/dist/mcp-reexport.js +4 -5
  87. package/dist/{processTemplate-G37IM66O.js → processTemplate-3HN7Q3KT.js} +1 -2
  88. package/dist/processTemplate-BXZKWRQD.cjs +1 -0
  89. package/dist/{react-BjOCdeTs.d.ts → react-C6bgHDFl.d.ts} +8 -6
  90. package/dist/{react-UzAn4o7l.d.cts → react-CAlVCYa4.d.cts} +8 -6
  91. package/dist/react.cjs +1 -2
  92. package/dist/react.css +0 -1
  93. package/dist/react.d.cts +5 -5
  94. package/dist/react.d.ts +5 -5
  95. package/dist/react.js +1 -2
  96. package/dist/{registry-DjacfR6Q.d.cts → registry-BU-FbHh-.d.cts} +1 -1
  97. package/dist/{registry-CV6nYWqP.d.ts → registry-gRbkCooh.d.ts} +1 -1
  98. package/dist/selectionRects-7QU337P5.cjs +1 -0
  99. package/dist/selectionRects-V5RC2BYX.js +1 -0
  100. package/dist/styles.css +1 -1
  101. package/dist/{types-DwZ3xysp.d.ts → types-7wjInVMW.d.ts} +1 -1
  102. package/dist/{types-Bnp8rvJn.d.cts → types-DEEpBL9H.d.cts} +1 -1
  103. package/dist/ui.cjs +1 -2
  104. package/dist/ui.d.cts +32 -85
  105. package/dist/ui.d.ts +32 -85
  106. package/dist/ui.js +1 -2
  107. package/dist/{variableDetector-CMhJtM96.d.cts → variableDetector-B4oQJa2e.d.cts} +33 -2
  108. package/dist/{variableDetector-BaDeXz7D.d.ts → variableDetector-BXJaTkiB.d.ts} +33 -2
  109. package/package.json +2 -1
  110. package/dist/FindReplaceDialog-AWQXKEUQ.js.map +0 -1
  111. package/dist/FindReplaceDialog-I4SZDSVP.cjs +0 -2
  112. package/dist/FindReplaceDialog-I4SZDSVP.cjs.map +0 -1
  113. package/dist/FootnotePropertiesDialog-73VT2ZVZ.cjs.map +0 -1
  114. package/dist/FootnotePropertiesDialog-ZM3EF3EF.js.map +0 -1
  115. package/dist/HyperlinkDialog-BA25XUT5.js.map +0 -1
  116. package/dist/HyperlinkDialog-V63LPOT2.cjs +0 -2
  117. package/dist/HyperlinkDialog-V63LPOT2.cjs.map +0 -1
  118. package/dist/ImagePositionDialog-AIAMKPFK.js.map +0 -1
  119. package/dist/ImagePositionDialog-KMK7ROV2.cjs.map +0 -1
  120. package/dist/ImagePropertiesDialog-ERFCUVCW.js.map +0 -1
  121. package/dist/ImagePropertiesDialog-USMMRK6X.cjs.map +0 -1
  122. package/dist/TablePropertiesDialog-72CIUAZT.cjs.map +0 -1
  123. package/dist/TablePropertiesDialog-EMUEVYB3.js.map +0 -1
  124. package/dist/chunk-2CHPKB5A.cjs +0 -112
  125. package/dist/chunk-2CHPKB5A.cjs.map +0 -1
  126. package/dist/chunk-2QOEHCBX.js.map +0 -1
  127. package/dist/chunk-4QT5LPBA.cjs.map +0 -1
  128. package/dist/chunk-5DYSI4O4.cjs +0 -60
  129. package/dist/chunk-5DYSI4O4.cjs.map +0 -1
  130. package/dist/chunk-5FJXHXFV.cjs +0 -2
  131. package/dist/chunk-5FJXHXFV.cjs.map +0 -1
  132. package/dist/chunk-6FEWNF6B.js +0 -4
  133. package/dist/chunk-6FEWNF6B.js.map +0 -1
  134. package/dist/chunk-6LF5HZCV.js +0 -10
  135. package/dist/chunk-6LF5HZCV.js.map +0 -1
  136. package/dist/chunk-7JSPKVOW.js.map +0 -1
  137. package/dist/chunk-C33XDRDJ.cjs +0 -28
  138. package/dist/chunk-C33XDRDJ.cjs.map +0 -1
  139. package/dist/chunk-CV5WFE7K.js.map +0 -1
  140. package/dist/chunk-CXJRNISO.js +0 -2
  141. package/dist/chunk-CXJRNISO.js.map +0 -1
  142. package/dist/chunk-DJAEBZ33.cjs.map +0 -1
  143. package/dist/chunk-DP6Q75ZD.js +0 -28
  144. package/dist/chunk-DP6Q75ZD.js.map +0 -1
  145. package/dist/chunk-FDANI5P4.cjs.map +0 -1
  146. package/dist/chunk-FGVGZLBL.js.map +0 -1
  147. package/dist/chunk-GJ4GKSDU.cjs +0 -2
  148. package/dist/chunk-GJ4GKSDU.cjs.map +0 -1
  149. package/dist/chunk-GWBTKVFD.cjs.map +0 -1
  150. package/dist/chunk-JOYPFQW2.js.map +0 -1
  151. package/dist/chunk-L54YNLSE.js +0 -2
  152. package/dist/chunk-L54YNLSE.js.map +0 -1
  153. package/dist/chunk-LPGMLJMO.js +0 -259
  154. package/dist/chunk-LPGMLJMO.js.map +0 -1
  155. package/dist/chunk-M2T6XKT5.js.map +0 -1
  156. package/dist/chunk-OHG7ROFC.js +0 -11
  157. package/dist/chunk-OHG7ROFC.js.map +0 -1
  158. package/dist/chunk-PANKMCFX.cjs +0 -4
  159. package/dist/chunk-PANKMCFX.cjs.map +0 -1
  160. package/dist/chunk-Q6HUGWO6.js.map +0 -1
  161. package/dist/chunk-QDV75OJ4.js +0 -112
  162. package/dist/chunk-QDV75OJ4.js.map +0 -1
  163. package/dist/chunk-QEBO3EQP.cjs.map +0 -1
  164. package/dist/chunk-QVIZ775M.cjs +0 -259
  165. package/dist/chunk-QVIZ775M.cjs.map +0 -1
  166. package/dist/chunk-RMUMR42R.cjs +0 -10
  167. package/dist/chunk-RMUMR42R.cjs.map +0 -1
  168. package/dist/chunk-S26DZVRQ.cjs.map +0 -1
  169. package/dist/chunk-T2HQYRA7.cjs.map +0 -1
  170. package/dist/chunk-ULXNEG66.js +0 -60
  171. package/dist/chunk-ULXNEG66.js.map +0 -1
  172. package/dist/chunk-WD2HTKRR.cjs.map +0 -1
  173. package/dist/chunk-XZNOV52K.cjs.map +0 -1
  174. package/dist/chunk-Y6VCTLCJ.js.map +0 -1
  175. package/dist/core-plugins-reexport.cjs.map +0 -1
  176. package/dist/core-plugins-reexport.js.map +0 -1
  177. package/dist/core-reexport.cjs.map +0 -1
  178. package/dist/core-reexport.js.map +0 -1
  179. package/dist/executor-K5RXUTTR.js +0 -2
  180. package/dist/executor-K5RXUTTR.js.map +0 -1
  181. package/dist/executor-XIPIU3H4.cjs +0 -2
  182. package/dist/executor-XIPIU3H4.cjs.map +0 -1
  183. package/dist/headless-reexport.cjs.map +0 -1
  184. package/dist/headless-reexport.js.map +0 -1
  185. package/dist/index.cjs.map +0 -1
  186. package/dist/index.css.map +0 -1
  187. package/dist/index.js.map +0 -1
  188. package/dist/mcp-reexport.cjs.map +0 -1
  189. package/dist/mcp-reexport.js.map +0 -1
  190. package/dist/processTemplate-G37IM66O.js.map +0 -1
  191. package/dist/processTemplate-RFBGVH7T.cjs +0 -2
  192. package/dist/processTemplate-RFBGVH7T.cjs.map +0 -1
  193. package/dist/react.cjs.map +0 -1
  194. package/dist/react.css.map +0 -1
  195. package/dist/react.js.map +0 -1
  196. package/dist/selectionRects-6DU7HN7E.js +0 -2
  197. package/dist/selectionRects-6DU7HN7E.js.map +0 -1
  198. package/dist/selectionRects-YZSC24ZP.cjs +0 -2
  199. package/dist/selectionRects-YZSC24ZP.cjs.map +0 -1
  200. package/dist/ui.cjs.map +0 -1
  201. package/dist/ui.js.map +0 -1
@@ -1,112 +0,0 @@
1
- 'use strict';var chunkPANKMCFX_cjs=require('./chunk-PANKMCFX.cjs'),chunkT2HQYRA7_cjs=require('./chunk-T2HQYRA7.cjs'),Qo=require('react'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Qo__default=/*#__PURE__*/_interopDefault(Qo);var Zt=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M8 4v4M8 10v1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),Xt=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M13 3L3 13M3 3h4v4M13 13h-4v-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Jt=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),Qt=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M3 4h10M3 8h7M3 12h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),qt=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M2 3h6M5 3v6M3 5c0 2 1 4 2 4s2-2 2-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M9 7l3 6M15 7l-3 6M10 11h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),eo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 6c0-1.1.9-2 2-2s2 .9 2 2c0 1.5-2 1.5-2 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"8",cy:"12",r:"0.5",fill:"currentColor"})]}),to=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M4 12l3-8 3 8M5 10h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M12 6l2 2-2 2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),oo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 7h4M6 9h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),ro=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"5",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 9c.5.5 1 1 2 1s1.5-.5 2-1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"6",cy:"7",r:"0.5",fill:"currentColor"}),jsxRuntime.jsx("circle",{cx:"10",cy:"7",r:"0.5",fill:"currentColor"})]}),no=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})});function io(e){switch(e){case "askAI":return jsxRuntime.jsx(Zt,{});case "rewrite":return jsxRuntime.jsx(Xt,{});case "expand":return jsxRuntime.jsx(Jt,{});case "summarize":return jsxRuntime.jsx(Qt,{});case "translate":return jsxRuntime.jsx(qt,{});case "explain":return jsxRuntime.jsx(eo,{});case "fixGrammar":return jsxRuntime.jsx(to,{});case "makeFormal":return jsxRuntime.jsx(oo,{});case "makeCasual":return jsxRuntime.jsx(ro,{});case "custom":return jsxRuntime.jsx(no,{});default:return null}}var ao=({action:e,onClick:t,isHighlighted:o,onMouseEnter:r})=>{let n=chunkT2HQYRA7_cjs.e(e),i=chunkT2HQYRA7_cjs.f(e),a=io(e);return jsxRuntime.jsxs("button",{type:"button",className:`docx-context-menu-item ${o?"docx-context-menu-item-highlighted":""}`,onClick:t,onMouseEnter:r,title:i,role:"menuitem",style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 12px",border:"none",background:o?"var(--doc-primary-light)":"transparent",cursor:"pointer",fontSize:"13px",color:"var(--doc-text)",textAlign:"left"},children:[jsxRuntime.jsx("span",{style:{display:"flex",color:"var(--doc-text-muted)"},children:a}),jsxRuntime.jsx("span",{children:n})]})},so=({isOpen:e,onSubmit:t,onClose:o,selectedText:r})=>{let[n,i]=Qo.useState(""),a=Qo.useRef(null);Qo.useEffect(()=>{e&&a.current&&a.current.focus();},[e]);let c=s=>{s.preventDefault(),n.trim()&&(t(n.trim()),i(""));},d=s=>{s.key==="Escape"&&o();};return e?jsxRuntime.jsx("div",{className:"docx-custom-prompt-dialog",style:{position:"absolute",top:"100%",left:0,right:0,padding:"8px",background:"white",borderTop:"1px solid var(--doc-border)"},children:jsxRuntime.jsxs("form",{onSubmit:c,children:[jsxRuntime.jsxs("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:['Selected: "',r.slice(0,50),r.length>50?"...":"",'"']}),jsxRuntime.jsx("input",{ref:a,type:"text",value:n,onChange:s=>i(s.target.value),onKeyDown:d,placeholder:"Enter custom prompt...",style:{width:"100%",padding:"8px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",fontSize:"13px"}}),jsxRuntime.jsxs("div",{style:{marginTop:"8px",display:"flex",gap:"8px",justifyContent:"flex-end"},children:[jsxRuntime.jsx("button",{type:"button",onClick:o,style:{padding:"6px 12px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"12px"},children:"Cancel"}),jsxRuntime.jsx("button",{type:"submit",disabled:!n.trim(),style:{padding:"6px 12px",border:"none",borderRadius:"4px",background:n.trim()?"var(--doc-primary)":"var(--doc-border)",color:n.trim()?"white":"var(--doc-text-placeholder)",cursor:n.trim()?"pointer":"not-allowed",fontSize:"12px"},children:"Send"})]})]})}):null},En=({isOpen:e,position:t,selectedText:o,selectionContext:r,onAction:n,onClose:i,actions:a=chunkT2HQYRA7_cjs.g,showCustomPrompt:c=true,className:d=""})=>{let s=Qo.useRef(null),[x,m]=Qo.useState(0),[p,g]=Qo.useState(false),b=c?[...a,"custom"]:a;Qo.useEffect(()=>{if(!e)return;let l=h=>{s.current&&!s.current.contains(h.target)&&i();};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[e,i]),Qo.useEffect(()=>{if(!e)return;let l=h=>{switch(h.key){case "Escape":p?g(false):i();break;case "ArrowDown":h.preventDefault(),m(P=>(P+1)%b.length);break;case "ArrowUp":h.preventDefault(),m(P=>(P-1+b.length)%b.length);break;case "Enter":h.preventDefault();let C=b[x];C==="custom"?g(true):(n(C),i());break}};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[e,x,b,n,i,p]),Qo.useEffect(()=>{e&&(m(0),g(false));},[e]);let v=Qo.useCallback(()=>{let h=b.length*36+16,C=t.x,P=t.y;return typeof window<"u"&&(C+200>window.innerWidth&&(C=window.innerWidth-200-10),P+h>window.innerHeight&&(P=window.innerHeight-h-10),C<10&&(C=10),P<10&&(P=10)),{position:"fixed",top:P,left:C,minWidth:200,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",zIndex:1e4,padding:"4px 0",overflow:"hidden"}},[t,b.length]),u=l=>{l==="custom"?g(true):(n(l),i());},f=l=>{n("custom",l),i();};return !e||!o?null:jsxRuntime.jsxs("div",{ref:s,className:`docx-context-menu ${d}`,style:v(),role:"menu","aria-label":"AI actions menu",children:[jsxRuntime.jsxs("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--doc-border)",fontSize:"11px",color:"var(--doc-text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:['"',o.slice(0,30),o.length>30?"...":"",'"']}),jsxRuntime.jsx("div",{role:"group",children:b.map((l,h)=>jsxRuntime.jsx(ao,{action:l,onClick:()=>u(l),isHighlighted:h===x,onMouseEnter:()=>m(h)},l))}),c&&jsxRuntime.jsx(so,{isOpen:p,onSubmit:f,onClose:()=>g(false),selectedText:o})]})};function In(){let[e,t]=Qo.useState(false),[o,r]=Qo.useState({x:0,y:0}),[n,i]=Qo.useState(""),[a,c]=Qo.useState(),d=Qo.useCallback((x,m,p)=>{x.preventDefault(),r({x:x.clientX,y:x.clientY}),i(m),c(p),t(true);},[]),s=Qo.useCallback(()=>{t(false);},[]);return {isOpen:e,position:o,selectedText:n,selectionContext:a,openMenu:d,closeMenu:s}}function Rn(e){return {rewrite:"Ctrl+Shift+R",summarize:"Ctrl+Shift+S",translate:"Ctrl+Shift+T",fixGrammar:"Ctrl+Shift+G"}[e]}function Pn(e,t,o){return !(!t||t.trim().length===0)}function Ln(){return [...chunkT2HQYRA7_cjs.g]}function Dn(){return ["askAI","rewrite","expand","summarize","translate","explain","fixGrammar","makeFormal","makeCasual","custom"]}var lo=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M3 8l4 4 6-8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),ct=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}),co=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M2 8a6 6 0 0111.318-2.828M14 8a6 6 0 01-11.318 2.828",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("path",{d:"M13 2v4h-4M3 14v-4h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),po=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M11 2l3 3-9 9H2v-3l9-9z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),uo=()=>jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{animation:"spin 1s linear infinite"},children:[jsxRuntime.jsx("circle",{cx:"10",cy:"10",r:"8",stroke:"var(--doc-border)",strokeWidth:"2",fill:"none"}),jsxRuntime.jsx("path",{d:"M10 2a8 8 0 018 8",stroke:"var(--doc-primary)",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),jsxRuntime.jsx("style",{children:`
2
- @keyframes spin {
3
- from { transform: rotate(0deg); }
4
- to { transform: rotate(360deg); }
5
- }
6
- `})]});function go(e,t){let o=[],r=e.split(/(\s+)/),n=t.split(/(\s+)/),i=0,a=0;for(;i<r.length||a<n.length;){if(i>=r.length){o.push({type:"added",text:n.slice(a).join("")});break}if(a>=n.length){o.push({type:"removed",text:r.slice(i).join("")});break}if(r[i]===n[a])o.push({type:"same",text:r[i]}),i++,a++;else {let d=n.indexOf(r[i],a),s=r.indexOf(n[a],i);d===-1&&s===-1?(o.push({type:"removed",text:r[i]}),o.push({type:"added",text:n[a]}),i++,a++):s!==-1&&(d===-1||s-i<=d-a)?(o.push({type:"added",text:n[a]}),a++):(o.push({type:"removed",text:r[i]}),i++);}}let c=[];for(let d of o)c.length>0&&c[c.length-1].type===d.type?c[c.length-1].text+=d.text:c.push(d);return c}var mo=({original:e,modified:t})=>{let o=go(e,t);return jsxRuntime.jsx("div",{className:"docx-response-diff",style:{lineHeight:1.6,fontSize:"14px"},children:o.map((r,n)=>{let i={};switch(r.type){case "removed":i={textDecoration:"line-through",color:"#d32f2f",backgroundColor:"#ffebee"};break;case "added":i={color:"#2e7d32",backgroundColor:"#e8f5e9"};break;}return jsxRuntime.jsx("span",{style:i,children:r.text},n)})})},Bn=({originalText:e,response:t,action:o,isLoading:r,error:n,onAccept:i,onReject:a,onRetry:c,allowEdit:d=true,showDiff:s=true,className:x="",position:m})=>{let[p,g]=Qo.useState(false),[b,v]=Qo.useState(""),u=Qo.useRef(null),f=Qo.useRef(null),l=t?.newText||"";Qo.useEffect(()=>{l&&v(l);},[l]),Qo.useEffect(()=>{p&&u.current&&(u.current.focus(),u.current.select());},[p]),Qo.useEffect(()=>{let R=D=>{D.key==="Escape"?p?(g(false),v(l)):a():D.key==="Enter"&&(D.metaKey||D.ctrlKey)&&(D.preventDefault(),h());};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[p,l,a]);let h=Qo.useCallback(()=>{i(p?b:l);},[p,b,l,i]),C=Qo.useCallback(()=>{g(true);},[]),P=Qo.useCallback(()=>{g(false),v(l);},[l]),H={position:m?"fixed":"relative",...m&&{left:m.x,top:m.y},width:"400px",maxWidth:"90vw",maxHeight:"80vh",background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",zIndex:1e4,overflow:"hidden",display:"flex",flexDirection:"column"};return r?jsxRuntime.jsx("div",{ref:f,className:`docx-response-preview docx-response-preview-loading ${x}`,style:H,children:jsxRuntime.jsxs("div",{style:{padding:"24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"16px"},children:[jsxRuntime.jsx(uo,{}),jsxRuntime.jsxs("div",{style:{color:"var(--doc-text-muted)",fontSize:"14px"},children:[chunkT2HQYRA7_cjs.e(o),"..."]})]})}):n?jsxRuntime.jsx("div",{ref:f,className:`docx-response-preview docx-response-preview-error ${x}`,style:H,children:jsxRuntime.jsxs("div",{style:{padding:"16px"},children:[jsxRuntime.jsx("div",{style:{padding:"12px",background:"var(--doc-error-bg)",borderRadius:"4px",color:"var(--doc-error)",fontSize:"13px",marginBottom:"16px"},children:n}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"8px",justifyContent:"flex-end"},children:[c&&jsxRuntime.jsxs("button",{type:"button",onClick:c,style:{display:"flex",alignItems:"center",gap:"4px",padding:"8px 16px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"13px"},children:[jsxRuntime.jsx(co,{}),"Retry"]}),jsxRuntime.jsx("button",{type:"button",onClick:a,style:{padding:"8px 16px",border:"none",borderRadius:"4px",background:"var(--doc-border)",cursor:"pointer",fontSize:"13px"},children:"Close"})]})]})}):!t||!l?null:jsxRuntime.jsxs("div",{ref:f,className:`docx-response-preview ${x}`,style:H,children:[jsxRuntime.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntime.jsxs("div",{style:{fontWeight:500,fontSize:"14px",color:"var(--doc-text)"},children:[chunkT2HQYRA7_cjs.e(o)," Result"]}),jsxRuntime.jsx("button",{type:"button",onClick:a,style:{display:"flex",padding:"4px",border:"none",background:"transparent",cursor:"pointer",color:"var(--doc-text-muted)"},title:"Close (Esc)",children:jsxRuntime.jsx(ct,{})})]}),jsxRuntime.jsxs("div",{style:{padding:"16px",overflowY:"auto",flex:1},children:[p?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:"Edit the result before accepting:"}),jsxRuntime.jsx("textarea",{ref:u,value:b,onChange:R=>v(R.target.value),style:{width:"100%",minHeight:"120px",padding:"12px",border:"1px solid var(--doc-primary)",borderRadius:"4px",fontSize:"14px",lineHeight:1.6,resize:"vertical",fontFamily:"inherit"}})]}):s?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:"Changes:"}),jsxRuntime.jsx(mo,{original:e,modified:l})]}):jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:"Original:"}),jsxRuntime.jsx("div",{style:{padding:"8px 12px",background:"var(--doc-bg-subtle)",borderRadius:"4px",marginBottom:"16px",textDecoration:"line-through",color:"var(--doc-text-placeholder)",fontSize:"13px"},children:e}),jsxRuntime.jsx("div",{style:{marginBottom:"8px",fontSize:"12px",color:"var(--doc-text-muted)"},children:"New:"}),jsxRuntime.jsx("div",{style:{padding:"8px 12px",background:"#e8f5e9",borderRadius:"4px",color:"#2e7d32",fontSize:"13px"},children:l})]}),t.warnings&&t.warnings.length>0&&jsxRuntime.jsx("div",{style:{marginTop:"16px",padding:"8px 12px",background:"var(--doc-warning-bg)",borderRadius:"4px",fontSize:"12px",color:"var(--doc-warning)"},children:t.warnings.map((R,D)=>jsxRuntime.jsx("div",{children:R},D))})]}),jsxRuntime.jsxs("div",{style:{padding:"12px 16px",borderTop:"1px solid var(--doc-border)",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[jsxRuntime.jsxs("div",{children:[d&&!p&&jsxRuntime.jsxs("button",{type:"button",onClick:C,style:{display:"flex",alignItems:"center",gap:"4px",padding:"6px 12px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"12px",color:"var(--doc-text-muted)"},children:[jsxRuntime.jsx(po,{}),"Edit"]}),p&&jsxRuntime.jsx("button",{type:"button",onClick:P,style:{padding:"6px 12px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"12px",color:"var(--doc-text-muted)"},children:"Cancel Edit"})]}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"8px"},children:[jsxRuntime.jsxs("button",{type:"button",onClick:a,style:{display:"flex",alignItems:"center",gap:"4px",padding:"8px 16px",border:"1px solid var(--doc-border-light)",borderRadius:"4px",background:"white",cursor:"pointer",fontSize:"13px",color:"var(--doc-text-muted)"},children:[jsxRuntime.jsx(ct,{}),"Reject"]}),jsxRuntime.jsxs("button",{type:"button",onClick:h,style:{display:"flex",alignItems:"center",gap:"4px",padding:"8px 16px",border:"none",borderRadius:"4px",background:"var(--doc-primary)",cursor:"pointer",fontSize:"13px",color:"white"},children:[jsxRuntime.jsx(lo,{}),"Accept"]})]})]})]})};function Fn(){let[e,t]=Qo.useState({isVisible:false,originalText:"",response:null,action:"rewrite",isLoading:false}),o=Qo.useCallback((a,c,d)=>{t({isVisible:true,originalText:a,response:null,action:c,isLoading:true,position:d});},[]),r=Qo.useCallback(a=>{t(c=>({...c,response:a,isLoading:false}));},[]),n=Qo.useCallback(a=>{t(c=>({...c,error:a,isLoading:false}));},[]),i=Qo.useCallback(()=>{t(a=>({...a,isVisible:false}));},[]);return {state:e,showPreview:o,setResponse:r,setError:n,hidePreview:i}}function zn(e,t){return {success:true,newText:e,warnings:t}}function Wn(e){return {success:false,error:e}}var pt=[{action:"cut",label:"Cut",shortcut:"Ctrl+X"},{action:"copy",label:"Copy",shortcut:"Ctrl+C"},{action:"paste",label:"Paste",shortcut:"Ctrl+V"},{action:"pasteAsPlainText",label:"Paste as Plain Text",shortcut:"Ctrl+Shift+V",dividerAfter:true},{action:"delete",label:"Delete",shortcut:"Del",dividerAfter:true},{action:"selectAll",label:"Select All",shortcut:"Ctrl+A"}],fo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"4",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"2",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M5.5 10.5L10.5 3M10.5 10.5L5.5 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),bo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"5",y:"5",width:"8",height:"9",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M11 5V3a1 1 0 00-1-1H4a1 1 0 00-1 1v8a1 1 0 001 1h2",stroke:"currentColor",strokeWidth:"1.5"})]}),ho=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"3",y:"3",width:"10",height:"11",rx:"1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 3V2a1 1 0 011-1h2a1 1 0 011 1v1",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M6 8h4M6 11h4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),vo=()=>jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),yo=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"1",stroke:"currentColor",strokeWidth:"1.5",strokeDasharray:"2 2"}),jsxRuntime.jsx("rect",{x:"4",y:"4",width:"8",height:"8",fill:"currentColor",opacity:"0.3"})]});function Co(e){switch(e){case "cut":return jsxRuntime.jsx(fo,{});case "copy":return jsxRuntime.jsx(bo,{});case "paste":case "pasteAsPlainText":return jsxRuntime.jsx(ho,{});case "delete":return jsxRuntime.jsx(vo,{});case "selectAll":return jsxRuntime.jsx(yo,{});default:return null}}var wo=({item:e,onClick:t,isHighlighted:o,onMouseEnter:r})=>e.action==="separator"?jsxRuntime.jsx("div",{className:"docx-text-context-menu-separator",style:{height:"1px",backgroundColor:"var(--doc-border)",margin:"4px 12px"}}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{type:"button",className:`docx-text-context-menu-item ${o?"docx-text-context-menu-item-highlighted":""} ${e.disabled?"docx-text-context-menu-item-disabled":""}`,onClick:t,onMouseEnter:r,disabled:e.disabled,role:"menuitem","aria-disabled":e.disabled,style:{display:"flex",alignItems:"center",gap:"10px",width:"100%",padding:"8px 12px",border:"none",background:o&&!e.disabled?"var(--doc-primary-light)":"transparent",cursor:e.disabled?"not-allowed":"pointer",fontSize:"13px",color:e.disabled?"var(--doc-text-subtle)":"var(--doc-text)",textAlign:"left",opacity:e.disabled?.6:1},children:[jsxRuntime.jsx("span",{style:{display:"flex",color:e.disabled?"var(--doc-border)":"var(--doc-text-muted)"},children:Co(e.action)}),jsxRuntime.jsx("span",{style:{flex:1},children:e.label}),e.shortcut&&jsxRuntime.jsx("span",{style:{fontSize:"11px",color:"var(--doc-text-subtle)",fontFamily:"monospace"},children:e.shortcut})]}),e.dividerAfter&&jsxRuntime.jsx("div",{className:"docx-text-context-menu-separator",style:{height:"1px",backgroundColor:"var(--doc-border)",margin:"4px 12px"}})]}),Vn=({isOpen:e,position:t,hasSelection:o,isEditable:r,hasClipboardContent:n=true,onAction:i,onClose:a,items:c,className:d=""})=>{let s=Qo.useRef(null),[x,m]=Qo.useState(0),p=(c||pt).map(u=>{let f=(()=>{if(u.disabled!==void 0)return u.disabled;switch(u.action){case "cut":case "copy":case "delete":return !o;case "paste":case "pasteAsPlainText":return !r||!n;default:return false}})();return {...u,disabled:f}}),g=p.filter(u=>u.action!=="separator");Qo.useEffect(()=>{if(!e)return;let u=l=>{s.current&&!s.current.contains(l.target)&&a();},f=setTimeout(()=>{document.addEventListener("mousedown",u);},0);return ()=>{clearTimeout(f),document.removeEventListener("mousedown",u);}},[e,a]),Qo.useEffect(()=>{if(!e)return;let u=f=>{switch(f.key){case "Escape":f.preventDefault(),a();break;case "ArrowDown":f.preventDefault(),m(h=>{let C=(h+1)%g.length;for(;g[C]?.disabled&&C!==h;)C=(C+1)%g.length;return C});break;case "ArrowUp":f.preventDefault(),m(h=>{let C=(h-1+g.length)%g.length;for(;g[C]?.disabled&&C!==h;)C=(C-1+g.length)%g.length;return C});break;case "Enter":f.preventDefault();let l=g[x];l&&!l.disabled&&(i(l.action),a());break}};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,x,g,i,a]),Qo.useEffect(()=>{e&&m(0);},[e]);let b=Qo.useCallback(()=>{let f=p.length*36+16,l=t.x,h=t.y;return typeof window<"u"&&(l+220>window.innerWidth&&(l=window.innerWidth-220-10),h+f>window.innerHeight&&(h=window.innerHeight-f-10),l<10&&(l=10),h<10&&(h=10)),{position:"fixed",top:h,left:l,minWidth:220,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",zIndex:1e4,padding:"4px 0",overflow:"hidden"}},[t,p.length]),v=u=>{u.disabled||(i(u.action),a());};return e?jsxRuntime.jsx("div",{ref:s,className:`docx-text-context-menu ${d}`,style:b(),role:"menu","aria-label":"Text editing menu",children:p.map((u,f)=>{let l=g.findIndex(h=>h===u);return jsxRuntime.jsx(wo,{item:u,onClick:()=>v(u),isHighlighted:l===x,onMouseEnter:()=>{l>=0&&!u.disabled&&m(l);}},`${u.action}-${f}`)})}):null};function $n(e={}){let{enabled:t=true,isEditable:o=true,containerRef:r,onAction:n}=e,[i,a]=Qo.useState(false),[c,d]=Qo.useState({x:0,y:0}),[s,x]=Qo.useState(false),m=Qo.useCallback(()=>{let u=window.getSelection(),f=u&&!u.isCollapsed&&u.toString().length>0;return x(!!f),!!f},[]),p=Qo.useCallback(u=>{t&&(u.preventDefault(),u.stopPropagation(),m(),d({x:u.clientX,y:u.clientY}),a(true));},[t,m]),g=Qo.useCallback(()=>{a(false);},[]),b=Qo.useCallback(u=>{switch(g(),u){case "cut":document.execCommand("cut");break;case "copy":document.execCommand("copy");break;case "paste":document.execCommand("paste");break;case "pasteAsPlainText":navigator.clipboard.readText?.().then(f=>{document.execCommand("insertText",false,f);}).catch(()=>{document.execCommand("paste");});break;case "delete":document.execCommand("delete");break;case "selectAll":document.execCommand("selectAll");break}n?.(u);},[g,n]),v=Qo.useCallback(u=>{p(u);},[p]);return Qo.useEffect(()=>{if(!i)return;let u=f=>{f.key==="Escape"&&g();};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[i,g]),{isOpen:i,position:c,hasSelection:s,openMenu:p,closeMenu:g,handleAction:b,onContextMenu:v}}function Gn(e){return {cut:"Cut",copy:"Copy",paste:"Paste",pasteAsPlainText:"Paste as Plain Text",selectAll:"Select All",delete:"Delete",separator:""}[e]}function jn(e){return {cut:"Ctrl+X",copy:"Ctrl+C",paste:"Ctrl+V",pasteAsPlainText:"Ctrl+Shift+V",selectAll:"Ctrl+A",delete:"Del",separator:""}[e]}function Zn(){return [...pt]}function Xn(e,t,o){switch(e){case "cut":case "copy":case "delete":return t;case "paste":case "pasteAsPlainText":return o;case "selectAll":return true;default:return true}}var ko={includeHeaders:true,includeFooters:true,includePageNumbers:true,pageRange:null,scale:1,printBackground:true,margins:"default"};function qn({onPrint:e,disabled:t=false,label:o="Print",className:r="",style:n,showIcon:i=true,compact:a=false}){let c={display:"flex",alignItems:"center",gap:a?"4px":"6px",padding:a?"4px 8px":"6px 12px",fontSize:a?"13px":"14px",backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:"4px",cursor:t?"not-allowed":"pointer",color:t?"var(--doc-text-muted)":"var(--doc-text)",opacity:t?.6:1,transition:"background-color 0.15s, border-color 0.15s",...n};return jsxRuntime.jsxs("button",{className:`docx-print-button ${r}`.trim(),style:c,onClick:e,disabled:t,"aria-label":o,title:o,children:[i&&jsxRuntime.jsx(To,{size:a?14:16}),!a&&jsxRuntime.jsx("span",{children:o})]})}function ei(){return jsxRuntime.jsx("style",{children:`
7
- @media print {
8
- /* Hide everything except print content */
9
- body * {
10
- visibility: hidden;
11
- }
12
-
13
- .docx-print-pages,
14
- .docx-print-pages * {
15
- visibility: visible;
16
- }
17
-
18
- .docx-print-pages {
19
- position: absolute;
20
- left: 0;
21
- top: 0;
22
- }
23
-
24
- /* Remove shadows and margins in print */
25
- .docx-print-page {
26
- box-shadow: none !important;
27
- margin: 0 !important;
28
- page-break-after: always;
29
- page-break-inside: avoid;
30
- }
31
-
32
- /* Ensure images print */
33
- img {
34
- max-width: 100%;
35
- page-break-inside: avoid;
36
- }
37
-
38
- /* Ensure tables don't break badly */
39
- table {
40
- page-break-inside: avoid;
41
- }
42
-
43
- tr {
44
- page-break-inside: avoid;
45
- }
46
-
47
- /* Keep headings with content */
48
- h1, h2, h3, h4, h5, h6 {
49
- page-break-after: avoid;
50
- }
51
-
52
- /* Avoid orphan lines */
53
- p {
54
- orphans: 3;
55
- widows: 3;
56
- }
57
- }
58
-
59
- @page {
60
- margin: 0;
61
- size: auto;
62
- }
63
- `})}function To({size:e=18}){return jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsxRuntime.jsx("polyline",{points:"6 9 6 2 18 2 18 9"}),jsxRuntime.jsx("path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"}),jsxRuntime.jsx("rect",{x:"6",y:"14",width:"12",height:"8"})]})}function ti(){window.print();}function oi(e="Document",t){let o=window.open("","_blank");return o?(o.document.write(`
64
- <!DOCTYPE html>
65
- <html>
66
- <head>
67
- <title>${e}</title>
68
- <style>
69
- @media print {
70
- body {
71
- margin: 0;
72
- padding: 0;
73
- }
74
- @page {
75
- margin: 0;
76
- }
77
- }
78
- </style>
79
- </head>
80
- <body>
81
- ${t}
82
- </body>
83
- </html>
84
- `),o.document.close(),o):null}function ri(){return {...ko}}function ni(e,t){if(!e||!e.trim())return null;let o=e.trim();if(/^\d+$/.test(o)){let n=parseInt(o,10);return n>=1&&n<=t?{start:n,end:n}:null}let r=o.match(/^(\d+)-(\d+)$/);if(r){let n=parseInt(r[1],10),i=parseInt(r[2],10);return n>=1&&i<=t&&n<=i?{start:n,end:i}:null}return null}function ii(e,t){return e?e.start===e.end?`Page ${e.start}`:`Pages ${e.start}-${e.end}`:`All (${t} pages)`}function ai(){return typeof window<"u"&&typeof window.print=="function"}function xi({onAction:e,disabled:t=false,canMerge:o=false,canSplit:r=false}){let n=Qo.useCallback(s=>{s.preventDefault(),s.stopPropagation();},[]),i=Qo.useCallback(()=>{o&&e("mergeCells");},[e,o]),a=Qo.useCallback(()=>{r&&e("splitCell");},[e,r]),c=jsxRuntime.jsx(chunkPANKMCFX_cjs.h,{content:"Merge cells",children:jsxRuntime.jsx(chunkPANKMCFX_cjs.c,{variant:"ghost",size:"icon-sm",className:chunkPANKMCFX_cjs.a("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",(t||!o)&&"opacity-30 cursor-not-allowed"),onMouseDown:n,onClick:i,disabled:t||!o,"aria-label":"Merge cells","data-testid":"toolbar-table-merge",children:jsxRuntime.jsx(chunkPANKMCFX_cjs.d,{name:"call_merge",size:20})})}),d=jsxRuntime.jsx(chunkPANKMCFX_cjs.h,{content:"Split cell",children:jsxRuntime.jsx(chunkPANKMCFX_cjs.c,{variant:"ghost",size:"icon-sm",className:chunkPANKMCFX_cjs.a("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",(t||!r)&&"opacity-30 cursor-not-allowed"),onMouseDown:n,onClick:a,disabled:t||!r,"aria-label":"Split cell","data-testid":"toolbar-table-split",children:jsxRuntime.jsx(chunkPANKMCFX_cjs.d,{name:"call_split",size:20})})});return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[c,d]})}var Po=[{action:"addRowAbove",icon:"keyboard_arrow_up",label:"Insert row above",testId:"toolbar-table-add-row-above"},{action:"addRowBelow",icon:"keyboard_arrow_down",label:"Insert row below",testId:"toolbar-table-add-row-below"},{action:"addColumnLeft",icon:"keyboard_arrow_left",label:"Insert column left",testId:"toolbar-table-add-col-left"},{action:"addColumnRight",icon:"keyboard_arrow_right",label:"Insert column right",testId:"toolbar-table-add-col-right"}];function ki({onAction:e,disabled:t=false}){let o=Qo.useCallback(r=>{r.preventDefault(),r.stopPropagation();},[]);return jsxRuntime.jsx(jsxRuntime.Fragment,{children:Po.map(({action:r,icon:n,label:i,testId:a})=>jsxRuntime.jsx(chunkPANKMCFX_cjs.h,{content:i,children:jsxRuntime.jsx(chunkPANKMCFX_cjs.c,{variant:"ghost",size:"icon-sm",className:chunkPANKMCFX_cjs.a("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",t&&"opacity-30 cursor-not-allowed"),onMouseDown:o,onClick:()=>!t&&e(r),disabled:t,"aria-label":i,"data-testid":a,children:jsxRuntime.jsx(chunkPANKMCFX_cjs.d,{name:n,size:20})})},typeof r=="string"?r:r.type))})}var N={container:{position:"relative",display:"inline-block"},button:{display:"flex",alignItems:"center",justifyContent:"center",padding:"4px 8px",border:"1px solid #d0d0d0",borderRadius:"3px",backgroundColor:"#fff",cursor:"pointer",fontSize:"12px",gap:"4px",minWidth:"32px",height:"28px",transition:"background-color 0.15s, border-color 0.15s"},buttonHover:{borderColor:"#1a73e8",backgroundColor:"#f0f7ff"},buttonDisabled:{opacity:.5,cursor:"not-allowed"},colorIndicator:{width:"16px",height:"16px",border:"1px solid #ccc",borderRadius:"2px"},dropdown:{position:"absolute",top:"100%",left:"0",marginTop:"4px",padding:"8px",backgroundColor:"#fff",border:"1px solid #e0e0e0",borderRadius:"4px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)",zIndex:1e3,minWidth:"180px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",marginBottom:"8px"},colorCell:{width:"24px",height:"24px",border:"1px solid #ccc",borderRadius:"2px",cursor:"pointer",transition:"transform 0.1s, box-shadow 0.1s"},colorCellHover:{transform:"scale(1.1)",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)"},colorCellSelected:{border:"2px solid #1a73e8"},noFillButton:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"6px 8px",border:"none",borderRadius:"3px",backgroundColor:"transparent",cursor:"pointer",fontSize:"12px",color:"#333",transition:"background-color 0.15s"},noFillButtonHover:{backgroundColor:"#f0f0f0"},separator:{height:"1px",backgroundColor:"#e0e0e0",margin:"8px 0"},customColorRow:{display:"flex",alignItems:"center",gap:"8px"},customColorInput:{width:"40px",height:"28px",padding:"0",border:"1px solid #ccc",borderRadius:"3px",cursor:"pointer"},customColorLabel:{fontSize:"11px",color:"#666"}};function Ao(){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M2 12L6.5 2.5L11 7L7 11H13V13H2V12Z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),jsxRuntime.jsx("circle",{cx:"13",cy:"10",r:"2",fill:"currentColor"})]})}function Oo(){return jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"12",height:"12",stroke:"#ccc",strokeWidth:"1",fill:"none"}),jsxRuntime.jsx("line",{x1:"2",y1:"14",x2:"14",y2:"2",stroke:"#d32f2f",strokeWidth:"1.5"})]})}var Ae=[{hex:"#FFFFFF",name:"White"},{hex:"#F2F2F2",name:"Light Gray 1"},{hex:"#D9D9D9",name:"Light Gray 2"},{hex:"#BFBFBF",name:"Gray"},{hex:"#808080",name:"Dark Gray"},{hex:"#000000",name:"Black"},{hex:"#E6F3FF",name:"Light Blue 1"},{hex:"#CCE5FF",name:"Light Blue 2"},{hex:"#99CCFF",name:"Light Blue 3"},{hex:"#4DA6FF",name:"Blue"},{hex:"#0066CC",name:"Dark Blue"},{hex:"#003366",name:"Navy"},{hex:"#E6FFE6",name:"Light Green 1"},{hex:"#CCFFCC",name:"Light Green 2"},{hex:"#99FF99",name:"Light Green 3"},{hex:"#33CC33",name:"Green"},{hex:"#009900",name:"Dark Green"},{hex:"#006600",name:"Forest"},{hex:"#FFFFCC",name:"Light Yellow"},{hex:"#FFFF99",name:"Yellow"},{hex:"#FFE066",name:"Gold"},{hex:"#FFCC00",name:"Orange Yellow"},{hex:"#FF9900",name:"Orange"},{hex:"#CC6600",name:"Dark Orange"},{hex:"#FFE6E6",name:"Light Pink"},{hex:"#FFCCCC",name:"Pink"},{hex:"#FF9999",name:"Light Red"},{hex:"#FF6666",name:"Red"},{hex:"#CC0000",name:"Dark Red"},{hex:"#660000",name:"Maroon"},{hex:"#F2E6FF",name:"Light Purple 1"},{hex:"#E6CCFF",name:"Light Purple 2"},{hex:"#CC99FF",name:"Light Purple 3"},{hex:"#9933FF",name:"Purple"},{hex:"#6600CC",name:"Dark Purple"},{hex:"#330066",name:"Indigo"}];function Pi({value:e,onChange:t,colors:o=Ae,disabled:r=false,className:n,style:i,showNoFill:a=true,showCustomColor:c=true,compact:d=false}){let[s,x]=Qo.useState(false),[m,p]=Qo.useState(false),[g,b]=Qo.useState(null),[v,u]=Qo.useState(false),f=Qo.useRef(null);Qo.useEffect(()=>{let T=y=>{f.current&&!f.current.contains(y.target)&&x(false);};return s&&document.addEventListener("mousedown",T),()=>{document.removeEventListener("mousedown",T);}},[s]);let l=Qo.useCallback(()=>{r||x(T=>!T);},[r]),h=Qo.useCallback(T=>{t?.(T),x(false);},[t]),C=Qo.useCallback(()=>{t?.(null),x(false);},[t]),P=Qo.useCallback(T=>{t?.(T.target.value);},[t]),H={...N.button,...m&&!r?N.buttonHover:{},...r?N.buttonDisabled:{},...d?{padding:"2px 4px",minWidth:"28px",height:"24px"}:{}},R={...N.colorIndicator,backgroundColor:e||"transparent",...e===null?{background:"repeating-linear-gradient(45deg, #fff, #fff 2px, #f0f0f0 2px, #f0f0f0 4px)"}:{}},D=["docx-cell-background-picker"];return n&&D.push(n),d&&D.push("docx-cell-background-picker-compact"),jsxRuntime.jsxs("div",{ref:f,className:D.join(" "),style:{...N.container,...i},children:[jsxRuntime.jsxs("button",{type:"button",style:H,onClick:l,onMouseEnter:()=>p(true),onMouseLeave:()=>p(false),disabled:r,title:"Cell Background Color","aria-label":"Cell Background Color","aria-haspopup":"true","aria-expanded":s,children:[jsxRuntime.jsx(Ao,{}),jsxRuntime.jsx("div",{style:R})]}),s&&jsxRuntime.jsxs("div",{style:N.dropdown,children:[a&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("button",{type:"button",style:{...N.noFillButton,...v?N.noFillButtonHover:{}},onClick:C,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),children:[jsxRuntime.jsx(Oo,{}),jsxRuntime.jsx("span",{children:"No Fill"})]}),jsxRuntime.jsx("div",{style:N.separator})]}),jsxRuntime.jsx("div",{style:N.colorGrid,children:o.map(T=>jsxRuntime.jsx("button",{type:"button",style:{...N.colorCell,backgroundColor:T.hex,...g===T.hex?N.colorCellHover:{},...e===T.hex?N.colorCellSelected:{}},onClick:()=>h(T.hex),onMouseEnter:()=>b(T.hex),onMouseLeave:()=>b(null),title:T.name,"aria-label":T.name},T.hex))}),c&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:N.separator}),jsxRuntime.jsxs("div",{style:N.customColorRow,children:[jsxRuntime.jsx("input",{type:"color",value:e||"#FFFFFF",onChange:P,style:N.customColorInput,title:"Custom Color"}),jsxRuntime.jsx("span",{style:N.customColorLabel,children:"Custom color"})]})]})]})]})}function Li(){return Ae}function Di(e,t){return {hex:e.toUpperCase(),name:t||e}}function Mi(e){return Ae.some(t=>t.hex.toUpperCase()===e.toUpperCase())}function Ai(e){return Ae.find(o=>o.hex.toUpperCase()===e.toUpperCase())?.name||e}function Oi(e){if(e)return {fill:{rgb:e.replace("#","")},pattern:"clear"}}function _i(e){return !e||!e.fill?null:e.fill.rgb?`#${e.fill.rgb}`:null}function _o(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function Ni(e){let t=_o(e);return t?(.299*t.r+.587*t.g+.114*t.b)/255>.5?"#000000":"#FFFFFF":"#000000"}var No="var(--doc-error)",Bo="var(--doc-success)",Fo="You have unsaved changes. Are you sure you want to leave?",zo=({size:e=16})=>jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M3 2h8l2 2v9a1 1 0 01-1 1H3a1 1 0 01-1-1V3a1 1 0 011-1z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M5 2v4h5V2",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),jsxRuntime.jsx("path",{d:"M5 14v-4h6v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Wo=({size:e=16})=>jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("path",{d:"M8 5v4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),jsxRuntime.jsx("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor"})]}),Ho=`
85
- @keyframes docx-unsaved-pulse {
86
- 0%, 100% { opacity: 1; }
87
- 50% { opacity: 0.6; }
88
- }
89
- `,Uo=(e,t,o,r,n,i,a)=>{let c={display:"inline-flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease",animation:o&&r?"docx-unsaved-pulse 2s ease-in-out infinite":"none"};switch(t==="absolute-top-right"?(c.position="absolute",c.top="4px",c.right="4px"):t==="absolute-top-left"&&(c.position="absolute",c.top="4px",c.left="4px"),e){case "dot":return {...c,width:`${a}px`,height:`${a}px`,borderRadius:"50%",backgroundColor:o?n:i};case "badge":return {...c,padding:"2px 8px",borderRadius:"10px",fontSize:"11px",fontWeight:500,backgroundColor:o?n:i,color:"white"};case "text":return {...c,fontSize:"12px",color:o?n:i,fontWeight:500};case "icon":return {...c,color:o?n:i};default:return c}},Hi=({hasUnsavedChanges:e,variant:t="dot",position:o="inline",showPulse:r=true,label:n="Unsaved",savedLabel:i="Saved",showWhenSaved:a=false,unsavedColor:c=No,savedColor:d=Bo,size:s=8,className:x="",style:m,onClick:p,title:g})=>{if(Qo.useEffect(()=>{if(!r||!e)return;let l="docx-unsaved-pulse-keyframes";if(!document.getElementById(l)){let h=document.createElement("style");h.id=l,h.textContent=Ho,document.head.appendChild(h);}},[r,e]),!e&&!a)return null;let v={...Uo(t,o,e,r,c,d,s),...m,cursor:p?"pointer":void 0},u=e?"Document has unsaved changes":"All changes saved",f=()=>{switch(t){case "dot":return null;case "badge":return e?n:i;case "text":return e?n:i;case "icon":return e?jsxRuntime.jsx(Wo,{size:s}):jsxRuntime.jsx(zo,{size:s});default:return null}};return jsxRuntime.jsx("span",{className:`docx-unsaved-indicator docx-unsaved-indicator-${t} ${e?"docx-unsaved":"docx-saved"} ${x}`,style:v,onClick:p,title:g??u,role:p?"button":"status","aria-label":e?"Unsaved changes":"All changes saved",children:f()})};function Ui(e={}){let{document:t,warnBeforeLeave:o=true,warningMessage:r=Fo,enabled:n=true,onChangeStatusChange:i}=e,[a,c]=Qo.useState(false),[d,s]=Qo.useState(0),[x,m]=Qo.useState(null),p=Qo.useRef(null),g=Qo.useRef(false),b=Qo.useCallback(l=>{if(!l)return null;try{return JSON.stringify(l.package)}catch{return null}},[]),v=Qo.useCallback(()=>{n&&(c(false),s(0),m(t??null),p.current=b(t));},[n,t,b]),u=Qo.useCallback(()=>{n&&(a||(c(true),i?.(true)),s(l=>l+1));},[n,a,i]),f=Qo.useCallback(l=>{let h=l!==void 0?l:t;c(false),s(0),m(h??null),p.current=b(h),g.current=true;},[t,b]);return Qo.useEffect(()=>{!n||!t||g.current||f(t);},[n,t,f]),Qo.useEffect(()=>{if(!n||!t||!g.current)return;let l=b(t),h=p.current;if(l!==h){let C=b(x);l!==C?(a||(c(true),i?.(true)),s(P=>P+1)):a&&(c(false),i?.(false)),p.current=l;}},[n,t,x,a,b,i]),Qo.useEffect(()=>{if(!n||!o||!a)return;let l=h=>(h.preventDefault(),h.returnValue=r,r);return window.addEventListener("beforeunload",l),()=>window.removeEventListener("beforeunload",l)},[n,o,a,r]),{hasUnsavedChanges:a,markAsSaved:v,markAsChanged:u,resetTracking:f,lastSavedDocument:x,changeCount:d}}function Yi(e){return {dot:"Dot",badge:"Badge",text:"Text",icon:"Icon"}[e]}function Ki(){return ["dot","badge","text","icon"]}function Vi(){return ["inline","absolute-top-right","absolute-top-left"]}function $i(){let e=0,t=null,o=false;return {markChanged:()=>{e++,o=true;},markSaved:()=>{o=false,t=new Date;},getState:()=>({changeCount:e,lastSaveTime:t,hasUnsavedChanges:o}),reset:()=>{e=0,t=null,o=false;}}}var Yo={small:{size:16,strokeWidth:2,fontSize:11},medium:{size:32,strokeWidth:3,fontSize:13},large:{size:48,strokeWidth:4,fontSize:14}},Ko="var(--doc-primary)",Vo=300,$o=`
90
- @keyframes docx-loading-spin {
91
- 0% { transform: rotate(0deg); }
92
- 100% { transform: rotate(360deg); }
93
- }
94
-
95
- @keyframes docx-loading-pulse {
96
- 0%, 100% { opacity: 1; transform: scale(1); }
97
- 50% { opacity: 0.5; transform: scale(0.95); }
98
- }
99
-
100
- @keyframes docx-loading-dots {
101
- 0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
102
- 40% { transform: scale(1); opacity: 1; }
103
- }
104
-
105
- @keyframes docx-loading-bar {
106
- 0% { left: -35%; right: 100%; }
107
- 60% { left: 100%; right: -90%; }
108
- 100% { left: 100%; right: -90%; }
109
- }
110
- `,Go=({size:e,strokeWidth:t,color:o})=>{let r=(e-t)/2,n=r*2*Math.PI;return jsxRuntime.jsxs("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,style:{animation:"docx-loading-spin 1s linear infinite"},children:[jsxRuntime.jsx("circle",{cx:e/2,cy:e/2,r,fill:"none",stroke:o,strokeWidth:t,strokeLinecap:"round",strokeDasharray:`${n*.75} ${n}`,opacity:.25}),jsxRuntime.jsx("circle",{cx:e/2,cy:e/2,r,fill:"none",stroke:o,strokeWidth:t,strokeLinecap:"round",strokeDasharray:`${n*.25} ${n}`,transform:`rotate(-90 ${e/2} ${e/2})`})]})},jo=({size:e,color:t})=>{let o=e/4,r=o/2;return jsxRuntime.jsx("div",{style:{display:"flex",gap:`${r}px`},children:[0,1,2].map(n=>jsxRuntime.jsx("div",{style:{width:o,height:o,borderRadius:"50%",backgroundColor:t,animation:`docx-loading-dots 1.4s ease-in-out ${n*.16}s infinite both`}},n))})},Zo=({size:e,color:t})=>jsxRuntime.jsx("div",{style:{width:e*3,height:e/4,backgroundColor:`${t}20`,borderRadius:e/8,overflow:"hidden",position:"relative"},children:jsxRuntime.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,right:0,backgroundColor:t,borderRadius:e/8,animation:"docx-loading-bar 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"}})}),Xo=({size:e,color:t})=>jsxRuntime.jsx("div",{style:{width:e,height:e,borderRadius:"50%",backgroundColor:t,animation:"docx-loading-pulse 1.5s ease-in-out infinite"}}),Jo=({size:e,color:t,progress:o,showText:r,fontSize:n})=>{let i=Math.max(0,Math.min(100,o));return jsxRuntime.jsxs("div",{style:{width:e*3,height:e/4,backgroundColor:`${t}20`,borderRadius:e/8,overflow:"hidden",position:"relative"},children:[jsxRuntime.jsx("div",{style:{position:"absolute",top:0,bottom:0,left:0,width:`${i}%`,backgroundColor:t,borderRadius:e/8,transition:"width 0.3s ease"}}),r&&jsxRuntime.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:n,fontWeight:500,color:i>50?"#fff":t},children:[Math.round(i),"%"]})]})},Ji=({isLoading:e,variant:t="spinner",size:o="medium",message:r,overlay:n=false,overlayOpacity:i=.5,progress:a=0,showProgressText:c=true,color:d=Ko,className:s="",style:x})=>{let m=Yo[o];if(Qo.useEffect(()=>{let b="docx-loading-keyframes";if(!document.getElementById(b)){let v=document.createElement("style");v.id=b,v.textContent=$o,document.head.appendChild(v);}},[]),!e)return null;let p=()=>{switch(t){case "spinner":return jsxRuntime.jsx(Go,{size:m.size,strokeWidth:m.strokeWidth,color:d});case "dots":return jsxRuntime.jsx(jo,{size:m.size,color:d});case "bar":return jsxRuntime.jsx(Zo,{size:m.size,color:d});case "pulse":return jsxRuntime.jsx(Xo,{size:m.size,color:d});case "progress":return jsxRuntime.jsx(Jo,{size:m.size,color:d,progress:a,showText:c,fontSize:m.fontSize});default:return null}},g=jsxRuntime.jsxs("div",{className:`docx-loading-content ${s}`,style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12px",...x},children:[p(),r&&jsxRuntime.jsx("div",{style:{fontSize:m.fontSize,color:n?"white":"var(--doc-text-muted)",textAlign:"center"},children:r})]});return n?jsxRuntime.jsx("div",{className:`docx-loading-overlay ${s}`,style:{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`rgba(0, 0, 0, ${i})`,zIndex:1e4,...x},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t==="progress"?a:void 0,"aria-busy":"true","aria-label":r||"Loading",children:g}):jsxRuntime.jsx("div",{className:`docx-loading-inline ${s}`,style:{display:"inline-flex",alignItems:"center",...x},role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t==="progress"?a:void 0,"aria-busy":"true","aria-label":r||"Loading",children:g})};function Qi(e={}){let{initialLoading:t=false,minDuration:o=Vo,onStart:r,onEnd:n}=e,[i,a]=Qo.useState(t),[c,d]=Qo.useState(null),[s,x]=Qo.useState(0),m=Qo.useRef(null),p=Qo.useRef(null),g=Qo.useCallback(u=>{m.current=Date.now(),a(true),d(u||null),x(0),r?.();},[r]),b=Qo.useCallback(()=>{let u=m.current,f=Date.now(),l=u?f-u:0,h=Math.max(0,o-l);h>0?p.current=setTimeout(()=>{a(false),d(null),x(0),m.current=null,n?.();},h):(a(false),d(null),x(0),m.current=null,n?.());},[o,n]),v=Qo.useCallback(async(u,f)=>{g(f);try{let l=await u();return b(),l}catch(l){throw b(),l}},[g,b]);return Qo.useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]),{isLoading:i,message:c,progress:s,startLoading:g,stopLoading:b,setProgress:x,setMessage:d,withLoading:v}}function qi(){let[e,t]=Qo.useState(new Map),o=Qo.useCallback((c,d)=>{t(s=>{let x=new Map(s);return x.set(c,{id:c,message:d,startTime:Date.now()}),x});},[]),r=Qo.useCallback((c,d)=>{t(s=>{let x=s.get(c);if(!x)return s;let m=new Map(s);return m.set(c,{...x,...d}),m});},[]),n=Qo.useCallback(c=>{t(d=>{let s=new Map(d);return s.delete(c),s});},[]),i=e.size>0;return {operations:Array.from(e.values()),isAnyLoading:i,startOperation:o,updateOperation:r,endOperation:n,getOperation:c=>e.get(c)}}function ea(e){return {spinner:"Spinner",dots:"Dots",bar:"Bar",pulse:"Pulse",progress:"Progress"}[e]}function ta(){return ["spinner","dots","bar","pulse","progress"]}function oa(){return ["small","medium","large"]}function ra(e){return new Promise(t=>setTimeout(t,e))}var vt=4,yt=36,tr=32,or=()=>jsxRuntime.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("circle",{cx:"3",cy:"8",r:"1.5",fill:"currentColor"}),jsxRuntime.jsx("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor"}),jsxRuntime.jsx("circle",{cx:"13",cy:"8",r:"1.5",fill:"currentColor"})]});function rr(e){let{containerRef:t,items:o,itemGap:r=vt,overflowButtonWidth:n=yt}=e,[i,a]=Qo.useState(o.length),c=Qo.useRef(new Map),d=Qo.useCallback(()=>{let m=t.current;if(!m){a(o.length);return}let p=m.offsetWidth;if(p===0)return;let g=[...o].sort((u,f)=>u.alwaysVisible&&!f.alwaysVisible?-1:!u.alwaysVisible&&f.alwaysVisible?1:(u.priority||3)-(f.priority||3)),b=0,v=0;for(let u of g){let l=(u.minWidth||c.current.get(u.id)||tr)+(v>0?r:0),h=v<o.length-1?n+r:0;if(b+l+h<=p)b+=l,v++;else if(u.alwaysVisible)b+=l,v++;else break}a(Math.max(0,v));},[t,o,r,n]);Qo.useLayoutEffect(()=>{let m=t.current;if(!m)return;d();let p=new ResizeObserver(()=>{d();});return p.observe(m),()=>{p.disconnect();}},[t,d]),Qo.useEffect(()=>{d();},[o,d]);let{visibleItems:s,overflowItems:x}=Qo.useMemo(()=>{let m=[...o].sort((p,g)=>p.alwaysVisible&&!g.alwaysVisible?-1:!p.alwaysVisible&&g.alwaysVisible?1:(p.priority||3)-(g.priority||3));return {visibleItems:m.slice(0,i),overflowItems:m.slice(i)}},[o,i]);return {visibleItems:s,overflowItems:x,hasOverflow:x.length>0,recalculate:d}}var nr=({items:e,isOpen:t,onClose:o,anchorRef:r})=>{let n=Qo.useRef(null);return Qo.useEffect(()=>{if(!t)return;let i=a=>{n.current&&!n.current.contains(a.target)&&r.current&&!r.current.contains(a.target)&&o();};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t,o,r]),Qo.useEffect(()=>{if(!t)return;let i=a=>{a.key==="Escape"&&o();};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t,o]),!t||e.length===0?null:jsxRuntime.jsx("div",{ref:n,className:"docx-responsive-toolbar-overflow-menu",style:{position:"absolute",top:"100%",right:0,marginTop:"4px",backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",padding:"8px",zIndex:1e3,display:"flex",flexWrap:"wrap",gap:"4px",maxWidth:"300px"},role:"menu",children:e.map(i=>jsxRuntime.jsx("div",{className:"docx-responsive-toolbar-overflow-item",role:"menuitem",children:i.content},i.id))})},sa=({items:e,overflowItems:t=[],alwaysShowOverflow:o=false,renderOverflowButton:r,renderOverflowMenu:n,itemGap:i=vt,padding:a="8px 12px",overflowButtonWidth:c=yt,className:d="",style:s,height:x=44,backgroundColor:m="var(--doc-toolbar-bg)",borderBottom:p="1px solid var(--doc-border)"})=>{let g=Qo.useRef(null),b=Qo.useRef(null),[v,u]=Qo.useState(false),{visibleItems:f,overflowItems:l,hasOverflow:h}=rr({containerRef:g,items:e,itemGap:i,overflowButtonWidth:c}),C=[...l,...t],P=h||o||t.length>0,H=Qo.useCallback(()=>{u(T=>!T);},[]),R=Qo.useCallback(()=>{u(false);},[]),D=jsxRuntime.jsx("button",{ref:b,type:"button",className:"docx-responsive-toolbar-overflow-button",onClick:H,"aria-label":`Show ${C.length} more options`,"aria-expanded":v,"aria-haspopup":"menu",style:{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:"32px",border:"none",borderRadius:"4px",backgroundColor:v?"var(--doc-primary-light)":"transparent",color:"var(--doc-text-muted)",cursor:"pointer",transition:"background-color 0.15s ease"},children:jsxRuntime.jsx(or,{})});return jsxRuntime.jsxs("div",{ref:g,className:`docx-responsive-toolbar ${d}`,style:{display:"flex",alignItems:"center",gap:`${i}px`,height:typeof x=="number"?`${x}px`:x,padding:a,backgroundColor:m,borderBottom:p,position:"relative",...s},children:[f.map(T=>jsxRuntime.jsxs(Qo__default.default.Fragment,{children:[jsxRuntime.jsx("div",{className:"docx-responsive-toolbar-item","data-item-id":T.id,style:{flexShrink:0},children:T.content}),T.separatorAfter&&jsxRuntime.jsx("div",{className:"docx-responsive-toolbar-separator",style:{width:"1px",height:"24px",backgroundColor:"var(--doc-border)",margin:"0 4px"}})]},T.id)),P&&jsxRuntime.jsx("div",{style:{flex:1,minWidth:0}}),P&&jsxRuntime.jsxs("div",{style:{position:"relative",flexShrink:0},children:[r?r(C.length,v,H):D,n?v&&n(C,R):jsxRuntime.jsx(nr,{items:C,isOpen:v,onClose:R,anchorRef:b})]})]})},la=({children:e,gap:t=2,separatorAfter:o=false,className:r="",style:n})=>jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{className:`docx-toolbar-group ${r}`,style:{display:"flex",alignItems:"center",gap:`${t}px`,...n},children:e}),o&&jsxRuntime.jsx("div",{className:"docx-toolbar-group-separator",style:{width:"1px",height:"24px",backgroundColor:"var(--doc-border)",margin:"0 4px"}})]});function da(e,t,o){return {id:e,content:t,priority:3,...o}}function ca(e){return e.map(t=>({...t,priority:t.priority||3}))}function pa(e){return {undo:1,redo:1,bold:1,italic:1,underline:2,fontFamily:2,fontSize:2,textColor:3,highlightColor:3,alignment:3,lists:4,indent:4,lineSpacing:5,styles:5}[e]||3}var sr={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},lr={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"320px",maxWidth:"400px",width:"100%",margin:"20px"},dr={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},cr={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},pr={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},ur={padding:"20px"},gr={display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"16px"},mr={display:"grid",gap:"2px",padding:"4px",backgroundColor:"var(--doc-bg-hover)",borderRadius:"4px",cursor:"pointer"},Et={width:"24px",height:"24px",backgroundColor:"white",border:"1px solid var(--doc-border-dark)",borderRadius:"2px",transition:"background-color 0.1s, border-color 0.1s"},xr={...Et,backgroundColor:"var(--doc-primary)",borderColor:"var(--doc-primary)"},fr={marginTop:"8px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},br={display:"flex",alignItems:"center",gap:"12px",margin:"16px 0",color:"var(--doc-text-muted)",fontSize:"12px"},wt={flex:1,height:"1px",backgroundColor:"var(--doc-border)"},St={display:"flex",alignItems:"center",gap:"12px",marginBottom:"12px"},kt={fontSize:"14px",fontWeight:500,color:"var(--doc-text)",minWidth:"80px"},Tt={width:"80px",padding:"8px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",textAlign:"center"},hr={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},Je={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},vr={...Je,backgroundColor:"var(--doc-primary)",color:"white"},yr={...Je,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},Cr={...Je,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function wr(){return jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"2",y:"2",width:"16",height:"16",stroke:"currentColor",strokeWidth:"1.5",fill:"none",rx:"1"}),jsxRuntime.jsx("line",{x1:"2",y1:"7",x2:"18",y2:"7",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("line",{x1:"2",y1:"12",x2:"18",y2:"12",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"18",stroke:"currentColor",strokeWidth:"1.5"}),jsxRuntime.jsx("line",{x1:"13",y1:"2",x2:"13",y2:"18",stroke:"currentColor",strokeWidth:"1.5"})]})}function fa({isOpen:e,onClose:t,onInsert:o,maxGridRows:r=8,maxGridColumns:n=10,maxRows:i=100,maxColumns:a=20,className:c,style:d}){let[s,x]=Qo.useState(0),[m,p]=Qo.useState(0),[g,b]=Qo.useState(3),[v,u]=Qo.useState(3),f=Qo.useRef(null);Qo.useEffect(()=>{e&&(x(0),p(0),b(3),u(3));},[e]),Qo.useEffect(()=>{e&&f.current?.focus();},[e]);let l=Qo.useCallback((I,M)=>{x(I),p(M);},[]),h=Qo.useCallback(()=>{s>0&&m>0&&o({rows:s,columns:m});},[s,m,o]),C=Qo.useCallback(()=>{let I=Math.min(Math.max(1,g),i),M=Math.min(Math.max(1,v),a);o({rows:I,columns:M});},[g,v,i,a,o]),P=Qo.useCallback(I=>{I.key==="Escape"?t():I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),C());},[t,C]),H=Qo.useCallback(I=>{I.target===I.currentTarget&&t();},[t]),R=Qo.useCallback(I=>{let M=parseInt(I.target.value,10);isNaN(M)?I.target.value===""&&b(1):b(Math.min(Math.max(1,M),i));},[i]),D=Qo.useCallback(I=>{let M=parseInt(I.target.value,10);isNaN(M)?I.target.value===""&&u(1):u(Math.min(Math.max(1,M),a));},[a]);if(!e)return null;let T=[];for(let I=1;I<=r;I++)for(let M=1;M<=n;M++){let Ee=I<=s&&M<=m;T.push(jsxRuntime.jsx("div",{style:Ee?xr:Et,onMouseEnter:()=>l(I,M),onClick:h,role:"gridcell","aria-selected":Ee},`${I}-${M}`));}let y=g>=1&&v>=1,j=s>0&&m>0?`${m} x ${s} Table`:"Hover to select size";return jsxRuntime.jsx("div",{className:`docx-insert-table-dialog-overlay ${c||""}`,style:{...sr,...d},onClick:H,onKeyDown:P,role:"dialog","aria-modal":"true","aria-labelledby":"insert-table-dialog-title",children:jsxRuntime.jsxs("div",{ref:f,className:"docx-insert-table-dialog",style:lr,tabIndex:-1,children:[jsxRuntime.jsxs("div",{className:"docx-insert-table-dialog-header",style:dr,children:[jsxRuntime.jsx("h2",{id:"insert-table-dialog-title",style:cr,children:jsxRuntime.jsxs("span",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[jsxRuntime.jsx(wr,{}),"Insert Table"]})}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-table-dialog-close",style:pr,onClick:t,"aria-label":"Close dialog",children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-dialog-body",style:ur,children:[jsxRuntime.jsxs("div",{className:"docx-insert-table-grid-container",style:gr,children:[jsxRuntime.jsx("div",{className:"docx-insert-table-grid",style:{...mr,gridTemplateColumns:`repeat(${n}, 1fr)`},onMouseLeave:()=>{x(0),p(0);},role:"grid","aria-label":"Table size selector",children:T}),jsxRuntime.jsx("div",{className:"docx-insert-table-grid-label",style:fr,children:j})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-separator",style:br,children:[jsxRuntime.jsx("div",{style:wt}),jsxRuntime.jsx("span",{children:"or specify size"}),jsxRuntime.jsx("div",{style:wt})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-inputs",children:[jsxRuntime.jsxs("div",{style:St,children:[jsxRuntime.jsx("label",{htmlFor:"insert-table-rows",style:kt,children:"Rows:"}),jsxRuntime.jsx("input",{id:"insert-table-rows",type:"number",min:1,max:i,value:g,onChange:R,style:Tt})]}),jsxRuntime.jsxs("div",{style:St,children:[jsxRuntime.jsx("label",{htmlFor:"insert-table-cols",style:kt,children:"Columns:"}),jsxRuntime.jsx("input",{id:"insert-table-cols",type:"number",min:1,max:a,value:v,onChange:D,style:Tt})]})]})]}),jsxRuntime.jsxs("div",{className:"docx-insert-table-dialog-footer",style:hr,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-insert-table-dialog-cancel",style:yr,onClick:t,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-table-dialog-insert",style:y?vr:Cr,onClick:C,disabled:!y,children:"Insert Table"})]})]})})}function ba(){let[e,t]=Qo.useState(false),o=Qo.useCallback(()=>t(true),[]),r=Qo.useCallback(()=>t(false),[]),n=Qo.useCallback(()=>t(i=>!i),[]);return {isOpen:e,open:o,close:r,toggle:n}}function ha(e=3,t=3){return {rows:e,columns:t}}function va(e,t=100,o=20){return e.rows>=1&&e.rows<=t&&e.columns>=1&&e.columns<=o}function ya(e,t=100,o=20){return {rows:Math.min(Math.max(1,e.rows),t),columns:Math.min(Math.max(1,e.columns),o)}}function Ca(e){return `${e.columns} x ${e.rows}`}function wa(){return [{label:"2 x 2",config:{rows:2,columns:2}},{label:"3 x 3",config:{rows:3,columns:3}},{label:"4 x 4",config:{rows:4,columns:4}},{label:"2 x 4",config:{rows:2,columns:4}},{label:"4 x 2",config:{rows:4,columns:2}},{label:"5 x 5",config:{rows:5,columns:5}}]}var kr={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Tr={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"450px",maxWidth:"600px",width:"100%",margin:"20px",maxHeight:"90vh",overflow:"auto"},Er={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},Ir={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},Rr={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},Pr={padding:"20px"},Qe={border:"2px dashed var(--doc-border-input)",borderRadius:"8px",padding:"40px 20px",textAlign:"center",cursor:"pointer",transition:"border-color 0.2s, background-color 0.2s",marginBottom:"16px"},Lr={...Qe,borderColor:"var(--doc-primary)",backgroundColor:"var(--doc-primary-light)"},Dr={...Qe,padding:"20px",borderStyle:"solid",borderColor:"var(--doc-primary)"},Mr={display:"flex",justifyContent:"center",alignItems:"center",maxHeight:"250px",overflow:"hidden"},Ar={maxWidth:"100%",maxHeight:"250px",objectFit:"contain",borderRadius:"4px"},Or={fontSize:"48px",color:"var(--doc-text-placeholder)",marginBottom:"12px"},_r={fontSize:"14px",color:"var(--doc-text-muted)",marginBottom:"8px"},Nr={fontSize:"12px",color:"var(--doc-text-placeholder)"},Rt={marginBottom:"16px"},Pt={display:"block",marginBottom:"6px",fontSize:"14px",fontWeight:500,color:"var(--doc-text)"},Br={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",boxSizing:"border-box"},Fr={display:"flex",alignItems:"center",gap:"12px"},Lt={width:"100px",padding:"8px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",textAlign:"center"},Mt={padding:"6px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",backgroundColor:"white",cursor:"pointer",fontSize:"16px"},zr={...Mt,backgroundColor:"var(--doc-primary)",borderColor:"var(--doc-primary)",color:"white"},Wr={fontSize:"12px",color:"var(--doc-text-muted)",marginTop:"8px",textAlign:"center"},Hr={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},qe={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},Ur={...qe,backgroundColor:"var(--doc-primary)",color:"white"},Yr={...qe,backgroundColor:"var(--doc-bg-subtle)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},Kr={...qe,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"};function Vr(){return jsxRuntime.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("rect",{x:"6",y:"10",width:"36",height:"28",rx:"2",stroke:"var(--doc-text-placeholder)",strokeWidth:"2",fill:"none"}),jsxRuntime.jsx("circle",{cx:"16",cy:"20",r:"4",stroke:"var(--doc-text-placeholder)",strokeWidth:"2",fill:"none"}),jsxRuntime.jsx("path",{d:"M6 32L16 24L26 34L36 22L42 28",stroke:"var(--doc-text-placeholder)",strokeWidth:"2",fill:"none"})]})}function $r({locked:e}){return e?jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M12 6V4a4 4 0 0 0-8 0v2H3v8h10V6h-1zm-6-2a2 2 0 0 1 4 0v2H6V4zm6 8H4V8h8v4z"})}):jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M10 6V4a2 2 0 0 0-4 0v2H4v8h8V6h-2zM6 4a2 2 0 0 1 4 0v2h-2V4H6v2H4v2H6V4zm4 8H6V8h4v4z"})})}function Ia({isOpen:e,onClose:t,onInsert:o,maxWidth:r=800,maxHeight:n=600,accept:i="image/*",className:a,style:c}){let[d,s]=Qo.useState(null),[x,m]=Qo.useState(false),[p,g]=Qo.useState(0),[b,v]=Qo.useState(0),[u,f]=Qo.useState(""),[l,h]=Qo.useState(true),[C,P]=Qo.useState(1),[H,R]=Qo.useState(null),D=Qo.useRef(null),T=Qo.useRef(null);Qo.useEffect(()=>{e&&(s(null),m(false),g(0),v(0),f(""),h(true),P(1),R(null));},[e]);let y=Qo.useCallback(E=>{if(!E.type.startsWith("image/")){R("Please select a valid image file");return}if(E.size>10*1024*1024){R("Image file is too large (max 10MB)");return}R(null);let z=new FileReader;z.onload=$t=>{let it=$t.target?.result,ae=new Image;ae.onload=()=>{let se=ae.width,le=ae.height;if(se>r||le>n){let Gt=r/se,jt=n/le,at=Math.min(Gt,jt);se=Math.round(se*at),le=Math.round(le*at);}g(se),v(le),P(ae.width/ae.height),s({src:it,width:se,height:le,fileName:E.name,mimeType:E.type});},ae.src=it;},z.onerror=()=>{R("Failed to read image file");},z.readAsDataURL(E);},[r,n]),j=Qo.useCallback(E=>{let z=E.target.files?.[0];z&&y(z);},[y]),I=Qo.useCallback(()=>{D.current?.click();},[]),M=Qo.useCallback(E=>{E.preventDefault(),m(true);},[]),Ee=Qo.useCallback(E=>{E.preventDefault(),m(false);},[]),zt=Qo.useCallback(E=>{E.preventDefault(),m(false);let z=E.dataTransfer.files?.[0];z&&y(z);},[y]),Wt=Qo.useCallback(E=>{let z=parseInt(E.target.value,10)||0;g(z),l&&C&&v(Math.round(z/C));},[l,C]),Ht=Qo.useCallback(E=>{let z=parseInt(E.target.value,10)||0;v(z),l&&C&&g(Math.round(z*C));},[l,C]),He=Qo.useCallback(()=>{d&&o({...d,width:p,height:b,alt:u||void 0});},[d,p,b,u,o]),Ut=Qo.useCallback(E=>{E.key==="Escape"?t():E.key==="Enter"&&d&&!E.shiftKey&&(E.preventDefault(),He());},[t,d,He]),Yt=Qo.useCallback(E=>{E.target===E.currentTarget&&t();},[t]),Kt=Qo.useCallback(()=>{s(null),g(0),v(0),f(""),R(null),D.current&&(D.current.value="");},[]);if(!e)return null;let nt=d!==null&&p>0&&b>0,Vt=()=>d?Dr:x?Lr:Qe;return jsxRuntime.jsx("div",{className:`docx-insert-image-dialog-overlay ${a||""}`,style:{...kr,...c},onClick:Yt,onKeyDown:Ut,role:"dialog","aria-modal":"true","aria-labelledby":"insert-image-dialog-title",children:jsxRuntime.jsxs("div",{ref:T,className:"docx-insert-image-dialog",style:Tr,tabIndex:-1,children:[jsxRuntime.jsxs("div",{className:"docx-insert-image-dialog-header",style:Er,children:[jsxRuntime.jsx("h2",{id:"insert-image-dialog-title",style:Ir,children:"Insert Image"}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-image-dialog-close",style:Rr,onClick:t,"aria-label":"Close dialog",children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-insert-image-dialog-body",style:Pr,children:[jsxRuntime.jsx("input",{ref:D,type:"file",accept:i,onChange:j,style:{display:"none"}}),jsxRuntime.jsx("div",{className:"docx-insert-image-dropzone",style:Vt(),onClick:I,onDragOver:M,onDragLeave:Ee,onDrop:zt,role:"button",tabIndex:0,"aria-label":"Click or drag to upload image",children:d?jsxRuntime.jsx("div",{style:Mr,children:jsxRuntime.jsx("img",{src:d.src,alt:u||"Preview",style:Ar})}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{style:Or,children:jsxRuntime.jsx(Vr,{})}),jsxRuntime.jsx("div",{style:_r,children:"Click to select or drag and drop an image"}),jsxRuntime.jsx("div",{style:Nr,children:"PNG, JPG, GIF up to 10MB"})]})}),d?.fileName&&jsxRuntime.jsxs("div",{style:Wr,children:[d.fileName,jsxRuntime.jsx("button",{type:"button",onClick:E=>{E.stopPropagation(),Kt();},style:{marginLeft:"8px",background:"none",border:"none",color:"var(--doc-primary)",cursor:"pointer",fontSize:"12px"},children:"Change"})]}),H&&jsxRuntime.jsx("div",{style:{color:"var(--doc-error)",fontSize:"14px",marginBottom:"16px",textAlign:"center"},children:H}),d&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("div",{style:Rt,children:[jsxRuntime.jsx("label",{style:Pt,children:"Dimensions"}),jsxRuntime.jsxs("div",{style:Fr,children:[jsxRuntime.jsx("span",{style:{fontSize:"14px",color:"var(--doc-text-muted)"},children:"Width:"}),jsxRuntime.jsx("input",{type:"number",value:p,onChange:Wt,min:1,max:r,style:Lt}),jsxRuntime.jsx("span",{style:{fontSize:"14px",color:"var(--doc-text-muted)"},children:"px"}),jsxRuntime.jsx("button",{type:"button",onClick:()=>h(!l),style:l?zr:Mt,title:l?"Aspect ratio locked":"Aspect ratio unlocked",children:jsxRuntime.jsx($r,{locked:l})}),jsxRuntime.jsx("span",{style:{fontSize:"14px",color:"var(--doc-text-muted)"},children:"Height:"}),jsxRuntime.jsx("input",{type:"number",value:b,onChange:Ht,min:1,max:n,style:Lt}),jsxRuntime.jsx("span",{style:{fontSize:"14px",color:"var(--doc-text-muted)"},children:"px"})]})]}),jsxRuntime.jsxs("div",{style:Rt,children:[jsxRuntime.jsx("label",{htmlFor:"insert-image-alt",style:Pt,children:"Alt Text (optional)"}),jsxRuntime.jsx("input",{id:"insert-image-alt",type:"text",value:u,onChange:E=>f(E.target.value),placeholder:"Describe the image for accessibility",style:Br})]})]})]}),jsxRuntime.jsxs("div",{className:"docx-insert-image-dialog-footer",style:Hr,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-insert-image-dialog-cancel",style:Yr,onClick:t,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-image-dialog-insert",style:nt?Ur:Kr,onClick:He,disabled:!nt,children:"Insert Image"})]})]})})}function Ra(){let[e,t]=Qo.useState(false),o=Qo.useCallback(()=>t(true),[]),r=Qo.useCallback(()=>t(false),[]),n=Qo.useCallback(()=>t(i=>!i),[]);return {isOpen:e,open:o,close:r,toggle:n}}function Pa(e){return e.type.startsWith("image/")}function La(){return [".png",".jpg",".jpeg",".gif",".webp",".bmp",".svg"]}function Da(){return "image/png,image/jpeg,image/gif,image/webp,image/bmp,image/svg+xml"}function Ma(e,t,o,r){if(e<=o&&t<=r)return {width:e,height:t};let n=o/e,i=r/t,a=Math.min(n,i);return {width:Math.round(e*a),height:Math.round(t*a)}}function Aa(e){let t=e.split(","),o=t[0].match(/:(.*?);/)?.[1]||"image/png",r=atob(t[1]),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return new Blob([n],{type:o})}function Oa(e){return new Promise((t,o)=>{let r=new Image;r.onload=()=>t({width:r.width,height:r.height}),r.onerror=()=>o(new Error("Failed to load image")),r.src=e;})}function _a(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}var Xr={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},Jr={backgroundColor:"white",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",minWidth:"450px",maxWidth:"550px",width:"100%",margin:"20px",maxHeight:"80vh",display:"flex",flexDirection:"column"},Qr={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},qr={margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},en={background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"4px 8px",lineHeight:1},tn={padding:"20px",flex:1,overflow:"auto"},on={width:"100%",padding:"10px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",fontSize:"14px",marginBottom:"16px",boxSizing:"border-box"},rn={display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"16px"},At={padding:"6px 12px",border:"1px solid var(--doc-border-input)",borderRadius:"4px",backgroundColor:"white",cursor:"pointer",fontSize:"12px",transition:"all 0.15s"},nn={...At,backgroundColor:"var(--doc-primary)",borderColor:"var(--doc-primary)",color:"white"},an={display:"grid",gridTemplateColumns:"repeat(10, 1fr)",gap:"4px",maxHeight:"250px",overflow:"auto"},sn={width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--doc-border)",borderRadius:"4px",backgroundColor:"white",cursor:"pointer",fontSize:"18px",transition:"all 0.15s"},ln={marginTop:"16px",padding:"12px",backgroundColor:"var(--doc-bg-subtle)",borderRadius:"4px",display:"flex",alignItems:"center",gap:"16px"},dn={fontSize:"36px",width:"60px",height:"60px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"white",borderRadius:"4px",border:"1px solid var(--doc-border)"},cn={flex:1},pn={display:"flex",justifyContent:"flex-end",gap:"12px",padding:"16px 20px",borderTop:"1px solid var(--doc-border)"},et={padding:"10px 20px",borderRadius:"4px",fontSize:"14px",fontWeight:500,cursor:"pointer",border:"none"},un={...et,backgroundColor:"var(--doc-primary)",color:"white"},gn={...et,backgroundColor:"var(--doc-bg-subtle)",color:"var(--doc-text)",border:"1px solid var(--doc-border-input)"},mn={...et,backgroundColor:"var(--doc-border-input)",color:"var(--doc-text-muted)",cursor:"not-allowed"},Se=[{name:"common",label:"Common",symbols:["\xA9","\xAE","\u2122","\u2022","\u2026","\u2014","\u2013","\xB0","\xB1","\xD7","\xF7","\u2260","\u2264","\u2265","\u221E","\u221A","\u2211","\u220F","\u222B","\u03C0","\u20AC","\xA3","\xA5","\xA2","\xA7","\xB6","\u2020","\u2021","\u2030","\u2116"]},{name:"arrows",label:"Arrows",symbols:["\u2190","\u2191","\u2192","\u2193","\u2194","\u2195","\u2196","\u2197","\u2198","\u2199","\u21D0","\u21D1","\u21D2","\u21D3","\u21D4","\u21D5","\u27F5","\u27F6","\u27F7","\u2794","\u279C","\u279E","\u27A1","\u27A2","\u27A3","\u27A4","\u27A5","\u27A6","\u27A7","\u27A8"]},{name:"math",label:"Math",symbols:["+","\u2212","\xD7","\xF7","=","\u2260","<",">","\u2264","\u2265","\xB1","\u2213","\u221E","\u221A","\u221B","\u221C","\u2211","\u220F","\u222B","\u2202","\u2206","\u2207","\u2208","\u2209","\u220B","\u2205","\u2200","\u2203","\u2204","\u2282","\u2283","\u2286","\u2287","\u222A","\u2229","\u2295","\u2297","\u22A5","\u2220","\u221F"]},{name:"greek",label:"Greek",symbols:["\u03B1","\u03B2","\u03B3","\u03B4","\u03B5","\u03B6","\u03B7","\u03B8","\u03B9","\u03BA","\u03BB","\u03BC","\u03BD","\u03BE","\u03BF","\u03C0","\u03C1","\u03C3","\u03C4","\u03C5","\u03C6","\u03C7","\u03C8","\u03C9","\u0391","\u0392","\u0393","\u0394","\u0395","\u0396","\u0397","\u0398","\u0399","\u039A","\u039B","\u039C","\u039D","\u039E","\u039F","\u03A0"]},{name:"shapes",label:"Shapes",symbols:["\u25A0","\u25A1","\u25AA","\u25AB","\u25AC","\u25AD","\u25AE","\u25AF","\u25B0","\u25B1","\u25B2","\u25B3","\u25B4","\u25B5","\u25B6","\u25B7","\u25B8","\u25B9","\u25BA","\u25BB","\u25BC","\u25BD","\u25BE","\u25BF","\u25C0","\u25C1","\u25C2","\u25C3","\u25C4","\u25C5","\u25CF","\u25CB","\u25CE","\u25C9","\u25CC","\u25CD","\u25D0","\u25D1","\u25D2","\u25D3"]},{name:"punctuation",label:"Punctuation",symbols:["\u2013","\u2014","\u2018","\u2019","\u201C","\u201D","\xAB","\xBB","\u2039","\u203A","\u2026","\xB7","\u2022","\u2023","\u2043","\u2010","\u2011","\u2012","\u2015","\u2016","\u2032","\u2033","\u2034","\u2057","\u2035","\u2036","\u2037","\u203B","\u203D","\u2042"]},{name:"currency",label:"Currency",symbols:["$","\xA2","\xA3","\xA4","\xA5","\u20A0","\u20A1","\u20A2","\u20A3","\u20A4","\u20A5","\u20A6","\u20A7","\u20A8","\u20A9","\u20AA","\u20AB","\u20AC","\u20AD","\u20AE","\u20AF","\u20B0","\u20B1","\u20B2","\u20B3","\u20B4","\u20B5","\u20B6","\u20B7","\u20B8"]},{name:"music",label:"Music",symbols:["\u2669","\u266A","\u266B","\u266C","\u266D","\u266E","\u266F","\u{1D11E}","\u{1D122}","\u{1D12A}","\u{1D12B}","\u{1D157}\u{1D165}","\u{1D158}\u{1D165}","\u{1D158}\u{1D165}\u{1D16E}","\u{1D158}\u{1D165}\u{1D16F}","\u{1D158}\u{1D165}\u{1D170}","\u{1D192}","\u{1D193}","\u{1D110}","\u{1D111}"]},{name:"emoji",label:"Emoji",symbols:["\u{1F600}","\u{1F603}","\u{1F604}","\u{1F601}","\u{1F606}","\u{1F605}","\u{1F923}","\u{1F602}","\u{1F642}","\u{1F643}","\u{1F609}","\u{1F60A}","\u{1F607}","\u{1F970}","\u{1F60D}","\u{1F929}","\u{1F618}","\u{1F617}","\u263A","\u{1F61A}","\u2764","\u{1F9E1}","\u{1F49B}","\u{1F49A}","\u{1F499}","\u{1F49C}","\u{1F5A4}","\u{1F90D}","\u{1F494}","\u2763","\u{1F44D}","\u{1F44E}","\u{1F44C}","\u270C","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F44B}","\u{1F64F}","\u2705"]}];function Ot(){return Se.flatMap(e=>e.symbols)}function Wa({isOpen:e,onClose:t,onInsert:o,recentSymbols:r=[],className:n,style:i}){let[a,c]=Qo.useState("common"),[d,s]=Qo.useState(null),[x,m]=Qo.useState(""),[p,g]=Qo.useState(null),b=Qo.useRef(null);Qo.useEffect(()=>{e&&(s(null),m(""),g(null),setTimeout(()=>b.current?.focus(),100));},[e]);let v=Qo.useMemo(()=>{if(!x.trim())return a==="recent"?r:Se.find(M=>M.name===a)?.symbols||[];let y=x.toLowerCase();return Ot().filter(I=>{let M=I.codePointAt(0)?.toString(16).toUpperCase()||"";return I.includes(y)||M.includes(y.toUpperCase())||`U+${M}`.toLowerCase().includes(y)})},[x,a,r]),u=Qo.useCallback(y=>{s(y);},[]),f=Qo.useCallback(y=>{o(y);},[o]),l=Qo.useCallback(()=>{d&&o(d);},[d,o]),h=Qo.useCallback(y=>{y.key==="Escape"?t():y.key==="Enter"&&d&&(y.preventDefault(),l());},[t,d,l]),C=Qo.useCallback(y=>{y.target===y.currentTarget&&t();},[t]),P=y=>{if(!y)return null;let j=y.codePointAt(0);return {character:y,codePoint:j?`U+${j.toString(16).toUpperCase().padStart(4,"0")}`:"",decimal:j||0}};if(!e)return null;let R=P(p||d),D=d!==null,T=[...r.length>0?[{name:"recent",label:"Recent"}]:[],...Se.map(y=>({name:y.name,label:y.label}))];return jsxRuntime.jsx("div",{className:`docx-insert-symbol-dialog-overlay ${n||""}`,style:{...Xr,...i},onClick:C,onKeyDown:h,role:"dialog","aria-modal":"true","aria-labelledby":"insert-symbol-dialog-title",children:jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog",style:Jr,children:[jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog-header",style:Qr,children:[jsxRuntime.jsx("h2",{id:"insert-symbol-dialog-title",style:qr,children:"Insert Symbol"}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-symbol-dialog-close",style:en,onClick:t,"aria-label":"Close dialog",children:"\xD7"})]}),jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog-body",style:tn,children:[jsxRuntime.jsx("input",{ref:b,type:"text",placeholder:"Search symbols (character or Unicode)...",value:x,onChange:y=>m(y.target.value),style:on}),!x&&jsxRuntime.jsx("div",{className:"docx-insert-symbol-categories",style:rn,children:T.map(y=>jsxRuntime.jsx("button",{type:"button",onClick:()=>c(y.name),style:a===y.name?nn:At,children:y.label},y.name))}),jsxRuntime.jsx("div",{className:"docx-insert-symbol-grid",style:an,children:v.map((y,j)=>jsxRuntime.jsx("button",{type:"button",onClick:()=>u(y),onDoubleClick:()=>f(y),onMouseEnter:()=>g(y),onMouseLeave:()=>g(null),style:{...sn,...d===y?{backgroundColor:"var(--doc-primary-light)",borderColor:"var(--doc-primary)"}:{}},title:`${y} - U+${y.codePointAt(0)?.toString(16).toUpperCase()}`,children:y},`${y}-${j}`))}),v.length===0&&jsxRuntime.jsxs("div",{style:{textAlign:"center",padding:"20px",color:"var(--doc-text-muted)"},children:['No symbols found for "',x,'"']}),R&&jsxRuntime.jsxs("div",{className:"docx-insert-symbol-preview",style:ln,children:[jsxRuntime.jsx("div",{style:dn,children:R.character}),jsxRuntime.jsxs("div",{style:cn,children:[jsxRuntime.jsx("div",{style:{fontSize:"14px",fontWeight:500,marginBottom:"4px"},children:R.codePoint}),jsxRuntime.jsxs("div",{style:{fontSize:"12px",color:"var(--doc-text-muted)"},children:["Decimal: ",R.decimal]})]})]})]}),jsxRuntime.jsxs("div",{className:"docx-insert-symbol-dialog-footer",style:pn,children:[jsxRuntime.jsx("button",{type:"button",className:"docx-insert-symbol-dialog-cancel",style:gn,onClick:t,children:"Cancel"}),jsxRuntime.jsx("button",{type:"button",className:"docx-insert-symbol-dialog-insert",style:D?un:mn,onClick:l,disabled:!D,children:"Insert"})]})]})})}function Ha(e=20){let[t,o]=Qo.useState(false),[r,n]=Qo.useState([]),i=Qo.useCallback(()=>o(true),[]),a=Qo.useCallback(()=>o(false),[]),c=Qo.useCallback(()=>o(s=>!s),[]),d=Qo.useCallback(s=>{n(x=>{let m=x.filter(p=>p!==s);return [s,...m].slice(0,e)});},[e]);return {isOpen:t,recentSymbols:r,open:i,close:a,toggle:c,addRecent:d}}function Ua(){return Se}function Ya(e){return Se.find(o=>o.name===e)?.symbols||[]}function Ka(e){let t=e.codePointAt(0)||0;return {character:e,codePoint:`U+${t.toString(16).toUpperCase().padStart(4,"0")}`,decimal:t,hex:t.toString(16).toUpperCase()}}function Va(e){if(!e.trim())return [];let t=e.toLowerCase();return Ot().filter(o=>{let r=o.codePointAt(0)?.toString(16).toUpperCase()||"";return o.includes(e)||r.includes(t.toUpperCase())||`U+${r}`.toLowerCase().includes(t)})}function $a(e){let t=e.replace(/^U\+/i,"").replace(/^0x/i,""),o=parseInt(t,16);return isNaN(o)||o<0||o>1114111?null:String.fromCodePoint(o)}var ne=[{id:"formatted",label:"Keep Source Formatting",description:"Paste with original formatting",shortcut:"Ctrl+V"},{id:"plainText",label:"Paste as Plain Text",description:"Paste without any formatting",shortcut:"Ctrl+Shift+V"}],fn=()=>jsxRuntime.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M4 4h12v2H4V4zM4 8h8v2H4V8zM4 12h10v2H4v-2zM4 16h6v2H4v-2z",fill:"currentColor"}),jsxRuntime.jsx("path",{d:"M14 10l3 3-3 3v-2h-2v-2h2v-2z",fill:"currentColor",opacity:"0.6"})]}),bn=()=>jsxRuntime.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{d:"M4 4h12v1H4V4zM4 7h12v1H4V7zM4 10h12v1H4v-1zM4 13h12v1H4v-1zM4 16h8v1H4v-1z",fill:"currentColor"})});function hn(e){switch(e){case "formatted":return jsxRuntime.jsx(fn,{});case "plainText":return jsxRuntime.jsx(bn,{});default:return null}}var vn=({option:e,isSelected:t,onClick:o,onMouseEnter:r})=>jsxRuntime.jsxs("button",{type:"button",className:`docx-paste-special-option ${t?"docx-paste-special-option-selected":""}`,onClick:o,onMouseEnter:r,role:"menuitem","aria-selected":t,style:{display:"flex",alignItems:"center",gap:"12px",width:"100%",padding:"12px 16px",border:"none",background:t?"var(--doc-primary-light)":"transparent",cursor:"pointer",textAlign:"left",borderRadius:"4px",transition:"background-color 0.15s ease"},children:[jsxRuntime.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderRadius:"4px",background:t?"var(--doc-primary)":"var(--doc-bg-hover)",color:t?"white":"var(--doc-text-muted)"},children:hn(e.id)}),jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"var(--doc-text)",marginBottom:"2px"},children:e.label}),jsxRuntime.jsx("div",{style:{fontSize:"12px",color:"var(--doc-text-muted)"},children:e.description})]}),jsxRuntime.jsx("span",{style:{fontSize:"11px",color:"var(--doc-text-subtle)",fontFamily:"monospace"},children:e.shortcut})]}),Qa=({isOpen:e,onClose:t,onPaste:o,position:r,className:n=""})=>{let i=Qo.useRef(null),[a,c]=Qo.useState(0),[d,s]=Qo.useState(null),[x,m]=Qo.useState(false),[p,g]=Qo.useState(null);Qo.useEffect(()=>{if(!e){s(null),g(null),c(0);return}(async()=>{m(true),g(null);try{let f=await chunkPANKMCFX_cjs.ha({cleanWordFormatting:!0});s(f),f||g("No content available to paste");}catch{g("Unable to read clipboard. Please use Ctrl+V to paste.");}finally{m(false);}})();},[e]),Qo.useEffect(()=>{if(!e)return;let u=f=>{i.current&&!i.current.contains(f.target)&&t();};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[e,t]),Qo.useEffect(()=>{if(!e)return;let u=f=>{switch(f.key){case "Escape":f.preventDefault(),t();break;case "ArrowDown":f.preventDefault(),c(l=>(l+1)%ne.length);break;case "ArrowUp":f.preventDefault(),c(l=>(l-1+ne.length)%ne.length);break;case "Enter":f.preventDefault(),b(ne[a].id);break}};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,a,t]);let b=Qo.useCallback(u=>{if(!d){g("No content available to paste");return}o(d,u==="plainText"),t();},[d,o,t]),v=Qo.useCallback(()=>{let l=r?.x??(typeof window<"u"?window.innerWidth/2-160:100),h=r?.y??(typeof window<"u"?window.innerHeight/2-200/2:100);return typeof window<"u"&&(l+320>window.innerWidth&&(l=window.innerWidth-320-10),h+200>window.innerHeight&&(h=window.innerHeight-200-10),l<10&&(l=10),h<10&&(h=10)),{position:"fixed",top:h,left:l,width:320,background:"white",border:"1px solid var(--doc-border-light)",borderRadius:"8px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",zIndex:10001,overflow:"hidden"}},[r]);return e?jsxRuntime.jsxs("div",{ref:i,className:`docx-paste-special-dialog ${n}`,style:v(),role:"dialog","aria-label":"Paste Special",children:[jsxRuntime.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[jsxRuntime.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},children:"Paste Special"}),jsxRuntime.jsx("button",{type:"button",onClick:t,"aria-label":"Close",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"24px",height:"24px",border:"none",background:"transparent",cursor:"pointer",borderRadius:"4px",color:"var(--doc-text-muted)"},children:jsxRuntime.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:jsxRuntime.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),jsxRuntime.jsx("div",{style:{padding:"8px"},children:x?jsxRuntime.jsx("div",{style:{padding:"20px",textAlign:"center",color:"var(--doc-text-muted)",fontSize:"13px"},children:"Reading clipboard..."}):p?jsxRuntime.jsx("div",{style:{padding:"20px",textAlign:"center",color:"var(--doc-error)",fontSize:"13px"},children:p}):jsxRuntime.jsx("div",{role:"menu",children:ne.map((u,f)=>jsxRuntime.jsx(vn,{option:u,isSelected:f===a,onClick:()=>b(u.id),onMouseEnter:()=>c(f)},u.id))})}),d&&!x&&!p&&jsxRuntime.jsxs("div",{style:{padding:"8px 16px 12px",borderTop:"1px solid var(--doc-border)"},children:[jsxRuntime.jsx("div",{style:{fontSize:"11px",color:"var(--doc-text-muted)",marginBottom:"4px"},children:"Preview:"}),jsxRuntime.jsxs("div",{style:{fontSize:"12px",color:"var(--doc-text)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"6px 8px",background:"var(--doc-bg)",borderRadius:"4px"},children:['"',d.plainText.slice(0,50),d.plainText.length>50?"...":"",'"']})]})]}):null};function qa(e={}){let{onPaste:t,enabled:o=true}=e,[r,n]=Qo.useState(false),i=Qo.useCallback(()=>{o&&n(true);},[o]),a=Qo.useCallback(()=>{n(false);},[]),c=Qo.useCallback(async()=>{if(!(!o||!t))try{let s=await chunkPANKMCFX_cjs.ha({cleanWordFormatting:!0});s&&t(s,!0);}catch(s){console.error("Failed to paste as plain text:",s);}},[o,t]),d=Qo.useCallback(s=>o&&(s.ctrlKey||s.metaKey)&&s.shiftKey&&s.key.toLowerCase()==="v"?(s.preventDefault(),i(),true):false,[o,i]);return {isOpen:r,openDialog:i,closeDialog:a,handleKeyDown:d,pasteAsPlainText:c}}function es(e){return ne.find(t=>t.id===e)}function ts(){return [...ne]}function os(){return "formatted"}function rs(e){return (e.ctrlKey||e.metaKey)&&e.shiftKey&&e.key.toLowerCase()==="v"}var Bt={editing:"Editing",formatting:"Formatting",navigation:"Navigation",clipboard:"Clipboard",selection:"Selection",view:"View",file:"File",other:"Other"},Ft=["file","editing","clipboard","formatting","selection","navigation","view","other"],We=[{id:"save",name:"Save",description:"Save document",keys:"Ctrl+S",category:"file",common:true},{id:"print",name:"Print",description:"Print document",keys:"Ctrl+P",category:"file"},{id:"undo",name:"Undo",description:"Undo last action",keys:"Ctrl+Z",category:"editing",common:true},{id:"redo",name:"Redo",description:"Redo last action",keys:"Ctrl+Y",altKeys:"Ctrl+Shift+Z",category:"editing",common:true},{id:"delete",name:"Delete",description:"Delete selected text",keys:"Del",altKeys:"Backspace",category:"editing"},{id:"find",name:"Find",description:"Find text in document",keys:"Ctrl+F",category:"editing",common:true},{id:"replace",name:"Find & Replace",description:"Find and replace text",keys:"Ctrl+H",category:"editing"},{id:"cut",name:"Cut",description:"Cut selected text",keys:"Ctrl+X",category:"clipboard",common:true},{id:"copy",name:"Copy",description:"Copy selected text",keys:"Ctrl+C",category:"clipboard",common:true},{id:"paste",name:"Paste",description:"Paste from clipboard",keys:"Ctrl+V",category:"clipboard",common:true},{id:"paste-plain",name:"Paste as Plain Text",description:"Paste without formatting",keys:"Ctrl+Shift+V",category:"clipboard"},{id:"bold",name:"Bold",description:"Toggle bold formatting",keys:"Ctrl+B",category:"formatting",common:true},{id:"italic",name:"Italic",description:"Toggle italic formatting",keys:"Ctrl+I",category:"formatting",common:true},{id:"underline",name:"Underline",description:"Toggle underline formatting",keys:"Ctrl+U",category:"formatting",common:true},{id:"strikethrough",name:"Strikethrough",description:"Toggle strikethrough",keys:"Ctrl+Shift+X",category:"formatting"},{id:"subscript",name:"Subscript",description:"Toggle subscript",keys:"Ctrl+=",category:"formatting"},{id:"superscript",name:"Superscript",description:"Toggle superscript",keys:"Ctrl+Shift+=",category:"formatting"},{id:"align-left",name:"Align Left",description:"Left align paragraph",keys:"Ctrl+L",category:"formatting"},{id:"align-center",name:"Align Center",description:"Center align paragraph",keys:"Ctrl+E",category:"formatting"},{id:"align-right",name:"Align Right",description:"Right align paragraph",keys:"Ctrl+R",category:"formatting"},{id:"align-justify",name:"Justify",description:"Justify paragraph",keys:"Ctrl+J",category:"formatting"},{id:"indent",name:"Increase Indent",description:"Increase paragraph indent",keys:"Tab",category:"formatting"},{id:"outdent",name:"Decrease Indent",description:"Decrease paragraph indent",keys:"Shift+Tab",category:"formatting"},{id:"select-all",name:"Select All",description:"Select all content",keys:"Ctrl+A",category:"selection",common:true},{id:"select-word",name:"Select Word",description:"Select current word",keys:"Double-click",category:"selection"},{id:"select-paragraph",name:"Select Paragraph",description:"Select current paragraph",keys:"Triple-click",category:"selection"},{id:"extend-selection-word",name:"Extend Selection by Word",description:"Extend selection to next/previous word",keys:"Ctrl+Shift+Arrow",category:"selection"},{id:"extend-selection-line",name:"Extend Selection to Line Edge",description:"Extend selection to line start/end",keys:"Shift+Home/End",category:"selection"},{id:"move-word",name:"Move by Word",description:"Move cursor to next/previous word",keys:"Ctrl+Arrow",category:"navigation"},{id:"move-line-start",name:"Move to Line Start",description:"Move cursor to start of line",keys:"Home",category:"navigation"},{id:"move-line-end",name:"Move to Line End",description:"Move cursor to end of line",keys:"End",category:"navigation"},{id:"move-doc-start",name:"Move to Document Start",description:"Move cursor to start of document",keys:"Ctrl+Home",category:"navigation"},{id:"move-doc-end",name:"Move to Document End",description:"Move cursor to end of document",keys:"Ctrl+End",category:"navigation"},{id:"page-up",name:"Page Up",description:"Scroll up one page",keys:"Page Up",category:"navigation"},{id:"page-down",name:"Page Down",description:"Scroll down one page",keys:"Page Down",category:"navigation"},{id:"zoom-in",name:"Zoom In",description:"Increase zoom level",keys:"Ctrl++",altKeys:"Ctrl+Scroll Up",category:"view"},{id:"zoom-out",name:"Zoom Out",description:"Decrease zoom level",keys:"Ctrl+-",altKeys:"Ctrl+Scroll Down",category:"view"},{id:"zoom-reset",name:"Reset Zoom",description:"Reset zoom to 100%",keys:"Ctrl+0",category:"view"},{id:"shortcuts",name:"Keyboard Shortcuts",description:"Show this help dialog",keys:"Ctrl+/",altKeys:"F1",category:"view"}];function yn(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function rt(e){return yn()?e.replace(/Ctrl\+/g,"\u2318").replace(/Alt\+/g,"\u2325").replace(/Shift\+/g,"\u21E7"):e}var Cn=({shortcut:e})=>{let t=rt(e.keys),o=e.altKeys?rt(e.altKeys):null;return jsxRuntime.jsxs("div",{className:"docx-shortcut-item",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 0",borderBottom:"1px solid var(--doc-border-light)"},children:[jsxRuntime.jsxs("div",{style:{flex:1},children:[jsxRuntime.jsx("div",{style:{fontSize:"13px",fontWeight:500,color:"var(--doc-text)"},children:e.name}),jsxRuntime.jsx("div",{style:{fontSize:"11px",color:"var(--doc-text-muted)",marginTop:"2px"},children:e.description})]}),jsxRuntime.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[jsxRuntime.jsx("kbd",{style:{display:"inline-flex",alignItems:"center",padding:"4px 8px",fontSize:"12px",fontFamily:"monospace",color:"var(--doc-text)",backgroundColor:"var(--doc-bg-hover)",borderRadius:"4px",border:"1px solid var(--doc-border-light)",boxShadow:"0 1px 1px rgba(0,0,0,0.1)"},children:t}),o&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("span",{style:{color:"var(--doc-text-subtle)",fontSize:"11px"},children:"or"}),jsxRuntime.jsx("kbd",{style:{display:"inline-flex",alignItems:"center",padding:"4px 8px",fontSize:"12px",fontFamily:"monospace",color:"var(--doc-text)",backgroundColor:"var(--doc-bg-hover)",borderRadius:"4px",border:"1px solid var(--doc-border-light)",boxShadow:"0 1px 1px rgba(0,0,0,0.1)"},children:o})]})]})]})},ls=({isOpen:e,onClose:t,customShortcuts:o=[],showSearch:r=true,className:n=""})=>{let i=Qo.useRef(null),a=Qo.useRef(null),[c,d]=Qo.useState(""),s=Qo.useMemo(()=>{let p=[...We];for(let g of o){let b=p.findIndex(v=>v.id===g.id);b>=0?p[b]=g:p.push(g);}return p},[o]),x=Qo.useMemo(()=>{if(!c.trim())return s;let p=c.toLowerCase();return s.filter(g=>g.name.toLowerCase().includes(p)||g.description.toLowerCase().includes(p)||g.keys.toLowerCase().includes(p)||g.altKeys&&g.altKeys.toLowerCase().includes(p))},[s,c]),m=Qo.useMemo(()=>{let p=new Map;for(let b of x){let v=p.get(b.category)||[];v.push(b),p.set(b.category,v);}let g=[];for(let b of Ft){let v=p.get(b);v&&v.length>0&&g.push({category:b,shortcuts:v});}return g},[x]);return Qo.useEffect(()=>{e&&r&&a.current&&setTimeout(()=>a.current?.focus(),0);},[e,r]),Qo.useEffect(()=>{e||d("");},[e]),Qo.useEffect(()=>{if(!e)return;let p=g=>{i.current&&!i.current.contains(g.target)&&t();};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[e,t]),Qo.useEffect(()=>{if(!e)return;let p=g=>{g.key==="Escape"&&t();};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[e,t]),e?jsxRuntime.jsx("div",{className:"docx-shortcuts-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10001},children:jsxRuntime.jsxs("div",{ref:i,className:`docx-shortcuts-dialog ${n}`,style:{width:"600px",maxWidth:"90vw",maxHeight:"80vh",backgroundColor:"white",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.2)",display:"flex",flexDirection:"column",overflow:"hidden"},role:"dialog","aria-label":"Keyboard Shortcuts",children:[jsxRuntime.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid var(--doc-border)"},children:[jsxRuntime.jsx("h2",{style:{margin:0,fontSize:"18px",fontWeight:600,color:"var(--doc-text)"},children:"Keyboard Shortcuts"}),jsxRuntime.jsx("button",{type:"button",onClick:t,"aria-label":"Close",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",border:"none",background:"transparent",cursor:"pointer",borderRadius:"50%",color:"var(--doc-text-muted)"},children:jsxRuntime.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:jsxRuntime.jsx("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),r&&jsxRuntime.jsx("div",{style:{padding:"12px 20px",borderBottom:"1px solid var(--doc-border)"},children:jsxRuntime.jsx("input",{ref:a,type:"text",value:c,onChange:p=>d(p.target.value),placeholder:"Search shortcuts...",style:{width:"100%",padding:"10px 12px",fontSize:"14px",border:"1px solid var(--doc-border-light)",borderRadius:"6px",outline:"none"}})}),jsxRuntime.jsx("div",{style:{flex:1,overflowY:"auto",padding:"16px 20px"},children:m.length===0?jsxRuntime.jsxs("div",{style:{textAlign:"center",padding:"32px",color:"var(--doc-text-muted)"},children:['No shortcuts found matching "',c,'"']}):m.map(({category:p,shortcuts:g})=>jsxRuntime.jsxs("div",{style:{marginBottom:"24px"},children:[jsxRuntime.jsx("h3",{style:{margin:"0 0 12px 0",fontSize:"13px",fontWeight:600,color:"var(--doc-primary)",textTransform:"uppercase",letterSpacing:"0.5px"},children:Bt[p]}),jsxRuntime.jsx("div",{children:g.map(b=>jsxRuntime.jsx(Cn,{shortcut:b},b.id))})]},p))}),jsxRuntime.jsxs("div",{style:{padding:"12px 20px",borderTop:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg)",fontSize:"12px",color:"var(--doc-text-muted)",textAlign:"center"},children:["Press"," ",jsxRuntime.jsx("kbd",{style:{padding:"2px 6px",backgroundColor:"white",borderRadius:"4px",border:"1px solid var(--doc-border-light)"},children:"Esc"})," ","to close"]})]})}):null};function ds(e={}){let{enabled:t=true,openShortcut:o="Ctrl+/"}=e,[r,n]=Qo.useState(false),i=Qo.useCallback(()=>{t&&n(true);},[t]),a=Qo.useCallback(()=>{n(false);},[]),c=Qo.useCallback(()=>{n(s=>!s);},[]),d=Qo.useCallback(s=>{if(!t)return;if((s.ctrlKey||s.metaKey)&&(s.key==="/"||s.key==="?")){s.preventDefault(),c();return}if(s.key==="F1"){s.preventDefault(),i();return}},[t,c,i]);return Qo.useEffect(()=>{if(t)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[t,d]),{isOpen:r,open:i,close:a,toggle:c,handleKeyDown:d}}function cs(){return [...We]}function ps(e){return We.filter(t=>t.category===e)}function us(){return We.filter(e=>e.common)}function gs(e){return Bt[e]}function ms(){return [...Ft]}function xs(e){return rt(e)}
111
- exports.$=pa;exports.A=Ae;exports.Aa=es;exports.B=Pi;exports.Ba=ts;exports.C=Li;exports.Ca=os;exports.D=Di;exports.Da=rs;exports.E=Mi;exports.Ea=ls;exports.F=Ai;exports.Fa=ds;exports.G=Oi;exports.Ga=cs;exports.H=_i;exports.Ha=ps;exports.I=Ni;exports.Ia=us;exports.J=Hi;exports.Ja=gs;exports.K=Ui;exports.Ka=ms;exports.L=Yi;exports.La=xs;exports.M=Ki;exports.N=Vi;exports.O=$i;exports.P=Ji;exports.Q=Qi;exports.R=qi;exports.S=ea;exports.T=ta;exports.U=oa;exports.V=ra;exports.W=rr;exports.X=sa;exports.Y=la;exports.Z=da;exports._=ca;exports.a=En;exports.aa=fa;exports.b=In;exports.ba=ba;exports.c=Rn;exports.ca=ha;exports.d=Pn;exports.da=va;exports.e=Ln;exports.ea=ya;exports.f=Dn;exports.fa=Ca;exports.g=Bn;exports.ga=wa;exports.h=Fn;exports.ha=Ia;exports.i=zn;exports.ia=Ra;exports.j=Wn;exports.ja=Pa;exports.k=Vn;exports.ka=La;exports.l=$n;exports.la=Da;exports.m=Gn;exports.ma=Ma;exports.n=jn;exports.na=Aa;exports.o=Zn;exports.oa=Oa;exports.p=Xn;exports.pa=_a;exports.q=qn;exports.qa=Se;exports.r=ei;exports.ra=Wa;exports.s=ti;exports.sa=Ha;exports.t=oi;exports.ta=Ua;exports.u=ri;exports.ua=Ya;exports.v=ni;exports.va=Ka;exports.w=ii;exports.wa=Va;exports.x=ai;exports.xa=$a;exports.y=xi;exports.ya=Qa;exports.z=ki;exports.za=qa;//# sourceMappingURL=chunk-2CHPKB5A.cjs.map
112
- //# sourceMappingURL=chunk-2CHPKB5A.cjs.map