@sme.up/ketchup2 1.18.0 → 1.19.0

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 (211) hide show
  1. package/dist/{_basePickBy-B1R94gYg.js → _basePickBy-DLc0xS6g.js} +29 -30
  2. package/dist/_basePickBy-hU15nnuu.cjs +1 -0
  3. package/dist/_baseUniq-Bn1jRtDY.js +614 -0
  4. package/dist/_baseUniq-v0HaTFyU.cjs +1 -0
  5. package/dist/{arc-BDhRalCq.cjs → arc-BN7cLDvU.cjs} +1 -1
  6. package/dist/{arc-DvVEbzqi.js → arc-aCClK8cT.js} +1 -1
  7. package/dist/{architecture-U656AL7Q-Bf9nK-g5.cjs → architecture-U656AL7Q-BlzcZYj0.cjs} +1 -1
  8. package/dist/{architecture-U656AL7Q-xWSQ4SRv.js → architecture-U656AL7Q-CGK9HO5M.js} +1 -1
  9. package/dist/{architectureDiagram-VXUJARFQ-DZV4IIVV.js → architectureDiagram-VXUJARFQ-CDlmghav.js} +3 -3
  10. package/dist/{architectureDiagram-VXUJARFQ-CfqXQSfK.cjs → architectureDiagram-VXUJARFQ-CxXB06ya.cjs} +1 -1
  11. package/dist/assets/imageListAssets.d.ts +3 -1
  12. package/dist/assets/imageListAssets.d.ts.map +1 -1
  13. package/dist/basic-components/autocomplete/autocomplete.d.ts.map +1 -1
  14. package/dist/basic-components/cell/cell-utils.d.ts +8 -0
  15. package/dist/basic-components/cell/cell-utils.d.ts.map +1 -1
  16. package/dist/basic-components/cell/cell.d.ts.map +1 -1
  17. package/dist/basic-components/checkbox/checkbox.d.ts.map +1 -1
  18. package/dist/basic-components/icon/icon.d.ts.map +1 -1
  19. package/dist/basic-components/image/image-types.d.ts +14 -2
  20. package/dist/basic-components/image/image-types.d.ts.map +1 -1
  21. package/dist/basic-components/image/image-utils.d.ts +3 -1
  22. package/dist/basic-components/image/image-utils.d.ts.map +1 -1
  23. package/dist/basic-components/image/image.d.ts.map +1 -1
  24. package/dist/basic-components/image-cell/image-cell-types.d.ts +20 -0
  25. package/dist/basic-components/image-cell/image-cell-types.d.ts.map +1 -0
  26. package/dist/basic-components/image-cell/image-cell.d.ts +3 -0
  27. package/dist/basic-components/image-cell/image-cell.d.ts.map +1 -0
  28. package/dist/basic-components/multiple-select/multiple-select.d.ts.map +1 -1
  29. package/dist/basic-components/slider/slider-types.d.ts +8 -0
  30. package/dist/basic-components/slider/slider-types.d.ts.map +1 -0
  31. package/dist/basic-components/slider/slider.d.ts +4 -0
  32. package/dist/basic-components/slider/slider.d.ts.map +1 -0
  33. package/dist/basic-components/text/text-types.d.ts +3 -0
  34. package/dist/basic-components/text/text-types.d.ts.map +1 -1
  35. package/dist/basic-components/text/text.d.ts.map +1 -1
  36. package/dist/basic-components/text-editor/text-editor-types.d.ts +0 -65
  37. package/dist/basic-components/text-editor/text-editor-types.d.ts.map +1 -1
  38. package/dist/basic-components/text-editor/text-editor-utils.d.ts +13 -23
  39. package/dist/basic-components/text-editor/text-editor-utils.d.ts.map +1 -1
  40. package/dist/basic-components/text-editor/text-editor.d.ts.map +1 -1
  41. package/dist/basic-components/textfield/textfield.d.ts.map +1 -1
  42. package/dist/basic-components/time-picker/time-picker.d.ts.map +1 -1
  43. package/dist/basic-components/time-picker/time-utils.d.ts +1 -1
  44. package/dist/basic-components/time-picker/time-utils.d.ts.map +1 -1
  45. package/dist/{blockDiagram-VD42YOAC-BkkV6LWv.cjs → blockDiagram-VD42YOAC-DaEdiOdS.cjs} +1 -1
  46. package/dist/{blockDiagram-VD42YOAC-tKn8dzo0.js → blockDiagram-VD42YOAC-otiz2gnO.js} +5 -5
  47. package/dist/{c4Diagram-YG6GDRKO-RBwhYEc2.cjs → c4Diagram-YG6GDRKO-B_M0pXDI.cjs} +1 -1
  48. package/dist/{c4Diagram-YG6GDRKO-B0gjRSdn.js → c4Diagram-YG6GDRKO-BqtunVbe.js} +2 -2
  49. package/dist/{channel-3tFaSeKk.js → channel-B3xNo1hN.js} +1 -1
  50. package/dist/channel-BWzBcvC1.cjs +1 -0
  51. package/dist/{chunk-4BX2VUAB-D3u0w2gk.js → chunk-4BX2VUAB-D0ckS2Js.js} +1 -1
  52. package/dist/{chunk-4BX2VUAB-Boz0nX9s.cjs → chunk-4BX2VUAB-jQAMlkG5.cjs} +1 -1
  53. package/dist/{chunk-55IACEB6-BpT8GkSp.js → chunk-55IACEB6-4k6jNTPh.js} +1 -1
  54. package/dist/{chunk-55IACEB6-DVWliiDK.cjs → chunk-55IACEB6-CYP5QeDP.cjs} +1 -1
  55. package/dist/{chunk-B4BG7PRW-Bmq8n4Hs.cjs → chunk-B4BG7PRW-40wFwe2_.cjs} +1 -1
  56. package/dist/{chunk-B4BG7PRW-DH5WVTGe.js → chunk-B4BG7PRW-C5a0R2TF.js} +4 -4
  57. package/dist/{chunk-DI55MBZ5-DVb6521f.cjs → chunk-DI55MBZ5-D46Nxv4C.cjs} +1 -1
  58. package/dist/{chunk-DI55MBZ5-CnYYh3n2.js → chunk-DI55MBZ5-Xs_EvPU9.js} +3 -3
  59. package/dist/{chunk-FMBD7UC4-Cou9fU3U.cjs → chunk-FMBD7UC4-JwXIwsff.cjs} +1 -1
  60. package/dist/{chunk-FMBD7UC4-CfbK5tDm.js → chunk-FMBD7UC4-sbfIyVl_.js} +1 -1
  61. package/dist/{chunk-QN33PNHL-CCaezjI9.js → chunk-QN33PNHL-CZLTe-5X.js} +1 -1
  62. package/dist/{chunk-QN33PNHL-bDqDrxJR.cjs → chunk-QN33PNHL-D89dqsY7.cjs} +1 -1
  63. package/dist/{chunk-QZHKN3VN-B_jBa8Xi.js → chunk-QZHKN3VN-Bym_staK.js} +1 -1
  64. package/dist/{chunk-QZHKN3VN-agaSkAKB.cjs → chunk-QZHKN3VN-CnB6OkgR.cjs} +1 -1
  65. package/dist/{chunk-TZMSLE5B-DhehdAHS.cjs → chunk-TZMSLE5B-CzF1p6NC.cjs} +1 -1
  66. package/dist/{chunk-TZMSLE5B-L3IDdUIe.js → chunk-TZMSLE5B-Dp0YIOCM.js} +1 -1
  67. package/dist/{classDiagram-v2-WZHVMYZB-vQpFohnj.js → classDiagram-2ON5EDUG-Bckc28LC.js} +2 -2
  68. package/dist/{classDiagram-2ON5EDUG-SmUoP7ZW.cjs → classDiagram-2ON5EDUG-FQVyK433.cjs} +1 -1
  69. package/dist/{classDiagram-2ON5EDUG-vQpFohnj.js → classDiagram-v2-WZHVMYZB-Bckc28LC.js} +2 -2
  70. package/dist/{classDiagram-v2-WZHVMYZB-SmUoP7ZW.cjs → classDiagram-v2-WZHVMYZB-FQVyK433.cjs} +1 -1
  71. package/dist/clone-BuJ6ESdC.cjs +1 -0
  72. package/dist/{clone-YOXgx4TW.js → clone-gnQjFue0.js} +1 -1
  73. package/dist/components/data-table/filtering/data-table-filter-utils.d.ts +3 -3
  74. package/dist/components/data-table/filtering/data-table-filter-utils.d.ts.map +1 -1
  75. package/dist/components/image-list/components/image-list-catalog.d.ts +5 -0
  76. package/dist/components/image-list/components/image-list-catalog.d.ts.map +1 -0
  77. package/dist/components/image-list/components/image-list-compact.d.ts +5 -0
  78. package/dist/components/image-list/components/image-list-compact.d.ts.map +1 -0
  79. package/dist/components/image-list/components/image-list-drill-down.d.ts +1 -1
  80. package/dist/components/image-list/components/image-list-drill-down.d.ts.map +1 -1
  81. package/dist/components/image-list/components/image-list-explorer.d.ts +5 -0
  82. package/dist/components/image-list/components/image-list-explorer.d.ts.map +1 -0
  83. package/dist/components/image-list/components/image-list-modal.d.ts +5 -0
  84. package/dist/components/image-list/components/image-list-modal.d.ts.map +1 -0
  85. package/dist/components/image-list/components/image-list-slideshow.d.ts +5 -0
  86. package/dist/components/image-list/components/image-list-slideshow.d.ts.map +1 -0
  87. package/dist/components/image-list/components/image-list-tree.d.ts +5 -0
  88. package/dist/components/image-list/components/image-list-tree.d.ts.map +1 -0
  89. package/dist/components/image-list/hooks/useNavigation.d.ts +2 -2
  90. package/dist/components/image-list/hooks/useNavigation.d.ts.map +1 -1
  91. package/dist/components/image-list/hooks/useSelection.d.ts +3 -19
  92. package/dist/components/image-list/hooks/useSelection.d.ts.map +1 -1
  93. package/dist/components/image-list/image-list-types.d.ts +95 -0
  94. package/dist/components/image-list/image-list-types.d.ts.map +1 -0
  95. package/dist/components/image-list/image-list-utils.d.ts +13 -0
  96. package/dist/components/image-list/image-list-utils.d.ts.map +1 -0
  97. package/dist/components/image-list/image-list.d.ts +1 -1
  98. package/dist/components/image-list/image-list.d.ts.map +1 -1
  99. package/dist/components/input-panel/assets/data.d.ts.map +1 -1
  100. package/dist/components/input-panel/input-panel.d.ts.map +1 -1
  101. package/dist/{cose-bilkent-S5V4N54A-DD8g8ODW.js → cose-bilkent-S5V4N54A-Df1US9MJ.js} +1 -1
  102. package/dist/{cose-bilkent-S5V4N54A-DdSoONjd.cjs → cose-bilkent-S5V4N54A-DsOyNFsG.cjs} +1 -1
  103. package/dist/{dagre-6UL2VRFP-BjOVGWYT.js → dagre-6UL2VRFP-COacgFYc.js} +6 -6
  104. package/dist/{dagre-6UL2VRFP-B2AtgfKt.cjs → dagre-6UL2VRFP-CXVsDZys.cjs} +1 -1
  105. package/dist/{diagram-PSM6KHXK-D3n0zVfd.js → diagram-PSM6KHXK-Blv6GFOJ.js} +4 -4
  106. package/dist/{diagram-PSM6KHXK-D_fCWLTY.cjs → diagram-PSM6KHXK-D1gDIrxH.cjs} +1 -1
  107. package/dist/{diagram-QEK2KX5R-CIX1p2TE.cjs → diagram-QEK2KX5R-DGRRWbUu.cjs} +1 -1
  108. package/dist/{diagram-QEK2KX5R-D4IV84fI.js → diagram-QEK2KX5R-DvB0VrfT.js} +3 -3
  109. package/dist/{diagram-S2PKOQOG-DQyeu84g.cjs → diagram-S2PKOQOG--lHmHnKW.cjs} +1 -1
  110. package/dist/{diagram-S2PKOQOG-D_bz5gIz.js → diagram-S2PKOQOG-DxIEa6jg.js} +3 -3
  111. package/dist/{erDiagram-Q2GNP2WA-FaG72Sma.js → erDiagram-Q2GNP2WA-B--ZupT4.js} +4 -4
  112. package/dist/{erDiagram-Q2GNP2WA-CA3u15D8.cjs → erDiagram-Q2GNP2WA-BZ1GgS-i.cjs} +1 -1
  113. package/dist/{flowDiagram-NV44I4VS-Cqs3UFBQ.js → flowDiagram-NV44I4VS-82EN5frg.js} +5 -5
  114. package/dist/{flowDiagram-NV44I4VS-CR_U7F3i.cjs → flowDiagram-NV44I4VS-BjclDOwK.cjs} +1 -1
  115. package/dist/functional-components/badge/badge-types.d.ts +0 -4
  116. package/dist/functional-components/badge/badge-types.d.ts.map +1 -1
  117. package/dist/functional-components/badge/badge.d.ts.map +1 -1
  118. package/dist/functional-components/layout/layout-utils.test.d.ts +2 -0
  119. package/dist/functional-components/layout/layout-utils.test.d.ts.map +1 -0
  120. package/dist/{ganttDiagram-JELNMOA3-64EHKpud.js → ganttDiagram-JELNMOA3-D8bgGv3W.js} +2 -2
  121. package/dist/{ganttDiagram-JELNMOA3-CN1LWzl3.cjs → ganttDiagram-JELNMOA3-Dg3gcgGP.cjs} +1 -1
  122. package/dist/{gitGraph-F6HP7TQM-BHF2Px3a.js → gitGraph-F6HP7TQM-CYYpWdGq.js} +1 -1
  123. package/dist/{gitGraph-F6HP7TQM-g-uFxP-W.cjs → gitGraph-F6HP7TQM-DAOdDfOa.cjs} +1 -1
  124. package/dist/{gitGraphDiagram-NY62KEGX-gkspcAEl.cjs → gitGraphDiagram-NY62KEGX-CACSicRn.cjs} +1 -1
  125. package/dist/{gitGraphDiagram-NY62KEGX-BMZgJCnk.js → gitGraphDiagram-NY62KEGX-CM2Vxzlx.js} +4 -4
  126. package/dist/{graph-Bl9cAjm8.js → graph-B-keMiTZ.js} +2 -3
  127. package/dist/graph-Mv2qv5SB.cjs +1 -0
  128. package/dist/{index-D_kILrIh.js → index-D5NyASqq.js} +28996 -28426
  129. package/dist/{index-DIIaXWro.cjs → index-dhfrnDvJ.cjs} +152 -152
  130. package/dist/index.d.ts +4 -1
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/{info-NVLQJR56-srf2MBEA.cjs → info-NVLQJR56-BlLr9dLS.cjs} +1 -1
  133. package/dist/info-NVLQJR56-CuxiCK8q.js +5 -0
  134. package/dist/{infoDiagram-WHAUD3N6-xpWWBRHb.js → infoDiagram-WHAUD3N6-BdRjW-aL.js} +2 -2
  135. package/dist/{infoDiagram-WHAUD3N6-DA8ixL4V.cjs → infoDiagram-WHAUD3N6-DFw2Z3_-.cjs} +1 -1
  136. package/dist/{journeyDiagram-XKPGCS4Q-DF1jSlK-.cjs → journeyDiagram-XKPGCS4Q-DkjuGmmU.cjs} +1 -1
  137. package/dist/{journeyDiagram-XKPGCS4Q-CiHV35D-.js → journeyDiagram-XKPGCS4Q-DlpDeIYp.js} +4 -4
  138. package/dist/{kanban-definition-3W4ZIXB7-BWGryLGw.js → kanban-definition-3W4ZIXB7-51Pnrmuv.js} +2 -2
  139. package/dist/{kanban-definition-3W4ZIXB7-gS0oGytB.cjs → kanban-definition-3W4ZIXB7-aQx57fCW.cjs} +1 -1
  140. package/dist/ketchup2.cjs.js +1 -1
  141. package/dist/ketchup2.css +1 -1
  142. package/dist/ketchup2.es.js +16 -15
  143. package/dist/{layout-DqfckNJZ.js → layout-DN-p0Ppz.js} +245 -242
  144. package/dist/layout-TZOoqACN.cjs +1 -0
  145. package/dist/{linear-CDB37PVm.cjs → linear-K9FI-N_R.cjs} +1 -1
  146. package/dist/{linear-BwTuJ7Vo.js → linear-SvFy3H5R.js} +1 -1
  147. package/dist/locale/en/translation.json.d.ts +0 -1
  148. package/dist/locale/it/translation.json.d.ts +0 -1
  149. package/dist/{mermaid-parser.core-Kh2GaZjn.js → mermaid-parser.core-C0aPfQrd.js} +208 -209
  150. package/dist/{mermaid-parser.core-2c535U97.cjs → mermaid-parser.core-DrvvGvos.cjs} +64 -64
  151. package/dist/{mindmap-definition-VGOIOE7T-CHXB52JE.js → mindmap-definition-VGOIOE7T-B-XcJ1QB.js} +3 -3
  152. package/dist/{mindmap-definition-VGOIOE7T-Dbf-IjJg.cjs → mindmap-definition-VGOIOE7T-CQBoNmIj.cjs} +1 -1
  153. package/dist/{packet-BFZMPI3H-CWlKzkUT.js → packet-BFZMPI3H-C96MlUhq.js} +1 -1
  154. package/dist/{packet-BFZMPI3H-CHjUkc3K.cjs → packet-BFZMPI3H-CFs8sQKO.cjs} +1 -1
  155. package/dist/pie-7BOR55EZ-B7H6T2nu.js +5 -0
  156. package/dist/{pie-7BOR55EZ-DF8jDFu6.cjs → pie-7BOR55EZ-D1z_FiDQ.cjs} +1 -1
  157. package/dist/{pieDiagram-ADFJNKIX-BS47ESx3.js → pieDiagram-ADFJNKIX-Btipy1Yg.js} +4 -4
  158. package/dist/{pieDiagram-ADFJNKIX-CUXoHrUo.cjs → pieDiagram-ADFJNKIX-DITgkzrb.cjs} +1 -1
  159. package/dist/{quadrantDiagram-AYHSOK5B-BDCNfr1M.js → quadrantDiagram-AYHSOK5B-0REjJWXf.js} +2 -2
  160. package/dist/{quadrantDiagram-AYHSOK5B-DR-GeD40.cjs → quadrantDiagram-AYHSOK5B-DUvmRtA9.cjs} +1 -1
  161. package/dist/radar-NHE76QYJ-BBThtHed.js +5 -0
  162. package/dist/{radar-NHE76QYJ-CTPycyar.cjs → radar-NHE76QYJ-buBWFcX8.cjs} +1 -1
  163. package/dist/{requirementDiagram-UZGBJVZJ-CUfIh-7P.js → requirementDiagram-UZGBJVZJ-3qREmHHw.js} +3 -3
  164. package/dist/{requirementDiagram-UZGBJVZJ-vOYjKcHP.cjs → requirementDiagram-UZGBJVZJ-D5HKHjuR.cjs} +1 -1
  165. package/dist/{sankeyDiagram-TZEHDZUN-Ddj4CqOU.js → sankeyDiagram-TZEHDZUN-CB7aU9wG.js} +1 -1
  166. package/dist/{sankeyDiagram-TZEHDZUN-Dn5DcHZn.cjs → sankeyDiagram-TZEHDZUN-DDHq92cR.cjs} +1 -1
  167. package/dist/{sequenceDiagram-WL72ISMW-DzATBRBb.cjs → sequenceDiagram-WL72ISMW-CrGNKfm7.cjs} +1 -1
  168. package/dist/{sequenceDiagram-WL72ISMW-DCp5IF0l.js → sequenceDiagram-WL72ISMW-Dp9D1kc1.js} +3 -3
  169. package/dist/{stateDiagram-FKZM4ZOC-CYSSqqZ6.js → stateDiagram-FKZM4ZOC-Dg2jwdvB.js} +4 -4
  170. package/dist/{stateDiagram-FKZM4ZOC-Du6jFWWB.cjs → stateDiagram-FKZM4ZOC-TVfktX-m.cjs} +1 -1
  171. package/dist/{stateDiagram-v2-4FDKWEC3-Cxj_JYYu.js → stateDiagram-v2-4FDKWEC3-BeDflo8x.js} +2 -2
  172. package/dist/{stateDiagram-v2-4FDKWEC3-BAYfudRi.cjs → stateDiagram-v2-4FDKWEC3-CVw7R7Sy.cjs} +1 -1
  173. package/dist/{timeline-definition-IT6M3QCI-Dw1JJhHl.js → timeline-definition-IT6M3QCI-DPYD0-yi.js} +2 -2
  174. package/dist/{timeline-definition-IT6M3QCI-fZZ7KhwG.cjs → timeline-definition-IT6M3QCI-QaW1rM2C.cjs} +1 -1
  175. package/dist/{treemap-KMMF4GRG-DIf-BmJb.cjs → treemap-KMMF4GRG-B3ovpU-a.cjs} +1 -1
  176. package/dist/{treemap-KMMF4GRG-DOx8Kmfm.js → treemap-KMMF4GRG-BtzlMHus.js} +1 -1
  177. package/dist/types/data-structures.d.ts +8 -3
  178. package/dist/types/data-structures.d.ts.map +1 -1
  179. package/dist/types/translation.d.ts +0 -1
  180. package/dist/types/translation.d.ts.map +1 -1
  181. package/dist/utils/display-value.d.ts.map +1 -1
  182. package/dist/utils/wrapper-types/date.d.ts.map +1 -1
  183. package/dist/utils/wrapper-types/time/time-utils.d.ts +8 -0
  184. package/dist/utils/wrapper-types/time/time-utils.d.ts.map +1 -1
  185. package/dist/utils/wrapper-types/time/time.d.ts +1 -1
  186. package/dist/utils/wrapper-types/time/time.d.ts.map +1 -1
  187. package/dist/{xychartDiagram-PRI3JC2R-CHFF9E0J.js → xychartDiagram-PRI3JC2R-6W3NRZoh.js} +2 -2
  188. package/dist/{xychartDiagram-PRI3JC2R-Cg1xVYiM.cjs → xychartDiagram-PRI3JC2R-9Qn35IaK.cjs} +1 -1
  189. package/package.json +1 -2
  190. package/dist/_baseIsEqual-CEeDg5JY.cjs +0 -1
  191. package/dist/_baseIsEqual-DGkLOOUv.js +0 -330
  192. package/dist/_basePickBy-DaIc-wgz.cjs +0 -1
  193. package/dist/_baseUniq-DTfHgbiF.cjs +0 -1
  194. package/dist/_baseUniq-Fo_obzds.js +0 -292
  195. package/dist/channel-0VH3jwlj.cjs +0 -1
  196. package/dist/clone-B_ggB8XZ.cjs +0 -1
  197. package/dist/cloneDeep-BKtU4IKb.js +0 -8
  198. package/dist/cloneDeep-CAsH5xlb.cjs +0 -1
  199. package/dist/components/image-list/components/image-list-item.d.ts +0 -3
  200. package/dist/components/image-list/components/image-list-item.d.ts.map +0 -1
  201. package/dist/components/image-list/types/image-list-types.d.ts +0 -69
  202. package/dist/components/image-list/types/image-list-types.d.ts.map +0 -1
  203. package/dist/components/image-list/utils/image-list-utils.d.ts +0 -7
  204. package/dist/components/image-list/utils/image-list-utils.d.ts.map +0 -1
  205. package/dist/graph-BAbMYZfV.cjs +0 -1
  206. package/dist/info-NVLQJR56-Coo8EJ5Z.js +0 -5
  207. package/dist/layout-BAOkTpMt.cjs +0 -1
  208. package/dist/pie-7BOR55EZ-ev26J3c5.js +0 -5
  209. package/dist/quill-CL1W1hro.js +0 -6687
  210. package/dist/quill-izWMIyId.cjs +0 -49
  211. package/dist/radar-NHE76QYJ-CrwtClJN.js +0 -5
@@ -1,49 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ct=require("./index-DIIaXWro.cjs"),Si=require("./_baseIsEqual-CEeDg5JY.cjs"),Re=require("./cloneDeep-CAsH5xlb.cjs");function sr(i,t){return Si.baseIsEqual(i,t)}var B=(i=>(i[i.TYPE=3]="TYPE",i[i.LEVEL=12]="LEVEL",i[i.ATTRIBUTE=13]="ATTRIBUTE",i[i.BLOT=14]="BLOT",i[i.INLINE=7]="INLINE",i[i.BLOCK=11]="BLOCK",i[i.BLOCK_BLOT=10]="BLOCK_BLOT",i[i.INLINE_BLOT=6]="INLINE_BLOT",i[i.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",i[i.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",i[i.ANY=15]="ANY",i))(B||{});class Kt{constructor(t,e,s={}){this.attrName=t,this.keyName=e;const n=B.TYPE&B.ATTRIBUTE;this.scope=s.scope!=null?s.scope&B.LEVEL|n:B.ATTRIBUTE,s.whitelist!=null&&(this.whitelist=s.whitelist)}static keys(t){return Array.from(t.attributes).map(e=>e.name)}add(t,e){return this.canAdd(t,e)?(t.setAttribute(this.keyName,e),!0):!1}canAdd(t,e){return this.whitelist==null?!0:typeof e=="string"?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class Be extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Wr=class Zn{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let s=null;try{s=t.parentNode}catch{return null}return this.find(s,e)}return null}create(t,e,s){const n=this.query(e);if(n==null)throw new Be(`Unable to create ${e} blot`);const l=n,o=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:l.create(s),c=new l(t,o,s);return Zn.blots.set(c.domNode,c),c}find(t,e=!1){return Zn.find(t,e)}query(t,e=B.ANY){let s;return typeof t=="string"?s=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?s=this.types.text:typeof t=="number"?t&B.LEVEL&B.BLOCK?s=this.types.block:t&B.LEVEL&B.INLINE&&(s=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(n=>(s=this.classes[n],!!s)),s=s||this.tags[t.tagName]),s==null?null:"scope"in s&&e&B.LEVEL&s.scope&&e&B.TYPE&s.scope?s:null}register(...t){return t.map(e=>{const s="blotName"in e,n="attrName"in e;if(!s&&!n)throw new Be("Invalid definition");if(s&&e.blotName==="abstract")throw new Be("Cannot register abstract class");const l=s?e.blotName:n?e.attrName:void 0;return this.types[l]=e,n?typeof e.keyName=="string"&&(this.attributes[e.keyName]=e):s&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(o=>o.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(o=>{(this.tags[o]==null||e.className==null)&&(this.tags[o]=e)}))),e})}};Wr.blots=new WeakMap;let De=Wr;function br(i,t){return(i.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}class ki extends Kt{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(e=>e.split("-").slice(0,-1).join("-"))}add(t,e){return this.canAdd(t,e)?(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0):!1}remove(t){br(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const e=(br(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}const jt=ki;function Dn(i){const t=i.split("-"),e=t.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("");return t[0]+e}class Ci extends Kt{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[Dn(this.keyName)]=e,!0):!1}remove(t){t.style[Dn(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[Dn(this.keyName)];return this.canAdd(t,e)?e:""}}const le=Ci;class Oi{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=De.find(this.domNode);if(t==null)return;const e=Kt.keys(this.domNode),s=jt.keys(this.domNode),n=le.keys(this.domNode);e.concat(s).concat(n).forEach(l=>{const o=t.scroll.query(l,B.ATTRIBUTE);o instanceof Kt&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(e=>{const s=this.attributes[e].value(this.domNode);t.format(e,s)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t),{})}}const zs=Oi,Xr=class{constructor(t,e){this.scroll=t,this.domNode=e,De.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Be("Blot definition missing tagName");let e,s;return Array.isArray(this.tagName)?(typeof t=="string"?(s=t.toUpperCase(),parseInt(s,10).toString()===s&&(s=parseInt(s,10))):typeof t=="number"&&(s=t),typeof s=="number"?e=document.createElement(this.tagName[s-1]):s&&this.tagName.indexOf(s)>-1?e=document.createElement(s):e=document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),De.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,s,n){const l=this.isolate(t,e);if(this.scroll.query(s,B.BLOT)!=null&&n)l.wrap(s,n);else if(this.scroll.query(s,B.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);l.wrap(o),o.format(s,n)}}insertAt(t,e,s){const n=s==null?this.scroll.create("text",e):this.scroll.create(e,s),l=this.split(t);this.parent.insertBefore(n,l||void 0)}isolate(t,e){const s=this.split(t);if(s==null)throw new Error("Attempt to isolate at end");return s.split(e),s}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const s=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(s,this.next||void 0),this.remove()),s}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){const s=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(s,this.next||void 0),typeof s.appendChild!="function")throw new Be(`Cannot wrap ${t}`);return s.appendChild(this),s}};Xr.blotName="abstract";let Yr=Xr;const Qr=class extends Yr{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let s=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(s+=1),[this.parent.domNode,s]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Qr.scope=B.INLINE_BLOT;let _i=Qr;const yt=_i;class Ii{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let s=e();for(;s&&t>0;)t-=1,s=e();return s}contains(t){const e=this.iterator();let s=e();for(;s;){if(s===t)return!0;s=e()}return!1}indexOf(t){const e=this.iterator();let s=e(),n=0;for(;s;){if(s===t)return n;n+=1,s=e()}return-1}insertBefore(t,e){t!=null&&(this.remove(t),t.next=e,e!=null?(t.prev=e.prev,e.prev!=null&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,s=this.head;for(;s!=null;){if(s===t)return e;e+=s.length(),s=s.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){const s=this.iterator();let n=s();for(;n;){const l=n.length();if(t<l||e&&t===l&&(n.next==null||n.next.length()!==0))return[n,t];t-=l,n=s()}return[null,0]}forEach(t){const e=this.iterator();let s=e();for(;s;)t(s),s=e()}forEachAt(t,e,s){if(e<=0)return;const[n,l]=this.find(t);let o=t-l;const c=this.iterator(n);let u=c();for(;u&&o<t+e;){const d=u.length();t>o?s(u,t-o,Math.min(e,o+d-t)):s(u,0,Math.min(d,t+e-o)),o+=d,u=c()}}map(t){return this.reduce((e,s)=>(e.push(t(s)),e),[])}reduce(t,e){const s=this.iterator();let n=s();for(;n;)e=t(e,n),n=s();return e}}function yr(i,t){const e=t.find(i);if(e)return e;try{return t.create(i)}catch{const s=t.create(B.INLINE);return Array.from(i.childNodes).forEach(n=>{s.domNode.appendChild(n)}),i.parentNode&&i.parentNode.replaceChild(s.domNode,i),s.attach(),s}}const Jr=class se extends Yr{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,se.uiClass&&this.uiNode.classList.add(se.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Ii,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const e=yr(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof Be)return;throw e}})}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,(s,n,l)=>{s.deleteAt(n,l)})}descendant(t,e=0){const[s,n]=this.children.find(e);return t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t?[s,n]:s instanceof se?s.descendant(t,n):[null,-1]}descendants(t,e=0,s=Number.MAX_VALUE){let n=[],l=s;return this.children.forEachAt(e,s,(o,c,u)=>{(t.blotName==null&&t(o)||t.blotName!=null&&o instanceof t)&&n.push(o),o instanceof se&&(n=n.concat(o.descendants(t,c,l))),l-=u}),n}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(e=>{t||this.statics.allowedChildren.some(s=>e instanceof s)||(e.statics.scope===B.BLOCK_BLOT?(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev),e.parent.unwrap(),t=!0):e instanceof se?e.unwrap():e.remove())})}formatAt(t,e,s,n){this.children.forEachAt(t,e,(l,o,c)=>{l.formatAt(o,c,s,n)})}insertAt(t,e,s){const[n,l]=this.children.find(t);if(n)n.insertAt(l,e,s);else{const o=s==null?this.scroll.create("text",e):this.scroll.create(e,s);this.appendChild(o)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let s=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(s=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==s)&&this.domNode.insertBefore(t.domNode,s),t.attach()}length(){return this.children.reduce((t,e)=>t+e.length(),0)}moveChildren(t,e){this.children.forEach(s=>{t.insertBefore(s,e)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,e=!1){const[s,n]=this.children.find(t,e),l=[[this,t]];return s instanceof se?l.concat(s.path(n,e)):(s!=null&&l.push([s,n]),l)}removeChild(t){this.children.remove(t)}replaceWith(t,e){const s=typeof t=="string"?this.scroll.create(t,e):t;return s instanceof se&&this.moveChildren(s),super.replaceWith(s)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const s=this.clone();return this.parent&&this.parent.insertBefore(s,this.next||void 0),this.children.forEachAt(t,this.length(),(n,l,o)=>{const c=n.split(l,e);c!=null&&s.appendChild(c)}),s}splitAfter(t){const e=this.clone();for(;t.next!=null;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const s=[],n=[];t.forEach(l=>{l.target===this.domNode&&l.type==="childList"&&(s.push(...l.addedNodes),n.push(...l.removedNodes))}),n.forEach(l=>{if(l.parentNode!=null&&l.tagName!=="IFRAME"&&document.body.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(l);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),s.filter(l=>l.parentNode===this.domNode&&l!==this.uiNode).sort((l,o)=>l===o?0:l.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(l=>{let o=null;l.nextSibling!=null&&(o=this.scroll.find(l.nextSibling));const c=yr(l,this.scroll);(c.next!==o||c.next==null)&&(c.parent!=null&&c.parent.removeChild(this),this.insertBefore(c,o||void 0))}),this.enforceAllowedChildren()}};Jr.uiClass="";let Ri=Jr;const Dt=Ri;function Bi(i,t){if(Object.keys(i).length!==Object.keys(t).length)return!1;for(const e in i)if(i[e]!==t[e])return!1;return!0}const ke=class Ce extends Dt{static create(t){return super.create(t)}static formats(t,e){const s=e.query(Ce.blotName);if(!(s!=null&&t.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new zs(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(s=>{s instanceof Ce||(s=s.wrap(Ce.blotName,!0)),this.attributes.copy(s)}),this.unwrap();else{const s=this.scroll.query(t,B.INLINE);if(s==null)return;s instanceof Kt?this.attributes.attribute(s,e):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e)}}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.formats()[s]!=null||this.scroll.query(s,B.ATTRIBUTE)?this.isolate(t,e).format(s,n):super.formatAt(t,e,s,n)}optimize(t){super.optimize(t);const e=this.formats();if(Object.keys(e).length===0)return this.unwrap();const s=this.next;s instanceof Ce&&s.prev===this&&Bi(e,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){const s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}wrap(t,e){const s=super.wrap(t,e);return s instanceof Ce&&this.attributes.move(s),s}};ke.allowedChildren=[ke,yt],ke.blotName="inline",ke.scope=B.INLINE_BLOT,ke.tagName="SPAN";let Mi=ke;const nr=Mi,Oe=class Wn extends Dt{static create(t){return super.create(t)}static formats(t,e){const s=e.query(Wn.blotName);if(!(s!=null&&t.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new zs(this.domNode)}format(t,e){const s=this.scroll.query(t,B.BLOCK);s!=null&&(s instanceof Kt?this.attributes.attribute(s,e):t===this.statics.blotName&&!e?this.replaceWith(Wn.blotName):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.scroll.query(s,B.BLOCK)!=null?this.format(s,n):super.formatAt(t,e,s,n)}insertAt(t,e,s){if(s==null||this.scroll.query(e,B.INLINE)!=null)super.insertAt(t,e,s);else{const n=this.split(t);if(n!=null){const l=this.scroll.create(e,s);n.parent.insertBefore(l,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){const s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}};Oe.blotName="block",Oe.scope=B.BLOCK_BLOT,Oe.tagName="P",Oe.allowedChildren=[nr,Oe,yt];let Di=Oe;const ls=Di,Xn=class extends Dt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.enforceAllowedChildren()}insertAt(t,e,s){super.insertAt(t,e,s),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};Xn.blotName="container",Xn.scope=B.BLOCK_BLOT;let Ui=Xn;const Vs=Ui;class ji extends yt{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,s,n){t===0&&e===this.length()?this.format(s,n):super.formatAt(t,e,s,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Lt=ji,Pi={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Hi=100,_e=class extends Dt{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(s=>{this.update(s)}),this.observer.observe(this.domNode,Pi),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const s=this.registry.find(t,e);return s?s.scroll===this?s:e?this.find(s.scroll.domNode.parentNode,!0):null:null}query(t,e=B.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),t===0&&e===this.length()?this.children.forEach(s=>{s.remove()}):super.deleteAt(t,e)}formatAt(t,e,s,n){this.update(),super.formatAt(t,e,s,n)}insertAt(t,e,s){this.update(),super.insertAt(t,e,s)}optimize(t=[],e={}){super.optimize(e);const s=e.mutationsMap||new WeakMap;let n=Array.from(this.observer.takeRecords());for(;n.length>0;)t.push(n.pop());const l=(u,d=!0)=>{u==null||u===this||u.domNode.parentNode!=null&&(s.has(u.domNode)||s.set(u.domNode,[]),d&&l(u.parent))},o=u=>{s.has(u.domNode)&&(u instanceof Dt&&u.children.forEach(o),s.delete(u.domNode),u.optimize(e))};let c=t;for(let u=0;c.length>0;u+=1){if(u>=Hi)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(d=>{const b=this.find(d.target,!0);b!=null&&(b.domNode===d.target&&(d.type==="childList"?(l(this.find(d.previousSibling,!1)),Array.from(d.addedNodes).forEach(v=>{const g=this.find(v,!1);l(g,!1),g instanceof Dt&&g.children.forEach(m=>{l(m,!1)})})):d.type==="attributes"&&l(b.prev)),l(b))}),this.children.forEach(o),c=Array.from(this.observer.takeRecords()),n=c.slice();n.length>0;)t.push(n.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const s=new WeakMap;t.map(n=>{const l=this.find(n.target,!0);return l==null?null:s.has(l.domNode)?(s.get(l.domNode).push(n),null):(s.set(l.domNode,[n]),l)}).forEach(n=>{n!=null&&n!==this&&s.has(n.domNode)&&n.update(s.get(n.domNode)||[],e)}),e.mutationsMap=s,s.has(this.domNode)&&super.update(s.get(this.domNode),e),this.optimize(t,e)}};_e.blotName="scroll",_e.defaultChild=ls,_e.allowedChildren=[ls,Vs],_e.scope=B.BLOCK_BLOT,_e.tagName="DIV";let Fi=_e;const rr=Fi,Yn=class ti extends yt{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,s){s==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,s)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof ti&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const s=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(s,this.next||void 0),this.text=this.statics.value(this.domNode),s}update(t,e){t.some(s=>s.type==="characterData"&&s.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};Yn.blotName="text",Yn.scope=B.INLINE_BLOT;let $i=Yn;const Hs=$i,ei=Object.freeze(Object.defineProperty({__proto__:null,Attributor:Kt,AttributorStore:zs,BlockBlot:ls,ClassAttributor:jt,ContainerBlot:Vs,EmbedBlot:Lt,InlineBlot:nr,LeafBlot:yt,ParentBlot:Dt,Registry:De,Scope:B,ScrollBlot:rr,StyleAttributor:le,TextBlot:Hs},Symbol.toStringTag,{value:"Module"}));var _s={exports:{}},Un,vr;function zi(){if(vr)return Un;vr=1;var i=-1,t=1,e=0;function s(f,T,p,k,q){if(f===T)return f?[[e,f]]:[];if(p!=null){var A=Ot(f,T,p);if(A)return A}var S=c(f,T),R=f.substring(0,S);f=f.substring(S),T=T.substring(S),S=d(f,T);var D=f.substring(f.length-S);f=f.substring(0,f.length-S),T=T.substring(0,T.length-S);var C=n(f,T);return R&&C.unshift([e,R]),D&&C.push([e,D]),_(C,q),k&&v(C),C}function n(f,T){var p;if(!f)return[[t,T]];if(!T)return[[i,f]];var k=f.length>T.length?f:T,q=f.length>T.length?T:f,A=k.indexOf(q);if(A!==-1)return p=[[t,k.substring(0,A)],[e,q],[t,k.substring(A+q.length)]],f.length>T.length&&(p[0][0]=p[2][0]=i),p;if(q.length===1)return[[i,f],[t,T]];var S=b(f,T);if(S){var R=S[0],D=S[1],C=S[2],$=S[3],P=S[4],V=s(R,C),G=s(D,$);return V.concat([[e,P]],G)}return l(f,T)}function l(f,T){for(var p=f.length,k=T.length,q=Math.ceil((p+k)/2),A=q,S=2*q,R=new Array(S),D=new Array(S),C=0;C<S;C++)R[C]=-1,D[C]=-1;R[A+1]=0,D[A+1]=0;for(var $=p-k,P=$%2!==0,V=0,G=0,j=0,nt=0,rt=0;rt<q;rt++){for(var z=-rt+V;z<=rt-G;z+=2){var Y=A+z,X;z===-rt||z!==rt&&R[Y-1]<R[Y+1]?X=R[Y+1]:X=R[Y-1]+1;for(var Q=X-z;X<p&&Q<k&&f.charAt(X)===T.charAt(Q);)X++,Q++;if(R[Y]=X,X>p)G+=2;else if(Q>k)V+=2;else if(P){var tt=A+$-z;if(tt>=0&&tt<S&&D[tt]!==-1){var et=p-D[tt];if(X>=et)return o(f,T,X,Q)}}}for(var lt=-rt+j;lt<=rt-nt;lt+=2){var tt=A+lt,et;lt===-rt||lt!==rt&&D[tt-1]<D[tt+1]?et=D[tt+1]:et=D[tt-1]+1;for(var gt=et-lt;et<p&&gt<k&&f.charAt(p-et-1)===T.charAt(k-gt-1);)et++,gt++;if(D[tt]=et,et>p)nt+=2;else if(gt>k)j+=2;else if(!P){var Y=A+$-lt;if(Y>=0&&Y<S&&R[Y]!==-1){var X=R[Y],Q=A+X-Y;if(et=p-et,X>=et)return o(f,T,X,Q)}}}}return[[i,f],[t,T]]}function o(f,T,p,k){var q=f.substring(0,p),A=T.substring(0,k),S=f.substring(p),R=T.substring(k),D=s(q,A),C=s(S,R);return D.concat(C)}function c(f,T){if(!f||!T||f.charAt(0)!==T.charAt(0))return 0;for(var p=0,k=Math.min(f.length,T.length),q=k,A=0;p<q;)f.substring(A,q)==T.substring(A,q)?(p=q,A=p):k=q,q=Math.floor((k-p)/2+p);return M(f.charCodeAt(q-1))&&q--,q}function u(f,T){var p=f.length,k=T.length;if(p==0||k==0)return 0;p>k?f=f.substring(p-k):p<k&&(T=T.substring(0,p));var q=Math.min(p,k);if(f==T)return q;for(var A=0,S=1;;){var R=f.substring(q-S),D=T.indexOf(R);if(D==-1)return A;S+=D,(D==0||f.substring(q-S)==T.substring(0,S))&&(A=S,S++)}}function d(f,T){if(!f||!T||f.slice(-1)!==T.slice(-1))return 0;for(var p=0,k=Math.min(f.length,T.length),q=k,A=0;p<q;)f.substring(f.length-q,f.length-A)==T.substring(T.length-q,T.length-A)?(p=q,A=p):k=q,q=Math.floor((k-p)/2+p);return K(f.charCodeAt(f.length-q))&&q--,q}function b(f,T){var p=f.length>T.length?f:T,k=f.length>T.length?T:f;if(p.length<4||k.length*2<p.length)return null;function q(G,j,nt){for(var rt=G.substring(nt,nt+Math.floor(G.length/4)),z=-1,Y="",X,Q,tt,et;(z=j.indexOf(rt,z+1))!==-1;){var lt=c(G.substring(nt),j.substring(z)),gt=d(G.substring(0,nt),j.substring(0,z));Y.length<gt+lt&&(Y=j.substring(z-gt,z)+j.substring(z,z+lt),X=G.substring(0,nt-gt),Q=G.substring(nt+lt),tt=j.substring(0,z-gt),et=j.substring(z+lt))}return Y.length*2>=G.length?[X,Q,tt,et,Y]:null}var A=q(p,k,Math.ceil(p.length/4)),S=q(p,k,Math.ceil(p.length/2)),R;if(!A&&!S)return null;S?A?R=A[4].length>S[4].length?A:S:R=S:R=A;var D,C,$,P;f.length>T.length?(D=R[0],C=R[1],$=R[2],P=R[3]):($=R[0],P=R[1],D=R[2],C=R[3]);var V=R[4];return[D,C,$,P,V]}function v(f){for(var T=!1,p=[],k=0,q=null,A=0,S=0,R=0,D=0,C=0;A<f.length;)f[A][0]==e?(p[k++]=A,S=D,R=C,D=0,C=0,q=f[A][1]):(f[A][0]==t?D+=f[A][1].length:C+=f[A][1].length,q&&q.length<=Math.max(S,R)&&q.length<=Math.max(D,C)&&(f.splice(p[k-1],0,[i,q]),f[p[k-1]+1][0]=t,k--,k--,A=k>0?p[k-1]:-1,S=0,R=0,D=0,C=0,q=null,T=!0)),A++;for(T&&_(f),L(f),A=1;A<f.length;){if(f[A-1][0]==i&&f[A][0]==t){var $=f[A-1][1],P=f[A][1],V=u($,P),G=u(P,$);V>=G?(V>=$.length/2||V>=P.length/2)&&(f.splice(A,0,[e,P.substring(0,V)]),f[A-1][1]=$.substring(0,$.length-V),f[A+1][1]=P.substring(V),A++):(G>=$.length/2||G>=P.length/2)&&(f.splice(A,0,[e,$.substring(0,G)]),f[A-1][0]=t,f[A-1][1]=P.substring(0,P.length-G),f[A+1][0]=i,f[A+1][1]=$.substring(G),A++),A++}A++}}var g=/[^a-zA-Z0-9]/,m=/\s/,E=/[\r\n]/,w=/\n\r?\n$/,x=/^\r?\n\r?\n/;function L(f){function T(G,j){if(!G||!j)return 6;var nt=G.charAt(G.length-1),rt=j.charAt(0),z=nt.match(g),Y=rt.match(g),X=z&&nt.match(m),Q=Y&&rt.match(m),tt=X&&nt.match(E),et=Q&&rt.match(E),lt=tt&&G.match(w),gt=et&&j.match(x);return lt||gt?5:tt||et?4:z&&!X&&Q?3:X||Q?2:z||Y?1:0}for(var p=1;p<f.length-1;){if(f[p-1][0]==e&&f[p+1][0]==e){var k=f[p-1][1],q=f[p][1],A=f[p+1][1],S=d(k,q);if(S){var R=q.substring(q.length-S);k=k.substring(0,k.length-S),q=R+q.substring(0,q.length-S),A=R+A}for(var D=k,C=q,$=A,P=T(k,q)+T(q,A);q.charAt(0)===A.charAt(0);){k+=q.charAt(0),q=q.substring(1)+A.charAt(0),A=A.substring(1);var V=T(k,q)+T(q,A);V>=P&&(P=V,D=k,C=q,$=A)}f[p-1][1]!=D&&(D?f[p-1][1]=D:(f.splice(p-1,1),p--),f[p][1]=C,$?f[p+1][1]=$:(f.splice(p+1,1),p--))}p++}}function _(f,T){f.push([e,""]);for(var p=0,k=0,q=0,A="",S="",R;p<f.length;){if(p<f.length-1&&!f[p][1]){f.splice(p,1);continue}switch(f[p][0]){case t:q++,S+=f[p][1],p++;break;case i:k++,A+=f[p][1],p++;break;case e:var D=p-q-k-1;if(T){if(D>=0&&st(f[D][1])){var C=f[D][1].slice(-1);if(f[D][1]=f[D][1].slice(0,-1),A=C+A,S=C+S,!f[D][1]){f.splice(D,1),p--;var $=D-1;f[$]&&f[$][0]===t&&(q++,S=f[$][1]+S,$--),f[$]&&f[$][0]===i&&(k++,A=f[$][1]+A,$--),D=$}}if(H(f[p][1])){var C=f[p][1].charAt(0);f[p][1]=f[p][1].slice(1),A+=C,S+=C}}if(p<f.length-1&&!f[p][1]){f.splice(p,1);break}if(A.length>0||S.length>0){A.length>0&&S.length>0&&(R=c(S,A),R!==0&&(D>=0?f[D][1]+=S.substring(0,R):(f.splice(0,0,[e,S.substring(0,R)]),p++),S=S.substring(R),A=A.substring(R)),R=d(S,A),R!==0&&(f[p][1]=S.substring(S.length-R)+f[p][1],S=S.substring(0,S.length-R),A=A.substring(0,A.length-R)));var P=q+k;A.length===0&&S.length===0?(f.splice(p-P,P),p=p-P):A.length===0?(f.splice(p-P,P,[t,S]),p=p-P+1):S.length===0?(f.splice(p-P,P,[i,A]),p=p-P+1):(f.splice(p-P,P,[i,A],[t,S]),p=p-P+2)}p!==0&&f[p-1][0]===e?(f[p-1][1]+=f[p][1],f.splice(p,1)):p++,q=0,k=0,A="",S="";break}}f[f.length-1][1]===""&&f.pop();var V=!1;for(p=1;p<f.length-1;)f[p-1][0]===e&&f[p+1][0]===e&&(f[p][1].substring(f[p][1].length-f[p-1][1].length)===f[p-1][1]?(f[p][1]=f[p-1][1]+f[p][1].substring(0,f[p][1].length-f[p-1][1].length),f[p+1][1]=f[p-1][1]+f[p+1][1],f.splice(p-1,1),V=!0):f[p][1].substring(0,f[p+1][1].length)==f[p+1][1]&&(f[p-1][1]+=f[p+1][1],f[p][1]=f[p][1].substring(f[p+1][1].length)+f[p+1][1],f.splice(p+1,1),V=!0)),p++;V&&_(f,T)}function M(f){return f>=55296&&f<=56319}function K(f){return f>=56320&&f<=57343}function H(f){return K(f.charCodeAt(0))}function st(f){return M(f.charCodeAt(f.length-1))}function it(f){for(var T=[],p=0;p<f.length;p++)f[p][1].length>0&&T.push(f[p]);return T}function ut(f,T,p,k){return st(f)||H(k)?null:it([[e,f],[i,T],[t,p],[e,k]])}function Ot(f,T,p){var k=typeof p=="number"?{index:p,length:0}:p.oldRange,q=typeof p=="number"?null:p.newRange,A=f.length,S=T.length;if(k.length===0&&(q===null||q.length===0)){var R=k.index,D=f.slice(0,R),C=f.slice(R),$=q?q.index:null;t:{var P=R+S-A;if($!==null&&$!==P||P<0||P>S)break t;var V=T.slice(0,P),G=T.slice(P);if(G!==C)break t;var j=Math.min(R,P),nt=D.slice(0,j),rt=V.slice(0,j);if(nt!==rt)break t;var z=D.slice(j),Y=V.slice(j);return ut(nt,z,Y,C)}t:{if($!==null&&$!==R)break t;var X=R,V=T.slice(0,X),G=T.slice(X);if(V!==D)break t;var Q=Math.min(A-X,S-X),tt=C.slice(C.length-Q),et=G.slice(G.length-Q);if(tt!==et)break t;var z=C.slice(0,C.length-Q),Y=G.slice(0,G.length-Q);return ut(D,z,Y,tt)}}if(k.length>0&&q&&q.length===0)t:{var nt=f.slice(0,k.index),tt=f.slice(k.index+k.length),j=nt.length,Q=tt.length;if(S<j+Q)break t;var rt=T.slice(0,j),et=T.slice(S-Q);if(nt!==rt||tt!==et)break t;var z=f.slice(j,A-Q),Y=T.slice(j,S-Q);return ut(nt,z,Y,tt)}return null}function Tt(f,T,p,k){return s(f,T,p,k,!0)}return Tt.INSERT=t,Tt.DELETE=i,Tt.EQUAL=e,Un=Tt,Un}var ss={exports:{}};ss.exports;var Er;function si(){return Er||(Er=1,(function(i,t){var e=200,s="__lodash_hash_undefined__",n=9007199254740991,l="[object Arguments]",o="[object Array]",c="[object Boolean]",u="[object Date]",d="[object Error]",b="[object Function]",v="[object GeneratorFunction]",g="[object Map]",m="[object Number]",E="[object Object]",w="[object Promise]",x="[object RegExp]",L="[object Set]",_="[object String]",M="[object Symbol]",K="[object WeakMap]",H="[object ArrayBuffer]",st="[object DataView]",it="[object Float32Array]",ut="[object Float64Array]",Ot="[object Int8Array]",Tt="[object Int16Array]",f="[object Int32Array]",T="[object Uint8Array]",p="[object Uint8ClampedArray]",k="[object Uint16Array]",q="[object Uint32Array]",A=/[\\^$.*+?()[\]{}|]/g,S=/\w*$/,R=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,C={};C[l]=C[o]=C[H]=C[st]=C[c]=C[u]=C[it]=C[ut]=C[Ot]=C[Tt]=C[f]=C[g]=C[m]=C[E]=C[x]=C[L]=C[_]=C[M]=C[T]=C[p]=C[k]=C[q]=!0,C[d]=C[b]=C[K]=!1;var $=typeof ct.commonjsGlobal=="object"&&ct.commonjsGlobal&&ct.commonjsGlobal.Object===Object&&ct.commonjsGlobal,P=typeof self=="object"&&self&&self.Object===Object&&self,V=$||P||Function("return this")(),G=t&&!t.nodeType&&t,j=G&&!0&&i&&!i.nodeType&&i,nt=j&&j.exports===G;function rt(r,a){return r.set(a[0],a[1]),r}function z(r,a){return r.add(a),r}function Y(r,a){for(var h=-1,y=r?r.length:0;++h<y&&a(r[h],h,r)!==!1;);return r}function X(r,a){for(var h=-1,y=a.length,F=r.length;++h<y;)r[F+h]=a[h];return r}function Q(r,a,h,y){for(var F=-1,U=r?r.length:0;++F<U;)h=a(h,r[F],F,r);return h}function tt(r,a){for(var h=-1,y=Array(r);++h<r;)y[h]=a(h);return y}function et(r,a){return r?.[a]}function lt(r){var a=!1;if(r!=null&&typeof r.toString!="function")try{a=!!(r+"")}catch{}return a}function gt(r){var a=-1,h=Array(r.size);return r.forEach(function(y,F){h[++a]=[F,y]}),h}function je(r,a){return function(h){return r(a(h))}}function ds(r){var a=-1,h=Array(r.size);return r.forEach(function(y){h[++a]=y}),h}var Ws=Array.prototype,Xs=Function.prototype,ye=Object.prototype,Pe=V["__core-js_shared__"],gs=(function(){var r=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),ps=Xs.toString,Ft=ye.hasOwnProperty,ve=ye.toString,Ys=RegExp("^"+ps.call(Ft).replace(A,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oe=nt?V.Buffer:void 0,Ee=V.Symbol,He=V.Uint8Array,qt=je(Object.getPrototypeOf,Object),ms=Object.create,bs=ye.propertyIsEnumerable,Qs=Ws.splice,Fe=Object.getOwnPropertySymbols,Ne=oe?oe.isBuffer:void 0,ys=je(Object.keys,Object),Ae=It(V,"DataView"),ae=It(V,"Map"),_t=It(V,"Promise"),we=It(V,"Set"),$e=It(V,"WeakMap"),ce=It(Object,"create"),ze=vt(Ae),ue=vt(ae),Ve=vt(_t),Ke=vt(we),Ge=vt($e),te=Ee?Ee.prototype:void 0,vs=te?te.valueOf:void 0;function Gt(r){var a=-1,h=r?r.length:0;for(this.clear();++a<h;){var y=r[a];this.set(y[0],y[1])}}function Js(){this.__data__=ce?ce(null):{}}function tn(r){return this.has(r)&&delete this.__data__[r]}function en(r){var a=this.__data__;if(ce){var h=a[r];return h===s?void 0:h}return Ft.call(a,r)?a[r]:void 0}function Es(r){var a=this.__data__;return ce?a[r]!==void 0:Ft.call(a,r)}function Ze(r,a){var h=this.__data__;return h[r]=ce&&a===void 0?s:a,this}Gt.prototype.clear=Js,Gt.prototype.delete=tn,Gt.prototype.get=en,Gt.prototype.has=Es,Gt.prototype.set=Ze;function ht(r){var a=-1,h=r?r.length:0;for(this.clear();++a<h;){var y=r[a];this.set(y[0],y[1])}}function sn(){this.__data__=[]}function nn(r){var a=this.__data__,h=Te(a,r);if(h<0)return!1;var y=a.length-1;return h==y?a.pop():Qs.call(a,h,1),!0}function rn(r){var a=this.__data__,h=Te(a,r);return h<0?void 0:a[h][1]}function ln(r){return Te(this.__data__,r)>-1}function on(r,a){var h=this.__data__,y=Te(h,r);return y<0?h.push([r,a]):h[y][1]=a,this}ht.prototype.clear=sn,ht.prototype.delete=nn,ht.prototype.get=rn,ht.prototype.has=ln,ht.prototype.set=on;function pt(r){var a=-1,h=r?r.length:0;for(this.clear();++a<h;){var y=r[a];this.set(y[0],y[1])}}function an(){this.__data__={hash:new Gt,map:new(ae||ht),string:new Gt}}function cn(r){return fe(this,r).delete(r)}function un(r){return fe(this,r).get(r)}function hn(r){return fe(this,r).has(r)}function fn(r,a){return fe(this,r).set(r,a),this}pt.prototype.clear=an,pt.prototype.delete=cn,pt.prototype.get=un,pt.prototype.has=hn,pt.prototype.set=fn;function wt(r){this.__data__=new ht(r)}function dn(){this.__data__=new ht}function gn(r){return this.__data__.delete(r)}function pn(r){return this.__data__.get(r)}function mn(r){return this.__data__.has(r)}function bn(r,a){var h=this.__data__;if(h instanceof ht){var y=h.__data__;if(!ae||y.length<e-1)return y.push([r,a]),this;h=this.__data__=new pt(y)}return h.set(r,a),this}wt.prototype.clear=dn,wt.prototype.delete=gn,wt.prototype.get=pn,wt.prototype.has=mn,wt.prototype.set=bn;function xe(r,a){var h=Qe(r)||qe(r)?tt(r.length,String):[],y=h.length,F=!!y;for(var U in r)Ft.call(r,U)&&!(F&&(U=="length"||On(U,y)))&&h.push(U);return h}function Ns(r,a,h){var y=r[a];(!(Ft.call(r,a)&&Ls(y,h))||h===void 0&&!(a in r))&&(r[a]=h)}function Te(r,a){for(var h=r.length;h--;)if(Ls(r[h][0],a))return h;return-1}function $t(r,a){return r&&Ye(a,ts(a),r)}function We(r,a,h,y,F,U,W){var Z;if(y&&(Z=U?y(r,F,U,W):y(r)),Z!==void 0)return Z;if(!Vt(r))return r;var ot=Qe(r);if(ot){if(Z=kn(r),!a)return Ln(r,Z)}else{var J=Wt(r),mt=J==b||J==v;if(qs(r))return Le(r,a);if(J==E||J==l||mt&&!U){if(lt(r))return U?r:{};if(Z=zt(mt?{}:r),!a)return qn(r,$t(Z,r))}else{if(!C[J])return U?r:{};Z=Cn(r,J,We,a)}}W||(W=new wt);var xt=W.get(r);if(xt)return xt;if(W.set(r,Z),!ot)var at=h?Sn(r):ts(r);return Y(at||r,function(bt,ft){at&&(ft=bt,bt=r[ft]),Ns(Z,ft,We(bt,a,h,y,ft,r,W))}),Z}function yn(r){return Vt(r)?ms(r):{}}function vn(r,a,h){var y=a(r);return Qe(r)?y:X(y,h(r))}function En(r){return ve.call(r)}function Nn(r){if(!Vt(r)||In(r))return!1;var a=Je(r)||lt(r)?Ys:R;return a.test(vt(r))}function An(r){if(!xs(r))return ys(r);var a=[];for(var h in Object(r))Ft.call(r,h)&&h!="constructor"&&a.push(h);return a}function Le(r,a){if(a)return r.slice();var h=new r.constructor(r.length);return r.copy(h),h}function Xe(r){var a=new r.constructor(r.byteLength);return new He(a).set(new He(r)),a}function he(r,a){var h=a?Xe(r.buffer):r.buffer;return new r.constructor(h,r.byteOffset,r.byteLength)}function As(r,a,h){var y=a?h(gt(r),!0):gt(r);return Q(y,rt,new r.constructor)}function ws(r){var a=new r.constructor(r.source,S.exec(r));return a.lastIndex=r.lastIndex,a}function wn(r,a,h){var y=a?h(ds(r),!0):ds(r);return Q(y,z,new r.constructor)}function xn(r){return vs?Object(vs.call(r)):{}}function Tn(r,a){var h=a?Xe(r.buffer):r.buffer;return new r.constructor(h,r.byteOffset,r.length)}function Ln(r,a){var h=-1,y=r.length;for(a||(a=Array(y));++h<y;)a[h]=r[h];return a}function Ye(r,a,h,y){h||(h={});for(var F=-1,U=a.length;++F<U;){var W=a[F],Z=void 0;Ns(h,W,Z===void 0?r[W]:Z)}return h}function qn(r,a){return Ye(r,Zt(r),a)}function Sn(r){return vn(r,ts,Zt)}function fe(r,a){var h=r.__data__;return _n(a)?h[typeof a=="string"?"string":"hash"]:h.map}function It(r,a){var h=et(r,a);return Nn(h)?h:void 0}var Zt=Fe?je(Fe,Object):Bn,Wt=En;(Ae&&Wt(new Ae(new ArrayBuffer(1)))!=st||ae&&Wt(new ae)!=g||_t&&Wt(_t.resolve())!=w||we&&Wt(new we)!=L||$e&&Wt(new $e)!=K)&&(Wt=function(r){var a=ve.call(r),h=a==E?r.constructor:void 0,y=h?vt(h):void 0;if(y)switch(y){case ze:return st;case ue:return g;case Ve:return w;case Ke:return L;case Ge:return K}return a});function kn(r){var a=r.length,h=r.constructor(a);return a&&typeof r[0]=="string"&&Ft.call(r,"index")&&(h.index=r.index,h.input=r.input),h}function zt(r){return typeof r.constructor=="function"&&!xs(r)?yn(qt(r)):{}}function Cn(r,a,h,y){var F=r.constructor;switch(a){case H:return Xe(r);case c:case u:return new F(+r);case st:return he(r,y);case it:case ut:case Ot:case Tt:case f:case T:case p:case k:case q:return Tn(r,y);case g:return As(r,y,h);case m:case _:return new F(r);case x:return ws(r);case L:return wn(r,y,h);case M:return xn(r)}}function On(r,a){return a=a??n,!!a&&(typeof r=="number"||D.test(r))&&r>-1&&r%1==0&&r<a}function _n(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function In(r){return!!gs&&gs in r}function xs(r){var a=r&&r.constructor,h=typeof a=="function"&&a.prototype||ye;return r===h}function vt(r){if(r!=null){try{return ps.call(r)}catch{}try{return r+""}catch{}}return""}function Ts(r){return We(r,!0,!0)}function Ls(r,a){return r===a||r!==r&&a!==a}function qe(r){return Rn(r)&&Ft.call(r,"callee")&&(!bs.call(r,"callee")||ve.call(r)==l)}var Qe=Array.isArray;function Se(r){return r!=null&&Ss(r.length)&&!Je(r)}function Rn(r){return ks(r)&&Se(r)}var qs=Ne||Mn;function Je(r){var a=Vt(r)?ve.call(r):"";return a==b||a==v}function Ss(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=n}function Vt(r){var a=typeof r;return!!r&&(a=="object"||a=="function")}function ks(r){return!!r&&typeof r=="object"}function ts(r){return Se(r)?xe(r):An(r)}function Bn(){return[]}function Mn(){return!1}i.exports=Ts})(ss,ss.exports)),ss.exports}var ns={exports:{}};ns.exports;var Nr;function ni(){return Nr||(Nr=1,(function(i,t){var e=200,s="__lodash_hash_undefined__",n=1,l=2,o=9007199254740991,c="[object Arguments]",u="[object Array]",d="[object AsyncFunction]",b="[object Boolean]",v="[object Date]",g="[object Error]",m="[object Function]",E="[object GeneratorFunction]",w="[object Map]",x="[object Number]",L="[object Null]",_="[object Object]",M="[object Promise]",K="[object Proxy]",H="[object RegExp]",st="[object Set]",it="[object String]",ut="[object Symbol]",Ot="[object Undefined]",Tt="[object WeakMap]",f="[object ArrayBuffer]",T="[object DataView]",p="[object Float32Array]",k="[object Float64Array]",q="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",R="[object Uint8Array]",D="[object Uint8ClampedArray]",C="[object Uint16Array]",$="[object Uint32Array]",P=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,G=/^(?:0|[1-9]\d*)$/,j={};j[p]=j[k]=j[q]=j[A]=j[S]=j[R]=j[D]=j[C]=j[$]=!0,j[c]=j[u]=j[f]=j[b]=j[T]=j[v]=j[g]=j[m]=j[w]=j[x]=j[_]=j[H]=j[st]=j[it]=j[Tt]=!1;var nt=typeof ct.commonjsGlobal=="object"&&ct.commonjsGlobal&&ct.commonjsGlobal.Object===Object&&ct.commonjsGlobal,rt=typeof self=="object"&&self&&self.Object===Object&&self,z=nt||rt||Function("return this")(),Y=t&&!t.nodeType&&t,X=Y&&!0&&i&&!i.nodeType&&i,Q=X&&X.exports===Y,tt=Q&&nt.process,et=(function(){try{return tt&&tt.binding&&tt.binding("util")}catch{}})(),lt=et&&et.isTypedArray;function gt(r,a){for(var h=-1,y=r==null?0:r.length,F=0,U=[];++h<y;){var W=r[h];a(W,h,r)&&(U[F++]=W)}return U}function je(r,a){for(var h=-1,y=a.length,F=r.length;++h<y;)r[F+h]=a[h];return r}function ds(r,a){for(var h=-1,y=r==null?0:r.length;++h<y;)if(a(r[h],h,r))return!0;return!1}function Ws(r,a){for(var h=-1,y=Array(r);++h<r;)y[h]=a(h);return y}function Xs(r){return function(a){return r(a)}}function ye(r,a){return r.has(a)}function Pe(r,a){return r?.[a]}function gs(r){var a=-1,h=Array(r.size);return r.forEach(function(y,F){h[++a]=[F,y]}),h}function ps(r,a){return function(h){return r(a(h))}}function Ft(r){var a=-1,h=Array(r.size);return r.forEach(function(y){h[++a]=y}),h}var ve=Array.prototype,Ys=Function.prototype,oe=Object.prototype,Ee=z["__core-js_shared__"],He=Ys.toString,qt=oe.hasOwnProperty,ms=(function(){var r=/[^.]+$/.exec(Ee&&Ee.keys&&Ee.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})(),bs=oe.toString,Qs=RegExp("^"+He.call(qt).replace(P,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=Q?z.Buffer:void 0,Ne=z.Symbol,ys=z.Uint8Array,Ae=oe.propertyIsEnumerable,ae=ve.splice,_t=Ne?Ne.toStringTag:void 0,we=Object.getOwnPropertySymbols,$e=Fe?Fe.isBuffer:void 0,ce=ps(Object.keys,Object),ze=Zt(z,"DataView"),ue=Zt(z,"Map"),Ve=Zt(z,"Promise"),Ke=Zt(z,"Set"),Ge=Zt(z,"WeakMap"),te=Zt(Object,"create"),vs=vt(ze),Gt=vt(ue),Js=vt(Ve),tn=vt(Ke),en=vt(Ge),Es=Ne?Ne.prototype:void 0,Ze=Es?Es.valueOf:void 0;function ht(r){var a=-1,h=r==null?0:r.length;for(this.clear();++a<h;){var y=r[a];this.set(y[0],y[1])}}function sn(){this.__data__=te?te(null):{},this.size=0}function nn(r){var a=this.has(r)&&delete this.__data__[r];return this.size-=a?1:0,a}function rn(r){var a=this.__data__;if(te){var h=a[r];return h===s?void 0:h}return qt.call(a,r)?a[r]:void 0}function ln(r){var a=this.__data__;return te?a[r]!==void 0:qt.call(a,r)}function on(r,a){var h=this.__data__;return this.size+=this.has(r)?0:1,h[r]=te&&a===void 0?s:a,this}ht.prototype.clear=sn,ht.prototype.delete=nn,ht.prototype.get=rn,ht.prototype.has=ln,ht.prototype.set=on;function pt(r){var a=-1,h=r==null?0:r.length;for(this.clear();++a<h;){var y=r[a];this.set(y[0],y[1])}}function an(){this.__data__=[],this.size=0}function cn(r){var a=this.__data__,h=Le(a,r);if(h<0)return!1;var y=a.length-1;return h==y?a.pop():ae.call(a,h,1),--this.size,!0}function un(r){var a=this.__data__,h=Le(a,r);return h<0?void 0:a[h][1]}function hn(r){return Le(this.__data__,r)>-1}function fn(r,a){var h=this.__data__,y=Le(h,r);return y<0?(++this.size,h.push([r,a])):h[y][1]=a,this}pt.prototype.clear=an,pt.prototype.delete=cn,pt.prototype.get=un,pt.prototype.has=hn,pt.prototype.set=fn;function wt(r){var a=-1,h=r==null?0:r.length;for(this.clear();++a<h;){var y=r[a];this.set(y[0],y[1])}}function dn(){this.size=0,this.__data__={hash:new ht,map:new(ue||pt),string:new ht}}function gn(r){var a=It(this,r).delete(r);return this.size-=a?1:0,a}function pn(r){return It(this,r).get(r)}function mn(r){return It(this,r).has(r)}function bn(r,a){var h=It(this,r),y=h.size;return h.set(r,a),this.size+=h.size==y?0:1,this}wt.prototype.clear=dn,wt.prototype.delete=gn,wt.prototype.get=pn,wt.prototype.has=mn,wt.prototype.set=bn;function xe(r){var a=-1,h=r==null?0:r.length;for(this.__data__=new wt;++a<h;)this.add(r[a])}function Ns(r){return this.__data__.set(r,s),this}function Te(r){return this.__data__.has(r)}xe.prototype.add=xe.prototype.push=Ns,xe.prototype.has=Te;function $t(r){var a=this.__data__=new pt(r);this.size=a.size}function We(){this.__data__=new pt,this.size=0}function yn(r){var a=this.__data__,h=a.delete(r);return this.size=a.size,h}function vn(r){return this.__data__.get(r)}function En(r){return this.__data__.has(r)}function Nn(r,a){var h=this.__data__;if(h instanceof pt){var y=h.__data__;if(!ue||y.length<e-1)return y.push([r,a]),this.size=++h.size,this;h=this.__data__=new wt(y)}return h.set(r,a),this.size=h.size,this}$t.prototype.clear=We,$t.prototype.delete=yn,$t.prototype.get=vn,$t.prototype.has=En,$t.prototype.set=Nn;function An(r,a){var h=qe(r),y=!h&&Ls(r),F=!h&&!y&&Se(r),U=!h&&!y&&!F&&ks(r),W=h||y||F||U,Z=W?Ws(r.length,String):[],ot=Z.length;for(var J in r)qt.call(r,J)&&!(W&&(J=="length"||F&&(J=="offset"||J=="parent")||U&&(J=="buffer"||J=="byteLength"||J=="byteOffset")||Cn(J,ot)))&&Z.push(J);return Z}function Le(r,a){for(var h=r.length;h--;)if(Ts(r[h][0],a))return h;return-1}function Xe(r,a,h){var y=a(r);return qe(r)?y:je(y,h(r))}function he(r){return r==null?r===void 0?Ot:L:_t&&_t in Object(r)?Wt(r):xs(r)}function As(r){return Vt(r)&&he(r)==c}function ws(r,a,h,y,F){return r===a?!0:r==null||a==null||!Vt(r)&&!Vt(a)?r!==r&&a!==a:wn(r,a,h,y,ws,F)}function wn(r,a,h,y,F,U){var W=qe(r),Z=qe(a),ot=W?u:zt(r),J=Z?u:zt(a);ot=ot==c?_:ot,J=J==c?_:J;var mt=ot==_,xt=J==_,at=ot==J;if(at&&Se(r)){if(!Se(a))return!1;W=!0,mt=!1}if(at&&!mt)return U||(U=new $t),W||ks(r)?Ye(r,a,h,y,F,U):qn(r,a,ot,h,y,F,U);if(!(h&n)){var bt=mt&&qt.call(r,"__wrapped__"),ft=xt&&qt.call(a,"__wrapped__");if(bt||ft){var ee=bt?r.value():r,Xt=ft?a.value():a;return U||(U=new $t),F(ee,Xt,h,y,U)}}return at?(U||(U=new $t),Sn(r,a,h,y,F,U)):!1}function xn(r){if(!Ss(r)||_n(r))return!1;var a=qs(r)?Qs:V;return a.test(vt(r))}function Tn(r){return Vt(r)&&Je(r.length)&&!!j[he(r)]}function Ln(r){if(!In(r))return ce(r);var a=[];for(var h in Object(r))qt.call(r,h)&&h!="constructor"&&a.push(h);return a}function Ye(r,a,h,y,F,U){var W=h&n,Z=r.length,ot=a.length;if(Z!=ot&&!(W&&ot>Z))return!1;var J=U.get(r);if(J&&U.get(a))return J==a;var mt=-1,xt=!0,at=h&l?new xe:void 0;for(U.set(r,a),U.set(a,r);++mt<Z;){var bt=r[mt],ft=a[mt];if(y)var ee=W?y(ft,bt,mt,a,r,U):y(bt,ft,mt,r,a,U);if(ee!==void 0){if(ee)continue;xt=!1;break}if(at){if(!ds(a,function(Xt,de){if(!ye(at,de)&&(bt===Xt||F(bt,Xt,h,y,U)))return at.push(de)})){xt=!1;break}}else if(!(bt===ft||F(bt,ft,h,y,U))){xt=!1;break}}return U.delete(r),U.delete(a),xt}function qn(r,a,h,y,F,U,W){switch(h){case T:if(r.byteLength!=a.byteLength||r.byteOffset!=a.byteOffset)return!1;r=r.buffer,a=a.buffer;case f:return!(r.byteLength!=a.byteLength||!U(new ys(r),new ys(a)));case b:case v:case x:return Ts(+r,+a);case g:return r.name==a.name&&r.message==a.message;case H:case it:return r==a+"";case w:var Z=gs;case st:var ot=y&n;if(Z||(Z=Ft),r.size!=a.size&&!ot)return!1;var J=W.get(r);if(J)return J==a;y|=l,W.set(r,a);var mt=Ye(Z(r),Z(a),y,F,U,W);return W.delete(r),mt;case ut:if(Ze)return Ze.call(r)==Ze.call(a)}return!1}function Sn(r,a,h,y,F,U){var W=h&n,Z=fe(r),ot=Z.length,J=fe(a),mt=J.length;if(ot!=mt&&!W)return!1;for(var xt=ot;xt--;){var at=Z[xt];if(!(W?at in a:qt.call(a,at)))return!1}var bt=U.get(r);if(bt&&U.get(a))return bt==a;var ft=!0;U.set(r,a),U.set(a,r);for(var ee=W;++xt<ot;){at=Z[xt];var Xt=r[at],de=a[at];if(y)var mr=W?y(de,Xt,at,a,r,U):y(Xt,de,at,r,a,U);if(!(mr===void 0?Xt===de||F(Xt,de,h,y,U):mr)){ft=!1;break}ee||(ee=at=="constructor")}if(ft&&!ee){var Cs=r.constructor,Os=a.constructor;Cs!=Os&&"constructor"in r&&"constructor"in a&&!(typeof Cs=="function"&&Cs instanceof Cs&&typeof Os=="function"&&Os instanceof Os)&&(ft=!1)}return U.delete(r),U.delete(a),ft}function fe(r){return Xe(r,ts,kn)}function It(r,a){var h=r.__data__;return On(a)?h[typeof a=="string"?"string":"hash"]:h.map}function Zt(r,a){var h=Pe(r,a);return xn(h)?h:void 0}function Wt(r){var a=qt.call(r,_t),h=r[_t];try{r[_t]=void 0;var y=!0}catch{}var F=bs.call(r);return y&&(a?r[_t]=h:delete r[_t]),F}var kn=we?function(r){return r==null?[]:(r=Object(r),gt(we(r),function(a){return Ae.call(r,a)}))}:Bn,zt=he;(ze&&zt(new ze(new ArrayBuffer(1)))!=T||ue&&zt(new ue)!=w||Ve&&zt(Ve.resolve())!=M||Ke&&zt(new Ke)!=st||Ge&&zt(new Ge)!=Tt)&&(zt=function(r){var a=he(r),h=a==_?r.constructor:void 0,y=h?vt(h):"";if(y)switch(y){case vs:return T;case Gt:return w;case Js:return M;case tn:return st;case en:return Tt}return a});function Cn(r,a){return a=a??o,!!a&&(typeof r=="number"||G.test(r))&&r>-1&&r%1==0&&r<a}function On(r){var a=typeof r;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?r!=="__proto__":r===null}function _n(r){return!!ms&&ms in r}function In(r){var a=r&&r.constructor,h=typeof a=="function"&&a.prototype||oe;return r===h}function xs(r){return bs.call(r)}function vt(r){if(r!=null){try{return He.call(r)}catch{}try{return r+""}catch{}}return""}function Ts(r,a){return r===a||r!==r&&a!==a}var Ls=As((function(){return arguments})())?As:function(r){return Vt(r)&&qt.call(r,"callee")&&!Ae.call(r,"callee")},qe=Array.isArray;function Qe(r){return r!=null&&Je(r.length)&&!qs(r)}var Se=$e||Mn;function Rn(r,a){return ws(r,a)}function qs(r){if(!Ss(r))return!1;var a=he(r);return a==m||a==E||a==d||a==K}function Je(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=o}function Ss(r){var a=typeof r;return r!=null&&(a=="object"||a=="function")}function Vt(r){return r!=null&&typeof r=="object"}var ks=lt?Xs(lt):Tn;function ts(r){return Qe(r)?An(r):Ln(r)}function Bn(){return[]}function Mn(){return!1}i.exports=Rn})(ns,ns.exports)),ns.exports}var Is={},Ar;function Vi(){if(Ar)return Is;Ar=1,Object.defineProperty(Is,"__esModule",{value:!0});const i=si(),t=ni();var e;return(function(s){function n(u={},d={},b=!1){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});let v=i(d);b||(v=Object.keys(v).reduce((g,m)=>(v[m]!=null&&(g[m]=v[m]),g),{}));for(const g in u)u[g]!==void 0&&d[g]===void 0&&(v[g]=u[g]);return Object.keys(v).length>0?v:void 0}s.compose=n;function l(u={},d={}){typeof u!="object"&&(u={}),typeof d!="object"&&(d={});const b=Object.keys(u).concat(Object.keys(d)).reduce((v,g)=>(t(u[g],d[g])||(v[g]=d[g]===void 0?null:d[g]),v),{});return Object.keys(b).length>0?b:void 0}s.diff=l;function o(u={},d={}){u=u||{};const b=Object.keys(d).reduce((v,g)=>(d[g]!==u[g]&&u[g]!==void 0&&(v[g]=d[g]),v),{});return Object.keys(u).reduce((v,g)=>(u[g]!==d[g]&&d[g]===void 0&&(v[g]=null),v),b)}s.invert=o;function c(u,d,b=!1){if(typeof u!="object")return d;if(typeof d!="object")return;if(!b)return d;const v=Object.keys(d).reduce((g,m)=>(u[m]===void 0&&(g[m]=d[m]),g),{});return Object.keys(v).length>0?v:void 0}s.transform=c})(e||(e={})),Is.default=e,Is}var Rs={},wr;function ri(){if(wr)return Rs;wr=1,Object.defineProperty(Rs,"__esModule",{value:!0});var i;return(function(t){function e(s){return typeof s.delete=="number"?s.delete:typeof s.retain=="number"?s.retain:typeof s.retain=="object"&&s.retain!==null?1:typeof s.insert=="string"?s.insert.length:1}t.length=e})(i||(i={})),Rs.default=i,Rs}var Bs={},xr;function Ki(){if(xr)return Bs;xr=1,Object.defineProperty(Bs,"__esModule",{value:!0});const i=ri();class t{constructor(s){this.ops=s,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(s){s||(s=1/0);const n=this.ops[this.index];if(n){const l=this.offset,o=i.default.length(n);if(s>=o-l?(s=o-l,this.index+=1,this.offset=0):this.offset+=s,typeof n.delete=="number")return{delete:s};{const c={};return n.attributes&&(c.attributes=n.attributes),typeof n.retain=="number"?c.retain=s:typeof n.retain=="object"&&n.retain!==null?c.retain=n.retain:typeof n.insert=="string"?c.insert=n.insert.substr(l,s):c.insert=n.insert,c}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?i.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const s=this.ops[this.index];return s?typeof s.delete=="number"?"delete":typeof s.retain=="number"||typeof s.retain=="object"&&s.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const s=this.offset,n=this.index,l=this.next(),o=this.ops.slice(this.index);return this.offset=s,this.index=n,[l].concat(o)}}else return[]}}return Bs.default=t,Bs}var Tr;function Gi(){return Tr||(Tr=1,(function(i,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const e=zi(),s=si(),n=ni(),l=Vi();t.AttributeMap=l.default;const o=ri();t.Op=o.default;const c=Ki();t.OpIterator=c.default;const u="\0",d=(v,g)=>{if(typeof v!="object"||v===null)throw new Error(`cannot retain a ${typeof v}`);if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);const m=Object.keys(v)[0];if(!m||m!==Object.keys(g)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(g)[0]}`);return[m,v[m],g[m]]};class b{constructor(g){Array.isArray(g)?this.ops=g:g!=null&&Array.isArray(g.ops)?this.ops=g.ops:this.ops=[]}static registerEmbed(g,m){this.handlers[g]=m}static unregisterEmbed(g){delete this.handlers[g]}static getHandler(g){const m=this.handlers[g];if(!m)throw new Error(`no handlers for embed type "${g}"`);return m}insert(g,m){const E={};return typeof g=="string"&&g.length===0?this:(E.insert=g,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(E.attributes=m),this.push(E))}delete(g){return g<=0?this:this.push({delete:g})}retain(g,m){if(typeof g=="number"&&g<=0)return this;const E={retain:g};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(E.attributes=m),this.push(E)}push(g){let m=this.ops.length,E=this.ops[m-1];if(g=s(g),typeof E=="object"){if(typeof g.delete=="number"&&typeof E.delete=="number")return this.ops[m-1]={delete:E.delete+g.delete},this;if(typeof E.delete=="number"&&g.insert!=null&&(m-=1,E=this.ops[m-1],typeof E!="object"))return this.ops.unshift(g),this;if(n(g.attributes,E.attributes)){if(typeof g.insert=="string"&&typeof E.insert=="string")return this.ops[m-1]={insert:E.insert+g.insert},typeof g.attributes=="object"&&(this.ops[m-1].attributes=g.attributes),this;if(typeof g.retain=="number"&&typeof E.retain=="number")return this.ops[m-1]={retain:E.retain+g.retain},typeof g.attributes=="object"&&(this.ops[m-1].attributes=g.attributes),this}}return m===this.ops.length?this.ops.push(g):this.ops.splice(m,0,g),this}chop(){const g=this.ops[this.ops.length-1];return g&&typeof g.retain=="number"&&!g.attributes&&this.ops.pop(),this}filter(g){return this.ops.filter(g)}forEach(g){this.ops.forEach(g)}map(g){return this.ops.map(g)}partition(g){const m=[],E=[];return this.forEach(w=>{(g(w)?m:E).push(w)}),[m,E]}reduce(g,m){return this.ops.reduce(g,m)}changeLength(){return this.reduce((g,m)=>m.insert?g+o.default.length(m):m.delete?g-m.delete:g,0)}length(){return this.reduce((g,m)=>g+o.default.length(m),0)}slice(g=0,m=1/0){const E=[],w=new c.default(this.ops);let x=0;for(;x<m&&w.hasNext();){let L;x<g?L=w.next(g-x):(L=w.next(m-x),E.push(L)),x+=o.default.length(L)}return new b(E)}compose(g){const m=new c.default(this.ops),E=new c.default(g.ops),w=[],x=E.peek();if(x!=null&&typeof x.retain=="number"&&x.attributes==null){let _=x.retain;for(;m.peekType()==="insert"&&m.peekLength()<=_;)_-=m.peekLength(),w.push(m.next());x.retain-_>0&&E.next(x.retain-_)}const L=new b(w);for(;m.hasNext()||E.hasNext();)if(E.peekType()==="insert")L.push(E.next());else if(m.peekType()==="delete")L.push(m.next());else{const _=Math.min(m.peekLength(),E.peekLength()),M=m.next(_),K=E.next(_);if(K.retain){const H={};if(typeof M.retain=="number")H.retain=typeof K.retain=="number"?_:K.retain;else if(typeof K.retain=="number")M.retain==null?H.insert=M.insert:H.retain=M.retain;else{const it=M.retain==null?"insert":"retain",[ut,Ot,Tt]=d(M[it],K.retain),f=b.getHandler(ut);H[it]={[ut]:f.compose(Ot,Tt,it==="retain")}}const st=l.default.compose(M.attributes,K.attributes,typeof M.retain=="number");if(st&&(H.attributes=st),L.push(H),!E.hasNext()&&n(L.ops[L.ops.length-1],H)){const it=new b(m.rest());return L.concat(it).chop()}}else typeof K.delete=="number"&&(typeof M.retain=="number"||typeof M.retain=="object"&&M.retain!==null)&&L.push(K)}return L.chop()}concat(g){const m=new b(this.ops.slice());return g.ops.length>0&&(m.push(g.ops[0]),m.ops=m.ops.concat(g.ops.slice(1))),m}diff(g,m){if(this.ops===g.ops)return new b;const E=[this,g].map(M=>M.map(K=>{if(K.insert!=null)return typeof K.insert=="string"?K.insert:u;const H=M===g?"on":"with";throw new Error("diff() called "+H+" non-document")}).join("")),w=new b,x=e(E[0],E[1],m,!0),L=new c.default(this.ops),_=new c.default(g.ops);return x.forEach(M=>{let K=M[1].length;for(;K>0;){let H=0;switch(M[0]){case e.INSERT:H=Math.min(_.peekLength(),K),w.push(_.next(H));break;case e.DELETE:H=Math.min(K,L.peekLength()),L.next(H),w.delete(H);break;case e.EQUAL:H=Math.min(L.peekLength(),_.peekLength(),K);const st=L.next(H),it=_.next(H);n(st.insert,it.insert)?w.retain(H,l.default.diff(st.attributes,it.attributes)):w.push(it).delete(H);break}K-=H}}),w.chop()}eachLine(g,m=`
2
- `){const E=new c.default(this.ops);let w=new b,x=0;for(;E.hasNext();){if(E.peekType()!=="insert")return;const L=E.peek(),_=o.default.length(L)-E.peekLength(),M=typeof L.insert=="string"?L.insert.indexOf(m,_)-_:-1;if(M<0)w.push(E.next());else if(M>0)w.push(E.next(M));else{if(g(w,E.next(1).attributes||{},x)===!1)return;x+=1,w=new b}}w.length()>0&&g(w,{},x)}invert(g){const m=new b;return this.reduce((E,w)=>{if(w.insert)m.delete(o.default.length(w));else{if(typeof w.retain=="number"&&w.attributes==null)return m.retain(w.retain),E+w.retain;if(w.delete||typeof w.retain=="number"){const x=w.delete||w.retain;return g.slice(E,E+x).forEach(_=>{w.delete?m.push(_):w.retain&&w.attributes&&m.retain(o.default.length(_),l.default.invert(w.attributes,_.attributes))}),E+x}else if(typeof w.retain=="object"&&w.retain!==null){const x=g.slice(E,E+1),L=new c.default(x.ops).next(),[_,M,K]=d(w.retain,L.insert),H=b.getHandler(_);return m.retain({[_]:H.invert(M,K)},l.default.invert(w.attributes,L.attributes)),E+1}}return E},0),m.chop()}transform(g,m=!1){if(m=!!m,typeof g=="number")return this.transformPosition(g,m);const E=g,w=new c.default(this.ops),x=new c.default(E.ops),L=new b;for(;w.hasNext()||x.hasNext();)if(w.peekType()==="insert"&&(m||x.peekType()!=="insert"))L.retain(o.default.length(w.next()));else if(x.peekType()==="insert")L.push(x.next());else{const _=Math.min(w.peekLength(),x.peekLength()),M=w.next(_),K=x.next(_);if(M.delete)continue;if(K.delete)L.push(K);else{const H=M.retain,st=K.retain;let it=typeof st=="object"&&st!==null?st:_;if(typeof H=="object"&&H!==null&&typeof st=="object"&&st!==null){const ut=Object.keys(H)[0];if(ut===Object.keys(st)[0]){const Ot=b.getHandler(ut);Ot&&(it={[ut]:Ot.transform(H[ut],st[ut],m)})}}L.retain(it,l.default.transform(M.attributes,K.attributes,m))}}return L.chop()}transformPosition(g,m=!1){m=!!m;const E=new c.default(this.ops);let w=0;for(;E.hasNext()&&w<=g;){const x=E.peekLength(),L=E.peekType();if(E.next(),L==="delete"){g-=Math.min(x,g-w);continue}else L==="insert"&&(w<g||!m)&&(g+=x);w+=x}return g}}b.Op=o.default,b.OpIterator=c.default,b.AttributeMap=l.default,b.handlers={},t.default=b,i.exports=b,i.exports.default=b})(_s,_s.exports)),_s.exports}var Nt=Gi();const I=ct.getDefaultExportFromCjs(Nt);class Pt extends Lt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Pt.blotName="break";Pt.tagName="BR";let Ut=class extends Hs{};const Zi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ks(i){return i.replace(/[&<>"']/g,t=>Zi[t])}class Et extends nr{static allowedChildren=[Et,Pt,Lt,Ut];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const s=Et.order.indexOf(t),n=Et.order.indexOf(e);return s>=0||n>=0?s-n:t===e?0:t<e?-1:1}formatAt(t,e,s,n){if(Et.compare(this.statics.blotName,s)<0&&this.scroll.query(s,B.BLOT)){const l=this.isolate(t,e);n&&l.wrap(s,n)}else super.formatAt(t,e,s,n)}optimize(t){if(super.optimize(t),this.parent instanceof Et&&Et.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}const Lr=1;class dt extends ls{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=ii(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,s,n){e<=0||(this.scroll.query(s,B.BLOCK)?t+e===this.length()&&this.format(s,n):super.formatAt(t,Math.min(e,this.length()-t-1),s,n),this.cache={})}insertAt(t,e,s){if(s!=null){super.insertAt(t,e,s),this.cache={};return}if(e.length===0)return;const n=e.split(`
3
- `),l=n.shift();l.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});let o=this;n.reduce((c,u)=>(o=o.split(c,!0),o.insertAt(0,u),u.length),t+l.length)}insertBefore(t,e){const{head:s}=this.children;super.insertBefore(t,e),s instanceof Pt&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Lr),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e&&(t===0||t>=this.length()-Lr)){const n=this.clone();return t===0?(this.parent.insertBefore(n,this),this):(this.parent.insertBefore(n,this.next),n)}const s=super.split(t,e);return this.cache={},s}}dt.blotName="block";dt.tagName="P";dt.defaultChild=Pt;dt.allowedChildren=[Pt,Et,Lt,Ut];class Ct extends Lt{attach(){super.attach(),this.attributes=new zs(this.domNode)}delta(){return new I().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const s=this.scroll.query(t,B.BLOCK_ATTRIBUTE);s!=null&&this.attributes.attribute(s,e)}formatAt(t,e,s,n){this.format(s,n)}insertAt(t,e,s){if(s!=null){super.insertAt(t,e,s);return}const n=e.split(`
4
- `),l=n.pop(),o=n.map(u=>{const d=this.scroll.create(dt.blotName);return d.insertAt(0,u),d}),c=this.split(t);o.forEach(u=>{this.parent.insertBefore(u,c)}),l&&this.parent.insertBefore(this.scroll.create("text",l),c)}}Ct.scope=B.BLOCK_BLOT;function ii(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return i.descendants(yt).reduce((e,s)=>s.length()===0?e:e.insert(s.value(),St(s,{},t)),new I).insert(`
5
- `,St(i))}function St(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return i==null||("formats"in i&&typeof i.formats=="function"&&(t={...t,...i.formats()},e&&delete t["code-token"]),i.parent==null||i.parent.statics.blotName==="scroll"||i.parent.statics.scope!==i.statics.scope)?t:St(i.parent,t,e)}class Bt extends Lt{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(t,e,s){super(t,e),this.selection=s,this.textNode=document.createTextNode(Bt.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let s=this,n=0;for(;s!=null&&s.statics.scope!==B.BLOCK_BLOT;)n+=s.offset(s.parent),s=s.parent;s!=null&&(this.savedLength=Bt.CONTENTS.length,s.optimize(),s.formatAt(n,Bt.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof Ut?this.prev:null,s=e?e.length():0,n=this.next instanceof Ut?this.next:null,l=n?n.text:"",{textNode:o}=this,c=o.data.split(Bt.CONTENTS).join("");o.data=Bt.CONTENTS;let u;if(e)u=e,(c||n)&&(e.insertAt(e.length(),c+l),n&&n.remove());else if(n)u=n,n.insertAt(0,c);else{const d=document.createTextNode(c);u=this.scroll.create(d),this.parent.insertBefore(u,this)}if(this.remove(),t){const d=(g,m)=>e&&g===e.domNode?m:g===o?s+m-1:n&&g===n.domNode?s+c.length+m:null,b=d(t.start.node,t.start.offset),v=d(t.end.node,t.end.offset);if(b!==null&&v!==null)return{startNode:u.domNode,startOffset:b,endNode:u.domNode,endOffset:v}}return null}update(t,e){if(t.some(s=>s.type==="characterData"&&s.target===this.textNode)){const s=this.restore();s&&(e.range=s)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if(e.domNode.tagName==="A"){this.savedLength=Bt.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}var jn={exports:{}},qr;function Wi(){return qr||(qr=1,(function(i){var t=Object.prototype.hasOwnProperty,e="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(e=!1));function n(u,d,b){this.fn=u,this.context=d,this.once=b||!1}function l(u,d,b,v,g){if(typeof b!="function")throw new TypeError("The listener must be a function");var m=new n(b,v||u,g),E=e?e+d:d;return u._events[E]?u._events[E].fn?u._events[E]=[u._events[E],m]:u._events[E].push(m):(u._events[E]=m,u._eventsCount++),u}function o(u,d){--u._eventsCount===0?u._events=new s:delete u._events[d]}function c(){this._events=new s,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],b,v;if(this._eventsCount===0)return d;for(v in b=this._events)t.call(b,v)&&d.push(e?v.slice(1):v);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(b)):d},c.prototype.listeners=function(d){var b=e?e+d:d,v=this._events[b];if(!v)return[];if(v.fn)return[v.fn];for(var g=0,m=v.length,E=new Array(m);g<m;g++)E[g]=v[g].fn;return E},c.prototype.listenerCount=function(d){var b=e?e+d:d,v=this._events[b];return v?v.fn?1:v.length:0},c.prototype.emit=function(d,b,v,g,m,E){var w=e?e+d:d;if(!this._events[w])return!1;var x=this._events[w],L=arguments.length,_,M;if(x.fn){switch(x.once&&this.removeListener(d,x.fn,void 0,!0),L){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,b),!0;case 3:return x.fn.call(x.context,b,v),!0;case 4:return x.fn.call(x.context,b,v,g),!0;case 5:return x.fn.call(x.context,b,v,g,m),!0;case 6:return x.fn.call(x.context,b,v,g,m,E),!0}for(M=1,_=new Array(L-1);M<L;M++)_[M-1]=arguments[M];x.fn.apply(x.context,_)}else{var K=x.length,H;for(M=0;M<K;M++)switch(x[M].once&&this.removeListener(d,x[M].fn,void 0,!0),L){case 1:x[M].fn.call(x[M].context);break;case 2:x[M].fn.call(x[M].context,b);break;case 3:x[M].fn.call(x[M].context,b,v);break;case 4:x[M].fn.call(x[M].context,b,v,g);break;default:if(!_)for(H=1,_=new Array(L-1);H<L;H++)_[H-1]=arguments[H];x[M].fn.apply(x[M].context,_)}}return!0},c.prototype.on=function(d,b,v){return l(this,d,b,v,!1)},c.prototype.once=function(d,b,v){return l(this,d,b,v,!0)},c.prototype.removeListener=function(d,b,v,g){var m=e?e+d:d;if(!this._events[m])return this;if(!b)return o(this,m),this;var E=this._events[m];if(E.fn)E.fn===b&&(!g||E.once)&&(!v||E.context===v)&&o(this,m);else{for(var w=0,x=[],L=E.length;w<L;w++)(E[w].fn!==b||g&&!E[w].once||v&&E[w].context!==v)&&x.push(E[w]);x.length?this._events[m]=x.length===1?x[0]:x:o(this,m)}return this},c.prototype.removeAllListeners=function(d){var b;return d?(b=e?e+d:d,this._events[b]&&o(this,b)):(this._events=new s,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=e,c.EventEmitter=c,i.exports=c})(jn)),jn.exports}var Xi=Wi();const Yi=ct.getDefaultExportFromCjs(Xi),Qn=new WeakMap,Jn=["error","warn","log","info"];let tr="warn";function li(i){if(tr&&Jn.indexOf(i)<=Jn.indexOf(tr)){for(var t=arguments.length,e=new Array(t>1?t-1:0),s=1;s<t;s++)e[s-1]=arguments[s];console[i](...e)}}function Jt(i){return Jn.reduce((t,e)=>(t[e]=li.bind(console,e,i),t),{})}Jt.level=i=>{tr=i};li.level=Jt.level;const Pn=Jt("quill:events"),Qi=["selectionchange","mousedown","mouseup","click"];Qi.forEach(i=>{document.addEventListener(i,function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{const l=Qn.get(n);l&&l.emitter&&l.emitter.handleDOM(...e)})})});class O extends Yi{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",Pn.error)}emit(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return Pn.log.call(Pn,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];(this.domListeners[t.type]||[]).forEach(l=>{let{node:o,handler:c}=l;(t.target===o||o.contains(t.target))&&c(t,...s)})}listenDOM(t,e,s){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:s})}}const Hn=Jt("quill:selection");class ie{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=e}}class Ji{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new ie(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,O.sources.USER),1)}),this.emitter.on(O.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const s=this.getNativeRange();s!=null&&s.start.node!==this.cursor.textNode&&this.emitter.once(O.events.SCROLL_UPDATE,(n,l)=>{try{this.root.contains(s.start.node)&&this.root.contains(s.end.node)&&this.setNativeRange(s.start.node,s.start.offset,s.end.node,s.end.offset);const o=l.some(c=>c.type==="characterData"||c.type==="childList"||c.type==="attributes"&&c.target===this.root);this.update(o?O.sources.SILENT:n)}catch{}})}),this.emitter.on(O.events.SCROLL_OPTIMIZE,(s,n)=>{if(n.range){const{startNode:l,startOffset:o,endNode:c,endOffset:u}=n.range;this.setNativeRange(l,o,c,u),this.update(O.sources.SILENT)}}),this.update(O.sources.SILENT)}handleComposition(){this.emitter.on(O.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(O.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(O.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const s=this.getNativeRange();if(!(s==null||!s.native.collapsed||this.scroll.query(t,B.BLOCK))){if(s.start.node!==this.cursor.textNode){const n=this.scroll.find(s.start.node,!1);if(n==null)return;if(n instanceof yt){const l=n.split(s.start.offset);n.parent.insertBefore(this.cursor,l)}else n.insertBefore(this.cursor,s.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const s=this.scroll.length();t=Math.min(t,s-1),e=Math.min(t+e,s-1)-t;let n,[l,o]=this.scroll.leaf(t);if(l==null)return null;if(e>0&&o===l.length()){const[b]=this.scroll.leaf(t+1);if(b){const[v]=this.scroll.line(t),[g]=this.scroll.line(t+1);v===g&&(l=b,o=0)}}[n,o]=l.position(o,!0);const c=document.createRange();if(e>0)return c.setStart(n,o),[l,o]=this.scroll.leaf(t+e),l==null?null:([n,o]=l.position(o,!0),c.setEnd(n,o),c.getBoundingClientRect());let u="left",d;if(n instanceof Text){if(!n.data.length)return null;o<n.data.length?(c.setStart(n,o),c.setEnd(n,o+1)):(c.setStart(n,o-1),c.setEnd(n,o),u="right"),d=c.getBoundingClientRect()}else{if(!(l.domNode instanceof Element))return null;d=l.domNode.getBoundingClientRect(),o>0&&(u="right")}return{bottom:d.top+d.height,height:d.height,left:d[u],right:d[u],top:d.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(e==null)return null;const s=this.normalizeNative(e);return Hn.info("getNativeRange",s),s}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();return e==null?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Fn(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const s=e.map(o=>{const[c,u]=o,d=this.scroll.find(c,!0),b=d.offset(this.scroll);return u===0?b:d instanceof yt?b+d.index(c,u):b+d.length()}),n=Math.min(Math.max(...s),this.scroll.length()-1),l=Math.min(n,...s);return new ie(l,n-l)}normalizeNative(t){if(!Fn(this.root,t.startContainer)||!t.collapsed&&!Fn(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(s=>{let{node:n,offset:l}=s;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>l)n=n.childNodes[l],l=0;else if(n.childNodes.length===l)n=n.lastChild,n instanceof Text?l=n.data.length:n.childNodes.length>0?l=n.childNodes.length:l=n.childNodes.length+1;else break;s.node=n,s.offset=l}),e}rangeToNative(t){const e=this.scroll.length(),s=(n,l)=>{n=Math.min(e-1,n);const[o,c]=this.scroll.leaf(n);return o?o.position(c,l):[null,-1]};return[...s(t.index,!1),...s(t.index+t.length,!0)]}setNativeRange(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Hn.info("setNativeRange",t,e,s,n),t!=null&&(this.root.parentNode==null||t.parentNode==null||s.parentNode==null))return;const o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:c}=this.getNativeRange()||{};if(c==null||l||t!==c.startContainer||e!==c.startOffset||s!==c.endContainer||n!==c.endOffset){t instanceof Element&&t.tagName==="BR"&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),s instanceof Element&&s.tagName==="BR"&&(n=Array.from(s.parentNode.childNodes).indexOf(s),s=s.parentNode);const u=document.createRange();u.setStart(t,e),u.setEnd(s,n),o.removeAllRanges(),o.addRange(u)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O.sources.API;if(typeof e=="string"&&(s=e,e=!1),Hn.info("setRange",t),t!=null){const n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(s)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O.sources.USER;const e=this.lastRange,[s,n]=this.getRange();if(this.lastRange=s,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!sr(e,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const l=[O.events.SELECTION_CHANGE,Re.cloneDeep(this.lastRange),Re.cloneDeep(e),t];this.emitter.emit(O.events.EDITOR_CHANGE,...l),t!==O.sources.SILENT&&this.emitter.emit(...l)}}}function Fn(i,t){try{t.parentNode}catch{return!1}return i.contains(t)}const tl=/^[ -~]*$/;class el{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const s=Sr(t),n=new I;return nl(s.ops.slice()).reduce((o,c)=>{const u=Nt.Op.length(c);let d=c.attributes||{},b=!1,v=!1;if(c.insert!=null){if(n.retain(u),typeof c.insert=="string"){const E=c.insert;v=!E.endsWith(`
6
- `)&&(e<=o||!!this.scroll.descendant(Ct,o)[0]),this.scroll.insertAt(o,E);const[w,x]=this.scroll.line(o);let L=ct.merge({},St(w));if(w instanceof dt){const[_]=w.descendant(yt,x);_&&(L=ct.merge(L,St(_)))}d=Nt.AttributeMap.diff(L,d)||{}}else if(typeof c.insert=="object"){const E=Object.keys(c.insert)[0];if(E==null)return o;const w=this.scroll.query(E,B.INLINE)!=null;if(w)(e<=o||this.scroll.descendant(Ct,o)[0])&&(v=!0);else if(o>0){const[x,L]=this.scroll.descendant(yt,o-1);x instanceof Ut?x.value()[L]!==`
7
- `&&(b=!0):x instanceof Lt&&x.statics.scope===B.INLINE_BLOT&&(b=!0)}if(this.scroll.insertAt(o,E,c.insert[E]),w){const[x]=this.scroll.descendant(yt,o);if(x){const L=ct.merge({},St(x));d=Nt.AttributeMap.diff(L,d)||{}}}}e+=u}else if(n.push(c),c.retain!==null&&typeof c.retain=="object"){const E=Object.keys(c.retain)[0];if(E==null)return o;this.scroll.updateEmbedAt(o,E,c.retain[E])}Object.keys(d).forEach(E=>{this.scroll.formatAt(o,u,E,d[E])});const g=b?1:0,m=v?1:0;return e+=g+m,n.retain(g),n.delete(m),o+u+g+m},0),n.reduce((o,c)=>typeof c.delete=="number"?(this.scroll.deleteAt(o,c.delete),o):o+Nt.Op.length(c),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(s)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new I().retain(t).delete(e))}formatLine(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(s).forEach(l=>{this.scroll.lines(t,Math.max(e,1)).forEach(o=>{o.format(l,s[l])})}),this.scroll.optimize();const n=new I().retain(t).retain(e,Re.cloneDeep(s));return this.update(n)}formatText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(s).forEach(l=>{this.scroll.formatAt(t,e,l,s[l])});const n=new I().retain(t).retain(e,Re.cloneDeep(s));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new I)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=[],n=[];e===0?this.scroll.path(t).forEach(c=>{const[u]=c;u instanceof dt?s.push(u):u instanceof yt&&n.push(u)}):(s=this.scroll.lines(t,e),n=this.scroll.descendants(yt,t,e));const[l,o]=[s,n].map(c=>{const u=c.shift();if(u==null)return{};let d=St(u);for(;Object.keys(d).length>0;){const b=c.shift();if(b==null)return d;d=sl(St(b),d)}return d});return{...l,...o}}getHTML(t,e){const[s,n]=this.scroll.line(t);if(s){const l=s.length();return s.length()>=n+e&&!(n===0&&e===l)?os(s,n,e,!0):os(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(s=>typeof s.insert=="string").map(s=>s.insert).join("")}insertContents(t,e){const s=Sr(e),n=new I().retain(t).concat(s);return this.scroll.insertContents(t,s),this.update(n)}insertEmbed(t,e,s){return this.scroll.insertAt(t,e,s),this.update(new I().retain(t).insert({[e]:s}))}insertText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,`
8
- `).replace(/\r/g,`
9
- `),this.scroll.insertAt(t,e),Object.keys(s).forEach(n=>{this.scroll.formatAt(t,e.length,n,s[n])}),this.update(new I().retain(t).insert(e,Re.cloneDeep(s)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==dt.blotName)return!1;const e=t;return e.children.length>1?!1:e.children.head instanceof Pt}removeFormat(t,e){const s=this.getText(t,e),[n,l]=this.scroll.line(t+e);let o=0,c=new I;n!=null&&(o=n.length()-l,c=n.delta().slice(l,l+o-1).insert(`
10
- `));const d=this.getContents(t,e+o).diff(new I().insert(s).concat(c)),b=new I().retain(t).concat(d);return this.applyDelta(b)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const n=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(tl)&&this.scroll.find(e[0].target)){const l=this.scroll.find(e[0].target),o=St(l),c=l.offset(this.scroll),u=e[0].oldValue.replace(Bt.CONTENTS,""),d=new I().insert(u),b=new I().insert(l.value()),v=s&&{oldRange:kr(s.oldRange,-c),newRange:kr(s.newRange,-c)};t=new I().retain(c).concat(d.diff(b,v)).reduce((m,E)=>E.insert?m.insert(E.insert,o):m.push(E),new I),this.delta=n.compose(t)}else this.delta=this.getDelta(),(!t||!sr(n.compose(t),this.delta))&&(t=n.diff(this.delta,s));return t}}function Ie(i,t,e){if(i.length===0){const[m]=$n(e.pop());return t<=0?`</li></${m}>`:`</li></${m}>${Ie([],t-1,e)}`}const[{child:s,offset:n,length:l,indent:o,type:c},...u]=i,[d,b]=$n(c);if(o>t)return e.push(c),o===t+1?`<${d}><li${b}>${os(s,n,l)}${Ie(u,o,e)}`:`<${d}><li>${Ie(i,t+1,e)}`;const v=e[e.length-1];if(o===t&&c===v)return`</li><li${b}>${os(s,n,l)}${Ie(u,o,e)}`;const[g]=$n(e.pop());return`</li></${g}>${Ie(i,t-1,e)}`}function os(i,t,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in i&&typeof i.html=="function")return i.html(t,e);if(i instanceof Ut)return Ks(i.value().slice(t,t+e)).replaceAll(" ","&nbsp;");if(i instanceof Dt){if(i.statics.blotName==="list-container"){const d=[];return i.children.forEachAt(t,e,(b,v,g)=>{const m="formats"in b&&typeof b.formats=="function"?b.formats():{};d.push({child:b,offset:v,length:g,indent:m.indent||0,type:m.list})}),Ie(d,-1,[])}const n=[];if(i.children.forEachAt(t,e,(d,b,v)=>{n.push(os(d,b,v))}),s||i.statics.blotName==="list")return n.join("");const{outerHTML:l,innerHTML:o}=i.domNode,[c,u]=l.split(`>${o}<`);return c==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${u}`:`${c}>${n.join("")}<${u}`}return i.domNode instanceof Element?i.domNode.outerHTML:""}function sl(i,t){return Object.keys(t).reduce((e,s)=>{if(i[s]==null)return e;const n=t[s];return n===i[s]?e[s]=n:Array.isArray(n)?n.indexOf(i[s])<0?e[s]=n.concat([i[s]]):e[s]=n:e[s]=[n,i[s]],e},{})}function $n(i){const t=i==="ordered"?"ol":"ul";switch(i){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Sr(i){return i.reduce((t,e)=>{if(typeof e.insert=="string"){const s=e.insert.replace(/\r\n/g,`
11
- `).replace(/\r/g,`
12
- `);return t.insert(s,e.attributes)}return t.push(e)},new I)}function kr(i,t){let{index:e,length:s}=i;return new ie(e+t,s)}function nl(i){const t=[];return i.forEach(e=>{typeof e.insert=="string"?e.insert.split(`
13
- `).forEach((n,l)=>{l&&t.push({insert:`
14
- `,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}class Ht{static DEFAULTS={};constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=e}}const Ms="\uFEFF";class ir extends Lt{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(s=>{this.contentNode.appendChild(s)}),this.leftGuard=document.createTextNode(Ms),this.rightGuard=document.createTextNode(Ms),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,s;const n=t.data.split(Ms).join("");if(t===this.leftGuard)if(this.prev instanceof Ut){const l=this.prev.length();this.prev.insertAt(l,n),e={startNode:this.prev.domNode,startOffset:l+n.length}}else s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this),e={startNode:s,startOffset:n.length};else t===this.rightGuard&&(this.next instanceof Ut?(this.next.insertAt(0,n),e={startNode:this.next.domNode,startOffset:n.length}):(s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this.next),e={startNode:s,startOffset:n.length}));return t.data=Ms,e}update(t,e){t.forEach(s=>{if(s.type==="characterData"&&(s.target===this.leftGuard||s.target===this.rightGuard)){const n=this.restore(s.target);n&&(e.range=n)}})}}class rl{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof ir)&&(this.emitter.emit(O.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(O.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(O.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(O.events.COMPOSITION_END,t),this.isComposing=!1}}class Ue{static DEFAULTS={modules:{}};static themes={default:Ue};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}const il=i=>i.parentElement||i.getRootNode().host||null,ll=i=>{const t=i.getBoundingClientRect(),e="offsetWidth"in i&&Math.abs(t.width)/i.offsetWidth||1,s="offsetHeight"in i&&Math.abs(t.height)/i.offsetHeight||1;return{top:t.top,right:t.left+i.clientWidth*e,bottom:t.top+i.clientHeight*s,left:t.left}},Ds=i=>{const t=parseInt(i,10);return Number.isNaN(t)?0:t},Cr=(i,t,e,s,n,l)=>i<e&&t>s?0:i<e?-(e-i+n):t>s?t-i>s-e?i+n-e:t-s+l:0,ol=(i,t)=>{const e=i.ownerDocument;let s=t,n=i;for(;n;){const l=n===e.body,o=l?{top:0,right:window.visualViewport?.width??e.documentElement.clientWidth,bottom:window.visualViewport?.height??e.documentElement.clientHeight,left:0}:ll(n),c=getComputedStyle(n),u=Cr(s.left,s.right,o.left,o.right,Ds(c.scrollPaddingLeft),Ds(c.scrollPaddingRight)),d=Cr(s.top,s.bottom,o.top,o.bottom,Ds(c.scrollPaddingTop),Ds(c.scrollPaddingBottom));if(u||d)if(l)e.defaultView?.scrollBy(u,d);else{const{scrollLeft:b,scrollTop:v}=n;d&&(n.scrollTop+=d),u&&(n.scrollLeft+=u);const g=n.scrollLeft-b,m=n.scrollTop-v;s={left:s.left-g,top:s.top-m,right:s.right-g,bottom:s.bottom-m}}n=l||c.position==="fixed"?null:il(n)}},al=100,cl=["block","break","cursor","inline","scroll","text"],ul=(i,t,e)=>{const s=new De;return cl.forEach(n=>{const l=t.query(n);l&&s.register(l)}),i.forEach(n=>{let l=t.query(n);l||e.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;l;)if(s.register(l),l="blotName"in l?l.requiredContainer??null:null,o+=1,o>al){e.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),s},Me=Jt("quill"),Us=new De;Dt.uiClass="ql-ui";class N{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Us,theme:"default"};static events=O.events;static sources=O.sources;static version="2.0.3";static imports={delta:I,parchment:ei,"core/module":Ht,"core/theme":Ue};static debug(t){t===!0&&(t="log"),Jt.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Qn.get(t)||Us.find(t,e)}static import(t){return this.imports[t]==null&&Me.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),s="attrName"in t?t.attrName:t.blotName;typeof s=="string"?this.register(`formats/${s}`,t,e):Object.keys(t).forEach(n=>{this.register(n,t[n],e)})}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],s=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!s&&Me.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!="boolean"&&e.blotName!=="abstract"&&Us.register(e),typeof e.register=="function"&&e.register(Us)}}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=hl(t,e),this.container=this.options.container,this.container==null){Me.error("Invalid Quill container",t);return}this.options.debug&&N.debug(this.options.debug);const s=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",Qn.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new O;const n=rr.blotName,l=this.options.registry.query(n);if(!l||!("blotName"in l))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new l(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new el(this.scroll),this.selection=new Ji(this.scroll,this.emitter),this.composition=new rl(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(O.events.EDITOR_CHANGE,o=>{o===O.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(O.events.SCROLL_UPDATE,(o,c)=>{const u=this.selection.lastRange,[d]=this.selection.getRange(),b=u&&d?{oldRange:u,newRange:d}:void 0;Rt.call(this,()=>this.editor.update(null,c,b),o)}),this.emitter.on(O.events.SCROLL_EMBED_UPDATE,(o,c)=>{const u=this.selection.lastRange,[d]=this.selection.getRange(),b=u&&d?{oldRange:u,newRange:d}:void 0;Rt.call(this,()=>{const v=new I().retain(o.offset(this)).retain({[o.statics.blotName]:c});return this.editor.update(v,[],b)},N.sources.USER)}),s){const o=this.clipboard.convert({html:`${s}<p><br></p>`,text:`
15
- `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const s=t;t=document.createElement("div"),t.classList.add(s)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,s){return[t,e,,s]=Yt(t,e,s),Rt.call(this,()=>this.editor.deleteText(t,e),s,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O.sources.API;return Rt.call(this,()=>{const n=this.getSelection(!0);let l=new I;if(n==null)return l;if(this.scroll.query(t,B.BLOCK))l=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(n.length===0)return this.selection.format(t,e),l;l=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,O.sources.SILENT),l},s)}formatLine(t,e,s,n,l){let o;return[t,e,o,l]=Yt(t,e,s,n,l),Rt.call(this,()=>this.editor.formatLine(t,e,o),l,t,0)}formatText(t,e,s,n,l){let o;return[t,e,o,l]=Yt(t,e,s,n,l),Rt.call(this,()=>this.editor.formatText(t,e,o),l,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=null;if(typeof t=="number"?s=this.selection.getBounds(t,e):s=this.selection.getBounds(t.index,t.length),!s)return null;const n=this.container.getBoundingClientRect();return{bottom:s.bottom-n.top,height:s.height,left:s.left-n.left,right:s.right-n.left,top:s.top-n.top,width:s.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=Yt(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=Yt(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=Yt(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,s){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N.sources.API;return Rt.call(this,()=>this.editor.insertEmbed(t,e,s),n,t)}insertText(t,e,s,n,l){let o;return[t,,o,l]=Yt(t,0,s,n,l),Rt.call(this,()=>this.editor.insertText(t,e,o),l,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,s){return[t,e,,s]=Yt(t,e,s),Rt.call(this,()=>this.editor.removeFormat(t,e),s,t)}scrollRectIntoView(t){ol(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O.sources.API;return Rt.call(this,()=>{t=new I(t);const s=this.getLength(),n=this.editor.deleteText(0,s),l=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return n.compose(l).compose(o)},e)}setSelection(t,e,s){t==null?this.selection.setRange(null,e||N.sources.API):([t,e,,s]=Yt(t,e,s),this.selection.setRange(new ie(Math.max(0,t),e),s),s!==O.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O.sources.API;const s=new I().insert(t);return this.setContents(s,e)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O.sources.API;return Rt.call(this,()=>(t=new I(t),this.editor.applyDelta(t)),e,!0)}}function Or(i){return typeof i=="string"?document.querySelector(i):i}function zn(i){return Object.entries(i??{}).reduce((t,e)=>{let[s,n]=e;return{...t,[s]:n===!0?{}:n}},{})}function _r(i){return Object.fromEntries(Object.entries(i).filter(t=>t[1]!==void 0))}function hl(i,t){const e=Or(i);if(!e)throw new Error("Invalid Quill container");const n=!t.theme||t.theme===N.DEFAULTS.theme?Ue:N.import(`themes/${t.theme}`);if(!n)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:l,...o}=N.DEFAULTS,{modules:c,...u}=n.DEFAULTS;let d=zn(t.modules);d!=null&&d.toolbar&&d.toolbar.constructor!==Object&&(d={...d,toolbar:{container:d.toolbar}});const b=ct.merge({},zn(l),zn(c),d),v={...o,..._r(u),..._r(t)};let g=t.registry;return g?t.formats&&Me.warn('Ignoring "formats" option because "registry" is specified'):g=t.formats?ul(t.formats,v.registry,Me):v.registry,{...v,registry:g,container:e,theme:n,modules:Object.entries(b).reduce((m,E)=>{let[w,x]=E;if(!x)return m;const L=N.import(`modules/${w}`);return L==null?(Me.error(`Cannot load ${w} module. Are you sure you registered it?`),m):{...m,[w]:ct.merge({},L.DEFAULTS||{},x)}},{}),bounds:Or(v.bounds)}}function Rt(i,t,e,s){if(!this.isEnabled()&&t===O.sources.USER&&!this.allowReadOnlyEdits)return new I;let n=e==null?null:this.getSelection();const l=this.editor.delta,o=i();if(n!=null&&(e===!0&&(e=n.index),s==null?n=Ir(n,o,t):s!==0&&(n=Ir(n,e,s,t)),this.setSelection(n,O.sources.SILENT)),o.length()>0){const c=[O.events.TEXT_CHANGE,o,l,t];this.emitter.emit(O.events.EDITOR_CHANGE,...c),t!==O.sources.SILENT&&this.emitter.emit(...c)}return o}function Yt(i,t,e,s,n){let l={};return typeof i.index=="number"&&typeof i.length=="number"?typeof t!="number"?(n=s,s=e,e=t,t=i.length,i=i.index):(t=i.length,i=i.index):typeof t!="number"&&(n=s,s=e,e=t,t=0),typeof e=="object"?(l=e,n=s):typeof e=="string"&&(s!=null?l[e]=s:n=e),n=n||O.sources.API,[i,t,l,n]}function Ir(i,t,e,s){const n=typeof e=="number"?e:0;if(i==null)return null;let l,o;return t&&typeof t.transformPosition=="function"?[l,o]=[i.index,i.index+i.length].map(c=>t.transformPosition(c,s!==O.sources.USER)):[l,o]=[i.index,i.index+i.length].map(c=>c<t||c===t&&s===O.sources.USER?c:n>=0?c+n:Math.max(t,c+n)),new ie(l,o-l)}class pe extends Vs{}function Rr(i){return i instanceof dt||i instanceof Ct}function Br(i){return typeof i.updateContent=="function"}class fl extends rr{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=dt;static allowedChildren=[dt,Ct,pe];constructor(t,e,s){let{emitter:n}=s;super(t,e),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",l=>this.handleDragStart(l))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(O.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(O.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(O.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[s,n]=this.line(t),[l]=this.line(t+e);if(super.deleteAt(t,e),l!=null&&s!==l&&n>0){if(s instanceof Ct||l instanceof Ct){this.optimize();return}const o=l.children.head instanceof Pt?null:l.children.head;s.moveChildren(l,o),s.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.optimize()}insertAt(t,e,s){if(t>=this.length())if(s==null||this.scroll.query(e,B.BLOCK)==null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),s==null&&e.endsWith(`
16
- `)?n.insertAt(0,e.slice(0,-1),s):n.insertAt(0,e,s)}else{const n=this.scroll.create(e,s);this.appendChild(n)}else super.insertAt(t,e,s);this.optimize()}insertBefore(t,e){if(t.statics.scope===B.INLINE_BLOT){const s=this.scroll.create(this.statics.defaultChild.blotName);s.appendChild(t),super.insertBefore(s,e)}else super.insertBefore(t,e)}insertContents(t,e){const s=this.deltaToRenderBlocks(e.concat(new I().insert(`
17
- `))),n=s.pop();if(n==null)return;this.batchStart();const l=s.shift();if(l){const u=l.type==="block"&&(l.delta.length()===0||!this.descendant(Ct,t)[0]&&t<this.length()),d=l.type==="block"?l.delta:new I().insert({[l.key]:l.value});Vn(this,t,d);const b=l.type==="block"?1:0,v=t+d.length()+b;u&&this.insertAt(v-1,`
18
- `);const g=St(this.line(t)[0]),m=Nt.AttributeMap.diff(g,l.attributes)||{};Object.keys(m).forEach(E=>{this.formatAt(v-1,1,E,m[E])}),t=v}let[o,c]=this.children.find(t);if(s.length&&(o&&(o=o.split(c),c=0),s.forEach(u=>{if(u.type==="block"){const d=this.createBlock(u.attributes,o||void 0);Vn(d,0,u.delta)}else{const d=this.create(u.key,u.value);this.insertBefore(d,o||void 0),Object.keys(u.attributes).forEach(b=>{d.format(b,u.attributes[b])})}})),n.type==="block"&&n.delta.length()){const u=o?o.offset(o.scroll)+c:this.length();Vn(this,u,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[s,n]=e;return s instanceof yt?[s,n]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(Rr,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const s=(n,l,o)=>{let c=[],u=o;return n.children.forEachAt(l,o,(d,b,v)=>{Rr(d)?c.push(d):d instanceof Vs&&(c=c.concat(s(d,b,u))),u-=v}),c};return s(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(O.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let e=O.sources.USER;typeof t=="string"&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(s=>{let{target:n}=s;const l=this.find(n,!0);return l&&!Br(l)}),t.length>0&&this.emitter.emit(O.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(O.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,s){const[n]=this.descendant(l=>l instanceof Ct,t);n&&n.statics.blotName===e&&Br(n)&&n.updateContent(s)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let s=new I;return t.forEach(n=>{const l=n?.insert;if(l)if(typeof l=="string"){const o=l.split(`
19
- `);o.slice(0,-1).forEach(u=>{s.insert(u,n.attributes),e.push({type:"block",delta:s,attributes:n.attributes??{}}),s=new I});const c=o[o.length-1];c&&s.insert(c,n.attributes)}else{const o=Object.keys(l)[0];if(!o)return;this.query(o,B.INLINE)?s.push(n):(s.length()&&e.push({type:"block",delta:s,attributes:{}}),s=new I,e.push({type:"blockEmbed",key:o,value:l[o],attributes:n.attributes??{}}))}}),s.length()&&e.push({type:"block",delta:s,attributes:{}}),e}createBlock(t,e){let s;const n={};Object.entries(t).forEach(c=>{let[u,d]=c;this.query(u,B.BLOCK&B.BLOT)!=null?s=u:n[u]=d});const l=this.create(s||this.statics.defaultChild.blotName,s?t[s]:void 0);this.insertBefore(l,e||void 0);const o=l.length();return Object.entries(n).forEach(c=>{let[u,d]=c;l.formatAt(0,o,u,d)}),l}}function Vn(i,t,e){e.reduce((s,n)=>{const l=Nt.Op.length(n);let o=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){const c=n.insert;i.insertAt(s,c);const[u]=i.descendant(yt,s),d=St(u);o=Nt.AttributeMap.diff(d,o)||{}}else if(typeof n.insert=="object"){const c=Object.keys(n.insert)[0];if(c==null)return s;if(i.insertAt(s,c,n.insert[c]),i.scroll.query(c,B.INLINE)!=null){const[d]=i.descendant(yt,s),b=St(d);o=Nt.AttributeMap.diff(b,o)||{}}}}return Object.keys(o).forEach(c=>{i.formatAt(s,l,c,o[c])}),s+l},t)}const lr={scope:B.BLOCK,whitelist:["right","center","justify"]},dl=new Kt("align","align",lr),oi=new jt("align","ql-align",lr),ai=new le("align","text-align",lr);class ci extends le{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):e}}const gl=new jt("color","ql-color",{scope:B.INLINE}),or=new ci("color","color",{scope:B.INLINE}),pl=new jt("background","ql-bg",{scope:B.INLINE}),ar=new ci("background","background-color",{scope:B.INLINE});class me extends pe{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(s=>s.length()<=1?"":s.domNode.innerText).join(`
20
- `).slice(t,t+e)}html(t,e){return`<pre>
21
- ${Ks(this.code(t,e))}
22
- </pre>`}}class At extends dt{static TAB=" ";static register(){N.register(me)}}class cr extends Et{}cr.blotName="code";cr.tagName="CODE";At.blotName="code-block";At.className="ql-code-block";At.tagName="DIV";me.blotName="code-block-container";me.className="ql-code-block-container";me.tagName="DIV";me.allowedChildren=[At];At.allowedChildren=[Ut,Pt,Bt];At.requiredContainer=me;const ur={scope:B.BLOCK,whitelist:["rtl"]},ui=new Kt("direction","dir",ur),hi=new jt("direction","ql-direction",ur),fi=new le("direction","direction",ur),di={scope:B.INLINE,whitelist:["serif","monospace"]},gi=new jt("font","ql-font",di);class ml extends le{value(t){return super.value(t).replace(/["']/g,"")}}const pi=new ml("font","font-family",di),mi=new jt("size","ql-size",{scope:B.INLINE,whitelist:["small","large","huge"]}),bi=new le("size","font-size",{scope:B.INLINE,whitelist:["10px","18px","32px"]}),bl=Jt("quill:keyboard"),yl=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Gs extends Ht{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(s=>!!e[s]!==t[s]&&e[s]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(s=>{this.options.bindings[s]&&this.addBinding(this.options.bindings[s])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=El(t);if(n==null){bl.warn("Attempted to add invalid keyboard binding",n);return}typeof e=="function"&&(e={handler:e}),typeof s=="function"&&(s={handler:s}),(Array.isArray(n.key)?n.key:[n.key]).forEach(o=>{const c={...n,key:o,...e,...s};this.bindings[c.key]=this.bindings[c.key]||[],this.bindings[c.key].push(c)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(L=>Gs.match(t,L));if(n.length===0)return;const l=N.find(t.target,!0);if(l&&l.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[c,u]=this.quill.getLine(o.index),[d,b]=this.quill.getLeaf(o.index),[v,g]=o.length===0?[d,b]:this.quill.getLeaf(o.index+o.length),m=d instanceof Hs?d.value().slice(0,b):"",E=v instanceof Hs?v.value().slice(g):"",w={collapsed:o.length===0,empty:o.length===0&&c.length()<=1,format:this.quill.getFormat(o),line:c,offset:u,prefix:m,suffix:E,event:t};n.some(L=>{if(L.collapsed!=null&&L.collapsed!==w.collapsed||L.empty!=null&&L.empty!==w.empty||L.offset!=null&&L.offset!==w.offset)return!1;if(Array.isArray(L.format)){if(L.format.every(_=>w.format[_]==null))return!1}else if(typeof L.format=="object"&&!Object.keys(L.format).every(_=>L.format[_]===!0?w.format[_]!=null:L.format[_]===!1?w.format[_]==null:sr(L.format[_],w.format[_])))return!1;return L.prefix!=null&&!L.prefix.test(w.prefix)||L.suffix!=null&&!L.suffix.test(w.suffix)?!1:L.handler.call(this,o,w,L)!==!0})&&t.preventDefault()})}handleBackspace(t,e){const s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let n={};const[l]=this.quill.getLine(t.index);let o=new I().retain(t.index-s).delete(s);if(e.offset===0){const[c]=this.quill.getLine(t.index-1);if(c&&!(c.statics.blotName==="block"&&c.length()<=1)){const d=l.formats(),b=this.quill.getFormat(t.index-1,1);if(n=Nt.AttributeMap.diff(d,b)||{},Object.keys(n).length>0){const v=new I().retain(t.index+l.length()-2).retain(1,n);o=o.compose(v)}}}this.quill.updateContents(o,N.sources.USER),this.quill.focus()}handleDelete(t,e){const s=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-s)return;let n={};const[l]=this.quill.getLine(t.index);let o=new I().retain(t.index).delete(s);if(e.offset>=l.length()-1){const[c]=this.quill.getLine(t.index+1);if(c){const u=l.formats(),d=this.quill.getFormat(t.index,1);n=Nt.AttributeMap.diff(u,d)||{},Object.keys(n).length>0&&(o=o.retain(c.length()-1).retain(1,n))}}this.quill.updateContents(o,N.sources.USER),this.quill.focus()}handleDeleteRange(t){hr({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const s=Object.keys(e.format).reduce((l,o)=>(this.quill.scroll.query(o,B.BLOCK)&&!Array.isArray(e.format[o])&&(l[o]=e.format[o]),l),{}),n=new I().retain(t.index).delete(t.length).insert(`
23
- `,s);this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(t.index+1,N.sources.SILENT),this.quill.focus()}}const vl={bindings:{bold:Kn("bold"),italic:Kn("italic"),underline:Kn("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(i,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",N.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(i,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",N.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(i,t){t.format.indent!=null?this.quill.format("indent","-1",N.sources.USER):t.format.list!=null&&this.quill.format("list",!1,N.sources.USER)}},"indent code-block":Mr(!0),"outdent code-block":Mr(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(i){this.quill.deleteText(i.index-1,1,N.sources.USER)}},tab:{key:"Tab",handler(i,t){if(t.format.table)return!0;this.quill.history.cutoff();const e=new I().retain(i.index).delete(i.length).insert(" ");return this.quill.updateContents(e,N.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(i.index+1,N.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,N.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(i,t){const e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(i.index,i.length,e,N.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(i){const[t,e]=this.quill.getLine(i.index),s={...t.formats(),list:"checked"},n=new I().retain(i.index).insert(`
24
- `,s).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(i.index+1,N.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(i,t){const[e,s]=this.quill.getLine(i.index),n=new I().retain(i.index).insert(`
25
- `,t.format).retain(e.length()-s-1).retain(1,{header:null});this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(i.index+1,N.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(i){const t=this.quill.getModule("table");if(t){const[e,s,n,l]=t.getTable(i),o=Nl(e,s,n,l);if(o==null)return;let c=e.offset();if(o<0){const u=new I().retain(c).insert(`
26
- `);this.quill.updateContents(u,N.sources.USER),this.quill.setSelection(i.index+1,i.length,N.sources.SILENT)}else if(o>0){c+=e.length();const u=new I().retain(c).insert(`
27
- `);this.quill.updateContents(u,N.sources.USER),this.quill.setSelection(c,N.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(i,t){const{event:e,line:s}=t,n=s.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(n-1,N.sources.USER):this.quill.setSelection(n+s.length(),N.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(i,t){if(this.quill.scroll.query("list")==null)return!0;const{length:e}=t.prefix,[s,n]=this.quill.getLine(i.index);if(n>e)return!0;let l;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(i.index," ",N.sources.USER),this.quill.history.cutoff();const o=new I().retain(i.index-n).delete(e+1).retain(s.length()-2-n).retain(1,{list:l});return this.quill.updateContents(o,N.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(i.index-e,N.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(i){const[t,e]=this.quill.getLine(i.index);let s=2,n=t;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,s-=1,s<=0){const l=new I().retain(i.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(l,N.sources.USER),this.quill.setSelection(i.index-1,N.sources.SILENT),!1}return!0}},"embed left":js("ArrowLeft",!1),"embed left shift":js("ArrowLeft",!0),"embed right":js("ArrowRight",!1),"embed right shift":js("ArrowRight",!0),"table down":Dr(!1),"table up":Dr(!0)}};Gs.DEFAULTS=vl;function Mr(i){return{key:"Tab",shiftKey:!i,format:{"code-block":!0},handler(t,e){let{event:s}=e;const n=this.quill.scroll.query("code-block"),{TAB:l}=n;if(t.length===0&&!s.shiftKey){this.quill.insertText(t.index,l,N.sources.USER),this.quill.setSelection(t.index+l.length,N.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:c,length:u}=t;o.forEach((d,b)=>{i?(d.insertAt(0,l),b===0?c+=l.length:u+=l.length):d.domNode.textContent.startsWith(l)&&(d.deleteAt(0,l.length),b===0?c-=l.length:u-=l.length)}),this.quill.update(N.sources.USER),this.quill.setSelection(c,u,N.sources.SILENT)}}}function js(i,t){return{key:i,shiftKey:t,altKey:null,[i==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(s){let{index:n}=s;i==="ArrowRight"&&(n+=s.length+1);const[l]=this.quill.getLeaf(n);return l instanceof Lt?(i==="ArrowLeft"?t?this.quill.setSelection(s.index-1,s.length+1,N.sources.USER):this.quill.setSelection(s.index-1,N.sources.USER):t?this.quill.setSelection(s.index,s.length+1,N.sources.USER):this.quill.setSelection(s.index+s.length+1,N.sources.USER),!1):!0}}}function Kn(i){return{key:i[0],shortKey:!0,handler(t,e){this.quill.format(i,!e.format[i],N.sources.USER)}}}function Dr(i){return{key:i?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){const s=i?"prev":"next",n=e.line,l=n.parent[s];if(l!=null){if(l.statics.blotName==="table-row"){let o=l.children.head,c=n;for(;c.prev!=null;)c=c.prev,o=o.next;const u=o.offset(this.quill.scroll)+Math.min(e.offset,o.length()-1);this.quill.setSelection(u,0,N.sources.USER)}}else{const o=n.table()[s];o!=null&&(i?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,N.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,N.sources.USER))}return!1}}}function El(i){if(typeof i=="string"||typeof i=="number")i={key:i};else if(typeof i=="object")i=Re.cloneDeep(i);else return null;return i.shortKey&&(i[yl]=i.shortKey,delete i.shortKey),i}function hr(i){let{quill:t,range:e}=i;const s=t.getLines(e);let n={};if(s.length>1){const l=s[0].formats(),o=s[s.length-1].formats();n=Nt.AttributeMap.diff(o,l)||{}}t.deleteText(e,N.sources.USER),Object.keys(n).length>0&&t.formatLine(e.index,1,n,N.sources.USER),t.setSelection(e.index,N.sources.SILENT)}function Nl(i,t,e,s){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?s===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const Al=/font-weight:\s*normal/,wl=["P","OL","UL"],Ur=i=>i&&wl.includes(i.tagName),xl=i=>{Array.from(i.querySelectorAll("br")).filter(t=>Ur(t.previousElementSibling)&&Ur(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},Tl=i=>{Array.from(i.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(Al)).forEach(t=>{const e=i.createDocumentFragment();e.append(...t.childNodes),t.parentNode?.replaceChild(e,t)})};function Ll(i){i.querySelector('[id^="docs-internal-guid-"]')&&(Tl(i),xl(i))}const ql=/\bmso-list:[^;]*ignore/i,Sl=/\bmso-list:[^;]*\bl(\d+)/i,kl=/\bmso-list:[^;]*\blevel(\d+)/i,Cl=(i,t)=>{const e=i.getAttribute("style"),s=e?.match(Sl);if(!s)return null;const n=Number(s[1]),l=e?.match(kl),o=l?Number(l[1]):1,c=new RegExp(`@list l${n}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),u=t.match(c),d=u&&u[1]==="bullet"?"bullet":"ordered";return{id:n,indent:o,type:d,element:i}},Ol=i=>{const t=Array.from(i.querySelectorAll("[style*=mso-list]")),e=[],s=[];t.forEach(o=>{(o.getAttribute("style")||"").match(ql)?e.push(o):s.push(o)}),e.forEach(o=>o.parentNode?.removeChild(o));const n=i.documentElement.innerHTML,l=s.map(o=>Cl(o,n)).filter(o=>o);for(;l.length;){const o=[];let c=l.shift();for(;c;)o.push(c),c=l.length&&l[0]?.element===c.element.nextElementSibling&&l[0].id===c.id?l.shift():null;const u=document.createElement("ul");o.forEach(v=>{const g=document.createElement("li");g.setAttribute("data-list",v.type),v.indent>1&&g.setAttribute("class",`ql-indent-${v.indent-1}`),g.innerHTML=v.element.innerHTML,u.appendChild(g)});const d=o[0]?.element,{parentNode:b}=d??{};d&&b?.replaceChild(u,d),o.slice(1).forEach(v=>{let{element:g}=v;b?.removeChild(g)})}};function _l(i){i.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&Ol(i)}const Il=[_l,Ll],Rl=i=>{i.documentElement&&Il.forEach(t=>{t(i)})},Bl=Jt("quill:clipboard"),Ml=[[Node.TEXT_NODE,Wl],[Node.TEXT_NODE,Pr],["br",Fl],[Node.ELEMENT_NODE,Pr],[Node.ELEMENT_NODE,Hl],[Node.ELEMENT_NODE,Pl],[Node.ELEMENT_NODE,Gl],["li",Vl],["ol, ul",Kl],["pre",$l],["tr",Zl],["b",Gn("bold")],["i",Gn("italic")],["strike",Gn("strike")],["style",zl]],Dl=[dl,ui].reduce((i,t)=>(i[t.keyName]=t,i),{}),jr=[ai,ar,or,fi,pi,bi].reduce((i,t)=>(i[t.keyName]=t,i),{});class Ul extends Ht{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",s=>this.onCaptureCopy(s,!1)),this.quill.root.addEventListener("cut",s=>this.onCaptureCopy(s,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],Ml.concat(this.options.matchers??[]).forEach(s=>{let[n,l]=s;this.addMatcher(n,l)})}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:s}=t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[At.blotName])return new I().insert(s||"",{[At.blotName]:n[At.blotName]});if(!e)return new I().insert(s||"",n);const l=this.convertHTML(e);return cs(l,`
28
- `)&&(l.ops[l.ops.length-1].attributes==null||n.table)?l.compose(new I().retain(l.length()-1).delete(1)):l}normalizeHTML(t){Rl(t)}convertHTML(t){const e=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(e);const s=e.body,n=new WeakMap,[l,o]=this.prepareMatching(s,n);return fr(this.quill.scroll,s,l,o,n)}dangerouslyPasteHTML(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.sources.API;if(typeof t=="string"){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,N.sources.SILENT)}else{const n=this.convert({html:e,text:""});this.quill.updateContents(new I().retain(t).concat(n),s),this.quill.setSelection(t+n.length(),N.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[s]=this.quill.selection.getRange();if(s==null)return;const{html:n,text:l}=this.onCopy(s,e);t.clipboardData?.setData("text/plain",l),t.clipboardData?.setData("text/html",n),e&&hr({range:s,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(e=>e[0]!=="#").join(`
29
- `)}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(e==null)return;const s=t.clipboardData?.getData("text/html");let n=t.clipboardData?.getData("text/plain");if(!s&&!n){const o=t.clipboardData?.getData("text/uri-list");o&&(n=this.normalizeURIList(o))}const l=Array.from(t.clipboardData?.files||[]);if(!s&&l.length>0){this.quill.uploader.upload(e,l);return}if(s&&l.length>0){const o=new DOMParser().parseFromString(s,"text/html");if(o.body.childElementCount===1&&o.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(e,l);return}}this.onPaste(e,{html:s,text:n})}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:s,html:n}=e;const l=this.quill.getFormat(t.index),o=this.convert({text:s,html:n},l);Bl.log("onPaste",o,{text:s,html:n});const c=new I().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(c,N.sources.USER),this.quill.setSelection(c.length()-t.length,N.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const s=[],n=[];return this.matchers.forEach(l=>{const[o,c]=l;switch(o){case Node.TEXT_NODE:n.push(c);break;case Node.ELEMENT_NODE:s.push(c);break;default:Array.from(t.querySelectorAll(o)).forEach(u=>{e.has(u)?e.get(u)?.push(c):e.set(u,[c])});break}}),[s,n]}}function be(i,t,e,s){return s.query(t)?i.reduce((n,l)=>{if(!l.insert)return n;if(l.attributes&&l.attributes[t])return n.push(l);const o=e?{[t]:e}:{};return n.insert(l.insert,{...o,...l.attributes})},new I):i}function cs(i,t){let e="";for(let s=i.ops.length-1;s>=0&&e.length<t.length;--s){const n=i.ops[s];if(typeof n.insert!="string")break;e=n.insert+e}return e.slice(-1*t.length)===t}function ne(i,t){if(!(i instanceof Element))return!1;const e=t.query(i);return e&&e.prototype instanceof Lt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(i.tagName.toLowerCase())}function jl(i,t){return i.previousElementSibling&&i.nextElementSibling&&!ne(i.previousElementSibling,t)&&!ne(i.nextElementSibling,t)}const Ps=new WeakMap;function yi(i){return i==null?!1:(Ps.has(i)||(i.tagName==="PRE"?Ps.set(i,!0):Ps.set(i,yi(i.parentNode))),Ps.get(i))}function fr(i,t,e,s,n){return t.nodeType===t.TEXT_NODE?s.reduce((l,o)=>o(t,l,i),new I):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((l,o)=>{let c=fr(i,o,e,s,n);return o.nodeType===t.ELEMENT_NODE&&(c=e.reduce((u,d)=>d(o,u,i),c),c=(n.get(o)||[]).reduce((u,d)=>d(o,u,i),c)),l.concat(c)},new I):new I}function Gn(i){return(t,e,s)=>be(e,i,!0,s)}function Pl(i,t,e){const s=Kt.keys(i),n=jt.keys(i),l=le.keys(i),o={};return s.concat(n).concat(l).forEach(c=>{let u=e.query(c,B.ATTRIBUTE);u!=null&&(o[u.attrName]=u.value(i),o[u.attrName])||(u=Dl[c],u!=null&&(u.attrName===c||u.keyName===c)&&(o[u.attrName]=u.value(i)||void 0),u=jr[c],u!=null&&(u.attrName===c||u.keyName===c)&&(u=jr[c],o[u.attrName]=u.value(i)||void 0))}),Object.entries(o).reduce((c,u)=>{let[d,b]=u;return be(c,d,b,e)},t)}function Hl(i,t,e){const s=e.query(i);if(s==null)return t;if(s.prototype instanceof Lt){const n={},l=s.value(i);if(l!=null)return n[s.blotName]=l,new I().insert(n,s.formats(i,e))}else if(s.prototype instanceof ls&&!cs(t,`
30
- `)&&t.insert(`
31
- `),"blotName"in s&&"formats"in s&&typeof s.formats=="function")return be(t,s.blotName,s.formats(i,e),e);return t}function Fl(i,t){return cs(t,`
32
- `)||t.insert(`
33
- `),t}function $l(i,t,e){const s=e.query("code-block"),n=s&&"formats"in s&&typeof s.formats=="function"?s.formats(i,e):!0;return be(t,"code-block",n,e)}function zl(){return new I}function Vl(i,t,e){const s=e.query(i);if(s==null||s.blotName!=="list"||!cs(t,`
34
- `))return t;let n=-1,l=i.parentNode;for(;l!=null;)["OL","UL"].includes(l.tagName)&&(n+=1),l=l.parentNode;return n<=0?t:t.reduce((o,c)=>c.insert?c.attributes&&typeof c.attributes.indent=="number"?o.push(c):o.insert(c.insert,{indent:n,...c.attributes||{}}):o,new I)}function Kl(i,t,e){const s=i;let n=s.tagName==="OL"?"ordered":"bullet";const l=s.getAttribute("data-checked");return l&&(n=l==="true"?"checked":"unchecked"),be(t,"list",n,e)}function Pr(i,t,e){if(!cs(t,`
35
- `)){if(ne(i,e)&&(i.childNodes.length>0||i instanceof HTMLParagraphElement))return t.insert(`
36
- `);if(t.length()>0&&i.nextSibling){let s=i.nextSibling;for(;s!=null;){if(ne(s,e))return t.insert(`
37
- `);const n=e.query(s);if(n&&n.prototype instanceof Ct)return t.insert(`
38
- `);s=s.firstChild}}}return t}function Gl(i,t,e){const s={},n=i.style||{};return n.fontStyle==="italic"&&(s.italic=!0),n.textDecoration==="underline"&&(s.underline=!0),n.textDecoration==="line-through"&&(s.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(s.bold=!0),t=Object.entries(s).reduce((l,o)=>{let[c,u]=o;return be(l,c,u,e)},t),parseFloat(n.textIndent||0)>0?new I().insert(" ").concat(t):t}function Zl(i,t,e){const s=i.parentElement?.tagName==="TABLE"?i.parentElement:i.parentElement?.parentElement;if(s!=null){const l=Array.from(s.querySelectorAll("tr")).indexOf(i)+1;return be(t,"table",l,e)}return t}function Wl(i,t,e){let s=i.data;if(i.parentElement?.tagName==="O:P")return t.insert(s.trim());if(!yi(i)){if(s.trim().length===0&&s.includes(`
39
- `)&&!jl(i,e))return t;s=s.replace(/[^\S\u00a0]/g," "),s=s.replace(/ {2,}/g," "),(i.previousSibling==null&&i.parentElement!=null&&ne(i.parentElement,e)||i.previousSibling instanceof Element&&ne(i.previousSibling,e))&&(s=s.replace(/^ /,"")),(i.nextSibling==null&&i.parentElement!=null&&ne(i.parentElement,e)||i.nextSibling instanceof Element&&ne(i.nextSibling,e))&&(s=s.replace(/ $/,"")),s=s.replaceAll(" "," ")}return t.insert(s)}class Xl extends Ht{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on(N.events.EDITOR_CHANGE,(s,n,l,o)=>{s===N.events.SELECTION_CHANGE?n&&o!==N.sources.SILENT&&(this.currentRange=n):s===N.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||o===N.sources.USER?this.record(n,l):this.transform(n)),this.currentRange=er(this.currentRange,n))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(t,e){if(this.stack[t].length===0)return;const s=this.stack[t].pop();if(!s)return;const n=this.quill.getContents(),l=s.delta.invert(n);this.stack[e].push({delta:l,range:er(s.range,l)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,N.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(t.ops.length===0)return;this.stack.redo=[];let s=t.invert(e),n=this.currentRange;const l=Date.now();if(this.lastRecorded+this.options.delay>l&&this.stack.undo.length>0){const o=this.stack.undo.pop();o&&(s=s.compose(o.delta),n=o.range)}else this.lastRecorded=l;s.length()!==0&&(this.stack.undo.push({delta:s,range:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){Hr(this.stack.undo,t),Hr(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,N.sources.USER);else{const e=Ql(this.quill.scroll,t.delta);this.quill.setSelection(e,N.sources.USER)}}}function Hr(i,t){let e=t;for(let s=i.length-1;s>=0;s-=1){const n=i[s];i[s]={delta:e.transform(n.delta,!0),range:n.range&&er(n.range,e)},e=n.delta.transform(e),i[s].delta.length()===0&&i.splice(s,1)}}function Yl(i,t){const e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(`
40
- `):e.attributes!=null?Object.keys(e.attributes).some(s=>i.query(s,B.BLOCK)!=null):!1}function Ql(i,t){const e=t.reduce((n,l)=>n+(l.delete||0),0);let s=t.length()-e;return Yl(i,t)&&(s-=1),s}function er(i,t){if(!i)return i;const e=t.transformPosition(i.index),s=t.transformPosition(i.index+i.length);return{index:e,length:s-e}}class vi extends Ht{constructor(t,e){super(t,e),t.root.addEventListener("drop",s=>{s.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(s.clientX,s.clientY);else if(document.caretPositionFromPoint){const o=document.caretPositionFromPoint(s.clientX,s.clientY);n=document.createRange(),n.setStart(o.offsetNode,o.offset),n.setEnd(o.offsetNode,o.offset)}const l=n&&t.selection.normalizeNative(n);if(l){const o=t.selection.normalizedToRange(l);s.dataTransfer?.files&&this.upload(o,s.dataTransfer.files)}})}upload(t,e){const s=[];Array.from(e).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&s.push(n)}),s.length>0&&this.options.handler.call(this,t,s)}}vi.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(i,t){if(!this.quill.scroll.query("image"))return;const e=t.map(s=>new Promise(n=>{const l=new FileReader;l.onload=()=>{n(l.result)},l.readAsDataURL(s)}));Promise.all(e).then(s=>{const n=s.reduce((l,o)=>l.insert({image:o}),new I().retain(i.index).delete(i.length));this.quill.updateContents(n,O.sources.USER),this.quill.setSelection(i.index+s.length,O.sources.SILENT)})}};const Jl=["insertText","insertReplacementText"];class to extends Ht{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",s=>{this.handleBeforeInput(s)}),/Android/i.test(navigator.userAgent)||t.on(N.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){hr({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){const s=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new I().retain(t.index).insert(e,s),N.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,N.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Jl.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;const s=eo(t);if(s==null)return;const n=this.quill.selection.normalizeNative(e),l=n?this.quill.selection.normalizedToRange(n):null;l&&this.replaceText(l,s)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}function eo(i){return typeof i.data=="string"?i.data:i.dataTransfer?.types.includes("text/plain")?i.dataTransfer.getData("text/plain"):null}const so=/Mac/i.test(navigator.platform),no=100,ro=i=>!!(i.key==="ArrowLeft"||i.key==="ArrowRight"||i.key==="ArrowUp"||i.key==="ArrowDown"||i.key==="Home"||so&&i.key==="a"&&i.ctrlKey===!0);class io extends Ht{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:s,event:n}=e;if(!(s instanceof Dt)||!s.uiNode)return!0;const l=getComputedStyle(s.domNode).direction==="rtl";return l&&n.key!=="ArrowRight"||!l&&n.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(n.shiftKey?1:0),N.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&ro(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+no,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(e.collapsed!==!0||e.startOffset!==0)return;const s=this.quill.scroll.find(e.startContainer);if(!(s instanceof Dt)||!s.uiNode)return;const n=document.createRange();n.setStartAfter(s.uiNode),n.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(n)}}N.register({"blots/block":dt,"blots/block/embed":Ct,"blots/break":Pt,"blots/container":pe,"blots/cursor":Bt,"blots/embed":ir,"blots/inline":Et,"blots/scroll":fl,"blots/text":Ut,"modules/clipboard":Ul,"modules/history":Xl,"modules/keyboard":Gs,"modules/uploader":vi,"modules/input":to,"modules/uiNode":io});class lo extends jt{add(t,e){let s=0;if(e==="+1"||e==="-1"){const n=this.value(t)||0;s=e==="+1"?n+1:n-1}else typeof e=="number"&&(s=e);return s===0?(this.remove(t),!0):super.add(t,s.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}const oo=new lo("indent","ql-indent",{scope:B.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class ao extends dt{static blotName="blockquote";static tagName="blockquote"}class co extends dt{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}class us extends pe{}us.blotName="list-container";us.tagName="OL";class hs extends dt{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){N.register(us)}constructor(t,e){super(t,e);const s=e.ownerDocument.createElement("span"),n=l=>{if(!t.isEnabled())return;const o=this.statics.formats(e,t);o==="checked"?(this.format("list","unchecked"),l.preventDefault()):o==="unchecked"&&(this.format("list","checked"),l.preventDefault())};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),this.attachUI(s)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}hs.blotName="list";hs.tagName="LI";us.allowedChildren=[hs];hs.requiredContainer=us;class dr extends Et{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}class uo extends dr{static blotName="italic";static tagName=["EM","I"]}class Fs extends Et{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return Ei(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t!==this.statics.blotName||!e?super.format(t,e):this.domNode.setAttribute("href",this.constructor.sanitize(e))}}function Ei(i,t){const e=document.createElement("a");e.href=i;const s=e.href.slice(0,e.href.indexOf(":"));return t.indexOf(s)>-1}class ho extends Et{static blotName="script";static tagName=["SUB","SUP"];static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}class fo extends dr{static blotName="strike";static tagName=["S","STRIKE"]}class go extends Et{static blotName="underline";static tagName="U"}class po extends ir{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const e=super.create(t);return typeof t=="string"&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}const Fr=["alt","height","width"];class mo extends Lt{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return Fr.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return Ei(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){Fr.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}const $r=["height","width"];class bo extends Ct{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return $r.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static sanitize(t){return Fs.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){$r.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}const rs=new jt("code-token","hljs",{scope:B.INLINE});class Qt extends Et{static formats(t,e){for(;t!=null&&t!==e.domNode;){if(t.classList&&t.classList.contains(At.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,s){super(t,e,s),rs.add(this.domNode,s)}format(t,e){t!==Qt.blotName?super.format(t,e):e?rs.add(this.domNode,e):(rs.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),rs.value(this.domNode)||this.unwrap()}}Qt.blotName="code-token";Qt.className="ql-token";class kt extends At{static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("data-language",t),e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-language",e):super.format(t,e)}replaceWith(t,e){return this.formatAt(0,this.length(),Qt.blotName,!1),super.replaceWith(t,e)}}class is extends me{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===kt.blotName&&(this.forceNext=!0,this.children.forEach(s=>{s.format(t,e)}))}formatAt(t,e,s,n){s===kt.blotName&&(this.forceNext=!0),super.formatAt(t,e,s,n)}highlight(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const n=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
41
- `)}
42
- `,l=kt.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){const o=this.children.reduce((u,d)=>u.concat(ii(d,!1)),new I),c=t(n,l);o.diff(c).reduce((u,d)=>{let{retain:b,attributes:v}=d;return b?(v&&Object.keys(v).forEach(g=>{[kt.blotName,Qt.blotName].includes(g)&&this.formatAt(u,b,g,v[g])}),u+b):u},0)}this.cachedText=n,this.forceNext=!1}}html(t,e){const[s]=this.children.find(t);return`<pre data-language="${s?kt.formats(s.domNode):"plain"}">
43
- ${Ks(this.code(t,e))}
44
- </pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const e=kt.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}is.allowedChildren=[kt];kt.requiredContainer=is;kt.allowedChildren=[Qt,Bt,Ut,Pt];const yo=(i,t,e)=>{if(typeof i.versionString=="string"){const s=i.versionString.split(".")[0];if(parseInt(s,10)>=11)return i.highlight(e,{language:t}).value}return i.highlight(t,e).value};class Ni extends Ht{static register(){N.register(Qt,!0),N.register(kt,!0),N.register(is,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((s,n)=>{let{key:l}=n;return s[l]=!0,s},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(N.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof is))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(s=>{let{key:n,label:l}=s;const o=e.ownerDocument.createElement("option");o.textContent=l,o.setAttribute("value",n),e.appendChild(o)}),e.addEventListener("change",()=>{t.format(kt.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=kt.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(N.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(N.sources.USER);const s=this.quill.getSelection();(t==null?this.quill.scroll.descendants(is):[t]).forEach(l=>{l.highlight(this.highlightBlot,e)}),this.quill.update(N.sources.SILENT),s!=null&&this.quill.setSelection(s,N.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return Ks(t).split(`
45
- `).reduce((n,l,o)=>(o!==0&&n.insert(`
46
- `,{[At.blotName]:e}),n.insert(l)),new I);const s=this.quill.root.ownerDocument.createElement("div");return s.classList.add(At.className),s.innerHTML=yo(this.options.hljs,e,t),fr(this.quill.scroll,s,[(n,l)=>{const o=rs.value(n);return o?l.compose(new I().retain(l.length(),{[Qt.blotName]:o})):l}],[(n,l)=>n.data.split(`
47
- `).reduce((o,c,u)=>(u!==0&&o.insert(`
48
- `,{[At.blotName]:e}),o.insert(c)),l)],new WeakMap)}}Ni.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class Mt extends dt{static blotName="table";static tagName="TD";static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",gr()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===Mt.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class ge extends pe{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),e=this.children.tail.formats(),s=this.next.children.head.formats(),n=this.next.children.tail.formats();return t.table===e.table&&t.table===s.table&&t.table===n.table}return!1}optimize(t){super.optimize(t),this.children.forEach(e=>{if(e.next==null)return;const s=e.formats(),n=e.next.formats();if(s.table!==n.table){const l=this.splitAfter(e);l&&l.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class re extends pe{static blotName="table-body";static tagName="TBODY"}class $s extends pe{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(ge),e=t.reduce((s,n)=>Math.max(n.children.length,s),0);t.forEach(s=>{new Array(e-s.children.length).fill(0).forEach(()=>{let n;s.children.head!=null&&(n=Mt.formats(s.children.head.domNode));const l=this.scroll.create(Mt.blotName,n);s.appendChild(l),l.optimize()})})}cells(t){return this.rows().map(e=>e.children.at(t))}deleteColumn(t){const[e]=this.descendant(re);e==null||e.children.head==null||e.children.forEach(s=>{const n=s.children.at(t);n?.remove()})}insertColumn(t){const[e]=this.descendant(re);e==null||e.children.head==null||e.children.forEach(s=>{const n=s.children.at(t),l=Mt.formats(s.children.head.domNode),o=this.scroll.create(Mt.blotName,l);s.insertBefore(o,n)})}insertRow(t){const[e]=this.descendant(re);if(e==null||e.children.head==null)return;const s=gr(),n=this.scroll.create(ge.blotName);e.children.head.children.forEach(()=>{const o=this.scroll.create(Mt.blotName,s);n.appendChild(o)});const l=e.children.at(t);e.insertBefore(n,l)}rows(){const t=this.children.head;return t==null?[]:t.children.map(e=>e)}}$s.allowedChildren=[re];re.requiredContainer=$s;re.allowedChildren=[ge];ge.requiredContainer=re;ge.allowedChildren=[Mt];Mt.requiredContainer=ge;function gr(){return`row-${Math.random().toString(36).slice(2,6)}`}class vo extends Ht{static register(){N.register(Mt),N.register(ge),N.register(re),N.register($s)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants($s).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(N.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(N.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const e=t.offset();t.remove(),this.quill.update(N.sources.USER),this.quill.setSelection(e,N.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[e,s]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==Mt.blotName)return[null,null,null,-1];const n=e.parent;return[n.parent.parent,n,e,s]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[s,n,l]=this.getTable(e);if(l==null)return;const o=l.cellOffset();s.insertColumn(o+t),this.quill.update(N.sources.USER);let c=n.rowOffset();t===0&&(c+=1),this.quill.setSelection(e.index+c,e.length,N.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[s,n,l]=this.getTable(e);if(l==null)return;const o=n.rowOffset();s.insertRow(o+t),this.quill.update(N.sources.USER),t>0?this.quill.setSelection(e,N.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,N.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const s=this.quill.getSelection();if(s==null)return;const n=new Array(t).fill(0).reduce(l=>{const o=new Array(e).fill(`
49
- `).join("");return l.insert(o,{table:gr()})},new I().retain(s.index));this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(s.index,N.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(N.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(N.events.TEXT_CHANGE,(s,n,l)=>{l===N.sources.USER&&this.balanceTables()}),!0):!1)})}}const zr=Jt("quill:toolbar");class pr extends Ht{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),Eo(s,this.options.container),t.container?.parentNode?.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){zr.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{const n=this.options.handlers?.[s];n&&this.addHandler(s,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(N.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find(n=>n.indexOf("ql-")===0);if(!e)return;if(e=e.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[e]==null&&this.quill.scroll.query(e)==null){zr.warn("ignoring attaching to nonexistent format",e,t);return}const s=t.tagName==="SELECT"?"change":"click";t.addEventListener(s,n=>{let l;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const c=t.options[t.selectedIndex];c.hasAttribute("selected")?l=!1:l=c.value||!1}else t.classList.contains("ql-active")?l=!1:l=t.value||!t.hasAttribute("value"),n.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[e]!=null)this.handlers[e].call(this,l);else if(this.quill.scroll.query(e).prototype instanceof Lt){if(l=prompt(`Enter ${e}`),!l)return;this.quill.updateContents(new I().retain(o.index).delete(o.length).insert({[e]:l}),N.sources.USER)}else this.quill.format(e,l,N.sources.USER);this.update(o)}),this.controls.push([e,t])}update(t){const e=t==null?{}:this.quill.getFormat(t);this.controls.forEach(s=>{const[n,l]=s;if(l.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(e[n]==null)o=l.querySelector("option[selected]");else if(!Array.isArray(e[n])){let c=e[n];typeof c=="string"&&(c=c.replace(/"/g,'\\"')),o=l.querySelector(`option[value="${c}"]`)}o==null?(l.value="",l.selectedIndex=-1):o.selected=!0}else if(t==null)l.classList.remove("ql-active"),l.setAttribute("aria-pressed","false");else if(l.hasAttribute("value")){const o=e[n],c=o===l.getAttribute("value")||o!=null&&o.toString()===l.getAttribute("value")||o==null&&!l.getAttribute("value");l.classList.toggle("ql-active",c),l.setAttribute("aria-pressed",c.toString())}else{const o=e[n]!=null;l.classList.toggle("ql-active",o),l.setAttribute("aria-pressed",o.toString())}})}}pr.DEFAULTS={};function Vr(i,t,e){const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${t}`),s.setAttribute("aria-pressed","false"),e!=null?(s.value=e,s.setAttribute("aria-label",`${t}: ${e}`)):s.setAttribute("aria-label",t),i.appendChild(s)}function Eo(i,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{const s=document.createElement("span");s.classList.add("ql-formats"),e.forEach(n=>{if(typeof n=="string")Vr(s,n);else{const l=Object.keys(n)[0],o=n[l];Array.isArray(o)?No(s,l,o):Vr(s,l,o)}}),i.appendChild(s)})}function No(i,t,e){const s=document.createElement("select");s.classList.add(`ql-${t}`),e.forEach(n=>{const l=document.createElement("option");n!==!1?l.setAttribute("value",String(n)):l.setAttribute("selected","selected"),s.appendChild(l)}),i.appendChild(s)}pr.DEFAULTS={container:null,handlers:{clean(){const i=this.quill.getSelection();if(i!=null)if(i.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,B.INLINE)!=null&&this.quill.format(e,!1,N.sources.USER)})}else this.quill.removeFormat(i.index,i.length,N.sources.USER)},direction(i){const{align:t}=this.quill.getFormat();i==="rtl"&&t==null?this.quill.format("align","right",N.sources.USER):!i&&t==="right"&&this.quill.format("align",!1,N.sources.USER),this.quill.format("direction",i,N.sources.USER)},indent(i){const t=this.quill.getSelection(),e=this.quill.getFormat(t),s=parseInt(e.indent||0,10);if(i==="+1"||i==="-1"){let n=i==="+1"?1:-1;e.direction==="rtl"&&(n*=-1),this.quill.format("indent",s+n,N.sources.USER)}},link(i){i===!0&&(i=prompt("Enter link URL:")),this.quill.format("link",i,N.sources.USER)},list(i){const t=this.quill.getSelection(),e=this.quill.getFormat(t);i==="check"?e.list==="checked"||e.list==="unchecked"?this.quill.format("list",!1,N.sources.USER):this.quill.format("list","unchecked",N.sources.USER):this.quill.format("list",i,N.sources.USER)}}};const Ao='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',wo='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',xo='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',To='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Lo='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',qo='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',So='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',ko='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',Kr='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Co='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',Oo='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',_o='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',Io='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',Ro='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',Bo='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Mo='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',Do='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',Uo='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',jo='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',Po='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',Ho='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Fo='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',$o='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',zo='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',Vo='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',Ko='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Go='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',Zo='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Wo='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',Xo='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Yo='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',Qo='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',Jo='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',as={align:{"":Ao,center:wo,right:xo,justify:To},background:Lo,blockquote:qo,bold:So,clean:ko,code:Kr,"code-block":Kr,color:Co,direction:{"":Oo,rtl:_o},formula:Io,header:{1:Ro,2:Bo,3:Mo,4:Do,5:Uo,6:jo},italic:Po,image:Ho,indent:{"+1":Fo,"-1":$o},link:zo,list:{bullet:Vo,check:Ko,ordered:Go},script:{sub:Zo,super:Wo},strike:Xo,table:Yo,underline:Qo,video:Jo},ta='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Gr=0;function Zr(i,t){i.setAttribute(t,`${i.getAttribute(t)!=="true"}`)}class Zs{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Zr(this.label,"aria-expanded"),Zr(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");const s=t.getAttribute("value");return s&&e.setAttribute("data-value",s),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",()=>{this.selectItem(e,!0)}),e.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(e,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break}}),e}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=ta,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${Gr}`,Gr+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(e=>{const s=this.buildItem(e);t.appendChild(s),e.selected===!0&&this.selectItem(s)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s=this.container.querySelector(".ql-selected");t!==s&&(s?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const s=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(s)}else this.selectItem(null);const e=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}class Ai extends Zs{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(s=>{s.classList.add("ql-primary")})}buildItem(t){const e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);const s=this.label.querySelector(".ql-color-label"),n=t&&t.getAttribute("data-value")||"";s&&(s.tagName==="line"?s.style.stroke=n:s.style.fill=n)}}class wi extends Zs{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(s=>{s.innerHTML=e[s.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const s=t||this.defaultItem;if(s!=null){if(this.label.innerHTML===s.innerHTML)return;this.label.innerHTML=s.innerHTML}}}const ea=i=>{const{overflowY:t}=getComputedStyle(i,null);return t!=="visible"&&t!=="clip"};class xi{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,ea(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const e=t.left+t.width/2-this.root.offsetWidth/2,s=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${s}px`,this.root.classList.remove("ql-flip");const n=this.boundsContainer.getBoundingClientRect(),l=this.root.getBoundingClientRect();let o=0;if(l.right>n.right&&(o=n.right-l.right,this.root.style.left=`${e+o}px`),l.left<n.left&&(o=n.left-l.left,this.root.style.left=`${e+o}px`),l.bottom>n.bottom){const c=l.bottom-l.top,u=t.bottom-t.top+c;this.root.style.top=`${s-u}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const sa=[!1,"center","right","justify"],na=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],ra=[!1,"serif","monospace"],ia=["1","2","3",!1],la=["small",!1,"large","huge"];class fs extends Ue{constructor(t,e){super(t,e);const s=n=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",s);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(l=>{l.container.contains(n.target)||l.close()})};t.emitter.listenDOM("click",document.body,s)}addModule(t){const e=super.addModule(t);return t==="toolbar"&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach(s=>{(s.getAttribute("class")||"").split(/\s+/).forEach(l=>{if(l.startsWith("ql-")&&(l=l.slice(3),e[l]!=null))if(l==="direction")s.innerHTML=e[l][""]+e[l].rtl;else if(typeof e[l]=="string")s.innerHTML=e[l];else{const o=s.value||"";o!=null&&e[l][o]&&(s.innerHTML=e[l][o])}})})}buildPickers(t,e){this.pickers=Array.from(t).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&es(n,sa),typeof e.align=="object"))return new wi(n,e.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){const l=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&es(n,na,l==="background"?"#ffffff":"#000000"),new Ai(n,e[l])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?es(n,ra):n.classList.contains("ql-header")?es(n,ia):n.classList.contains("ql-size")&&es(n,la)),new Zs(n)});const s=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(O.events.EDITOR_CHANGE,s)}}fs.DEFAULTS=ct.merge({},Ue.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let i=this.container.querySelector("input.ql-image[type=file]");i==null&&(i=document.createElement("input"),i.setAttribute("type","file"),i.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),i.classList.add("ql-image"),i.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,i.files),i.value=""}),this.container.appendChild(i)),i.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Ti extends xi{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;e!=null?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const s=this.quill.getBounds(this.quill.selection.savedRange);s!=null&&this.position(s),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,O.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,O.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=oa(t);case"formula":{if(!t)break;const e=this.quill.getSelection(!0);if(e!=null){const s=e.index+e.length;this.quill.insertEmbed(s,this.root.getAttribute("data-mode"),t,O.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(s+1," ",O.sources.USER),this.quill.setSelection(s+2,O.sources.USER)}break}}this.textbox.value="",this.hide()}}function oa(i){let t=i.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||i.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=i.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:i}function es(i,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(s=>{const n=document.createElement("option");s===e?n.setAttribute("selected","selected"):n.setAttribute("value",String(s)),i.appendChild(n)})}const aa=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class ca extends Ti{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,e){super(t,e),this.quill.on(O.events.EDITOR_CHANGE,(s,n,l,o)=>{if(s===O.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&o===O.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const c=this.quill.getLines(n.index,n.length);if(c.length===1){const u=this.quill.getBounds(n);u!=null&&this.position(u)}else{const u=c[c.length-1],d=this.quill.getIndex(u),b=Math.min(u.length()-1,n.index+n.length-d),v=this.quill.getBounds(new ie(d,b));v!=null&&this.position(v)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(O.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const e=this.quill.getBounds(t);e!=null&&this.position(e)}},1)})}cancel(){this.show()}position(t){const e=super.position(t),s=this.root.querySelector(".ql-tooltip-arrow");return s.style.marginLeft="",e!==0&&(s.style.marginLeft=`${-1*e-s.offsetWidth/2}px`),e}}class Li extends fs{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=aa),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new ca(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),as),this.buildPickers(t.container.querySelectorAll("select"),as))}}Li.DEFAULTS=ct.merge({},fs.DEFAULTS,{modules:{toolbar:{handlers:{link(i){i?this.quill.theme.tooltip.edit():this.quill.format("link",!1,N.sources.USER)}}}}});const ua=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class ha extends Ti{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,O.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(O.events.SELECTION_CHANGE,(t,e,s)=>{if(t!=null){if(t.length===0&&s===O.sources.USER){const[n,l]=this.quill.scroll.descendant(Fs,t.index);if(n!=null){this.linkRange=new ie(t.index-l,n.length());const o=Fs.formats(n.domNode);this.preview.textContent=o,this.preview.setAttribute("href",o),this.show();const c=this.quill.getBounds(this.linkRange);c!=null&&this.position(c);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class qi extends fs{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=ua),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),as),this.buildPickers(t.container.querySelectorAll("select"),as),this.tooltip=new ha(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(e,s)=>{t.handlers.link.call(t,!s.format.link)}))}}qi.DEFAULTS=ct.merge({},fs.DEFAULTS,{modules:{toolbar:{handlers:{link(i){if(i){const t=this.quill.getSelection();if(t==null||t.length===0)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&e.indexOf("mailto:")!==0&&(e=`mailto:${e}`);const{tooltip:s}=this.quill.theme;s.edit("link",e)}else this.quill.format("link",!1,N.sources.USER)}}}}});N.register({"attributors/attribute/direction":ui,"attributors/class/align":oi,"attributors/class/background":pl,"attributors/class/color":gl,"attributors/class/direction":hi,"attributors/class/font":gi,"attributors/class/size":mi,"attributors/style/align":ai,"attributors/style/background":ar,"attributors/style/color":or,"attributors/style/direction":fi,"attributors/style/font":pi,"attributors/style/size":bi},!0);N.register({"formats/align":oi,"formats/direction":hi,"formats/indent":oo,"formats/background":ar,"formats/color":or,"formats/font":gi,"formats/size":mi,"formats/blockquote":ao,"formats/code-block":At,"formats/header":co,"formats/list":hs,"formats/bold":dr,"formats/code":cr,"formats/italic":uo,"formats/link":Fs,"formats/script":ho,"formats/strike":fo,"formats/underline":go,"formats/formula":po,"formats/image":mo,"formats/video":bo,"modules/syntax":Ni,"modules/table":vo,"modules/toolbar":pr,"themes/bubble":Li,"themes/snow":qi,"ui/icons":as,"ui/picker":Zs,"ui/icon-picker":wi,"ui/color-picker":Ai,"ui/tooltip":xi},!0);exports.AttributeMap=Nt.AttributeMap;exports.Delta=I;exports.Module=Ht;exports.Op=Nt.Op;exports.OpIterator=Nt.OpIterator;exports.Parchment=ei;exports.Range=ie;exports.default=N;
@@ -1,5 +0,0 @@
1
- import { R as r, g as d } from "./mermaid-parser.core-Kh2GaZjn.js";
2
- export {
3
- r as RadarModule,
4
- d as createRadarServices
5
- };