@eigenpal/docx-js-editor 0.0.25 → 0.0.27

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 (79) hide show
  1. package/README.md +6 -5
  2. package/dist/{ClipboardManager-Bbo5MM_U.d.cts → ClipboardManager-BYO62Qs5.d.cts} +1 -1
  3. package/dist/{ClipboardManager-CR843H7H.d.ts → ClipboardManager-YQYq5X_Z.d.ts} +1 -1
  4. package/dist/{DocumentAgent-lHtXgMFN.d.ts → DocumentAgent-BW1-gnqM.d.ts} +1 -1
  5. package/dist/{DocumentAgent-cHf96hwL.d.cts → DocumentAgent-ZcA8CUmC.d.cts} +1 -1
  6. package/dist/{agentApi-DmDuQm0e.d.cts → agentApi-B0688ssC.d.cts} +6 -0
  7. package/dist/{agentApi-DmDuQm0e.d.ts → agentApi-B0688ssC.d.ts} +6 -0
  8. package/dist/{chunk-R56SLH64.js → chunk-4XF5YD4I.js} +4 -4
  9. package/dist/chunk-76GITSCY.cjs +258 -0
  10. package/dist/chunk-7YCCCWUZ.cjs +3 -0
  11. package/dist/{chunk-6TUCNECX.js → chunk-ABNIHWGF.js} +1 -1
  12. package/dist/{chunk-PIVLDW7B.cjs → chunk-CL62W2HQ.cjs} +7 -7
  13. package/dist/chunk-E7U5ZBOK.js +3 -0
  14. package/dist/{chunk-3C2VHZX6.cjs → chunk-EUH3GF72.cjs} +4 -4
  15. package/dist/chunk-H7AKDCWH.js +258 -0
  16. package/dist/{chunk-5ILXHRJS.cjs → chunk-J5YOIHCW.cjs} +2 -2
  17. package/dist/chunk-JO2CKU4O.js +1 -0
  18. package/dist/chunk-MHUCHYNM.cjs +59 -0
  19. package/dist/{chunk-KL2RYY6G.cjs → chunk-NKW2UER2.cjs} +2 -2
  20. package/dist/chunk-OJ7NJK46.cjs +1 -0
  21. package/dist/chunk-PP54GVGD.js +59 -0
  22. package/dist/{chunk-JIKVCUR6.js → chunk-T2SRPPZY.js} +1 -1
  23. package/dist/{chunk-3X3LTNK4.js → chunk-YP3CXYSU.js} +7 -7
  24. package/dist/{clipboard-DriRE6eS.d.ts → clipboard-D0EG6AxE.d.ts} +2 -155
  25. package/dist/{clipboard-Bj2X5pLO.d.cts → clipboard-Da1iPK0O.d.cts} +2 -155
  26. package/dist/{colorResolver-yl7Xh_Qg.d.cts → colorResolver-DR1p8Eg-.d.cts} +2 -2
  27. package/dist/{colorResolver-BTTqW66Q.d.ts → colorResolver-Dk7bMHIa.d.ts} +2 -2
  28. package/dist/core-plugins-reexport.cjs +1 -1
  29. package/dist/core-plugins-reexport.d.cts +4 -4
  30. package/dist/core-plugins-reexport.d.ts +4 -4
  31. package/dist/core-plugins-reexport.js +1 -1
  32. package/dist/core-reexport.cjs +1 -1
  33. package/dist/core-reexport.d.cts +10 -10
  34. package/dist/core-reexport.d.ts +10 -10
  35. package/dist/core-reexport.js +1 -1
  36. package/dist/{fontLoader-Daq8y8C2.d.cts → fontLoader-54sS8rtN.d.cts} +1 -1
  37. package/dist/{fontLoader-DQJOS1sb.d.ts → fontLoader-C7RvUiHx.d.ts} +1 -1
  38. package/dist/headless-reexport.cjs +2 -2
  39. package/dist/headless-reexport.d.cts +7 -7
  40. package/dist/headless-reexport.d.ts +7 -7
  41. package/dist/headless-reexport.js +1 -1
  42. package/dist/index.cjs +6 -6
  43. package/dist/index.d.cts +98 -15
  44. package/dist/index.d.ts +98 -15
  45. package/dist/index.js +6 -6
  46. package/dist/mcp-reexport.cjs +3 -3
  47. package/dist/mcp-reexport.d.cts +2 -2
  48. package/dist/mcp-reexport.d.ts +2 -2
  49. package/dist/mcp-reexport.js +1 -1
  50. package/dist/{react-BYRZYSPG.d.cts → react-C_O0Z9ci.d.ts} +20 -12
  51. package/dist/{react-Bj9uDtjg.d.ts → react-XjilVrXZ.d.cts} +20 -12
  52. package/dist/react.cjs +1 -1
  53. package/dist/react.d.cts +5 -5
  54. package/dist/react.d.ts +5 -5
  55. package/dist/react.js +1 -1
  56. package/dist/{registry-C2DPl-QW.d.ts → registry-BHOeZbR9.d.ts} +1 -1
  57. package/dist/{registry-CXGC344v.d.cts → registry-CqFFeBgF.d.cts} +1 -1
  58. package/dist/selectionRects-BMXJJCPJ.cjs +1 -0
  59. package/dist/selectionRects-TWK7CAC3.js +1 -0
  60. package/dist/styles.css +1 -1
  61. package/dist/{types-BpokDLqL.d.ts → types-BwCYaZKB.d.ts} +1 -1
  62. package/dist/{types-COQvtZji.d.cts → types-DAxXgYu5.d.cts} +1 -1
  63. package/dist/ui.cjs +1 -1
  64. package/dist/ui.d.cts +6 -5
  65. package/dist/ui.d.ts +6 -5
  66. package/dist/ui.js +1 -1
  67. package/dist/{variableDetector-BYzE_RXw.d.ts → variableDetector-B2FHghLx.d.ts} +1 -1
  68. package/dist/{variableDetector-C8ST_dnq.d.cts → variableDetector-DIeB1Nxd.d.cts} +1 -1
  69. package/package.json +2 -2
  70. package/dist/chunk-2JOQ7WKO.js +0 -258
  71. package/dist/chunk-4CUGBNL2.cjs +0 -1
  72. package/dist/chunk-5GFXHUMP.js +0 -1
  73. package/dist/chunk-C6ELWJWO.js +0 -3
  74. package/dist/chunk-I5YZ4MRV.cjs +0 -3
  75. package/dist/chunk-PGEORVCG.js +0 -59
  76. package/dist/chunk-PUVSVHHB.cjs +0 -59
  77. package/dist/chunk-RHLMVYVZ.cjs +0 -258
  78. package/dist/selectionRects-7QU337P5.cjs +0 -1
  79. package/dist/selectionRects-V5RC2BYX.js +0 -1
@@ -0,0 +1,3 @@
1
+ import {p,a,b as b$1}from'./chunk-4VUZBV2S.js';import {a as a$1,b,k}from'./chunk-SE5EN2QL.js';import*as X from'react';import X__default,{createContext,useRef,useState,useEffect,useCallback,useMemo,useContext}from'react';import*as H from'@radix-ui/react-select';import {clsx}from'clsx';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function w(...e){return clsx(e)}var ye=H.Root,Ee=H.Group,et=H.Value;function Se({className:e,children:t,onMouseDown:o,...n}){return jsxs(H.Trigger,{className:w("flex h-8 items-center justify-between gap-1 rounded px-2 py-1","text-sm text-slate-700 bg-transparent","hover:bg-slate-100/80 focus:outline-none focus:bg-slate-100/80","disabled:cursor-not-allowed disabled:opacity-50","transition-colors duration-150","[&>span]:truncate",e),onMouseDown:r=>{r.preventDefault(),o?.(r);},...n,children:[t,jsx(H.Icon,{asChild:true,children:jsx(pn,{className:"h-4 w-4 text-slate-400 shrink-0"})})]})}function Ce({className:e,children:t,position:o="popper",onCloseAutoFocus:n,...r}){return jsx(H.Portal,{children:jsx("div",{className:"ep-root",children:jsx(H.Content,{className:w("relative z-50 max-h-72 min-w-[8rem] overflow-hidden","rounded-lg border border-slate-200 bg-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",e),position:o,onCloseAutoFocus:l=>{l.preventDefault(),n?.(l);},...r,children:jsx(H.Viewport,{className:w("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),onMouseDown:l=>l.preventDefault(),children:t})})})})}function De({className:e,...t}){return jsx(H.Label,{className:w("px-2 py-1.5 text-xs font-medium text-slate-500",e),...t})}function ce({className:e,children:t,onMouseDown:o,...n}){return jsxs(H.Item,{className:w("relative flex w-full cursor-pointer select-none items-center","rounded px-2 py-1.5 text-sm text-slate-700 outline-none","hover:bg-slate-100 focus:bg-slate-100","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onMouseDown:r=>{r.preventDefault(),o?.(r);},...n,children:[jsx(H.ItemText,{children:t}),jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:jsx(H.ItemIndicator,{children:jsx(dn,{className:"h-4 w-4"})})})]})}function Ge({className:e,...t}){return jsx(H.Separator,{className:w("-mx-1 my-1 h-px bg-slate-100",e),...t})}function pn({className:e}){return jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z",clipRule:"evenodd"})})}function dn({className:e}){return jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",children:jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})})}var mn=[{name:"Arial",fontFamily:"Arial, Helvetica, sans-serif",category:"sans-serif"},{name:"Calibri",fontFamily:'"Calibri", Arial, sans-serif',category:"sans-serif"},{name:"Helvetica",fontFamily:"Helvetica, Arial, sans-serif",category:"sans-serif"},{name:"Verdana",fontFamily:"Verdana, Geneva, sans-serif",category:"sans-serif"},{name:"Open Sans",fontFamily:'"Open Sans", sans-serif',category:"sans-serif"},{name:"Roboto",fontFamily:"Roboto, sans-serif",category:"sans-serif"},{name:"Times New Roman",fontFamily:'"Times New Roman", Times, serif',category:"serif"},{name:"Georgia",fontFamily:"Georgia, serif",category:"serif"},{name:"Cambria",fontFamily:"Cambria, Georgia, serif",category:"serif"},{name:"Garamond",fontFamily:"Garamond, serif",category:"serif"},{name:"Courier New",fontFamily:'"Courier New", Courier, monospace',category:"monospace"},{name:"Consolas",fontFamily:"Consolas, monospace",category:"monospace"}];function Jt({value:e,onChange:t,fonts:o=mn,disabled:n=false,className:r,placeholder:l="Arial",width:u=120,showPreview:d=true}){let s=X.useMemo(()=>e?o.find(f=>f.fontFamily===e||f.name.toLowerCase()===e.toLowerCase())?.name||e:l,[e,o,l]),c=X.useCallback(a=>{let f=o.find(m=>m.name===a);f&&t?.(f.fontFamily);},[t,o]),p=X.useMemo(()=>{let a={"sans-serif":[],serif:[],monospace:[],other:[]};return o.forEach(f=>{let m=f.category||"other";a[m].push(f);}),a},[o]);return jsxs(ye,{value:s,onValueChange:c,disabled:n,children:[jsx(Se,{className:w("h-8 text-sm",r),style:{minWidth:typeof u=="number"?`${u}px`:u},"aria-label":"Select font family",children:jsx(et,{placeholder:l,children:s})}),jsxs(Ce,{className:"max-h-[300px]",children:[p["sans-serif"].length>0&&jsxs(Ee,{children:[jsx(De,{children:"Sans Serif"}),p["sans-serif"].map(a=>jsx(ce,{value:a.name,style:d?{fontFamily:a.fontFamily}:void 0,children:a.name},a.name))]}),p.serif.length>0&&jsxs(Fragment,{children:[jsx(Ge,{}),jsxs(Ee,{children:[jsx(De,{children:"Serif"}),p.serif.map(a=>jsx(ce,{value:a.name,style:d?{fontFamily:a.fontFamily}:void 0,children:a.name},a.name))]})]}),p.monospace.length>0&&jsxs(Fragment,{children:[jsx(Ge,{}),jsxs(Ee,{children:[jsx(De,{children:"Monospace"}),p.monospace.map(a=>jsx(ce,{value:a.name,style:d?{fontFamily:a.fontFamily}:void 0,children:a.name},a.name))]})]})]})]})}var Qt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,eo=clsx,to=(e,t)=>o=>{var n;if(t?.variants==null)return eo(e,o?.class,o?.className);let{variants:r,defaultVariants:l}=t,u=Object.keys(r).map(c=>{let p=o?.[c],a=l?.[c];if(p===null)return null;let f=Qt(p)||Qt(a);return r[c][f]}),d=o&&Object.entries(o).reduce((c,p)=>{let[a,f]=p;return f===void 0||(c[a]=f),c},{}),s=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,p)=>{let{class:a,className:f,...m}=p;return Object.entries(m).every(v=>{let[b,x]=v;return Array.isArray(x)?x.includes({...l,...d}[b]):{...l,...d}[b]===x})?[...c,a,f]:c},[]);return eo(e,u,s,o?.class,o?.className)};var hn=to("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-9 w-9","icon-sm":"h-7 w-7"}},defaultVariants:{variant:"default",size:"default"}}),W=X.forwardRef(({className:e,variant:t,size:o,...n},r)=>jsx("button",{className:w(hn({variant:t,size:o,className:e})),ref:r,...n}));W.displayName="Button";function h({size:e=20,className:t="",style:o,children:n}){return jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 -960 960 960",fill:"currentColor",className:t,style:{display:"inline-flex",flexShrink:0,...o},"aria-hidden":"true",children:n})}function gn(e){return jsx(h,{...e,children:jsx("path",{d:"M280-200v-80h284q63 0 109.5-40T720-420q0-60-46.5-100T564-560H312l104 104-56 56-200-200 200-200 56 56-104 104h252q97 0 166.5 63T800-420q0 94-69.5 157T564-200H280Z"})})}function bn(e){return jsx(h,{...e,children:jsx("path",{d:"M396-200q-97 0-166.5-63T160-420q0-94 69.5-157T396-640h252L544-744l56-56 200 200-200 200-56-56 104-104H396q-63 0-109.5 40T240-420q0 60 46.5 100T396-280h284v80H396Z"})})}function xn(e){return jsx(h,{...e,children:jsx("path",{d:"M640-640v-120H320v120h-80v-200h480v200h-80Zm-480 80h640-640Zm560 100q17 0 28.5-11.5T760-500q0-17-11.5-28.5T720-540q-17 0-28.5 11.5T680-500q0 17 11.5 28.5T720-460Zm-80 260v-160H320v160h320Zm80 80H240v-160H80v-240q0-51 35-85.5t85-34.5h560q51 0 85.5 34.5T880-520v240H720v160Zm80-240v-160q0-17-11.5-28.5T760-560H200q-17 0-28.5 11.5T160-520v160h80v-80h480v80h80Z"})})}function Tn(e){return jsx(h,{...e,children:jsx("path",{d:"M272-200v-560h221q65 0 120 40t55 111q0 51-23 78.5T602-491q25 11 55.5 41t30.5 90q0 89-65 124.5T501-200H272Zm121-112h104q48 0 58.5-24.5T566-372q0-11-10.5-35.5T494-432H393v120Zm0-228h93q33 0 48-17t15-38q0-24-17-39t-44-15h-95v109Z"})})}function yn(e){return jsx(h,{...e,children:jsx("path",{d:"M200-200v-100h160l120-360H320v-100h400v100H580L460-300h140v100H200Z"})})}function Sn(e){return jsx(h,{...e,children:jsx("path",{d:"M200-120v-80h560v80H200Zm123-223q-56-63-56-167v-330h103v336q0 56 28 91t82 35q54 0 82-35t28-91v-336h103v330q0 104-56 167t-157 63q-101 0-157-63Z"})})}function Cn(e){return jsx(h,{...e,children:jsx("path",{d:"M486-160q-76 0-135-45t-85-123l88-38q14 48 48.5 79t85.5 31q42 0 76-20t34-64q0-18-7-33t-19-27h112q5 14 7.5 28.5T694-340q0 86-61.5 133T486-160ZM80-480v-80h800v80H80Zm402-326q66 0 115.5 32.5T674-674l-88 39q-9-29-33.5-52T484-710q-41 0-68 18.5T386-640h-96q2-69 54.5-117.5T482-806Z"})})}function wn(e){return jsx(h,{...e,children:jsx("path",{d:"M760-600v-80q0-17 11.5-28.5T800-720h80v-40H760v-40h120q17 0 28.5 11.5T920-760v40q0 17-11.5 28.5T880-680h-80v40h120v40H760ZM235-160l185-291-172-269h106l124 200h4l123-200h107L539-451l186 291H618L482-377h-4L342-160H235Z"})})}function In(e){return jsx(h,{...e,children:jsx("path",{d:"M760-160v-80q0-17 11.5-28.5T800-280h80v-40H760v-40h120q17 0 28.5 11.5T920-320v40q0 17-11.5 28.5T880-240h-80v40h120v40H760Zm-525-80 185-291-172-269h106l124 200h4l123-200h107L539-531l186 291H618L482-457h-4L342-240H235Z"})})}function Pn(e){return jsx(h,{...e,children:jsx("path",{d:"M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"})})}function Mn(e){return jsx(h,{...e,children:jsx("path",{d:"m528-546-93-93-121-121h486v120H568l-40 94ZM792-56 460-388l-80 188H249l119-280L56-792l56-56 736 736-56 56Z"})})}function Zn(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Zm0-160v-80h480v80H120Zm0-160v-80h720v80H120Z"})})}function Rn(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h720v80H120Zm160-160v-80h400v80H280ZM120-440v-80h720v80H120Zm160-160v-80h400v80H280ZM120-760v-80h720v80H120Z"})})}function Ln(e){return jsx(h,{...e,children:jsx("path",{d:"M120-760v-80h720v80H120Zm240 160v-80h480v80H360ZM120-440v-80h720v80H120Zm240 160v-80h480v80H360ZM120-120v-80h720v80H120Z"})})}function kn(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Zm0-160v-80h720v80H120Z"})})}function It(e){return jsx(h,{...e,children:jsx("path",{d:"M240-160 80-320l56-56 64 62v-332l-64 62-56-56 160-160 160 160-56 56-64-62v332l64-62 56 56-160 160Zm240-40v-80h400v80H480Zm0-240v-80h400v80H480Zm0-240v-80h400v80H480Z"})})}function Hn(e){return jsx(h,{...e,children:jsx("path",{d:"M360-200v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360ZM200-160q-33 0-56.5-23.5T120-240q0-33 23.5-56.5T200-320q33 0 56.5 23.5T280-240q0 33-23.5 56.5T200-160Zm0-240q-33 0-56.5-23.5T120-480q0-33 23.5-56.5T200-560q33 0 56.5 23.5T280-480q0 33-23.5 56.5T200-400Zm-56.5-263.5Q120-687 120-720t23.5-56.5Q167-800 200-800t56.5 23.5Q280-753 280-720t-23.5 56.5Q233-640 200-640t-56.5-23.5Z"})})}function qn(e){return jsx(h,{...e,children:jsx("path",{d:"M120-80v-60h100v-30h-60v-60h60v-30H120v-60h120q17 0 28.5 11.5T280-280v40q0 17-11.5 28.5T240-200q17 0 28.5 11.5T280-160v40q0 17-11.5 28.5T240-80H120Zm0-280v-110q0-17 11.5-28.5T160-510h60v-30H120v-60h120q17 0 28.5 11.5T280-560v70q0 17-11.5 28.5T240-450h-60v30h100v60H120Zm60-280v-180h-60v-60h120v240h-60Zm180 440v-80h480v80H360Zm0-240v-80h480v80H360Zm0-240v-80h480v80H360Z"})})}function _n(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm0 440v-320l160 160-160 160Z"})})}function En(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h720v80H120Zm320-160v-80h400v80H440Zm0-160v-80h400v80H440Zm0-160v-80h400v80H440ZM120-760v-80h720v80H120Zm160 440L120-480l160-160v320Z"})})}function Dn(e){return jsx(h,{...e,children:jsx("path",{d:"M80 0v-160h800V0H80Zm140-280 210-560h100l210 560h-96l-50-144H368l-52 144h-96Zm176-224h168l-82-232h-4l-82 232Z"})})}function Nn(e){return jsx(h,{...e,children:jsx("path",{d:"M544-400 440-504 240-304l104 104 200-200Zm-47-161 104 104 199-199-104-104-199 199Zm-84-28 216 216-229 229q-24 24-56 24t-56-24l-2-2-26 26H60l126-126-2-2q-24-24-24-56t24-56l229-229Zm0 0 227-227q24-24 56-24t56 24l104 104q24 24 24 56t-24 56L629-373 413-589Z"})})}function Fn(e){return jsx(h,{...e,children:jsx("path",{d:"M800-436q0 36-8 69t-22 63l-62-60q6-17 9-34.5t3-37.5q0-47-17.5-89T650-600L480-768l-88 86-56-56 144-142 226 222q44 42 69 99.5T800-436Zm-8 380L668-180q-41 29-88 44.5T480-120q-133 0-226.5-92.5T160-436q0-51 16-98t48-90L56-792l56-56 736 736-56 56ZM480-200q36 0 68.5-10t61.5-28L280-566q-21 32-30.5 64t-9.5 66q0 98 70 167t170 69Zm-37-204Zm110-116Z"})})}function An(e){return jsx(h,{...e,children:jsx("path",{d:"M480-360 280-560h400L480-360Z"})})}function Bn(e){return jsx(h,{...e,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm240-240H200v160h240v-160Zm80 0v160h240v-160H520Zm-80-80v-160H200v160h240Zm80 0h240v-160H520v160ZM200-680h560v-80H200v80Z"})})}function On(e){return jsx(h,{...e,children:jsx("path",{d:"M760-120H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120ZM200-640h560v-120H200v120Zm100 80H200v360h100v-360Zm360 0v360h100v-360H660Zm-80 0H380v360h200v-360Z"})})}function zn(e){return jsx(h,{...e,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133ZM200-413h133v-134H200v134Zm213 0h134v-134H413v134Zm214 0h133v-134H627v134ZM200-627h133v-133H200v133Zm213 0h134v-133H413v133Zm214 0h133v-133H627v133Z"})})}function Vn(e){return jsx(h,{...e,children:jsx("path",{d:"M760-200v-120H200v120h560Zm0-200v-160H200v160h560Zm0-240v-120H200v120h560ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Z"})})}function Wn(e){return jsx(h,{...e,children:jsx("path",{d:"M121-280v-400q0-33 23.5-56.5T201-760h559q33 0 56.5 23.5T840-680v400q0 33-23.5 56.5T760-200H201q-33 0-56.5-23.5T121-280Zm79 0h133v-400H200v400Zm213 0h133v-400H413v400Zm213 0h133v-400H626v400Z"})})}function $n(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-720h720v720H120Zm640-80v-240H520v240h240Zm0-560H520v240h240v-240Zm-560 0v240h240v-240H200Zm0 560h240v-240H200v240Z"})})}function Gn(e){return jsx(h,{...e,children:jsx("path",{d:"M200-200h560v-560H200v560Zm-80 80v-720h720v720H120Zm160-320v-80h80v80h-80Zm160 160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 160v-80h80v80h-80Z"})})}function Un(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-640v-80h80v80h-80Zm320 640v-80h80v80h-80Zm160 0v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm-160 0v-80h80v80h-80ZM440-120v-320H120v-80h320v-320h80v320h320v80H520v320h-80Z"})})}function Kn(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function Yn(e){return jsx(h,{...e,children:jsx("path",{d:"M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"})})}function jn(e){return jsx(h,{...e,children:jsx("path",{d:"M200-440v-80h560v80H200Z"})})}function Xn(e){return jsx(h,{...e,children:jsx("path",{d:"M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"})})}function Jn(e){return jsx(h,{...e,children:jsx("path",{d:"M600-240v-80h160v80H600Zm0-320v-80h280v80H600Zm0 160v-80h240v80H600ZM120-640H80v-80h160v-60h160v60h160v80h-40v360q0 33-23.5 56.5T440-200H200q-33 0-56.5-23.5T120-280v-360Zm80 0v360h240v-360H200Zm0 0v360-360Z"})})}function Qn(e){return jsx(h,{...e,children:jsx("path",{d:"m296-160-56-56 200-200v-269L337-582l-57-57 200-200 201 201-57 57-104-104v301L296-160Zm368 1L536-286l57-57 127 128-56 56Z"})})}function er(e){return jsx(h,{...e,children:jsx("path",{d:"M440-160v-304L240-664v104h-80v-240h240v80H296l224 224v336h-80Zm154-376-58-58 128-126H560v-80h240v240h-80v-104L594-536Z"})})}function tr(e){return jsx(h,{...e,children:jsx("path",{d:"M360-160q-33 0-56.5-23.5T280-240q0-33 23.5-56.5T360-320q33 0 56.5 23.5T440-240q0 33-23.5 56.5T360-160Zm240 0q-33 0-56.5-23.5T520-240q0-33 23.5-56.5T600-320q33 0 56.5 23.5T680-240q0 33-23.5 56.5T600-160ZM360-400q-33 0-56.5-23.5T280-480q0-33 23.5-56.5T360-560q33 0 56.5 23.5T440-480q0 33-23.5 56.5T360-400Zm240 0q-33 0-56.5-23.5T520-480q0-33 23.5-56.5T600-560q33 0 56.5 23.5T680-480q0 33-23.5 56.5T600-400ZM360-640q-33 0-56.5-23.5T280-720q0-33 23.5-56.5T360-800q33 0 56.5 23.5T440-720q0 33-23.5 56.5T360-640Zm240 0q-33 0-56.5-23.5T520-720q0-33 23.5-56.5T600-800q33 0 56.5 23.5T680-720q0 33-23.5 56.5T600-640Z"})})}function or(e){return jsx(h,{...e,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"})})}function nr(e){return jsx(h,{...e,children:jsx("path",{d:"M120-280v-400h400v400H120Zm80-80h240v-240H200v240Zm-80-400v-80h720v80H120Zm480 160v-80h240v80H600Zm0 160v-80h240v80H600Zm0 160v-80h240v80H600ZM120-120v-80h720v80H120Z"})})}function rr(e){return jsx(h,{...e,children:jsx("path",{d:"M440-280v-400h400v400H440Zm80-80h240v-240H520v240ZM120-120v-80h720v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h240v80H120Zm0-160v-80h720v80H120Z"})})}function ir(e){return jsx(h,{...e,children:jsx("path",{d:"M160-440v-80h640v80H160Z"})})}function ar(e){return jsx(h,{...e,children:jsx("path",{d:"M200-120q-33 0-56.5-23.5T120-200v-480h80v480h480v80H200Zm160-240v80q-33 0-56.5-23.5T280-360h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm80-160h-80q0-33 23.5-56.5T360-840v80Zm80 480v-80h80v80h-80Zm0-480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm0 480v-80h80v80h-80Zm160-480v-80q33 0 56.5 23.5T840-760h-80Zm0 400h80q0 33-23.5 56.5T760-280v-80Zm0-80v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function lr(e){return jsx(h,{...e,children:jsx("path",{d:"M360-280q-33 0-56.5-23.5T280-360v-400q0-33 23.5-56.5T360-840h400q33 0 56.5 23.5T840-760v400q0 33-23.5 56.5T760-280H360Zm0-80h400v-400H360v400ZM200-200v80q-33 0-56.5-23.5T120-200h80Zm-80-80v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function sr(e){return jsx(h,{...e,children:jsx("path",{d:"M480-80 310-250l57-57 73 73v-166h80v165l72-73 58 58L480-80ZM250-310 80-480l169-169 57 57-72 72h166v80H235l73 72-58 58Zm460 0-57-57 73-73H560v-80h165l-73-72 58-58 170 170-170 170ZM440-560v-166l-73 73-57-57 170-170 170 170-57 57-73-73v166h-80Z"})})}function cr(e){return jsx(h,{...e,children:jsx("path",{d:"M440-120v-240h80v80h320v80H520v80h-80Zm-320-80v-80h240v80H120Zm160-160v-80H120v-80h160v-80h80v240h-80Zm160-80v-80h400v80H440Zm160-160v-240h80v80h160v80H680v80h-80Zm-480-80v-80h400v80H120Z"})})}function ur(e){return jsx(h,{...e,children:jsx("path",{d:"M522-80v-82q34-5 66.5-18t61.5-34l56 58q-42 32-88 51.5T522-80Zm-80 0Q304-98 213-199.5T122-438q0-75 28.5-140.5t77-114q48.5-48.5 114-77T482-798h6l-62-62 56-58 160 160-160 160-56-56 64-64h-8q-117 0-198.5 81.5T202-438q0 104 68 182.5T442-162v82Zm322-134-58-56q21-29 34-61.5t18-66.5h82q-5 50-24.5 96T764-214Zm76-264h-82q-5-34-18-66.5T706-606l58-56q32 39 51 86t25 98Z"})})}function pr(e){return jsx(h,{...e,children:jsx("path",{d:"M440-80q-50-5-96-24.5T256-156l56-58q29 21 61.5 34t66.5 18v82Zm80 0v-82q104-15 172-93.5T760-438q0-117-81.5-198.5T480-718h-8l64 64-56 56-160-160 160-160 56 58-62 62h6q75 0 140.5 28.5t114 77q48.5 48.5 77 114T840-438q0 137-91 238.5T520-80ZM198-214q-32-42-51.5-88T122-398h82q5 34 18 66.5t34 61.5l-58 56Zm-76-264q6-51 25-98t51-86l58 56q-21 29-34 61.5T204-478h-82Z"})})}function dr(e){return jsx(h,{...e,children:jsx("path",{d:"M280-160 80-360l200-200 56 57-103 103h287v80H233l103 103-56 57Zm400-240-56-57 103-103H440v-80h287L624-743l56-57 200 200-200 200Z"})})}function mr(e){return jsx(h,{...e,children:jsx("path",{d:"M320-440v-287L217-624l-57-56 200-200 200 200-57 56-103-103v287h-80ZM600-80 400-280l57-56 103 103v-287h80v287l103-103 57 56L600-80Z"})})}function fr(e){return jsx(h,{...e,children:jsx("path",{d:"M600-360ZM320-242q10 1 19.5 1.5t20.5.5q11 0 20.5-.5T400-242v82h400v-400h-82q1-10 1.5-19.5t.5-20.5q0-11-.5-20.5T718-640h82q33 0 56.5 23.5T880-560v400q0 33-23.5 56.5T800-80H400q-33 0-56.5-23.5T320-160v-82Zm40-78q-117 0-198.5-81.5T80-600q0-117 81.5-198.5T360-880q117 0 198.5 81.5T640-600q0 117-81.5 198.5T360-320Zm0-80q83 0 141.5-58.5T560-600q0-83-58.5-141.5T360-800q-83 0-141.5 58.5T160-600q0 83 58.5 141.5T360-400Zm0-200Z"})})}function hr(e){return jsx(h,{...e,children:jsx("path",{d:"M440-80q-33 0-56.5-23.5T360-160v-160H240q-33 0-56.5-23.5T160-400v-280q0-66 47-113t113-47h480v440q0 33-23.5 56.5T720-320H600v160q0 33-23.5 56.5T520-80h-80ZM240-560h480v-200h-40v160h-80v-160h-40v80h-80v-80H320q-33 0-56.5 23.5T240-680v120Zm0 160h480v-80H240v80Zm0 0v-80 80Z"})})}function vr(e){return jsx(h,{...e,children:jsx("path",{d:"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z"})})}function gr(e){return jsx(h,{...e,children:jsx("path",{d:"m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z"})})}function br(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h720v80H120Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function xr(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h720v80H120Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 480v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function Tr(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm160 0v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Z"})})}function yr(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm0-160v-80h80v80h-80Zm160 640v-80h80v80h-80Zm0-320v-80h80v80h-80Zm0-320v-80h80v80h-80Zm160 640v-720h80v720h-80Z"})})}function Sr(e){return jsx(h,{...e,children:jsx("path",{d:"M320-600q17 0 28.5-11.5T360-640q0-17-11.5-28.5T320-680q-17 0-28.5 11.5T280-640q0 17 11.5 28.5T320-600Zm160 0q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm160 0q17 0 28.5-11.5T680-640q0-17-11.5-28.5T640-680q-17 0-28.5 11.5T600-640q0 17 11.5 28.5T640-600ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z"})})}function Cr(e){return jsx(h,{...e,children:jsx("path",{d:"M160-200v-80h528l-42-42 56-56 138 138-138 138-56-56 42-42H160Zm116-200 164-440h80l164 440h-76l-38-112H392l-40 112h-76Zm138-176h132l-64-182h-4l-64 182Z"})})}function wr(e){return jsx(h,{...e,children:jsx("path",{d:"M588-132 440-280l148-148 56 58-50 50h96q29 0 49.5-20.5T760-390q0-29-20.5-49.5T690-460H160v-80h530q63 0 106.5 43.5T840-390q0 63-43.5 106.5T690-240h-96l50 50-56 58ZM160-240v-80h200v80H160Zm0-440v-80h640v80H160Z"})})}function Ir(e){return jsx(h,{...e,children:jsx("path",{d:"M480-120 320-280l56-56 64 63v-414l-64 63-56-56 160-160 160 160-56 57-64-64v414l64-63 56 56-160 160Z"})})}function Pr(e){return jsx(h,{...e,children:jsx("path",{d:"M120-120v-720h80v720h-80Zm640 0v-720h80v720h-80ZM280-440v-80h80v80h-80Zm160 0v-80h80v80h-80Zm160 0v-80h80v80h-80Z"})})}function Mr(e){return jsx(h,{...e,children:jsx("path",{d:"m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"})})}function Zr(e){return jsx(h,{...e,children:jsx("path",{d:"M80 0v-160h800V0H80Zm160-320h56l312-311-29-29-28-28-311 312v56Zm-80 80v-170l448-447q11-11 25.5-17t30.5-6q16 0 31 6t27 18l55 56q12 11 17.5 26t5.5 31q0 15-5.5 29.5T777-687L330-240H160Zm560-504-56-56 56 56ZM608-631l-29-29-28-28 57 57Z"})})}function Rr(e){return jsx(h,{...e,children:jsx("path",{d:"m247-904 57-56 343 343q23 23 23 57t-23 57L457-313q-23 23-57 23t-57-23L153-503q-23-23-23-57t23-57l190-191-96-96Zm153 153L209-560h382L400-751Zm360 471q-33 0-56.5-23.5T680-360q0-21 12.5-45t27.5-45q9-12 19-25t21-25q11 12 21 25t19 25q15 21 27.5 45t12.5 45q0 33-23.5 56.5T760-280ZM80 0v-160h800V0H80Z"})})}function Lr(e){return jsx(h,{...e,children:jsx("path",{d:"M160-760v-80h640v80H160Zm280 640v-408L336-424l-56-56 200-200 200 200-56 56-104-104v408h-80Z"})})}function kr(e){return jsx(h,{...e,children:jsx("path",{d:"M440-80v-168l-64 64-56-56 160-160 160 160-56 56-64-64v168h-80ZM160-440v-80h640v80H160Zm320-120L320-720l56-56 64 64v-168h80v168l64-64 56 56-160 160Z"})})}function Hr(e){return jsx(h,{...e,children:jsx("path",{d:"M160-120v-80h640v80H160Zm320-160L280-480l56-56 104 104v-408h80v408l104-104 56 56-200 200Z"})})}function qr(e){return jsx(h,{...e,children:jsx("path",{d:"M120-160v-40h720v40H120Zm0-120v-80h720v80H120Zm0-160v-120h720v120H120Zm0-200v-160h720v160H120Z"})})}function _r(e){return jsx(h,{...e,children:jsx("path",{d:"M480-528 296-344l-56-56 240-240 240 240-56 56-184-184Z"})})}function Er(e){return jsx(h,{...e,children:jsx("path",{d:"M480-344 240-584l56-56 184 184 184-184 56 56-240 240Z"})})}function Dr(e){return jsx(h,{...e,children:jsx("path",{d:"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"})})}function Nr(e){return jsx(h,{...e,children:jsx("path",{d:"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"})})}function Fr(e){return jsx(h,{...e,children:jsx("path",{d:"M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"})})}function Ar(e){return jsx(h,{...e,children:jsx("path",{d:"M120-440v-80h160v80H120Zm200 0v-80h160v80H320Zm200 0v-80h160v80H520Zm200 0v-80h120v80H720ZM240-120q-33 0-56.5-23.5T160-200v-120h80v120h480v-120h80v120q0 33-23.5 56.5T720-120H240Zm-80-520v-120q0-33 23.5-56.5T240-840h480q33 0 56.5 23.5T800-760v120h-80v-120H240v120h-80Z"})})}function Br(e){return jsx(h,{...e,children:jsx("path",{d:"M313-440l224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"})})}function Or(e){return jsx(h,{...e,children:jsx("path",{d:"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"})})}function zr(e){return jsx(h,{...e,children:jsx("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"})})}function Vr(e){return jsx(h,{...e,children:jsx("path",{d:"M440-400h80v-120h120v-80H520v-120h-80v120H320v80h120v120ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function Wr(e){return jsx(h,{...e,children:jsx("path",{d:"M240-400h480v-80H240v80Zm0-120h480v-80H240v80Zm0-120h480v-80H240v80ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function $r(e){return jsx(h,{...e,children:jsx("path",{d:"M160-400h280v-80H160v80Zm0-160h440v-80H160v80Zm0-160h440v-80H160v80Zm360 360v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q8 9 12.5 20t4.5 22q0 11-4 22.5T863-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z"})})}function Gr(e){return jsx(h,{...e,children:jsx("path",{d:"M240-400h122l200-200q9-9 13.5-20.5T580-643q0-11-5-21.5T562-684l-36-38q-9-9-20-13.5t-23-4.5q-11 0-22.5 4.5T440-722L240-522v122Zm280-243-37-37 37 37ZM300-460v-38l101-101 20 18 18 20-101 101h-38Zm121-121 18 20-38-38 20 18Zm26 181h273v-80H527l-80 80ZM80-80v-720q0-33 23.5-56.5T160-880h640q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H240L80-80Zm126-240h594v-480H160v525l46-45Zm-46 0v-480 480Z"})})}function Ur(e){return jsx(h,{...e,children:jsx("path",{d:"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"})})}function Kr(e){return jsx(h,{...e,children:jsx("path",{d:"M360-360v-200q-66 0-113-47t-47-113q0-66 47-113t113-47h320v80h-80v440h-80v-440h-80v440h-80Zm0-280v-160q-33 0-56.5 23.5T280-720q0 33 23.5 56.5T360-640Zm0-80ZM680-80l-56-56 64-64H120v-80h568l-64-64 56-56 160 160L680-80Z"})})}function Yr(e){return jsx(h,{...e,children:jsx("path",{d:"M360-360v-200q-66 0-113-47t-47-113q0-66 47-113t113-47h320v80h-80v440h-80v-440h-80v440h-80Zm-88 160 64 64-56 56-160-160 160-160 56 56-64 64h568v80H272Zm88-440v-160q-33 0-56.5 23.5T280-720q0 33 23.5 56.5T360-640Zm0-80Z"})})}var jr={undo:gn,redo:bn,print:xn,format_bold:Tn,format_italic:yn,format_underlined:Sn,strikethrough_s:Cn,superscript:wn,subscript:In,link:Pn,format_clear:Mn,format_align_left:Zn,format_align_center:Rn,format_align_right:Ln,format_align_justify:kn,format_line_spacing:It,format_list_bulleted:Hn,format_list_numbered:qn,format_indent_increase:_n,format_indent_decrease:En,format_color_text:Dn,ink_highlighter:Nn,format_color_reset:Fn,arrow_drop_down:An,table:Bn,table_chart:On,grid_on:zn,table_rows:Vn,view_column:Wn,border_all:$n,border_outer:Gn,border_inner:Un,border_clear:Kn,add:Yn,remove:jn,delete:Xn,delete_sweep:Jn,call_merge:Qn,call_split:er,drag_indicator:tr,image:or,format_image_left:nr,format_image_right:rr,horizontal_rule:ir,flip_to_back:ar,flip_to_front:lr,open_with:sr,tune:cr,rotate_right:ur,rotate_left:pr,swap_horiz:dr,swap_vert:mr,shapes:fr,format_paint:hr,expand_more:vr,expand_less:gr,border_top:br,border_bottom:xr,border_left:Tr,border_right:yr,padding:Sr,text_rotation_none:Cr,wrap_text:wr,height:Ir,fit_width:Pr,settings:Mr,border_color:Zr,format_color_fill:Rr,vertical_align_top:Lr,vertical_align_center:kr,vertical_align_bottom:Hr,line_weight:qr,keyboard_arrow_up:_r,keyboard_arrow_down:Er,keyboard_arrow_left:Dr,keyboard_arrow_right:Nr,more_vert:Fr,page_break:Ar,arrow_back:Br,check:Or,close:zr,add_comment:Vr,comment:Wr,edit_note:$r,rate_review:Gr,visibility:Ur,format_textdirection_l_to_r:Kr,format_textdirection_r_to_l:Yr};function g({name:e,size:t=20,className:o="",style:n}){let r=jr[e];return r?jsx(r,{size:t,className:o,style:n}):(console.warn(`Icon not found: ${e}`),jsx("span",{className:o,style:{fontSize:t,width:t,height:t,...n},children:e}))}function G({isOpen:e,onClose:t,align:o="left"}){let n=useRef(null),r=useRef(null),[l,u]=useState({top:0,left:0});useEffect(()=>{if(!e||!n.current)return;let c=n.current.getBoundingClientRect();o==="right"?requestAnimationFrame(()=>{if(r.current){let p=r.current.getBoundingClientRect();u({top:c.bottom+4,left:c.right-p.width});}else u({top:c.bottom+4,left:c.left});}):u({top:c.bottom+4,left:c.left});},[e,o]),useEffect(()=>{if(!e)return;let c=f=>{let m=f.target;n.current&&!n.current.contains(m)&&r.current&&!r.current.contains(m)&&t();},p=f=>{f.key==="Escape"&&t();},a=()=>t();return document.addEventListener("mousedown",c),document.addEventListener("keydown",p),window.addEventListener("scroll",a,true),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",p),window.removeEventListener("scroll",a,true);}},[e,t]);let d=useCallback(c=>{c.preventDefault(),c.stopPropagation();},[]),s={position:"fixed",top:l.top,left:l.left,zIndex:1e4};return {containerRef:n,dropdownRef:r,dropdownStyle:s,handleMouseDown:d}}var ei=[8,9,10,11,12,14,16,18,20,24,28,36,48,72],ti=1,oi=400;function lo(e){return e/2}function ql(e){return e*2}function io(e,t,o){for(let n of t)if(n>e)return n;return Math.min(e+1,o)}function ao(e,t,o){for(let n=t.length-1;n>=0;n--)if(t[n]<e)return t[n];return Math.max(e-1,o)}function so({value:e,onChange:t,sizes:o=ei,disabled:n=false,className:r,placeholder:l="11",minSize:u=ti,maxSize:d=oi}){let[s,c]=useState(false),[p,a]=useState(""),[f,m]=useState(false),v=useRef(null),b=useCallback(()=>{m(false),c(false);},[]),{containerRef:x,dropdownRef:P,dropdownStyle:T}=G({isOpen:f,onClose:b}),I=e??(parseInt(l,10)||11),L=e!==void 0?e.toString():l,M=useCallback(y=>{if(y.preventDefault(),n)return;let D=ao(I,o,u);t?.(D);},[I,o,u,n,t]),O=useCallback(y=>{if(y.preventDefault(),n)return;let D=io(I,o,d);t?.(D);},[I,o,d,n,t]),F=useCallback(y=>{y.preventDefault(),!n&&(c(true),a(L),m(true),requestAnimationFrame(()=>{v.current?.focus(),v.current?.select();}));},[n,L]),Te=useCallback(y=>{a(y.target.value);},[]),ie=useCallback(()=>{c(false);let y=parseFloat(p);if(!isNaN(y)&&y>=u&&y<=d){let D=Math.round(y*2)/2;t?.(D);}},[p,u,d,t]),me=useCallback(y=>{if(y.key==="Enter")y.preventDefault(),ie(),m(false);else if(y.key==="Escape")c(false),m(false);else if(y.key==="ArrowUp"){y.preventDefault();let D=io(I,o,d);a(D.toString()),t?.(D);}else if(y.key==="ArrowDown"){y.preventDefault();let D=ao(I,o,u);a(D.toString()),t?.(D);}},[ie,I,o,d,u,t]),Z=useCallback(y=>{t?.(y),m(false),c(false);},[t]),K=useCallback(y=>{y.target.tagName!=="INPUT"&&y.preventDefault();},[]);return jsxs("div",{ref:x,className:w("flex items-center",r),onMouseDown:K,children:[jsx(W,{variant:"ghost",size:"icon-sm",className:w("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-r-none",n&&"opacity-30 cursor-not-allowed"),onMouseDown:M,disabled:n||I<=u,"aria-label":"Decrease font size","data-testid":"font-size-decrease",children:jsx(g,{name:"remove",size:18})}),jsx("div",{className:"relative",children:s?jsx("input",{ref:v,type:"text",value:p,onChange:Te,onBlur:ie,onKeyDown:me,className:w("h-7 w-10 text-center text-sm border border-slate-300 bg-white","focus:outline-none focus:ring-1 focus:ring-slate-400","rounded-none"),"aria-label":"Font size","data-testid":"font-size-input"}):jsx("button",{type:"button",onClick:F,className:w("h-7 w-10 text-center text-sm border border-slate-200 bg-white","hover:border-slate-300 hover:bg-slate-50","focus:outline-none focus:ring-1 focus:ring-slate-400","rounded-none",n&&"opacity-50 cursor-not-allowed"),disabled:n,"aria-label":"Font size","aria-haspopup":"listbox","aria-expanded":f,"data-testid":"font-size-display",children:L})}),f&&jsx("div",{ref:P,style:{...T,backgroundColor:"white",border:"1px solid #e2e8f0",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",maxHeight:240,overflowY:"auto",minWidth:60},role:"listbox","aria-label":"Font sizes",children:o.map(y=>jsx("button",{type:"button",onClick:()=>Z(y),className:w("w-full px-3 py-1.5 text-sm text-left","hover:bg-slate-100",y===I&&"bg-slate-100 font-medium"),role:"option","aria-selected":y===I,children:y},y))}),jsx(W,{variant:"ghost",size:"icon-sm",className:w("h-7 w-7 text-slate-500 hover:text-slate-900 hover:bg-slate-100/80 rounded-l-none",n&&"opacity-30 cursor-not-allowed"),onMouseDown:O,disabled:n||I>=d,"aria-label":"Increase font size","data-testid":"font-size-increase",children:jsx(g,{name:"add",size:18})})]})}var ii=[{name:"Dark Red",hex:"C00000"},{name:"Red",hex:"FF0000"},{name:"Orange",hex:"FFC000"},{name:"Yellow",hex:"FFFF00"},{name:"Light Green",hex:"92D050"},{name:"Green",hex:"00B050"},{name:"Light Blue",hex:"00B0F0"},{name:"Blue",hex:"0070C0"},{name:"Dark Blue",hex:"002060"},{name:"Purple",hex:"7030A0"}],tt=18,ai=2,li={position:"relative",display:"inline-block"},si={display:"flex",alignItems:"center",justifyContent:"center",width:"40px",height:"32px",padding:"2px 6px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},ci={padding:"10px",backgroundColor:"#fff",border:"1px solid #d0d0d0",borderRadius:"6px",boxShadow:"0 4px 16px rgba(0, 0, 0, 0.15)",width:"auto"},Mt={fontSize:"11px",color:"#666",marginBottom:"4px",fontWeight:500},Zt={height:"1px",backgroundColor:"#e0e0e0",margin:"8px 0"},po={display:"grid",gap:`${ai}px`},ot={width:`${tt}px`,height:`${tt}px`,border:"1px solid #c0c0c0",borderRadius:"2px",cursor:"pointer",padding:0,transition:"transform 0.1s, border-color 0.1s"},mo={...ot,transform:"scale(1.15)",borderColor:"#333",zIndex:1},fo={...ot,borderWidth:"2px",borderColor:"#0066cc",boxShadow:"0 0 0 1px #0066cc"},ui={display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"5px 8px",border:"1px solid #d0d0d0",borderRadius:"4px",backgroundColor:"#fff",cursor:"pointer",fontSize:"12px",color:"#333"},pi={display:"flex",alignItems:"center",gap:"6px"},di={width:"70px",height:"24px",padding:"2px 6px",border:"1px solid #ccc",borderRadius:"3px",fontSize:"12px"},mi={height:"24px",padding:"0 10px",border:"1px solid #ccc",borderRadius:"3px",backgroundColor:"#f5f5f5",fontSize:"12px",cursor:"pointer"},fi={width:"16px",height:"4px",borderRadius:"1px",marginTop:"-2px"};function uo(e,t,o){if(!e)return t==="text"||t==="border"?"#000000":"transparent";if(typeof e=="string"){if(t==="highlight"){let n=b$1(e);return n||(e==="none"?"transparent":e.startsWith("#")?e:`#${e}`)}return e.startsWith("#")?e:`#${e}`}return a(e,o)}function hi(e){let t=e.replace(/^#/,"");if(t.length!==6)return false;let o=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16);return (o*299+n*587+r*114)/1e3>230}function ho(e,t,o){return e?(typeof e=="string"?e.replace(/^#/,"").toUpperCase():a(e,o).replace(/^#/,"").toUpperCase())===t.toUpperCase():false}function vi({matrix:e,selectedColor:t,theme:o,onSelect:n}){let[r,l]=useState(null);return jsx("div",{style:{...po,gridTemplateColumns:`repeat(10, ${tt}px)`},children:e.flatMap((u,d)=>u.map((s,c)=>{let p=`${d}-${c}`,a=r===p,f=ho(t,s.hex,o);return jsx("button",{type:"button",style:{...f?fo:a?mo:ot,backgroundColor:`#${s.hex}`},title:s.label,"aria-label":s.label,"aria-selected":f,onClick:()=>n(s),onMouseDown:m=>m.preventDefault(),onMouseEnter:()=>l(p),onMouseLeave:()=>l(null)},p)}))})}function gi({selectedColor:e,theme:t,onSelect:o}){let[n,r]=useState(null);return jsx("div",{style:{...po,gridTemplateColumns:`repeat(10, ${tt}px)`},children:ii.map((l,u)=>{let d=n===u,s=ho(e,l.hex,t);return jsx("button",{type:"button",style:{...s?fo:d?mo:ot,backgroundColor:`#${l.hex}`},title:l.name,"aria-label":l.name,"aria-selected":s,onClick:()=>o(l.hex),onMouseDown:c=>c.preventDefault(),onMouseEnter:()=>r(u),onMouseLeave:()=>r(null)},l.hex)})})}function ke({mode:e,value:t,onChange:o,theme:n,disabled:r=false,className:l,style:u,title:d,icon:s,autoLabel:c}){let[p$1,a]=useState(false),[f,m]=useState(false),[v,b]=useState("");useEffect(()=>{let C=uo(t,e,n).replace(/^#/,"");/^[0-9A-Fa-f]{6}$/.test(C)&&b(C.toUpperCase());},[t,e,n]);let x=useCallback(()=>a(false),[]),{containerRef:P,dropdownRef:T,dropdownStyle:I}=G({isOpen:p$1,onClose:x}),L=n?.colorScheme??null,M=useMemo(()=>p(L),[L]),O=useMemo(()=>uo(t,e,n),[t,e,n]),F=useCallback(()=>{r||a(C=>!C);},[r]),Te=useCallback(C=>{if(e==="highlight")o?.(C.hex);else {let Y={themeColor:C.themeSlot,rgb:C.hex};C.tint&&(Y.themeTint=C.tint),C.shade&&(Y.themeShade=C.shade),o?.(Y);}a(false);},[e,o]),ie=useCallback(C=>{o?.(e==="highlight"?C:{rgb:C}),a(false);},[e,o]),me=useCallback(()=>{o?.(e==="highlight"?"none":{auto:true}),a(false);},[e,o]),Z=useCallback(()=>{let C=v.replace(/^#/,"").toUpperCase();/^[0-9A-F]{6}$/i.test(C)&&(o?.(e==="highlight"?C:{rgb:C}),a(false),b(""));},[e,v,o]),K={...si,...r?{cursor:"default",opacity:.38}:p$1?{backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"}:f?{backgroundColor:"var(--doc-bg-hover)"}:{}},y=e==="text"?"Font Color":e==="highlight"?"Text Highlight Color":"Border Color",D=s??(e==="text"?"format_color_text":e==="highlight"?"ink_highlighter":"border_color");return jsxs("div",{ref:P,className:`docx-advanced-color-picker ${l||""}`,style:{...li,...u},children:[jsxs("button",{type:"button",className:"docx-advanced-color-picker-button",style:K,onClick:F,onMouseDown:C=>C.preventDefault(),onMouseEnter:()=>m(true),onMouseLeave:()=>m(false),disabled:r,title:d||y,"aria-label":d||y,"aria-haspopup":"true","aria-expanded":p$1,children:[jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:0},children:[jsx(g,{name:D,size:18}),jsx("div",{style:{...fi,backgroundColor:O==="transparent"?"#fff":O,outline:O==="transparent"||hi(O)?"1px solid #bbb":"none"}})]}),jsx(g,{name:"arrow_drop_down",size:14})]}),p$1&&jsx("div",{ref:T,className:"docx-advanced-color-picker-dropdown",style:{...I,...ci},role:"dialog","aria-label":`${y} picker`,onMouseDown:C=>{C.target.tagName!=="INPUT"&&C.preventDefault();},children:jsxs(Fragment,{children:[jsxs("button",{type:"button",style:ui,onClick:me,onMouseDown:C=>C.preventDefault(),children:[e==="highlight"?jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",border:"1px solid #ccc",borderRadius:"2px",position:"relative",backgroundColor:"#fff"},children:jsx("span",{style:{position:"absolute",top:"50%",left:"-1px",right:"-1px",height:"2px",backgroundColor:"#ff0000",transform:"rotate(-45deg)"}})}):jsx("span",{style:{display:"inline-block",width:"16px",height:"16px",backgroundColor:"#000",borderRadius:"2px"}}),c??(e==="highlight"?"No Color":"Automatic")]}),jsx("div",{style:Zt}),jsx("div",{style:Mt,children:"Theme Colors"}),jsx(vi,{matrix:M,selectedColor:t,theme:n,onSelect:Te}),jsx("div",{style:Zt}),jsx("div",{style:Mt,children:"Standard Colors"}),jsx(gi,{selectedColor:t,theme:n,onSelect:ie}),jsx("div",{style:Zt}),jsx("div",{style:Mt,children:"Custom Color"}),jsxs("div",{style:pi,children:[jsx("span",{style:{fontSize:"12px",color:"#666"},children:"#"}),jsx("input",{type:"text",style:di,value:v,onChange:C=>b(C.target.value.replace(/[^0-9A-Fa-f]/g,"").slice(0,6)),onKeyDown:C=>{C.key==="Enter"&&Z();},onMouseDown:C=>{C.stopPropagation();},placeholder:"FF0000",maxLength:6,"aria-label":"Custom hex color"}),jsx("button",{type:"button",style:{...mi,opacity:/^[0-9A-Fa-f]{6}$/.test(v)?1:.4,cursor:/^[0-9A-Fa-f]{6}$/.test(v)?"pointer":"default"},onClick:Z,onMouseDown:C=>C.preventDefault(),disabled:!/^[0-9A-Fa-f]{6}$/.test(v),children:"Apply"})]})]})})]})}function J({content:e,children:t,side:o="bottom",delayMs:n=400}){let[r,l]=X.useState(false),[u,d]=X.useState({x:0,y:0}),s=X.useRef(null),c=X.useRef(null),p=X.useCallback(()=>{c.current=setTimeout(()=>{if(s.current){let v=s.current.getBoundingClientRect(),b=v.left+v.width/2,x=o==="top"?v.top-8:v.bottom+8;d({x:b,y:x});}l(true);},n);},[n,o]),a=X.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),l(false);},[]);X.useEffect(()=>()=>{c.current&&clearTimeout(c.current);},[]);let f=t.props,m=X.cloneElement(t,{ref:s,onMouseEnter:v=>{p(),f.onMouseEnter?.(v);},onMouseLeave:v=>{a(),f.onMouseLeave?.(v);}});return jsxs(Fragment,{children:[m,r&&jsx("div",{className:"fixed z-50 px-2 py-1 text-xs font-medium text-white bg-slate-900 rounded-md shadow-lg",style:{left:u.x,top:u.y,transform:o==="top"?"translate(-50%, -100%)":o==="bottom"?"translate(-50%, 0)":void 0},children:e})]})}var Ye=20,Rt=[{value:"left",label:"Align Left",icon:jsx(g,{name:"format_align_left",size:Ye}),iconName:"format_align_left",shortcut:"Ctrl+L"},{value:"center",label:"Center",icon:jsx(g,{name:"format_align_center",size:Ye}),iconName:"format_align_center",shortcut:"Ctrl+E"},{value:"right",label:"Align Right",icon:jsx(g,{name:"format_align_right",size:Ye}),iconName:"format_align_right",shortcut:"Ctrl+R"},{value:"both",label:"Justify",icon:jsx(g,{name:"format_align_justify",size:Ye}),iconName:"format_align_justify",shortcut:"Ctrl+J"}];function bo({value:e="left",onChange:t,disabled:o=false}){let[n,r]=useState(false),l=useCallback(()=>r(false),[]),{containerRef:u,dropdownRef:d,dropdownStyle:s,handleMouseDown:c}=G({isOpen:n,onClose:l}),p=useCallback(m=>{o||t?.(m),r(false);},[o,t]),a=Rt.find(m=>m.value===e)||Rt[0],f=jsxs(W,{variant:"ghost",size:"icon-sm",className:w("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",n&&"bg-slate-100",o&&"opacity-30 cursor-not-allowed"),onMouseDown:c,onClick:()=>!o&&r(m=>!m),disabled:o,"aria-label":`${a.label}${a.shortcut?` (${a.shortcut})`:""}`,"aria-expanded":n,"aria-haspopup":"true","data-testid":"toolbar-alignment",children:[jsx(g,{name:a.iconName,size:Ye}),jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:u,style:{position:"relative",display:"inline-block"},children:[n?f:jsx(J,{content:`${a.label}${a.shortcut?` (${a.shortcut})`:""}`,children:f}),n&&!o&&jsx("div",{ref:d,style:{...s,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:m=>m.stopPropagation(),children:jsx("div",{style:{display:"flex",gap:2},children:Rt.map(m=>{let v=e===m.value;return jsx("button",{type:"button",title:`${m.label}${m.shortcut?` (${m.shortcut})`:""}`,"data-testid":`alignment-${m.value}`,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:v?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:v?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:b=>b.preventDefault(),onMouseEnter:b=>{v||(b.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:b=>{b.currentTarget.style.backgroundColor=v?"var(--doc-primary-light)":"transparent";},onClick:()=>p(m.value),children:jsx(g,{name:m.iconName,size:18})},m.value)})})})]})}var Ii={display:"inline-flex",alignItems:"center",gap:"4px"},xo={display:"inline-flex",alignItems:"center",gap:"4px"},at={display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",padding:"4px",border:"none",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",transition:"background-color 0.1s",color:"var(--doc-text-muted)"},Pi={...at,backgroundColor:"var(--doc-bg-hover)"},Mi={...at,backgroundColor:"var(--doc-primary-light)",color:"var(--doc-primary)"},Zi={...at,cursor:"default",opacity:.38},Ri={width:"28px",height:"28px",padding:"2px"},Li={width:"1px",height:"20px",backgroundColor:"var(--doc-border)",margin:"0 6px"},nt=20;function rt({active:e=false,disabled:t=false,title:o,onClick:n,children:r,className:l,style:u}){let[d,s]=useState(false),c={...t?Zi:e?Mi:d?Pi:at,...u},p=a=>{a.preventDefault();};return jsx("button",{type:"button",className:`docx-list-button ${e?"docx-list-button-active":""} ${t?"docx-list-button-disabled":""} ${l||""}`,style:c,onMouseDown:p,onClick:t?void 0:n,onMouseEnter:()=>s(true),onMouseLeave:()=>s(false),disabled:t,title:o,"aria-label":o,"aria-pressed":e,role:"button",children:r})}function To({listState:e,onBulletList:t,onNumberedList:o,onIndent:n,onOutdent:r,disabled:l=false,className:u,style:d,showIndentButtons:s=true,compact:c=false,hasIndent:p=false}){let a=useCallback(()=>c?{...Ri}:{},[c]),f=e?.type==="bullet",m=e?.type==="numbered",b=(e?.isInList||f||m)&&(e?.level??0)>0||p;return jsxs("div",{className:`docx-list-buttons ${u||""}`,style:{...Ii,...d},role:"group","aria-label":"List formatting",children:[jsxs("div",{style:xo,role:"group","aria-label":"List type",children:[jsx(rt,{active:f,disabled:l,title:"Bullet List",onClick:t,style:a(),children:jsx(g,{name:"format_list_bulleted",size:nt})}),jsx(rt,{active:m,disabled:l,title:"Numbered List",onClick:o,style:a(),children:jsx(g,{name:"format_list_numbered",size:nt})})]}),s&&jsxs(Fragment,{children:[jsx("div",{style:Li,role:"separator"}),jsxs("div",{style:xo,role:"group","aria-label":"List indentation",children:[jsx(rt,{active:false,disabled:l||!b,title:"Decrease Indent",onClick:r,style:a(),children:jsx(g,{name:"format_indent_decrease",size:nt})}),jsx(rt,{active:false,disabled:l,title:"Increase Indent",onClick:n,style:a(),children:jsx(g,{name:"format_indent_increase",size:nt})})]})]})]})}function yo(){return {type:"none",level:0,isInList:false}}var Hi=[{label:"Single",value:1,twipsValue:240},{label:"1.15",value:1.15,twipsValue:276},{label:"1.5",value:1.5,twipsValue:360},{label:"Double",value:2,twipsValue:480}];function Co({value:e,onChange:t,options:o=Hi,disabled:n=false,className:r}){let l=X.useMemo(()=>e===void 0?o[0]:o.find(d=>d.twipsValue===e)||o[0],[e,o]),u=X.useCallback(d=>{let s=parseInt(d,10);isNaN(s)||t?.(s);},[t]);return jsxs(ye,{value:l.twipsValue.toString(),onValueChange:u,disabled:n,children:[jsx(Se,{className:w("h-8 text-sm gap-0.5 px-2",r),style:{width:"auto"},title:`Line spacing: ${l.label}`,children:jsx(It,{className:"h-5 w-5 shrink-0"})}),jsxs(Ce,{children:[o.map(d=>jsx(ce,{value:d.twipsValue.toString(),children:d.label},d.twipsValue)),jsx(Ge,{}),jsx(Ee,{children:jsx(De,{children:"Paragraph spacing"})})]})]})}var wo=[{styleId:"Normal",name:"Normal text",type:"paragraph",isDefault:true,priority:0,qFormat:true,fontSize:22},{styleId:"Title",name:"Title",type:"paragraph",priority:1,qFormat:true,fontSize:52,bold:true},{styleId:"Subtitle",name:"Subtitle",type:"paragraph",priority:2,qFormat:true,fontSize:30,color:"666666"},{styleId:"Heading1",name:"Heading 1",type:"paragraph",priority:3,qFormat:true,fontSize:40,bold:true},{styleId:"Heading2",name:"Heading 2",type:"paragraph",priority:4,qFormat:true,fontSize:32,bold:true},{styleId:"Heading3",name:"Heading 3",type:"paragraph",priority:5,qFormat:true,fontSize:28,bold:true}],qi="#4a6c8c",_i={Title:26,Subtitle:18,Heading1:24,Heading2:18,Heading3:16,Heading4:14,Heading5:13,Heading6:13,Normal:14};function Ei(e){let t={},o=_i[e.styleId];if(o)t.fontSize=`${o}px`;else {let n=e.fontSize?e.fontSize/2:11,r=Math.min(Math.max(n,11),20);t.fontSize=`${r}px`;}return t.lineHeight="1.3",e.bold&&(t.fontWeight="bold"),e.italic&&(t.fontStyle="italic"),e.color?t.color=`#${e.color}`:e.styleId.startsWith("Heading")&&(t.color=qi),t}function Io({value:e,onChange:t,styles:o,disabled:n=false,className:r,width:l=120}){let u=X.useMemo(()=>!o||o.length===0?wo:o.filter(a=>a.type==="paragraph").filter(a=>a.qFormat?true:!(a.hidden||a.semiHidden)).map(a=>{let f=wo.find(m=>m.styleId===a.styleId);return {styleId:a.styleId,name:a.name||a.styleId,type:a.type,isDefault:a.default,qFormat:a.qFormat,priority:a.uiPriority??99,fontSize:a.rPr?.fontSize??f?.fontSize,bold:a.rPr?.bold??f?.bold,italic:a.rPr?.italic??f?.italic,color:a.rPr?.color?.rgb??f?.color}}).sort((a,f)=>(a.priority??99)-(f.priority??99)),[o]),d=X.useCallback(p=>{t?.(p);},[t]),s=e||"Normal",c=u.find(p=>p.styleId===s)?.name||s;return jsxs(ye,{value:s,onValueChange:d,disabled:n,children:[jsx(Se,{className:w("h-8 text-sm",r),style:{width:typeof l=="number"?`${l}px`:l},"aria-label":"Select paragraph style",children:jsx("span",{className:"truncate",children:c})}),jsx(Ce,{className:"min-w-[260px] max-h-[400px]",children:u.map(p=>jsx(ce,{value:p.styleId,className:"py-2.5 px-3",children:jsx("span",{style:Ei(p),children:p.name})},p.styleId))})]})}var Ni=[{value:.5,label:"50%"},{value:.75,label:"75%"},{value:1,label:"100%"},{value:1.25,label:"125%"},{value:1.5,label:"150%"},{value:2,label:"200%"}];function Po({value:e=1,onChange:t,levels:o=Ni,disabled:n=false,className:r,compact:l=false}){let u=X.useMemo(()=>{let s=o.find(c=>Math.abs(c.value-e)<.001);return s?s.label:`${Math.round(e*100)}%`},[o,e]),d=X.useCallback(s=>{let c=parseFloat(s);isNaN(c)||t?.(c);},[t]);return jsxs(ye,{value:e.toString(),onValueChange:d,disabled:n,children:[jsx(Se,{className:w(l?"h-7 min-w-[55px] text-xs":"h-8 min-w-[70px] text-sm",r),"aria-label":`Zoom: ${u}`,children:jsx(et,{placeholder:"100%",children:u})}),jsx(Ce,{children:o.map(s=>jsx(ce,{value:s.value.toString(),children:s.label},s.value))})]})}var Bi=[{action:"borderAll",icon:"border_all",label:"All borders"},{action:"borderOutside",icon:"border_outer",label:"Outside borders"},{action:"borderInside",icon:"border_inner",label:"Inside borders"},{action:"borderTop",icon:"border_top",label:"Top border"},{action:"borderBottom",icon:"border_bottom",label:"Bottom border"},{action:"borderLeft",icon:"border_left",label:"Left border"},{action:"borderRight",icon:"border_right",label:"Right border"},{action:"borderNone",icon:"border_clear",label:"No borders"}];function Ro({onAction:e,disabled:t=false}){let[o,n]=useState(false),r=useCallback(()=>n(false),[]),{containerRef:l,dropdownRef:u,dropdownStyle:d,handleMouseDown:s}=G({isOpen:o,onClose:r}),c=useCallback(a=>{e(a),n(false);},[e]),p=jsxs(W,{variant:"ghost",size:"icon-sm",className:w("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:s,onClick:()=>!t&&n(a=>!a),disabled:t,"aria-label":"Border style","aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-borders",children:[jsx(g,{name:"border_all",size:20}),jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:l,style:{position:"relative",display:"inline-block"},children:[o?p:jsx(J,{content:"Borders",children:p}),o&&!t&&jsx("div",{ref:u,style:{...d,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:a=>a.stopPropagation(),children:jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:2},children:Bi.map(({action:a,icon:f,label:m})=>jsx("button",{type:"button",title:m,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:"transparent",cursor:"pointer",color:"var(--doc-text)"},onMouseDown:v=>v.preventDefault(),onMouseEnter:v=>{v.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:v=>{v.currentTarget.style.backgroundColor="transparent";},onClick:()=>c(a),children:jsx(g,{name:f,size:18})},typeof a=="string"?a:a.type))})})]})}function Lo({onAction:e,disabled:t=false,theme:o,value:n}){let r=useCallback(l=>{typeof l=="string"?e({type:"borderColor",color:l.replace(/^#/,"")}):l.rgb?e({type:"borderColor",color:l.rgb.replace(/^#/,"")}):l.auto&&e({type:"borderColor",color:"000000"});},[e]);return jsx(ke,{mode:"border",value:n,onChange:r,theme:o,disabled:t,title:"Border Color"})}var Wi=[{size:4,label:"0.5 pt",thickness:.5},{size:8,label:"1 pt",thickness:1},{size:12,label:"1.5 pt",thickness:1.5},{size:16,label:"2 pt",thickness:2},{size:24,label:"3 pt",thickness:3}];function Ho({onAction:e,disabled:t=false}){let[o,n]=useState(false),r=useCallback(()=>n(false),[]),{containerRef:l,dropdownRef:u,dropdownStyle:d,handleMouseDown:s}=G({isOpen:o,onClose:r}),c=useCallback(a=>{e({type:"borderWidth",size:a}),n(false);},[e]),p=jsxs(W,{variant:"ghost",size:"icon-sm",className:w("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",o&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:s,onClick:()=>!t&&n(a=>!a),disabled:t,"aria-label":"Border width","aria-expanded":o,"aria-haspopup":"true","data-testid":"toolbar-table-border-width",children:[jsx(g,{name:"line_weight",size:20}),jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:l,style:{position:"relative",display:"inline-block"},children:[o?p:jsx(J,{content:"Border width",children:p}),o&&!t&&jsx("div",{ref:u,style:{...d,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:"4px 0",minWidth:120},onMouseDown:a=>a.stopPropagation(),children:Wi.map(({size:a,label:f,thickness:m})=>jsxs("button",{type:"button",style:{display:"flex",alignItems:"center",gap:10,padding:"6px 12px",width:"100%",border:"none",backgroundColor:"transparent",cursor:"pointer",fontSize:12,color:"var(--doc-text)"},onMouseDown:v=>v.preventDefault(),onMouseEnter:v=>{v.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:v=>{v.currentTarget.style.backgroundColor="transparent";},onClick:()=>c(a),children:[jsx("div",{style:{width:50,height:Math.max(m,1),backgroundColor:"#000",borderRadius:m>2?1:0}}),jsx("span",{children:f})]},a))})]})}function qo({onAction:e,disabled:t=false,theme:o,value:n}){let r=useCallback(l=>{typeof l=="string"&&e(l==="none"?{type:"cellFillColor",color:null}:{type:"cellFillColor",color:l.replace(/^#/,"")});},[e]);return jsx(ke,{mode:"highlight",value:n,onChange:r,theme:o,disabled:t,title:"Cell Fill Color",icon:"format_color_fill",autoLabel:"No fill"})}var Ui={display:"flex",alignItems:"center",gap:10,padding:"7px 14px",fontSize:13,color:"var(--doc-text)",cursor:"pointer",border:"none",backgroundColor:"transparent",width:"100%",textAlign:"left"},Oe={height:1,backgroundColor:"var(--doc-border)",margin:"4px 0"},Do={padding:"6px 14px 2px",fontSize:11,color:"var(--doc-text-muted)",fontWeight:500};function No({onAction:e,disabled:t=false,tableContext:o}){let[n,r]=useState(false),[l,u]=useState(null),d=useCallback(()=>r(false),[]),{containerRef:s,dropdownRef:c,dropdownStyle:p,handleMouseDown:a}=G({isOpen:n,onClose:d,align:"right"}),f=o?.table?.attrs?.justification??"left",m=useCallback(x=>{e(x),r(false);},[e]),v=(x,P,T,I,L)=>{let M=t||L?.itemDisabled;return jsxs("button",{type:"button",role:"menuitem",style:{...Ui,backgroundColor:l===x&&!M?"var(--doc-bg-hover)":"transparent",color:M?"var(--doc-text-muted)":L?.danger?"var(--doc-error)":"var(--doc-text)",cursor:M?"not-allowed":"pointer"},onClick:()=>!M&&m(I),onMouseEnter:()=>u(x),onMouseLeave:()=>u(null),disabled:M,children:[jsx(g,{name:P,size:16,className:L?.danger&&!M?"text-red-600":""}),jsx("span",{style:{flex:1},children:T})]},x)},b=jsx(W,{variant:"ghost",size:"icon-sm",className:w("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",n&&"bg-slate-100",t&&"opacity-30 cursor-not-allowed"),onMouseDown:a,onClick:()=>!t&&r(x=>!x),disabled:t,"aria-label":"More table options","aria-expanded":n,"aria-haspopup":"menu","data-testid":"toolbar-table-more",children:jsx(g,{name:"more_vert",size:20})});return jsxs("div",{ref:s,style:{position:"relative",display:"inline-block"},children:[n?b:jsx(J,{content:"More table options",children:b}),n&&!t&&jsxs("div",{ref:c,style:{...p,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:"4px 0",minWidth:200,maxHeight:"70vh",overflowY:"auto"},role:"menu",onMouseDown:x=>x.stopPropagation(),children:[v("addRowAbove","add","Insert row above","addRowAbove"),v("addRowBelow","add","Insert row below","addRowBelow"),v("addColumnLeft","add","Insert column left","addColumnLeft"),v("addColumnRight","add","Insert column right","addColumnRight"),jsx("div",{style:Oe,role:"separator"}),v("mergeCells","call_merge","Merge cells","mergeCells",{itemDisabled:!o?.hasMultiCellSelection}),v("splitCell","call_split","Split cell","splitCell",{itemDisabled:!o?.canSplitCell}),jsx("div",{style:Oe,role:"separator"}),v("deleteRow","delete","Delete row","deleteRow",{danger:true,itemDisabled:(o?.rowCount??0)<=1}),v("deleteColumn","delete","Delete column","deleteColumn",{danger:true,itemDisabled:(o?.columnCount??0)<=1}),v("deleteTable","delete","Delete table","deleteTable",{danger:true}),jsx("div",{style:Oe,role:"separator"}),jsx("div",{style:Do,children:"Vertical alignment"}),jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["top","center","bottom"].map(x=>{let P={top:"vertical_align_top",center:"vertical_align_center",bottom:"vertical_align_bottom"};return jsx("button",{type:"button",title:{top:"Top",center:"Middle",bottom:"Bottom"}[x],style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:28,border:"1px solid var(--doc-border)",borderRadius:4,backgroundColor:"transparent",cursor:"pointer"},onMouseDown:I=>I.preventDefault(),onMouseEnter:I=>{I.currentTarget.style.backgroundColor="var(--doc-bg-hover)";},onMouseLeave:I=>{I.currentTarget.style.backgroundColor="transparent";},onClick:()=>m({type:"cellVerticalAlign",align:x}),children:jsx(g,{name:P[x],size:16})},x)})}),jsx("div",{style:Oe,role:"separator"}),jsx("div",{style:Do,children:"Table alignment"}),jsx("div",{style:{display:"flex",gap:4,padding:"4px 14px"},children:["left","center","right"].map(x=>{let P={left:"format_align_left",center:"format_align_center",right:"format_align_right"},T=f===x;return jsx("button",{type:"button",title:`Align table ${x}`,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:28,border:"1px solid var(--doc-border)",borderRadius:4,backgroundColor:T?"var(--doc-primary-light)":"transparent",borderColor:T?"var(--doc-primary)":"var(--doc-border)",color:T?"var(--doc-primary)":"var(--doc-text)",cursor:"pointer"},onMouseDown:I=>I.preventDefault(),onClick:()=>m({type:"tableProperties",props:{justification:x}}),children:jsx(g,{name:P[x],size:16})},x)})}),jsx("div",{style:Oe,role:"separator"}),v("headerRow","table_rows","Toggle header row",{type:"toggleHeaderRow"}),v("distribute","view_column","Distribute columns evenly",{type:"distributeColumns"}),v("autoFit","fit_width","Auto-fit to contents",{type:"autoFitContents"}),v("noWrap","wrap_text","Toggle no-wrap",{type:"toggleNoWrap"}),jsx("div",{style:Oe,role:"separator"}),v("properties","settings","Table properties...",{type:"openTableProperties"})]})]})}var Yi=20;function pt({options:e,activeValue:t,triggerIcon:o,tooltipContent:n,onSelect:r,disabled:l=false,ariaLabel:u,testId:d}){let[s,c]=useState(false),p=useCallback(()=>c(false),[]),{containerRef:a,dropdownRef:f,dropdownStyle:m,handleMouseDown:v}=G({isOpen:s,onClose:p}),b=useCallback(P=>{l||r(P),c(false);},[l,r]),x=jsxs(W,{variant:"ghost",size:"icon-sm",className:w("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",s&&"bg-slate-100",l&&"opacity-30 cursor-not-allowed"),onMouseDown:v,onClick:()=>!l&&c(P=>!P),disabled:l,"aria-label":u??n,"aria-expanded":s,"aria-haspopup":"true","data-testid":d,children:[jsx(g,{name:o,size:Yi}),jsx(g,{name:"arrow_drop_down",size:14,className:"-ml-1"})]});return jsxs("div",{ref:a,style:{position:"relative",display:"inline-block"},children:[s?x:jsx(J,{content:n,children:x}),s&&!l&&jsx("div",{ref:f,style:{...m,backgroundColor:"white",border:"1px solid var(--doc-border)",borderRadius:8,boxShadow:"0 4px 16px rgba(0, 0, 0, 0.12)",padding:6},onMouseDown:P=>P.stopPropagation(),children:jsx("div",{style:{display:"flex",gap:2},children:e.map(P=>{let T=t===P.value;return jsx("button",{type:"button",title:P.label,"data-testid":d?`${d}-${P.value}`:void 0,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"1px solid transparent",borderRadius:4,backgroundColor:T?"var(--doc-primary-light)":"transparent",cursor:"pointer",color:T?"var(--doc-primary)":"var(--doc-text)"},onMouseDown:I=>I.preventDefault(),onMouseEnter:I=>{T||(I.currentTarget.style.backgroundColor="var(--doc-bg-hover)");},onMouseLeave:I=>{I.currentTarget.style.backgroundColor=T?"var(--doc-primary-light)":"transparent";},onClick:()=>b(P.value),children:jsx(g,{name:P.iconName,size:18})},P.value)})})})]})}var Ht=[{value:"inline",label:"Inline with text",iconName:"format_image_left"},{value:"wrapRight",label:"Float left (wrap right)",iconName:"format_image_right"},{value:"wrapLeft",label:"Float right (wrap left)",iconName:"format_image_left"},{value:"topAndBottom",label:"Top and bottom",iconName:"horizontal_rule"},{value:"behind",label:"Behind text",iconName:"flip_to_back"},{value:"inFront",label:"In front of text",iconName:"flip_to_front"}];function ji(e){return e.displayMode==="float"&&e.cssFloat==="left"?"wrapRight":e.displayMode==="float"&&e.cssFloat==="right"?"wrapLeft":e.wrapType}function Bo({imageContext:e,onChange:t,disabled:o=false}){let n=ji(e),r=Ht.find(l=>l.value===n)||Ht[0];return jsx(pt,{options:Ht,activeValue:n,triggerIcon:r.iconName,tooltipContent:`Wrap: ${r.label}`,onSelect:t,disabled:o,testId:"toolbar-image-wrap"})}var Ji=[{value:"rotateCW",label:"Rotate clockwise",iconName:"rotate_right"},{value:"rotateCCW",label:"Rotate counter-clockwise",iconName:"rotate_left"},{value:"flipH",label:"Flip horizontal",iconName:"swap_horiz"},{value:"flipV",label:"Flip vertical",iconName:"swap_vert"}];function Oo({onTransform:e,disabled:t=false}){return jsx(pt,{options:Ji,triggerIcon:"rotate_right",tooltipContent:"Transform",onSelect:e,disabled:t,testId:"toolbar-image-transform"})}function ta(e){return "type"in e&&e.type==="separator"}var Wo={display:"flex",alignItems:"center",gap:2,padding:"2px 8px",border:"none",background:"transparent",borderRadius:4,cursor:"pointer",fontSize:13,fontWeight:400,color:"var(--doc-text, #374151)",whiteSpace:"nowrap",height:28,lineHeight:"28px"},oa={...Wo,background:"var(--doc-hover, #f3f4f6)"},$o={display:"flex",alignItems:"center",gap:8,padding:"6px 12px",border:"none",background:"transparent",cursor:"pointer",fontSize:13,color:"var(--doc-text, #374151)",width:"100%",textAlign:"left",whiteSpace:"nowrap"},na={...$o,opacity:.4,cursor:"default"},ra={height:1,backgroundColor:"var(--doc-border, #e5e7eb)",margin:"4px 0"},ia={marginLeft:"auto",fontSize:12,color:"var(--doc-text-muted, #9ca3af)"},aa={position:"absolute",left:"100%",top:-4,marginLeft:2,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",padding:8,zIndex:1001};function mt({label:e,items:t,disabled:o}){let[n,r]=useState(false),[l,u]=useState(null),d=useRef(null),s=useRef(null),[c,p]=useState({top:0,left:0}),a=useCallback(()=>{r(false),u(null);},[]);useEffect(()=>{if(!n||!d.current)return;let m=d.current.getBoundingClientRect();p({top:m.bottom+2,left:m.left});},[n]),useEffect(()=>{if(!n)return;function m(x){let P=x.target;d.current&&!d.current.contains(P)&&s.current&&!s.current.contains(P)&&a();}function v(x){x.key==="Escape"&&a();}function b(){a();}return document.addEventListener("mousedown",m),document.addEventListener("keydown",v),window.addEventListener("scroll",b,true),()=>{document.removeEventListener("mousedown",m),document.removeEventListener("keydown",v),window.removeEventListener("scroll",b,true);}},[n,a]);let f=m=>{m.disabled||m.submenuContent||m.onClick&&(m.onClick(),a());};return jsxs("div",{style:{position:"relative"},children:[jsxs("button",{ref:d,type:"button",onClick:()=>!o&&r(!n),onMouseDown:m=>m.preventDefault(),disabled:o,style:n?oa:Wo,children:[e,jsx(g,{name:"arrow_drop_down",size:16})]}),n&&jsx("div",{ref:s,style:{position:"fixed",top:c.top,left:c.left,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:6,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)",padding:"4px 0",zIndex:1e4,minWidth:200},onMouseDown:m=>m.preventDefault(),children:t.map((m,v)=>{if(ta(m))return jsx("div",{style:ra},`sep-${v}`);let b=m;if(b.customContent)return jsx("div",{onMouseDown:T=>T.preventDefault(),children:b.customContent},b.label);let x=!!b.submenuContent,P=l===b.label;return jsxs("div",{style:{position:"relative"},onMouseEnter:()=>x&&u(b.label),onMouseLeave:()=>x&&u(null),children:[jsxs("button",{type:"button",style:b.disabled?na:$o,onClick:()=>f(b),onMouseDown:T=>T.preventDefault(),onMouseOver:T=>{b.disabled||(T.currentTarget.style.backgroundColor="var(--doc-hover, #f3f4f6)");},onMouseOut:T=>{T.currentTarget.style.backgroundColor="transparent";},disabled:b.disabled,children:[b.icon&&jsx(g,{name:b.icon,size:18}),jsx("span",{children:b.label}),b.shortcut&&jsx("span",{style:ia,children:b.shortcut}),x&&jsx("span",{style:{marginLeft:"auto"},children:jsx(g,{name:"keyboard_arrow_right",size:16})})]}),x&&P&&jsx("div",{style:aa,onMouseDown:T=>T.preventDefault(),children:b.submenuContent(a)})]},b.label)})})]})}var Et=18,sa=2,Uo={width:Et,height:Et,backgroundColor:"white",border:"1px solid var(--doc-border, #d1d5db)",borderRadius:2,transition:"background-color 0.1s, border-color 0.1s",cursor:"pointer"},ca={...Uo,backgroundColor:"var(--doc-primary, #3b82f6)",border:"1px solid var(--doc-primary, #3b82f6)"},ua={marginTop:6,fontSize:11,fontWeight:500,color:"var(--doc-text, #374151)",textAlign:"center"};function Ko({onInsert:e,gridRows:t=6,gridColumns:o=6}){let[n,r]=useState(0),[l,u]=useState(0),d=useCallback(()=>{n>0&&l>0&&e(n,l);},[n,l,e]),s=[];for(let p=1;p<=t;p++)for(let a=1;a<=o;a++){let f=p<=n&&a<=l;s.push(jsx("div",{style:f?ca:Uo,onMouseEnter:()=>{r(p),u(a);},onClick:d,role:"gridcell","aria-selected":f},`${p}-${a}`));}let c=n>0&&l>0?`${l} \xD7 ${n}`:"Select size";return jsxs("div",{children:[jsx("div",{style:{display:"grid",gap:sa,gridTemplateColumns:`repeat(${o}, ${Et}px)`},onMouseLeave:()=>{r(0),u(0);},role:"grid","aria-label":"Table size selector",children:s}),jsx("div",{style:ua,children:c})]})}var da={FFFF00:"yellow","00FF00":"green","00FFFF":"cyan",FF00FF:"magenta","0000FF":"blue",FF0000:"red","00008B":"darkBlue","008080":"darkCyan","008000":"darkGreen",800080:"darkMagenta","8B0000":"darkRed",808e3:"darkYellow",808080:"darkGray",C0C0C0:"lightGray","000000":"black",FFFFFF:"white"};function vs(e){let t=e.replace(/^#/,"").toUpperCase();return da[t]||null}function Q({active:e=false,disabled:t=false,title:o,onClick:n,children:r,className:l,ariaLabel:u}){let d=u?.toLowerCase().replace(/\s+/g,"-")||o?.toLowerCase().replace(/\s+/g,"-").replace(/\([^)]*\)/g,"").trim(),s=p=>{p.preventDefault();},c=jsx(W,{variant:"ghost",size:"icon-sm",className:w("text-slate-500 hover:text-slate-900 hover:bg-slate-100/80",e&&"bg-slate-900 text-white hover:bg-slate-800 hover:text-white",t&&"opacity-30 cursor-not-allowed",l),onMouseDown:s,onClick:t?void 0:n,disabled:t,"aria-pressed":e,"aria-label":u||o,"data-testid":d?`toolbar-${d}`:void 0,children:r});return o?jsx(J,{content:o,children:c}):c}function oe({label:e,children:t,className:o}){return jsx("div",{className:w("flex items-center gap-px px-1.5 border-r border-slate-200/50 last:border-r-0 first:pl-0",o),role:"group","aria-label":e,children:t})}function Ps(){return jsx("div",{className:"w-px h-6 bg-slate-200 mx-1.5",role:"separator"})}function Ms({children:e,className:t,style:o,disabled:n=false,onFormat:r,onPrint:l,showPrintButton:u=true,onPageSetup:d,onInsertImage:s,onInsertTable:c,showTableInsert:p=true,onInsertPageBreak:a,onInsertTOC:f,onRefocusEditor:m,...v}){let b=useRef(null),x=useCallback(L=>{!n&&r&&r(L);},[n,r]),P=useCallback((L,M)=>{!n&&c&&(c(L,M),requestAnimationFrame(()=>m?.()));},[n,c,m]),T=useCallback(L=>{let M=L.target;M.tagName==="INPUT"||M.tagName==="TEXTAREA"||M.tagName==="SELECT"||M.tagName==="OPTION"||L.preventDefault();},[]),I=useCallback(L=>{let M=L.target,O=document.activeElement;M.tagName==="SELECT"||M.tagName==="OPTION"||O?.tagName==="SELECT"||requestAnimationFrame(()=>{m?.();});},[m]);return jsxs("div",{ref:b,className:w("flex items-center px-1 py-1 bg-white border-b border-slate-100 min-h-[36px] overflow-x-auto",t),style:o,role:"toolbar","aria-label":"Formatting toolbar","data-testid":"toolbar",onMouseDown:T,onMouseUp:I,children:[u&&l||d?jsx(mt,{label:"File",disabled:n,items:[...u&&l?[{icon:"print",label:"Print",shortcut:"Ctrl+P",onClick:l}]:[],...d?[{icon:"settings",label:"Page setup",onClick:d}]:[]]}):null,jsx(mt,{label:"Format",disabled:n,items:[{icon:"format_textdirection_l_to_r",label:"Left-to-right text",onClick:()=>x("setLtr")},{icon:"format_textdirection_r_to_l",label:"Right-to-left text",onClick:()=>x("setRtl")}]}),jsx(mt,{label:"Insert",disabled:n,items:[...s?[{icon:"image",label:"Image",onClick:s}]:[],...p&&c?[{icon:"grid_on",label:"Table",submenuContent:L=>jsx(Ko,{onInsert:(M,O)=>{P(M,O),L();}})}]:[],...s||p&&c?[{type:"separator"}]:[],{icon:"page_break",label:"Page break",onClick:a,disabled:!a},{icon:"format_list_numbered",label:"Table of contents",onClick:f,disabled:!f}]}),jsx(Yo,{...v,disabled:n,onFormat:r,onRefocusEditor:m,onInsertTable:c,showTableInsert:p,onInsertImage:s,onInsertPageBreak:a,onInsertTOC:f,onPrint:l,showPrintButton:u,onPageSetup:d,inline:true,children:e})]})}var Dt=createContext(null);function ks(){let e=useContext(Dt);if(!e)throw new Error("useEditorToolbar must be used within an <EditorToolbar> component");return e}var ne=18;function Ta(e){let t=X__default.useContext(Dt);return t?{...t,...ya(e)}:e}function ya(e){let t={};for(let o of Object.keys(e))e[o]!==void 0&&(t[o]=e[o]);return t}function Yo(e){let t=Ta(e),{currentFormatting:o={},onFormat:n,onUndo:r,onRedo:l,canUndo:u=false,canRedo:d=false,disabled:s=false,className:c,style:p,enableShortcuts:a$1=true,editorRef:f,children:m,showFontPicker:v=true,showFontSizePicker:b=true,showTextColorPicker:x=true,showHighlightColorPicker:P=true,showAlignmentButtons:T=true,showListButtons:I=true,showLineSpacingPicker:L=true,showStylePicker:M=true,documentStyles:O,theme:F,showZoomControl:Te=true,zoom:ie,onZoomChange:me,onRefocusEditor:Z,imageContext:K,onImageWrapType:y,onImageTransform:D,onOpenImageProperties:C,tableContext:Y,onTableAction:Ie,inline:ae=false}=t,Xe=useRef(null),A=useCallback(k=>{!s&&n&&n(k);},[s,n]),Tt=useCallback(()=>{!s&&u&&r&&r();},[s,u,r]),yt=useCallback(()=>{!s&&d&&l&&l();},[s,d,l]),St=useCallback(k=>{!s&&n&&(n({type:"fontFamily",value:k}),requestAnimationFrame(()=>Z?.()));},[s,n,Z]),Ct=useCallback(k=>{!s&&n&&(n({type:"fontSize",value:k}),requestAnimationFrame(()=>Z?.()));},[s,n,Z]),Pe=useCallback(k=>{!s&&n&&(n({type:"textColor",value:k}),requestAnimationFrame(()=>Z?.()));},[s,n,Z]),Ve=useCallback(k=>{!s&&n&&(n({type:"highlightColor",value:typeof k=="string"?k:""}),requestAnimationFrame(()=>Z?.()));},[s,n,Z]),le=useCallback(k=>{!s&&n&&n({type:"alignment",value:k});},[s,n]),wt=useCallback(()=>{!s&&n&&n("bulletList");},[s,n]),_=useCallback(()=>{!s&&n&&n("numberedList");},[s,n]),Me=useCallback(()=>{!s&&n&&n("indent");},[s,n]),Je=useCallback(()=>{!s&&n&&n("outdent");},[s,n]),Ze=useCallback(k=>{!s&&n&&(n({type:"lineSpacing",value:k}),requestAnimationFrame(()=>Z?.()));},[s,n,Z]),se=useCallback(k=>{!s&&n&&(n({type:"applyStyle",value:k}),requestAnimationFrame(()=>Z?.()));},[s,n,Z]),z=useCallback(k=>{!s&&Ie&&(Ie(k),requestAnimationFrame(()=>Z?.()));},[s,Ie,Z]);useEffect(()=>{if(!a$1)return;let k=q=>{let We=q.target,Ut=f?.current,ln=Xe.current,sn=Ut?.contains(We),cn=ln?.contains(We);if(!sn&&!cn)return;if((q.ctrlKey||q.metaKey)&&!q.altKey)switch(q.key.toLowerCase()){case "b":q.preventDefault(),A("bold");break;case "i":q.preventDefault(),A("italic");break;case "u":q.preventDefault(),A("underline");break;case "=":q.shiftKey?(q.preventDefault(),A("superscript")):(q.preventDefault(),A("subscript"));break;case "l":q.preventDefault(),le("left");break;case "e":q.preventDefault(),le("center");break;case "r":q.preventDefault(),le("right");break;case "j":q.preventDefault(),le("both");break;case "k":q.preventDefault(),A("insertLink");break}};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k);}},[a$1,A,le,f]);let ee=useCallback(k=>{let q=k.target;q.tagName==="INPUT"||q.tagName==="TEXTAREA"||q.tagName==="SELECT"||q.tagName==="OPTION"||k.preventDefault();},[]),Re=useCallback(k=>{let q=k.target,We=document.activeElement;q.tagName==="SELECT"||q.tagName==="OPTION"||We?.tagName==="SELECT"||requestAnimationFrame(()=>{Z?.();});},[Z]);return jsxs("div",{ref:Xe,className:w(!ae&&"flex items-center px-2 py-1 bg-[#f1f5f9] rounded-full min-h-[36px] overflow-x-auto mx-2 mb-1",c),style:ae?{display:"contents",...p}:p,role:ae?void 0:"toolbar","aria-label":ae?void 0:"Formatting toolbar","data-testid":ae?void 0:"formatting-bar",onMouseDown:ae?void 0:ee,onMouseUp:ae?void 0:Re,children:[jsxs(oe,{label:"History",children:[jsx(Q,{onClick:Tt,disabled:s||!u,title:"Undo (Ctrl+Z)",ariaLabel:"Undo",children:jsx(g,{name:"undo",size:ne})}),jsx(Q,{onClick:yt,disabled:s||!d,title:"Redo (Ctrl+Y)",ariaLabel:"Redo",children:jsx(g,{name:"redo",size:ne})})]}),Te&&jsx(oe,{label:"Zoom",children:jsx(Po,{value:ie,onChange:me,minZoom:.5,maxZoom:2,disabled:s,compact:true,showButtons:false})}),M&&jsx(oe,{label:"Styles",children:jsx(Io,{value:o.styleId||"Normal",onChange:se,styles:O,theme:F,disabled:s,width:120})}),(v||b)&&jsxs(oe,{label:"Font",children:[v&&jsx(Jt,{value:o.fontFamily||"Arial",onChange:St,disabled:s,width:60,placeholder:"Arial"}),b&&jsx(so,{value:o.fontSize!==void 0?lo(o.fontSize):11,onChange:Ct,disabled:s,width:42,placeholder:"11"})]}),jsxs(oe,{label:"Text formatting",children:[jsx(Q,{onClick:()=>A("bold"),active:o.bold,disabled:s,title:"Bold (Ctrl+B)",ariaLabel:"Bold",children:jsx(g,{name:"format_bold",size:ne})}),jsx(Q,{onClick:()=>A("italic"),active:o.italic,disabled:s,title:"Italic (Ctrl+I)",ariaLabel:"Italic",children:jsx(g,{name:"format_italic",size:ne})}),jsx(Q,{onClick:()=>A("underline"),active:o.underline,disabled:s,title:"Underline (Ctrl+U)",ariaLabel:"Underline",children:jsx(g,{name:"format_underlined",size:ne})}),jsx(Q,{onClick:()=>A("strikethrough"),active:o.strike,disabled:s,title:"Strikethrough",ariaLabel:"Strikethrough",children:jsx(g,{name:"strikethrough_s",size:ne})}),x&&jsx(ke,{mode:"text",value:o.color?.replace(/^#/,""),onChange:Pe,theme:F,disabled:s,title:"Font Color"}),P&&jsx(ke,{mode:"highlight",value:o.highlight,onChange:Ve,theme:F,disabled:s,title:"Text Highlight Color"}),jsx(Q,{onClick:()=>A("insertLink"),disabled:s,title:"Insert link (Ctrl+K)",ariaLabel:"Insert link",children:jsx(g,{name:"link",size:ne})})]}),jsxs(oe,{label:"Script",children:[jsx(Q,{onClick:()=>A("superscript"),active:o.superscript,disabled:s,title:"Superscript (Ctrl+Shift+=)",ariaLabel:"Superscript",children:jsx(g,{name:"superscript",size:ne})}),jsx(Q,{onClick:()=>A("subscript"),active:o.subscript,disabled:s,title:"Subscript (Ctrl+=)",ariaLabel:"Subscript",children:jsx(g,{name:"subscript",size:ne})})]}),T&&jsx(oe,{label:"Alignment",children:jsx(bo,{value:o.alignment||"left",onChange:le,disabled:s})}),(I||L)&&jsxs(oe,{label:"List formatting",children:[I&&jsx(To,{listState:o.listState||yo(),onBulletList:wt,onNumberedList:_,onIndent:Me,onOutdent:Je,disabled:s,showIndentButtons:true,compact:true,hasIndent:(o.indentLeft??0)>0}),L&&jsx(Co,{value:o.lineSpacing,onChange:Ze,disabled:s})]}),K&&y&&jsxs(oe,{label:"Image",children:[jsx(Bo,{imageContext:K,onChange:y,disabled:s}),D&&jsx(Oo,{onTransform:D,disabled:s}),C&&jsx(Q,{onClick:C,disabled:s,title:"Image properties (alt text, border)...",ariaLabel:"Image properties",children:jsx(g,{name:"tune",size:ne})})]}),Y?.isInTable&&Ie&&jsxs(oe,{label:"Table",children:[jsx(Ro,{onAction:z,disabled:s}),jsx(Lo,{onAction:z,disabled:s,theme:F,value:Y?.cellBorderColor?a(Y.cellBorderColor,F).replace(/^#/,""):void 0}),jsx(Ho,{onAction:z,disabled:s}),jsx(qo,{onAction:z,disabled:s,theme:F,value:Y?.cellBackgroundColor}),jsx(No,{onAction:z,disabled:s,tableContext:Y})]}),jsx(Q,{onClick:()=>A("clearFormatting"),disabled:s,title:"Clear formatting",ariaLabel:"Clear formatting",children:jsx(g,{name:"format_clear",size:ne})}),m]})}var Xo=12240,vt=1440,gt=1440,bt=567,Ft=22,wa="var(--doc-text-muted)",Ia="var(--doc-text-subtle)",jo="rgba(0, 0, 0, 0.02)",Pa="#4285f4",Ma="#3367d6",Za="#2a56c6",_e=5;function Ra(e,t){return t==="inch"?(e/gt).toFixed(2)+'"':(e/bt).toFixed(1)+" cm"}function ic({sectionProps:e,zoom:t=1,editable:o=false,onLeftMarginChange:n,onRightMarginChange:r,onFirstLineIndentChange:l,showFirstLineIndent:u=false,firstLineIndent:d=0,hangingIndent:s=false,indentLeft:c=0,indentRight:p=0,onIndentLeftChange:a,onIndentRightChange:f,unit:m="inch",className:v="",style:b$1,tabStops:x,onTabStopRemove:P}){let[T,I]=useState(null),[L,M]=useState(null),[O,F]=useState(null),[Te,ie]=useState(null),me=useRef(null),Z=e?.pageWidth??Xo,K=e?.marginLeft??vt,y=e?.marginRight??vt,D=Z-K-y,C=a$1(Z)*t,Y=a$1(K)*t,Ie=a$1(y)*t,ae=a$1(c)*t,Xe=a$1(p)*t,A=s?-d:d,Tt=a$1(A)*t,yt=Y+ae,St=C-Ie-Xe,Ct=Y+ae+Tt,Pe=useCallback((_,Me)=>{o&&(_.preventDefault(),_.stopPropagation(),I(Me));},[o]),Ve=useCallback(_=>{if(!T||!me.current)return;let Me=me.current.getBoundingClientRect(),Je=_.clientX-Me.left;ie(Je);let Ze=b(Je/t);if(T==="leftMargin"){let se=Z-y-720,z=Math.round(Math.max(0,Math.min(Ze,se)));F(z),n?.(z);}else if(T==="rightMargin"){let se=Z-Ze,z=Z-K-720,ee=Math.round(Math.max(0,Math.min(se,z)));F(ee),r?.(ee);}else if(T==="firstLineIndent"){let se=K+c,z=Ze-se,ee=D-c-p-720,Re=Math.round(Math.max(-c,Math.min(z,ee)));F(Re),l?.(Re);}else if(T==="leftIndent"){let se=Ze-K,z=D-p-720,ee=Math.round(Math.max(0,Math.min(se,z)));F(ee),a?.(ee);}else if(T==="rightIndent"){let z=Z-y-Ze,ee=D-c-720,Re=Math.round(Math.max(0,Math.min(z,ee)));F(Re),f?.(Re);}},[T,t,Z,K,y,D,c,p,n,r,l,a,f]),le=useCallback(()=>{I(null),F(null),ie(null);},[]);useEffect(()=>{if(T)return document.addEventListener("mousemove",Ve),document.addEventListener("mouseup",le),()=>{document.removeEventListener("mousemove",Ve),document.removeEventListener("mouseup",le);}},[T,Ve,le]);let wt=_a(Z,t,m);return jsxs("div",{ref:me,className:`docx-horizontal-ruler ${v}`,style:{position:"relative",width:k(C),height:Ft,backgroundColor:"transparent",overflow:"visible",userSelect:"none",cursor:T?"ew-resize":"default",...b$1},role:"slider","aria-label":"Horizontal ruler","aria-valuemin":0,"aria-valuemax":Z,children:[jsx("div",{style:{position:"absolute",top:0,left:0,width:k(Y),height:Ft,backgroundColor:jo,borderRight:"1px solid rgba(0,0,0,0.06)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&n?_=>Pe(_,"leftMargin"):void 0}),jsx("div",{style:{position:"absolute",top:0,right:0,width:k(Ie),height:Ft,backgroundColor:jo,borderLeft:"1px solid rgba(0,0,0,0.06)",cursor:o?"ew-resize":"default",zIndex:1},onMouseDown:o&&r?_=>Pe(_,"rightMargin"):void 0}),jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:wt.map((_,Me)=>jsx(La,{tick:_},Me))}),u&&jsx(At,{direction:"down",positionPx:Ct,editable:o,isDragging:T==="firstLineIndent",isHovered:L==="firstLineIndent",onMouseEnter:()=>M("firstLineIndent"),onMouseLeave:()=>M(null),onMouseDown:_=>Pe(_,"firstLineIndent"),label:"First line indent"}),o&&a&&jsx(At,{direction:"up",positionPx:yt,editable:o,isDragging:T==="leftIndent",isHovered:L==="leftIndent",onMouseEnter:()=>M("leftIndent"),onMouseLeave:()=>M(null),onMouseDown:_=>Pe(_,"leftIndent"),label:"Left indent"}),o&&f&&jsx(At,{direction:"down",positionPx:St,editable:o,isDragging:T==="rightIndent",isHovered:L==="rightIndent",onMouseEnter:()=>M("rightIndent"),onMouseLeave:()=>M(null),onMouseDown:_=>Pe(_,"rightIndent"),label:"Right indent"}),x?.map(_=>jsx(qa,{tabStop:_,positionPx:a$1(_.position)*t,onDoubleClick:()=>P?.(_.position)},_.position)),T&&O!==null&&Te!==null&&jsx(ka,{value:Ra(O,m),positionPx:Te})]})}function La({tick:e}){return jsxs(Fragment,{children:[jsx("div",{style:{position:"absolute",left:k(e.position),bottom:0,width:1,height:e.height,backgroundColor:Ia}}),e.label&&jsx("div",{style:{position:"absolute",left:k(e.position),top:3,transform:"translateX(-50%)",fontSize:"9px",color:wa,fontFamily:"sans-serif",whiteSpace:"nowrap"},children:e.label})]})}function At({direction:e,positionPx:t,editable:o,isDragging:n,isHovered:r,onMouseEnter:l,onMouseLeave:u,onMouseDown:d,label:s}){let c=n?Za:r?Ma:Pa,p=Math.round(_e*1.6),a={position:"absolute",left:k(t-_e),width:_e*2,height:p+2,cursor:o?"ew-resize":"default",zIndex:n?10:4,...e==="down"?{top:0}:{bottom:0}},f=e==="down"?{position:"absolute",top:1,left:0,width:0,height:0,borderLeft:`${_e}px solid transparent`,borderRight:`${_e}px solid transparent`,borderTop:`${p}px solid ${c}`,transition:"border-top-color 0.1s"}:{position:"absolute",bottom:1,left:0,width:0,height:0,borderLeft:`${_e}px solid transparent`,borderRight:`${_e}px solid transparent`,borderBottom:`${p}px solid ${c}`,transition:"border-bottom-color 0.1s"};return jsx("div",{className:"docx-ruler-indent",style:a,onMouseEnter:l,onMouseLeave:u,onMouseDown:d,role:"slider","aria-label":s,"aria-orientation":"horizontal",tabIndex:o?0:-1,children:jsx("div",{style:f})})}function ka({value:e,positionPx:t}){return jsx("div",{style:{position:"absolute",left:k(t),top:-22,transform:"translateX(-50%)",backgroundColor:"#333",color:"#fff",fontSize:"10px",fontFamily:"sans-serif",padding:"2px 6px",borderRadius:3,whiteSpace:"nowrap",pointerEvents:"none",zIndex:20},children:e})}var Ha={left:"L",center:"C",right:"R",decimal:"D",bar:"|"};function qa({tabStop:e,positionPx:t,onDoubleClick:o}){return jsx("div",{style:{position:"absolute",left:k(t-5),bottom:0,width:10,height:12,display:"flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:700,color:"#555",cursor:"pointer",userSelect:"none"},onDoubleClick:n=>{n.stopPropagation(),o();},title:`${e.alignment} tab at ${(e.position/1440).toFixed(2)}"`,children:Ha[e.alignment]||"L"})}function _a(e,t,o){let n=[];if(o==="inch"){let r=gt/8,l=Math.ceil(e/r);for(let u=0;u<=l;u++){let d=u*r;if(d>e)break;let s=a$1(d)*t;u%8===0?n.push({position:s,height:10,label:u/8>0?String(u/8):void 0}):u%4===0?n.push({position:s,height:6}):u%2===0?n.push({position:s,height:4}):n.push({position:s,height:2});}}else {let r=bt/10,l=Math.ceil(e/r);for(let u=0;u<=l;u++){let d=u*r;if(d>e)break;let s=a$1(d)*t;u%10===0?n.push({position:s,height:10,label:u/10>0?String(u/10):void 0}):u%5===0?n.push({position:s,height:6}):n.push({position:s,height:3});}}return n}function ac(e,t,o,n){let r=b(e/n);return t==="left"?Math.max(0,r):Math.max(0,b(o/n)-r)}function lc(e,t=1){let o=e?.pageWidth??Xo,n=e?.marginLeft??vt,r=e?.marginRight??vt,l=a$1(o)*t,u=a$1(n)*t,d=a$1(r)*t;return {width:l,leftMargin:u,rightMargin:d,contentWidth:l-u-d}}function sc(e,t){return t==="inch"?(e/gt).toFixed(2)+'"':(e/bt).toFixed(1)+" cm"}function cc(e,t){let o=parseFloat(e.replace(/[^\d.]/g,""));return isNaN(o)?null:Math.round(o*(t==="inch"?gt:bt))}var dc="application/x-docx-editor",U={HTML:"text/html",PLAIN:"text/plain"};function mc(e){if(!e)return [];let t=()=>{if(!e.items||e.items.length===0)return [];let c=[];for(let p of Array.from(e.items)){if(p.kind!=="file"||!p.type.startsWith("image/"))continue;let a=p.getAsFile();a&&c.push(a);}return c},o=()=>!e.files||e.files.length===0?[]:Array.from(e.files).filter(c=>c.type.startsWith("image/")),n=t(),r=n.length?n:o();if(r.length<=1)return r;let l=["image/png","image/jpeg","image/webp","image/gif","image/svg+xml","image/bmp","image/tiff"],u=c=>{let p=c[0],a=l.indexOf(p.type);a<0&&(a=Number.MAX_SAFE_INTEGER);for(let f of c.slice(1)){let m=l.indexOf(f.type);if(m<0&&(m=Number.MAX_SAFE_INTEGER),m<a){p=f,a=m;continue}m===a&&f.size>p.size&&(p=f);}return p},d=new Map;for(let c of r){let p=c.name?.trim()??"",f=(p?p.replace(/\.[^/.]+$/,"").toLowerCase():"")||`size:${c.size}`,m=d.get(f);m?m.push(c):d.set(f,[c]);}let s=[];for(let c of d.values())s.push(u(c));return s}async function Qo(e,t={}){let{includeFormatting:o=true,onError:n}=t;try{let r=Bt(e,o);return await xt(r)}catch(r){return n?.(r),false}}async function fc(e,t={}){let{includeFormatting:o=true,onError:n}=t;try{let r=Da(e,o);return await xt(r)}catch(r){return n?.(r),false}}function Bt(e,t=true){let o=e.map(Vt).join(""),n=t?rn(e):Wt(o),r=JSON.stringify(e);return {plainText:o,html:n,internal:r}}function Da(e,t=true){let o=e.map(Wa).join(`
2
+ `),n=t?$a(e):Wt(o),r=JSON.stringify(e);return {plainText:o,html:n,internal:r}}async function xt(e){try{if(navigator.clipboard&&navigator.clipboard.write){let t=[new ClipboardItem({[U.PLAIN]:new Blob([e.plainText],{type:U.PLAIN}),[U.HTML]:new Blob([e.html],{type:U.HTML})})];return await navigator.clipboard.write(t),!0}return en(e)}catch{return en(e)}}function en(e){let t=document.createElement("div");t.innerHTML=e.html,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t);try{let o=window.getSelection();if(!o)return !1;let n=document.createRange();n.selectNodeContents(t),o.removeAllRanges(),o.addRange(n);let r=document.execCommand("copy");return o.removeAllRanges(),r}finally{document.body.removeChild(t);}}async function hc(e={}){let{cleanWordFormatting:t=true,onError:o}=e;try{if(navigator.clipboard&&navigator.clipboard.read){let n=await navigator.clipboard.read();return await Na(n,t)}return null}catch(n){return o?.(n),null}}async function Na(e,t){let o="",n="";for(let r of e)r.types.includes(U.HTML)&&(o=await(await r.getType(U.HTML)).text()),r.types.includes(U.PLAIN)&&(n=await(await r.getType(U.PLAIN)).text());return nn(o,n,t)}function Fa(e,t={}){let{cleanWordFormatting:o=true}=t,n=e.clipboardData;if(!n)return null;let r=n.getData(U.HTML),l=n.getData(U.PLAIN);return nn(r,l,o)}function nn(e,t,o=true){let n=Aa(e),r=Ba(e);if(r){let d=e.match(/data-docx-editor-content="([^"]+)"/);if(d)try{return {runs:JSON.parse(decodeURIComponent(d[1])),fromWord:!1,fromEditor:!0,plainText:t}}catch{}}let l=e;return n&&o&&(l=Oa(e)),{runs:za(l,t),fromWord:n,fromEditor:r,plainText:t}}function Aa(e){return e.includes("urn:schemas-microsoft-com:office")||e.includes("mso-")||e.includes("MsoNormal")||e.includes('class="Mso')||e.includes("<!--[if gte mso")}function Ba(e){return e.includes("data-docx-editor")||e.includes("docx-run")||e.includes("docx-paragraph")}function Oa(e){let t=e;return t=t.replace(/<!--\[if[\s\S]*?<!\[endif\]-->/gi,""),t=t.replace(/<!--[\s\S]*?-->/g,""),t=t.replace(/<\?xml[^>]*>/gi,""),t=t.replace(/<o:[^>]*>[\s\S]*?<\/o:[^>]*>/gi,""),t=t.replace(/<o:[^>]*\/>/gi,""),t=t.replace(/<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi,""),t=t.replace(/<w:[^>]*\/>/gi,""),t=t.replace(/\s*mso-[^:;]+:[^;]+;?/gi,""),t=t.replace(/\s*style="\s*"/gi,""),t=t.replace(/\s*class="[^"]*Mso[^"]*"/gi,""),t=t.replace(/<span[^>]*>\s*<\/span>/gi,""),t=t.replace(/<\/?font[^>]*>/gi,""),t=t.replace(/\s+/g," ").trim(),t}function za(e,t){if(!e||e.trim()==="")return t?[zt(t)]:[];let o=document.createElement("div");o.innerHTML=e;let n=[];return Ot(o,n,{}),n.length===0&&t?[zt(t)]:n}function Ot(e,t,o){if(e.nodeType===Node.TEXT_NODE){let u=e.textContent||"";(u.trim()||u.includes(" "))&&t.push(zt(u,o));return}if(e.nodeType!==Node.ELEMENT_NODE)return;let n=e,r=n.tagName.toLowerCase(),l={...o,...Va(n)};switch(r){case "br":t.push(on(l));return;case "p":case "div":for(let u of n.childNodes)Ot(u,t,l);n.nextSibling&&t.push(on(l));return;case "b":case "strong":l.bold=true;break;case "i":case "em":l.italic=true;break;case "u":l.underline={style:"single"};break;case "s":case "strike":case "del":l.strike=true;break;case "sup":l.vertAlign="superscript";break;case "sub":l.vertAlign="subscript";break;case "code":case "pre":l.fontFamily={ascii:"Courier New"};break}for(let u of n.childNodes)Ot(u,t,l);}function Va(e){let t={},o=e.style;(o.fontWeight==="bold"||parseInt(o.fontWeight)>=700)&&(t.bold=true),o.fontStyle==="italic"&&(t.italic=true);let n=o.textDecoration||o.textDecorationLine;if(n&&(n.includes("underline")&&(t.underline={style:"single"}),n.includes("line-through")&&(t.strike=true)),o.fontSize){let r=parseFloat(o.fontSize);isNaN(r)||(t.fontSize=Math.round(r/1.333*2));}if(o.fontFamily){let r=o.fontFamily.replace(/["']/g,"").split(",")[0].trim();r&&(t.fontFamily={ascii:r});}if(o.color){let r=tn(o.color);r&&(t.color={rgb:r});}if(o.backgroundColor&&o.backgroundColor!=="transparent"){let r=tn(o.backgroundColor);r&&(t.shading={fill:{rgb:r}});}return t}function tn(e){if(!e||e==="transparent"||e==="inherit")return null;if(e.startsWith("#"))return e.slice(1).toUpperCase();let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(t){let o=parseInt(t[1]).toString(16).padStart(2,"0"),n=parseInt(t[2]).toString(16).padStart(2,"0"),r=parseInt(t[3]).toString(16).padStart(2,"0");return (o+n+r).toUpperCase()}return null}function Vt(e){return e.content.map(t=>t.type==="text"?t.text:t.type==="tab"?" ":t.type==="break"&&t.breakType==="textWrapping"?`
3
+ `:"").join("")}function Wa(e){return (e.content||[]).map(t=>t.type==="run"?Vt(t):"").join("")}function rn(e){return e.map(Ga).join("")}function $a(e){return e.map(t=>`<p>${rn(t.content?.filter(o=>o.type==="run")||[])}</p>`).join("")}function Ga(e){let t=Vt(e);if(!t)return "";let o=Wt(t),n=e.formatting;if(!n)return o;n.bold&&(o=`<strong>${o}</strong>`),n.italic&&(o=`<em>${o}</em>`),n.underline&&(o=`<u>${o}</u>`),n.strike&&(o=`<s>${o}</s>`),n.vertAlign==="superscript"&&(o=`<sup>${o}</sup>`),n.vertAlign==="subscript"&&(o=`<sub>${o}</sub>`);let r=[];if(n.fontSize){let l=n.fontSize/2;r.push(`font-size: ${l}pt`);}return n.fontFamily?.ascii&&r.push(`font-family: "${n.fontFamily.ascii}"`),n.color?.rgb&&r.push(`color: #${n.color.rgb}`),n.shading?.fill?.rgb&&r.push(`background-color: #${n.shading.fill.rgb}`),r.length>0&&(o=`<span style="${r.join("; ")}">${o}</span>`),o}function Wt(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function zt(e,t){return {type:"run",formatting:t,content:[{type:"text",text:e}]}}function on(e){return {type:"run",formatting:e,content:[{type:"break",breakType:"textWrapping"}]}}function vc(e){let{onCopy:t,onCut:o,onPaste:n,clipboardOptions:r={}}=e;return {handleCopy:async c=>{if(!t)return;let p=t();if(!p)return;c.preventDefault();let a=Bt(p.runs);c.clipboardData?(c.clipboardData.setData(U.PLAIN,a.plainText),c.clipboardData.setData(U.HTML,a.html)):await xt(a);},handleCut:async c=>{if(!o)return;let p=o();if(!p)return;c.preventDefault();let a=Bt(p.runs);c.clipboardData?(c.clipboardData.setData(U.PLAIN,a.plainText),c.clipboardData.setData(U.HTML,a.html)):await xt(a);},handlePaste:c=>{if(!n)return;c.preventDefault();let p=Fa(c,r);p&&n(p);},handleKeyDown:async c=>{let p=c.ctrlKey||c.metaKey;if(p&&c.key==="c"&&!c.shiftKey&&t){let a=t();a&&await Qo(a.runs,r);}if(p&&c.key==="x"&&!c.shiftKey&&o){let a=o();a&&await Qo(a.runs,r);}}}}var xe=16;function Ka(){return jsx(g,{name:"table_rows",size:xe,style:{transform:"scaleY(-1)"}})}function Ya(){return jsx(g,{name:"table_rows",size:xe})}function ja(){return jsx(g,{name:"view_column",size:xe,style:{transform:"scaleX(-1)"}})}function Xa(){return jsx(g,{name:"view_column",size:xe})}function Ja(){return jsx(g,{name:"delete_sweep",size:xe})}function Qa(){return jsx(g,{name:"delete_sweep",size:xe,style:{transform:"rotate(90deg)"}})}function el(){return jsx(g,{name:"call_merge",size:xe})}function tl(){return jsx(g,{name:"call_split",size:xe})}function ol(){return jsx(g,{name:"delete",size:xe,className:"text-red-600"})}var re={container:{display:"flex",alignItems:"center",gap:"4px",padding:"4px 8px",backgroundColor:"var(--doc-bg-subtle)",borderRadius:"4px",border:"1px solid var(--doc-border)",fontSize:"12px"},containerCompact:{padding:"2px 4px",gap:"2px"},containerFloating:{position:"absolute",zIndex:1e3,boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},group:{display:"flex",alignItems:"center",gap:"2px"},separator:{width:"1px",height:"20px",backgroundColor:"var(--doc-border-dark)",margin:"0 4px"},button:{display:"flex",alignItems:"center",justifyContent:"center",gap:"4px",padding:"4px 8px",border:"none",borderRadius:"3px",backgroundColor:"transparent",color:"var(--doc-text)",cursor:"pointer",fontSize:"12px",lineHeight:"1",transition:"background-color 0.15s, color 0.15s"},buttonCompact:{padding:"3px 5px"},buttonHover:{backgroundColor:"var(--doc-border)"},buttonDisabled:{color:"var(--doc-text-subtle)",cursor:"not-allowed"},buttonDelete:{color:"var(--doc-error)"},label:{fontSize:"11px",fontWeight:500,color:"var(--doc-text-muted)",marginRight:"8px",whiteSpace:"nowrap"}};function be({action:e,label:t,icon:o,disabled:n=false,onClick:r,showLabel:l=false,compact:u=false,shortcut:d}){let[s,c]=X__default.useState(false),p=typeof e=="string"&&e.startsWith("delete"),a={...re.button,...u?re.buttonCompact:{},...s&&!n?re.buttonHover:{},...n?re.buttonDisabled:{},...p&&!n?re.buttonDelete:{}},f=d?`${t} (${d})`:t;return jsxs("button",{type:"button",className:`docx-table-toolbar-button docx-table-toolbar-${typeof e=="string"?e:e.type}`,style:a,disabled:n,onClick:r,onMouseEnter:()=>c(true),onMouseLeave:()=>c(false),title:f,"aria-label":t,children:[o,l&&jsx("span",{children:t})]})}function $t({children:e,showSeparator:t=true}){return jsxs(Fragment,{children:[jsx("div",{style:re.group,children:e}),t&&jsx("div",{style:re.separator})]})}function Tc({context:e,onAction:t,disabled:o=false,className:n,style:r,showLabels:l=false,compact:u=false,position:d="top",children:s}){if(!e)return null;let c=x=>{!o&&t&&e&&t(x,e);},p=e.rowCount>1,a=e.columnCount>1,f=e.hasMultiCellSelection,m=e.canSplitCell,v={...re.container,...u?re.containerCompact:{},...d==="floating"?re.containerFloating:{},...r},b=["docx-table-toolbar"];return n&&b.push(n),u&&b.push("docx-table-toolbar-compact"),d==="floating"&&b.push("docx-table-toolbar-floating"),jsxs("div",{className:b.join(" "),style:v,role:"toolbar","aria-label":"Table editing tools",children:[jsx("span",{style:re.label,children:"Table:"}),jsxs($t,{children:[jsx(be,{action:"addRowAbove",label:"Insert Row Above",icon:jsx(Ka,{}),disabled:o,onClick:()=>c("addRowAbove"),showLabel:l,compact:u}),jsx(be,{action:"addRowBelow",label:"Insert Row Below",icon:jsx(Ya,{}),disabled:o,onClick:()=>c("addRowBelow"),showLabel:l,compact:u}),jsx(be,{action:"deleteRow",label:"Delete Row",icon:jsx(Ja,{}),disabled:o||!p,onClick:()=>c("deleteRow"),showLabel:l,compact:u})]}),jsxs($t,{children:[jsx(be,{action:"addColumnLeft",label:"Insert Column Left",icon:jsx(ja,{}),disabled:o,onClick:()=>c("addColumnLeft"),showLabel:l,compact:u}),jsx(be,{action:"addColumnRight",label:"Insert Column Right",icon:jsx(Xa,{}),disabled:o,onClick:()=>c("addColumnRight"),showLabel:l,compact:u}),jsx(be,{action:"deleteColumn",label:"Delete Column",icon:jsx(Qa,{}),disabled:o||!a,onClick:()=>c("deleteColumn"),showLabel:l,compact:u})]}),jsxs($t,{showSeparator:false,children:[jsx(be,{action:"mergeCells",label:"Merge Cells",icon:jsx(el,{}),disabled:o||!f,onClick:()=>c("mergeCells"),showLabel:l,compact:u}),jsx(be,{action:"splitCell",label:"Split Cell",icon:jsx(tl,{}),disabled:o||!m,onClick:()=>c("splitCell"),showLabel:l,compact:u}),jsx(be,{action:"deleteTable",label:"Delete Table",icon:jsx(ol,{}),disabled:o,onClick:()=>c("deleteTable"),showLabel:l,compact:u})]}),s]})}function yc(e,t){let o=e.rows.length,n=Gt(e),r=!!(t.selectedCells&&(t.selectedCells.startRow!==t.selectedCells.endRow||t.selectedCells.startCol!==t.selectedCells.endCol)),l=an(e,t.rowIndex,t.columnIndex),u=!!(l&&((l.formatting?.gridSpan??1)>1||l.formatting?.vMerge==="restart"));return {table:e,selection:t,hasMultiCellSelection:r,canSplitCell:u,rowCount:o,columnCount:n}}function Gt(e){if(!e.rows.length)return 0;let t=0;for(let o of e.rows){let n=0;for(let r of o.cells)n+=r.formatting?.gridSpan??1;t=Math.max(t,n);}return t}function an(e,t,o){let n=e.rows[t];if(!n)return null;let r=0;for(let l of n.cells){let u=l.formatting?.gridSpan??1;if(o>=r&&o<r+u)return l;r+=u;}return null}function nl(e,t){let o=[],n=0;for(let r of e.cells){let l=r.formatting?.gridSpan??1;o.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...r.formatting,vMerge:void 0}}),n+=l;}for(;n<t;)o.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}),n++;return {type:"tableRow",cells:o,formatting:{...e.formatting,header:false}}}function rl(){return {type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{}}}function Sc(e,t,o="after"){let n=[...e.rows],r=o==="before"?t:t+1,l=e.rows[t]||e.rows[0],u=Gt(e),d=nl(l,u);return n.splice(r,0,d),{...e,rows:n}}function Cc(e,t){if(e.rows.length<=1)return e;let o=e.rows.filter((n,r)=>r!==t);return {...e,rows:o}}function wc(e,t,o="after"){let n=o==="before"?t:t+1,r=e.rows.map(u=>{let d=[...u.cells],s=0,c=0;for(let p=0;p<u.cells.length;p++){let f=u.cells[p].formatting?.gridSpan??1;if(n<=s+f){c=o==="before"?p:p+1;break}s+=f,c=p+1;}return d.splice(c,0,rl()),{...u,cells:d}}),l=e.columnWidths;if(e.columnWidths&&e.columnWidths.length>0){l=[...e.columnWidths];let u=e.columnWidths[t]||e.columnWidths[0]||1440;l.splice(n,0,u);}return {...e,rows:r,columnWidths:l}}function Ic(e,t){if(Gt(e)<=1)return e;let n=e.rows.map(l=>{let u=0,d=[];for(let s of l.cells){let c=s.formatting?.gridSpan??1;t>=u&&t<u+c?c>1&&d.push({...s,formatting:{...s.formatting,gridSpan:c-1}}):d.push(s),u+=c;}return {...l,cells:d}}),r=e.columnWidths;return e.columnWidths&&e.columnWidths.length>t&&(r=e.columnWidths.filter((l,u)=>u!==t)),{...e,rows:n,columnWidths:r}}function Pc(e,t){if(!t.selectedCells)return e;let{startRow:o,startCol:n,endRow:r,endCol:l}=t.selectedCells,u=r-o+1,d=l-n+1,s=e.rows.map((c,p)=>{if(p<o||p>r)return c;let a=[],f=0;for(let m of c.cells){let v=m.formatting?.gridSpan??1,b=f+v-1;f<=l&&b>=n?p===o&&f===n?a.push({...m,formatting:{...m.formatting,gridSpan:d,vMerge:u>1?"restart":void 0}}):p>o&&f===n&&a.push({...m,formatting:{...m.formatting,gridSpan:d,vMerge:"continue"}}):a.push(m),f+=v;}return {...c,cells:a}});return {...e,rows:s}}function Mc(e,t,o){let n=an(e,t,o);if(!n)return e;let r=n.formatting?.gridSpan??1,l=n.formatting?.vMerge==="restart";if(r<=1&&!l)return e;let u=e.rows.map((d,s)=>{if(s!==t&&!l)return d;let c=[],p=0;for(let a of d.cells){let f=a.formatting?.gridSpan??1;if(p===o||p<=o&&o<p+f)if(r>1)for(let m=0;m<r;m++)c.push({type:"tableCell",content:m===0?a.content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...a.formatting,gridSpan:void 0,vMerge:void 0}});else l&&s===t?c.push({...a,formatting:{...a.formatting,vMerge:void 0}}):a.formatting?.vMerge==="continue"?c.push({type:"tableCell",content:[{type:"paragraph",content:[],formatting:{}}],formatting:{...a.formatting,vMerge:void 0}}):c.push(a);else c.push(a);p+=f;}return {...d,cells:c}});return {...e,rows:u}}export{Gt as $,Q as A,oe as B,Ps as C,Ms as D,ic as E,ac as F,lc as G,sc as H,cc as I,dc as J,U as K,mc as L,Qo as M,fc as N,Bt as O,Da as P,xt as Q,hc as R,Fa as S,nn as T,Aa as U,Ba as V,Oa as W,za as X,vc as Y,Tc as Z,yc as _,w as a,an as aa,W as b,Sc as ba,J as c,Cc as ca,g as d,wc as da,mt as e,Ic as ea,Ko as f,Pc as fa,Jt as g,Mc as ga,G as h,ql as i,so as j,ke as k,bo as l,To as m,yo as n,Co as o,Io as p,Po as q,Ro as r,Lo as s,Ho as t,qo as u,No as v,Dt as w,ks as x,Yo as y,vs as z};