legalesign-document-viewer 0.3.0 → 0.3.1

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 (283) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/{ls-document-options_44.cjs.entry.js → ls-document-options_39.cjs.entry.js} +403 -364
  3. package/dist/cjs/ls-document-options_39.cjs.entry.js.map +1 -0
  4. package/dist/cjs/ls-document-viewer.cjs.js +1 -1
  5. package/dist/cjs/ls-field-properties-dropdown.cjs.entry.js +1 -1
  6. package/dist/cjs/ls-formfield.cjs.entry.js +64 -0
  7. package/dist/cjs/ls-formfield.cjs.entry.js.map +1 -0
  8. package/dist/cjs/ls-formfield.entry.cjs.js.map +1 -0
  9. package/dist/cjs/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.cjs.js.map +1 -0
  10. package/dist/cjs/ls-number-input_5.cjs.entry.js +204 -0
  11. package/dist/cjs/ls-number-input_5.cjs.entry.js.map +1 -0
  12. package/dist/cjs/ls-tooltip.cjs.entry.js +1575 -0
  13. package/dist/cjs/ls-tooltip.cjs.entry.js.map +1 -0
  14. package/dist/cjs/ls-tooltip.entry.cjs.js.map +1 -0
  15. package/dist/collection/collection-manifest.json +2 -0
  16. package/dist/collection/components/ls-document-options/ls-document-options.css +34 -0
  17. package/dist/collection/components/ls-document-options/ls-document-options.js +25 -1
  18. package/dist/collection/components/ls-document-options/ls-document-options.js.map +1 -1
  19. package/dist/collection/components/ls-document-viewer/adapter/LsDocumentAdapter.js +2 -1
  20. package/dist/collection/components/ls-document-viewer/adapter/LsDocumentAdapter.js.map +1 -1
  21. package/dist/collection/components/ls-document-viewer/editorCalculator.js +4 -6
  22. package/dist/collection/components/ls-document-viewer/editorCalculator.js.map +1 -1
  23. package/dist/collection/components/ls-document-viewer/keyHandlers.js +1 -1
  24. package/dist/collection/components/ls-document-viewer/keyHandlers.js.map +1 -1
  25. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js +77 -13
  26. package/dist/collection/components/ls-document-viewer/ls-document-viewer.js.map +1 -1
  27. package/dist/collection/components/ls-document-viewer/mouseHandlers.js +41 -7
  28. package/dist/collection/components/ls-document-viewer/mouseHandlers.js.map +1 -1
  29. package/dist/collection/components/ls-editor-table/ls-editor-table.js +1 -1
  30. package/dist/collection/components/ls-feature-column/ls-feature-column.js +4 -4
  31. package/dist/collection/components/ls-field-alignment/ls-field-alignment.js +2 -2
  32. package/dist/collection/components/ls-field-content/ls-field-content.js +2 -2
  33. package/dist/collection/components/ls-field-dimensions/ls-field-dimensions.js +1 -1
  34. package/dist/collection/components/ls-field-distribute/ls-field-distribute.js +61 -11
  35. package/dist/collection/components/ls-field-distribute/ls-field-distribute.js.map +1 -1
  36. package/dist/collection/components/ls-field-footer/ls-field-footer.js +31 -3
  37. package/dist/collection/components/ls-field-footer/ls-field-footer.js.map +1 -1
  38. package/dist/collection/components/ls-field-format/ls-field-format.js +27 -10
  39. package/dist/collection/components/ls-field-format/ls-field-format.js.map +1 -1
  40. package/dist/collection/components/ls-field-placement/ls-field-placement.js +1 -1
  41. package/dist/collection/components/ls-field-properties/ls-field-properties.js +1 -1
  42. package/dist/collection/components/ls-field-properties-advanced/ls-field-properties-advanced.js +1 -1
  43. package/dist/collection/components/ls-field-properties-autosign/ls-field-properties-autosign.js +1 -1
  44. package/dist/collection/components/ls-field-properties-container/ls-field-properties-container.js +1 -1
  45. package/dist/collection/components/ls-field-properties-date/ls-field-properties-date.js +1 -1
  46. package/dist/collection/components/ls-field-properties-dropdown/ls-field-properties-dropdown.js +1 -1
  47. package/dist/collection/components/ls-field-properties-email/ls-field-properties-email.js +1 -1
  48. package/dist/collection/components/ls-field-properties-file/ls-field-properties-file.js +1 -1
  49. package/dist/collection/components/ls-field-properties-general/ls-field-properties-general.js +1 -1
  50. package/dist/collection/components/ls-field-properties-image/ls-field-properties-image.js +1 -1
  51. package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js +75 -4
  52. package/dist/collection/components/ls-field-properties-multiple/ls-field-properties-multiple.js.map +1 -1
  53. package/dist/collection/components/ls-field-properties-number/ls-field-properties-number.js +1 -1
  54. package/dist/collection/components/ls-field-properties-signature/ls-field-properties-signature.js +1 -1
  55. package/dist/collection/components/ls-field-properties-text/ls-field-properties-text.js +1 -1
  56. package/dist/collection/components/ls-field-size/ls-field-size.js +1 -1
  57. package/dist/collection/components/ls-field-type-display/ls-field-type-display.js +3 -3
  58. package/dist/collection/components/ls-formfield/inputs/ls-number-input/ls-number-input.js +1 -1
  59. package/dist/collection/components/ls-formfield/inputs/ls-radio-input/ls-radio-input.js +1 -1
  60. package/dist/collection/components/ls-formfield/inputs/ls-select-input/ls-select-input.js +1 -1
  61. package/dist/collection/components/ls-formfield/inputs/ls-text-input/ls-text-input.js +2 -2
  62. package/dist/collection/components/ls-formfield/inputs/ls-textarea-input/ls-textarea-input.js +1 -1
  63. package/dist/collection/components/ls-formfield/ls-formfield.js +2 -2
  64. package/dist/collection/components/ls-icon/ls-icon.js +1 -1
  65. package/dist/collection/components/ls-input-wrapper/ls-input-wrapper.js +1 -1
  66. package/dist/collection/components/ls-page-loader/ls-page-loader.css +20 -0
  67. package/dist/collection/components/ls-page-loader/ls-page-loader.js +88 -0
  68. package/dist/collection/components/ls-page-loader/ls-page-loader.js.map +1 -0
  69. package/dist/collection/components/ls-participant-card/ls-participant-card.js +8 -8
  70. package/dist/collection/components/ls-participant-manager/ls-participant-manager.js +2 -2
  71. package/dist/collection/components/ls-participant-select/ls-participant-select.js +9 -9
  72. package/dist/collection/components/ls-props-section/ls-props-section.js +1 -1
  73. package/dist/collection/components/ls-statusbar/ls-statusbar.js +3 -3
  74. package/dist/collection/components/ls-statusbar/ls-statusbar.js.map +1 -1
  75. package/dist/collection/components/ls-toggle/ls-toggle.css +33 -12
  76. package/dist/collection/components/ls-toggle/ls-toggle.js +22 -2
  77. package/dist/collection/components/ls-toggle/ls-toggle.js.map +1 -1
  78. package/dist/collection/components/ls-toolbar/ls-toolbar.js +1 -2
  79. package/dist/collection/components/ls-toolbar/ls-toolbar.js.map +1 -1
  80. package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.css +10 -2
  81. package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.js +60 -1
  82. package/dist/collection/components/ls-toolbox-field/ls-toolbox-field.js.map +1 -1
  83. package/dist/collection/components/ls-tooltip/ls-tooltip.css +9 -0
  84. package/dist/collection/components/ls-tooltip/ls-tooltip.js +105 -0
  85. package/dist/collection/components/ls-tooltip/ls-tooltip.js.map +1 -0
  86. package/dist/collection/components/ls-validation-tag/ls-validation-tag.js +1 -1
  87. package/dist/collection/types/LSMutateEvent.js.map +1 -1
  88. package/dist/components/ls-document-options.js +1 -1
  89. package/dist/components/ls-document-viewer.js +175 -129
  90. package/dist/components/ls-document-viewer.js.map +1 -1
  91. package/dist/components/ls-editor-field.js +1 -1
  92. package/dist/components/ls-editor-table.js +1 -1
  93. package/dist/components/ls-feature-column.js +1 -1
  94. package/dist/components/ls-field-alignment.js +1 -1
  95. package/dist/components/ls-field-content.js +1 -1
  96. package/dist/components/ls-field-dimensions.js +1 -1
  97. package/dist/components/ls-field-distribute.js +1 -1
  98. package/dist/components/ls-field-footer.js +1 -1
  99. package/dist/components/ls-field-format.js +1 -1
  100. package/dist/components/ls-field-placement.js +1 -1
  101. package/dist/components/ls-field-properties-advanced.js +1 -1
  102. package/dist/components/ls-field-properties-autosign.js +1 -1
  103. package/dist/components/ls-field-properties-container.js +1 -1
  104. package/dist/components/ls-field-properties-date.js +1 -1
  105. package/dist/components/ls-field-properties-dropdown.js +12 -12
  106. package/dist/components/ls-field-properties-email.js +1 -1
  107. package/dist/components/ls-field-properties-file.js +1 -1
  108. package/dist/components/ls-field-properties-general.js +1 -1
  109. package/dist/components/ls-field-properties-image.js +1 -1
  110. package/dist/components/ls-field-properties-multiple.js +1 -1
  111. package/dist/components/ls-field-properties-number.js +1 -1
  112. package/dist/components/ls-field-properties-signature.js +1 -1
  113. package/dist/components/ls-field-properties-text.js +1 -1
  114. package/dist/components/ls-field-properties.js +1 -1
  115. package/dist/components/ls-field-size.js +1 -1
  116. package/dist/components/ls-field-type-display.js +1 -1
  117. package/dist/components/ls-formfield.js +135 -1
  118. package/dist/components/ls-formfield.js.map +1 -1
  119. package/dist/components/ls-icon.js +1 -1
  120. package/dist/components/ls-input-wrapper.js +1 -1
  121. package/dist/components/ls-number-input.js +1 -1
  122. package/dist/components/ls-page-loader.d.ts +11 -0
  123. package/dist/components/ls-page-loader.js +9 -0
  124. package/dist/components/ls-page-loader.js.map +1 -0
  125. package/dist/components/ls-participant-card.js +1 -1
  126. package/dist/components/ls-participant-manager.js +1 -1
  127. package/dist/components/ls-participant-select.js +1 -1
  128. package/dist/components/ls-props-section.js +1 -1
  129. package/dist/components/ls-radio-input.js +1 -1
  130. package/dist/components/ls-select-input.js +1 -1
  131. package/dist/components/ls-statusbar.js +1 -1
  132. package/dist/components/ls-text-input.js +1 -1
  133. package/dist/components/ls-textarea-input.js +1 -1
  134. package/dist/components/ls-toggle.js +1 -1
  135. package/dist/components/ls-toolbar.js +1 -1
  136. package/dist/components/ls-toolbox-field.js +1 -1
  137. package/dist/components/ls-tooltip.d.ts +11 -0
  138. package/dist/components/ls-tooltip.js +1595 -0
  139. package/dist/components/ls-tooltip.js.map +1 -0
  140. package/dist/components/ls-validation-tag.js +1 -1
  141. package/dist/components/{p-EJeMGdQu.js → p-52yHrt6C.js} +6 -6
  142. package/dist/components/p-52yHrt6C.js.map +1 -0
  143. package/dist/components/{p-C2AvJYU2.js → p-7V9_3fXA.js} +7 -7
  144. package/dist/components/{p-C2AvJYU2.js.map → p-7V9_3fXA.js.map} +1 -1
  145. package/dist/components/{p-DNYMtQaJ.js → p-B6u7yh6L.js} +14 -14
  146. package/dist/components/{p-DNYMtQaJ.js.map → p-B6u7yh6L.js.map} +1 -1
  147. package/dist/components/{p-CFM4LGyt.js → p-BN0a1PPS.js} +14 -14
  148. package/dist/components/{p-CFM4LGyt.js.map → p-BN0a1PPS.js.map} +1 -1
  149. package/dist/components/{p-CXf5rRrm.js → p-BPayWH9u.js} +3 -3
  150. package/dist/components/{p-CXf5rRrm.js.map → p-BPayWH9u.js.map} +1 -1
  151. package/dist/components/{p-CYXQyrVE.js → p-BaMR8ksy.js} +3 -3
  152. package/dist/components/{p-CYXQyrVE.js.map → p-BaMR8ksy.js.map} +1 -1
  153. package/dist/components/{p-BOES-kpO.js → p-BaS7GLxH.js} +14 -14
  154. package/dist/components/{p-BOES-kpO.js.map → p-BaS7GLxH.js.map} +1 -1
  155. package/dist/components/{p-5D8PsBm3.js → p-Bg6wsr_z.js} +4 -4
  156. package/dist/components/{p-5D8PsBm3.js.map → p-Bg6wsr_z.js.map} +1 -1
  157. package/dist/components/{p-BdHdKShC.js → p-BoIq4Xwe.js} +5 -5
  158. package/dist/components/{p-BdHdKShC.js.map → p-BoIq4Xwe.js.map} +1 -1
  159. package/dist/components/{p-C4yNfeqL.js → p-BpXqwLh3.js} +4 -4
  160. package/dist/components/{p-C4yNfeqL.js.map → p-BpXqwLh3.js.map} +1 -1
  161. package/dist/components/{p-DVYZ-l9i.js → p-Bsc25fvn.js} +5 -5
  162. package/dist/components/{p-DVYZ-l9i.js.map → p-Bsc25fvn.js.map} +1 -1
  163. package/dist/components/{p-DjBw61k9.js → p-BvLWarzz.js} +14 -14
  164. package/dist/components/{p-DjBw61k9.js.map → p-BvLWarzz.js.map} +1 -1
  165. package/dist/components/{p-EXjgBKTQ.js → p-BvlAOvLS.js} +64 -14
  166. package/dist/components/p-BvlAOvLS.js.map +1 -0
  167. package/dist/components/{p-BYfxQYIe.js → p-BynEbSXW.js} +14 -14
  168. package/dist/components/{p-BYfxQYIe.js.map → p-BynEbSXW.js.map} +1 -1
  169. package/dist/components/{p-BLqzepwP.js → p-BzLsSc2B.js} +3 -3
  170. package/dist/components/{p-BLqzepwP.js.map → p-BzLsSc2B.js.map} +1 -1
  171. package/dist/components/{p-Cp5JvKGz.js → p-C4Go47Ak.js} +7 -7
  172. package/dist/components/{p-Cp5JvKGz.js.map → p-C4Go47Ak.js.map} +1 -1
  173. package/dist/components/p-C7-4wg83.js +90 -0
  174. package/dist/components/p-C7-4wg83.js.map +1 -0
  175. package/dist/components/{p-BcERGojX.js → p-C8kySYH4.js} +3 -3
  176. package/dist/components/{p-BcERGojX.js.map → p-C8kySYH4.js.map} +1 -1
  177. package/dist/components/{p-D7fmSEF_.js → p-C_OorhIf.js} +14 -14
  178. package/dist/components/{p-D7fmSEF_.js.map → p-C_OorhIf.js.map} +1 -1
  179. package/dist/components/{p-B_RSAYa_.js → p-CcUFZYwZ.js} +29 -13
  180. package/dist/components/p-CcUFZYwZ.js.map +1 -0
  181. package/dist/components/{p-DvrE7Co1.js → p-Cfl2rRxL.js} +14 -6
  182. package/dist/components/p-Cfl2rRxL.js.map +1 -0
  183. package/dist/components/p-ChCIuJg0.js +103 -0
  184. package/dist/components/p-ChCIuJg0.js.map +1 -0
  185. package/dist/components/{p-CATruwEZ.js → p-ClYIDEKN.js} +6 -7
  186. package/dist/components/p-ClYIDEKN.js.map +1 -0
  187. package/dist/components/{p-BO65LHPL.js → p-CozH0k34.js} +12 -12
  188. package/dist/components/{p-BO65LHPL.js.map → p-CozH0k34.js.map} +1 -1
  189. package/dist/components/{p-CTcGU-0M.js → p-CpiX4Tih.js} +4 -4
  190. package/dist/components/{p-CTcGU-0M.js.map → p-CpiX4Tih.js.map} +1 -1
  191. package/dist/components/{p-BClQCPwn.js → p-Crkl9bKZ.js} +6 -6
  192. package/dist/components/{p-BClQCPwn.js.map → p-Crkl9bKZ.js.map} +1 -1
  193. package/dist/components/{p-CIMsSQwZ.js → p-D0PX7hpQ.js} +12 -12
  194. package/dist/components/{p-CIMsSQwZ.js.map → p-D0PX7hpQ.js.map} +1 -1
  195. package/dist/components/{p-CkFBf2X6.js → p-D4_aO15f.js} +8 -8
  196. package/dist/components/{p-CkFBf2X6.js.map → p-D4_aO15f.js.map} +1 -1
  197. package/dist/components/p-D5cswwR_.js +114 -0
  198. package/dist/components/p-D5cswwR_.js.map +1 -0
  199. package/dist/components/{p-BZmc1jRS.js → p-D7Tz-MyS.js} +44 -16
  200. package/dist/components/p-D7Tz-MyS.js.map +1 -0
  201. package/dist/components/{p-TSI6GwEl.js → p-D990IL5t.js} +4 -4
  202. package/dist/components/{p-TSI6GwEl.js.map → p-D990IL5t.js.map} +1 -1
  203. package/dist/components/{p-DPTEeSlE.js → p-DWqgZCMh.js} +3 -3
  204. package/dist/components/{p-DPTEeSlE.js.map → p-DWqgZCMh.js.map} +1 -1
  205. package/dist/components/{p-C19Sk5Pv.js → p-DjmiTRrw.js} +9 -9
  206. package/dist/components/{p-C19Sk5Pv.js.map → p-DjmiTRrw.js.map} +1 -1
  207. package/dist/components/{p-CKpdUPQa.js → p-DmenFbeU.js} +5 -5
  208. package/dist/components/{p-CKpdUPQa.js.map → p-DmenFbeU.js.map} +1 -1
  209. package/dist/components/{p-pj0dnyXK.js → p-Dp-vgKJq.js} +4 -4
  210. package/dist/components/{p-pj0dnyXK.js.map → p-Dp-vgKJq.js.map} +1 -1
  211. package/dist/components/{p-5dvIIDY3.js → p-DrWlEpVu.js} +4 -4
  212. package/dist/components/{p-5dvIIDY3.js.map → p-DrWlEpVu.js.map} +1 -1
  213. package/dist/components/p-HaIHVR-P.js +45 -0
  214. package/dist/components/p-HaIHVR-P.js.map +1 -0
  215. package/dist/components/{p-5bipMnyu.js → p-Pr-VCZIW.js} +27 -27
  216. package/dist/components/{p-5bipMnyu.js.map → p-Pr-VCZIW.js.map} +1 -1
  217. package/dist/components/{p-gc1S5qea.js → p-Vgt7NA4z.js} +14 -14
  218. package/dist/components/{p-gc1S5qea.js.map → p-Vgt7NA4z.js.map} +1 -1
  219. package/dist/components/{p-CDXBrRc3.js → p-YrxZXlJ1.js} +4 -4
  220. package/dist/components/{p-CDXBrRc3.js.map → p-YrxZXlJ1.js.map} +1 -1
  221. package/dist/components/{p-8U1vQjh6.js → p-gToQ2iM9.js} +14 -14
  222. package/dist/components/{p-8U1vQjh6.js.map → p-gToQ2iM9.js.map} +1 -1
  223. package/dist/components/{p-FYWJbZt4.js → p-gvEf2mjl.js} +4 -4
  224. package/dist/components/{p-FYWJbZt4.js.map → p-gvEf2mjl.js.map} +1 -1
  225. package/dist/components/{p-B3nXZzYN.js → p-h3hsXDzk.js} +4 -4
  226. package/dist/components/{p-B3nXZzYN.js.map → p-h3hsXDzk.js.map} +1 -1
  227. package/dist/esm/loader.js +1 -1
  228. package/dist/esm/{ls-document-options_44.entry.js → ls-document-options_39.entry.js} +403 -359
  229. package/dist/esm/ls-document-options_39.entry.js.map +1 -0
  230. package/dist/esm/ls-document-viewer.js +1 -1
  231. package/dist/esm/ls-field-properties-dropdown.entry.js +1 -1
  232. package/dist/{components/p-Dz71sI_1.js → esm/ls-formfield.entry.js} +11 -89
  233. package/dist/esm/ls-formfield.entry.js.map +1 -0
  234. package/dist/esm/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.js.map +1 -0
  235. package/dist/esm/ls-number-input_5.entry.js +198 -0
  236. package/dist/esm/ls-number-input_5.entry.js.map +1 -0
  237. package/dist/esm/ls-tooltip.entry.js +1573 -0
  238. package/dist/esm/ls-tooltip.entry.js.map +1 -0
  239. package/dist/ls-document-viewer/ls-document-viewer.esm.js +1 -1
  240. package/dist/ls-document-viewer/ls-formfield.entry.esm.js.map +1 -0
  241. package/dist/ls-document-viewer/ls-number-input.ls-radio-input.ls-select-input.ls-text-input.ls-textarea-input.entry.esm.js.map +1 -0
  242. package/dist/ls-document-viewer/ls-tooltip.entry.esm.js.map +1 -0
  243. package/dist/ls-document-viewer/p-646325ae.entry.js +2 -0
  244. package/dist/ls-document-viewer/p-646325ae.entry.js.map +1 -0
  245. package/dist/ls-document-viewer/p-d2df7881.entry.js +2 -0
  246. package/dist/ls-document-viewer/p-d2df7881.entry.js.map +1 -0
  247. package/dist/ls-document-viewer/p-d7109cdd.entry.js +2 -0
  248. package/dist/ls-document-viewer/{p-316dbde4.entry.js → p-dbea98b3.entry.js} +6 -6
  249. package/dist/ls-document-viewer/p-dbea98b3.entry.js.map +1 -0
  250. package/dist/ls-document-viewer/p-fee3434a.entry.js +2 -0
  251. package/dist/ls-document-viewer/p-fee3434a.entry.js.map +1 -0
  252. package/dist/types/components/ls-document-options/ls-document-options.d.ts +1 -0
  253. package/dist/types/components/ls-document-viewer/editorCalculator.d.ts +1 -0
  254. package/dist/types/components/ls-document-viewer/ls-document-viewer.d.ts +7 -1
  255. package/dist/types/components/ls-field-distribute/ls-field-distribute.d.ts +2 -0
  256. package/dist/types/components/ls-field-footer/ls-field-footer.d.ts +1 -0
  257. package/dist/types/components/ls-field-format/ls-field-format.d.ts +1 -0
  258. package/dist/types/components/ls-field-properties-multiple/ls-field-properties-multiple.d.ts +11 -1
  259. package/dist/types/components/ls-page-loader/ls-page-loader.d.ts +3 -0
  260. package/dist/types/components/ls-toggle/ls-toggle.d.ts +1 -0
  261. package/dist/types/components/ls-toolbox-field/ls-toolbox-field.d.ts +4 -0
  262. package/dist/types/components/ls-tooltip/ls-tooltip.d.ts +11 -0
  263. package/dist/types/components.d.ts +86 -0
  264. package/dist/types/types/LSMutateEvent.d.ts +1 -0
  265. package/package.json +2 -1
  266. package/dist/cjs/ls-document-options_44.cjs.entry.js.map +0 -1
  267. package/dist/components/p-BZmc1jRS.js.map +0 -1
  268. package/dist/components/p-B_RSAYa_.js.map +0 -1
  269. package/dist/components/p-CATruwEZ.js.map +0 -1
  270. package/dist/components/p-CXfTLG4X.js +0 -106
  271. package/dist/components/p-CXfTLG4X.js.map +0 -1
  272. package/dist/components/p-CkgCA2si.js +0 -92
  273. package/dist/components/p-CkgCA2si.js.map +0 -1
  274. package/dist/components/p-DJwEQOhf.js +0 -43
  275. package/dist/components/p-DJwEQOhf.js.map +0 -1
  276. package/dist/components/p-DvrE7Co1.js.map +0 -1
  277. package/dist/components/p-Dz71sI_1.js.map +0 -1
  278. package/dist/components/p-EJeMGdQu.js.map +0 -1
  279. package/dist/components/p-EXjgBKTQ.js.map +0 -1
  280. package/dist/esm/ls-document-options_44.entry.js.map +0 -1
  281. package/dist/ls-document-viewer/p-316dbde4.entry.js.map +0 -1
  282. package/dist/ls-document-viewer/p-798903b4.entry.js +0 -2
  283. /package/dist/ls-document-viewer/{p-798903b4.entry.js.map → p-d7109cdd.entry.js.map} +0 -0
@@ -0,0 +1,1575 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-DruwRbfl.js');
4
+
5
+ /**
6
+ * Custom positioning reference element.
7
+ * @see https://floating-ui.com/docs/virtual-elements
8
+ */
9
+
10
+ const min = Math.min;
11
+ const max = Math.max;
12
+ const round = Math.round;
13
+ const floor = Math.floor;
14
+ const createCoords = v => ({
15
+ x: v,
16
+ y: v
17
+ });
18
+ const oppositeSideMap = {
19
+ left: 'right',
20
+ right: 'left',
21
+ bottom: 'top',
22
+ top: 'bottom'
23
+ };
24
+ const oppositeAlignmentMap = {
25
+ start: 'end',
26
+ end: 'start'
27
+ };
28
+ function clamp(start, value, end) {
29
+ return max(start, min(value, end));
30
+ }
31
+ function evaluate(value, param) {
32
+ return typeof value === 'function' ? value(param) : value;
33
+ }
34
+ function getSide(placement) {
35
+ return placement.split('-')[0];
36
+ }
37
+ function getAlignment(placement) {
38
+ return placement.split('-')[1];
39
+ }
40
+ function getOppositeAxis(axis) {
41
+ return axis === 'x' ? 'y' : 'x';
42
+ }
43
+ function getAxisLength(axis) {
44
+ return axis === 'y' ? 'height' : 'width';
45
+ }
46
+ const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
47
+ function getSideAxis(placement) {
48
+ return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
49
+ }
50
+ function getAlignmentAxis(placement) {
51
+ return getOppositeAxis(getSideAxis(placement));
52
+ }
53
+ function getAlignmentSides(placement, rects, rtl) {
54
+ if (rtl === void 0) {
55
+ rtl = false;
56
+ }
57
+ const alignment = getAlignment(placement);
58
+ const alignmentAxis = getAlignmentAxis(placement);
59
+ const length = getAxisLength(alignmentAxis);
60
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
61
+ if (rects.reference[length] > rects.floating[length]) {
62
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
63
+ }
64
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
65
+ }
66
+ function getExpandedPlacements(placement) {
67
+ const oppositePlacement = getOppositePlacement(placement);
68
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
69
+ }
70
+ function getOppositeAlignmentPlacement(placement) {
71
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
72
+ }
73
+ const lrPlacement = ['left', 'right'];
74
+ const rlPlacement = ['right', 'left'];
75
+ const tbPlacement = ['top', 'bottom'];
76
+ const btPlacement = ['bottom', 'top'];
77
+ function getSideList(side, isStart, rtl) {
78
+ switch (side) {
79
+ case 'top':
80
+ case 'bottom':
81
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
82
+ return isStart ? lrPlacement : rlPlacement;
83
+ case 'left':
84
+ case 'right':
85
+ return isStart ? tbPlacement : btPlacement;
86
+ default:
87
+ return [];
88
+ }
89
+ }
90
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
91
+ const alignment = getAlignment(placement);
92
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
93
+ if (alignment) {
94
+ list = list.map(side => side + "-" + alignment);
95
+ if (flipAlignment) {
96
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
97
+ }
98
+ }
99
+ return list;
100
+ }
101
+ function getOppositePlacement(placement) {
102
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
103
+ }
104
+ function expandPaddingObject(padding) {
105
+ return {
106
+ top: 0,
107
+ right: 0,
108
+ bottom: 0,
109
+ left: 0,
110
+ ...padding
111
+ };
112
+ }
113
+ function getPaddingObject(padding) {
114
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
115
+ top: padding,
116
+ right: padding,
117
+ bottom: padding,
118
+ left: padding
119
+ };
120
+ }
121
+ function rectToClientRect(rect) {
122
+ const {
123
+ x,
124
+ y,
125
+ width,
126
+ height
127
+ } = rect;
128
+ return {
129
+ width,
130
+ height,
131
+ top: y,
132
+ left: x,
133
+ right: x + width,
134
+ bottom: y + height,
135
+ x,
136
+ y
137
+ };
138
+ }
139
+
140
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
141
+ let {
142
+ reference,
143
+ floating
144
+ } = _ref;
145
+ const sideAxis = getSideAxis(placement);
146
+ const alignmentAxis = getAlignmentAxis(placement);
147
+ const alignLength = getAxisLength(alignmentAxis);
148
+ const side = getSide(placement);
149
+ const isVertical = sideAxis === 'y';
150
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
151
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
152
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
153
+ let coords;
154
+ switch (side) {
155
+ case 'top':
156
+ coords = {
157
+ x: commonX,
158
+ y: reference.y - floating.height
159
+ };
160
+ break;
161
+ case 'bottom':
162
+ coords = {
163
+ x: commonX,
164
+ y: reference.y + reference.height
165
+ };
166
+ break;
167
+ case 'right':
168
+ coords = {
169
+ x: reference.x + reference.width,
170
+ y: commonY
171
+ };
172
+ break;
173
+ case 'left':
174
+ coords = {
175
+ x: reference.x - floating.width,
176
+ y: commonY
177
+ };
178
+ break;
179
+ default:
180
+ coords = {
181
+ x: reference.x,
182
+ y: reference.y
183
+ };
184
+ }
185
+ switch (getAlignment(placement)) {
186
+ case 'start':
187
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
188
+ break;
189
+ case 'end':
190
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
191
+ break;
192
+ }
193
+ return coords;
194
+ }
195
+
196
+ /**
197
+ * Computes the `x` and `y` coordinates that will place the floating element
198
+ * next to a given reference element.
199
+ *
200
+ * This export does not have any `platform` interface logic. You will need to
201
+ * write one for the platform you are using Floating UI with.
202
+ */
203
+ const computePosition$1 = async (reference, floating, config) => {
204
+ const {
205
+ placement = 'bottom',
206
+ strategy = 'absolute',
207
+ middleware = [],
208
+ platform
209
+ } = config;
210
+ const validMiddleware = middleware.filter(Boolean);
211
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
212
+ let rects = await platform.getElementRects({
213
+ reference,
214
+ floating,
215
+ strategy
216
+ });
217
+ let {
218
+ x,
219
+ y
220
+ } = computeCoordsFromPlacement(rects, placement, rtl);
221
+ let statefulPlacement = placement;
222
+ let middlewareData = {};
223
+ let resetCount = 0;
224
+ for (let i = 0; i < validMiddleware.length; i++) {
225
+ const {
226
+ name,
227
+ fn
228
+ } = validMiddleware[i];
229
+ const {
230
+ x: nextX,
231
+ y: nextY,
232
+ data,
233
+ reset
234
+ } = await fn({
235
+ x,
236
+ y,
237
+ initialPlacement: placement,
238
+ placement: statefulPlacement,
239
+ strategy,
240
+ middlewareData,
241
+ rects,
242
+ platform,
243
+ elements: {
244
+ reference,
245
+ floating
246
+ }
247
+ });
248
+ x = nextX != null ? nextX : x;
249
+ y = nextY != null ? nextY : y;
250
+ middlewareData = {
251
+ ...middlewareData,
252
+ [name]: {
253
+ ...middlewareData[name],
254
+ ...data
255
+ }
256
+ };
257
+ if (reset && resetCount <= 50) {
258
+ resetCount++;
259
+ if (typeof reset === 'object') {
260
+ if (reset.placement) {
261
+ statefulPlacement = reset.placement;
262
+ }
263
+ if (reset.rects) {
264
+ rects = reset.rects === true ? await platform.getElementRects({
265
+ reference,
266
+ floating,
267
+ strategy
268
+ }) : reset.rects;
269
+ }
270
+ ({
271
+ x,
272
+ y
273
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
274
+ }
275
+ i = -1;
276
+ }
277
+ }
278
+ return {
279
+ x,
280
+ y,
281
+ placement: statefulPlacement,
282
+ strategy,
283
+ middlewareData
284
+ };
285
+ };
286
+
287
+ /**
288
+ * Resolves with an object of overflow side offsets that determine how much the
289
+ * element is overflowing a given clipping boundary on each side.
290
+ * - positive = overflowing the boundary by that number of pixels
291
+ * - negative = how many pixels left before it will overflow
292
+ * - 0 = lies flush with the boundary
293
+ * @see https://floating-ui.com/docs/detectOverflow
294
+ */
295
+ async function detectOverflow(state, options) {
296
+ var _await$platform$isEle;
297
+ if (options === void 0) {
298
+ options = {};
299
+ }
300
+ const {
301
+ x,
302
+ y,
303
+ platform,
304
+ rects,
305
+ elements,
306
+ strategy
307
+ } = state;
308
+ const {
309
+ boundary = 'clippingAncestors',
310
+ rootBoundary = 'viewport',
311
+ elementContext = 'floating',
312
+ altBoundary = false,
313
+ padding = 0
314
+ } = evaluate(options, state);
315
+ const paddingObject = getPaddingObject(padding);
316
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
317
+ const element = elements[altBoundary ? altContext : elementContext];
318
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
319
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
320
+ boundary,
321
+ rootBoundary,
322
+ strategy
323
+ }));
324
+ const rect = elementContext === 'floating' ? {
325
+ x,
326
+ y,
327
+ width: rects.floating.width,
328
+ height: rects.floating.height
329
+ } : rects.reference;
330
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
331
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
332
+ x: 1,
333
+ y: 1
334
+ } : {
335
+ x: 1,
336
+ y: 1
337
+ };
338
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
339
+ elements,
340
+ rect,
341
+ offsetParent,
342
+ strategy
343
+ }) : rect);
344
+ return {
345
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
346
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
347
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
348
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
349
+ };
350
+ }
351
+
352
+ /**
353
+ * Optimizes the visibility of the floating element by flipping the `placement`
354
+ * in order to keep it in view when the preferred placement(s) will overflow the
355
+ * clipping boundary. Alternative to `autoPlacement`.
356
+ * @see https://floating-ui.com/docs/flip
357
+ */
358
+ const flip$1 = function (options) {
359
+ if (options === void 0) {
360
+ options = {};
361
+ }
362
+ return {
363
+ name: 'flip',
364
+ options,
365
+ async fn(state) {
366
+ var _middlewareData$arrow, _middlewareData$flip;
367
+ const {
368
+ placement,
369
+ middlewareData,
370
+ rects,
371
+ initialPlacement,
372
+ platform,
373
+ elements
374
+ } = state;
375
+ const {
376
+ mainAxis: checkMainAxis = true,
377
+ crossAxis: checkCrossAxis = true,
378
+ fallbackPlacements: specifiedFallbackPlacements,
379
+ fallbackStrategy = 'bestFit',
380
+ fallbackAxisSideDirection = 'none',
381
+ flipAlignment = true,
382
+ ...detectOverflowOptions
383
+ } = evaluate(options, state);
384
+
385
+ // If a reset by the arrow was caused due to an alignment offset being
386
+ // added, we should skip any logic now since `flip()` has already done its
387
+ // work.
388
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
389
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
390
+ return {};
391
+ }
392
+ const side = getSide(placement);
393
+ const initialSideAxis = getSideAxis(initialPlacement);
394
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
395
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
396
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
397
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
398
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
399
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
400
+ }
401
+ const placements = [initialPlacement, ...fallbackPlacements];
402
+ const overflow = await detectOverflow(state, detectOverflowOptions);
403
+ const overflows = [];
404
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
405
+ if (checkMainAxis) {
406
+ overflows.push(overflow[side]);
407
+ }
408
+ if (checkCrossAxis) {
409
+ const sides = getAlignmentSides(placement, rects, rtl);
410
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
411
+ }
412
+ overflowsData = [...overflowsData, {
413
+ placement,
414
+ overflows
415
+ }];
416
+
417
+ // One or more sides is overflowing.
418
+ if (!overflows.every(side => side <= 0)) {
419
+ var _middlewareData$flip2, _overflowsData$filter;
420
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
421
+ const nextPlacement = placements[nextIndex];
422
+ if (nextPlacement) {
423
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
424
+ if (!ignoreCrossAxisOverflow ||
425
+ // We leave the current main axis only if every placement on that axis
426
+ // overflows the main axis.
427
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
428
+ // Try next placement and re-run the lifecycle.
429
+ return {
430
+ data: {
431
+ index: nextIndex,
432
+ overflows: overflowsData
433
+ },
434
+ reset: {
435
+ placement: nextPlacement
436
+ }
437
+ };
438
+ }
439
+ }
440
+
441
+ // First, find the candidates that fit on the mainAxis side of overflow,
442
+ // then find the placement that fits the best on the main crossAxis side.
443
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
444
+
445
+ // Otherwise fallback.
446
+ if (!resetPlacement) {
447
+ switch (fallbackStrategy) {
448
+ case 'bestFit':
449
+ {
450
+ var _overflowsData$filter2;
451
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
452
+ if (hasFallbackAxisSideDirection) {
453
+ const currentSideAxis = getSideAxis(d.placement);
454
+ return currentSideAxis === initialSideAxis ||
455
+ // Create a bias to the `y` side axis due to horizontal
456
+ // reading directions favoring greater width.
457
+ currentSideAxis === 'y';
458
+ }
459
+ return true;
460
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
461
+ if (placement) {
462
+ resetPlacement = placement;
463
+ }
464
+ break;
465
+ }
466
+ case 'initialPlacement':
467
+ resetPlacement = initialPlacement;
468
+ break;
469
+ }
470
+ }
471
+ if (placement !== resetPlacement) {
472
+ return {
473
+ reset: {
474
+ placement: resetPlacement
475
+ }
476
+ };
477
+ }
478
+ }
479
+ return {};
480
+ }
481
+ };
482
+ };
483
+
484
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
485
+
486
+ // For type backwards-compatibility, the `OffsetOptions` type was also
487
+ // Derivable.
488
+
489
+ async function convertValueToCoords(state, options) {
490
+ const {
491
+ placement,
492
+ platform,
493
+ elements
494
+ } = state;
495
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
496
+ const side = getSide(placement);
497
+ const alignment = getAlignment(placement);
498
+ const isVertical = getSideAxis(placement) === 'y';
499
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
500
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
501
+ const rawValue = evaluate(options, state);
502
+
503
+ // eslint-disable-next-line prefer-const
504
+ let {
505
+ mainAxis,
506
+ crossAxis,
507
+ alignmentAxis
508
+ } = typeof rawValue === 'number' ? {
509
+ mainAxis: rawValue,
510
+ crossAxis: 0,
511
+ alignmentAxis: null
512
+ } : {
513
+ mainAxis: rawValue.mainAxis || 0,
514
+ crossAxis: rawValue.crossAxis || 0,
515
+ alignmentAxis: rawValue.alignmentAxis
516
+ };
517
+ if (alignment && typeof alignmentAxis === 'number') {
518
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
519
+ }
520
+ return isVertical ? {
521
+ x: crossAxis * crossAxisMulti,
522
+ y: mainAxis * mainAxisMulti
523
+ } : {
524
+ x: mainAxis * mainAxisMulti,
525
+ y: crossAxis * crossAxisMulti
526
+ };
527
+ }
528
+
529
+ /**
530
+ * Modifies the placement by translating the floating element along the
531
+ * specified axes.
532
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
533
+ * object may be passed.
534
+ * @see https://floating-ui.com/docs/offset
535
+ */
536
+ const offset$1 = function (options) {
537
+ if (options === void 0) {
538
+ options = 0;
539
+ }
540
+ return {
541
+ name: 'offset',
542
+ options,
543
+ async fn(state) {
544
+ var _middlewareData$offse, _middlewareData$arrow;
545
+ const {
546
+ x,
547
+ y,
548
+ placement,
549
+ middlewareData
550
+ } = state;
551
+ const diffCoords = await convertValueToCoords(state, options);
552
+
553
+ // If the placement is the same and the arrow caused an alignment offset
554
+ // then we don't need to change the positioning coordinates.
555
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
556
+ return {};
557
+ }
558
+ return {
559
+ x: x + diffCoords.x,
560
+ y: y + diffCoords.y,
561
+ data: {
562
+ ...diffCoords,
563
+ placement
564
+ }
565
+ };
566
+ }
567
+ };
568
+ };
569
+
570
+ /**
571
+ * Optimizes the visibility of the floating element by shifting it in order to
572
+ * keep it in view when it will overflow the clipping boundary.
573
+ * @see https://floating-ui.com/docs/shift
574
+ */
575
+ const shift$1 = function (options) {
576
+ if (options === void 0) {
577
+ options = {};
578
+ }
579
+ return {
580
+ name: 'shift',
581
+ options,
582
+ async fn(state) {
583
+ const {
584
+ x,
585
+ y,
586
+ placement
587
+ } = state;
588
+ const {
589
+ mainAxis: checkMainAxis = true,
590
+ crossAxis: checkCrossAxis = false,
591
+ limiter = {
592
+ fn: _ref => {
593
+ let {
594
+ x,
595
+ y
596
+ } = _ref;
597
+ return {
598
+ x,
599
+ y
600
+ };
601
+ }
602
+ },
603
+ ...detectOverflowOptions
604
+ } = evaluate(options, state);
605
+ const coords = {
606
+ x,
607
+ y
608
+ };
609
+ const overflow = await detectOverflow(state, detectOverflowOptions);
610
+ const crossAxis = getSideAxis(getSide(placement));
611
+ const mainAxis = getOppositeAxis(crossAxis);
612
+ let mainAxisCoord = coords[mainAxis];
613
+ let crossAxisCoord = coords[crossAxis];
614
+ if (checkMainAxis) {
615
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
616
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
617
+ const min = mainAxisCoord + overflow[minSide];
618
+ const max = mainAxisCoord - overflow[maxSide];
619
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
620
+ }
621
+ if (checkCrossAxis) {
622
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
623
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
624
+ const min = crossAxisCoord + overflow[minSide];
625
+ const max = crossAxisCoord - overflow[maxSide];
626
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
627
+ }
628
+ const limitedCoords = limiter.fn({
629
+ ...state,
630
+ [mainAxis]: mainAxisCoord,
631
+ [crossAxis]: crossAxisCoord
632
+ });
633
+ return {
634
+ ...limitedCoords,
635
+ data: {
636
+ x: limitedCoords.x - x,
637
+ y: limitedCoords.y - y,
638
+ enabled: {
639
+ [mainAxis]: checkMainAxis,
640
+ [crossAxis]: checkCrossAxis
641
+ }
642
+ }
643
+ };
644
+ }
645
+ };
646
+ };
647
+
648
+ function hasWindow() {
649
+ return typeof window !== 'undefined';
650
+ }
651
+ function getNodeName(node) {
652
+ if (isNode(node)) {
653
+ return (node.nodeName || '').toLowerCase();
654
+ }
655
+ // Mocked nodes in testing environments may not be instances of Node. By
656
+ // returning `#document` an infinite loop won't occur.
657
+ // https://github.com/floating-ui/floating-ui/issues/2317
658
+ return '#document';
659
+ }
660
+ function getWindow(node) {
661
+ var _node$ownerDocument;
662
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
663
+ }
664
+ function getDocumentElement(node) {
665
+ var _ref;
666
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
667
+ }
668
+ function isNode(value) {
669
+ if (!hasWindow()) {
670
+ return false;
671
+ }
672
+ return value instanceof Node || value instanceof getWindow(value).Node;
673
+ }
674
+ function isElement(value) {
675
+ if (!hasWindow()) {
676
+ return false;
677
+ }
678
+ return value instanceof Element || value instanceof getWindow(value).Element;
679
+ }
680
+ function isHTMLElement(value) {
681
+ if (!hasWindow()) {
682
+ return false;
683
+ }
684
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
685
+ }
686
+ function isShadowRoot(value) {
687
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
688
+ return false;
689
+ }
690
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
691
+ }
692
+ const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
693
+ function isOverflowElement(element) {
694
+ const {
695
+ overflow,
696
+ overflowX,
697
+ overflowY,
698
+ display
699
+ } = getComputedStyle$1(element);
700
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
701
+ }
702
+ const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
703
+ function isTableElement(element) {
704
+ return tableElements.has(getNodeName(element));
705
+ }
706
+ const topLayerSelectors = [':popover-open', ':modal'];
707
+ function isTopLayer(element) {
708
+ return topLayerSelectors.some(selector => {
709
+ try {
710
+ return element.matches(selector);
711
+ } catch (_e) {
712
+ return false;
713
+ }
714
+ });
715
+ }
716
+ const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
717
+ const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
718
+ const containValues = ['paint', 'layout', 'strict', 'content'];
719
+ function isContainingBlock(elementOrCss) {
720
+ const webkit = isWebKit();
721
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
722
+
723
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
724
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
725
+ return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
726
+ }
727
+ function getContainingBlock(element) {
728
+ let currentNode = getParentNode(element);
729
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
730
+ if (isContainingBlock(currentNode)) {
731
+ return currentNode;
732
+ } else if (isTopLayer(currentNode)) {
733
+ return null;
734
+ }
735
+ currentNode = getParentNode(currentNode);
736
+ }
737
+ return null;
738
+ }
739
+ function isWebKit() {
740
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
741
+ return CSS.supports('-webkit-backdrop-filter', 'none');
742
+ }
743
+ const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
744
+ function isLastTraversableNode(node) {
745
+ return lastTraversableNodeNames.has(getNodeName(node));
746
+ }
747
+ function getComputedStyle$1(element) {
748
+ return getWindow(element).getComputedStyle(element);
749
+ }
750
+ function getNodeScroll(element) {
751
+ if (isElement(element)) {
752
+ return {
753
+ scrollLeft: element.scrollLeft,
754
+ scrollTop: element.scrollTop
755
+ };
756
+ }
757
+ return {
758
+ scrollLeft: element.scrollX,
759
+ scrollTop: element.scrollY
760
+ };
761
+ }
762
+ function getParentNode(node) {
763
+ if (getNodeName(node) === 'html') {
764
+ return node;
765
+ }
766
+ const result =
767
+ // Step into the shadow DOM of the parent of a slotted node.
768
+ node.assignedSlot ||
769
+ // DOM Element detected.
770
+ node.parentNode ||
771
+ // ShadowRoot detected.
772
+ isShadowRoot(node) && node.host ||
773
+ // Fallback.
774
+ getDocumentElement(node);
775
+ return isShadowRoot(result) ? result.host : result;
776
+ }
777
+ function getNearestOverflowAncestor(node) {
778
+ const parentNode = getParentNode(node);
779
+ if (isLastTraversableNode(parentNode)) {
780
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
781
+ }
782
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
783
+ return parentNode;
784
+ }
785
+ return getNearestOverflowAncestor(parentNode);
786
+ }
787
+ function getOverflowAncestors(node, list, traverseIframes) {
788
+ var _node$ownerDocument2;
789
+ if (list === void 0) {
790
+ list = [];
791
+ }
792
+ if (traverseIframes === void 0) {
793
+ traverseIframes = true;
794
+ }
795
+ const scrollableAncestor = getNearestOverflowAncestor(node);
796
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
797
+ const win = getWindow(scrollableAncestor);
798
+ if (isBody) {
799
+ const frameElement = getFrameElement(win);
800
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
801
+ }
802
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
803
+ }
804
+ function getFrameElement(win) {
805
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
806
+ }
807
+
808
+ function getCssDimensions(element) {
809
+ const css = getComputedStyle$1(element);
810
+ // In testing environments, the `width` and `height` properties are empty
811
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
812
+ let width = parseFloat(css.width) || 0;
813
+ let height = parseFloat(css.height) || 0;
814
+ const hasOffset = isHTMLElement(element);
815
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
816
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
817
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
818
+ if (shouldFallback) {
819
+ width = offsetWidth;
820
+ height = offsetHeight;
821
+ }
822
+ return {
823
+ width,
824
+ height,
825
+ $: shouldFallback
826
+ };
827
+ }
828
+
829
+ function unwrapElement(element) {
830
+ return !isElement(element) ? element.contextElement : element;
831
+ }
832
+
833
+ function getScale(element) {
834
+ const domElement = unwrapElement(element);
835
+ if (!isHTMLElement(domElement)) {
836
+ return createCoords(1);
837
+ }
838
+ const rect = domElement.getBoundingClientRect();
839
+ const {
840
+ width,
841
+ height,
842
+ $
843
+ } = getCssDimensions(domElement);
844
+ let x = ($ ? round(rect.width) : rect.width) / width;
845
+ let y = ($ ? round(rect.height) : rect.height) / height;
846
+
847
+ // 0, NaN, or Infinity should always fallback to 1.
848
+
849
+ if (!x || !Number.isFinite(x)) {
850
+ x = 1;
851
+ }
852
+ if (!y || !Number.isFinite(y)) {
853
+ y = 1;
854
+ }
855
+ return {
856
+ x,
857
+ y
858
+ };
859
+ }
860
+
861
+ const noOffsets = /*#__PURE__*/createCoords(0);
862
+ function getVisualOffsets(element) {
863
+ const win = getWindow(element);
864
+ if (!isWebKit() || !win.visualViewport) {
865
+ return noOffsets;
866
+ }
867
+ return {
868
+ x: win.visualViewport.offsetLeft,
869
+ y: win.visualViewport.offsetTop
870
+ };
871
+ }
872
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
873
+ if (isFixed === void 0) {
874
+ isFixed = false;
875
+ }
876
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
877
+ return false;
878
+ }
879
+ return isFixed;
880
+ }
881
+
882
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
883
+ if (includeScale === void 0) {
884
+ includeScale = false;
885
+ }
886
+ if (isFixedStrategy === void 0) {
887
+ isFixedStrategy = false;
888
+ }
889
+ const clientRect = element.getBoundingClientRect();
890
+ const domElement = unwrapElement(element);
891
+ let scale = createCoords(1);
892
+ if (includeScale) {
893
+ if (offsetParent) {
894
+ if (isElement(offsetParent)) {
895
+ scale = getScale(offsetParent);
896
+ }
897
+ } else {
898
+ scale = getScale(element);
899
+ }
900
+ }
901
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
902
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
903
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
904
+ let width = clientRect.width / scale.x;
905
+ let height = clientRect.height / scale.y;
906
+ if (domElement) {
907
+ const win = getWindow(domElement);
908
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
909
+ let currentWin = win;
910
+ let currentIFrame = getFrameElement(currentWin);
911
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
912
+ const iframeScale = getScale(currentIFrame);
913
+ const iframeRect = currentIFrame.getBoundingClientRect();
914
+ const css = getComputedStyle$1(currentIFrame);
915
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
916
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
917
+ x *= iframeScale.x;
918
+ y *= iframeScale.y;
919
+ width *= iframeScale.x;
920
+ height *= iframeScale.y;
921
+ x += left;
922
+ y += top;
923
+ currentWin = getWindow(currentIFrame);
924
+ currentIFrame = getFrameElement(currentWin);
925
+ }
926
+ }
927
+ return rectToClientRect({
928
+ width,
929
+ height,
930
+ x,
931
+ y
932
+ });
933
+ }
934
+
935
+ // If <html> has a CSS width greater than the viewport, then this will be
936
+ // incorrect for RTL.
937
+ function getWindowScrollBarX(element, rect) {
938
+ const leftScroll = getNodeScroll(element).scrollLeft;
939
+ if (!rect) {
940
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
941
+ }
942
+ return rect.left + leftScroll;
943
+ }
944
+
945
+ function getHTMLOffset(documentElement, scroll) {
946
+ const htmlRect = documentElement.getBoundingClientRect();
947
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
948
+ const y = htmlRect.top + scroll.scrollTop;
949
+ return {
950
+ x,
951
+ y
952
+ };
953
+ }
954
+
955
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
956
+ let {
957
+ elements,
958
+ rect,
959
+ offsetParent,
960
+ strategy
961
+ } = _ref;
962
+ const isFixed = strategy === 'fixed';
963
+ const documentElement = getDocumentElement(offsetParent);
964
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
965
+ if (offsetParent === documentElement || topLayer && isFixed) {
966
+ return rect;
967
+ }
968
+ let scroll = {
969
+ scrollLeft: 0,
970
+ scrollTop: 0
971
+ };
972
+ let scale = createCoords(1);
973
+ const offsets = createCoords(0);
974
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
975
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
976
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
977
+ scroll = getNodeScroll(offsetParent);
978
+ }
979
+ if (isHTMLElement(offsetParent)) {
980
+ const offsetRect = getBoundingClientRect(offsetParent);
981
+ scale = getScale(offsetParent);
982
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
983
+ offsets.y = offsetRect.y + offsetParent.clientTop;
984
+ }
985
+ }
986
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
987
+ return {
988
+ width: rect.width * scale.x,
989
+ height: rect.height * scale.y,
990
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
991
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
992
+ };
993
+ }
994
+
995
+ function getClientRects(element) {
996
+ return Array.from(element.getClientRects());
997
+ }
998
+
999
+ // Gets the entire size of the scrollable document area, even extending outside
1000
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1001
+ function getDocumentRect(element) {
1002
+ const html = getDocumentElement(element);
1003
+ const scroll = getNodeScroll(element);
1004
+ const body = element.ownerDocument.body;
1005
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1006
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1007
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1008
+ const y = -scroll.scrollTop;
1009
+ if (getComputedStyle$1(body).direction === 'rtl') {
1010
+ x += max(html.clientWidth, body.clientWidth) - width;
1011
+ }
1012
+ return {
1013
+ width,
1014
+ height,
1015
+ x,
1016
+ y
1017
+ };
1018
+ }
1019
+
1020
+ // Safety check: ensure the scrollbar space is reasonable in case this
1021
+ // calculation is affected by unusual styles.
1022
+ // Most scrollbars leave 15-18px of space.
1023
+ const SCROLLBAR_MAX = 25;
1024
+ function getViewportRect(element, strategy) {
1025
+ const win = getWindow(element);
1026
+ const html = getDocumentElement(element);
1027
+ const visualViewport = win.visualViewport;
1028
+ let width = html.clientWidth;
1029
+ let height = html.clientHeight;
1030
+ let x = 0;
1031
+ let y = 0;
1032
+ if (visualViewport) {
1033
+ width = visualViewport.width;
1034
+ height = visualViewport.height;
1035
+ const visualViewportBased = isWebKit();
1036
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
1037
+ x = visualViewport.offsetLeft;
1038
+ y = visualViewport.offsetTop;
1039
+ }
1040
+ }
1041
+ const windowScrollbarX = getWindowScrollBarX(html);
1042
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
1043
+ // visual width of the <html> but this is not considered in the size
1044
+ // of `html.clientWidth`.
1045
+ if (windowScrollbarX <= 0) {
1046
+ const doc = html.ownerDocument;
1047
+ const body = doc.body;
1048
+ const bodyStyles = getComputedStyle(body);
1049
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1050
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1051
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1052
+ width -= clippingStableScrollbarWidth;
1053
+ }
1054
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1055
+ // If the <body> scrollbar is on the left, the width needs to be extended
1056
+ // by the scrollbar amount so there isn't extra space on the right.
1057
+ width += windowScrollbarX;
1058
+ }
1059
+ return {
1060
+ width,
1061
+ height,
1062
+ x,
1063
+ y
1064
+ };
1065
+ }
1066
+
1067
+ const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
1068
+ // Returns the inner client rect, subtracting scrollbars if present.
1069
+ function getInnerBoundingClientRect(element, strategy) {
1070
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1071
+ const top = clientRect.top + element.clientTop;
1072
+ const left = clientRect.left + element.clientLeft;
1073
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1074
+ const width = element.clientWidth * scale.x;
1075
+ const height = element.clientHeight * scale.y;
1076
+ const x = left * scale.x;
1077
+ const y = top * scale.y;
1078
+ return {
1079
+ width,
1080
+ height,
1081
+ x,
1082
+ y
1083
+ };
1084
+ }
1085
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1086
+ let rect;
1087
+ if (clippingAncestor === 'viewport') {
1088
+ rect = getViewportRect(element, strategy);
1089
+ } else if (clippingAncestor === 'document') {
1090
+ rect = getDocumentRect(getDocumentElement(element));
1091
+ } else if (isElement(clippingAncestor)) {
1092
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1093
+ } else {
1094
+ const visualOffsets = getVisualOffsets(element);
1095
+ rect = {
1096
+ x: clippingAncestor.x - visualOffsets.x,
1097
+ y: clippingAncestor.y - visualOffsets.y,
1098
+ width: clippingAncestor.width,
1099
+ height: clippingAncestor.height
1100
+ };
1101
+ }
1102
+ return rectToClientRect(rect);
1103
+ }
1104
+ function hasFixedPositionAncestor(element, stopNode) {
1105
+ const parentNode = getParentNode(element);
1106
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1107
+ return false;
1108
+ }
1109
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1110
+ }
1111
+
1112
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1113
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1114
+ // of the given element up the tree.
1115
+ function getClippingElementAncestors(element, cache) {
1116
+ const cachedResult = cache.get(element);
1117
+ if (cachedResult) {
1118
+ return cachedResult;
1119
+ }
1120
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1121
+ let currentContainingBlockComputedStyle = null;
1122
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1123
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1124
+
1125
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1126
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1127
+ const computedStyle = getComputedStyle$1(currentNode);
1128
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1129
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1130
+ currentContainingBlockComputedStyle = null;
1131
+ }
1132
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1133
+ if (shouldDropCurrentNode) {
1134
+ // Drop non-containing blocks.
1135
+ result = result.filter(ancestor => ancestor !== currentNode);
1136
+ } else {
1137
+ // Record last containing block for next iteration.
1138
+ currentContainingBlockComputedStyle = computedStyle;
1139
+ }
1140
+ currentNode = getParentNode(currentNode);
1141
+ }
1142
+ cache.set(element, result);
1143
+ return result;
1144
+ }
1145
+
1146
+ // Gets the maximum area that the element is visible in due to any number of
1147
+ // clipping ancestors.
1148
+ function getClippingRect(_ref) {
1149
+ let {
1150
+ element,
1151
+ boundary,
1152
+ rootBoundary,
1153
+ strategy
1154
+ } = _ref;
1155
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1156
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1157
+ const firstClippingAncestor = clippingAncestors[0];
1158
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1159
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1160
+ accRect.top = max(rect.top, accRect.top);
1161
+ accRect.right = min(rect.right, accRect.right);
1162
+ accRect.bottom = min(rect.bottom, accRect.bottom);
1163
+ accRect.left = max(rect.left, accRect.left);
1164
+ return accRect;
1165
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1166
+ return {
1167
+ width: clippingRect.right - clippingRect.left,
1168
+ height: clippingRect.bottom - clippingRect.top,
1169
+ x: clippingRect.left,
1170
+ y: clippingRect.top
1171
+ };
1172
+ }
1173
+
1174
+ function getDimensions(element) {
1175
+ const {
1176
+ width,
1177
+ height
1178
+ } = getCssDimensions(element);
1179
+ return {
1180
+ width,
1181
+ height
1182
+ };
1183
+ }
1184
+
1185
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1186
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1187
+ const documentElement = getDocumentElement(offsetParent);
1188
+ const isFixed = strategy === 'fixed';
1189
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1190
+ let scroll = {
1191
+ scrollLeft: 0,
1192
+ scrollTop: 0
1193
+ };
1194
+ const offsets = createCoords(0);
1195
+
1196
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1197
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1198
+ function setLeftRTLScrollbarOffset() {
1199
+ offsets.x = getWindowScrollBarX(documentElement);
1200
+ }
1201
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1202
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1203
+ scroll = getNodeScroll(offsetParent);
1204
+ }
1205
+ if (isOffsetParentAnElement) {
1206
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1207
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1208
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1209
+ } else if (documentElement) {
1210
+ setLeftRTLScrollbarOffset();
1211
+ }
1212
+ }
1213
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
1214
+ setLeftRTLScrollbarOffset();
1215
+ }
1216
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1217
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1218
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1219
+ return {
1220
+ x,
1221
+ y,
1222
+ width: rect.width,
1223
+ height: rect.height
1224
+ };
1225
+ }
1226
+
1227
+ function isStaticPositioned(element) {
1228
+ return getComputedStyle$1(element).position === 'static';
1229
+ }
1230
+
1231
+ function getTrueOffsetParent(element, polyfill) {
1232
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1233
+ return null;
1234
+ }
1235
+ if (polyfill) {
1236
+ return polyfill(element);
1237
+ }
1238
+ let rawOffsetParent = element.offsetParent;
1239
+
1240
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1241
+ // while Chrome and Safari return the <body> element. The <body> element must
1242
+ // be used to perform the correct calculations even if the <html> element is
1243
+ // non-static.
1244
+ if (getDocumentElement(element) === rawOffsetParent) {
1245
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1246
+ }
1247
+ return rawOffsetParent;
1248
+ }
1249
+
1250
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1251
+ // such as table ancestors and cross browser bugs.
1252
+ function getOffsetParent(element, polyfill) {
1253
+ const win = getWindow(element);
1254
+ if (isTopLayer(element)) {
1255
+ return win;
1256
+ }
1257
+ if (!isHTMLElement(element)) {
1258
+ let svgOffsetParent = getParentNode(element);
1259
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1260
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1261
+ return svgOffsetParent;
1262
+ }
1263
+ svgOffsetParent = getParentNode(svgOffsetParent);
1264
+ }
1265
+ return win;
1266
+ }
1267
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1268
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1269
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1270
+ }
1271
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1272
+ return win;
1273
+ }
1274
+ return offsetParent || getContainingBlock(element) || win;
1275
+ }
1276
+
1277
+ const getElementRects = async function (data) {
1278
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1279
+ const getDimensionsFn = this.getDimensions;
1280
+ const floatingDimensions = await getDimensionsFn(data.floating);
1281
+ return {
1282
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1283
+ floating: {
1284
+ x: 0,
1285
+ y: 0,
1286
+ width: floatingDimensions.width,
1287
+ height: floatingDimensions.height
1288
+ }
1289
+ };
1290
+ };
1291
+
1292
+ function isRTL(element) {
1293
+ return getComputedStyle$1(element).direction === 'rtl';
1294
+ }
1295
+
1296
+ const platform = {
1297
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1298
+ getDocumentElement,
1299
+ getClippingRect,
1300
+ getOffsetParent,
1301
+ getElementRects,
1302
+ getClientRects,
1303
+ getDimensions,
1304
+ getScale,
1305
+ isElement,
1306
+ isRTL
1307
+ };
1308
+
1309
+ function rectsAreEqual(a, b) {
1310
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1311
+ }
1312
+
1313
+ // https://samthor.au/2021/observing-dom/
1314
+ function observeMove(element, onMove) {
1315
+ let io = null;
1316
+ let timeoutId;
1317
+ const root = getDocumentElement(element);
1318
+ function cleanup() {
1319
+ var _io;
1320
+ clearTimeout(timeoutId);
1321
+ (_io = io) == null || _io.disconnect();
1322
+ io = null;
1323
+ }
1324
+ function refresh(skip, threshold) {
1325
+ if (skip === void 0) {
1326
+ skip = false;
1327
+ }
1328
+ if (threshold === void 0) {
1329
+ threshold = 1;
1330
+ }
1331
+ cleanup();
1332
+ const elementRectForRootMargin = element.getBoundingClientRect();
1333
+ const {
1334
+ left,
1335
+ top,
1336
+ width,
1337
+ height
1338
+ } = elementRectForRootMargin;
1339
+ if (!skip) {
1340
+ onMove();
1341
+ }
1342
+ if (!width || !height) {
1343
+ return;
1344
+ }
1345
+ const insetTop = floor(top);
1346
+ const insetRight = floor(root.clientWidth - (left + width));
1347
+ const insetBottom = floor(root.clientHeight - (top + height));
1348
+ const insetLeft = floor(left);
1349
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
1350
+ const options = {
1351
+ rootMargin,
1352
+ threshold: max(0, min(1, threshold)) || 1
1353
+ };
1354
+ let isFirstUpdate = true;
1355
+ function handleObserve(entries) {
1356
+ const ratio = entries[0].intersectionRatio;
1357
+ if (ratio !== threshold) {
1358
+ if (!isFirstUpdate) {
1359
+ return refresh();
1360
+ }
1361
+ if (!ratio) {
1362
+ // If the reference is clipped, the ratio is 0. Throttle the refresh
1363
+ // to prevent an infinite loop of updates.
1364
+ timeoutId = setTimeout(() => {
1365
+ refresh(false, 1e-7);
1366
+ }, 1000);
1367
+ } else {
1368
+ refresh(false, ratio);
1369
+ }
1370
+ }
1371
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1372
+ // It's possible that even though the ratio is reported as 1, the
1373
+ // element is not actually fully within the IntersectionObserver's root
1374
+ // area anymore. This can happen under performance constraints. This may
1375
+ // be a bug in the browser's IntersectionObserver implementation. To
1376
+ // work around this, we compare the element's bounding rect now with
1377
+ // what it was at the time we created the IntersectionObserver. If they
1378
+ // are not equal then the element moved, so we refresh.
1379
+ refresh();
1380
+ }
1381
+ isFirstUpdate = false;
1382
+ }
1383
+
1384
+ // Older browsers don't support a `document` as the root and will throw an
1385
+ // error.
1386
+ try {
1387
+ io = new IntersectionObserver(handleObserve, {
1388
+ ...options,
1389
+ // Handle <iframe>s
1390
+ root: root.ownerDocument
1391
+ });
1392
+ } catch (_e) {
1393
+ io = new IntersectionObserver(handleObserve, options);
1394
+ }
1395
+ io.observe(element);
1396
+ }
1397
+ refresh(true);
1398
+ return cleanup;
1399
+ }
1400
+
1401
+ /**
1402
+ * Automatically updates the position of the floating element when necessary.
1403
+ * Should only be called when the floating element is mounted on the DOM or
1404
+ * visible on the screen.
1405
+ * @returns cleanup function that should be invoked when the floating element is
1406
+ * removed from the DOM or hidden from the screen.
1407
+ * @see https://floating-ui.com/docs/autoUpdate
1408
+ */
1409
+ function autoUpdate(reference, floating, update, options) {
1410
+ if (options === void 0) {
1411
+ options = {};
1412
+ }
1413
+ const {
1414
+ ancestorScroll = true,
1415
+ ancestorResize = true,
1416
+ elementResize = typeof ResizeObserver === 'function',
1417
+ layoutShift = typeof IntersectionObserver === 'function',
1418
+ animationFrame = false
1419
+ } = options;
1420
+ const referenceEl = unwrapElement(reference);
1421
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
1422
+ ancestors.forEach(ancestor => {
1423
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1424
+ passive: true
1425
+ });
1426
+ ancestorResize && ancestor.addEventListener('resize', update);
1427
+ });
1428
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
1429
+ let reobserveFrame = -1;
1430
+ let resizeObserver = null;
1431
+ if (elementResize) {
1432
+ resizeObserver = new ResizeObserver(_ref => {
1433
+ let [firstEntry] = _ref;
1434
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
1435
+ // Prevent update loops when using the `size` middleware.
1436
+ // https://github.com/floating-ui/floating-ui/issues/1740
1437
+ resizeObserver.unobserve(floating);
1438
+ cancelAnimationFrame(reobserveFrame);
1439
+ reobserveFrame = requestAnimationFrame(() => {
1440
+ var _resizeObserver;
1441
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1442
+ });
1443
+ }
1444
+ update();
1445
+ });
1446
+ if (referenceEl && !animationFrame) {
1447
+ resizeObserver.observe(referenceEl);
1448
+ }
1449
+ resizeObserver.observe(floating);
1450
+ }
1451
+ let frameId;
1452
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1453
+ if (animationFrame) {
1454
+ frameLoop();
1455
+ }
1456
+ function frameLoop() {
1457
+ const nextRefRect = getBoundingClientRect(reference);
1458
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
1459
+ update();
1460
+ }
1461
+ prevRefRect = nextRefRect;
1462
+ frameId = requestAnimationFrame(frameLoop);
1463
+ }
1464
+ update();
1465
+ return () => {
1466
+ var _resizeObserver2;
1467
+ ancestors.forEach(ancestor => {
1468
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1469
+ ancestorResize && ancestor.removeEventListener('resize', update);
1470
+ });
1471
+ cleanupIo == null || cleanupIo();
1472
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1473
+ resizeObserver = null;
1474
+ if (animationFrame) {
1475
+ cancelAnimationFrame(frameId);
1476
+ }
1477
+ };
1478
+ }
1479
+
1480
+ /**
1481
+ * Modifies the placement by translating the floating element along the
1482
+ * specified axes.
1483
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1484
+ * object may be passed.
1485
+ * @see https://floating-ui.com/docs/offset
1486
+ */
1487
+ const offset = offset$1;
1488
+
1489
+ /**
1490
+ * Optimizes the visibility of the floating element by shifting it in order to
1491
+ * keep it in view when it will overflow the clipping boundary.
1492
+ * @see https://floating-ui.com/docs/shift
1493
+ */
1494
+ const shift = shift$1;
1495
+
1496
+ /**
1497
+ * Optimizes the visibility of the floating element by flipping the `placement`
1498
+ * in order to keep it in view when the preferred placement(s) will overflow the
1499
+ * clipping boundary. Alternative to `autoPlacement`.
1500
+ * @see https://floating-ui.com/docs/flip
1501
+ */
1502
+ const flip = flip$1;
1503
+
1504
+ /**
1505
+ * Computes the `x` and `y` coordinates that will place the floating element
1506
+ * next to a given reference element.
1507
+ */
1508
+ const computePosition = (reference, floating, options) => {
1509
+ // This caches the expensive `getClippingElementAncestors` function so that
1510
+ // multiple lifecycle resets re-use the same result. It only lives for a
1511
+ // single call. If other functions become expensive, we can add them as well.
1512
+ const cache = new Map();
1513
+ const mergedOptions = {
1514
+ platform,
1515
+ ...options
1516
+ };
1517
+ const platformWithCache = {
1518
+ ...mergedOptions.platform,
1519
+ _c: cache
1520
+ };
1521
+ return computePosition$1(reference, floating, {
1522
+ ...mergedOptions,
1523
+ platform: platformWithCache
1524
+ });
1525
+ };
1526
+
1527
+ const lsTooltipCss = ".tooltip{position:absolute;background:black;color:white;padding:6px 10px;border-radius:4px;font-size:12px;z-index:1000}";
1528
+
1529
+ const LsTooltip = class {
1530
+ constructor(hostRef) {
1531
+ index.registerInstance(this, hostRef);
1532
+ }
1533
+ get el() { return index.getElement(this); }
1534
+ reference; // Direct reference to the element
1535
+ placement = 'top';
1536
+ visible = false;
1537
+ tooltipEl;
1538
+ cleanup;
1539
+ componentDidLoad() {
1540
+ const reference = this.reference;
1541
+ this.tooltipEl = this.el.shadowRoot.querySelector('.tooltip');
1542
+ if (reference && this.tooltipEl) {
1543
+ this.cleanup = autoUpdate(reference, this.tooltipEl, () => {
1544
+ computePosition(reference, this.tooltipEl, {
1545
+ placement: this.placement,
1546
+ middleware: [offset(8), flip(), shift()],
1547
+ }).then(({ x, y }) => {
1548
+ Object.assign(this.tooltipEl.style, {
1549
+ left: `${x}px`,
1550
+ top: `${y}px`,
1551
+ });
1552
+ });
1553
+ });
1554
+ reference.addEventListener('mouseenter', () => {
1555
+ this.visible = true;
1556
+ });
1557
+ reference.addEventListener('mouseleave', () => {
1558
+ this.visible = false;
1559
+ });
1560
+ }
1561
+ }
1562
+ disconnectedCallback() {
1563
+ this.cleanup?.();
1564
+ }
1565
+ render() {
1566
+ console.log('rendering tooltip', this.visible);
1567
+ return (index.h("div", { key: '46244ea42411e0a9bda06c979e7d945083f65620', class: "tooltip", style: { display: this.visible ? 'block' : 'none' } }, index.h("slot", { key: '02904415df5bbbdda2677da56f64d0128991c544' })));
1568
+ }
1569
+ };
1570
+ LsTooltip.style = lsTooltipCss;
1571
+
1572
+ exports.ls_tooltip = LsTooltip;
1573
+ //# sourceMappingURL=ls-tooltip.entry.cjs.js.map
1574
+
1575
+ //# sourceMappingURL=ls-tooltip.cjs.entry.js.map