@piecemaker-legal/piecemaker 2.0.17 → 2.0.19

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 (99) hide show
  1. package/dist/assets/{FindReplaceDialog-KU5TEIBJ-B4N6W1_z.js → FindReplaceDialog-KU5TEIBJ-D-E_iQrz.js} +1 -1
  2. package/dist/assets/{FootnotePropertiesDialog-W3YHM4BV-D_X_JkAZ.js → FootnotePropertiesDialog-W3YHM4BV-aF_8ncE9.js} +1 -1
  3. package/dist/assets/{HyperlinkDialog-ZYH7ZHRF-EbyukgDx.js → HyperlinkDialog-ZYH7ZHRF-BvhTCTt_.js} +4 -4
  4. package/dist/assets/{ImagePositionDialog-HEWYR6Q3-D9jEaxlE.js → ImagePositionDialog-HEWYR6Q3-CC7jJcbZ.js} +1 -1
  5. package/dist/assets/{ImagePropertiesDialog-RAB47C6M-DvA1kZnM.js → ImagePropertiesDialog-RAB47C6M-C5fs5OZU.js} +1 -1
  6. package/dist/assets/{PageSetupDialog-AIGIXO3E-ChfsKF43.js → PageSetupDialog-AIGIXO3E-DhHTvZ6Q.js} +1 -1
  7. package/dist/assets/{SplitCellDialog-IFBKYCD6-uM26FNXt.js → SplitCellDialog-IFBKYCD6-BoFyEVsb.js} +1 -1
  8. package/dist/assets/{TablePropertiesDialog-TMLKGOOW-By6EQI5w.js → TablePropertiesDialog-TMLKGOOW-CBb7GEtl.js} +1 -1
  9. package/dist/assets/{WatermarkDialog-KRL7WMIS-Bss9F6Ej.js → WatermarkDialog-KRL7WMIS-BJbsMnmA.js} +1 -1
  10. package/dist/assets/{abnfDiagram-VCTEODGH-yLjNPHY7.js → abnfDiagram-VCTEODGH-C6ojlqY3.js} +1 -1
  11. package/dist/assets/{arc-CMQiMSh4.js → arc-BoDdi4D9.js} +1 -1
  12. package/dist/assets/{architectureDiagram-5GKGNRK7-Cyna8IJZ.js → architectureDiagram-5GKGNRK7-CWIahr5B.js} +1 -1
  13. package/dist/assets/{blockDiagram-I7D4REHJ-DHAdjRYY.js → blockDiagram-I7D4REHJ-CLEp2VLU.js} +1 -1
  14. package/dist/assets/{c4Diagram-7LVT6UL2-qqZ0w4LC.js → c4Diagram-7LVT6UL2-BnPyO1ST.js} +1 -1
  15. package/dist/assets/channel-DV0VwszZ.js +1 -0
  16. package/dist/assets/{chunk-2Q5K7J3B-NS0halN6.js → chunk-2Q5K7J3B-C7HwgL9V.js} +1 -1
  17. package/dist/assets/{chunk-5VM5RSS4-BF6-6Cah.js → chunk-5VM5RSS4-DXEfMQFg.js} +1 -1
  18. package/dist/assets/{chunk-F27PBJKO-Dnj2jFRB.js → chunk-F27PBJKO-L8IW1AJ2.js} +1 -1
  19. package/dist/assets/{chunk-IMKFNOWR-CmRgl1EE.js → chunk-IMKFNOWR-M0u3FR4R.js} +1 -1
  20. package/dist/assets/{chunk-JWPE2WC7-BwC19UFc.js → chunk-JWPE2WC7-BTrrWfya.js} +1 -1
  21. package/dist/assets/{chunk-POPQ4Y6H-C1YWVD4-.js → chunk-POPQ4Y6H-DKzOkm9u.js} +1 -1
  22. package/dist/assets/{chunk-SVP7TREG-D7XQTPRq.js → chunk-SVP7TREG-ChWxgGeB.js} +1 -1
  23. package/dist/assets/{chunk-TICWLB2K-BkmTGk1O.js → chunk-TICWLB2K-FU0TG8_V.js} +1 -1
  24. package/dist/assets/{chunk-XXDRQBXY-CYW7YgXL.js → chunk-XXDRQBXY-D--n_LHM.js} +1 -1
  25. package/dist/assets/classDiagram-ZZMXUADV-QmelLege.js +1 -0
  26. package/dist/assets/classDiagram-v2-VYDZK3BY-QmelLege.js +1 -0
  27. package/dist/assets/{cose-bilkent-JH36ORCC-BSktt6pW.js → cose-bilkent-JH36ORCC-VcyzT4Am.js} +1 -1
  28. package/dist/assets/{cynefin-OW5HDTMX-BNMRWXNG.js → cynefin-OW5HDTMX-CF_CzN2W.js} +1 -1
  29. package/dist/assets/{cynefinDiagram-5FMLGOSQ-Dk59YHuO.js → cynefinDiagram-5FMLGOSQ-tYmbUXoj.js} +1 -1
  30. package/dist/assets/{dagre-GXQ25YYZ-DFhWeh0x.js → dagre-GXQ25YYZ-Dl-3sgkS.js} +1 -1
  31. package/dist/assets/{diagram-S7CK7UJ4-BH_8x-q5.js → diagram-S7CK7UJ4-DyYBtOKJ.js} +1 -1
  32. package/dist/assets/{diagram-UQ7AKVKN-DmxmlXg5.js → diagram-UQ7AKVKN-BfibAHRJ.js} +1 -1
  33. package/dist/assets/{diagram-VSXAHHWV-DpG29cD4.js → diagram-VSXAHHWV-BvuChn2K.js} +1 -1
  34. package/dist/assets/{diagram-VX7I27RA-CvvYXTie.js → diagram-VX7I27RA-ZSTD84JR.js} +1 -1
  35. package/dist/assets/{diagram-Z3DM3KII-xOXaaZqs.js → diagram-Z3DM3KII-CYWcW_j4.js} +1 -1
  36. package/dist/assets/{ebnfDiagram-PWID7BFC-CtfFGqJB.js → ebnfDiagram-PWID7BFC-CKssYpWu.js} +1 -1
  37. package/dist/assets/{erDiagram-RLTQ6QDP-AoCjoHUY.js → erDiagram-RLTQ6QDP-H6Rihy54.js} +1 -1
  38. package/dist/assets/{flowDiagram-HODETNUW-Bl9_mq95.js → flowDiagram-HODETNUW-BYcs_7fG.js} +1 -1
  39. package/dist/assets/{ganttDiagram-EL5Y4UJY-DREJQ2BY.js → ganttDiagram-EL5Y4UJY-Dt0zBRmP.js} +1 -1
  40. package/dist/assets/{gitGraphDiagram-WWUBYQGX-C1q5-iep.js → gitGraphDiagram-WWUBYQGX-DJ4ZVb5_.js} +1 -1
  41. package/dist/assets/{index-RKNvOXcq.js → index-skgP2UD3.js} +4 -4
  42. package/dist/assets/{infoDiagram-27XIBGKW-Cz2KUKWU.js → infoDiagram-27XIBGKW-DZmrJj_e.js} +1 -1
  43. package/dist/assets/{ishikawaDiagram-5VMMS53U-BU6SdWsw.js → ishikawaDiagram-5VMMS53U-zTPWVhqW.js} +1 -1
  44. package/dist/assets/{journeyDiagram-3NMN7TZE-CMMoiPf0.js → journeyDiagram-3NMN7TZE-CFxtAX_q.js} +1 -1
  45. package/dist/assets/{kanban-definition-UXKFOSKX-KpKnC3dd.js → kanban-definition-UXKFOSKX-BIBQGYrN.js} +1 -1
  46. package/dist/assets/{layout-6C8d-KNC.js → layout-5xNw8gsu.js} +1 -1
  47. package/dist/assets/{linear-CUINCO59.js → linear-CW6Efbjk.js} +1 -1
  48. package/dist/assets/{mermaid.core-ClgFTKfs.js → mermaid.core-CV1UELnp.js} +6 -6
  49. package/dist/assets/{mindmap-definition-YA3MSWOX-oywqmpy6.js → mindmap-definition-YA3MSWOX-zpWSRS8g.js} +1 -1
  50. package/dist/assets/{pegDiagram-XKGWAZYB-Uk65qoVL.js → pegDiagram-XKGWAZYB-4u0O4rTZ.js} +1 -1
  51. package/dist/assets/{pieDiagram-E7YTZNPT-XxQhMRKu.js → pieDiagram-E7YTZNPT-CXmymaRq.js} +1 -1
  52. package/dist/assets/{quadrantDiagram-AXDQQJYC-Djngo9IG.js → quadrantDiagram-AXDQQJYC-DpCRdfYk.js} +1 -1
  53. package/dist/assets/{railroadDiagram-O6MQD6OU-C4I8SNPI.js → railroadDiagram-O6MQD6OU-DisvzZ3q.js} +1 -1
  54. package/dist/assets/{requirementDiagram-BXWQKSXE-D62oiVFl.js → requirementDiagram-BXWQKSXE-DvU7Z8z5.js} +1 -1
  55. package/dist/assets/{sankeyDiagram-P5KCCOFB-HZuSub58.js → sankeyDiagram-P5KCCOFB-Df5nogtS.js} +1 -1
  56. package/dist/assets/{sequenceDiagram-WJ2MYXX4-B8_t7SDx.js → sequenceDiagram-WJ2MYXX4-B5BKf6O8.js} +1 -1
  57. package/dist/assets/{sizeCapture-INFHLROL-D2Lk0zlm.js → sizeCapture-INFHLROL-1EZabZaY.js} +1 -1
  58. package/dist/assets/{stateDiagram-D77RDMKH-DC3NnV2S.js → stateDiagram-D77RDMKH-DCSKdcyr.js} +1 -1
  59. package/dist/assets/{stateDiagram-v2-MP3YSRHH-DSsQOGCi.js → stateDiagram-v2-MP3YSRHH-Db5HOoa1.js} +1 -1
  60. package/dist/assets/{swimlanes-42K2YHIH-6RzklsF9.js → swimlanes-42K2YHIH-CmrUx1kp.js} +1 -1
  61. package/dist/assets/swimlanesDiagram-VR7AAH4N-B6BaxAGn.js +8 -0
  62. package/dist/assets/{timeline-definition-24CTP7MA-Beuacf_x.js → timeline-definition-24CTP7MA-D1e5FRLS.js} +1 -1
  63. package/dist/assets/{vennDiagram-4TSXK5OY-CMqthbQr.js → vennDiagram-4TSXK5OY-DbclmB6P.js} +1 -1
  64. package/dist/assets/{wardleyDiagram-VM6X3IG4-DKrdN08q.js → wardleyDiagram-VM6X3IG4-BL3cDBgt.js} +1 -1
  65. package/dist/assets/{xychartDiagram-S5SC5T6Z-BtMW2Qlh.js → xychartDiagram-S5SC5T6Z-BnyVnEkb.js} +1 -1
  66. package/dist/index.html +1 -1
  67. package/dist/sw.js +1 -1
  68. package/dist-server/server/piecemaker/library/connector-installation.js +68 -17
  69. package/dist-server/server/piecemaker/library/connector-installation.js.map +1 -1
  70. package/dist-server/server/piecemaker/library/global-state.js +60 -0
  71. package/dist-server/server/piecemaker/library/global-state.js.map +1 -0
  72. package/dist-server/server/piecemaker/library/index.js +10 -0
  73. package/dist-server/server/piecemaker/library/index.js.map +1 -1
  74. package/dist-server/server/piecemaker/library/marketplace.js +61 -42
  75. package/dist-server/server/piecemaker/library/marketplace.js.map +1 -1
  76. package/dist-server/server/piecemaker/library/migrate.js +0 -35
  77. package/dist-server/server/piecemaker/library/migrate.js.map +1 -1
  78. package/dist-server/server/piecemaker/library/routes.js +6 -2
  79. package/dist-server/server/piecemaker/library/routes.js.map +1 -1
  80. package/dist-server/server/piecemaker/library/store.js +95 -67
  81. package/dist-server/server/piecemaker/library/store.js.map +1 -1
  82. package/dist-server/server/piecemaker/library/workspace-installation.js +172 -87
  83. package/dist-server/server/piecemaker/library/workspace-installation.js.map +1 -1
  84. package/package.json +1 -1
  85. package/server/piecemaker/library/connector-installation.ts +65 -16
  86. package/server/piecemaker/library/global-state.ts +55 -0
  87. package/server/piecemaker/library/index.ts +7 -0
  88. package/server/piecemaker/library/marketplace.ts +52 -48
  89. package/server/piecemaker/library/migrate.ts +0 -35
  90. package/server/piecemaker/library/routes.ts +9 -2
  91. package/server/piecemaker/library/store.ts +94 -57
  92. package/server/piecemaker/library/workspace-installation.ts +180 -77
  93. package/dist/assets/channel-B3AYuE-l.js +0 -1
  94. package/dist/assets/classDiagram-ZZMXUADV-CE2Zkr7h.js +0 -1
  95. package/dist/assets/classDiagram-v2-VYDZK3BY-CE2Zkr7h.js +0 -1
  96. package/dist/assets/swimlanesDiagram-VR7AAH4N-ZU4NRSFy.js +0 -8
  97. package/dist-server/server/piecemaker/library/migrate-cli.js +0 -13
  98. package/dist-server/server/piecemaker/library/migrate-cli.js.map +0 -1
  99. package/server/piecemaker/library/migrate-cli.ts +0 -11
@@ -1 +1 @@
1
- import{L as xe,r as c}from"./HyperlinkDialog-ZYH7ZHRF-EbyukgDx.js";import{P as Ve}from"./HyperlinkDialog-ZYH7ZHRF-EbyukgDx.js";import{a}from"./vendor-react-B22wqN3J.js";import{j as t}from"./vendor-codemirror-CN-sJePf.js";import"./index-RKNvOXcq.js";import"./vendor-xterm-BWUgpGtR.js";var fe={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},ge={backgroundColor:"var(--doc-surface)",borderRadius:"4px",boxShadow:"0 4px 20px var(--doc-shadow)",minWidth:"360px",maxWidth:"440px",width:"100%",margin:"60px 20px 20px 20px",pointerEvents:"auto"},he={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg-subtle)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},me={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},be={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},ve={padding:"16px"},Q={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},V={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},D={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},X={...D,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px var(--doc-focus-ring)"},ye={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},F={padding:"6px 12px",borderRadius:"3px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)",minWidth:"80px",textAlign:"center"},Z={...F,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},T={padding:"6px 10px",borderRadius:"3px",fontSize:"14px",cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)"},$={...T,color:"var(--doc-border-input)",cursor:"not-allowed"},Ce={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},N={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},q={width:"14px",height:"14px",cursor:"pointer"},U={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},ke={...U,color:"var(--doc-error)"},Re=220,je=({style:s})=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:s,children:t.jsx("polyline",{points:"18 15 12 9 6 15"})}),We=({style:s})=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:s,children:t.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ie({isOpen:s,onClose:x,onFind:g,onFindNext:E,onFindPrevious:A,onReplace:_,onReplaceAll:P,onHighlightMatches:f,onClearHighlights:y,initialSearchText:L="",replaceMode:C=!1,currentResult:k,className:Y,style:ee}){let{t:r}=xe(),[o,z]=a.useState(""),[h,M]=a.useState(""),[R,B]=a.useState(C),[n,te]=a.useState(!1),[i,ae]=a.useState(!1),[l,p]=a.useState(null),[le,O]=a.useState(!1),[oe,H]=a.useState(!1),j=a.useRef(null),K=a.useRef(null),G=a.useRef(g),J=a.useRef(f),m=a.useRef(y);a.useEffect(()=>{G.current=g,J.current=f,m.current=y},[g,f,y]),a.useEffect(()=>{k!==void 0&&p(k)},[k]),a.useEffect(()=>{s?(z(L),M(""),B(C),p(null),setTimeout(()=>{j.current?.focus(),j.current?.select()},100)):m.current?.()},[s,L,C]);let b=a.useCallback(()=>{p(null),m.current?.()},[]),d=a.useCallback((e,v)=>{if(!e.trim()){b();return}let w=G.current(e,v);p(w),w?.matches?J.current?.(w.matches):m.current?.()},[b]);a.useEffect(()=>{if(!s)return;if(!o.trim()){b();return}let e=window.setTimeout(()=>{d(o,{matchCase:n,matchWholeWord:i})},Re);return()=>window.clearTimeout(e)},[s,o,n,i,d,b]);let re=a.useCallback(e=>{z(e.target.value),p(null)},[]),W=a.useCallback(()=>{if(!o.trim()){d(o,{matchCase:n,matchWholeWord:i});return}if(!l){d(o,{matchCase:n,matchWholeWord:i});return}if(E()&&l){let e=(l.currentIndex+1)%l.totalCount;p({...l,currentIndex:e})}},[o,n,i,l,d,E]),I=a.useCallback(()=>{if(!o.trim()){d(o,{matchCase:n,matchWholeWord:i});return}if(!l){d(o,{matchCase:n,matchWholeWord:i});return}if(A()&&l){let e=l.currentIndex===0?l.totalCount-1:l.currentIndex-1;p({...l,currentIndex:e})}},[o,n,i,l,d,A]),ne=a.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),e.shiftKey?I():l?W():d(o,{matchCase:n,matchWholeWord:i})):e.key==="Escape"&&x()},[l,o,n,i,d,W,I,x]),S=a.useCallback(()=>{if(!(!l||l.totalCount===0)&&_(h)){let e=g(o,{matchCase:n,matchWholeWord:i});p(e),e?.matches&&f&&f(e.matches)}},[l,h,o,n,i,_,g,f]),ie=a.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),S()):e.key==="Escape"&&x()},[S,x]),ce=a.useCallback(()=>{o.trim()&&P(o,h,{matchCase:n,matchWholeWord:i})>0&&(p(null),m.current?.())},[o,h,n,i,P]),de=a.useCallback(()=>{B(e=>{let v=!e;return v&&setTimeout(()=>K.current?.focus(),100),v})},[]),se=a.useCallback(e=>{e.target,e.currentTarget},[]),pe=a.useCallback(e=>{e.key==="Escape"&&x()},[x]);if(!s)return null;let u=l&&l.totalCount>0,ue=l&&l.totalCount===0&&o.trim();return t.jsx("div",{className:`docx-find-replace-dialog-overlay ${Y||""}`,style:{...fe,...ee},onClick:se,onKeyDown:pe,children:t.jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:ge,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[t.jsxs("div",{className:"docx-find-replace-dialog-header",style:he,children:[t.jsx("h2",{id:"find-replace-dialog-title",style:me,children:r(R?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),t.jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:be,onClick:x,"aria-label":r("common.closeDialog"),children:"×"})]}),t.jsxs("div",{className:"docx-find-replace-dialog-body",style:ve,children:[t.jsxs("div",{className:"docx-find-replace-dialog-row",style:Q,children:[t.jsx("label",{htmlFor:"find-text",style:V,children:r("dialogs.findReplace.findLabel")}),t.jsx("input",{ref:j,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:le?X:D,value:o,onChange:re,onKeyDown:ne,onFocus:()=>O(!0),onBlur:()=>{O(!1),o.trim()&&!l&&d(o,{matchCase:n,matchWholeWord:i})},placeholder:r("dialogs.findReplace.findPlaceholder"),"aria-label":r("dialogs.findReplace.findAriaLabel")}),t.jsxs("div",{style:{display:"flex",gap:"4px"},children:[t.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:u?T:$,onClick:I,disabled:!u,"aria-label":r("dialogs.findReplace.findPrevious"),title:r("dialogs.findReplace.findPreviousTitle"),children:t.jsx(je,{})}),t.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:u?T:$,onClick:W,disabled:!u,"aria-label":r("dialogs.findReplace.findNext"),title:r("dialogs.findReplace.findNextTitle"),children:t.jsx(We,{})})]})]}),u&&t.jsx("div",{className:"docx-find-replace-dialog-status",style:U,children:r("dialogs.findReplace.matchCount",{current:l.currentIndex+1,total:l.totalCount})}),ue&&t.jsx("div",{className:"docx-find-replace-dialog-status",style:ke,children:r("dialogs.findReplace.noResults")}),R&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"docx-find-replace-dialog-row",style:Q,children:[t.jsx("label",{htmlFor:"replace-text",style:V,children:r("dialogs.findReplace.replaceLabel")}),t.jsx("input",{ref:K,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:oe?X:D,value:h,onChange:e=>M(e.target.value),onKeyDown:ie,onFocus:()=>H(!0),onBlur:()=>H(!1),placeholder:r("dialogs.findReplace.replacePlaceholder"),"aria-label":r("dialogs.findReplace.replaceAriaLabel")}),t.jsxs("div",{style:ye,children:[t.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:u?F:Z,onClick:S,disabled:!u,title:r("dialogs.findReplace.replaceCurrentTitle"),children:r("dialogs.findReplace.replaceButton")}),t.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:u?F:Z,onClick:ce,disabled:!u,title:r("dialogs.findReplace.replaceAllTitle"),children:r("dialogs.findReplace.replaceAllButton")})]})]})}),t.jsxs("div",{className:"docx-find-replace-dialog-options",style:Ce,children:[t.jsxs("label",{className:"docx-find-replace-dialog-option",style:N,children:[t.jsx("input",{type:"checkbox",style:q,checked:n,onChange:e=>te(e.target.checked)}),r("dialogs.findReplace.matchCase")]}),t.jsxs("label",{className:"docx-find-replace-dialog-option",style:N,children:[t.jsx("input",{type:"checkbox",style:q,checked:i,onChange:e=>ae(e.target.checked)}),r("dialogs.findReplace.wholeWords")]}),!R&&t.jsx("button",{type:"button",style:{...N,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:de,children:r("dialogs.findReplace.toggleReplace")})]})]})]})})}var Te=Ie,Ee=c.createDefaultFindOptions,Ae=c.createSearchPattern,_e=c.escapeRegexString,Pe=c.findAllMatches,Le=c.findInDocument,ze=c.findInParagraph,Me=c.getDefaultHighlightOptions,Be=c.getMatchCountText,Oe=c.isEmptySearch,He=c.replaceAllInContent,Ke=c.replaceFirstInContent,Ge=c.scrollToMatch;export{Ie as FindReplaceDialog,Ee as createDefaultFindOptions,Ae as createSearchPattern,Te as default,_e as escapeRegexString,Pe as findAllMatches,Le as findInDocument,ze as findInParagraph,Me as getDefaultHighlightOptions,Be as getMatchCountText,Oe as isEmptySearch,He as replaceAllInContent,Ke as replaceFirstInContent,Ge as scrollToMatch,Ve as useFindReplace};
1
+ import{L as xe,r as c}from"./HyperlinkDialog-ZYH7ZHRF-BvhTCTt_.js";import{P as Ve}from"./HyperlinkDialog-ZYH7ZHRF-BvhTCTt_.js";import{a}from"./vendor-react-B22wqN3J.js";import{j as t}from"./vendor-codemirror-CN-sJePf.js";import"./index-skgP2UD3.js";import"./vendor-xterm-BWUgpGtR.js";var fe={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"transparent",display:"flex",alignItems:"flex-start",justifyContent:"flex-end",zIndex:1e4,pointerEvents:"none"},ge={backgroundColor:"var(--doc-surface)",borderRadius:"4px",boxShadow:"0 4px 20px var(--doc-shadow)",minWidth:"360px",maxWidth:"440px",width:"100%",margin:"60px 20px 20px 20px",pointerEvents:"auto"},he={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",borderBottom:"1px solid var(--doc-border)",backgroundColor:"var(--doc-bg-subtle)",borderTopLeftRadius:"4px",borderTopRightRadius:"4px"},me={margin:0,fontSize:"14px",fontWeight:600,color:"var(--doc-text)"},be={background:"none",border:"none",fontSize:"18px",cursor:"pointer",color:"var(--doc-text-muted)",padding:"2px 6px",lineHeight:1},ve={padding:"16px"},Q={display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},V={width:"60px",fontSize:"13px",color:"var(--doc-text)",flexShrink:0},D={flex:1,padding:"8px 10px",border:"1px solid var(--doc-border-input)",borderRadius:"3px",fontSize:"13px",boxSizing:"border-box",outline:"none"},X={...D,borderColor:"var(--doc-link)",boxShadow:"0 0 0 2px var(--doc-focus-ring)"},ye={display:"flex",flexDirection:"column",gap:"6px",marginLeft:"8px"},F={padding:"6px 12px",borderRadius:"3px",fontSize:"12px",fontWeight:500,cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)",minWidth:"80px",textAlign:"center"},Z={...F,backgroundColor:"var(--doc-bg-hover)",color:"var(--doc-text-placeholder)",cursor:"not-allowed"},T={padding:"6px 10px",borderRadius:"3px",fontSize:"14px",cursor:"pointer",border:"1px solid var(--doc-border-input)",backgroundColor:"var(--doc-bg-input)",color:"var(--doc-text)"},$={...T,color:"var(--doc-border-input)",cursor:"not-allowed"},Ce={display:"flex",gap:"16px",marginTop:"4px",marginLeft:"68px"},N={display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"var(--doc-text-muted)",cursor:"pointer"},q={width:"14px",height:"14px",cursor:"pointer"},U={marginLeft:"68px",fontSize:"12px",color:"var(--doc-text-muted)",marginBottom:"8px"},ke={...U,color:"var(--doc-error)"},Re=220,je=({style:s})=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:s,children:t.jsx("polyline",{points:"18 15 12 9 6 15"})}),We=({style:s})=>t.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:s,children:t.jsx("polyline",{points:"6 9 12 15 18 9"})});function Ie({isOpen:s,onClose:x,onFind:g,onFindNext:E,onFindPrevious:A,onReplace:_,onReplaceAll:P,onHighlightMatches:f,onClearHighlights:y,initialSearchText:L="",replaceMode:C=!1,currentResult:k,className:Y,style:ee}){let{t:r}=xe(),[o,z]=a.useState(""),[h,M]=a.useState(""),[R,B]=a.useState(C),[n,te]=a.useState(!1),[i,ae]=a.useState(!1),[l,p]=a.useState(null),[le,O]=a.useState(!1),[oe,H]=a.useState(!1),j=a.useRef(null),K=a.useRef(null),G=a.useRef(g),J=a.useRef(f),m=a.useRef(y);a.useEffect(()=>{G.current=g,J.current=f,m.current=y},[g,f,y]),a.useEffect(()=>{k!==void 0&&p(k)},[k]),a.useEffect(()=>{s?(z(L),M(""),B(C),p(null),setTimeout(()=>{j.current?.focus(),j.current?.select()},100)):m.current?.()},[s,L,C]);let b=a.useCallback(()=>{p(null),m.current?.()},[]),d=a.useCallback((e,v)=>{if(!e.trim()){b();return}let w=G.current(e,v);p(w),w?.matches?J.current?.(w.matches):m.current?.()},[b]);a.useEffect(()=>{if(!s)return;if(!o.trim()){b();return}let e=window.setTimeout(()=>{d(o,{matchCase:n,matchWholeWord:i})},Re);return()=>window.clearTimeout(e)},[s,o,n,i,d,b]);let re=a.useCallback(e=>{z(e.target.value),p(null)},[]),W=a.useCallback(()=>{if(!o.trim()){d(o,{matchCase:n,matchWholeWord:i});return}if(!l){d(o,{matchCase:n,matchWholeWord:i});return}if(E()&&l){let e=(l.currentIndex+1)%l.totalCount;p({...l,currentIndex:e})}},[o,n,i,l,d,E]),I=a.useCallback(()=>{if(!o.trim()){d(o,{matchCase:n,matchWholeWord:i});return}if(!l){d(o,{matchCase:n,matchWholeWord:i});return}if(A()&&l){let e=l.currentIndex===0?l.totalCount-1:l.currentIndex-1;p({...l,currentIndex:e})}},[o,n,i,l,d,A]),ne=a.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),e.shiftKey?I():l?W():d(o,{matchCase:n,matchWholeWord:i})):e.key==="Escape"&&x()},[l,o,n,i,d,W,I,x]),S=a.useCallback(()=>{if(!(!l||l.totalCount===0)&&_(h)){let e=g(o,{matchCase:n,matchWholeWord:i});p(e),e?.matches&&f&&f(e.matches)}},[l,h,o,n,i,_,g,f]),ie=a.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),S()):e.key==="Escape"&&x()},[S,x]),ce=a.useCallback(()=>{o.trim()&&P(o,h,{matchCase:n,matchWholeWord:i})>0&&(p(null),m.current?.())},[o,h,n,i,P]),de=a.useCallback(()=>{B(e=>{let v=!e;return v&&setTimeout(()=>K.current?.focus(),100),v})},[]),se=a.useCallback(e=>{e.target,e.currentTarget},[]),pe=a.useCallback(e=>{e.key==="Escape"&&x()},[x]);if(!s)return null;let u=l&&l.totalCount>0,ue=l&&l.totalCount===0&&o.trim();return t.jsx("div",{className:`docx-find-replace-dialog-overlay ${Y||""}`,style:{...fe,...ee},onClick:se,onKeyDown:pe,children:t.jsxs("div",{className:"docx-find-replace-dialog","data-testid":"find-replace-dialog",style:ge,role:"dialog","aria-modal":"false","aria-labelledby":"find-replace-dialog-title",children:[t.jsxs("div",{className:"docx-find-replace-dialog-header",style:he,children:[t.jsx("h2",{id:"find-replace-dialog-title",style:me,children:r(R?"dialogs.findReplace.titleFindReplace":"dialogs.findReplace.titleFind")}),t.jsx("button",{type:"button",className:"docx-find-replace-dialog-close",style:be,onClick:x,"aria-label":r("common.closeDialog"),children:"×"})]}),t.jsxs("div",{className:"docx-find-replace-dialog-body",style:ve,children:[t.jsxs("div",{className:"docx-find-replace-dialog-row",style:Q,children:[t.jsx("label",{htmlFor:"find-text",style:V,children:r("dialogs.findReplace.findLabel")}),t.jsx("input",{ref:j,id:"find-text",type:"text",className:"docx-find-replace-dialog-input",style:le?X:D,value:o,onChange:re,onKeyDown:ne,onFocus:()=>O(!0),onBlur:()=>{O(!1),o.trim()&&!l&&d(o,{matchCase:n,matchWholeWord:i})},placeholder:r("dialogs.findReplace.findPlaceholder"),"aria-label":r("dialogs.findReplace.findAriaLabel")}),t.jsxs("div",{style:{display:"flex",gap:"4px"},children:[t.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:u?T:$,onClick:I,disabled:!u,"aria-label":r("dialogs.findReplace.findPrevious"),title:r("dialogs.findReplace.findPreviousTitle"),children:t.jsx(je,{})}),t.jsx("button",{type:"button",className:"docx-find-replace-dialog-nav",style:u?T:$,onClick:W,disabled:!u,"aria-label":r("dialogs.findReplace.findNext"),title:r("dialogs.findReplace.findNextTitle"),children:t.jsx(We,{})})]})]}),u&&t.jsx("div",{className:"docx-find-replace-dialog-status",style:U,children:r("dialogs.findReplace.matchCount",{current:l.currentIndex+1,total:l.totalCount})}),ue&&t.jsx("div",{className:"docx-find-replace-dialog-status",style:ke,children:r("dialogs.findReplace.noResults")}),R&&t.jsx(t.Fragment,{children:t.jsxs("div",{className:"docx-find-replace-dialog-row",style:Q,children:[t.jsx("label",{htmlFor:"replace-text",style:V,children:r("dialogs.findReplace.replaceLabel")}),t.jsx("input",{ref:K,id:"replace-text",type:"text",className:"docx-find-replace-dialog-input",style:oe?X:D,value:h,onChange:e=>M(e.target.value),onKeyDown:ie,onFocus:()=>H(!0),onBlur:()=>H(!1),placeholder:r("dialogs.findReplace.replacePlaceholder"),"aria-label":r("dialogs.findReplace.replaceAriaLabel")}),t.jsxs("div",{style:ye,children:[t.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:u?F:Z,onClick:S,disabled:!u,title:r("dialogs.findReplace.replaceCurrentTitle"),children:r("dialogs.findReplace.replaceButton")}),t.jsx("button",{type:"button",className:"docx-find-replace-dialog-button",style:u?F:Z,onClick:ce,disabled:!u,title:r("dialogs.findReplace.replaceAllTitle"),children:r("dialogs.findReplace.replaceAllButton")})]})]})}),t.jsxs("div",{className:"docx-find-replace-dialog-options",style:Ce,children:[t.jsxs("label",{className:"docx-find-replace-dialog-option",style:N,children:[t.jsx("input",{type:"checkbox",style:q,checked:n,onChange:e=>te(e.target.checked)}),r("dialogs.findReplace.matchCase")]}),t.jsxs("label",{className:"docx-find-replace-dialog-option",style:N,children:[t.jsx("input",{type:"checkbox",style:q,checked:i,onChange:e=>ae(e.target.checked)}),r("dialogs.findReplace.wholeWords")]}),!R&&t.jsx("button",{type:"button",style:{...N,background:"none",border:"none",cursor:"pointer",color:"var(--doc-link)",padding:0},onClick:de,children:r("dialogs.findReplace.toggleReplace")})]})]})]})})}var Te=Ie,Ee=c.createDefaultFindOptions,Ae=c.createSearchPattern,_e=c.escapeRegexString,Pe=c.findAllMatches,Le=c.findInDocument,ze=c.findInParagraph,Me=c.getDefaultHighlightOptions,Be=c.getMatchCountText,Oe=c.isEmptySearch,He=c.replaceAllInContent,Ke=c.replaceFirstInContent,Ge=c.scrollToMatch;export{Ie as FindReplaceDialog,Ee as createDefaultFindOptions,Ae as createSearchPattern,Te as default,_e as escapeRegexString,Pe as findAllMatches,Le as findInDocument,ze as findInParagraph,Me as getDefaultHighlightOptions,Be as getMatchCountText,Oe as isEmptySearch,He as replaceAllInContent,Ke as replaceFirstInContent,Ge as scrollToMatch,Ve as useFindReplace};
@@ -1 +1 @@
1
- import{L as B}from"./HyperlinkDialog-ZYH7ZHRF-EbyukgDx.js";import{a as n}from"./vendor-react-B22wqN3J.js";import{j as e}from"./vendor-codemirror-CN-sJePf.js";import"./index-RKNvOXcq.js";import"./vendor-xterm-BWUgpGtR.js";var A={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"var(--doc-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},E={backgroundColor:"var(--doc-surface)",borderRadius:8,boxShadow:"0 4px 20px var(--doc-shadow)",padding:24,minWidth:400,maxWidth:500},f={marginBottom:16,padding:12,border:"1px solid var(--doc-border)",borderRadius:4},r={display:"block",fontSize:12,color:"var(--doc-text-muted)",marginBottom:4},i={width:"100%",padding:"4px 8px",border:"1px solid var(--doc-border-input)",borderRadius:4,fontSize:13,marginBottom:8},b={width:60,padding:"4px 8px",border:"1px solid var(--doc-border-input)",borderRadius:4,fontSize:13,marginBottom:8},I={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},j={padding:"6px 16px",border:"1px solid var(--doc-border-input)",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"var(--doc-surface)"},L={...j,backgroundColor:"var(--doc-primary)",color:"var(--doc-on-primary)",border:"1px solid var(--doc-primary)"},y=[{value:"decimal",labelKey:"dialogs.footnoteProperties.formats.decimal"},{value:"lowerRoman",labelKey:"dialogs.footnoteProperties.formats.lowerRoman"},{value:"upperRoman",labelKey:"dialogs.footnoteProperties.formats.upperRoman"},{value:"lowerLetter",labelKey:"dialogs.footnoteProperties.formats.lowerAlpha"},{value:"upperLetter",labelKey:"dialogs.footnoteProperties.formats.upperAlpha"},{value:"chicago",labelKey:"dialogs.footnoteProperties.formats.symbols"}];function N({isOpen:P,onClose:s,onApply:v,footnotePr:l,endnotePr:a}){let{t}=B(),[d,S]=n.useState(l?.position??"pageBottom"),[p,C]=n.useState(l?.numFmt??"decimal"),[u,R]=n.useState(l?.numStart??1),[c,k]=n.useState(l?.numRestart??"continuous"),[m,w]=n.useState(a?.position??"docEnd"),[g,O]=n.useState(a?.numFmt??"lowerRoman"),[x,z]=n.useState(a?.numStart??1),[h,K]=n.useState(a?.numRestart??"continuous"),F=n.useCallback(()=>{v({position:d,numFmt:p,numStart:u,numRestart:c},{position:m,numFmt:g,numStart:x,numRestart:h}),s()},[d,p,u,c,m,g,x,h,v,s]);return P?e.jsx("div",{style:A,onClick:s,children:e.jsxs("div",{style:E,onClick:o=>o.stopPropagation(),children:[e.jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:t("dialogs.footnoteProperties.title")}),e.jsxs("div",{style:f,children:[e.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:t("dialogs.footnoteProperties.footnotes")}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.position")}),e.jsxs("select",{style:i,value:d,onChange:o=>S(o.target.value),children:[e.jsx("option",{value:"pageBottom",children:t("dialogs.footnoteProperties.footnotePositions.bottomOfPage")}),e.jsx("option",{value:"beneathText",children:t("dialogs.footnoteProperties.footnotePositions.belowText")})]}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numberFormat")}),e.jsx("select",{style:i,value:p,onChange:o=>C(o.target.value),children:y.map(o=>e.jsx("option",{value:o.value,children:t(o.labelKey)},o.value))}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.startAt")}),e.jsx("input",{type:"number",min:1,style:b,value:u,onChange:o=>R(parseInt(o.target.value,10)||1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numbering")}),e.jsxs("select",{style:i,value:c,onChange:o=>k(o.target.value),children:[e.jsx("option",{value:"continuous",children:t("dialogs.footnoteProperties.numberingOptions.continuous")}),e.jsx("option",{value:"eachSect",children:t("dialogs.footnoteProperties.numberingOptions.restartSection")}),e.jsx("option",{value:"eachPage",children:t("dialogs.footnoteProperties.numberingOptions.restartPage")})]})]})]})]}),e.jsxs("div",{style:f,children:[e.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:t("dialogs.footnoteProperties.endnotes")}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.position")}),e.jsxs("select",{style:i,value:m,onChange:o=>w(o.target.value),children:[e.jsx("option",{value:"docEnd",children:t("dialogs.footnoteProperties.endnotePositions.endOfDocument")}),e.jsx("option",{value:"sectEnd",children:t("dialogs.footnoteProperties.endnotePositions.endOfSection")})]}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numberFormat")}),e.jsx("select",{style:i,value:g,onChange:o=>O(o.target.value),children:y.map(o=>e.jsx("option",{value:o.value,children:t(o.labelKey)},o.value))}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.startAt")}),e.jsx("input",{type:"number",min:1,style:b,value:x,onChange:o=>z(parseInt(o.target.value,10)||1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numbering")}),e.jsxs("select",{style:i,value:h,onChange:o=>K(o.target.value),children:[e.jsx("option",{value:"continuous",children:t("dialogs.footnoteProperties.numberingOptions.continuous")}),e.jsx("option",{value:"eachSect",children:t("dialogs.footnoteProperties.numberingOptions.restartSection")})]})]})]})]}),e.jsxs("div",{style:I,children:[e.jsx("button",{style:j,onClick:s,children:t("common.cancel")}),e.jsx("button",{style:L,onClick:F,children:t("common.apply")})]})]})}):null}export{N as FootnotePropertiesDialog};
1
+ import{L as B}from"./HyperlinkDialog-ZYH7ZHRF-BvhTCTt_.js";import{a as n}from"./vendor-react-B22wqN3J.js";import{j as e}from"./vendor-codemirror-CN-sJePf.js";import"./index-skgP2UD3.js";import"./vendor-xterm-BWUgpGtR.js";var A={position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"var(--doc-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e4},E={backgroundColor:"var(--doc-surface)",borderRadius:8,boxShadow:"0 4px 20px var(--doc-shadow)",padding:24,minWidth:400,maxWidth:500},f={marginBottom:16,padding:12,border:"1px solid var(--doc-border)",borderRadius:4},r={display:"block",fontSize:12,color:"var(--doc-text-muted)",marginBottom:4},i={width:"100%",padding:"4px 8px",border:"1px solid var(--doc-border-input)",borderRadius:4,fontSize:13,marginBottom:8},b={width:60,padding:"4px 8px",border:"1px solid var(--doc-border-input)",borderRadius:4,fontSize:13,marginBottom:8},I={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},j={padding:"6px 16px",border:"1px solid var(--doc-border-input)",borderRadius:4,cursor:"pointer",fontSize:13,backgroundColor:"var(--doc-surface)"},L={...j,backgroundColor:"var(--doc-primary)",color:"var(--doc-on-primary)",border:"1px solid var(--doc-primary)"},y=[{value:"decimal",labelKey:"dialogs.footnoteProperties.formats.decimal"},{value:"lowerRoman",labelKey:"dialogs.footnoteProperties.formats.lowerRoman"},{value:"upperRoman",labelKey:"dialogs.footnoteProperties.formats.upperRoman"},{value:"lowerLetter",labelKey:"dialogs.footnoteProperties.formats.lowerAlpha"},{value:"upperLetter",labelKey:"dialogs.footnoteProperties.formats.upperAlpha"},{value:"chicago",labelKey:"dialogs.footnoteProperties.formats.symbols"}];function N({isOpen:P,onClose:s,onApply:v,footnotePr:l,endnotePr:a}){let{t}=B(),[d,S]=n.useState(l?.position??"pageBottom"),[p,C]=n.useState(l?.numFmt??"decimal"),[u,R]=n.useState(l?.numStart??1),[c,k]=n.useState(l?.numRestart??"continuous"),[m,w]=n.useState(a?.position??"docEnd"),[g,O]=n.useState(a?.numFmt??"lowerRoman"),[x,z]=n.useState(a?.numStart??1),[h,K]=n.useState(a?.numRestart??"continuous"),F=n.useCallback(()=>{v({position:d,numFmt:p,numStart:u,numRestart:c},{position:m,numFmt:g,numStart:x,numRestart:h}),s()},[d,p,u,c,m,g,x,h,v,s]);return P?e.jsx("div",{style:A,onClick:s,children:e.jsxs("div",{style:E,onClick:o=>o.stopPropagation(),children:[e.jsx("h3",{style:{margin:"0 0 16px",fontSize:16},children:t("dialogs.footnoteProperties.title")}),e.jsxs("div",{style:f,children:[e.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:t("dialogs.footnoteProperties.footnotes")}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.position")}),e.jsxs("select",{style:i,value:d,onChange:o=>S(o.target.value),children:[e.jsx("option",{value:"pageBottom",children:t("dialogs.footnoteProperties.footnotePositions.bottomOfPage")}),e.jsx("option",{value:"beneathText",children:t("dialogs.footnoteProperties.footnotePositions.belowText")})]}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numberFormat")}),e.jsx("select",{style:i,value:p,onChange:o=>C(o.target.value),children:y.map(o=>e.jsx("option",{value:o.value,children:t(o.labelKey)},o.value))}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.startAt")}),e.jsx("input",{type:"number",min:1,style:b,value:u,onChange:o=>R(parseInt(o.target.value,10)||1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numbering")}),e.jsxs("select",{style:i,value:c,onChange:o=>k(o.target.value),children:[e.jsx("option",{value:"continuous",children:t("dialogs.footnoteProperties.numberingOptions.continuous")}),e.jsx("option",{value:"eachSect",children:t("dialogs.footnoteProperties.numberingOptions.restartSection")}),e.jsx("option",{value:"eachPage",children:t("dialogs.footnoteProperties.numberingOptions.restartPage")})]})]})]})]}),e.jsxs("div",{style:f,children:[e.jsx("h4",{style:{margin:"0 0 8px",fontSize:14},children:t("dialogs.footnoteProperties.endnotes")}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.position")}),e.jsxs("select",{style:i,value:m,onChange:o=>w(o.target.value),children:[e.jsx("option",{value:"docEnd",children:t("dialogs.footnoteProperties.endnotePositions.endOfDocument")}),e.jsx("option",{value:"sectEnd",children:t("dialogs.footnoteProperties.endnotePositions.endOfSection")})]}),e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numberFormat")}),e.jsx("select",{style:i,value:g,onChange:o=>O(o.target.value),children:y.map(o=>e.jsx("option",{value:o.value,children:t(o.labelKey)},o.value))}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.startAt")}),e.jsx("input",{type:"number",min:1,style:b,value:x,onChange:o=>z(parseInt(o.target.value,10)||1)})]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("label",{style:r,children:t("dialogs.footnoteProperties.numbering")}),e.jsxs("select",{style:i,value:h,onChange:o=>K(o.target.value),children:[e.jsx("option",{value:"continuous",children:t("dialogs.footnoteProperties.numberingOptions.continuous")}),e.jsx("option",{value:"eachSect",children:t("dialogs.footnoteProperties.numberingOptions.restartSection")})]})]})]})]}),e.jsxs("div",{style:I,children:[e.jsx("button",{style:j,onClick:s,children:t("common.cancel")}),e.jsx("button",{style:L,onClick:F,children:t("common.apply")})]})]})}):null}export{N as FootnotePropertiesDialog};