@nanoporetech-digital/components 8.0.0-alpha.1 → 8.0.0-alpha.3

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 (311) hide show
  1. package/dist/cjs/{algolia-data-CFc_52My.js → algolia-data-CSD3I9WJ.js} +1 -1
  2. package/dist/cjs/{component-store-DdyLi-VY.js → component-store-DS6c_IIg.js} +1 -1
  3. package/dist/cjs/{dom-CvQQBdol.js → dom-3kyE_RMm.js} +1 -1
  4. package/dist/cjs/{fade-Bq3U8uF7.js → fade-CqKYrZYq.js} +3 -3
  5. package/dist/cjs/{form-control-gUYfW0n-.js → form-control-BVH0tPGy.js} +2 -2
  6. package/dist/cjs/{fullscreen-Czdw-D-5.js → fullscreen-D-fHJ_IJ.js} +3 -3
  7. package/dist/cjs/{index-B76C6Tm9.js → index-IR1lkhwT.js} +157 -136
  8. package/dist/cjs/{index-ChTXweZN.js → index-yq5hsIxW.js} +1 -1
  9. package/dist/cjs/index.cjs.js +3 -3
  10. package/dist/cjs/{lazyload-BpoUFECt.js → lazyload-DK1ITMfR.js} +3 -3
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/{modal-DddxtK2h.js → modal-DZVjwBg8.js} +1 -1
  13. package/dist/cjs/nano-accordion.cjs.entry.js +3 -3
  14. package/dist/cjs/nano-alert.cjs.entry.js +7 -7
  15. package/dist/cjs/nano-algolia-filter.cjs.entry.js +4 -4
  16. package/dist/cjs/nano-algolia-pagination.cjs.entry.js +2 -2
  17. package/dist/cjs/nano-algolia-results.cjs.entry.js +3 -3
  18. package/dist/cjs/nano-algolia.cjs.entry.js +5 -5
  19. package/dist/cjs/nano-animation.cjs.entry.js +3 -3
  20. package/dist/cjs/nano-avatar_5.cjs.entry.js +16 -16
  21. package/dist/cjs/nano-breadcrumb.cjs.entry.js +2 -2
  22. package/dist/cjs/nano-card-carousel.cjs.entry.js +2 -2
  23. package/dist/cjs/nano-card.cjs.entry.js +1 -1
  24. package/dist/cjs/nano-checkbox-group.cjs.entry.js +2 -2
  25. package/dist/cjs/nano-checkbox.cjs.entry.js +6 -6
  26. package/dist/cjs/nano-collapsible-comparison.cjs.entry.js +3 -3
  27. package/dist/cjs/nano-components.cjs.js +3 -3
  28. package/dist/cjs/nano-content-links.cjs.entry.js +1 -1
  29. package/dist/cjs/nano-cta.cjs.entry.js +10 -8
  30. package/dist/cjs/{nano-data-table-BNwDI1rg.js → nano-data-table-C_KLyFMO.js} +10 -7
  31. package/dist/cjs/nano-data-table.cjs.entry.js +6 -6
  32. package/dist/cjs/nano-datalist_3.cjs.entry.js +11 -11
  33. package/dist/cjs/nano-date-input.cjs.entry.js +2 -2
  34. package/dist/cjs/nano-date-picker_2.cjs.entry.js +4 -4
  35. package/dist/cjs/nano-details.cjs.entry.js +3 -3
  36. package/dist/cjs/nano-dialog.cjs.entry.js +8 -8
  37. package/dist/cjs/nano-dropdown_2.cjs.entry.js +5 -5
  38. package/dist/cjs/nano-field-validator.cjs.entry.js +3 -3
  39. package/dist/cjs/nano-file-upload.cjs.entry.js +50 -31
  40. package/dist/cjs/nano-footer.cjs.entry.js +4 -4
  41. package/dist/cjs/nano-global-nav.cjs.entry.js +19 -15
  42. package/dist/cjs/nano-grid-item.cjs.entry.js +1 -1
  43. package/dist/cjs/nano-grid_2.cjs.entry.js +2 -2
  44. package/dist/cjs/nano-hero.cjs.entry.js +2 -2
  45. package/dist/cjs/nano-icon-item.cjs.entry.js +1 -1
  46. package/dist/cjs/nano-icon_3.cjs.entry.js +4 -4
  47. package/dist/cjs/nano-in-page-nav.cjs.entry.js +3 -3
  48. package/dist/cjs/nano-intersection-observe.cjs.entry.js +4 -4
  49. package/dist/cjs/nano-masked-overflow.cjs.entry.js +9 -9
  50. package/dist/cjs/nano-menu-drawer.cjs.entry.js +3 -3
  51. package/dist/cjs/nano-more-less.cjs.entry.js +4 -4
  52. package/dist/cjs/nano-nav-item.cjs.entry.js +5 -5
  53. package/dist/cjs/nano-progress-bar.cjs.entry.js +4 -18
  54. package/dist/cjs/nano-range.cjs.entry.js +2 -2
  55. package/dist/cjs/nano-rating.cjs.entry.js +6 -6
  56. package/dist/cjs/nano-resize-observe_2.cjs.entry.js +5 -5
  57. package/dist/cjs/nano-slide.cjs.entry.js +3 -3
  58. package/dist/cjs/{nano-slides-Cj4figHV.js → nano-slides-BhpvytBB.js} +9 -9
  59. package/dist/cjs/nano-slides.cjs.entry.js +3 -3
  60. package/dist/cjs/nano-sortable.cjs.entry.js +3 -3
  61. package/dist/cjs/nano-spinner.cjs.entry.js +3 -3
  62. package/dist/cjs/nano-split-pane.cjs.entry.js +2 -2
  63. package/dist/cjs/nano-sticker.cjs.entry.js +6 -6
  64. package/dist/cjs/nano-tab-content.cjs.entry.js +4 -4
  65. package/dist/cjs/nano-tab-group.cjs.entry.js +4 -4
  66. package/dist/cjs/nano-tab.cjs.entry.js +4 -4
  67. package/dist/cjs/nano-table.cjs.entry.js +5 -5
  68. package/dist/cjs/{page-dots-E6b7S4vs.js → page-dots-DeSuT5bE.js} +3 -3
  69. package/dist/cjs/{renderer-Z8wHFL4e.js → renderer-h0yo23iy.js} +1 -1
  70. package/dist/cjs/{scroll-DspYj7mY.js → scroll-_aiH0KkA.js} +1 -1
  71. package/dist/cjs/{slot-B4QUWT-c.js → slot-Hlplqf1Z.js} +1 -1
  72. package/dist/cjs/{style-BccHkuhC.js → style-Bf3iH5GX.js} +16 -2
  73. package/dist/cjs/{tabbable-YPytg5sg.js → tabbable-CkzmpQhq.js} +1 -1
  74. package/dist/cjs/{table.worker-bFxUCos7.js → table.worker-C5ofbi7M.js} +6 -6
  75. package/dist/collection/collection-manifest.json +1 -1
  76. package/dist/collection/components/animation/animation.js +4 -1
  77. package/dist/collection/components/checkbox/checkbox.js +4 -4
  78. package/dist/collection/components/cta/cta.js +9 -11
  79. package/dist/collection/components/data-table/table.js +5 -2
  80. package/dist/collection/components/datalist/datalist.js +6 -6
  81. package/dist/collection/components/file-upload/file-upload.css +140 -215
  82. package/dist/collection/components/file-upload/file-upload.js +66 -44
  83. package/dist/collection/components/footer/footer.css +2 -3
  84. package/dist/collection/components/footer/footer.js +4 -3
  85. package/dist/collection/components/form-control/form-control.js +1 -1
  86. package/dist/collection/components/global-nav/global-nav.js +35 -14
  87. package/dist/collection/components/masked-overflow/masked-overflow.css +3 -4
  88. package/dist/collection/components/masked-overflow/masked-overflow.js +8 -6
  89. package/dist/collection/components/more-less/more-less.js +6 -3
  90. package/dist/collection/components/progress-bar/progress-bar.css +78 -33
  91. package/dist/collection/components/progress-bar/progress-bar.js +18 -61
  92. package/dist/collection/components/rating/rating.js +4 -4
  93. package/dist/collection/components/resize-observe/resize-observe.js +1 -1
  94. package/dist/collection/components/select/select.js +7 -7
  95. package/dist/collection/components/skeleton/skeleton.js +2 -2
  96. package/dist/collection/components/slides/slide.js +1 -1
  97. package/dist/collection/components/slides/slides.js +4 -4
  98. package/dist/collection/components/sortable/sortable.js +1 -1
  99. package/dist/collection/components/spinner/spinner.js +1 -1
  100. package/dist/collection/components/sticker/sticker.js +2 -2
  101. package/dist/collection/components/table/table.js +3 -2
  102. package/dist/collection/components/tabs/tab-content.js +2 -2
  103. package/dist/collection/components/tabs/tab.js +2 -2
  104. package/dist/collection/components/tag/tag.js +2 -2
  105. package/dist/collection/components/tooltip/tooltip.js +2 -2
  106. package/dist/collection/utils/style.js +16 -2
  107. package/dist/components/cta.js +11 -9
  108. package/dist/components/datalist.js +6 -6
  109. package/dist/components/form-control.js +1 -1
  110. package/dist/components/masked-overflow.js +5 -5
  111. package/dist/components/nano-animation.js +1 -1
  112. package/dist/components/nano-checkbox.js +4 -4
  113. package/dist/components/nano-data-table.js +5 -2
  114. package/dist/components/nano-file-upload.js +58 -33
  115. package/dist/components/nano-footer.js +5 -4
  116. package/dist/components/nano-global-nav.js +18 -13
  117. package/dist/components/nano-more-less.js +2 -2
  118. package/dist/components/nano-rating.js +4 -4
  119. package/dist/components/nano-slide.js +1 -1
  120. package/dist/components/nano-sortable.js +1 -1
  121. package/dist/components/nano-tab-content.js +2 -2
  122. package/dist/components/nano-tab.js +2 -2
  123. package/dist/components/nano-table.js +4 -4
  124. package/dist/components/progress-bar.js +7 -23
  125. package/dist/components/resize-observe.js +1 -1
  126. package/dist/components/select.js +7 -7
  127. package/dist/components/skeleton.js +2 -2
  128. package/dist/components/slides.js +3 -3
  129. package/dist/components/spinner.js +1 -1
  130. package/dist/components/sticker.js +2 -2
  131. package/dist/components/style.js +16 -2
  132. package/dist/components/tag.js +2 -2
  133. package/dist/components/tooltip.js +2 -2
  134. package/dist/esm/{algolia-data-CCqzaIh4.js → algolia-data-D6wnbV__.js} +1 -1
  135. package/dist/esm/{component-store-C-YnXSQE.js → component-store-CH5BI3Tg.js} +1 -1
  136. package/dist/esm/{dom-GYcqUAl_.js → dom-Cb7FUtXp.js} +1 -1
  137. package/dist/esm/{fade-C3aqZinc.js → fade-CnaZvOTY.js} +3 -3
  138. package/dist/esm/{form-control-BjKTwcqA.js → form-control-BOVGZF9R.js} +2 -2
  139. package/dist/esm/{fullscreen-T7b44-vN.js → fullscreen-BIFliVxG.js} +3 -3
  140. package/dist/esm/{index-DOuz1S3w.js → index-DXvE-U_j.js} +157 -136
  141. package/dist/esm/{index-DkZY6pJu.js → index-Dw3NZx59.js} +1 -1
  142. package/dist/esm/index.js +4 -4
  143. package/dist/esm/{lazyload-BdH0bSmg.js → lazyload-D_Ju_KaC.js} +3 -3
  144. package/dist/esm/loader.js +3 -3
  145. package/dist/esm/{modal-s7sHBYzQ.js → modal-B_AxJQQp.js} +1 -1
  146. package/dist/esm/nano-accordion.entry.js +3 -3
  147. package/dist/esm/nano-alert.entry.js +7 -7
  148. package/dist/esm/nano-algolia-filter.entry.js +4 -4
  149. package/dist/esm/nano-algolia-pagination.entry.js +2 -2
  150. package/dist/esm/nano-algolia-results.entry.js +3 -3
  151. package/dist/esm/nano-algolia.entry.js +5 -5
  152. package/dist/esm/nano-animation.entry.js +3 -3
  153. package/dist/esm/nano-avatar_5.entry.js +16 -16
  154. package/dist/esm/nano-breadcrumb.entry.js +2 -2
  155. package/dist/esm/nano-card-carousel.entry.js +2 -2
  156. package/dist/esm/nano-card.entry.js +1 -1
  157. package/dist/esm/nano-checkbox-group.entry.js +2 -2
  158. package/dist/esm/nano-checkbox.entry.js +6 -6
  159. package/dist/esm/nano-collapsible-comparison.entry.js +3 -3
  160. package/dist/esm/nano-components.js +4 -4
  161. package/dist/esm/nano-content-links.entry.js +1 -1
  162. package/dist/esm/nano-cta.entry.js +10 -8
  163. package/dist/esm/{nano-data-table-Bm9J8Phu.js → nano-data-table-CJbVKIuu.js} +10 -7
  164. package/dist/esm/nano-data-table.entry.js +6 -6
  165. package/dist/esm/nano-datalist_3.entry.js +11 -11
  166. package/dist/esm/nano-date-input.entry.js +2 -2
  167. package/dist/esm/nano-date-picker_2.entry.js +4 -4
  168. package/dist/esm/nano-details.entry.js +3 -3
  169. package/dist/esm/nano-dialog.entry.js +8 -8
  170. package/dist/esm/nano-dropdown_2.entry.js +5 -5
  171. package/dist/esm/nano-field-validator.entry.js +3 -3
  172. package/dist/esm/nano-file-upload.entry.js +50 -31
  173. package/dist/esm/nano-footer.entry.js +4 -4
  174. package/dist/esm/nano-global-nav.entry.js +19 -15
  175. package/dist/esm/nano-grid-item.entry.js +1 -1
  176. package/dist/esm/nano-grid_2.entry.js +2 -2
  177. package/dist/esm/nano-hero.entry.js +2 -2
  178. package/dist/esm/nano-icon-item.entry.js +1 -1
  179. package/dist/esm/nano-icon_3.entry.js +4 -4
  180. package/dist/esm/nano-in-page-nav.entry.js +3 -3
  181. package/dist/esm/nano-intersection-observe.entry.js +4 -4
  182. package/dist/esm/nano-masked-overflow.entry.js +9 -9
  183. package/dist/esm/nano-menu-drawer.entry.js +3 -3
  184. package/dist/esm/nano-more-less.entry.js +4 -4
  185. package/dist/esm/nano-nav-item.entry.js +5 -5
  186. package/dist/esm/nano-progress-bar.entry.js +4 -18
  187. package/dist/esm/nano-range.entry.js +2 -2
  188. package/dist/esm/nano-rating.entry.js +6 -6
  189. package/dist/esm/nano-resize-observe_2.entry.js +5 -5
  190. package/dist/esm/nano-slide.entry.js +3 -3
  191. package/dist/esm/{nano-slides-BEE7xEu_.js → nano-slides-B9KjZVqC.js} +9 -9
  192. package/dist/esm/nano-slides.entry.js +3 -3
  193. package/dist/esm/nano-sortable.entry.js +3 -3
  194. package/dist/esm/nano-spinner.entry.js +3 -3
  195. package/dist/esm/nano-split-pane.entry.js +2 -2
  196. package/dist/esm/nano-sticker.entry.js +6 -6
  197. package/dist/esm/nano-tab-content.entry.js +4 -4
  198. package/dist/esm/nano-tab-group.entry.js +4 -4
  199. package/dist/esm/nano-tab.entry.js +4 -4
  200. package/dist/esm/nano-table.entry.js +5 -5
  201. package/dist/esm/{page-dots-D2WI1eZ0.js → page-dots-BmS6HUrx.js} +3 -3
  202. package/dist/esm/{renderer-CnE0Hztu.js → renderer-BUaAsDso.js} +1 -1
  203. package/dist/esm/{scroll-DHa1CIPP.js → scroll-iCYjzh9N.js} +1 -1
  204. package/dist/esm/{slot-lixS0pd2.js → slot-DYFgWo5f.js} +1 -1
  205. package/dist/esm/{style-BrRDhFfF.js → style-xLaX004n.js} +16 -2
  206. package/dist/esm/{tabbable-QmV19K7Q.js → tabbable-C4l-rYq9.js} +1 -1
  207. package/dist/esm/{table.worker-zeRR3oed.js → table.worker-CsTdjWrS.js} +6 -6
  208. package/dist/nano-components/{algolia-data-CCqzaIh4.js → algolia-data-D6wnbV__.js} +1 -1
  209. package/dist/nano-components/{component-store-C-YnXSQE.js → component-store-CH5BI3Tg.js} +1 -1
  210. package/dist/nano-components/{dom-GYcqUAl_.js → dom-Cb7FUtXp.js} +1 -1
  211. package/dist/nano-components/{fade-C3aqZinc.js → fade-CnaZvOTY.js} +1 -1
  212. package/dist/nano-components/form-control-BOVGZF9R.js +4 -0
  213. package/dist/nano-components/{fullscreen-T7b44-vN.js → fullscreen-BIFliVxG.js} +1 -1
  214. package/dist/nano-components/index-DXvE-U_j.js +5 -0
  215. package/dist/nano-components/{index-DkZY6pJu.js → index-Dw3NZx59.js} +1 -1
  216. package/dist/nano-components/index.esm.js +1 -1
  217. package/dist/nano-components/{lazyload-BdH0bSmg.js → lazyload-D_Ju_KaC.js} +1 -1
  218. package/dist/nano-components/{modal-s7sHBYzQ.js → modal-B_AxJQQp.js} +1 -1
  219. package/dist/nano-components/nano-accordion.entry.js +1 -1
  220. package/dist/nano-components/nano-alert.entry.js +1 -1
  221. package/dist/nano-components/nano-algolia-filter.entry.js +1 -1
  222. package/dist/nano-components/nano-algolia-pagination.entry.js +1 -1
  223. package/dist/nano-components/nano-algolia-results.entry.js +1 -1
  224. package/dist/nano-components/nano-algolia.entry.js +1 -1
  225. package/dist/nano-components/nano-animation.entry.js +1 -1
  226. package/dist/nano-components/nano-avatar_5.entry.js +1 -1
  227. package/dist/nano-components/nano-breadcrumb.entry.js +1 -1
  228. package/dist/nano-components/nano-card-carousel.entry.js +1 -1
  229. package/dist/nano-components/nano-card.entry.js +1 -1
  230. package/dist/nano-components/nano-checkbox-group.entry.js +1 -1
  231. package/dist/nano-components/nano-checkbox.entry.js +1 -1
  232. package/dist/nano-components/nano-collapsible-comparison.entry.js +1 -1
  233. package/dist/nano-components/nano-components.css +24 -20
  234. package/dist/nano-components/nano-components.esm.js +1 -1
  235. package/dist/nano-components/nano-content-links.entry.js +1 -1
  236. package/dist/nano-components/nano-cta.entry.js +1 -1
  237. package/dist/nano-components/{nano-data-table-Bm9J8Phu.js → nano-data-table-CJbVKIuu.js} +1 -1
  238. package/dist/nano-components/nano-data-table.entry.js +1 -1
  239. package/dist/nano-components/nano-datalist_3.entry.js +1 -1
  240. package/dist/nano-components/nano-date-input.entry.js +1 -1
  241. package/dist/nano-components/nano-date-picker_2.entry.js +1 -1
  242. package/dist/nano-components/nano-details.entry.js +1 -1
  243. package/dist/nano-components/nano-dialog.entry.js +1 -1
  244. package/dist/nano-components/nano-dropdown_2.entry.js +1 -1
  245. package/dist/nano-components/nano-field-validator.entry.js +1 -1
  246. package/dist/nano-components/nano-file-upload.entry.js +1 -1
  247. package/dist/nano-components/nano-footer.entry.js +1 -1
  248. package/dist/nano-components/nano-global-nav.entry.js +1 -1
  249. package/dist/nano-components/nano-grid-item.entry.js +1 -1
  250. package/dist/nano-components/nano-grid_2.entry.js +1 -1
  251. package/dist/nano-components/nano-hero.entry.js +1 -1
  252. package/dist/nano-components/nano-icon-item.entry.js +1 -1
  253. package/dist/nano-components/nano-icon_3.entry.js +1 -1
  254. package/dist/nano-components/nano-in-page-nav.entry.js +1 -1
  255. package/dist/nano-components/nano-intersection-observe.entry.js +1 -1
  256. package/dist/nano-components/nano-masked-overflow.entry.js +1 -1
  257. package/dist/nano-components/nano-menu-drawer.entry.js +1 -1
  258. package/dist/nano-components/nano-more-less.entry.js +1 -1
  259. package/dist/nano-components/nano-nav-item.entry.js +1 -1
  260. package/dist/nano-components/nano-progress-bar.entry.js +1 -1
  261. package/dist/nano-components/nano-range.entry.js +1 -1
  262. package/dist/nano-components/nano-rating.entry.js +1 -1
  263. package/dist/nano-components/nano-resize-observe_2.entry.js +1 -1
  264. package/dist/nano-components/nano-slide.entry.js +1 -1
  265. package/dist/nano-components/{nano-slides-BEE7xEu_.js → nano-slides-B9KjZVqC.js} +4 -4
  266. package/dist/nano-components/nano-slides.entry.js +1 -1
  267. package/dist/nano-components/nano-sortable.entry.js +1 -1
  268. package/dist/nano-components/nano-spinner.entry.js +1 -1
  269. package/dist/nano-components/nano-split-pane.entry.js +1 -1
  270. package/dist/nano-components/nano-sticker.entry.js +1 -1
  271. package/dist/nano-components/nano-tab-content.entry.js +1 -1
  272. package/dist/nano-components/nano-tab-group.entry.js +1 -1
  273. package/dist/nano-components/nano-tab.entry.js +1 -1
  274. package/dist/nano-components/nano-table.entry.js +1 -1
  275. package/dist/nano-components/{page-dots-D2WI1eZ0.js → page-dots-BmS6HUrx.js} +1 -1
  276. package/dist/nano-components/{renderer-CnE0Hztu.js → renderer-BUaAsDso.js} +1 -1
  277. package/dist/nano-components/{scroll-DHa1CIPP.js → scroll-iCYjzh9N.js} +1 -1
  278. package/dist/nano-components/{slot-lixS0pd2.js → slot-DYFgWo5f.js} +1 -1
  279. package/dist/nano-components/style-xLaX004n.js +4 -0
  280. package/dist/nano-components/{tabbable-QmV19K7Q.js → tabbable-C4l-rYq9.js} +1 -1
  281. package/dist/nano-components/table.worker-CsTdjWrS.js +4 -0
  282. package/dist/style/components.css +1 -1
  283. package/dist/style/components.css.map +1 -1
  284. package/dist/style/core.css +1 -1
  285. package/dist/style/core.css.map +1 -1
  286. package/dist/style/dark.css +1 -1
  287. package/dist/style/dark.css.map +1 -1
  288. package/dist/style/light.css +1 -1
  289. package/dist/style/light.css.map +1 -1
  290. package/dist/style/nano.css +1 -1
  291. package/dist/style/nano.css.map +1 -1
  292. package/dist/types/components/animation/animation.d.ts +3 -0
  293. package/dist/types/components/cta/cta.d.ts +0 -2
  294. package/dist/types/components/file-upload/file-upload.d.ts +14 -9
  295. package/dist/types/components/global-nav/global-nav.d.ts +4 -2
  296. package/dist/types/components/masked-overflow/masked-overflow.d.ts +4 -2
  297. package/dist/types/components/more-less/more-less.d.ts +4 -1
  298. package/dist/types/components/progress-bar/progress-bar.d.ts +6 -13
  299. package/dist/types/components/slides/slides-interface.d.ts +1 -1
  300. package/dist/types/components.d.ts +83 -69
  301. package/docs-json.json +171 -186
  302. package/docs-vscode.json +18 -11
  303. package/hydrate/index.js +299 -254
  304. package/hydrate/index.mjs +299 -254
  305. package/package.json +2 -2
  306. package/dist/collection/components/file-upload/file-upload-list.js +0 -3
  307. package/dist/nano-components/form-control-BjKTwcqA.js +0 -4
  308. package/dist/nano-components/index-DOuz1S3w.js +0 -5
  309. package/dist/nano-components/style-BrRDhFfF.js +0 -4
  310. package/dist/nano-components/table.worker-zeRR3oed.js +0 -4
  311. package/dist/types/components/file-upload/file-upload-list.d.ts +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{j as t,a as e,r as i,c as s,e as n,f as o,d as r}from"./index-DOuz1S3w.js";import{a}from"./algoliasearch-lite.esm.browser-C1SNUAIj.js";import{g as h}from"./dom-GYcqUAl_.js";import{C as l}from"./component-store-C-YnXSQE.js";import{d as c}from"./throttle-C93FMm2Z.js";import{t as u,h as f}from"./renderer-CnE0Hztu.js";import{S as d}from"./algolia-data-CCqzaIh4.js";var p=new Map,m=function(t,e){var i=t.updater;t.fields.forEach((function(t){i(t,e[t])}))},g=function(e,i){var s=e.state,n=t();if(p.has(n)){var o=p.get(n);o.state=s,o.wormholes.forEach((function(t){m(t,s)}))}return i};class y{queue=[];workingOnPromise=!1;static pendingPromise=!1;stop=!1;limit=null;enqueue(t){return new Promise(((e,i)=>{this.queue.push({promise:t,resolve:e,reject:i}),this.dequeue()}))}dequeue(){if(this.workingOnPromise)return!1;if(this.stop)return this.queue=[],void(this.stop=!1);const t=this.queue.shift();if(!t)return!1;try{this.workingOnPromise=!0,t.promise().then((e=>{this.workingOnPromise=!1,t.resolve(e),this.dequeue()})).catch((e=>{this.workingOnPromise=!1,t.reject(e),this.dequeue()}))}catch(e){this.workingOnPromise=!1,t.reject(e),this.dequeue()}return!0}}function b(t){const e=new Error(t);var i,s;return i=e,s=b.prototype,Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s,e}function w(t,e,i){const s=e.slice(0,i).split(/\n/),n=s.length,o=s[n-1].length+1;throw b(t+=" at line "+n+" col "+o+":\n\n "+e.split(/\n/)[n-1]+"\n "+Array(o).join(" ")+"^")}b.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});const v=new Function("return this")().Promise;let x=!1;try{x=new Function("return (async function(){}).constructor")()}catch(t){if(!(t instanceof SyntaxError))throw t}function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e,i){for(const s in e)F(e,s)&&(t[s]=null==e[s]||"object"!=typeof e[s]||"storage"!==s&&"prefixes"!==s||i?e[s]:C({},e[s]));return t}const I=/^async +/,k=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,S=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,R=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,j=/[.*+\-?^${}()|[\]\\]/g;function z(t){return j.test(t)?t.replace(j,"\\$&"):t}function A(t,e){e.rmWhitespace&&(t=t.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),k.lastIndex=0,S.lastIndex=0,R.lastIndex=0;const i=e.prefixes,s=[i.h,i.b,i.i,i.r,i.c,i.e].reduce((function(t,e){return t&&e?t+"|"+z(e):e?z(e):t}),""),n=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+z(e.tags[1])+")","g"),o=new RegExp("([^]*?)"+z(e.tags[0])+"(-|_)?\\s*("+s+")?\\s*","g");let r=0,a=!1;function h(i,s){const h={f:[]};let l,c=0,u="c";function f(i){const s=t.slice(r,i);let n=s.trim();if("f"===u)"safe"===n?h.raw=!0:e.async&&I.test(n)?(n=n.replace(I,""),h.f.push([n,"",!0])):h.f.push([n,""]);else if("fp"===u)h.f[h.f.length-1][1]+=n;else if("err"===u){if(n){const e=s.search(/\S/);w("invalid syntax",t,r+e)}}else h[u]=n;r=i+1}for("h"===s||"b"===s||"c"===s?u="n":"r"===s&&(h.raw=!0,s="i"),n.lastIndex=r;null!==(l=n.exec(t));){const e=l[1],i=l[2],d=l[3],p=l[4],m=l[5],g=l.index;if(e)"("===e?(0===c&&("n"===u?(f(g),u="p"):"f"===u&&(f(g),u="fp")),c++):")"===e?(c--,0===c&&"c"!==u&&(f(g),u="err")):0===c&&"|"===e?(f(g),u="f"):"=>"===e&&(f(g),r+=1,u="res");else if(i)if("/*"===i){const e=t.indexOf("*/",n.lastIndex);-1===e&&w("unclosed comment",t,l.index),n.lastIndex=e+2}else"'"===i?(S.lastIndex=l.index,S.exec(t)?n.lastIndex=S.lastIndex:w("unclosed string",t,l.index)):'"'===i?(R.lastIndex=l.index,R.exec(t)?n.lastIndex=R.lastIndex:w("unclosed string",t,l.index)):"`"===i&&(k.lastIndex=l.index,k.exec(t)?n.lastIndex=k.lastIndex:w("unclosed string",t,l.index));else if(d)return f(g),r=g+l[0].length,o.lastIndex=r,a=m,p&&"h"===s&&(s="s"),h.t=s,h}return w("unclosed tag",t,i),h}const l=function s(n,l){n.b=[],n.d=[];let c,u=!1,f=[];function d(t,i){t&&(t=function(t,e,i,s){let n,o;return"string"==typeof e.autoTrim?n=o=e.autoTrim:Array.isArray(e.autoTrim)&&(n=e.autoTrim[1],o=e.autoTrim[0]),(i||!1===i)&&(n=i),(s||!1===s)&&(o=s),"slurp"===n&&"slurp"===o?t.trim():("_"===n||"slurp"===n?t=String.prototype.trimLeft?t.trimLeft():t.replace(/^[\s\uFEFF\xA0]+/,""):"-"!==n&&"nl"!==n||(t=t.replace(/^(?:\n|\r|\r\n)/,"")),"_"===o||"slurp"===o?t=String.prototype.trimRight?t.trimRight():t.replace(/[\s\uFEFF\xA0]+$/,""):"-"!==o&&"nl"!==o||(t=t.replace(/(?:\n|\r|\r\n)$/,"")),t)}(t,e,a,i),t&&(t=t.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),f.push(t)))}for(;null!==(c=o.exec(t));){const o=c[1],a=c[2],l=c[3]||"";let p;for(const t in i)if(i[t]===l){p=t;break}d(o,a),r=c.index+c[0].length,p||w("unrecognized tag type: "+l,t,r);let m=h(c.index,p);const g=m.t;if("h"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),m=s(m),f.push(m)}else if("c"===g){if(n.n===m.n)return u?(u.d=f,n.b.push(u)):n.d=f,n;w("Helper start and end don't match",t,c.index+c[0].length)}else if("b"===g){u?(u.d=f,n.b.push(u)):n.d=f;const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),u=m,f=[]}else if("s"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),f.push(m)}else f.push(m)}if(!l)throw b('unclosed helper "'+n.n+'"');return d(t.slice(r,t.length),!1),n.d=f,n}({f:[]},!0);if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processAST&&(l.d=i.processAST(l.d,e))}return l.d}function _(t,e){const i=A(t,e);let s="var tR='';"+(e.useWith?"with("+e.varName+"||{}){":"")+O(i,e)+"if(cb){cb(null,tR)} return tR"+(e.useWith?"}":"");if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processFnString&&(s=i.processFnString(s,e))}return s}function P(t,e){for(let i=0;i<e.length;i++){const s=e[i][1];t=(e[i][2]?"await ":"")+"c.l('F','"+e[i][0]+"')("+t,s&&(t+=","+s),t+=")"}return t}function T(t,e,i,s,n,o){let r="{exec:"+(n?"async ":"")+q(i,e,t)+",params:["+s+"]";return o&&(r+=",name:'"+o+"'"),n&&(r+=",async:true"),r+="}",r}function E(t,e){let i="[";for(let s=0;s<t.length;s++){const n=t[s];i+=T(e,n.res||"",n.d,n.p||"",n.a,n.n),s<t.length&&(i+=",")}return i+="]",i}function q(t,e,i){return"function("+e+"){var tR='';"+O(t,i)+"return tR}"}function O(t,e){let i=0;const s=t.length;let n="";for(;i<s;i++){const s=t[i];if("string"==typeof s)n+="tR+='"+s+"';";else{const t=s.t;let i=s.c||"";const o=s.f,r=s.n||"",a=s.p||"",h=s.res||"",l=s.b,c=!!s.a;if("i"===t){e.defaultFilter&&(i="c.l('F','"+e.defaultFilter+"')("+i+")");let t=P(i,o);!s.raw&&e.autoEscape&&(t="c.l('F','e')("+t+")"),n+="tR+="+t+";"}else if("h"===t)if(e.storage.nativeHelpers.get(r))n+=e.storage.nativeHelpers.get(r)(s,e);else{let t=(c?"await ":"")+"c.l('H','"+r+"')("+T(e,h,s.d,a,c);t+=l?","+E(l,e):",[]",t+=",c)",n+="tR+="+P(t,o)+";"}else"s"===t?n+="tR+="+P((c?"await ":"")+"c.l('H','"+r+"')({params:["+a+"]},[],c)",o)+";":"e"===t&&(n+=i+"\n")}}return n}class H{cache;constructor(t){this.cache=t}define(t,e){this.cache[t]=e}get(t){return this.cache[t]}remove(t){delete this.cache[t]}reset(){this.cache={}}load(t){C(this.cache,t,!0)}}function N(t,e,i,s){if(e&&e.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept blocks");if(i&&i.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept filters")}function D(t,e,i,s,n){i(t[e],e).then((function(o){s+=o,e===t.length-1?n(s):D(t,e+1,i,s,n)}))}function $(t,e,i,s,n,o){s(e[i],t[e[i]]).then((function(r){n+=r,i===e.length-1?o(n):$(t,e,i+1,s,n,o)}))}const L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function M(t){return L[t]}const Q=new H({}),W=new H({each:function(t,e){let i="";const s=t.params[0];if(N("each",e,!1),t.async)return new Promise((function(e){D(s,0,t.exec,i,e)}));for(let e=0;e<s.length;e++)i+=t.exec(s[e],e);return i},foreach:function(t,e){const i=t.params[0];if(N("foreach",e,!1),t.async)return new Promise((function(e){$(i,Object.keys(i),0,t.exec,"",e)}));{let e="";for(const s in i)F(i,s)&&(e+=t.exec(s,i[s]));return e}},include:function(t,e,i){N("include",e,!1);const s=i.storage.templates.get(t.params[0]);if(!s)throw b('Could not fetch template "'+t.params[0]+'"');return s(t.params[1],i)},extends:function(t,e,i){const s=t.params[1]||{};s.content=t.exec();for(let t=0;t<e.length;t++){const i=e[t];s[i.name]=i.exec()}const n=i.storage.templates.get(t.params[0]);if(!n)throw b('Could not fetch template "'+t.params[0]+'"');return n(s,i)},useScope:function(t,e){return N("useScope",e,!1),t.exec(t.params[0])}}),U=new H({if:function(t,e){N("if",!1,t.f,!0);let i="if("+t.p+"){"+O(t.d,e)+"}";if(t.b)for(let s=0;s<t.b.length;s++){const n=t.b[s];"else"===n.n?i+="else{"+O(n.d,e)+"}":"elif"===n.n&&(i+="else if("+n.p+"){"+O(n.d,e)+"}")}return i},try:function(t,e){if(N("try",!1,t.f,!0),!t.b||1!==t.b.length||"catch"!==t.b[0].n)throw b("native helper 'try' only accepts 1 block, 'catch'");let i="try{"+O(t.d,e)+"}";const s=t.b[0];return i+="catch"+(s.res?"("+s.res+")":"")+"{"+O(s.d,e)+"}",i},block:function(t,e){return N("block",t.b,t.f,!0),"if(!"+e.varName+"["+t.p+"]){tR+=("+q(t.d,"",e)+")()}else{tR+="+e.varName+"["+t.p+"]}"}}),B=new H({e:function(t){const e=String(t);return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,M):e}}),K={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(t,e){if("H"===t){const t=this.storage.helpers.get(e);if(t)return t;throw b("Can't find helper '"+e+"'")}if("F"===t){const t=this.storage.filters.get(e);if(t)return t;throw b("Can't find filter '"+e+"'")}},async:!1,storage:{helpers:W,nativeHelpers:U,filters:B,templates:Q},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function G(t,e){const i={};return C(i,K),e&&C(i,e),t&&C(i,t),i.l.bind(i),i}function Y(t,e){const i=G(e||{});let s=Function;if(i.async){if(!x)throw b("This environment doesn't support async/await");s=x}try{return new s(i.varName,"c","cb",_(t,i))}catch(e){throw e instanceof SyntaxError?b("Bad template syntax\n\n"+e.message+"\n"+Array(e.message.length+1).join("=")+"\n"+_(t,i)):e}}function X(t,e){let i;return e.cache&&e.name&&e.storage.templates.get(e.name)?e.storage.templates.get(e.name):(i="function"==typeof t?t:Y(t,e),e.cache&&e.name&&e.storage.templates.define(e.name,i),i)}K.l.bind(K);var Z=Object.freeze({__proto__:null,compile:Y,compileScope:O,compileScopeIntoFunction:q,compileToString:_,defaultConfig:K,filters:B,getConfig:G,helpers:W,nativeHelpers:U,parse:A,render:function(t,e,i,s){const n=G(i||{});if(!n.async)return X(t,n)(e,n);{let i;if(!s){if("function"==typeof v)return new v((function(s,o){try{i=X(t,n)(e,n),s(i)}catch(t){o(t)}}));throw b("Please provide a callback function, this env doesn't support Promises")}try{X(t,n)(e,n,s)}catch(t){return s(t)}}},templates:Q});B.define("date_long",((t,e={year:"numeric",month:"long",day:"numeric"})=>{if(t)return new Date(1e3*parseInt(t)).toLocaleDateString("en-GB",e)})),B.define("date_short",((t,e="d/m/y")=>{if(!t)return;const i=new Date(1e3*parseInt(t));return(t=(t=e.replace(/(d)/,i.getDate().toString())).replace(/(m)/,(i.getMonth()+1).toString())).replace(/(y)/,i.getFullYear().toString())})),B.define("public_name",(t=>{if(t)return(t=t.split("_").map((t=>t.length<3?t.toUpperCase():t)).join(" ")).charAt(0).toUpperCase()+t.slice(1)})),B.define("trim_to",((t,e=100)=>{if(t)return t.length<=e?t:t.substr(0,e)+"..."})),B.define("classname",(t=>{if(t)return t.replace(/[\W]+/g,"")})),B.define("abs_url",((t,e=null,i)=>{if(!e)return t;if(!t)return;let s;if(e.domains&&i&&i.origin){const t=e.domains.find((t=>t.origin===i.origin));s=t?t.domain:""}else e.domain&&(s=e.domain);return t.match(/^http/)||!s?t:(t.startsWith("/")||(t="/"+t),location.protocol+"//"+s+t)})),B.define("replace",((t,e,i)=>t.replace(e,i))),B.define("remove_spaces",(t=>t.replace(/ /g,"_"))),B.define("add_spaces",(t=>t.replace(/[_\-]/g," "))),B.define("capitalise",(t=>t.charAt(0).toUpperCase()+t.slice(1))),B.define("lowercase",(t=>t.toLowerCase()));const J=Z,V=class{constructor(t){i(this,t),this.nanoDidLoad=s(this,"nanoDidLoad",7),this.nanoResultsShown=s(this,"nanoResultsShown",3),this.nanoBeforeQuery=s(this,"nanoBeforeQuery",7),this.nanoAfterQuery=s(this,"nanoAfterQuery",7),this.nanoNewResults=s(this,"nanoNewResults",7)}staticFacetFilters={};dynFacetFilters={};tplSlot;outputSlot;slottedInput;hasLoadSlot=!1;resultsDiv;defaultDiv;tpl;facets;placedAlgoliaEles=[];algoliaClient;promiseQueue=new y;get host(){return e(this)}_dynFacetFilters={};inputField;algoliaIndex;indeces=[];indexResults;filterChanged="";currentHits;changeEvent=d.Init;isLoading=!1;wormholeState=this;showResults=!1;resultsPage=0;appId;apiKey;searchIndex={};searchIndexName="";listenTo=null;handleListenToChange(){if(!this.listenTo)return;const t=document.querySelector(this.listenTo);["nano-input","input"].includes(t.tagName.toLocaleLowerCase())&&(this.inputField=t)}query="";operator="and";filters=[];tplRenderFn=J.render;replicaIndex="";browseIndex=!1;minChars=2;storeId;storeMethod="session";nanoDidLoad;nanoResultsShown;nanoBeforeQuery;nanoAfterQuery;nanoNewResults;async removeFilters(t,e){t||e?Object.keys(this._dynFacetFilters).forEach((i=>{t&&this._dynFacetFilters[i].facetName===t&&(this._dynFacetFilters[i].element.value=e?this._dynFacetFilters[i].value.filter((t=>t!==e)):"")})):this.clearAllFacetFilters()}onAllTplUpdate(t){t.stopPropagation(),t.target.tagName.toLowerCase()===u("nano-algolia-results")&&requestAnimationFrame((()=>{this.nanoNewResults.emit(this.indexResults)}))}async onPageChange(t){if(!this.indexResults)return;let e=this.resultsPage;t&&(t.stopPropagation(),e=t.detail.page),e=Math.min(this.indexResults.totalPages-1,e),e=Math.max(e,0),this.indexResults.currentPage!==e&&(this.indexResults.currentPage=e,await this.algoliaSearch(d.Page))}async onFilterChange(t){t.stopPropagation();const e={},i=t.detail;i.element=t.target,this.indexResults?(this.staticFacetFilters[i.filterId]?this.staticFacetFilters[i.filterId]=i:(e[i.filterId]=i,this._dynFacetFilters={...this._dynFacetFilters,...e}),this.indexResults.appliedFilters=this.makeAppliedFilters()):this.staticFacetFilters[i.filterId]=i,this.filterChanged=i.value&&i.value.length?i.filterId:"all",this.resetPage(),this.algoliaSearch(d.Filter)}dynFacetFiltersChange(){Object.values(this._dynFacetFilters).forEach((t=>{this.host.ownerDocument===t.element.ownerDocument?this.dynFacetFilters[t.filterId]=t:delete this.dynFacetFilters[t.filterId]}))}browseIndexChange(){this.browseIndex&&(!this.query||this.query.length<this.minChars)&&(this.query="*")}inputFieldSet(){this.inputField&&"*"!==this.query&&this.inputField&&this.inputField.value!==this.query&&(this.inputField.value=this.query)}queryChange(){this.searchChange()}searchChange=async()=>{if(this.algoliaIndex){if(!this.query||this.query.length<this.minChars){if(!this.browseIndex)return this.query&&0!==this.query.length?void 0:void this.handleSearchReset();if("*"!==this.query)return void(this.query="*")}this.isLoading=!0,setTimeout((async()=>{this.resetPage(),await this.algoliaSearch(d.Init),await this.updateContent(),setTimeout((()=>this.isLoading=!1),800),this.showResults=!0,this.nanoResultsShown.emit({meta:this.indexResults,client:{appId:this.appId,apiKey:this.apiKey}})}),200)}};async internalIndexSwitch(){this.replicaIndex&&this.indexResults&&this.indexResults.index!==this.replicaIndex&&(this.indexResults.index=this.replicaIndex,this.algoliaIndex=this.algoliaClient.initIndex(this.indexResults.index),this.resetPage(),this.algoliaSearch(d.Replica))}pageChange(){this.onPageChange()}searchIndexNameChange(){!this.searchIndexName||!this.searchIndexName.length||this.searchIndex&&this.searchIndex.index===this.searchIndexName||(this.searchIndex={index:this.searchIndexName})}initAlgoliaClient(){this.appId&&this.apiKey&&(this.algoliaClient=a(this.appId,this.apiKey))}initAlgoliaIndex(){this.algoliaClient&&this.searchIndex&&this.searchIndex.index&&(this.searchIndex.hitsPerPage||(this.searchIndex.hitsPerPage=100),this.replicaIndex&&(this.searchIndex.index=this.replicaIndex),this.searchIndexName=this.searchIndex.index,this.algoliaIndex=this.algoliaClient.initIndex(this.searchIndex.index),this.searchChange())}showResultsChange(){this.resultsDiv&&this.defaultDiv&&(this.showResults?(this.resultsDiv.style.width=this.host.scrollWidth+"px",this.resultsDiv.style.minHeight=this.host.scrollHeight+"px",n((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.style.display="block",setTimeout((()=>this.resultsDiv.classList.add("show")),50)}))):n((()=>{this.resultsDiv.classList.remove("shown"),this.defaultDiv.style.display="block",setTimeout((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.classList.remove("show"),this.slottedInput?this.slottedInput.focus({preventScroll:!0}):this.defaultDiv.focus({preventScroll:!0})}),50)})))}handleFilterpropChange(){this.algoliaSearch(d.Init)}fixDomain(t){return this.searchIndex&&this.searchIndex.domain?(t.hits.map((t=>{t.url&&!t.url.match(/^http/)&&(t.url=location.protocol+"//"+this.searchIndex.domain+t.url)})),t):t}makeAppliedFilters=()=>{const t=[],e=e=>{Object.values(e).forEach((e=>{if(e.value&&e.value.length){const i=t.find((t=>t.name===e.facetName));i?i.values=[...i.values,...e.value]:t.push({name:e.facetName,values:[...e.value]})}}))};return e(this.dynFacetFilters),e(this.staticFacetFilters),t.length?t:null};algoliaSearch=async t=>this.promiseQueue.enqueue((()=>this.queueSearch(t)));queueSearch=async t=>{if(!(this.algoliaIndex&&this.query&&this.searchIndex&&this.searchIndex.index))return;this.nanoBeforeQuery.emit(this.indexResults),d.Init===t&&this.clearAllFacetFilters();const e={filters:this.algoliaFilterStr(),page:this.indexResults?this.indexResults.currentPage:0,clickAnalytics:!0};this.searchIndex.filters&&(e.facets=this.searchIndex.filters),this.searchIndex.hitsPerPage&&(e.hitsPerPage=this.searchIndex.hitsPerPage);let i=await this.algoliaIndex.search(this.query,e);return i=this.fixDomain(i),this.changeEvent=t,t!==d.Init&&this.indexResults||(this.indexResults={queryID:i.queryID,currentPage:0,totalHits:i.nbHits,hitsPerPage:null,origFilters:i.facets,query:this.query,domain:this.searchIndex.domain||null,totalHitsWithFilters:0,results:[],totalPages:0,appliedFilters:this.makeAppliedFilters(),indexName:this.searchIndex.name||null,index:this.searchIndex.index,searchIndex:this.searchIndex}),this.indexResults.dynFilters=i.facets,this.indexResults.results=i.hits,this.indexResults.totalHitsWithFilters=i.nbHits,this.indexResults.currentPage=i.page,this.indexResults.totalPages=i.nbPages,this.indexResults.hitsPerPage=i.hitsPerPage,this.indexResults.query=i.query,this.changeEvent!==d.Page&&this.changeEvent!==d.Replica&&(this.facets=i.facets),this.nanoAfterQuery.emit(this.indexResults),new Promise((t=>{setTimeout((()=>t("tpl updated")),20)})).then((()=>{this.currentHits=this.indexResults.results,this.resultsPage=this.indexResults.currentPage}))};resetPage(){this.indexResults&&(this.indexResults.currentPage=0)}clearAllFacetFilters(){Object.values(this._dynFacetFilters).forEach((t=>{t.element.value=""})),this._dynFacetFilters={}}algoliaFilterStr(){const t={},e=e=>{let i,s;Object.keys(e).forEach((n=>{i=e[n],t[n]=t[n]||{name:i.facetName,or:[],and:[],not:[]},s=t[n][i.operator],i.value&&i.value.length&&(t[n][i.operator]=[...s,...i.value])}))};e(this.dynFacetFilters),e(this.staticFacetFilters);const i=(t,e)=>e.indexOf(" ")>-1?t+':"'+e+'"':t+":"+e;let s,n,o=[];return Object.values(t).forEach((function(t){Object.keys(t).filter((t=>t.match(/(or|and|not)/))).forEach((e=>{s=t,n=t.name,"or"===e||"and"===e?s[e].length&&o.push("( "+s[e].map((t=>{if(t.length)return i(n,t)})).join(" "+e.toLocaleUpperCase()+" ")+" )"):s.not.length&&o.push("( "+s[e].map((t=>{if(t.length)return"NOT "+i(n,t)})).join(" AND ")+" )")}))})),o=[...this.filters,...o],o.join(" "+this.operator.toLocaleUpperCase()+" ")}handleInputChange(t){t.target===this.inputField&&(this.query=this.inputField.value)}handleSearchReset=()=>{this.showResults=!1,this.indexResults=null};onResultDisplay=()=>{n((()=>{this.resultsDiv.removeEventListener("transitionend",this.onResultDisplay),this.showResults?(this.defaultDiv.style.display="none",this.resultsDiv.classList.add("shown"),this.resultsDiv.style.minHeight="",this.resultsDiv.style.width=""):this.resultsDiv.style.display="none"}))};async updateContent(){return this.promiseQueue.enqueue((()=>this.updateContentQueue()))}async updateContentQueue(){const t=this.outputSlot||this.resultsDiv;if(!t||!this.tpl)return"no tpl";const e=document.createElement("div");e.innerHTML=this.tpl;const i=[];return this.placedAlgoliaEles=[],Array.from(e.querySelectorAll(`${u("nano-algolia")}, ${u("nano-algolia-filter")}, ${u("nano-algolia-results")}`)).forEach(((t,e)=>{const s=document.createElement("div");s.dataset.placeholderId=e.toString(),s.classList.add("nano-ele-placeholder"),i.push(t),t.parentNode.replaceChild(s,t)})),t.innerHTML=this.tplRenderFn(e.innerHTML.replace(/&gt;/gm,">").replace(/&lt;/gm,"<").replace(/&amp;/gm,"&"),this.indexResults),Array.from(t.querySelectorAll("div.nano-ele-placeholder")).forEach((t=>{t.parentNode.replaceChild(i[parseInt(t.dataset.placeholderId)],t),this.placedAlgoliaEles.push(i[parseInt(t.dataset.placeholderId)])})),this.placedAlgoliaEles.length?new Promise((e=>{const i=s=>{this.placedAlgoliaEles=this.placedAlgoliaEles.filter((t=>t!==s.detail)),this.placedAlgoliaEles.length||(setTimeout((()=>e("tpl updated")),500),t.removeEventListener("nanoTplUpdated",i))};t.addEventListener("nanoTplUpdated",i)})):Promise.resolve("algolia setup")}componentWillLoad(){o((()=>{this.tplSlot=h(this.host,'[slot="template"]')[0],this.outputSlot=h(this.host,'[slot="output"]')[0],this.slottedInput=h(this.host,'[slot="search-input"]')[0],this.hasLoadSlot=!!h(this.host,'[slot="loader"]')[0],this.tplSlot&&(this.tpl=this.tplSlot.innerHTML||this.tplSlot.innerText),this.slottedInput&&(this.slottedInput.tagName.toLocaleLowerCase()===u("nano-input")||this.slottedInput instanceof HTMLInputElement)?this.inputField=this.slottedInput:this.slottedInput?this.inputField=this.slottedInput.querySelector(`${u("nano-input")}, input:not([type="radio"]):not([type="checkbox"])`):this.handleListenToChange(),n((()=>{this.showResults&&this.tpl&&this.searchChange()}))})),this.searchIndexNameChange(),this.initAlgoliaClient(),this.initAlgoliaIndex(),function(t,i){var s=e(t),n=new Map,o={wormholes:n,state:i};p.set(t,o);var r=t.connectedCallback;t.connectedCallback=function(){p.set(t,o),r&&r.call(t)};var a=t.disconnectedCallback;t.disconnectedCallback=function(){p.delete(t),a&&a.call(t)},s.addEventListener("openWormhole",(function(t){t.stopPropagation();var e=t.detail,i=e.consumer,s=e.onOpen;if(!n.has(i)){if("symbol"!=typeof i){var r=i.connectedCallback,a=i.disconnectedCallback;i.connectedCallback=function(){n.set(i,t.detail),r&&r.call(i)},i.disconnectedCallback=function(){n.delete(i),a&&a.call(i)}}n.set(i,t.detail),m(t.detail,o.state),null==s||s.resolve((function(){n.delete(i)}))}})),s.addEventListener("closeWormhole",(function(t){n.delete(t.detail)}))}(this,this.wormholeState),this.storeId&&(l.init(this,["query","replicaIndex"],this.storeMethod,this.storeId),l.init(this,["apiKey","appId","searchIndex"],"session",this.storeId+"_api")),this.internalIndexSwitch()}connectedCallback(){this.searchChange=c(this.searchChange,300),this.browseIndexChange(),this.host.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.host}))}render(){const t={indexResults:this.indexResults,results:this.currentHits,filterChanged:this.filterChanged,tplRenderFn:this.tplRenderFn,resultsPage:this.resultsPage,changeEvent:this.changeEvent,facets:this.facets,algoliaIndex:this.algoliaIndex,searchIndex:this.searchIndex,globalStoreMethod:this.storeMethod,isLoading:this.isLoading};return f(r,{key:"e5a080bf3b11c991465f1b44521b75539f80d5ec",class:{"show-results":this.showResults,"is-loading":this.isLoading,"nano-algolia":!0},"aria-busy":this.isLoading},this.hasLoadSlot&&f("div",{key:"586696526af9ba7b721ebfe8aeba2b5a45b8a19a",hidden:!this.isLoading},f("slot",{key:"40556633911954fd20b756fedf71aea7e15b15e1",name:"loader"})),!this.hasLoadSlot&&f("div",{key:"e5ee4968b6864b656b3537ec46b69e64ebe76370",class:{loader:!0,loading:this.isLoading}},f("nano-spinner",{key:"63bbc6292b6a7183fe21a2527ffbd3002548871b",overlay:!0,type:"circle"})),f(g,{key:"64e8d5149940ad9c3353709db00677805f0d9946",state:t},f("slot",{key:"700649f3a918fce90e0e4c533c849942b9c0ad5c",name:"search-input"}),f("div",{key:"5e5c54c6365ea0725a5b995115c196eb5b1026ca",class:"results-container","aria-live":"polite"},f("div",{key:"0a9559ae98ab627e5529dca1026ac1312127d824",ref:t=>this.resultsDiv=t,class:"results"},f("slot",{key:"cf30d2970741dfb1631fca008317e4420d228a98",name:"output"})))),f("div",{key:"4d9cf66b3c2c3d0e10e1a443002db80d686530f7",ref:t=>this.defaultDiv=t,class:"default",tabindex:"-1"},f("slot",{key:"fc365faa7953cdf3a0aa2887716e2f0f3af464fa"})))}static get watchers(){return{listenTo:["handleListenToChange"],_dynFacetFilters:["dynFacetFiltersChange"],browseIndex:["browseIndexChange"],inputField:["inputFieldSet"],query:["queryChange"],replicaIndex:["internalIndexSwitch"],resultsPage:["pageChange"],searchIndexName:["searchIndexNameChange"],apiKey:["initAlgoliaClient"],appId:["initAlgoliaClient"],searchIndex:["initAlgoliaIndex"],showResults:["showResultsChange"],filters:["handleFilterpropChange"]}}};V.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{position:relative;display:block}:host ::slotted([slot=search-template]){display:none !important}.loader{opacity:0;position:fixed;block-size:100%;inline-size:100%;min-block-size:100%;max-block-size:100vh !important;max-inline-size:100vw !important;inset-inline-start:0;inset-block-start:0;z-index:-10;font-size:60px;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease, z-index 0.01s ease 0.2s}.loader.loading{opacity:1;z-index:10;transition:z-index 0.01s ease, opacity 0.2s ease 0.01s}.default{block-size:100%}.default:focus{outline:none}.results{opacity:0;outline:none;overflow:auto;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.01s ease 0.3s, z-index 0.01s ease 0.3s;transform:translate(0, 100px);visibility:hidden;z-index:-1;position:absolute;inset-block-start:0;inset-inline-start:0;display:none}.results-container{position:relative}.results.show{transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.3s ease 0.01s, opacity 0.3s ease 0.01s, overflow 0.01s ease 0.31s;transform:translate(0, 0);visibility:visible;opacity:1;z-index:10;overflow:hidden}.results.shown{block-size:auto !important;inline-size:auto !important;display:block;position:static;transform:none;z-index:auto;visibility:inherit;opacity:initial;overflow:visible}";export{V as nano_algolia}
4
+ import{j as t,a as e,r as i,c as s,e as n,f as o,d as r}from"./index-DXvE-U_j.js";import{a}from"./algoliasearch-lite.esm.browser-C1SNUAIj.js";import{g as h}from"./dom-Cb7FUtXp.js";import{C as l}from"./component-store-CH5BI3Tg.js";import{d as c}from"./throttle-C93FMm2Z.js";import{t as u,h as f}from"./renderer-BUaAsDso.js";import{S as d}from"./algolia-data-D6wnbV__.js";var p=new Map,m=function(t,e){var i=t.updater;t.fields.forEach((function(t){i(t,e[t])}))},g=function(e,i){var s=e.state,n=t();if(p.has(n)){var o=p.get(n);o.state=s,o.wormholes.forEach((function(t){m(t,s)}))}return i};class y{queue=[];workingOnPromise=!1;static pendingPromise=!1;stop=!1;limit=null;enqueue(t){return new Promise(((e,i)=>{this.queue.push({promise:t,resolve:e,reject:i}),this.dequeue()}))}dequeue(){if(this.workingOnPromise)return!1;if(this.stop)return this.queue=[],void(this.stop=!1);const t=this.queue.shift();if(!t)return!1;try{this.workingOnPromise=!0,t.promise().then((e=>{this.workingOnPromise=!1,t.resolve(e),this.dequeue()})).catch((e=>{this.workingOnPromise=!1,t.reject(e),this.dequeue()}))}catch(e){this.workingOnPromise=!1,t.reject(e),this.dequeue()}return!0}}function b(t){const e=new Error(t);var i,s;return i=e,s=b.prototype,Object.setPrototypeOf?Object.setPrototypeOf(i,s):i.__proto__=s,e}function w(t,e,i){const s=e.slice(0,i).split(/\n/),n=s.length,o=s[n-1].length+1;throw b(t+=" at line "+n+" col "+o+":\n\n "+e.split(/\n/)[n-1]+"\n "+Array(o).join(" ")+"^")}b.prototype=Object.create(Error.prototype,{name:{value:"Squirrelly Error",enumerable:!1}});const v=new Function("return this")().Promise;let x=!1;try{x=new Function("return (async function(){}).constructor")()}catch(t){if(!(t instanceof SyntaxError))throw t}function F(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function C(t,e,i){for(const s in e)F(e,s)&&(t[s]=null==e[s]||"object"!=typeof e[s]||"storage"!==s&&"prefixes"!==s||i?e[s]:C({},e[s]));return t}const I=/^async +/,k=/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})*}|(?!\${)[^\\`])*`/g,S=/'(?:\\[\s\w"'\\`]|[^\n\r'\\])*?'/g,R=/"(?:\\[\s\w"'\\`]|[^\n\r"\\])*?"/g,j=/[.*+\-?^${}()|[\]\\]/g;function _(t){return j.test(t)?t.replace(j,"\\$&"):t}function A(t,e){e.rmWhitespace&&(t=t.replace(/[\r\n]+/g,"\n").replace(/^\s+|\s+$/gm,"")),k.lastIndex=0,S.lastIndex=0,R.lastIndex=0;const i=e.prefixes,s=[i.h,i.b,i.i,i.r,i.c,i.e].reduce((function(t,e){return t&&e?t+"|"+_(e):e?_(e):t}),""),n=new RegExp("([|()]|=>)|('|\"|`|\\/\\*)|\\s*((\\/)?(-|_)?"+_(e.tags[1])+")","g"),o=new RegExp("([^]*?)"+_(e.tags[0])+"(-|_)?\\s*("+s+")?\\s*","g");let r=0,a=!1;function h(i,s){const h={f:[]};let l,c=0,u="c";function f(i){const s=t.slice(r,i);let n=s.trim();if("f"===u)"safe"===n?h.raw=!0:e.async&&I.test(n)?(n=n.replace(I,""),h.f.push([n,"",!0])):h.f.push([n,""]);else if("fp"===u)h.f[h.f.length-1][1]+=n;else if("err"===u){if(n){const e=s.search(/\S/);w("invalid syntax",t,r+e)}}else h[u]=n;r=i+1}for("h"===s||"b"===s||"c"===s?u="n":"r"===s&&(h.raw=!0,s="i"),n.lastIndex=r;null!==(l=n.exec(t));){const e=l[1],i=l[2],d=l[3],p=l[4],m=l[5],g=l.index;if(e)"("===e?(0===c&&("n"===u?(f(g),u="p"):"f"===u&&(f(g),u="fp")),c++):")"===e?(c--,0===c&&"c"!==u&&(f(g),u="err")):0===c&&"|"===e?(f(g),u="f"):"=>"===e&&(f(g),r+=1,u="res");else if(i)if("/*"===i){const e=t.indexOf("*/",n.lastIndex);-1===e&&w("unclosed comment",t,l.index),n.lastIndex=e+2}else"'"===i?(S.lastIndex=l.index,S.exec(t)?n.lastIndex=S.lastIndex:w("unclosed string",t,l.index)):'"'===i?(R.lastIndex=l.index,R.exec(t)?n.lastIndex=R.lastIndex:w("unclosed string",t,l.index)):"`"===i&&(k.lastIndex=l.index,k.exec(t)?n.lastIndex=k.lastIndex:w("unclosed string",t,l.index));else if(d)return f(g),r=g+l[0].length,o.lastIndex=r,a=m,p&&"h"===s&&(s="s"),h.t=s,h}return w("unclosed tag",t,i),h}const l=function s(n,l){n.b=[],n.d=[];let c,u=!1,f=[];function d(t,i){t&&(t=function(t,e,i,s){let n,o;return"string"==typeof e.autoTrim?n=o=e.autoTrim:Array.isArray(e.autoTrim)&&(n=e.autoTrim[1],o=e.autoTrim[0]),(i||!1===i)&&(n=i),(s||!1===s)&&(o=s),"slurp"===n&&"slurp"===o?t.trim():("_"===n||"slurp"===n?t=String.prototype.trimLeft?t.trimLeft():t.replace(/^[\s\uFEFF\xA0]+/,""):"-"!==n&&"nl"!==n||(t=t.replace(/^(?:\n|\r|\r\n)/,"")),"_"===o||"slurp"===o?t=String.prototype.trimRight?t.trimRight():t.replace(/[\s\uFEFF\xA0]+$/,""):"-"!==o&&"nl"!==o||(t=t.replace(/(?:\n|\r|\r\n)$/,"")),t)}(t,e,a,i),t&&(t=t.replace(/\\|'/g,"\\$&").replace(/\r\n|\n|\r/g,"\\n"),f.push(t)))}for(;null!==(c=o.exec(t));){const o=c[1],a=c[2],l=c[3]||"";let p;for(const t in i)if(i[t]===l){p=t;break}d(o,a),r=c.index+c[0].length,p||w("unrecognized tag type: "+l,t,r);let m=h(c.index,p);const g=m.t;if("h"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),m=s(m),f.push(m)}else if("c"===g){if(n.n===m.n)return u?(u.d=f,n.b.push(u)):n.d=f,n;w("Helper start and end don't match",t,c.index+c[0].length)}else if("b"===g){u?(u.d=f,n.b.push(u)):n.d=f;const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),u=m,f=[]}else if("s"===g){const t=m.n||"";e.async&&I.test(t)&&(m.a=!0,m.n=t.replace(I,"")),f.push(m)}else f.push(m)}if(!l)throw b('unclosed helper "'+n.n+'"');return d(t.slice(r,t.length),!1),n.d=f,n}({f:[]},!0);if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processAST&&(l.d=i.processAST(l.d,e))}return l.d}function z(t,e){const i=A(t,e);let s="var tR='';"+(e.useWith?"with("+e.varName+"||{}){":"")+q(i,e)+"if(cb){cb(null,tR)} return tR"+(e.useWith?"}":"");if(e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];i.processFnString&&(s=i.processFnString(s,e))}return s}function P(t,e){for(let i=0;i<e.length;i++){const s=e[i][1];t=(e[i][2]?"await ":"")+"c.l('F','"+e[i][0]+"')("+t,s&&(t+=","+s),t+=")"}return t}function T(t,e,i,s,n,o){let r="{exec:"+(n?"async ":"")+O(i,e,t)+",params:["+s+"]";return o&&(r+=",name:'"+o+"'"),n&&(r+=",async:true"),r+="}",r}function E(t,e){let i="[";for(let s=0;s<t.length;s++){const n=t[s];i+=T(e,n.res||"",n.d,n.p||"",n.a,n.n),s<t.length&&(i+=",")}return i+="]",i}function O(t,e,i){return"function("+e+"){var tR='';"+q(t,i)+"return tR}"}function q(t,e){let i=0;const s=t.length;let n="";for(;i<s;i++){const s=t[i];if("string"==typeof s)n+="tR+='"+s+"';";else{const t=s.t;let i=s.c||"";const o=s.f,r=s.n||"",a=s.p||"",h=s.res||"",l=s.b,c=!!s.a;if("i"===t){e.defaultFilter&&(i="c.l('F','"+e.defaultFilter+"')("+i+")");let t=P(i,o);!s.raw&&e.autoEscape&&(t="c.l('F','e')("+t+")"),n+="tR+="+t+";"}else if("h"===t)if(e.storage.nativeHelpers.get(r))n+=e.storage.nativeHelpers.get(r)(s,e);else{let t=(c?"await ":"")+"c.l('H','"+r+"')("+T(e,h,s.d,a,c);t+=l?","+E(l,e):",[]",t+=",c)",n+="tR+="+P(t,o)+";"}else"s"===t?n+="tR+="+P((c?"await ":"")+"c.l('H','"+r+"')({params:["+a+"]},[],c)",o)+";":"e"===t&&(n+=i+"\n")}}return n}class D{cache;constructor(t){this.cache=t}define(t,e){this.cache[t]=e}get(t){return this.cache[t]}remove(t){delete this.cache[t]}reset(){this.cache={}}load(t){C(this.cache,t,!0)}}function H(t,e,i,s){if(e&&e.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept blocks");if(i&&i.length>0)throw b((s?"Native":"")+"Helper '"+t+"' doesn't accept filters")}function N(t,e,i,s,n){i(t[e],e).then((function(o){s+=o,e===t.length-1?n(s):N(t,e+1,i,s,n)}))}function $(t,e,i,s,n,o){s(e[i],t[e[i]]).then((function(r){n+=r,i===e.length-1?o(n):$(t,e,i+1,s,n,o)}))}const L={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function M(t){return L[t]}const U=new D({}),B=new D({each:function(t,e){let i="";const s=t.params[0];if(H("each",e,!1),t.async)return new Promise((function(e){N(s,0,t.exec,i,e)}));for(let e=0;e<s.length;e++)i+=t.exec(s[e],e);return i},foreach:function(t,e){const i=t.params[0];if(H("foreach",e,!1),t.async)return new Promise((function(e){$(i,Object.keys(i),0,t.exec,"",e)}));{let e="";for(const s in i)F(i,s)&&(e+=t.exec(s,i[s]));return e}},include:function(t,e,i){H("include",e,!1);const s=i.storage.templates.get(t.params[0]);if(!s)throw b('Could not fetch template "'+t.params[0]+'"');return s(t.params[1],i)},extends:function(t,e,i){const s=t.params[1]||{};s.content=t.exec();for(let t=0;t<e.length;t++){const i=e[t];s[i.name]=i.exec()}const n=i.storage.templates.get(t.params[0]);if(!n)throw b('Could not fetch template "'+t.params[0]+'"');return n(s,i)},useScope:function(t,e){return H("useScope",e,!1),t.exec(t.params[0])}}),Q=new D({if:function(t,e){H("if",!1,t.f,!0);let i="if("+t.p+"){"+q(t.d,e)+"}";if(t.b)for(let s=0;s<t.b.length;s++){const n=t.b[s];"else"===n.n?i+="else{"+q(n.d,e)+"}":"elif"===n.n&&(i+="else if("+n.p+"){"+q(n.d,e)+"}")}return i},try:function(t,e){if(H("try",!1,t.f,!0),!t.b||1!==t.b.length||"catch"!==t.b[0].n)throw b("native helper 'try' only accepts 1 block, 'catch'");let i="try{"+q(t.d,e)+"}";const s=t.b[0];return i+="catch"+(s.res?"("+s.res+")":"")+"{"+q(s.d,e)+"}",i},block:function(t,e){return H("block",t.b,t.f,!0),"if(!"+e.varName+"["+t.p+"]){tR+=("+O(t.d,"",e)+")()}else{tR+="+e.varName+"["+t.p+"]}"}}),W=new D({e:function(t){const e=String(t);return/[&<>"']/.test(e)?e.replace(/[&<>"']/g,M):e}}),K={varName:"it",autoTrim:[!1,"nl"],autoEscape:!0,defaultFilter:!1,tags:["{{","}}"],l:function(t,e){if("H"===t){const t=this.storage.helpers.get(e);if(t)return t;throw b("Can't find helper '"+e+"'")}if("F"===t){const t=this.storage.filters.get(e);if(t)return t;throw b("Can't find filter '"+e+"'")}},async:!1,storage:{helpers:B,nativeHelpers:Q,filters:W,templates:U},prefixes:{h:"@",b:"#",i:"",r:"*",c:"/",e:"!"},cache:!1,plugins:[],useWith:!1};function X(t,e){const i={};return C(i,K),e&&C(i,e),t&&C(i,t),i.l.bind(i),i}function G(t,e){const i=X(e||{});let s=Function;if(i.async){if(!x)throw b("This environment doesn't support async/await");s=x}try{return new s(i.varName,"c","cb",z(t,i))}catch(e){throw e instanceof SyntaxError?b("Bad template syntax\n\n"+e.message+"\n"+Array(e.message.length+1).join("=")+"\n"+z(t,i)):e}}function V(t,e){let i;return e.cache&&e.name&&e.storage.templates.get(e.name)?e.storage.templates.get(e.name):(i="function"==typeof t?t:G(t,e),e.cache&&e.name&&e.storage.templates.define(e.name,i),i)}K.l.bind(K);var Z=Object.freeze({__proto__:null,compile:G,compileScope:q,compileScopeIntoFunction:O,compileToString:z,defaultConfig:K,filters:W,getConfig:X,helpers:B,nativeHelpers:Q,parse:A,render:function(t,e,i,s){const n=X(i||{});if(!n.async)return V(t,n)(e,n);{let i;if(!s){if("function"==typeof v)return new v((function(s,o){try{i=V(t,n)(e,n),s(i)}catch(t){o(t)}}));throw b("Please provide a callback function, this env doesn't support Promises")}try{V(t,n)(e,n,s)}catch(t){return s(t)}}},templates:U});W.define("date_long",((t,e={year:"numeric",month:"long",day:"numeric"})=>{if(t)return new Date(1e3*parseInt(t)).toLocaleDateString("en-GB",e)})),W.define("date_short",((t,e="d/m/y")=>{if(!t)return;const i=new Date(1e3*parseInt(t));return(t=(t=e.replace(/(d)/,i.getDate().toString())).replace(/(m)/,(i.getMonth()+1).toString())).replace(/(y)/,i.getFullYear().toString())})),W.define("public_name",(t=>{if(t)return(t=t.split("_").map((t=>t.length<3?t.toUpperCase():t)).join(" ")).charAt(0).toUpperCase()+t.slice(1)})),W.define("trim_to",((t,e=100)=>{if(t)return t.length<=e?t:t.substr(0,e)+"..."})),W.define("classname",(t=>{if(t)return t.replace(/[\W]+/g,"")})),W.define("abs_url",((t,e=null,i)=>{if(!e)return t;if(!t)return;let s;if(e.domains&&i&&i.origin){const t=e.domains.find((t=>t.origin===i.origin));s=t?t.domain:""}else e.domain&&(s=e.domain);return t.match(/^http/)||!s?t:(t.startsWith("/")||(t="/"+t),location.protocol+"//"+s+t)})),W.define("replace",((t,e,i)=>t.replace(e,i))),W.define("remove_spaces",(t=>t.replace(/ /g,"_"))),W.define("add_spaces",(t=>t.replace(/[_\-]/g," "))),W.define("capitalise",(t=>t.charAt(0).toUpperCase()+t.slice(1))),W.define("lowercase",(t=>t.toLowerCase()));const J=Z,Y=class{constructor(t){i(this,t),this.nanoDidLoad=s(this,"nanoDidLoad",7),this.nanoResultsShown=s(this,"nanoResultsShown",3),this.nanoBeforeQuery=s(this,"nanoBeforeQuery",7),this.nanoAfterQuery=s(this,"nanoAfterQuery",7),this.nanoNewResults=s(this,"nanoNewResults",7)}staticFacetFilters={};dynFacetFilters={};tplSlot;outputSlot;slottedInput;hasLoadSlot=!1;resultsDiv;defaultDiv;tpl;facets;placedAlgoliaEles=[];algoliaClient;promiseQueue=new y;get host(){return e(this)}_dynFacetFilters={};inputField;algoliaIndex;indeces=[];indexResults;filterChanged="";currentHits;changeEvent=d.Init;isLoading=!1;wormholeState=this;showResults=!1;resultsPage=0;appId;apiKey;searchIndex={};searchIndexName="";listenTo=null;handleListenToChange(){if(!this.listenTo)return;const t=document.querySelector(this.listenTo);["nano-input","input"].includes(t.tagName.toLocaleLowerCase())&&(this.inputField=t)}query="";operator="and";filters=[];tplRenderFn=J.render;replicaIndex="";browseIndex=!1;minChars=2;storeId;storeMethod="session";nanoDidLoad;nanoResultsShown;nanoBeforeQuery;nanoAfterQuery;nanoNewResults;async removeFilters(t,e){t||e?Object.keys(this._dynFacetFilters).forEach((i=>{t&&this._dynFacetFilters[i].facetName===t&&(this._dynFacetFilters[i].element.value=e?this._dynFacetFilters[i].value.filter((t=>t!==e)):"")})):this.clearAllFacetFilters()}onAllTplUpdate(t){t.stopPropagation(),t.target.tagName.toLowerCase()===u("nano-algolia-results")&&requestAnimationFrame((()=>{this.nanoNewResults.emit(this.indexResults)}))}async onPageChange(t){if(!this.indexResults)return;let e=this.resultsPage;t&&(t.stopPropagation(),e=t.detail.page),e=Math.min(this.indexResults.totalPages-1,e),e=Math.max(e,0),this.indexResults.currentPage!==e&&(this.indexResults.currentPage=e,await this.algoliaSearch(d.Page))}async onFilterChange(t){t.stopPropagation();const e={},i=t.detail;i.element=t.target,this.indexResults?(this.staticFacetFilters[i.filterId]?this.staticFacetFilters[i.filterId]=i:(e[i.filterId]=i,this._dynFacetFilters={...this._dynFacetFilters,...e}),this.indexResults.appliedFilters=this.makeAppliedFilters()):this.staticFacetFilters[i.filterId]=i,this.filterChanged=i.value&&i.value.length?i.filterId:"all",this.resetPage(),this.algoliaSearch(d.Filter)}dynFacetFiltersChange(){Object.values(this._dynFacetFilters).forEach((t=>{this.host.ownerDocument===t.element.ownerDocument?this.dynFacetFilters[t.filterId]=t:delete this.dynFacetFilters[t.filterId]}))}browseIndexChange(){this.browseIndex&&(!this.query||this.query.length<this.minChars)&&(this.query="*")}inputFieldSet(){this.inputField&&"*"!==this.query&&this.inputField&&this.inputField.value!==this.query&&(this.inputField.value=this.query)}queryChange(){this.searchChange()}searchChange=async()=>{if(this.algoliaIndex){if(!this.query||this.query.length<this.minChars){if(!this.browseIndex)return this.query&&0!==this.query.length?void 0:void this.handleSearchReset();if("*"!==this.query)return void(this.query="*")}this.isLoading=!0,setTimeout((async()=>{this.resetPage(),await this.algoliaSearch(d.Init),await this.updateContent(),setTimeout((()=>this.isLoading=!1),800),this.showResults=!0,this.nanoResultsShown.emit({meta:this.indexResults,client:{appId:this.appId,apiKey:this.apiKey}})}),200)}};async internalIndexSwitch(){this.replicaIndex&&this.indexResults&&this.indexResults.index!==this.replicaIndex&&(this.indexResults.index=this.replicaIndex,this.algoliaIndex=this.algoliaClient.initIndex(this.indexResults.index),this.resetPage(),this.algoliaSearch(d.Replica))}pageChange(){this.onPageChange()}searchIndexNameChange(){!this.searchIndexName||!this.searchIndexName.length||this.searchIndex&&this.searchIndex.index===this.searchIndexName||(this.searchIndex={index:this.searchIndexName})}initAlgoliaClient(){this.appId&&this.apiKey&&(this.algoliaClient=a(this.appId,this.apiKey))}initAlgoliaIndex(){this.algoliaClient&&this.searchIndex&&this.searchIndex.index&&(this.searchIndex.hitsPerPage||(this.searchIndex.hitsPerPage=100),this.replicaIndex&&(this.searchIndex.index=this.replicaIndex),this.searchIndexName=this.searchIndex.index,this.algoliaIndex=this.algoliaClient.initIndex(this.searchIndex.index),this.searchChange())}showResultsChange(){this.resultsDiv&&this.defaultDiv&&(this.showResults?(this.resultsDiv.style.width=this.host.scrollWidth+"px",this.resultsDiv.style.minHeight=this.host.scrollHeight+"px",n((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.style.display="block",setTimeout((()=>this.resultsDiv.classList.add("show")),50)}))):n((()=>{this.resultsDiv.classList.remove("shown"),this.defaultDiv.style.display="block",setTimeout((()=>{this.resultsDiv.addEventListener("transitionend",this.onResultDisplay),this.resultsDiv.classList.remove("show"),this.slottedInput?this.slottedInput.focus({preventScroll:!0}):this.defaultDiv.focus({preventScroll:!0})}),50)})))}handleFilterpropChange(){this.algoliaSearch(d.Init)}fixDomain(t){return this.searchIndex&&this.searchIndex.domain?(t.hits.map((t=>{t.url&&!t.url.match(/^http/)&&(t.url=location.protocol+"//"+this.searchIndex.domain+t.url)})),t):t}makeAppliedFilters=()=>{const t=[],e=e=>{Object.values(e).forEach((e=>{if(e.value&&e.value.length){const i=t.find((t=>t.name===e.facetName));i?i.values=[...i.values,...e.value]:t.push({name:e.facetName,values:[...e.value]})}}))};return e(this.dynFacetFilters),e(this.staticFacetFilters),t.length?t:null};algoliaSearch=async t=>this.promiseQueue.enqueue((()=>this.queueSearch(t)));queueSearch=async t=>{if(!(this.algoliaIndex&&this.query&&this.searchIndex&&this.searchIndex.index))return;this.nanoBeforeQuery.emit(this.indexResults),d.Init===t&&this.clearAllFacetFilters();const e={filters:this.algoliaFilterStr(),page:this.indexResults?this.indexResults.currentPage:0,clickAnalytics:!0};this.searchIndex.filters&&(e.facets=this.searchIndex.filters),this.searchIndex.hitsPerPage&&(e.hitsPerPage=this.searchIndex.hitsPerPage);let i=await this.algoliaIndex.search(this.query,e);return i=this.fixDomain(i),this.changeEvent=t,t!==d.Init&&this.indexResults||(this.indexResults={queryID:i.queryID,currentPage:0,totalHits:i.nbHits,hitsPerPage:null,origFilters:i.facets,query:this.query,domain:this.searchIndex.domain||null,totalHitsWithFilters:0,results:[],totalPages:0,appliedFilters:this.makeAppliedFilters(),indexName:this.searchIndex.name||null,index:this.searchIndex.index,searchIndex:this.searchIndex}),this.indexResults.dynFilters=i.facets,this.indexResults.results=i.hits,this.indexResults.totalHitsWithFilters=i.nbHits,this.indexResults.currentPage=i.page,this.indexResults.totalPages=i.nbPages,this.indexResults.hitsPerPage=i.hitsPerPage,this.indexResults.query=i.query,this.changeEvent!==d.Page&&this.changeEvent!==d.Replica&&(this.facets=i.facets),this.nanoAfterQuery.emit(this.indexResults),new Promise((t=>{setTimeout((()=>t("tpl updated")),20)})).then((()=>{this.currentHits=this.indexResults.results,this.resultsPage=this.indexResults.currentPage}))};resetPage(){this.indexResults&&(this.indexResults.currentPage=0)}clearAllFacetFilters(){Object.values(this._dynFacetFilters).forEach((t=>{t.element.value=""})),this._dynFacetFilters={}}algoliaFilterStr(){const t={},e=e=>{let i,s;Object.keys(e).forEach((n=>{i=e[n],t[n]=t[n]||{name:i.facetName,or:[],and:[],not:[]},s=t[n][i.operator],i.value&&i.value.length&&(t[n][i.operator]=[...s,...i.value])}))};e(this.dynFacetFilters),e(this.staticFacetFilters);const i=(t,e)=>e.indexOf(" ")>-1?t+':"'+e+'"':t+":"+e;let s,n,o=[];return Object.values(t).forEach((function(t){Object.keys(t).filter((t=>t.match(/(or|and|not)/))).forEach((e=>{s=t,n=t.name,"or"===e||"and"===e?s[e].length&&o.push("( "+s[e].map((t=>{if(t.length)return i(n,t)})).join(" "+e.toLocaleUpperCase()+" ")+" )"):s.not.length&&o.push("( "+s[e].map((t=>{if(t.length)return"NOT "+i(n,t)})).join(" AND ")+" )")}))})),o=[...this.filters,...o],o.join(" "+this.operator.toLocaleUpperCase()+" ")}handleInputChange(t){t.target===this.inputField&&(this.query=this.inputField.value)}handleSearchReset=()=>{this.showResults=!1,this.indexResults=null};onResultDisplay=()=>{n((()=>{this.resultsDiv.removeEventListener("transitionend",this.onResultDisplay),this.showResults?(this.defaultDiv.style.display="none",this.resultsDiv.classList.add("shown"),this.resultsDiv.style.minHeight="",this.resultsDiv.style.width=""):this.resultsDiv.style.display="none"}))};async updateContent(){return this.promiseQueue.enqueue((()=>this.updateContentQueue()))}async updateContentQueue(){const t=this.outputSlot||this.resultsDiv;if(!t||!this.tpl)return"no tpl";const e=document.createElement("div");e.innerHTML=this.tpl;const i=[];return this.placedAlgoliaEles=[],Array.from(e.querySelectorAll(`${u("nano-algolia")}, ${u("nano-algolia-filter")}, ${u("nano-algolia-results")}`)).forEach(((t,e)=>{const s=document.createElement("div");s.dataset.placeholderId=e.toString(),s.classList.add("nano-ele-placeholder"),i.push(t),t.parentNode.replaceChild(s,t)})),t.innerHTML=this.tplRenderFn(e.innerHTML.replace(/&gt;/gm,">").replace(/&lt;/gm,"<").replace(/&amp;/gm,"&"),this.indexResults),Array.from(t.querySelectorAll("div.nano-ele-placeholder")).forEach((t=>{t.parentNode.replaceChild(i[parseInt(t.dataset.placeholderId)],t),this.placedAlgoliaEles.push(i[parseInt(t.dataset.placeholderId)])})),this.placedAlgoliaEles.length?new Promise((e=>{const i=s=>{this.placedAlgoliaEles=this.placedAlgoliaEles.filter((t=>t!==s.detail)),this.placedAlgoliaEles.length||(setTimeout((()=>e("tpl updated")),500),t.removeEventListener("nanoTplUpdated",i))};t.addEventListener("nanoTplUpdated",i)})):Promise.resolve("algolia setup")}componentWillLoad(){o((()=>{this.tplSlot=h(this.host,'[slot="template"]')[0],this.outputSlot=h(this.host,'[slot="output"]')[0],this.slottedInput=h(this.host,'[slot="search-input"]')[0],this.hasLoadSlot=!!h(this.host,'[slot="loader"]')[0],this.tplSlot&&(this.tpl=this.tplSlot.innerHTML||this.tplSlot.innerText),this.slottedInput&&(this.slottedInput.tagName.toLocaleLowerCase()===u("nano-input")||this.slottedInput instanceof HTMLInputElement)?this.inputField=this.slottedInput:this.slottedInput?this.inputField=this.slottedInput.querySelector(`${u("nano-input")}, input:not([type="radio"]):not([type="checkbox"])`):this.handleListenToChange(),n((()=>{this.showResults&&this.tpl&&this.searchChange()}))})),this.searchIndexNameChange(),this.initAlgoliaClient(),this.initAlgoliaIndex(),function(t,i){var s=e(t),n=new Map,o={wormholes:n,state:i};p.set(t,o);var r=t.connectedCallback;t.connectedCallback=function(){p.set(t,o),r&&r.call(t)};var a=t.disconnectedCallback;t.disconnectedCallback=function(){p.delete(t),a&&a.call(t)},s.addEventListener("openWormhole",(function(t){t.stopPropagation();var e=t.detail,i=e.consumer,s=e.onOpen;if(!n.has(i)){if("symbol"!=typeof i){var r=i.connectedCallback,a=i.disconnectedCallback;i.connectedCallback=function(){n.set(i,t.detail),r&&r.call(i)},i.disconnectedCallback=function(){n.delete(i),a&&a.call(i)}}n.set(i,t.detail),m(t.detail,o.state),null==s||s.resolve((function(){n.delete(i)}))}})),s.addEventListener("closeWormhole",(function(t){n.delete(t.detail)}))}(this,this.wormholeState),this.storeId&&(l.init(this,["query","replicaIndex"],this.storeMethod,this.storeId),l.init(this,["apiKey","appId","searchIndex"],"session",this.storeId+"_api")),this.internalIndexSwitch()}connectedCallback(){this.searchChange=c(this.searchChange,300),this.browseIndexChange(),this.host.dispatchEvent(new CustomEvent("nanoDidLoad",{detail:this.host}))}render(){const t={indexResults:this.indexResults,results:this.currentHits,filterChanged:this.filterChanged,tplRenderFn:this.tplRenderFn,resultsPage:this.resultsPage,changeEvent:this.changeEvent,facets:this.facets,algoliaIndex:this.algoliaIndex,searchIndex:this.searchIndex,globalStoreMethod:this.storeMethod,isLoading:this.isLoading};return f(r,{key:"e5a080bf3b11c991465f1b44521b75539f80d5ec",class:{"show-results":this.showResults,"is-loading":this.isLoading,"nano-algolia":!0},"aria-busy":this.isLoading},this.hasLoadSlot&&f("div",{key:"586696526af9ba7b721ebfe8aeba2b5a45b8a19a",hidden:!this.isLoading},f("slot",{key:"40556633911954fd20b756fedf71aea7e15b15e1",name:"loader"})),!this.hasLoadSlot&&f("div",{key:"e5ee4968b6864b656b3537ec46b69e64ebe76370",class:{loader:!0,loading:this.isLoading}},f("nano-spinner",{key:"63bbc6292b6a7183fe21a2527ffbd3002548871b",overlay:!0,type:"circle"})),f(g,{key:"64e8d5149940ad9c3353709db00677805f0d9946",state:t},f("slot",{key:"700649f3a918fce90e0e4c533c849942b9c0ad5c",name:"search-input"}),f("div",{key:"5e5c54c6365ea0725a5b995115c196eb5b1026ca",class:"results-container","aria-live":"polite"},f("div",{key:"0a9559ae98ab627e5529dca1026ac1312127d824",ref:t=>this.resultsDiv=t,class:"results"},f("slot",{key:"cf30d2970741dfb1631fca008317e4420d228a98",name:"output"})))),f("div",{key:"4d9cf66b3c2c3d0e10e1a443002db80d686530f7",ref:t=>this.defaultDiv=t,class:"default",tabindex:"-1"},f("slot",{key:"fc365faa7953cdf3a0aa2887716e2f0f3af464fa"})))}static get watchers(){return{listenTo:["handleListenToChange"],_dynFacetFilters:["dynFacetFiltersChange"],browseIndex:["browseIndexChange"],inputField:["inputFieldSet"],query:["queryChange"],replicaIndex:["internalIndexSwitch"],resultsPage:["pageChange"],searchIndexName:["searchIndexNameChange"],apiKey:["initAlgoliaClient"],appId:["initAlgoliaClient"],searchIndex:["initAlgoliaIndex"],showResults:["showResultsChange"],filters:["handleFilterpropChange"]}}};Y.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{position:relative;display:block}:host ::slotted([slot=search-template]){display:none !important}.loader{opacity:0;position:fixed;block-size:100%;inline-size:100%;min-block-size:100%;max-block-size:100vh !important;max-inline-size:100vw !important;inset-inline-start:0;inset-block-start:0;z-index:-10;font-size:60px;display:flex;align-items:center;justify-content:center;transition:opacity 0.2s ease, z-index 0.01s ease 0.2s}.loader.loading{opacity:1;z-index:10;transition:z-index 0.01s ease, opacity 0.2s ease 0.01s}.default{block-size:100%}.default:focus{outline:none}.results{opacity:0;outline:none;overflow:auto;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.01s ease 0.3s, z-index 0.01s ease 0.3s;transform:translate(0, 100px);visibility:hidden;z-index:-1;position:absolute;inset-block-start:0;inset-inline-start:0;display:none}.results-container{position:relative}.results.show{transition:z-index 0.01s ease, visibility 0.01s ease, transform 0.3s ease 0.01s, opacity 0.3s ease 0.01s, overflow 0.01s ease 0.31s;transform:translate(0, 0);visibility:visible;opacity:1;z-index:10;overflow:hidden}.results.shown{block-size:auto !important;inline-size:auto !important;display:block;position:static;transform:none;z-index:auto;visibility:inherit;opacity:initial;overflow:visible}";export{Y as nano_algolia}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * Custom elements for Nanopore-Digital Web applications
3
3
  */
4
- import{r as t,c as e,B as a,d as s}from"./index-DOuz1S3w.js";import{h as f}from"./renderer-CnE0Hztu.js";const o={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.77, 0, 0.175, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.86, 0, 0.07, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(1, 0, 0, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},r={bounce:[{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.2,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.4,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -30px, 0) scaleY(1.1)"},{offset:.43,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -30px, 0) scaleY(1.1)"},{offset:.53,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.7,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -15px, 0) scaleY(1.05)"},{offset:.8,"transition-timing-function":"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0) scaleY(0.95)"},{offset:.9,transform:"translate3d(0, -4px, 0) scaleY(1.02)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"}],flash:[{offset:0,opacity:"1"},{offset:.25,opacity:"0"},{offset:.5,opacity:"1"},{offset:.75,opacity:"0"},{offset:1,opacity:"1"}],headShake:[{offset:0,transform:"translateX(0)"},{offset:.065,transform:"translateX(-6px) rotateY(-9deg)"},{offset:.185,transform:"translateX(5px) rotateY(7deg)"},{offset:.315,transform:"translateX(-3px) rotateY(-5deg)"},{offset:.435,transform:"translateX(2px) rotateY(3deg)"},{offset:.5,transform:"translateX(0)"}],heartBeat:[{offset:0,transform:"scale(1)"},{offset:.14,transform:"scale(1.3)"},{offset:.28,transform:"scale(1)"},{offset:.42,transform:"scale(1.3)"},{offset:.7,transform:"scale(1)"}],jello:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.111,transform:"translate3d(0, 0, 0)"},{offset:.222,transform:"skewX(-12.5deg) skewY(-12.5deg)"},{offset:.33299999999999996,transform:"skewX(6.25deg) skewY(6.25deg)"},{offset:.444,transform:"skewX(-3.125deg) skewY(-3.125deg)"},{offset:.555,transform:"skewX(1.5625deg) skewY(1.5625deg)"},{offset:.6659999999999999,transform:"skewX(-0.78125deg) skewY(-0.78125deg)"},{offset:.777,transform:"skewX(0.390625deg) skewY(0.390625deg)"},{offset:.888,transform:"skewX(-0.1953125deg) skewY(-0.1953125deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],pulse:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.5,transform:"scale3d(1.05, 1.05, 1.05)"},{offset:1,transform:"scale3d(1, 1, 1)"}],rubberBand:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.3,transform:"scale3d(1.25, 0.75, 1)"},{offset:.4,transform:"scale3d(0.75, 1.25, 1)"},{offset:.5,transform:"scale3d(1.15, 0.85, 1)"},{offset:.65,transform:"scale3d(0.95, 1.05, 1)"},{offset:.75,transform:"scale3d(1.05, 0.95, 1)"},{offset:1,transform:"scale3d(1, 1, 1)"}],shake:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(-10px, 0, 0)"},{offset:.2,transform:"translate3d(10px, 0, 0)"},{offset:.3,transform:"translate3d(-10px, 0, 0)"},{offset:.4,transform:"translate3d(10px, 0, 0)"},{offset:.5,transform:"translate3d(-10px, 0, 0)"},{offset:.6,transform:"translate3d(10px, 0, 0)"},{offset:.7,transform:"translate3d(-10px, 0, 0)"},{offset:.8,transform:"translate3d(10px, 0, 0)"},{offset:.9,transform:"translate3d(-10px, 0, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],shakeX:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(-10px, 0, 0)"},{offset:.2,transform:"translate3d(10px, 0, 0)"},{offset:.3,transform:"translate3d(-10px, 0, 0)"},{offset:.4,transform:"translate3d(10px, 0, 0)"},{offset:.5,transform:"translate3d(-10px, 0, 0)"},{offset:.6,transform:"translate3d(10px, 0, 0)"},{offset:.7,transform:"translate3d(-10px, 0, 0)"},{offset:.8,transform:"translate3d(10px, 0, 0)"},{offset:.9,transform:"translate3d(-10px, 0, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],shakeY:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(0, -10px, 0)"},{offset:.2,transform:"translate3d(0, 10px, 0)"},{offset:.3,transform:"translate3d(0, -10px, 0)"},{offset:.4,transform:"translate3d(0, 10px, 0)"},{offset:.5,transform:"translate3d(0, -10px, 0)"},{offset:.6,transform:"translate3d(0, 10px, 0)"},{offset:.7,transform:"translate3d(0, -10px, 0)"},{offset:.8,transform:"translate3d(0, 10px, 0)"},{offset:.9,transform:"translate3d(0, -10px, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],swing:[{offset:.2,transform:"rotate3d(0, 0, 1, 15deg)"},{offset:.4,transform:"rotate3d(0, 0, 1, -10deg)"},{offset:.6,transform:"rotate3d(0, 0, 1, 5deg)"},{offset:.8,transform:"rotate3d(0, 0, 1, -5deg)"},{offset:1,transform:"rotate3d(0, 0, 1, 0deg)"}],tada:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.1,transform:"scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)"},{offset:.2,transform:"scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)"},{offset:.3,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.4,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.5,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.6,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.7,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.8,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.9,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:1,transform:"scale3d(1, 1, 1)"}],wobble:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.15,transform:"translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg)"},{offset:.3,transform:"translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)"},{offset:.45,transform:"translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)"},{offset:.6,transform:"translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)"},{offset:.75,transform:"translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],backInDown:[{offset:0,transform:"translateY(-1200px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInLeft:[{offset:0,transform:"translateX(-2000px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInRight:[{offset:0,transform:"translateX(2000px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInUp:[{offset:0,transform:"translateY(1200px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backOutDown:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateY(700px) scale(0.7)",opacity:"0.7"}],backOutLeft:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateX(-2000px) scale(0.7)",opacity:"0.7"}],backOutRight:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateX(2000px) scale(0.7)",opacity:"0.7"}],backOutUp:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateY(-700px) scale(0.7)",opacity:"0.7"}],bounceIn:[{offset:0,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.2,transform:"scale3d(1.1, 1.1, 1.1)"},{offset:.2,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.4,transform:"scale3d(0.9, 0.9, 0.9)"},{offset:.4,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"scale3d(1.03, 1.03, 1.03)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.8,transform:"scale3d(0.97, 0.97, 0.97)"},{offset:.8,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,opacity:"1",transform:"scale3d(1, 1, 1)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInDown:[{offset:0,opacity:"0",transform:"translate3d(0, -3000px, 0) scaleY(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(0, 25px, 0) scaleY(0.9)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(0, -10px, 0) scaleY(0.95)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(0, 5px, 0) scaleY(0.985)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInLeft:[{offset:0,opacity:"0",transform:"translate3d(-3000px, 0, 0) scaleX(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(25px, 0, 0) scaleX(1)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(-10px, 0, 0) scaleX(0.98)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(5px, 0, 0) scaleX(0.995)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInRight:[{offset:0,opacity:"0",transform:"translate3d(3000px, 0, 0) scaleX(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(-25px, 0, 0) scaleX(1)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(10px, 0, 0) scaleX(0.98)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(-5px, 0, 0) scaleX(0.995)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInUp:[{offset:0,opacity:"0",transform:"translate3d(0, 3000px, 0) scaleY(5)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(0, 10px, 0) scaleY(0.95)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(0, -5px, 0) scaleY(0.985)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceOut:[{offset:.2,transform:"scale3d(0.9, 0.9, 0.9)"},{offset:.5,opacity:"1",transform:"scale3d(1.1, 1.1, 1.1)"},{offset:.55,opacity:"1",transform:"scale3d(1.1, 1.1, 1.1)"},{offset:1,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"}],bounceOutDown:[{offset:.2,transform:"translate3d(0, 10px, 0) scaleY(0.985)"},{offset:.4,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:.45,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:1,opacity:"0",transform:"translate3d(0, 2000px, 0) scaleY(3)"}],bounceOutLeft:[{offset:.2,opacity:"1",transform:"translate3d(20px, 0, 0) scaleX(0.9)"},{offset:1,opacity:"0",transform:"translate3d(-2000px, 0, 0) scaleX(2)"}],bounceOutRight:[{offset:.2,opacity:"1",transform:"translate3d(-20px, 0, 0) scaleX(0.9)"},{offset:1,opacity:"0",transform:"translate3d(2000px, 0, 0) scaleX(2)"}],bounceOutUp:[{offset:.2,transform:"translate3d(0, -10px, 0) scaleY(0.985)"},{offset:.4,opacity:"1",transform:"translate3d(0, 20px, 0) scaleY(0.9)"},{offset:.45,opacity:"1",transform:"translate3d(0, 20px, 0) scaleY(0.9)"},{offset:1,opacity:"0",transform:"translate3d(0, -2000px, 0) scaleY(3)"}],fadeIn:[{offset:0,opacity:"0"},{offset:1,opacity:"1"}],fadeInBottomLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInBottomRight:[{offset:0,opacity:"0",transform:"translate3d(100%, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInDown:[{offset:0,opacity:"0",transform:"translate3d(0, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInDownBig:[{offset:0,opacity:"0",transform:"translate3d(0, -2000px, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInLeftBig:[{offset:0,opacity:"0",transform:"translate3d(-2000px, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInRight:[{offset:0,opacity:"0",transform:"translate3d(100%, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInRightBig:[{offset:0,opacity:"0",transform:"translate3d(2000px, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInTopLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInTopRight:[{offset:0,opacity:"0",transform:"translate3d(100%, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInUp:[{offset:0,opacity:"0",transform:"translate3d(0, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInUpBig:[{offset:0,opacity:"0",transform:"translate3d(0, 2000px, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeOut:[{offset:0,opacity:"1"},{offset:1,opacity:"0"}],fadeOutBottomLeft:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(-100%, 100%, 0)"}],fadeOutBottomRight:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(100%, 100%, 0)"}],fadeOutDown:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, 100%, 0)"}],fadeOutDownBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, 2000px, 0)"}],fadeOutLeft:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(-100%, 0, 0)"}],fadeOutLeftBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(-2000px, 0, 0)"}],fadeOutRight:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(100%, 0, 0)"}],fadeOutRightBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(2000px, 0, 0)"}],fadeOutTopLeft:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(-100%, -100%, 0)"}],fadeOutTopRight:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(100%, -100%, 0)"}],fadeOutUp:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, -100%, 0)"}],fadeOutUpBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, -2000px, 0)"}],flip:[{offset:0,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg)",easing:"ease-out"},{offset:.4,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg)",easing:"ease-out"},{offset:.5,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg)",easing:"ease-in"},{offset:.8,transform:"perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg)",easing:"ease-in"},{offset:1,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg)",easing:"ease-in"}],flipInX:[{offset:0,transform:"perspective(400px) rotate3d(1, 0, 0, 90deg)",easing:"ease-in",opacity:"0"},{offset:.4,transform:"perspective(400px) rotate3d(1, 0, 0, -20deg)",easing:"ease-in"},{offset:.6,transform:"perspective(400px) rotate3d(1, 0, 0, 10deg)",opacity:"1"},{offset:.8,transform:"perspective(400px) rotate3d(1, 0, 0, -5deg)"},{offset:1,transform:"perspective(400px)"}],flipInY:[{offset:0,transform:"perspective(400px) rotate3d(0, 1, 0, 90deg)",easing:"ease-in",opacity:"0"},{offset:.4,transform:"perspective(400px) rotate3d(0, 1, 0, -20deg)",easing:"ease-in"},{offset:.6,transform:"perspective(400px) rotate3d(0, 1, 0, 10deg)",opacity:"1"},{offset:.8,transform:"perspective(400px) rotate3d(0, 1, 0, -5deg)"},{offset:1,transform:"perspective(400px)"}],flipOutX:[{offset:0,transform:"perspective(400px)"},{offset:.3,transform:"perspective(400px) rotate3d(1, 0, 0, -20deg)",opacity:"1"},{offset:1,transform:"perspective(400px) rotate3d(1, 0, 0, 90deg)",opacity:"0"}],flipOutY:[{offset:0,transform:"perspective(400px)"},{offset:.3,transform:"perspective(400px) rotate3d(0, 1, 0, -15deg)",opacity:"1"},{offset:1,transform:"perspective(400px) rotate3d(0, 1, 0, 90deg)",opacity:"0"}],lightSpeedInLeft:[{offset:0,transform:"translate3d(-100%, 0, 0) skewX(30deg)",opacity:"0"},{offset:.6,transform:"skewX(-20deg)",opacity:"1"},{offset:.8,transform:"skewX(5deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedInRight:[{offset:0,transform:"translate3d(100%, 0, 0) skewX(-30deg)",opacity:"0"},{offset:.6,transform:"skewX(20deg)",opacity:"1"},{offset:.8,transform:"skewX(-5deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedOutLeft:[{offset:0,opacity:"1"},{offset:1,transform:"translate3d(-100%, 0, 0) skewX(-30deg)",opacity:"0"}],lightSpeedOutRight:[{offset:0,opacity:"1"},{offset:1,transform:"translate3d(100%, 0, 0) skewX(30deg)",opacity:"0"}],rotateIn:[{offset:0,transform:"rotate3d(0, 0, 1, -200deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInDownLeft:[{offset:0,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInDownRight:[{offset:0,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInUpLeft:[{offset:0,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInUpRight:[{offset:0,transform:"rotate3d(0, 0, 1, -90deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateOut:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 200deg)",opacity:"0"}],rotateOutDownLeft:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"}],rotateOutDownRight:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"}],rotateOutUpLeft:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"}],rotateOutUpRight:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 90deg)",opacity:"0"}],slideInDown:[{offset:0,transform:"translate3d(0, -100%, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInLeft:[{offset:0,transform:"translate3d(-100%, 0, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInRight:[{offset:0,transform:"translate3d(100%, 0, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInUp:[{offset:0,transform:"translate3d(0, 100%, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideOutDown:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(0, 100%, 0)"}],slideOutLeft:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(-100%, 0, 0)"}],slideOutRight:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(100%, 0, 0)"}],slideOutUp:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(0, -100%, 0)"}],hinge:[{offset:0,easing:"ease-in-out"},{offset:.2,transform:"rotate3d(0, 0, 1, 80deg)",easing:"ease-in-out"},{offset:.4,transform:"rotate3d(0, 0, 1, 60deg)",easing:"ease-in-out",opacity:"1"},{offset:.6,transform:"rotate3d(0, 0, 1, 80deg)",easing:"ease-in-out"},{offset:.8,transform:"rotate3d(0, 0, 1, 60deg)",easing:"ease-in-out",opacity:"1"},{offset:1,transform:"translate3d(0, 700px, 0)",opacity:"0"}],jackInTheBox:[{offset:0,opacity:"0",transform:"scale(0.1) rotate(30deg)","transform-origin":"center bottom"},{offset:.5,transform:"rotate(-10deg)"},{offset:.7,transform:"rotate(3deg)"},{offset:1,opacity:"1",transform:"scale(1)"}],rollIn:[{offset:0,opacity:"0",transform:"translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],rollOut:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg)"}],zoomIn:[{offset:0,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:.5,opacity:"1"}],zoomInDown:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInLeft:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInRight:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInUp:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomOut:[{offset:0,opacity:"1"},{offset:.5,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:1,opacity:"0"}],zoomOutDown:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:1,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomOutLeft:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0)"},{offset:1,opacity:"0",transform:"scale(0.1) translate3d(-2000px, 0, 0)"}],zoomOutRight:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0)"},{offset:1,opacity:"0",transform:"scale(0.1) translate3d(2000px, 0, 0)"}],zoomOutUp:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:1,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}]},n=class{constructor(a){t(this,a),this.nanoCancel=e(this,"nanoCancel",7),this.nanoFinish=e(this,"nanoFinish",7),this.nanoStart=e(this,"nanoStart",7)}animation;hasStarted=!1;defaultSlot;name="none";play=!1;delay=0;direction="normal";duration=1e3;easing="ease";endDelay=0;fill="auto";iterations=1/0;iterationStart=0;keyframes;playbackRate=1;nanoCancel;nanoFinish;nanoStart;get currentTime(){return this.animation?.currentTime??0}set currentTime(t){this.animation&&(this.animation.currentTime=t)}connectedCallback(){this.createAnimation()}disconnectedCallback(){this.destroyAnimation()}handleAnimationFinish=()=>{this.play=!1,this.hasStarted=!1,this.nanoFinish.emit()};handleAnimationCancel=()=>{this.play=!1,this.hasStarted=!1,this.nanoCancel.emit()};handleSlotChange=()=>{this.destroyAnimation(),this.createAnimation()};async createAnimation(){if(!this.defaultSlot||a.isServer)return;const t=o[this.easing]??this.easing,e=this.keyframes??r[this.name],s=this.defaultSlot.assignedElements()[0];return!(!s||!e||(this.destroyAnimation(),this.animation=s.animate(e,{delay:this.delay,direction:this.direction,duration:this.duration,easing:t,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.nanoStart.emit()):this.animation.pause(),0))}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.createAnimation()}handlePlayChange(){return!!this.animation&&(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.nanoStart.emit()),this.play?this.animation.play():this.animation.pause(),!0)}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}async cancel(){this.animation?.cancel()}async finish(){this.animation?.finish()}render(){return f(s,{key:"c5bd8b75985fd99981340c3cd20c74f99ac8dd3c",class:"nano-animation"},f("slot",{key:"989677365d344809aa575626b3253ab888822171",ref:t=>{this.defaultSlot=t},onSlotchange:this.handleSlotChange}))}static get watchers(){return{defaultSlot:["createAnimation"],name:["handleAnimationChange"],delay:["handleAnimationChange"],direction:["handleAnimationChange"],duration:["handleAnimationChange"],easing:["handleAnimationChange"],endDelay:["handleAnimationChange"],fill:["handleAnimationChange"],iterations:["handleAnimationChange"],iterationStart:["handleAnimationChange"],keyframes:["handleAnimationChange"],play:["handlePlayChange"],playbackRate:["handlePlaybackRateChange"]}}};n.style=":host {\n display: contents;\n }";export{n as nano_animation}
4
+ import{r as t,c as e,B as a,d as s}from"./index-DXvE-U_j.js";import{h as f}from"./renderer-BUaAsDso.js";const o={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInSine:"cubic-bezier(0.47, 0, 0.745, 0.715)",easeOutSine:"cubic-bezier(0.39, 0.575, 0.565, 1)",easeInOutSine:"cubic-bezier(0.445, 0.05, 0.55, 0.95)",easeInQuad:"cubic-bezier(0.55, 0.085, 0.68, 0.53)",easeOutQuad:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",easeInOutQuad:"cubic-bezier(0.455, 0.03, 0.515, 0.955)",easeInCubic:"cubic-bezier(0.55, 0.055, 0.675, 0.19)",easeOutCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",easeInOutCubic:"cubic-bezier(0.645, 0.045, 0.355, 1)",easeInQuart:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",easeOutQuart:"cubic-bezier(0.165, 0.84, 0.44, 1)",easeInOutQuart:"cubic-bezier(0.77, 0, 0.175, 1)",easeInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",easeOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",easeInOutQuint:"cubic-bezier(0.86, 0, 0.07, 1)",easeInExpo:"cubic-bezier(0.95, 0.05, 0.795, 0.035)",easeOutExpo:"cubic-bezier(0.19, 1, 0.22, 1)",easeInOutExpo:"cubic-bezier(1, 0, 0, 1)",easeInCirc:"cubic-bezier(0.6, 0.04, 0.98, 0.335)",easeOutCirc:"cubic-bezier(0.075, 0.82, 0.165, 1)",easeInOutCirc:"cubic-bezier(0.785, 0.135, 0.15, 0.86)",easeInBack:"cubic-bezier(0.6, -0.28, 0.735, 0.045)",easeOutBack:"cubic-bezier(0.175, 0.885, 0.32, 1.275)",easeInOutBack:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},r={bounce:[{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.2,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.4,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -30px, 0) scaleY(1.1)"},{offset:.43,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -30px, 0) scaleY(1.1)"},{offset:.53,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"},{offset:.7,easing:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",transform:"translate3d(0, -15px, 0) scaleY(1.05)"},{offset:.8,"transition-timing-function":"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0) scaleY(0.95)"},{offset:.9,transform:"translate3d(0, -4px, 0) scaleY(1.02)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)",transform:"translate3d(0, 0, 0)"}],flash:[{offset:0,opacity:"1"},{offset:.25,opacity:"0"},{offset:.5,opacity:"1"},{offset:.75,opacity:"0"},{offset:1,opacity:"1"}],headShake:[{offset:0,transform:"translateX(0)"},{offset:.065,transform:"translateX(-6px) rotateY(-9deg)"},{offset:.185,transform:"translateX(5px) rotateY(7deg)"},{offset:.315,transform:"translateX(-3px) rotateY(-5deg)"},{offset:.435,transform:"translateX(2px) rotateY(3deg)"},{offset:.5,transform:"translateX(0)"}],heartBeat:[{offset:0,transform:"scale(1)"},{offset:.14,transform:"scale(1.3)"},{offset:.28,transform:"scale(1)"},{offset:.42,transform:"scale(1.3)"},{offset:.7,transform:"scale(1)"}],jello:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.111,transform:"translate3d(0, 0, 0)"},{offset:.222,transform:"skewX(-12.5deg) skewY(-12.5deg)"},{offset:.33299999999999996,transform:"skewX(6.25deg) skewY(6.25deg)"},{offset:.444,transform:"skewX(-3.125deg) skewY(-3.125deg)"},{offset:.555,transform:"skewX(1.5625deg) skewY(1.5625deg)"},{offset:.6659999999999999,transform:"skewX(-0.78125deg) skewY(-0.78125deg)"},{offset:.777,transform:"skewX(0.390625deg) skewY(0.390625deg)"},{offset:.888,transform:"skewX(-0.1953125deg) skewY(-0.1953125deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],pulse:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.5,transform:"scale3d(1.05, 1.05, 1.05)"},{offset:1,transform:"scale3d(1, 1, 1)"}],rubberBand:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.3,transform:"scale3d(1.25, 0.75, 1)"},{offset:.4,transform:"scale3d(0.75, 1.25, 1)"},{offset:.5,transform:"scale3d(1.15, 0.85, 1)"},{offset:.65,transform:"scale3d(0.95, 1.05, 1)"},{offset:.75,transform:"scale3d(1.05, 0.95, 1)"},{offset:1,transform:"scale3d(1, 1, 1)"}],shake:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(-10px, 0, 0)"},{offset:.2,transform:"translate3d(10px, 0, 0)"},{offset:.3,transform:"translate3d(-10px, 0, 0)"},{offset:.4,transform:"translate3d(10px, 0, 0)"},{offset:.5,transform:"translate3d(-10px, 0, 0)"},{offset:.6,transform:"translate3d(10px, 0, 0)"},{offset:.7,transform:"translate3d(-10px, 0, 0)"},{offset:.8,transform:"translate3d(10px, 0, 0)"},{offset:.9,transform:"translate3d(-10px, 0, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],shakeX:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(-10px, 0, 0)"},{offset:.2,transform:"translate3d(10px, 0, 0)"},{offset:.3,transform:"translate3d(-10px, 0, 0)"},{offset:.4,transform:"translate3d(10px, 0, 0)"},{offset:.5,transform:"translate3d(-10px, 0, 0)"},{offset:.6,transform:"translate3d(10px, 0, 0)"},{offset:.7,transform:"translate3d(-10px, 0, 0)"},{offset:.8,transform:"translate3d(10px, 0, 0)"},{offset:.9,transform:"translate3d(-10px, 0, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],shakeY:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.1,transform:"translate3d(0, -10px, 0)"},{offset:.2,transform:"translate3d(0, 10px, 0)"},{offset:.3,transform:"translate3d(0, -10px, 0)"},{offset:.4,transform:"translate3d(0, 10px, 0)"},{offset:.5,transform:"translate3d(0, -10px, 0)"},{offset:.6,transform:"translate3d(0, 10px, 0)"},{offset:.7,transform:"translate3d(0, -10px, 0)"},{offset:.8,transform:"translate3d(0, 10px, 0)"},{offset:.9,transform:"translate3d(0, -10px, 0)"},{offset:1,transform:"translate3d(0, 0, 0)"}],swing:[{offset:.2,transform:"rotate3d(0, 0, 1, 15deg)"},{offset:.4,transform:"rotate3d(0, 0, 1, -10deg)"},{offset:.6,transform:"rotate3d(0, 0, 1, 5deg)"},{offset:.8,transform:"rotate3d(0, 0, 1, -5deg)"},{offset:1,transform:"rotate3d(0, 0, 1, 0deg)"}],tada:[{offset:0,transform:"scale3d(1, 1, 1)"},{offset:.1,transform:"scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)"},{offset:.2,transform:"scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg)"},{offset:.3,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.4,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.5,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.6,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.7,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:.8,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg)"},{offset:.9,transform:"scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg)"},{offset:1,transform:"scale3d(1, 1, 1)"}],wobble:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:.15,transform:"translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg)"},{offset:.3,transform:"translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)"},{offset:.45,transform:"translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)"},{offset:.6,transform:"translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)"},{offset:.75,transform:"translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],backInDown:[{offset:0,transform:"translateY(-1200px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInLeft:[{offset:0,transform:"translateX(-2000px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInRight:[{offset:0,transform:"translateX(2000px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backInUp:[{offset:0,transform:"translateY(1200px) scale(0.7)",opacity:"0.7"},{offset:.8,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"scale(1)",opacity:"1"}],backOutDown:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateY(700px) scale(0.7)",opacity:"0.7"}],backOutLeft:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateX(-2000px) scale(0.7)",opacity:"0.7"}],backOutRight:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateX(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateX(2000px) scale(0.7)",opacity:"0.7"}],backOutUp:[{offset:0,transform:"scale(1)",opacity:"1"},{offset:.2,transform:"translateY(0px) scale(0.7)",opacity:"0.7"},{offset:1,transform:"translateY(-700px) scale(0.7)",opacity:"0.7"}],bounceIn:[{offset:0,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.2,transform:"scale3d(1.1, 1.1, 1.1)"},{offset:.2,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.4,transform:"scale3d(0.9, 0.9, 0.9)"},{offset:.4,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"scale3d(1.03, 1.03, 1.03)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.8,transform:"scale3d(0.97, 0.97, 0.97)"},{offset:.8,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,opacity:"1",transform:"scale3d(1, 1, 1)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInDown:[{offset:0,opacity:"0",transform:"translate3d(0, -3000px, 0) scaleY(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(0, 25px, 0) scaleY(0.9)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(0, -10px, 0) scaleY(0.95)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(0, 5px, 0) scaleY(0.985)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInLeft:[{offset:0,opacity:"0",transform:"translate3d(-3000px, 0, 0) scaleX(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(25px, 0, 0) scaleX(1)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(-10px, 0, 0) scaleX(0.98)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(5px, 0, 0) scaleX(0.995)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInRight:[{offset:0,opacity:"0",transform:"translate3d(3000px, 0, 0) scaleX(3)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(-25px, 0, 0) scaleX(1)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(10px, 0, 0) scaleX(0.98)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(-5px, 0, 0) scaleX(0.995)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceInUp:[{offset:0,opacity:"0",transform:"translate3d(0, 3000px, 0) scaleY(5)"},{offset:0,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.6,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:.6,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.75,transform:"translate3d(0, 10px, 0) scaleY(0.95)"},{offset:.75,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:.9,transform:"translate3d(0, -5px, 0) scaleY(0.985)"},{offset:.9,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"},{offset:1,transform:"translate3d(0, 0, 0)"},{offset:1,easing:"cubic-bezier(0.215, 0.61, 0.355, 1)"}],bounceOut:[{offset:.2,transform:"scale3d(0.9, 0.9, 0.9)"},{offset:.5,opacity:"1",transform:"scale3d(1.1, 1.1, 1.1)"},{offset:.55,opacity:"1",transform:"scale3d(1.1, 1.1, 1.1)"},{offset:1,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"}],bounceOutDown:[{offset:.2,transform:"translate3d(0, 10px, 0) scaleY(0.985)"},{offset:.4,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:.45,opacity:"1",transform:"translate3d(0, -20px, 0) scaleY(0.9)"},{offset:1,opacity:"0",transform:"translate3d(0, 2000px, 0) scaleY(3)"}],bounceOutLeft:[{offset:.2,opacity:"1",transform:"translate3d(20px, 0, 0) scaleX(0.9)"},{offset:1,opacity:"0",transform:"translate3d(-2000px, 0, 0) scaleX(2)"}],bounceOutRight:[{offset:.2,opacity:"1",transform:"translate3d(-20px, 0, 0) scaleX(0.9)"},{offset:1,opacity:"0",transform:"translate3d(2000px, 0, 0) scaleX(2)"}],bounceOutUp:[{offset:.2,transform:"translate3d(0, -10px, 0) scaleY(0.985)"},{offset:.4,opacity:"1",transform:"translate3d(0, 20px, 0) scaleY(0.9)"},{offset:.45,opacity:"1",transform:"translate3d(0, 20px, 0) scaleY(0.9)"},{offset:1,opacity:"0",transform:"translate3d(0, -2000px, 0) scaleY(3)"}],fadeIn:[{offset:0,opacity:"0"},{offset:1,opacity:"1"}],fadeInBottomLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInBottomRight:[{offset:0,opacity:"0",transform:"translate3d(100%, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInDown:[{offset:0,opacity:"0",transform:"translate3d(0, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInDownBig:[{offset:0,opacity:"0",transform:"translate3d(0, -2000px, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInLeftBig:[{offset:0,opacity:"0",transform:"translate3d(-2000px, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInRight:[{offset:0,opacity:"0",transform:"translate3d(100%, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInRightBig:[{offset:0,opacity:"0",transform:"translate3d(2000px, 0, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInTopLeft:[{offset:0,opacity:"0",transform:"translate3d(-100%, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInTopRight:[{offset:0,opacity:"0",transform:"translate3d(100%, -100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInUp:[{offset:0,opacity:"0",transform:"translate3d(0, 100%, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeInUpBig:[{offset:0,opacity:"0",transform:"translate3d(0, 2000px, 0)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],fadeOut:[{offset:0,opacity:"1"},{offset:1,opacity:"0"}],fadeOutBottomLeft:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(-100%, 100%, 0)"}],fadeOutBottomRight:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(100%, 100%, 0)"}],fadeOutDown:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, 100%, 0)"}],fadeOutDownBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, 2000px, 0)"}],fadeOutLeft:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(-100%, 0, 0)"}],fadeOutLeftBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(-2000px, 0, 0)"}],fadeOutRight:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(100%, 0, 0)"}],fadeOutRightBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(2000px, 0, 0)"}],fadeOutTopLeft:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(-100%, -100%, 0)"}],fadeOutTopRight:[{offset:0,opacity:"1",transform:"translate3d(0, 0, 0)"},{offset:1,opacity:"0",transform:"translate3d(100%, -100%, 0)"}],fadeOutUp:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, -100%, 0)"}],fadeOutUpBig:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(0, -2000px, 0)"}],flip:[{offset:0,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, -360deg)",easing:"ease-out"},{offset:.4,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -190deg)",easing:"ease-out"},{offset:.5,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 150px)\n rotate3d(0, 1, 0, -170deg)",easing:"ease-in"},{offset:.8,transform:"perspective(400px) scale3d(0.95, 0.95, 0.95) translate3d(0, 0, 0)\n rotate3d(0, 1, 0, 0deg)",easing:"ease-in"},{offset:1,transform:"perspective(400px) scale3d(1, 1, 1) translate3d(0, 0, 0) rotate3d(0, 1, 0, 0deg)",easing:"ease-in"}],flipInX:[{offset:0,transform:"perspective(400px) rotate3d(1, 0, 0, 90deg)",easing:"ease-in",opacity:"0"},{offset:.4,transform:"perspective(400px) rotate3d(1, 0, 0, -20deg)",easing:"ease-in"},{offset:.6,transform:"perspective(400px) rotate3d(1, 0, 0, 10deg)",opacity:"1"},{offset:.8,transform:"perspective(400px) rotate3d(1, 0, 0, -5deg)"},{offset:1,transform:"perspective(400px)"}],flipInY:[{offset:0,transform:"perspective(400px) rotate3d(0, 1, 0, 90deg)",easing:"ease-in",opacity:"0"},{offset:.4,transform:"perspective(400px) rotate3d(0, 1, 0, -20deg)",easing:"ease-in"},{offset:.6,transform:"perspective(400px) rotate3d(0, 1, 0, 10deg)",opacity:"1"},{offset:.8,transform:"perspective(400px) rotate3d(0, 1, 0, -5deg)"},{offset:1,transform:"perspective(400px)"}],flipOutX:[{offset:0,transform:"perspective(400px)"},{offset:.3,transform:"perspective(400px) rotate3d(1, 0, 0, -20deg)",opacity:"1"},{offset:1,transform:"perspective(400px) rotate3d(1, 0, 0, 90deg)",opacity:"0"}],flipOutY:[{offset:0,transform:"perspective(400px)"},{offset:.3,transform:"perspective(400px) rotate3d(0, 1, 0, -15deg)",opacity:"1"},{offset:1,transform:"perspective(400px) rotate3d(0, 1, 0, 90deg)",opacity:"0"}],lightSpeedInLeft:[{offset:0,transform:"translate3d(-100%, 0, 0) skewX(30deg)",opacity:"0"},{offset:.6,transform:"skewX(-20deg)",opacity:"1"},{offset:.8,transform:"skewX(5deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedInRight:[{offset:0,transform:"translate3d(100%, 0, 0) skewX(-30deg)",opacity:"0"},{offset:.6,transform:"skewX(20deg)",opacity:"1"},{offset:.8,transform:"skewX(-5deg)"},{offset:1,transform:"translate3d(0, 0, 0)"}],lightSpeedOutLeft:[{offset:0,opacity:"1"},{offset:1,transform:"translate3d(-100%, 0, 0) skewX(-30deg)",opacity:"0"}],lightSpeedOutRight:[{offset:0,opacity:"1"},{offset:1,transform:"translate3d(100%, 0, 0) skewX(30deg)",opacity:"0"}],rotateIn:[{offset:0,transform:"rotate3d(0, 0, 1, -200deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInDownLeft:[{offset:0,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInDownRight:[{offset:0,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInUpLeft:[{offset:0,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateInUpRight:[{offset:0,transform:"rotate3d(0, 0, 1, -90deg)",opacity:"0"},{offset:1,transform:"translate3d(0, 0, 0)",opacity:"1"}],rotateOut:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 200deg)",opacity:"0"}],rotateOutDownLeft:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 45deg)",opacity:"0"}],rotateOutDownRight:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"}],rotateOutUpLeft:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, -45deg)",opacity:"0"}],rotateOutUpRight:[{offset:0,opacity:"1"},{offset:1,transform:"rotate3d(0, 0, 1, 90deg)",opacity:"0"}],slideInDown:[{offset:0,transform:"translate3d(0, -100%, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInLeft:[{offset:0,transform:"translate3d(-100%, 0, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInRight:[{offset:0,transform:"translate3d(100%, 0, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideInUp:[{offset:0,transform:"translate3d(0, 100%, 0)",visibility:"visible"},{offset:1,transform:"translate3d(0, 0, 0)"}],slideOutDown:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(0, 100%, 0)"}],slideOutLeft:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(-100%, 0, 0)"}],slideOutRight:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(100%, 0, 0)"}],slideOutUp:[{offset:0,transform:"translate3d(0, 0, 0)"},{offset:1,visibility:"hidden",transform:"translate3d(0, -100%, 0)"}],hinge:[{offset:0,easing:"ease-in-out"},{offset:.2,transform:"rotate3d(0, 0, 1, 80deg)",easing:"ease-in-out"},{offset:.4,transform:"rotate3d(0, 0, 1, 60deg)",easing:"ease-in-out",opacity:"1"},{offset:.6,transform:"rotate3d(0, 0, 1, 80deg)",easing:"ease-in-out"},{offset:.8,transform:"rotate3d(0, 0, 1, 60deg)",easing:"ease-in-out",opacity:"1"},{offset:1,transform:"translate3d(0, 700px, 0)",opacity:"0"}],jackInTheBox:[{offset:0,opacity:"0",transform:"scale(0.1) rotate(30deg)","transform-origin":"center bottom"},{offset:.5,transform:"rotate(-10deg)"},{offset:.7,transform:"rotate(3deg)"},{offset:1,opacity:"1",transform:"scale(1)"}],rollIn:[{offset:0,opacity:"0",transform:"translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg)"},{offset:1,opacity:"1",transform:"translate3d(0, 0, 0)"}],rollOut:[{offset:0,opacity:"1"},{offset:1,opacity:"0",transform:"translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg)"}],zoomIn:[{offset:0,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:.5,opacity:"1"}],zoomInDown:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, -1000px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInLeft:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(-1000px, 0, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(10px, 0, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInRight:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(1000px, 0, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(-10px, 0, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomInUp:[{offset:0,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, 1000px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:.6,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomOut:[{offset:0,opacity:"1"},{offset:.5,opacity:"0",transform:"scale3d(0.3, 0.3, 0.3)"},{offset:1,opacity:"0"}],zoomOutDown:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, -60px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:1,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, 2000px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}],zoomOutLeft:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(42px, 0, 0)"},{offset:1,opacity:"0",transform:"scale(0.1) translate3d(-2000px, 0, 0)"}],zoomOutRight:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(-42px, 0, 0)"},{offset:1,opacity:"0",transform:"scale(0.1) translate3d(2000px, 0, 0)"}],zoomOutUp:[{offset:.4,opacity:"1",transform:"scale3d(0.475, 0.475, 0.475) translate3d(0, 60px, 0)",easing:"cubic-bezier(0.55, 0.055, 0.675, 0.19)"},{offset:1,opacity:"0",transform:"scale3d(0.1, 0.1, 0.1) translate3d(0, -2000px, 0)",easing:"cubic-bezier(0.175, 0.885, 0.32, 1)"}]},n=class{constructor(a){t(this,a),this.nanoCancel=e(this,"nanoCancel",7),this.nanoFinish=e(this,"nanoFinish",7),this.nanoStart=e(this,"nanoStart",7)}animation;hasStarted=!1;defaultSlot;name="none";play=!1;delay=0;direction="normal";duration=1e3;easing="ease";endDelay=0;fill="auto";iterations=1/0;iterationStart=0;keyframes;playbackRate=1;nanoCancel;nanoFinish;nanoStart;get currentTime(){return this.animation?.currentTime??0}set currentTime(t){this.animation&&(this.animation.currentTime=t)}connectedCallback(){this.createAnimation()}disconnectedCallback(){this.destroyAnimation()}handleAnimationFinish=()=>{this.play=!1,this.hasStarted=!1,this.nanoFinish.emit()};handleAnimationCancel=()=>{this.play=!1,this.hasStarted=!1,this.nanoCancel.emit()};handleSlotChange=()=>{this.destroyAnimation(),this.createAnimation()};async createAnimation(){if(!this.defaultSlot||a.isServer)return;const t=o[this.easing]??this.easing,e=this.keyframes??r[this.name],s=this.defaultSlot.assignedElements()[0];return!(!s||!e||(this.destroyAnimation(),this.animation=s.animate(e,{delay:this.delay,direction:this.direction,duration:this.duration,easing:t,endDelay:this.endDelay,fill:this.fill,iterationStart:this.iterationStart,iterations:this.iterations}),this.animation.playbackRate=this.playbackRate,this.animation.addEventListener("cancel",this.handleAnimationCancel),this.animation.addEventListener("finish",this.handleAnimationFinish),this.play?(this.hasStarted=!0,this.nanoStart.emit()):this.animation.pause(),0))}destroyAnimation(){this.animation&&(this.animation.cancel(),this.animation.removeEventListener("cancel",this.handleAnimationCancel),this.animation.removeEventListener("finish",this.handleAnimationFinish),this.hasStarted=!1)}handleAnimationChange(){this.createAnimation()}handlePlayChange(){return!!this.animation&&(this.play&&!this.hasStarted&&(this.hasStarted=!0,this.nanoStart.emit()),this.play?this.animation.play():this.animation.pause(),!0)}handlePlaybackRateChange(){this.animation&&(this.animation.playbackRate=this.playbackRate)}async cancel(){this.animation?.cancel()}async finish(){this.animation?.finish()}render(){return f(s,{key:"a71dc9c9b6505aa5ad8cdaefb32cadc0ca37fbb5",class:"nano-animation"},f("slot",{key:"a01cc1638ec3b57d56deb0f91d2421be4874d212",ref:t=>{this.defaultSlot=t},onSlotchange:this.handleSlotChange}))}static get watchers(){return{defaultSlot:["createAnimation"],name:["handleAnimationChange"],delay:["handleAnimationChange"],direction:["handleAnimationChange"],duration:["handleAnimationChange"],easing:["handleAnimationChange"],endDelay:["handleAnimationChange"],fill:["handleAnimationChange"],iterations:["handleAnimationChange"],iterationStart:["handleAnimationChange"],keyframes:["handleAnimationChange"],play:["handlePlayChange"],playbackRate:["handlePlaybackRateChange"]}}};n.style=":host {\n display: contents;\n }";export{n as nano_animation}