@nanoporetech-digital/components 8.9.3 → 8.10.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 (260) hide show
  1. package/dist/cjs/{fade-DBKqk3wh.js → fade-CPjR03EH.js} +2 -2
  2. package/dist/cjs/{form-control-C6SZCtLY.js → form-control-Bq9Dlz-r.js} +1 -1
  3. package/dist/cjs/{fullscreen-lcdCtrG6.js → fullscreen-Bzjv2HGI.js} +2 -2
  4. package/dist/cjs/index-DGttnXif.js +4 -0
  5. package/dist/cjs/index.cjs.js +1 -1
  6. package/dist/cjs/{lazyload-BjSSEx9f.js → lazyload-BNO_n6W8.js} +2 -2
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/nano-accordion.cjs.entry.js +1 -1
  9. package/dist/cjs/nano-alert.cjs.entry.js +2 -2
  10. package/dist/cjs/nano-algolia-filter.cjs.entry.js +1 -1
  11. package/dist/cjs/nano-algolia-results.cjs.entry.js +1 -1
  12. package/dist/cjs/nano-algolia.cjs.entry.js +1 -1
  13. package/dist/cjs/nano-animation.cjs.entry.js +1 -1
  14. package/dist/cjs/nano-avatar_5.cjs.entry.js +22 -17
  15. package/dist/cjs/nano-card-carousel.cjs.entry.js +1 -1
  16. package/dist/cjs/nano-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +1 -1
  19. package/dist/cjs/nano-components.cjs.js +1 -1
  20. package/dist/cjs/{nano-data-table-8XMp5HkS.js → nano-data-table-B07AITiQ.js} +2 -2
  21. package/dist/cjs/nano-data-table.cjs.entry.js +2 -2
  22. package/dist/cjs/nano-datalist_3.cjs.entry.js +1 -1
  23. package/dist/cjs/nano-date-input.cjs.entry.js +1 -1
  24. package/dist/cjs/nano-date-picker_2.cjs.entry.js +2 -2
  25. package/dist/cjs/nano-details.cjs.entry.js +2 -2
  26. package/dist/cjs/nano-dialog.cjs.entry.js +2 -2
  27. package/dist/cjs/nano-dropdown_2.cjs.entry.js +2 -2
  28. package/dist/cjs/nano-field-validator.cjs.entry.js +1 -1
  29. package/dist/cjs/nano-file-upload.cjs.entry.js +1 -1
  30. package/dist/cjs/nano-global-nav.cjs.entry.js +1 -1
  31. package/dist/cjs/nano-grid_2.cjs.entry.js +1 -1
  32. package/dist/cjs/nano-hero.cjs.entry.js +1 -1
  33. package/dist/cjs/nano-icon-button_2.cjs.entry.js +3 -3
  34. package/dist/cjs/nano-icon.cjs.entry.js +1 -1
  35. package/dist/cjs/nano-in-page-nav.cjs.entry.js +2 -2
  36. package/dist/cjs/nano-increment.cjs.entry.js +1 -1
  37. package/dist/cjs/nano-input-otp.cjs.entry.js +8 -10
  38. package/dist/cjs/nano-intersection-observe.cjs.entry.js +2 -2
  39. package/dist/cjs/nano-masked-overflow.cjs.entry.js +4 -4
  40. package/dist/cjs/nano-menu-drawer.cjs.entry.js +4 -4
  41. package/dist/cjs/nano-more-less.cjs.entry.js +3 -3
  42. package/dist/cjs/nano-nav-item.cjs.entry.js +2 -2
  43. package/dist/cjs/nano-range.cjs.entry.js +1 -1
  44. package/dist/cjs/nano-rating.cjs.entry.js +5 -5
  45. package/dist/cjs/nano-resize-observe.cjs.entry.js +3 -3
  46. package/dist/cjs/nano-search-result.cjs.entry.js +17 -0
  47. package/dist/cjs/nano-slide.cjs.entry.js +2 -2
  48. package/dist/cjs/{nano-slides-CryCLfsK.js → nano-slides-C2K7j1yc.js} +8 -8
  49. package/dist/cjs/nano-slides.cjs.entry.js +2 -2
  50. package/dist/cjs/nano-sortable.cjs.entry.js +2 -2
  51. package/dist/cjs/nano-split-pane.cjs.entry.js +1 -1
  52. package/dist/cjs/nano-step-accordion.cjs.entry.js +2 -2
  53. package/dist/cjs/nano-step-breadcrumb.cjs.entry.js +3 -3
  54. package/dist/cjs/nano-sticker.cjs.entry.js +3 -3
  55. package/dist/cjs/nano-tab-content.cjs.entry.js +3 -3
  56. package/dist/cjs/nano-tab-group.cjs.entry.js +1 -1
  57. package/dist/cjs/nano-tab.cjs.entry.js +3 -3
  58. package/dist/cjs/nano-table.cjs.entry.js +3 -3
  59. package/dist/cjs/{page-dots-DR1fLjRi.js → page-dots-Db7Ce8kX.js} +2 -2
  60. package/dist/cjs/{renderer-CUTUqPQt.js → renderer-jVpDRMfV.js} +1 -0
  61. package/dist/cjs/{slot-CJgcluNw.js → slot-BUMYLmup.js} +19 -3
  62. package/dist/cjs/{table.worker-DBkvxXls.js → table.worker-Ctqp7IJT.js} +2 -2
  63. package/dist/collection/collection-manifest.json +1 -0
  64. package/dist/collection/components/breadcrumb/breadcrumb.js +1 -1
  65. package/dist/collection/components/global-search-results/global-search-results.css +2 -2
  66. package/dist/collection/components/global-search-results/global-search-results.js +17 -8
  67. package/dist/collection/components/input-otp/input-otp.css +24 -23
  68. package/dist/collection/components/input-otp/input-otp.js +9 -10
  69. package/dist/collection/components/intersection-observe/intersection-observe.js +1 -1
  70. package/dist/collection/components/masked-overflow/masked-overflow.js +3 -3
  71. package/dist/collection/components/menu-drawer/menu-drawer.js +2 -2
  72. package/dist/collection/components/more-less/more-less.js +2 -2
  73. package/dist/collection/components/rating/rating.js +4 -4
  74. package/dist/collection/components/resize-observe/resize-observe.js +2 -2
  75. package/dist/collection/components/search-result/search-result.css +41 -0
  76. package/dist/collection/components/search-result/search-result.js +25 -0
  77. package/dist/collection/components/select/select.js +7 -7
  78. package/dist/collection/components/slides/slide.js +1 -1
  79. package/dist/collection/components/slides/slides.js +3 -3
  80. package/dist/collection/components/sortable/sortable.js +1 -1
  81. package/dist/collection/components/step-accordion/step-accordion.js +1 -1
  82. package/dist/collection/components/step-breadcrumb/step-breadcrumb.js +2 -2
  83. package/dist/collection/components/sticker/sticker.js +2 -2
  84. package/dist/collection/components/table/table.js +2 -2
  85. package/dist/collection/components/tabs/tab-content.js +2 -2
  86. package/dist/collection/components/tabs/tab.js +2 -2
  87. package/dist/collection/components/tooltip/tooltip.js +2 -2
  88. package/dist/collection/utils/renderer.js +1 -0
  89. package/dist/collection/utils/slot.js +19 -3
  90. package/dist/components/global-search-results.js +12 -7
  91. package/dist/components/masked-overflow.js +3 -3
  92. package/dist/components/nano-input-otp.js +7 -10
  93. package/dist/components/nano-intersection-observe.js +1 -1
  94. package/dist/components/nano-menu-drawer.js +2 -2
  95. package/dist/components/nano-more-less.js +2 -2
  96. package/dist/components/nano-rating.js +4 -4
  97. package/dist/components/nano-search-result.d.ts +11 -0
  98. package/dist/components/nano-search-result.js +32 -0
  99. package/dist/components/nano-slide.js +1 -1
  100. package/dist/components/nano-sortable.js +1 -1
  101. package/dist/components/nano-step-accordion.js +1 -1
  102. package/dist/components/nano-step-breadcrumb.js +2 -2
  103. package/dist/components/nano-tab-content.js +2 -2
  104. package/dist/components/nano-tab.js +2 -2
  105. package/dist/components/nano-table.js +2 -2
  106. package/dist/components/renderer.js +1 -0
  107. package/dist/components/resize-observe.js +2 -2
  108. package/dist/components/select.js +7 -7
  109. package/dist/components/slides.js +3 -3
  110. package/dist/components/slot.js +19 -3
  111. package/dist/components/sticker.js +2 -2
  112. package/dist/components/tooltip.js +2 -2
  113. package/dist/esm/{fade-D980mOvm.js → fade-DWf-ekic.js} +2 -2
  114. package/dist/esm/{form-control-BCJMGxR_.js → form-control-BtblmnSm.js} +1 -1
  115. package/dist/esm/{fullscreen-CjInlYb9.js → fullscreen-DWET5K4U.js} +2 -2
  116. package/dist/esm/index-BM3Om9WE.js +4 -0
  117. package/dist/esm/index.js +2 -2
  118. package/dist/esm/{lazyload-B9B4e3ZI.js → lazyload-BSH0U2zW.js} +2 -2
  119. package/dist/esm/loader.js +1 -1
  120. package/dist/esm/nano-accordion.entry.js +1 -1
  121. package/dist/esm/nano-alert.entry.js +2 -2
  122. package/dist/esm/nano-algolia-filter.entry.js +1 -1
  123. package/dist/esm/nano-algolia-results.entry.js +1 -1
  124. package/dist/esm/nano-algolia.entry.js +1 -1
  125. package/dist/esm/nano-animation.entry.js +1 -1
  126. package/dist/esm/nano-avatar_5.entry.js +22 -17
  127. package/dist/esm/nano-card-carousel.entry.js +1 -1
  128. package/dist/esm/nano-checkbox-group.entry.js +1 -1
  129. package/dist/esm/nano-checkbox.entry.js +1 -1
  130. package/dist/esm/nano-collapsible-comparison.entry.js +1 -1
  131. package/dist/esm/nano-components.js +1 -1
  132. package/dist/esm/{nano-data-table-CSTxipPc.js → nano-data-table-B3_-hFqj.js} +2 -2
  133. package/dist/esm/nano-data-table.entry.js +2 -2
  134. package/dist/esm/nano-datalist_3.entry.js +1 -1
  135. package/dist/esm/nano-date-input.entry.js +1 -1
  136. package/dist/esm/nano-date-picker_2.entry.js +2 -2
  137. package/dist/esm/nano-details.entry.js +2 -2
  138. package/dist/esm/nano-dialog.entry.js +2 -2
  139. package/dist/esm/nano-dropdown_2.entry.js +2 -2
  140. package/dist/esm/nano-field-validator.entry.js +1 -1
  141. package/dist/esm/nano-file-upload.entry.js +1 -1
  142. package/dist/esm/nano-global-nav.entry.js +1 -1
  143. package/dist/esm/nano-grid_2.entry.js +1 -1
  144. package/dist/esm/nano-hero.entry.js +1 -1
  145. package/dist/esm/nano-icon-button_2.entry.js +3 -3
  146. package/dist/esm/nano-icon.entry.js +1 -1
  147. package/dist/esm/nano-in-page-nav.entry.js +2 -2
  148. package/dist/esm/nano-increment.entry.js +1 -1
  149. package/dist/esm/nano-input-otp.entry.js +8 -10
  150. package/dist/esm/nano-intersection-observe.entry.js +2 -2
  151. package/dist/esm/nano-masked-overflow.entry.js +4 -4
  152. package/dist/esm/nano-menu-drawer.entry.js +4 -4
  153. package/dist/esm/nano-more-less.entry.js +3 -3
  154. package/dist/esm/nano-nav-item.entry.js +2 -2
  155. package/dist/esm/nano-range.entry.js +1 -1
  156. package/dist/esm/nano-rating.entry.js +5 -5
  157. package/dist/esm/nano-resize-observe.entry.js +3 -3
  158. package/dist/esm/nano-search-result.entry.js +15 -0
  159. package/dist/esm/nano-slide.entry.js +2 -2
  160. package/dist/esm/{nano-slides-xbY6lXX9.js → nano-slides-BU8CjO-X.js} +8 -8
  161. package/dist/esm/nano-slides.entry.js +2 -2
  162. package/dist/esm/nano-sortable.entry.js +2 -2
  163. package/dist/esm/nano-split-pane.entry.js +1 -1
  164. package/dist/esm/nano-step-accordion.entry.js +2 -2
  165. package/dist/esm/nano-step-breadcrumb.entry.js +3 -3
  166. package/dist/esm/nano-sticker.entry.js +3 -3
  167. package/dist/esm/nano-tab-content.entry.js +3 -3
  168. package/dist/esm/nano-tab-group.entry.js +1 -1
  169. package/dist/esm/nano-tab.entry.js +3 -3
  170. package/dist/esm/nano-table.entry.js +3 -3
  171. package/dist/esm/{page-dots-CCfERISy.js → page-dots-Ckyic5vY.js} +2 -2
  172. package/dist/esm/{renderer-DasB4P10.js → renderer-DpNDfhNy.js} +1 -0
  173. package/dist/esm/{slot-CFTP7C_Z.js → slot-D31cEKyt.js} +19 -3
  174. package/dist/esm/{table.worker-DxcSnyg3.js → table.worker-By3ZdRHH.js} +2 -2
  175. package/dist/nano-components/{fade-D980mOvm.js → fade-DWf-ekic.js} +1 -1
  176. package/dist/nano-components/{form-control-BCJMGxR_.js → form-control-BtblmnSm.js} +1 -1
  177. package/dist/nano-components/{fullscreen-CjInlYb9.js → fullscreen-DWET5K4U.js} +1 -1
  178. package/dist/nano-components/index.esm.js +1 -1
  179. package/dist/nano-components/{lazyload-B9B4e3ZI.js → lazyload-BSH0U2zW.js} +1 -1
  180. package/dist/nano-components/nano-accordion.entry.js +1 -1
  181. package/dist/nano-components/nano-alert.entry.js +1 -1
  182. package/dist/nano-components/nano-algolia-filter.entry.js +1 -1
  183. package/dist/nano-components/nano-algolia-results.entry.js +1 -1
  184. package/dist/nano-components/nano-algolia.entry.js +1 -1
  185. package/dist/nano-components/nano-animation.entry.js +1 -1
  186. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  187. package/dist/nano-components/nano-card-carousel.entry.js +1 -1
  188. package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
  189. package/dist/nano-components/nano-checkbox.entry.js +1 -1
  190. package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
  191. package/dist/nano-components/nano-components.css +77 -1
  192. package/dist/nano-components/nano-components.esm.js +1 -1
  193. package/dist/nano-components/{nano-data-table-CSTxipPc.js → nano-data-table-B3_-hFqj.js} +1 -1
  194. package/dist/nano-components/nano-data-table.entry.js +1 -1
  195. package/dist/nano-components/nano-datalist_3.entry.js +1 -1
  196. package/dist/nano-components/nano-date-input.entry.js +1 -1
  197. package/dist/nano-components/nano-date-picker_2.entry.js +1 -1
  198. package/dist/nano-components/nano-details.entry.js +1 -1
  199. package/dist/nano-components/nano-dialog.entry.js +1 -1
  200. package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
  201. package/dist/nano-components/nano-field-validator.entry.js +1 -1
  202. package/dist/nano-components/nano-file-upload.entry.js +1 -1
  203. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  204. package/dist/nano-components/nano-grid_2.entry.js +1 -1
  205. package/dist/nano-components/nano-hero.entry.js +1 -1
  206. package/dist/nano-components/nano-icon-button_2.entry.js +1 -1
  207. package/dist/nano-components/nano-icon.entry.js +1 -1
  208. package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
  209. package/dist/nano-components/nano-increment.entry.js +1 -1
  210. package/dist/nano-components/nano-input-otp.entry.js +1 -1
  211. package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
  212. package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
  213. package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
  214. package/dist/nano-components/nano-more-less.entry.js +1 -1
  215. package/dist/nano-components/nano-nav-item.entry.js +1 -1
  216. package/dist/nano-components/nano-range.entry.js +1 -1
  217. package/dist/nano-components/nano-rating.entry.js +1 -1
  218. package/dist/nano-components/nano-resize-observe.entry.js +1 -1
  219. package/dist/nano-components/nano-search-result.entry.js +4 -0
  220. package/dist/nano-components/nano-slide.entry.js +1 -1
  221. package/dist/nano-components/{nano-slides-xbY6lXX9.js → nano-slides-BU8CjO-X.js} +4 -4
  222. package/dist/nano-components/nano-slides.entry.js +1 -1
  223. package/dist/nano-components/nano-sortable.entry.js +1 -1
  224. package/dist/nano-components/nano-split-pane.entry.js +1 -1
  225. package/dist/nano-components/nano-step-accordion.entry.js +1 -1
  226. package/dist/nano-components/nano-step-breadcrumb.entry.js +1 -1
  227. package/dist/nano-components/nano-sticker.entry.js +1 -1
  228. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  229. package/dist/nano-components/nano-tab-group.entry.js +1 -1
  230. package/dist/nano-components/nano-tab.entry.js +1 -1
  231. package/dist/nano-components/nano-table.entry.js +1 -1
  232. package/dist/nano-components/{page-dots-CCfERISy.js → page-dots-Ckyic5vY.js} +1 -1
  233. package/dist/nano-components/renderer-DpNDfhNy.js +4 -0
  234. package/dist/nano-components/slot-D31cEKyt.js +4 -0
  235. package/dist/nano-components/{table.worker-DxcSnyg3.js → table.worker-By3ZdRHH.js} +1 -1
  236. package/dist/style/components.css +1 -1
  237. package/dist/style/components.css.map +1 -1
  238. package/dist/style/nano.css +1 -1
  239. package/dist/style/nano.css.map +1 -1
  240. package/dist/types/components/global-search-results/global-search-results.d.ts +1 -1
  241. package/dist/types/components/input-otp/input-otp.d.ts +4 -1
  242. package/dist/types/components/search-result/search-result.d.ts +14 -0
  243. package/dist/types/components.d.ts +42 -5
  244. package/docs-json.json +103 -42
  245. package/docs-vscode.json +8 -0
  246. package/hydrate/index.js +105 -58
  247. package/hydrate/index.mjs +105 -58
  248. package/package.json +2 -2
  249. package/dist/nano-components/renderer-DasB4P10.js +0 -4
  250. package/dist/nano-components/slot-CFTP7C_Z.js +0 -4
  251. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/generate-vue-component.d.ts +0 -0
  252. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/index.d.ts +0 -0
  253. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/output-vue.d.ts +0 -0
  254. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/plugin.d.ts +0 -0
  255. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/types.d.ts +0 -0
  256. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/plugins/stencil/vue-output/utils.d.ts +0 -0
  257. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/stencil.config.d.ts +0 -0
  258. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
  259. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/testing/mocks/intersection-observer.d.ts +0 -0
  260. /package/dist/types/builds/{MHdwmaDa → bsFinusk}/0/Digital/nano-components/packages/components/.stencil/wdio.conf.d.ts +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{r as t,c as i,g as s,a as e}from"./index-BM3Om9WE.js";import{a as h}from"./dom-dlicJTEJ.js";import{d as n}from"./throttle-C93FMm2Z.js";import{f as o}from"./scroll-1nFw8CNk.js";import{t as r,h as a}from"./renderer-DasB4P10.js";function c(t,i){const s=i instanceof Document?document.documentElement:i;return h(t,s)}const d=class{constructor(s){t(this,s),this.nanoStuck=i(this,"nanoStuck",7),this.nanoUnstuck=i(this,"nanoUnstuck",7),this.nanoHide=i(this,"nanoHide",7),this.nanoShow=i(this,"nanoShow",7)}isRtl=!1;io;contentSizeObserver;parentSizeObserver;sticker;content;scrollPosCache=0;scrollPosThresholdCache=0;cacheOffset=0;slottedContent;pauseResizeWatcher=!1;listenForScrollParent=!1;stickToEleInitSize;positions=[];pauseHide=!1;hasBootstrapped=!1;get host(){return s(this)}isStuck=!1;isRootSticker=!0;hide=!1;scrollHide=!1;multiStickerHide=!1;scrollingTo=!1;quietModeIsOn=!1;stuckCounter=0;stickerIndex=0;stickToEle;triggerPos;trigger;_offset=0;autoResize=!0;isSticky=!0;offset=0;position="top";quietMode={h:600,w:600};hideOnNewStickers=!0;breakPointMax=null;breakPointMin=null;scrollParent;stickTo;nanoStuck;nanoUnstuck;nanoHide;nanoShow;async isHiding(){return this.hide}async isSticking(){return this.shouldStick(),this.isStuck}async setTriggerPos(t){return this._offset=t}async getTriggerPos(){return this.triggerPos}async pauseHiding(t){this.pauseHide=t}updateTriggerOffset(){this.trigger&&this.scrollParent&&this.listenForScrollParent&&(this.triggerPos=c(this.trigger,this.scrollParent))}stickerResizeListener(){this.content&&window.ResizeObserver&&(this.contentSizeObserver&&(this.contentSizeObserver.disconnect(),this.contentSizeObserver=void 0),this.contentSizeObserver=new ResizeObserver((t=>{for(const i of t){if(this.pauseResizeWatcher)return;i.contentRect.height&&("top"===this.position&&(this.host.style.height=i.contentRect.height+"px"),"bottom"===this.position&&(this.host.style.minHeight=i.contentRect.height+"px"))}})),this.contentSizeObserver.observe(this.content))}quietModeChange(){"on"===this.quietMode?requestAnimationFrame((()=>this.quietModeIsOn=!0)):"off"===this.quietMode&&requestAnimationFrame((()=>this.quietModeIsOn=!1))}setOffset(){let t,i,s,e;this.trigger&&this.trigger.setAttribute("style","");const h=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!h)return;"object"==typeof this.offset?({v:t,h:i}=this.offset):t=i=this.offset,"object"==typeof this._offset?({v:t=s,h:i=e}=this._offset):s=e=this._offset;const n=s=>{const e=s.match(/(top|bottom)/)?t:i;o(s),h.style[s]=e+"px",this.host.style.setProperty("--hide-transform-amount",e?`(110% + ${e}px)`:null)},o=h=>{const n=h.match(/(top|bottom)/)?t+s:i+e;this.trigger.style[h]=-1*n+"px",this.trigger.style.position="relative",this.trigger.style.minHeight="1px",this.trigger.style.maxHeight="1px",this.trigger.style.overflow="hidden"};(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)&&n("right"),(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)&&n("left"),this.positions.includes("top")&&n("top"),this.positions.includes("bottom")&&n("bottom")}positionChange(){this.positions=this.position.split("-"),this.setOffset()}async stuckChange(){this.isStuck?this.stickToEle?(this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{this.stickToEle.appendChild(t),t.style.order=this.stickerIndex+""})),this.nanoStuck.emit({sticker:this.stickToEle})):this.nanoStuck.emit({sticker:this.host}):(this.scrollHide=!1,this.stickToEle?(this.slottedContent.forEach((t=>{this.host.appendChild(t),t.style.order=""})),this.nanoUnstuck.emit({sticker:this.stickToEle})):this.nanoUnstuck.emit({sticker:this.host}))}attachScrollListeners(){this.quietModeIsOn?this.scrollParent.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}):this.scrollParent&&(this.scrollParent.removeEventListener("scroll",this.onScroll),this.moveTrigger(!0))}handleParentEvents(t,i=null){this.listenForScrollParent&&(i&&this.manageListenersOnParent(!1,i),this.scrollParent&&this.manageListenersOnParent(!this.stickToEle))}stickToEleChange(t,i){this.stickToEle&&(this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)),i&&(i.removeEventListener("nanoHide",this.onStickToDisplayEvent),i.removeEventListener("nanoShow",this.onStickToDisplayEvent),i.removeEventListener("nanoStuck",this.onStickToDisplayEvent),i.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent))}stickToChange(){this.stickToEle="string"==typeof this.stickTo?this.scrollParent.querySelector(this.stickTo):this.stickTo?this.stickTo:void 0}visibilityDecisionHandler(){this.hide=!(!this.multiStickerHide&&!this.scrollHide)}handleHideChange(){this.hide?this.nanoHide.emit({sticker:this.host}):this.nanoShow.emit({sticker:this.host})}setupIO(){if(this.io&&(this.io.disconnect(),this.io=void 0),!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;let t=this.scrollParent;this.scrollParent instanceof Document&&(t=null),this.io=new window.IntersectionObserver((t=>{!this.pauseResizeWatcher&&this.isSticky&&this.shouldStick(t.slice(-1)[0])}),{root:t}),this.io.observe(this.trigger)}setupParentResizeListener=()=>{if(!window.ResizeObserver)return;this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.parentSizeObserver=new ResizeObserver((t=>{for(const i of t){let t,s;i.contentRect.height&&(t=i.contentRect.height),i.contentRect.width&&(s=i.contentRect.width),"object"==typeof this.quietMode&&(this.quietModeIsOn=s<this.quietMode.w||t<this.quietMode.h),this.breakPointMin&&(this.isSticky=s>this.breakPointMin),this.breakPointMax&&(this.isSticky=s<this.breakPointMax),this.isRootSticker&&this.sticker&&this.autoResize&&(this.sticker.style.width=this.host.scrollWidth+"px")}}));const t=this.scrollParent instanceof Document?this.scrollParent.documentElement:this.scrollParent;t&&this.parentSizeObserver.observe(t)};onStickToDisplayEvent=t=>{if(t.detail.sticker===this.stickToEle)switch(t.type){case"nanoHide":this._offset=0,this.cacheOffset=this.offset,this.offset=0,this.isStuck||this.moveTrigger(!1),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight=this.stickToEleInitSize.height+(this.host.scrollHeight+("object"==typeof this.cacheOffset?this.cacheOffset.v:this.cacheOffset))+"px",this.stickToEle.setTriggerPos(-1*this.stickToEleInitSize.height)}));break;case"nanoShow":this._offset=this.stickToEleInitSize.height,this.offset=this.cacheOffset,this.moveTrigger(!0),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight="",this.stickToEle.setTriggerPos(0)}));break;case"nanoStuck":this.stickToEleInitSize=this.stickToEle.getBoundingClientRect(),this._offset=this.stickToEleInitSize.height}};manageListenersOnParent(t,i){const s=i||this.scrollParent;if(s){if(t)s.addEventListener("nanoStuck",this.onStickEvent),s.addEventListener("nanoUnstuck",this.onStickEvent),this.quietModeIsOn&&this.attachScrollListeners();else try{this.quietModeIsOn&&s.removeEventListener("scroll",this.onScroll),s.removeEventListener("nanoStuck",this.onStickEvent),s.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(t){console.error("Events haven`t been added")}this.setupParentResizeListener()}}onStickEvent=async t=>{const i=t.detail?t.detail.sticker:null;if(!i||i.position!==this.position)return;const s=await i.getTriggerPos();if("nanoStuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex++,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.multiStickerHide=!0,this.stuckCounter++)}if("nanoUnstuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex--,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.stuckCounter--,this.stuckCounter<1&&(this.multiStickerHide=!1))}};onScroll=()=>{const t=(i=this.scrollParent)instanceof Document?window.pageYOffset:i.scrollTop;var i;t<this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollAway(t):this.handleScrollTo()),t>this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollTo():this.handleScrollAway(t)),this.scrollPosCache=t};handleScrollTo(){this.scrollPosThresholdCache=null,this.scrollHide&&(!0!==this.scrollingTo&&(this._offset=this.cacheOffset||this._offset),this.scrollingTo=!0,this.scrollHide=!1)}handleScrollAway(t){this.scrollHide||this.isStuck&&(!1!==this.scrollingTo&&(this.cacheOffset=this._offset,this._offset=0),this.scrollingTo=!1,this.scrollPosThresholdCache?!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100&&(this.scrollHide=!0):this.scrollPosThresholdCache=t)}moveTrigger(t){this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t?this.host.parentNode.insertBefore(this.trigger,this.host):this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)}shouldStick(t){let i;if(this.positions.includes("top"))i=this.isRootSticker?this.trigger.getBoundingClientRect().top:c(this.trigger,this.scrollParent).top,this.isStuck=i<-1;else if(this.positions.includes("bottom")){i=this.trigger.getBoundingClientRect().top;const s=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=!t.isIntersecting||i>s.height+s.top}}bootstrapGurantor(){this.hasBootstrapped=!0;const t=this.scrollParent||o(this.host);this.scrollParent=t===document.documentElement?document:t,this.isRootSticker=this.scrollParent instanceof Document,this.trigger=this.trigger||document.createElement("div"),this.trigger.innerHTML="&nbsp;",this.trigger.classList.add("sticker-trigger"),this.positionChange(),this.moveTrigger(!0),this.quietModeChange(),this.listenForScrollParent=!0,this.handleParentEvents(!0),this.stickerIndex=Array.from(this.scrollParent.querySelectorAll(r("nano-sticker"))).filter((t=>t.position===this.position)).findIndex((t=>t===this.host)),this.setOffset(),this.stickerResizeListener(),this.setupParentResizeListener(),this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{t.style.order=this.stickerIndex+""})),this.updateTriggerOffset(),this.stickToChange(),this.setupIO(),this.onStickToDisplayEvent=n(this.onStickToDisplayEvent,50)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir,setTimeout((()=>{this.hasBootstrapped||this.bootstrapGurantor()}),1e3)}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0),this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.scrollParent=null,this.hasBootstrapped=!1}render(){return a(e,{key:"6626d945b580e7e23d940db522958250e89261ad",sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start"),class:"nano-sticker"},a("div",{key:"1e4b7f859218a5ed2256f7f860dcffa4b1b8f5be",class:{sticker:!0,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:t=>this.sticker=t},a("div",{key:"4f7cd61f38b78433296a9708ddbd702d97cf2435",class:"sticker-content",ref:t=>this.content=t},a("slot",{key:"a88a8500ee1ea99324f9b1b7390675486035496c"}))))}static get watchers(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}}};d.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-z-index-menubar);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}';export{d as nano_sticker}
4
+ import{r as t,c as i,g as s,a as e}from"./index-BM3Om9WE.js";import{a as h}from"./dom-dlicJTEJ.js";import{d as n}from"./throttle-C93FMm2Z.js";import{f as o}from"./scroll-1nFw8CNk.js";import{t as r,h as a}from"./renderer-DpNDfhNy.js";function c(t,i){const s=i instanceof Document?document.documentElement:i;return h(t,s)}const d=class{constructor(s){t(this,s),this.nanoStuck=i(this,"nanoStuck",7),this.nanoUnstuck=i(this,"nanoUnstuck",7),this.nanoHide=i(this,"nanoHide",7),this.nanoShow=i(this,"nanoShow",7)}isRtl=!1;io;contentSizeObserver;parentSizeObserver;sticker;content;scrollPosCache=0;scrollPosThresholdCache=0;cacheOffset=0;slottedContent;pauseResizeWatcher=!1;listenForScrollParent=!1;stickToEleInitSize;positions=[];pauseHide=!1;hasBootstrapped=!1;get host(){return s(this)}isStuck=!1;isRootSticker=!0;hide=!1;scrollHide=!1;multiStickerHide=!1;scrollingTo=!1;quietModeIsOn=!1;stuckCounter=0;stickerIndex=0;stickToEle;triggerPos;trigger;_offset=0;autoResize=!0;isSticky=!0;offset=0;position="top";quietMode={h:600,w:600};hideOnNewStickers=!0;breakPointMax=null;breakPointMin=null;scrollParent;stickTo;nanoStuck;nanoUnstuck;nanoHide;nanoShow;async isHiding(){return this.hide}async isSticking(){return this.shouldStick(),this.isStuck}async setTriggerPos(t){return this._offset=t}async getTriggerPos(){return this.triggerPos}async pauseHiding(t){this.pauseHide=t}updateTriggerOffset(){this.trigger&&this.scrollParent&&this.listenForScrollParent&&(this.triggerPos=c(this.trigger,this.scrollParent))}stickerResizeListener(){this.content&&window.ResizeObserver&&(this.contentSizeObserver&&(this.contentSizeObserver.disconnect(),this.contentSizeObserver=void 0),this.contentSizeObserver=new ResizeObserver((t=>{for(const i of t){if(this.pauseResizeWatcher)return;i.contentRect.height&&("top"===this.position&&(this.host.style.height=i.contentRect.height+"px"),"bottom"===this.position&&(this.host.style.minHeight=i.contentRect.height+"px"))}})),this.contentSizeObserver.observe(this.content))}quietModeChange(){"on"===this.quietMode?requestAnimationFrame((()=>this.quietModeIsOn=!0)):"off"===this.quietMode&&requestAnimationFrame((()=>this.quietModeIsOn=!1))}setOffset(){let t,i,s,e;this.trigger&&this.trigger.setAttribute("style","");const h=this.isRootSticker||this.stickToEle?this.sticker:this.host;if(!h)return;"object"==typeof this.offset?({v:t,h:i}=this.offset):t=i=this.offset,"object"==typeof this._offset?({v:t=s,h:i=e}=this._offset):s=e=this._offset;const n=s=>{const e=s.match(/(top|bottom)/)?t:i;o(s),h.style[s]=e+"px",this.host.style.setProperty("--hide-transform-amount",e?`(110% + ${e}px)`:null)},o=h=>{const n=h.match(/(top|bottom)/)?t+s:i+e;this.trigger.style[h]=-1*n+"px",this.trigger.style.position="relative",this.trigger.style.minHeight="1px",this.trigger.style.maxHeight="1px",this.trigger.style.overflow="hidden"};(this.positions.includes("start")&&this.isRtl||this.positions.includes("end")&&!this.isRtl)&&n("right"),(this.positions.includes("end")&&this.isRtl||this.positions.includes("start")&&!this.isRtl)&&n("left"),this.positions.includes("top")&&n("top"),this.positions.includes("bottom")&&n("bottom")}positionChange(){this.positions=this.position.split("-"),this.setOffset()}async stuckChange(){this.isStuck?this.stickToEle?(this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{this.stickToEle.appendChild(t),t.style.order=this.stickerIndex+""})),this.nanoStuck.emit({sticker:this.stickToEle})):this.nanoStuck.emit({sticker:this.host}):(this.scrollHide=!1,this.stickToEle?(this.slottedContent.forEach((t=>{this.host.appendChild(t),t.style.order=""})),this.nanoUnstuck.emit({sticker:this.stickToEle})):this.nanoUnstuck.emit({sticker:this.host}))}attachScrollListeners(){this.quietModeIsOn?this.scrollParent.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}):this.scrollParent&&(this.scrollParent.removeEventListener("scroll",this.onScroll),this.moveTrigger(!0))}handleParentEvents(t,i=null){this.listenForScrollParent&&(i&&this.manageListenersOnParent(!1,i),this.scrollParent&&this.manageListenersOnParent(!this.stickToEle))}stickToEleChange(t,i){this.stickToEle&&(this.stickToEle.addEventListener("nanoHide",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoShow",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoStuck",this.onStickToDisplayEvent),this.stickToEle.addEventListener("nanoUnstuck",this.onStickToDisplayEvent)),i&&(i.removeEventListener("nanoHide",this.onStickToDisplayEvent),i.removeEventListener("nanoShow",this.onStickToDisplayEvent),i.removeEventListener("nanoStuck",this.onStickToDisplayEvent),i.removeEventListener("nanoUnstuck",this.onStickToDisplayEvent))}stickToChange(){this.stickToEle="string"==typeof this.stickTo?this.scrollParent.querySelector(this.stickTo):this.stickTo?this.stickTo:void 0}visibilityDecisionHandler(){this.hide=!(!this.multiStickerHide&&!this.scrollHide)}handleHideChange(){this.hide?this.nanoHide.emit({sticker:this.host}):this.nanoShow.emit({sticker:this.host})}setupIO(){if(this.io&&(this.io.disconnect(),this.io=void 0),!this.scrollParent||!this.hasBootstrapped||!this.trigger)return;this.isRootSticker=this.scrollParent instanceof Document;let t=this.scrollParent;this.scrollParent instanceof Document&&(t=null),this.io=new window.IntersectionObserver((t=>{!this.pauseResizeWatcher&&this.isSticky&&this.shouldStick(t.slice(-1)[0])}),{root:t}),this.io.observe(this.trigger)}setupParentResizeListener=()=>{if(!window.ResizeObserver)return;this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.parentSizeObserver=new ResizeObserver((t=>{for(const i of t){let t,s;i.contentRect.height&&(t=i.contentRect.height),i.contentRect.width&&(s=i.contentRect.width),"object"==typeof this.quietMode&&(this.quietModeIsOn=s<this.quietMode.w||t<this.quietMode.h),this.breakPointMin&&(this.isSticky=s>this.breakPointMin),this.breakPointMax&&(this.isSticky=s<this.breakPointMax),this.isRootSticker&&this.sticker&&this.autoResize&&(this.sticker.style.width=this.host.scrollWidth+"px")}}));const t=this.scrollParent instanceof Document?this.scrollParent.documentElement:this.scrollParent;t&&this.parentSizeObserver.observe(t)};onStickToDisplayEvent=t=>{if(t.detail.sticker===this.stickToEle)switch(t.type){case"nanoHide":this._offset=0,this.cacheOffset=this.offset,this.offset=0,this.isStuck||this.moveTrigger(!1),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight=this.stickToEleInitSize.height+(this.host.scrollHeight+("object"==typeof this.cacheOffset?this.cacheOffset.v:this.cacheOffset))+"px",this.stickToEle.setTriggerPos(-1*this.stickToEleInitSize.height)}));break;case"nanoShow":this._offset=this.stickToEleInitSize.height,this.offset=this.cacheOffset,this.moveTrigger(!0),!this.isRootSticker&&this.quietModeIsOn&&requestAnimationFrame((()=>{this.stickToEle.style.minHeight="",this.stickToEle.setTriggerPos(0)}));break;case"nanoStuck":this.stickToEleInitSize=this.stickToEle.getBoundingClientRect(),this._offset=this.stickToEleInitSize.height}};manageListenersOnParent(t,i){const s=i||this.scrollParent;if(s){if(t)s.addEventListener("nanoStuck",this.onStickEvent),s.addEventListener("nanoUnstuck",this.onStickEvent),this.quietModeIsOn&&this.attachScrollListeners();else try{this.quietModeIsOn&&s.removeEventListener("scroll",this.onScroll),s.removeEventListener("nanoStuck",this.onStickEvent),s.removeEventListener("nanoUnstuck",this.onStickEvent)}catch(t){console.error("Events haven`t been added")}this.setupParentResizeListener()}}onStickEvent=async t=>{const i=t.detail?t.detail.sticker:null;if(!i||i.position!==this.position)return;const s=await i.getTriggerPos();if("nanoStuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex++,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.multiStickerHide=!0,this.stuckCounter++)}if("nanoUnstuck"===t.type&&i!==this.host&&i.scrollParent===this.host.scrollParent){if(this.stickerIndex--,!this.hideOnNewStickers)return;(this.positions.includes("top")&&this.triggerPos.top<s.top||this.positions.includes("bottom")&&this.triggerPos.top>s.top)&&(this.stuckCounter--,this.stuckCounter<1&&(this.multiStickerHide=!1))}};onScroll=()=>{const t=(i=this.scrollParent)instanceof Document?window.pageYOffset:i.scrollTop;var i;t<this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollAway(t):this.handleScrollTo()),t>this.scrollPosCache&&(this.positions.includes("bottom")?this.handleScrollTo():this.handleScrollAway(t)),this.scrollPosCache=t};handleScrollTo(){this.scrollPosThresholdCache=null,this.scrollHide&&(!0!==this.scrollingTo&&(this._offset=this.cacheOffset||this._offset),this.scrollingTo=!0,this.scrollHide=!1)}handleScrollAway(t){this.scrollHide||this.isStuck&&(!1!==this.scrollingTo&&(this.cacheOffset=this._offset,this._offset=0),this.scrollingTo=!1,this.scrollPosThresholdCache?!this.pauseHide&&Math.abs(t-this.scrollPosThresholdCache)>100&&(this.scrollHide=!0):this.scrollPosThresholdCache=t)}moveTrigger(t){this.positions.includes("bottom")&&!t||!this.positions.includes("bottom")&&t?this.host.parentNode.insertBefore(this.trigger,this.host):this.host.parentNode.insertBefore(this.trigger,this.host.nextSibling)}shouldStick(t){let i;if(this.positions.includes("top"))i=this.isRootSticker?this.trigger.getBoundingClientRect().top:c(this.trigger,this.scrollParent).top,this.isStuck=i<-1;else if(this.positions.includes("bottom")){i=this.trigger.getBoundingClientRect().top;const s=t&&t.rootBounds?t.rootBounds:(this.scrollParent instanceof Document?document.documentElement:this.scrollParent).getBoundingClientRect();this.isStuck=!t.isIntersecting||i>s.height+s.top}}bootstrapGurantor(){this.hasBootstrapped=!0;const t=this.scrollParent||o(this.host);this.scrollParent=t===document.documentElement?document:t,this.isRootSticker=this.scrollParent instanceof Document,this.trigger=this.trigger||document.createElement("div"),this.trigger.innerHTML="&nbsp;",this.trigger.classList.add("sticker-trigger"),this.positionChange(),this.moveTrigger(!0),this.quietModeChange(),this.listenForScrollParent=!0,this.handleParentEvents(!0),this.stickerIndex=Array.from(this.scrollParent.querySelectorAll(r("nano-sticker"))).filter((t=>t.position===this.position)).findIndex((t=>t===this.host)),this.setOffset(),this.stickerResizeListener(),this.setupParentResizeListener(),this.slottedContent=Array.from(this.host.children),this.slottedContent.forEach((t=>{t.style.order=this.stickerIndex+""})),this.updateTriggerOffset(),this.stickToChange(),this.setupIO(),this.onStickToDisplayEvent=n(this.onStickToDisplayEvent,50)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir,setTimeout((()=>{this.hasBootstrapped||this.bootstrapGurantor()}),1e3)}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0),this.parentSizeObserver&&(this.parentSizeObserver.disconnect(),this.parentSizeObserver=void 0),this.scrollParent=null,this.hasBootstrapped=!1}render(){return a(e,{key:"f339585bb8f9d509f374404a6462b482ee7f7001",sticky:!this.isRootSticker&&!this.stickToEle&&this.isSticky,hide:this.hide&&this.isStuck,siblings:this.stuckCounter,index:this.stickerIndex,stuck:this.isStuck&&this.isSticky,"placed-bottom":this.positions.includes("bottom"),"placed-top":this.positions.includes("top"),"placed-end":this.positions.includes("end"),"placed-start":this.positions.includes("start"),class:"nano-sticker"},a("div",{key:"a0825842c7fb6fd7ab7e15a6775547693e38c1cb",class:{sticker:!0,sticky:this.isRootSticker&&this.isSticky,stuck:this.isStuck&&this.isRootSticker&&this.isSticky,hide:this.isRootSticker&&this.hide&&this.isStuck},ref:t=>this.sticker=t},a("div",{key:"3693b4a7c4daf5b5208b36a158b0d0b1f3ced9b0",class:"sticker-content",ref:t=>this.content=t},a("slot",{key:"526f2d5e88882133ec67866d90cdf18b95ce86cc"}))))}static get watchers(){return{trigger:["updateTriggerOffset"],scrollParent:["updateTriggerOffset","handleParentEvents","setupIO"],position:["stickerResizeListener","positionChange"],quietMode:["quietModeChange"],offset:["setOffset"],_offset:["setOffset"],isStuck:["stuckChange"],quietModeIsOn:["attachScrollListeners"],stickToEle:["handleParentEvents","stickToEleChange"],stickTo:["stickToChange"],multiStickerHide:["visibilityDecisionHandler"],scrollHide:["visibilityDecisionHandler"],hide:["handleHideChange"]}}};d.style=':host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--stuck-left:initial;--stuck-right:initial;--stuck-z-index:var(--nano-z-index-menubar);--top-hide:translateY(-110%);--bottom-hide:translateY(110%);display:block;max-inline-size:100%}:host([sticky]){position:sticky;transition:0.3s ease transform;will-change:min-block-size}:host([sticky][stuck]){inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index) !important}:host([sticky][hide][placed-top]){transform:var(--top-hide)}:host([sticky][hide][placed-bottom]){transform:var(--bottom-hide)}:host([sticky][index="1"]){z-index:calc(var(--stuck-z-index) + 1)}:host([sticky][index="2"]){z-index:calc(var(--stuck-z-index) + 2)}:host([sticky][index="3"]){z-index:calc(var(--stuck-z-index) + 3)}:host([sticky][index="4"]){z-index:calc(var(--stuck-z-index) + 4)}:host([sticky][index="5"]){z-index:calc(var(--stuck-z-index) + 5)}.sticker{display:inherit;max-inline-size:inherit;inline-size:100%}.sticker:not(.stuck){inline-size:auto !important}.sticker.sticky{transition:0.3s ease all;position:relative}:host([index="1"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 1)}:host([index="2"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 2)}:host([index="3"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 3)}:host([index="4"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 4)}:host([index="5"]) .sticker.sticky{z-index:calc(var(--stuck-z-index) + 5)}.sticker.stuck{position:fixed;inset-inline:var(--stuck-left) var(--stuck-right);z-index:var(--stuck-z-index);transform:translateY(0)}:host([placed-top]) .sticker.stuck{inset-block-start:0}:host([placed-bottom]) .sticker.stuck{inset-block-end:0}:host([placed-top]) .sticker.stuck.hide{transform:var(--top-hide)}:host([placed-bottom]) .sticker.stuck.hide{transform:var(--bottom-hide)}.sticker-content{display:flex;flex-wrap:wrap}';export{d as nano_sticker}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{r as t,g as a,a as n}from"./index-BM3Om9WE.js";import{h as e}from"./renderer-DasB4P10.js";let o=0;const i=class{constructor(a){t(this,a)}tabContentId="nano-tab-content-"+ ++o;ready=!1;get host(){return a(this)}name="";active=!1;componentDidLoad(){requestAnimationFrame((()=>this.ready=!0))}render(){return e(n,{key:"3118031c009c947f2a7882a8dd65556b686d1c9d",id:this.host.id||this.tabContentId,style:{display:this.active?"block":"none"},role:"tabpanel","aria-hidden":this.active?"false":"true",class:{ready:this.ready,"nano-tab-content":!0}},e("div",{key:"cab097ece6d3473e5fc425dbde951fcaf399c5ba",part:"base",class:"nano-tab-content"},e("slot",{key:"b4ce04af8ea780022c5a9e63a16f1d087432a931"})))}};i.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{display:block;opacity:1;animation:opacity 0.3s ease-in-out forwards;animation-duration:0s !important}:host(.ready){animation-duration:0.3s !important}@media only screen and (width <= 768px){:host([animation-dir=left]){animation:slide-right 0.3s ease-in-out;opacity:1}:host([animation-dir=right]){animation:slide-left 0.3s ease-in-out;opacity:1}}.nano-tab-content{position:relative}@keyframes opacity{0%{opacity:0}100%{opacity:1}}@keyframes slide-left{0%{transform:translate3d(-100%, 0, 0)}50%{transform:translate3d(0%) translate3d(-0.9em)}100%{transform:translate3d(0, 0, 0)}}@keyframes slide-right{0%{transform:translate3d(100%, 0, 0)}50%{transform:translateX(0%) translate3d(0.9em)}100%{transform:translate3d(0, 0, 0)}}@media (prefers-reduced-motion: reduce){*{animation:none !important}}";export{i as nano_tab_content}
4
+ import{r as t,g as a,a as n}from"./index-BM3Om9WE.js";import{h as e}from"./renderer-DpNDfhNy.js";let o=0;const i=class{constructor(a){t(this,a)}tabContentId="nano-tab-content-"+ ++o;ready=!1;get host(){return a(this)}name="";active=!1;componentDidLoad(){requestAnimationFrame((()=>this.ready=!0))}render(){return e(n,{key:"7899878aa521145bc4fe77a7e81ddbd2d48b739e",id:this.host.id||this.tabContentId,style:{display:this.active?"block":"none"},role:"tabpanel","aria-hidden":this.active?"false":"true",class:{ready:this.ready,"nano-tab-content":!0}},e("div",{key:"68d1c780cf1f6d4d0ef77b1dafa7766aa08ba52b",part:"base",class:"nano-tab-content"},e("slot",{key:"d8be1c667173f69f74fbead600d79bf96da42cbe"})))}};i.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{display:block;opacity:1;animation:opacity 0.3s ease-in-out forwards;animation-duration:0s !important}:host(.ready){animation-duration:0.3s !important}@media only screen and (width <= 768px){:host([animation-dir=left]){animation:slide-right 0.3s ease-in-out;opacity:1}:host([animation-dir=right]){animation:slide-left 0.3s ease-in-out;opacity:1}}.nano-tab-content{position:relative}@keyframes opacity{0%{opacity:0}100%{opacity:1}}@keyframes slide-left{0%{transform:translate3d(-100%, 0, 0)}50%{transform:translate3d(0%) translate3d(-0.9em)}100%{transform:translate3d(0, 0, 0)}}@keyframes slide-right{0%{transform:translate3d(100%, 0, 0)}50%{transform:translateX(0%) translate3d(0.9em)}100%{transform:translate3d(0, 0, 0)}}@media (prefers-reduced-motion: reduce){*{animation:none !important}}";export{i as nano_tab_content}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{r as t,c as i,g as o,j as s,a as r}from"./index-BM3Om9WE.js";import{g as a}from"./dom-dlicJTEJ.js";import{C as n}from"./component-store-JYVuxwvK.js";import{t as e,h}from"./renderer-DasB4P10.js";import"./throttle-C93FMm2Z.js";let l=0;const d=class{constructor(o){t(this,o),this.nanoTabShow=i(this,"nanoTabShow",7),this.nanoTabHide=i(this,"nanoTabHide",7),this.nanoTabWillClose=i(this,"nanoTabWillClose",7),this.nanoTabClose=i(this,"nanoTabClose",7)}baseId="nano-tab-group-"+ ++l;activeTab;activePanel;isRtl;initialTouchX=null;initialTouchY=null;init=!0;_tab;get tab(){return this._tab}set tab(t){if(this.activeTab&&this.activeTab.panel===this._tab)return;const i=this.getAllActiveTabs.find((i=>i.panel===t));i&&(!this.init&&this.storeId&&n.update(this.storeId),this._tab=t,this.setActiveTab(i))}get host(){return o(this)}placement="top";noScrollControls=!1;equalTabSize=!1;size;storeId;storeMethod="url-hash";disableSwipe;nanoTabShow;nanoTabHide;nanoTabWillClose;nanoTabClose;async show(t){if(this.activeTab&&this.activeTab.panel===t)return;const i=this.getAllActiveTabs.find((i=>i.panel===t));i&&this.setActiveTab(i)}get getAllActiveTabs(){return this.getAllTabs.filter((t=>!t.disabled))}get getAllTabs(){return a(this.host,e("nano-tab"))}get getAllPanels(){return a(this.host,e("nano-tab-content"))}get getActiveTab(){return this.getAllActiveTabs.find((t=>t.active))}setActiveTab(t,i=!0){if(t&&t!==this.activeTab&&!t.disabled&&this.getAllActiveTabs.includes(t)){const o=this.activeTab;this.activeTab=t,this.tab=t.panel,this.getAllActiveTabs.map((t=>t.active=t===this.activeTab)),this.getAllPanels.map((t=>{t.name===this.activeTab.panel?(t.active=!0,this.activePanel=t):t.active=!1,t.removeAttribute("animation-dir")})),i&&(o&&this.nanoTabHide.emit({name:o.panel}),this.nanoTabShow.emit({name:this.activeTab.panel}))}}setAriaLabels(){const t=this.getAllPanels;this.getAllActiveTabs.map(((i,o)=>{const s=t.find((t=>t.name===i.panel));s&&(s.id||(s.id=`${this.baseId}-panel-${o}`),i.id||(i.id=`${this.baseId}-tab-${o}`),i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id))}))}handleTabClose(t){let i=this.getAllActiveTabs.indexOf(t.target);const o=t.target;if(i<0)return;const r=this.getAllPanels.find((t=>t.name===o.panel));if(r&&(t.stopImmediatePropagation(),!this.nanoTabWillClose.emit({name:o.panel}).defaultPrevented)){if(o.active){i=0===i?1:i-1;const t=this.getAllActiveTabs[i]?.panel;t&&this.host.show(t)}o.remove(),r.remove(),this.nanoTabClose.emit({name:o.panel}),s(this.host)}}handleClick=t=>{const i=t.target.closest(e("nano-tab"));i&&this.setActiveTab(i)};handleKeyDown=t=>{const i=document.activeElement;if(!i||i.tagName.toLowerCase()!==e("nano-tab"))return;if(["Enter"," "].includes(t.key)){const i=t.target.closest(e("nano-tab"));i&&(this.setActiveTab(i),t.preventDefault(),t.stopPropagation())}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key))return;const o=this.getAllActiveTabs;let s=o.indexOf(i);"Home"===t.key&&(s=0),"End"===t.key&&(s=o.length-1),"top"===this.placement&&((this.isRtl&&"ArrowRight"===t.key||!this.isRtl&&"ArrowLeft"===t.key)&&(s=Math.max(0,s-1)),(this.isRtl&&"ArrowLeft"===t.key||!this.isRtl&&"ArrowRight"===t.key)&&(s=Math.min(o.length-1,s+1))),"start"===this.placement&&("ArrowUp"===t.key&&(s=Math.max(0,s-1)),"ArrowDown"===t.key&&(s=Math.min(o.length-1,s+1))),o[s].setFocus(),t.stopPropagation(),t.preventDefault()};handleTouchStart=t=>{if(this.disableSwipe)return;const i=t.changedTouches[0];this.initialTouchX=i.pageX,this.initialTouchY=i.pageY};handleTouchEnd=t=>{if(this.disableSwipe)return;const i=t.changedTouches[0],o=i.pageX-this.initialTouchX,s=this.initialTouchX-i.clientX,r=this.initialTouchY-i.clientY,a=Math.abs(o)>=70&&Math.abs(r)<=50,n=this.getAllActiveTabs,e=n.findIndex((t=>t.active));if(a){const t=o<0&&"top"===this.placement||o>0&&"top"!==this.placement?1:-1;n[e+t]&&(this.setActiveTab(n[e+t]),Math.abs(s)>Math.abs(r)&&this.activePanel.setAttribute("animation-dir",s>0?"left":"right"))}this.initialTouchX=null,this.initialTouchY=null};handleContentSlotChange=()=>{setTimeout((()=>{this.setAriaLabels(),this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1)}))};handleTabSlotChange=()=>{setTimeout((()=>{this.setAriaLabels(),this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1)}),500)};componentWillLoad(){this.init=!0}componentDidLoad(){new IntersectionObserver(((t,i)=>{if(t[0].intersectionRatio>0){if(this.setAriaLabels(),this.storeId){n.init(this,["tab"],this.storeMethod,this.storeId);const t=n.get(this.storeId),i=t.retrieve()?.tab;i&&i!==t.initialState?.tab&&this.getAllActiveTabs.forEach((t=>{t.active=t.panel===i}))}this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1),i.unobserve(t[0].target),this.init=!1}})).observe(this.host)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir}render(){if(this.isRtl="rtl"===this.host.ownerDocument.dir,0!==this.getAllTabs.length)return h(r,{dir:this.isRtl?"rtl":null,class:"nano-tab-group"},h("div",{part:"base",class:{group:!0,"group--top":"top"===this.placement,"group--start":"start"===this.placement},onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("nano-masked-overflow",{role:"navigation",class:"group__tabs",part:"tabs__wrapper",exportparts:"items:tabs, scroll-button:tabs__scroll-button, indicator:active-tab-indicator",orientation:"top"===this.placement?"horizontal":"vertical",isActiveHandler:t=>this.activeTab===t,scrollControls:!this.noScrollControls,hideScrollbars:!0},h("slot",{name:"tabs",onSlotchange:this.handleTabSlotChange}),h("div",{class:"group__tabs-border"})),h("div",{part:"body",class:"group__body",onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h("slot",{onSlotchange:this.handleContentSlotChange}))))}};d.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--border:2px solid var(--nano-color-neutral-300);--indicator-transition:var(--nano-transition-fast);--indicator-color:var(--nano-color-primary-1000);--indicator-track-color:var(--nano-color-neutral-300);--indicator-size:0;--tab-spacing:var(--nano-spacing-md);--content-spacing:var(--nano-spacing-l1-default);display:block;position:relative;z-index:var(--nano-z-index-raised)}.group{display:flex;border-radius:0;inline-size:100%;flex:inherit}:host([equal-tab-size]) .group__tabs-border,.group__tabs[has-scroll-controls] .group__tabs-border{display:none}.group__tabs::part(items){gap:var(--tab-spacing)}.group--top{flex-direction:column}.group--top .group__tabs{--fade-size:100px}.group--top .group__tabs::part(items){align-items:flex-end}.group--top .group__tabs-border{flex:1;border-block-end:var(--border)}.group--top .group__body{order:2;position:relative;flex:1 1 auto;border-block-end:var(--border);padding-block:var(--content-spacing)}.group--start{flex-direction:row}:host([equal-tab-size]) .group--start .group__tabs::part(items){display:grid;grid-auto-rows:1fr}.group--start .group__tabs-border{flex:1;border-inline-end:var(--border)}.group--start .group__body{flex:1 1 auto;order:2;overflow:hidden;padding-inline-start:var(--content-spacing)}";export{d as nano_tab_group}
4
+ import{r as t,c as i,g as o,j as s,a as r}from"./index-BM3Om9WE.js";import{g as a}from"./dom-dlicJTEJ.js";import{C as n}from"./component-store-JYVuxwvK.js";import{t as e,h}from"./renderer-DpNDfhNy.js";import"./throttle-C93FMm2Z.js";let l=0;const d=class{constructor(o){t(this,o),this.nanoTabShow=i(this,"nanoTabShow",7),this.nanoTabHide=i(this,"nanoTabHide",7),this.nanoTabWillClose=i(this,"nanoTabWillClose",7),this.nanoTabClose=i(this,"nanoTabClose",7)}baseId="nano-tab-group-"+ ++l;activeTab;activePanel;isRtl;initialTouchX=null;initialTouchY=null;init=!0;_tab;get tab(){return this._tab}set tab(t){if(this.activeTab&&this.activeTab.panel===this._tab)return;const i=this.getAllActiveTabs.find((i=>i.panel===t));i&&(!this.init&&this.storeId&&n.update(this.storeId),this._tab=t,this.setActiveTab(i))}get host(){return o(this)}placement="top";noScrollControls=!1;equalTabSize=!1;size;storeId;storeMethod="url-hash";disableSwipe;nanoTabShow;nanoTabHide;nanoTabWillClose;nanoTabClose;async show(t){if(this.activeTab&&this.activeTab.panel===t)return;const i=this.getAllActiveTabs.find((i=>i.panel===t));i&&this.setActiveTab(i)}get getAllActiveTabs(){return this.getAllTabs.filter((t=>!t.disabled))}get getAllTabs(){return a(this.host,e("nano-tab"))}get getAllPanels(){return a(this.host,e("nano-tab-content"))}get getActiveTab(){return this.getAllActiveTabs.find((t=>t.active))}setActiveTab(t,i=!0){if(t&&t!==this.activeTab&&!t.disabled&&this.getAllActiveTabs.includes(t)){const o=this.activeTab;this.activeTab=t,this.tab=t.panel,this.getAllActiveTabs.map((t=>t.active=t===this.activeTab)),this.getAllPanels.map((t=>{t.name===this.activeTab.panel?(t.active=!0,this.activePanel=t):t.active=!1,t.removeAttribute("animation-dir")})),i&&(o&&this.nanoTabHide.emit({name:o.panel}),this.nanoTabShow.emit({name:this.activeTab.panel}))}}setAriaLabels(){const t=this.getAllPanels;this.getAllActiveTabs.map(((i,o)=>{const s=t.find((t=>t.name===i.panel));s&&(s.id||(s.id=`${this.baseId}-panel-${o}`),i.id||(i.id=`${this.baseId}-tab-${o}`),i.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",i.id))}))}handleTabClose(t){let i=this.getAllActiveTabs.indexOf(t.target);const o=t.target;if(i<0)return;const r=this.getAllPanels.find((t=>t.name===o.panel));if(r&&(t.stopImmediatePropagation(),!this.nanoTabWillClose.emit({name:o.panel}).defaultPrevented)){if(o.active){i=0===i?1:i-1;const t=this.getAllActiveTabs[i]?.panel;t&&this.host.show(t)}o.remove(),r.remove(),this.nanoTabClose.emit({name:o.panel}),s(this.host)}}handleClick=t=>{const i=t.target.closest(e("nano-tab"));i&&this.setActiveTab(i)};handleKeyDown=t=>{const i=document.activeElement;if(!i||i.tagName.toLowerCase()!==e("nano-tab"))return;if(["Enter"," "].includes(t.key)){const i=t.target.closest(e("nano-tab"));i&&(this.setActiveTab(i),t.preventDefault(),t.stopPropagation())}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key))return;const o=this.getAllActiveTabs;let s=o.indexOf(i);"Home"===t.key&&(s=0),"End"===t.key&&(s=o.length-1),"top"===this.placement&&((this.isRtl&&"ArrowRight"===t.key||!this.isRtl&&"ArrowLeft"===t.key)&&(s=Math.max(0,s-1)),(this.isRtl&&"ArrowLeft"===t.key||!this.isRtl&&"ArrowRight"===t.key)&&(s=Math.min(o.length-1,s+1))),"start"===this.placement&&("ArrowUp"===t.key&&(s=Math.max(0,s-1)),"ArrowDown"===t.key&&(s=Math.min(o.length-1,s+1))),o[s].setFocus(),t.stopPropagation(),t.preventDefault()};handleTouchStart=t=>{if(this.disableSwipe)return;const i=t.changedTouches[0];this.initialTouchX=i.pageX,this.initialTouchY=i.pageY};handleTouchEnd=t=>{if(this.disableSwipe)return;const i=t.changedTouches[0],o=i.pageX-this.initialTouchX,s=this.initialTouchX-i.clientX,r=this.initialTouchY-i.clientY,a=Math.abs(o)>=70&&Math.abs(r)<=50,n=this.getAllActiveTabs,e=n.findIndex((t=>t.active));if(a){const t=o<0&&"top"===this.placement||o>0&&"top"!==this.placement?1:-1;n[e+t]&&(this.setActiveTab(n[e+t]),Math.abs(s)>Math.abs(r)&&this.activePanel.setAttribute("animation-dir",s>0?"left":"right"))}this.initialTouchX=null,this.initialTouchY=null};handleContentSlotChange=()=>{setTimeout((()=>{this.setAriaLabels(),this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1)}))};handleTabSlotChange=()=>{setTimeout((()=>{this.setAriaLabels(),this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1)}),500)};componentWillLoad(){this.init=!0}componentDidLoad(){new IntersectionObserver(((t,i)=>{if(t[0].intersectionRatio>0){if(this.setAriaLabels(),this.storeId){n.init(this,["tab"],this.storeMethod,this.storeId);const t=n.get(this.storeId),i=t.retrieve()?.tab;i&&i!==t.initialState?.tab&&this.getAllActiveTabs.forEach((t=>{t.active=t.panel===i}))}this.setActiveTab(this.getActiveTab||this.getAllActiveTabs[0],!1),i.unobserve(t[0].target),this.init=!1}})).observe(this.host)}connectedCallback(){this.isRtl="rtl"===this.host.dir||"rtl"===this.host.ownerDocument.dir}render(){if(this.isRtl="rtl"===this.host.ownerDocument.dir,0!==this.getAllTabs.length)return h(r,{dir:this.isRtl?"rtl":null,class:"nano-tab-group"},h("div",{part:"base",class:{group:!0,"group--top":"top"===this.placement,"group--start":"start"===this.placement},onClick:this.handleClick,onKeyDown:this.handleKeyDown},h("nano-masked-overflow",{role:"navigation",class:"group__tabs",part:"tabs__wrapper",exportparts:"items:tabs, scroll-button:tabs__scroll-button, indicator:active-tab-indicator",orientation:"top"===this.placement?"horizontal":"vertical",isActiveHandler:t=>this.activeTab===t,scrollControls:!this.noScrollControls,hideScrollbars:!0},h("slot",{name:"tabs",onSlotchange:this.handleTabSlotChange}),h("div",{class:"group__tabs-border"})),h("div",{part:"body",class:"group__body",onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd},h("slot",{onSlotchange:this.handleContentSlotChange}))))}};d.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--border:2px solid var(--nano-color-neutral-300);--indicator-transition:var(--nano-transition-fast);--indicator-color:var(--nano-color-primary-1000);--indicator-track-color:var(--nano-color-neutral-300);--indicator-size:0;--tab-spacing:var(--nano-spacing-md);--content-spacing:var(--nano-spacing-l1-default);display:block;position:relative;z-index:var(--nano-z-index-raised)}.group{display:flex;border-radius:0;inline-size:100%;flex:inherit}:host([equal-tab-size]) .group__tabs-border,.group__tabs[has-scroll-controls] .group__tabs-border{display:none}.group__tabs::part(items){gap:var(--tab-spacing)}.group--top{flex-direction:column}.group--top .group__tabs{--fade-size:100px}.group--top .group__tabs::part(items){align-items:flex-end}.group--top .group__tabs-border{flex:1;border-block-end:var(--border)}.group--top .group__body{order:2;position:relative;flex:1 1 auto;border-block-end:var(--border);padding-block:var(--content-spacing)}.group--start{flex-direction:row}:host([equal-tab-size]) .group--start .group__tabs::part(items){display:grid;grid-auto-rows:1fr}.group--start .group__tabs-border{flex:1;border-inline-end:var(--border)}.group--start .group__body{flex:1 1 auto;order:2;overflow:hidden;padding-inline-start:var(--content-spacing)}";export{d as nano_tab_group}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{r as a,c as o,g as e,a as t}from"./index-BM3Om9WE.js";import{h as r}from"./renderer-DasB4P10.js";let n=0;const i=class{constructor(e){a(this,e),this.nanoTabClose=o(this,"nanoTabClose",7)}tabId="nano-tab-"+ ++n;tab;get host(){return e(this)}panel="";active=!1;disabled=!1;closable=!1;nanoTabClose;async setFocus(){this.tab.focus({preventScroll:!0})}async removeFocus(){this.tab.blur()}handleCloseClick=()=>{this.nanoTabClose.emit()};handleCloseKeydown=a=>{" "===a.key&&(a.preventDefault(),this.handleCloseClick())};render(){return r(t,{key:"ad80886d87f28ad3a2ae019f361662f21c6617b3",id:this.host.id||this.tabId,role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",class:"nano-tab"},r("div",{key:"445b8acdf4a87b4541f8bc1b9354c91bad6d77a4",part:`base${this.active?" base--active":""}${this.disabled?" base--disabled":""}${this.closable?" base--closable":""}`,class:{tab:!0,"tab--active":this.active,"tab--disabled":this.disabled,"tab--closable":this.closable}},r("slot",{key:"a72a156f0792fb7943c46d7edc6da51d222f4285",name:"start"}),r("div",{key:"e7c654c4efe7bafaa41fdbafaae96976f4089f67",part:"label",ref:a=>this.tab=a,tabindex:this.disabled||!this.active?"-1":"0",class:"tab__label"},r("slot",{key:"65f9a3b5342dfca0a8e6ec9be289f3ad4bb5da4e"})),r("slot",{key:"e044937dc98a2650b58f7a792e0e190de80e2d00",name:"end"}),this.closable&&!this.disabled&&r("nano-icon-button",{key:"c7809dea53cb6ca1660f58f06f3a861f18950cba",label:"Close this tab",iconName:"light/xmark",class:"tab__close-button",onClick:this.handleCloseClick,onKeyDown:this.handleCloseKeydown,part:"close-button"})))}};i.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--border:2px solid var(--nano-color-neutral-300);--border-hover-color:var(--nano-color-primary-700);--border-active-color:var(--nano-color-primary-1000);--text-hover-color:var(--nano-color-primary-1000);--text-active-color:var(--nano-color-primary-1100);--padding:var(--nano-spacing-md);font-size:var(--nano-font-size-sm);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);display:inline-block;cursor:pointer;color:var(--nano-color-neutral-1400);border:var(--border);border-inline-end-width:0;border-inline-start-width:0;border-block-start-width:0;border-block-end:var(--border)}:host(:not([disabled]):hover){border-color:var(--border-hover-color);color:var(--text-hover-color)}:host(:not([disabled]):active),:host([active]){border-color:var(--border-active-color);color:var(--text-active-color)}:host(.nano-sortable__dragged){background:var(--nano-color-base-0);opacity:0.9 !important;box-shadow:var(--nano-shadow-l0) !important}.tab{padding:var(--padding);display:flex;white-space:nowrap;align-items:center;position:relative;gap:var(--nano-spacing-sm);justify-content:center}.tab.tab--disabled{opacity:0.5;cursor:not-allowed}.tab.tab--closable{padding-inline-end:calc(var(--padding) - var(--nano-spacing-sm))}.tab ::slotted(*),.tab::slotted(*){display:flex;align-items:center}.tab ::slotted(.nano-sortable__keyboard-handle){position:absolute;inset-inline-end:-1em;z-index:1}.tab:not(.tab--disabled):has(.tab__label:focus-visible){outline:var(--nano-focus-ring);outline-offset:-3px}.tab__label{display:flex;flex-direction:column;gap:var(--nano-spacing-sm);align-items:center}.tab__label:focus{outline:none}.tab__close-button{color:var(--nano-color-primary-1200);--hover-color:var(--nano-color-primary-700)}";export{i as nano_tab}
4
+ import{r as a,c as o,g as e,a as t}from"./index-BM3Om9WE.js";import{h as r}from"./renderer-DpNDfhNy.js";let n=0;const i=class{constructor(e){a(this,e),this.nanoTabClose=o(this,"nanoTabClose",7)}tabId="nano-tab-"+ ++n;tab;get host(){return e(this)}panel="";active=!1;disabled=!1;closable=!1;nanoTabClose;async setFocus(){this.tab.focus({preventScroll:!0})}async removeFocus(){this.tab.blur()}handleCloseClick=()=>{this.nanoTabClose.emit()};handleCloseKeydown=a=>{" "===a.key&&(a.preventDefault(),this.handleCloseClick())};render(){return r(t,{key:"735b30efba4aecf7bfa515f1fc33d9c507d8ded0",id:this.host.id||this.tabId,role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",class:"nano-tab"},r("div",{key:"400e6997781a7499613f0b04cf559ee8598801e2",part:`base${this.active?" base--active":""}${this.disabled?" base--disabled":""}${this.closable?" base--closable":""}`,class:{tab:!0,"tab--active":this.active,"tab--disabled":this.disabled,"tab--closable":this.closable}},r("slot",{key:"059131aa192ceac9ca9b61db2daf7029c0153d66",name:"start"}),r("div",{key:"76fba07c2ded5f4a2d93f9540fd222655c507517",part:"label",ref:a=>this.tab=a,tabindex:this.disabled||!this.active?"-1":"0",class:"tab__label"},r("slot",{key:"2ac34a7e63e38ed4821d39e35b276b1155e2edd3"})),r("slot",{key:"7d1b2f561c64e3be7a464d9e24ea7fd5d2a56b66",name:"end"}),this.closable&&!this.disabled&&r("nano-icon-button",{key:"72497156f9858f16c0d4521cbc6d559cd2266be8",label:"Close this tab",iconName:"light/xmark",class:"tab__close-button",onClick:this.handleCloseClick,onKeyDown:this.handleCloseKeydown,part:"close-button"})))}};i.style=":host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host,*,*::before,*::after{box-sizing:border-box}[hidden]{display:none !important}@media (prefers-reduced-motion: reduce){:host,*,*::before,*::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}:host{--border:2px solid var(--nano-color-neutral-300);--border-hover-color:var(--nano-color-primary-700);--border-active-color:var(--nano-color-primary-1000);--text-hover-color:var(--nano-color-primary-1000);--text-active-color:var(--nano-color-primary-1100);--padding:var(--nano-spacing-md);font-size:var(--nano-font-size-sm);line-height:var(--nano-line-height-normal);letter-spacing:var(--nano-letter-spacing-loose);display:inline-block;cursor:pointer;color:var(--nano-color-neutral-1400);border:var(--border);border-inline-end-width:0;border-inline-start-width:0;border-block-start-width:0;border-block-end:var(--border)}:host(:not([disabled]):hover){border-color:var(--border-hover-color);color:var(--text-hover-color)}:host(:not([disabled]):active),:host([active]){border-color:var(--border-active-color);color:var(--text-active-color)}:host(.nano-sortable__dragged){background:var(--nano-color-base-0);opacity:0.9 !important;box-shadow:var(--nano-shadow-l0) !important}.tab{padding:var(--padding);display:flex;white-space:nowrap;align-items:center;position:relative;gap:var(--nano-spacing-sm);justify-content:center}.tab.tab--disabled{opacity:0.5;cursor:not-allowed}.tab.tab--closable{padding-inline-end:calc(var(--padding) - var(--nano-spacing-sm))}.tab ::slotted(*),.tab::slotted(*){display:flex;align-items:center}.tab ::slotted(.nano-sortable__keyboard-handle){position:absolute;inset-inline-end:-1em;z-index:1}.tab:not(.tab--disabled):has(.tab__label:focus-visible){outline:var(--nano-focus-ring);outline-offset:-3px}.tab__label{display:flex;flex-direction:column;gap:var(--nano-spacing-sm);align-items:center}.tab__label:focus{outline:none}.tab__close-button{color:var(--nano-color-primary-1200);--hover-color:var(--nano-color-primary-700)}";export{i as nano_tab}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{g as t,r as e,a as o}from"./index-BM3Om9WE.js";import{d as a}from"./throttle-C93FMm2Z.js";import{t as n,h as s}from"./renderer-DasB4P10.js";const i=class{get host(){return t(this)}propsReady=!1;compact="auto";handleCompactChange(){this.setupProperties()}scrollable=!0;hideCaption=!1;handleHideCaptionChange(){const t=this.caption;t&&t.classList.toggle("visually-hidden",this.hideCaption)}disableClickableRows=!1;resizeObserver;mutationObserver;intersectionObserver;settingUp=!1;get table(){return this.host.querySelector("table")}get caption(){return this.host.querySelector("caption")||(console.error("nano-table: No caption found. For better a11y, please add a <caption> element to the table."),null)}setupProperties=()=>{const t=this.table;if(!t||this.settingUp)return;if(this.settingUp=!0,!this.disableClickableRows){const t=Array.from(this.host.querySelectorAll("tr"));for(const e of t)1===this.getRowClickElements(e).length?(e.setAttribute("clickable","true"),e.addEventListener("click",this.rowClickHandler)):(e.removeAttribute("clickable"),e.removeEventListener("click",this.rowClickHandler))}const e=t.querySelectorAll("thead, tbody, tfoot");let o=0;if(t.querySelector("[sticky=start], [sticky=end]")){for(const t of e)t.style.setProperty("--section-height",`${t.offsetHeight}px`);const t=Array.from(this.host.querySelectorAll("thead th, thead td"));for(const e of t)e.matches("[sticky=start]")&&(this.makeCellsSticky(e,"start",o),o>0&&e.style.setProperty("--sticky-start",`${o}px`),o+=e.offsetWidth-1);o=0;for(const e of[...t].reverse())e.matches("[sticky=end]")&&(this.makeCellsSticky(e,"end",o),o>0&&e.style.setProperty("--sticky-end",`${o}px`),o+=e.offsetWidth-1)}if(t.querySelector("[sticky=top]")){o=0;for(const t of e){const e=Array.from(t.querySelectorAll("tr[sticky]"));for(const[t,a]of e.entries())a.matches("[sticky=top]")&&o>0&&a.style.setProperty("--sticky-top",`${o}px`),t===e.length-1&&(o+=a.offsetHeight-1)}}this.settingUp=!1,this.propsReady=!0};getRowClickElements(t){const e=t.querySelectorAll("a"),o=t.querySelectorAll("button"),a=Array.from(t.querySelectorAll('input[type="checkbox"]')).filter((t=>!t.closest("nano-checkbox"))),n=Array.from(t.querySelectorAll('input[type="radio"]')).filter((t=>!t.closest("nano-checkbox")));return[...e,...o,...t.querySelectorAll("nano-checkbox"),...a,...n]}rowClickHandler=t=>{const e=t.target,o=e.closest("tr");if(!o)return;const a=this.getRowClickElements(o);1===a.length&&e.closest(a[0].tagName)!==a[0]&&a[0].click()};makeCellsSticky(t,e,o=0){const a=t.closest("table"),n=t.closest("tr"),s=Array.from(n.cells);let i=0;for(const e of s){if(e===t)break;i+=e.colSpan||1}for(const t of a.tBodies)for(const a of t.rows){let t=0;for(const n of a.cells){const a=n.colSpan||1;if(t<=i&&i<t+a){n.setAttribute("sticky",e),o>0&&n.style.setProperty("--sticky-"+e,`${o}px`);break}t+=a}}}addObservers(){this.resizeObserver=new ResizeObserver((()=>{this.setupProperties()})),this.resizeObserver.observe(this.host),this.mutationObserver=new MutationObserver((()=>{this.setupProperties()}));const t=this.table;this.mutationObserver.observe(t,{childList:!0,subtree:!0}),this.intersectionObserver=new IntersectionObserver((()=>{this.setupProperties(),this.intersectionObserver.disconnect()}),{threshold:1}),this.intersectionObserver.observe(t)}cleanUpObservers(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null)}constructor(t){e(this,t),this.setupProperties=a(this.setupProperties,100)}connectedCallback(){this.addObservers(),this.handleHideCaptionChange()}componentDidRender(){!1!==this.scrollable&&this.table&&customElements.whenDefined(n("nano-masked-overflow")).then((()=>{this.host.querySelector(".nano-table__overflow")?.appendChild(this.table)}))}disconnectedCallback(){this.cleanUpObservers()}render(){return s(o,{key:"75c4089a6d670a16eea3fca8d079ac9a827c4cfa",class:{"nano-table":!0,"nano-table--props-ready":this.propsReady}},this.scrollable&&s("nano-masked-overflow",{key:"90a1e07d2daa97047c3be1381717a8ae3b53b5e1",hideScrollbars:!1,scrollControls:!1,label:this.caption?.textContent||void 0,class:"nano-table__overflow-container"},s("div",{key:"badc595c9931fb6198ab38b4e09cdf4201fcc064",class:"nano-table__overflow"})),s("slot",{key:"d3fd5902fccc42b3412e9cb1950b054b5a69a525"}))}static get watchers(){return{compact:["handleCompactChange"],hideCaption:["handleHideCaptionChange"]}}};i.style=".sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{i as nano_table}
4
+ import{g as t,r as e,a as o}from"./index-BM3Om9WE.js";import{d as n}from"./throttle-C93FMm2Z.js";import{t as s,h as a}from"./renderer-DpNDfhNy.js";const i=class{get host(){return t(this)}propsReady=!1;compact="auto";handleCompactChange(){this.setupProperties()}scrollable=!0;hideCaption=!1;handleHideCaptionChange(){const t=this.caption;t&&t.classList.toggle("visually-hidden",this.hideCaption)}disableClickableRows=!1;resizeObserver;mutationObserver;intersectionObserver;settingUp=!1;get table(){return this.host.querySelector("table")}get caption(){return this.host.querySelector("caption")||(console.error("nano-table: No caption found. For better a11y, please add a <caption> element to the table."),null)}setupProperties=()=>{const t=this.table;if(!t||this.settingUp)return;if(this.settingUp=!0,!this.disableClickableRows){const t=Array.from(this.host.querySelectorAll("tr"));for(const e of t)1===this.getRowClickElements(e).length?(e.setAttribute("clickable","true"),e.addEventListener("click",this.rowClickHandler)):(e.removeAttribute("clickable"),e.removeEventListener("click",this.rowClickHandler))}const e=t.querySelectorAll("thead, tbody, tfoot");let o=0;if(t.querySelector("[sticky=start], [sticky=end]")){for(const t of e)t.style.setProperty("--section-height",`${t.offsetHeight}px`);const t=Array.from(this.host.querySelectorAll("thead th, thead td"));for(const e of t)e.matches("[sticky=start]")&&(this.makeCellsSticky(e,"start",o),o>0&&e.style.setProperty("--sticky-start",`${o}px`),o+=e.offsetWidth-1);o=0;for(const e of[...t].reverse())e.matches("[sticky=end]")&&(this.makeCellsSticky(e,"end",o),o>0&&e.style.setProperty("--sticky-end",`${o}px`),o+=e.offsetWidth-1)}if(t.querySelector("[sticky=top]")){o=0;for(const t of e){const e=Array.from(t.querySelectorAll("tr[sticky]"));for(const[t,n]of e.entries())n.matches("[sticky=top]")&&o>0&&n.style.setProperty("--sticky-top",`${o}px`),t===e.length-1&&(o+=n.offsetHeight-1)}}this.settingUp=!1,this.propsReady=!0};getRowClickElements(t){const e=t.querySelectorAll("a"),o=t.querySelectorAll("button"),n=Array.from(t.querySelectorAll('input[type="checkbox"]')).filter((t=>!t.closest("nano-checkbox"))),s=Array.from(t.querySelectorAll('input[type="radio"]')).filter((t=>!t.closest("nano-checkbox")));return[...e,...o,...t.querySelectorAll("nano-checkbox"),...n,...s]}rowClickHandler=t=>{const e=t.target,o=e.closest("tr");if(!o)return;const n=this.getRowClickElements(o);1===n.length&&e.closest(n[0].tagName)!==n[0]&&n[0].click()};makeCellsSticky(t,e,o=0){const n=t.closest("table"),s=t.closest("tr"),a=Array.from(s.cells);let i=0;for(const e of a){if(e===t)break;i+=e.colSpan||1}for(const t of n.tBodies)for(const n of t.rows){let t=0;for(const s of n.cells){const n=s.colSpan||1;if(t<=i&&i<t+n){s.setAttribute("sticky",e),o>0&&s.style.setProperty("--sticky-"+e,`${o}px`);break}t+=n}}}addObservers(){this.resizeObserver=new ResizeObserver((()=>{this.setupProperties()})),this.resizeObserver.observe(this.host),this.mutationObserver=new MutationObserver((()=>{this.setupProperties()}));const t=this.table;this.mutationObserver.observe(t,{childList:!0,subtree:!0}),this.intersectionObserver=new IntersectionObserver((()=>{this.setupProperties(),this.intersectionObserver.disconnect()}),{threshold:1}),this.intersectionObserver.observe(t)}cleanUpObservers(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null)}constructor(t){e(this,t),this.setupProperties=n(this.setupProperties,100)}connectedCallback(){this.addObservers(),this.handleHideCaptionChange()}componentDidRender(){!1!==this.scrollable&&this.table&&customElements.whenDefined(s("nano-masked-overflow")).then((()=>{this.host.querySelector(".nano-table__overflow")?.appendChild(this.table)}))}disconnectedCallback(){this.cleanUpObservers()}render(){return a(o,{key:"e2ee468673f70252fc559a82e48b74f12273e416",class:{"nano-table":!0,"nano-table--props-ready":this.propsReady}},this.scrollable&&a("nano-masked-overflow",{key:"63091df4a07695276d762d2a5ad5f535c9ed67dd",hideScrollbars:!1,scrollControls:!1,label:this.caption?.textContent||void 0,class:"nano-table__overflow-container"},a("div",{key:"2defbb73d6077d95351c50685c70e6c32f05fd87",class:"nano-table__overflow"})),a("slot",{key:"71a9d57114363f976eb139d494a8383795a67a8b"}))}static get watchers(){return{compact:["handleCompactChange"],hideCaption:["handleHideCaptionChange"]}}};i.style=".sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{box-sizing:border-box}[hidden].sc-nano-table{display:none !important}@media (prefers-reduced-motion: reduce){.sc-nano-table-h,*.sc-nano-table,*.sc-nano-table::before,*.sc-nano-table::after{animation-duration:0.01ms !important;animation-iteration-count:1 !important;transition-duration:0.01ms !important;scroll-behavior:auto !important}}";export{i as nano_table}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{F as t,u as i,U as s}from"./nano-slides-xbY6lXX9.js";import"./index-BM3Om9WE.js";import"./renderer-DasB4P10.js";function h(t){this.parent=t,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this.containingEl=this.parentElement.parentNode||this.parentElement,this._create()}(h.prototype=Object.create(s.prototype))._create=function(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.holder.part.add("pagination"),this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},h.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.containingEl.appendChild(this.holder)},h.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.containingEl.removeChild(this.holder)},h.prototype.setDots=function(){const t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},h.prototype.addDots=function(t){const i=document.createDocumentFragment(),s=[],h=this.dots.length,n=h+t;for(let t=h;t<n;t++){const h=document.createElement("button");h.classList.add("dot"),h.innerText=`Go to slide ${t+1}`,i.appendChild(h),s.push(h)}this.holder.appendChild(i),this.dots=this.dots.concat(s)},h.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach((function(t){this.holder.removeChild(t)}),this)},h.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.part.remove("pagination-item--active"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.classList.add("is-selected"),this.selectedDot.part.add("pagination-item--active"),this.selectedDot.setAttribute("aria-current","step"))},h.prototype.onTap=h.prototype.onClick=function(t){const i=t.target;if("BUTTON"!=i.nodeName)return;this.parent.uiChange();const s=this.dots.indexOf(i);this.parent.select(s)},h.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=h,i.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");const n=t.prototype;n._createPageDots=function(){this.options.pageDots&&(this.pageDots=new h(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},n.activatePageDots=function(){this.pageDots.activate()},n.updateSelectedPageDots=function(){this.pageDots.updateSelected()},n.updatePageDots=function(){this.pageDots.setDots()},n.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=h;
4
+ import{F as t,u as i,U as s}from"./nano-slides-BU8CjO-X.js";import"./index-BM3Om9WE.js";import"./renderer-DpNDfhNy.js";function h(t){this.parent=t,this.parentElement=this.parent.element.shadowRoot||this.parent.element,this.containingEl=this.parentElement.parentNode||this.parentElement,this._create()}(h.prototype=Object.create(s.prototype))._create=function(){this.holder=document.createElement("div"),this.holder.className="flickity-page-dots",this.holder.part.add("pagination"),this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},h.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.containingEl.appendChild(this.holder)},h.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.containingEl.removeChild(this.holder)},h.prototype.setDots=function(){const t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},h.prototype.addDots=function(t){const i=document.createDocumentFragment(),s=[],h=this.dots.length,n=h+t;for(let t=h;t<n;t++){const h=document.createElement("button");h.classList.add("dot"),h.innerText=`Go to slide ${t+1}`,i.appendChild(h),s.push(h)}this.holder.appendChild(i),this.dots=this.dots.concat(s)},h.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach((function(t){this.holder.removeChild(t)}),this)},h.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.classList.remove("is-selected"),this.selectedDot.part.remove("pagination-item--active"),this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.classList.add("is-selected"),this.selectedDot.part.add("pagination-item--active"),this.selectedDot.setAttribute("aria-current","step"))},h.prototype.onTap=h.prototype.onClick=function(t){const i=t.target;if("BUTTON"!=i.nodeName)return;this.parent.uiChange();const s=this.dots.indexOf(i);this.parent.select(s)},h.prototype.destroy=function(){this.deactivate(),this.allOff()},t.PageDots=h,i.extend(t.defaults,{pageDots:!0}),t.createMethods.push("_createPageDots");const n=t.prototype;n._createPageDots=function(){this.options.pageDots&&(this.pageDots=new h(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},n.activatePageDots=function(){this.pageDots.activate()},n.updateSelectedPageDots=function(){this.pageDots.updateSelected()},n.updatePageDots=function(){this.pageDots.setDots()},n.deactivatePageDots=function(){this.pageDots.deactivate()},t.PageDots=h;
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Custom elements for Nanopore-Digital Web applications
3
+ */
4
+ import{h as n}from"./index-BM3Om9WE.js";const o=["nano-avatar","nano-badge","nano-card","nano-content-links","nano-cta","nano-feature-box","nano-icon-item","nano-option-box","nano-progress-bar","nano-search-result","nano-skeleton","nano-spinner","nano-tag"];function t(n){return r&&n.startsWith("nano-")&&!o.includes(n)?`${r}-${n}`:n}function a(...o){const a=o[0];if(!a||"string"!=typeof a||!r)return n(...o);let e=a;"string"==typeof a&&(e=t(a));const s=o.slice(2);return n(e,o[1],s)}let r="";function e(n){return r=n,t}function s(){return r}a||(a={});export{s as g,a as h,e as s,t}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * Custom elements for Nanopore-Digital Web applications
3
+ */
4
+ import{g as t,j as s}from"./index-BM3Om9WE.js";import{g as h}from"./dom-dlicJTEJ.js";function i(t){const s=t.getRootNode();return s.host?s.host.innerText:t.innerText}class o{host;slotNames=[];constructor(s,...h){this.slotNames=h;const i=s.componentWillLoad;s.componentWillLoad=()=>{this.host=t(s),i&&i.call(s)};const o=s.connectedCallback;s.connectedCallback=()=>{this.host=t(s),this.hostConnected(),o&&o.call(s)};const e=s.disconnectedCallback;s.disconnectedCallback=()=>{this.hostDisconnected(),this.host=void 0,e&&e.call(s)}}hasDefaultSlot(){if(!this.host)return!1;let t;return t=this.host.shadowRoot?[...this.host.shadowRoot.childNodes]:this.host.classList.contains("hydrated")?[...this.host.childNodes]:[...this.host?.__childNodes??[]],t.some((t=>t.nodeType===Node.TEXT_NODE&&""!==t.textContent.trim()||t.nodeType===Node.ELEMENT_NODE&&!t.hasAttribute("slot")))}hasNamedSlot(t){return!!this.host&&h(this.host,`[slot="${t}"]`,!0).length>0}has(t){return"[default]"===t?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){(this.host.shadowRoot??this.host).addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host&&(this.host.shadowRoot??this.host).removeEventListener("slotchange",this.handleSlotChange)}handleSlotChange=t=>{const h=t.target;(this.slotNames.includes("[default]")&&!h.name||h.name&&this.slotNames.includes(h.name))&&s(this.host)}}export{o as H,i as g}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{c as t}from"./nano-data-table-CSTxipPc.js";import"./index-BM3Om9WE.js";import"./renderer-DasB4P10.js";import"./math-BEqsTfVK.js";import"./throttle-C93FMm2Z.js";import"./scroll-1nFw8CNk.js";import"./dom-dlicJTEJ.js";import"./index-BlBZYxu4.js";const r="table.worker",o="stencil.table.worker",e=new URL("table.worker-TTndpijX.js",import.meta.url).href;let i;try{i=t(e,r,o)}catch(s){const m=new Blob(['importScripts("'+e+'")'],{type:"text/javascript"}),p=URL.createObjectURL(m);i=t(p,r,o),URL.revokeObjectURL(p)}export{i as worker,o as workerMsgId,r as workerName,e as workerPath}
4
+ import{c as t}from"./nano-data-table-B3_-hFqj.js";import"./index-BM3Om9WE.js";import"./renderer-DpNDfhNy.js";import"./math-BEqsTfVK.js";import"./throttle-C93FMm2Z.js";import"./scroll-1nFw8CNk.js";import"./dom-dlicJTEJ.js";import"./index-BlBZYxu4.js";const r="table.worker",o="stencil.table.worker",e=new URL("table.worker-TTndpijX.js",import.meta.url).href;let i;try{i=t(e,r,o)}catch(s){const m=new Blob(['importScripts("'+e+'")'],{type:"text/javascript"}),p=URL.createObjectURL(m);i=t(p,r,o),URL.revokeObjectURL(p)}export{i as worker,o as workerMsgId,r as workerName,e as workerPath}