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