@venite/components 0.16.2 → 0.16.6

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 (253) hide show
  1. package/dist/cjs/ion-button_13.cjs.entry.js +1787 -0
  2. package/dist/cjs/ion-checkbox_3.cjs.entry.js +235 -0
  3. package/dist/cjs/ion-segment_16.cjs.entry.js +5 -4
  4. package/dist/cjs/ldf-day-name_5.cjs.entry.js +1 -2
  5. package/dist/cjs/ldf-editable-add-block-menu.cjs.entry.js +2 -2
  6. package/dist/cjs/ldf-editable-filter-documents.cjs.entry.js +1 -1
  7. package/dist/cjs/ldf-editable-lookup_2.cjs.entry.js +3 -3
  8. package/dist/cjs/ldf-editable-metadata.cjs.entry.js +3 -3
  9. package/dist/cjs/ldf.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{option-a9f12c93.js → option-1ebd4514.js} +6 -2
  12. package/dist/cjs/{rubric-85fc7418.js → rubric-662d8baa.js} +44 -5
  13. package/dist/cjs/{specific-class-acf1bb37.js → specific-class-d80d272a.js} +2 -2
  14. package/dist/collection/components/liturgical-document/dist/liturgical-document.js +6 -1
  15. package/dist/collection/components/liturgical-document/liturgical-document.js +21 -1
  16. package/dist/collection/components/option/dist/option.js +318 -0
  17. package/dist/collection/components/prayers-and-thanksgivings/dist/prayers-and-thanksgivings.js +258 -0
  18. package/dist/collection/components/prayers-and-thanksgivings/prayers-and-thanksgivings.js +55 -36
  19. package/dist/collection/components/psalm/dist/psalm.js +0 -1
  20. package/dist/collection/components/psalm/psalm.js +0 -1
  21. package/dist/collection/components/string/dist/string.js +0 -1
  22. package/dist/collection/components/string/string.js +0 -1
  23. package/dist/collection/components/text/dist/text.js +1 -1
  24. package/dist/collection/components/text/text.js +1 -1
  25. package/dist/esm/{app-globals-2b41bd8d.js → app-globals-729b03cf.js} +1 -1
  26. package/dist/esm/{index-1885f1b8.js → index-734a6b69.js} +1 -1
  27. package/dist/esm/{index-8b9e221a.js → index-9579282b.js} +3 -3
  28. package/dist/esm/{index-dcd553ac.js → index-f0f6a379.js} +1 -1
  29. package/dist/esm/ion-action-sheet.entry.js +3 -3
  30. package/dist/esm/ion-alert.entry.js +3 -3
  31. package/dist/esm/ion-app.entry.js +3 -3
  32. package/dist/esm/ion-avatar.entry.js +2 -2
  33. package/dist/esm/ion-back-button.entry.js +2 -2
  34. package/dist/esm/ion-backdrop.entry.js +2 -2
  35. package/dist/esm/ion-badge.entry.js +2 -2
  36. package/dist/esm/ion-button_13.entry.js +1771 -0
  37. package/dist/esm/ion-card-content_6.entry.js +3 -3
  38. package/dist/esm/ion-card-subtitle.entry.js +2 -2
  39. package/dist/esm/ion-card_2.entry.js +2 -2
  40. package/dist/esm/ion-checkbox_3.entry.js +229 -0
  41. package/dist/esm/ion-chip.entry.js +2 -2
  42. package/dist/esm/ion-datetime_2.entry.js +3 -3
  43. package/dist/esm/ion-fab-button.entry.js +2 -2
  44. package/dist/esm/ion-fab-list.entry.js +2 -2
  45. package/dist/esm/ion-fab.entry.js +2 -2
  46. package/dist/esm/ion-footer.entry.js +2 -2
  47. package/dist/esm/ion-img.entry.js +2 -2
  48. package/dist/esm/ion-infinite-scroll-content.entry.js +2 -2
  49. package/dist/esm/ion-infinite-scroll.entry.js +2 -2
  50. package/dist/esm/ion-input_2.entry.js +2 -2
  51. package/dist/esm/ion-item-divider.entry.js +2 -2
  52. package/dist/esm/ion-item-group.entry.js +2 -2
  53. package/dist/esm/ion-item-option.entry.js +2 -2
  54. package/dist/esm/ion-item-options.entry.js +2 -2
  55. package/dist/esm/ion-item-sliding.entry.js +2 -2
  56. package/dist/esm/ion-list-header.entry.js +2 -2
  57. package/dist/esm/ion-loading.entry.js +3 -3
  58. package/dist/esm/ion-menu-button.entry.js +4 -4
  59. package/dist/esm/ion-menu-toggle.entry.js +4 -4
  60. package/dist/esm/ion-menu.entry.js +3 -3
  61. package/dist/esm/ion-modal.entry.js +4 -4
  62. package/dist/esm/ion-nav-link.entry.js +1 -1
  63. package/dist/esm/ion-nav.entry.js +3 -3
  64. package/dist/esm/ion-note.entry.js +2 -2
  65. package/dist/esm/ion-picker-column.entry.js +2 -2
  66. package/dist/esm/ion-picker.entry.js +3 -3
  67. package/dist/esm/ion-popover.entry.js +4 -4
  68. package/dist/esm/ion-progress-bar.entry.js +2 -2
  69. package/dist/esm/ion-radio_2.entry.js +2 -2
  70. package/dist/esm/ion-range.entry.js +2 -2
  71. package/dist/esm/ion-refresher-content.entry.js +2 -2
  72. package/dist/esm/ion-refresher.entry.js +2 -2
  73. package/dist/esm/ion-reorder-group.entry.js +2 -2
  74. package/dist/esm/ion-reorder.entry.js +2 -2
  75. package/dist/esm/ion-route-redirect.entry.js +1 -1
  76. package/dist/esm/ion-route.entry.js +1 -1
  77. package/dist/esm/ion-router-link.entry.js +2 -2
  78. package/dist/esm/ion-router-outlet.entry.js +3 -3
  79. package/dist/esm/ion-router.entry.js +1 -1
  80. package/dist/esm/ion-segment_16.entry.js +8 -7
  81. package/dist/esm/ion-select-popover.entry.js +3 -3
  82. package/dist/esm/ion-select_2.entry.js +3 -3
  83. package/dist/esm/ion-slide.entry.js +2 -2
  84. package/dist/esm/ion-slides.entry.js +2 -2
  85. package/dist/esm/ion-spinner.entry.js +2 -2
  86. package/dist/esm/ion-split-pane.entry.js +2 -2
  87. package/dist/esm/ion-tab-bar.entry.js +2 -2
  88. package/dist/esm/ion-tab-button.entry.js +2 -2
  89. package/dist/esm/ion-tab.entry.js +1 -1
  90. package/dist/esm/ion-tabs.entry.js +1 -1
  91. package/dist/esm/ion-text.entry.js +2 -2
  92. package/dist/esm/ion-textarea.entry.js +2 -2
  93. package/dist/esm/ion-thumbnail.entry.js +2 -2
  94. package/dist/esm/ion-toast.entry.js +3 -3
  95. package/dist/esm/ion-virtual-scroll.entry.js +1 -1
  96. package/dist/esm/{ionic-global-fef4299f.js → ionic-global-ef89a0a5.js} +1 -1
  97. package/dist/esm/{ios.transition-2460f61e.js → ios.transition-b1be0863.js} +2 -2
  98. package/dist/esm/ldf-day-name_5.entry.js +4 -5
  99. package/dist/esm/ldf-editable-add-block-menu.entry.js +3 -3
  100. package/dist/esm/ldf-editable-condition-piece.entry.js +1 -1
  101. package/dist/esm/ldf-editable-condition.entry.js +1 -1
  102. package/dist/esm/ldf-editable-filter-documents.entry.js +2 -2
  103. package/dist/esm/ldf-editable-lookup_2.entry.js +4 -4
  104. package/dist/esm/ldf-editable-metadata.entry.js +4 -4
  105. package/dist/esm/ldf-editable-preference-option.entry.js +1 -1
  106. package/dist/esm/ldf-editable-preference.entry.js +1 -1
  107. package/dist/esm/ldf-editable-preferences.entry.js +3 -3
  108. package/dist/esm/ldf-editable-string-list.entry.js +1 -1
  109. package/dist/esm/ldf-editor-cursors.entry.js +1 -1
  110. package/dist/esm/ldf-editor.entry.js +1 -1
  111. package/dist/esm/ldf.js +4 -4
  112. package/dist/esm/loader.js +4 -4
  113. package/dist/esm/{md.transition-7eb37dd1.js → md.transition-1763f475.js} +2 -2
  114. package/dist/esm/{menu-toggle-util-d6bed342.js → menu-toggle-util-29e61ff3.js} +1 -1
  115. package/dist/esm/{option-042c9673.js → option-47d50244.js} +6 -2
  116. package/dist/esm/{overlays-e1d5aa58.js → overlays-06b43b65.js} +2 -2
  117. package/dist/esm/{rubric-9c750946.js → rubric-2330a030.js} +44 -5
  118. package/dist/esm/{specific-class-2df4b72a.js → specific-class-28e26e40.js} +2 -2
  119. package/dist/esm/{status-tap-900b721a.js → status-tap-7458bd71.js} +1 -1
  120. package/dist/ldf/ldf.esm.js +1 -1
  121. package/dist/ldf/{p-a7a10747.entry.js → p-018e57db.entry.js} +1 -1
  122. package/dist/ldf/p-02ef484e.entry.js +1 -0
  123. package/dist/ldf/{p-5bfa9969.entry.js → p-04715bf0.entry.js} +1 -1
  124. package/dist/ldf/{p-8cb241a8.entry.js → p-0651768a.entry.js} +1 -1
  125. package/dist/ldf/{p-a80bce6a.entry.js → p-07d6d3ad.entry.js} +1 -1
  126. package/dist/ldf/p-08584ccc.entry.js +1 -0
  127. package/dist/ldf/{p-d3a17399.entry.js → p-0873a34a.entry.js} +1 -1
  128. package/dist/ldf/{p-5febfbde.entry.js → p-0f69db87.entry.js} +1 -1
  129. package/dist/ldf/{p-6b6b9f77.entry.js → p-1504379f.entry.js} +1 -1
  130. package/dist/ldf/{p-110c6e85.entry.js → p-1a8e2899.entry.js} +1 -1
  131. package/dist/ldf/p-21e2f0a3.entry.js +1 -0
  132. package/dist/ldf/{p-6c3d4341.entry.js → p-25a736f1.entry.js} +1 -1
  133. package/dist/ldf/{p-43d7a734.entry.js → p-2c36a583.entry.js} +1 -1
  134. package/dist/ldf/{p-4c8f895f.entry.js → p-2fa1c501.entry.js} +1 -1
  135. package/dist/ldf/{p-a0b9b689.entry.js → p-302dc0d5.entry.js} +1 -1
  136. package/dist/ldf/{p-54f83929.entry.js → p-327b14ac.entry.js} +1 -1
  137. package/dist/ldf/{p-4d5b52ad.entry.js → p-32f7ba8e.entry.js} +1 -1
  138. package/dist/ldf/{p-8a064810.entry.js → p-3545fcdc.entry.js} +1 -1
  139. package/dist/ldf/{p-8c8bf861.entry.js → p-374118d7.entry.js} +1 -1
  140. package/dist/ldf/p-37f356a4.entry.js +1 -0
  141. package/dist/ldf/{p-7f7de09a.entry.js → p-380f8655.entry.js} +1 -1
  142. package/dist/ldf/{p-7df0687c.entry.js → p-3c9930ff.entry.js} +1 -1
  143. package/dist/ldf/{p-dbdb2b0a.entry.js → p-3f39c2ad.entry.js} +1 -1
  144. package/dist/ldf/{p-35680ca6.entry.js → p-430c418a.entry.js} +1 -1
  145. package/dist/ldf/{p-986921d2.js → p-48e44122.js} +1 -1
  146. package/dist/ldf/{p-4b154310.entry.js → p-4a4380fa.entry.js} +1 -1
  147. package/dist/ldf/p-4b80de48.js +1 -0
  148. package/dist/ldf/{p-06bc76d9.entry.js → p-4d392128.entry.js} +1 -1
  149. package/dist/ldf/p-4e0b3c0f.entry.js +1 -0
  150. package/dist/ldf/{p-b631cadf.entry.js → p-52656429.entry.js} +1 -1
  151. package/dist/ldf/p-53c807a4.js +1 -0
  152. package/dist/ldf/{p-91969280.js → p-55d797c1.js} +1 -1
  153. package/dist/ldf/{p-71ed0c0f.entry.js → p-59340423.entry.js} +1 -1
  154. package/dist/ldf/{p-0c8f1542.entry.js → p-5be7ff17.entry.js} +1 -1
  155. package/dist/ldf/p-5bf20b51.js +1 -0
  156. package/dist/ldf/{p-ae3cd06a.entry.js → p-63b5daf6.entry.js} +1 -1
  157. package/dist/ldf/{p-0afd3d32.entry.js → p-66a7385e.entry.js} +1 -1
  158. package/dist/ldf/p-698a3399.entry.js +1 -0
  159. package/dist/ldf/{p-4d92e32b.entry.js → p-69f85ad3.entry.js} +1 -1
  160. package/dist/ldf/{p-0cb749f6.entry.js → p-6fe24d85.entry.js} +1 -1
  161. package/dist/ldf/{p-ceb4c199.entry.js → p-70e47f8b.entry.js} +1 -1
  162. package/dist/ldf/{p-e778bf3c.entry.js → p-73a16936.entry.js} +1 -1
  163. package/dist/ldf/{p-bacac874.entry.js → p-79a526a1.entry.js} +1 -1
  164. package/dist/ldf/{p-20f5f7c0.entry.js → p-7abeb82c.entry.js} +1 -1
  165. package/dist/ldf/{p-79997a72.entry.js → p-7df11f48.entry.js} +1 -1
  166. package/dist/ldf/{p-91cef52f.entry.js → p-7efa633b.entry.js} +1 -1
  167. package/dist/ldf/{p-8ed588f7.entry.js → p-84f38db6.entry.js} +1 -1
  168. package/dist/ldf/{p-5a74ad40.entry.js → p-8767a74e.entry.js} +1 -1
  169. package/dist/ldf/{p-7fba586d.entry.js → p-8932ec85.entry.js} +1 -1
  170. package/dist/ldf/{p-74e1596c.entry.js → p-8c2727db.entry.js} +1 -1
  171. package/dist/ldf/{p-913c92ca.entry.js → p-972e4f2a.entry.js} +1 -1
  172. package/dist/ldf/{p-0ce10dcd.js → p-978e2c6d.js} +1 -1
  173. package/dist/ldf/p-9bd5d1d4.entry.js +1 -0
  174. package/dist/ldf/{p-5fa1dcfb.entry.js → p-9c397c49.entry.js} +1 -1
  175. package/dist/ldf/p-9e2c172e.entry.js +1 -0
  176. package/dist/ldf/{p-6b0fab5d.js → p-9e82b403.js} +2 -2
  177. package/dist/ldf/{p-2b9556d3.entry.js → p-a98c89d1.entry.js} +1 -1
  178. package/dist/ldf/{p-c3dbb344.entry.js → p-ac7a17ce.entry.js} +1 -1
  179. package/dist/ldf/{p-3b236b73.js → p-acbbd1ec.js} +1 -1
  180. package/dist/ldf/p-b1242016.js +1 -0
  181. package/dist/ldf/{p-50d56c76.entry.js → p-b7388aec.entry.js} +1 -1
  182. package/dist/ldf/{p-37ead536.entry.js → p-b78336d7.entry.js} +1 -1
  183. package/dist/ldf/{p-9282f514.entry.js → p-ba021918.entry.js} +1 -1
  184. package/dist/ldf/{p-65c80b87.entry.js → p-c1bcd0a9.entry.js} +1 -1
  185. package/dist/ldf/{p-4c825920.entry.js → p-c1df632d.entry.js} +1 -1
  186. package/dist/ldf/{p-a467efd9.entry.js → p-c3042920.entry.js} +1 -1
  187. package/dist/ldf/{p-860e2e8c.entry.js → p-c3807857.entry.js} +1 -1
  188. package/dist/ldf/{p-faf3cb15.entry.js → p-c3841978.entry.js} +1 -1
  189. package/dist/ldf/{p-b7fe7b29.entry.js → p-c41e055c.entry.js} +1 -1
  190. package/dist/ldf/{p-5cefe450.entry.js → p-c6163f81.entry.js} +1 -1
  191. package/dist/ldf/{p-944c44a7.entry.js → p-c6b42618.entry.js} +1 -1
  192. package/dist/ldf/{p-1d8e06c7.entry.js → p-c74d3fd0.entry.js} +1 -1
  193. package/dist/ldf/{p-741e1b4e.entry.js → p-c82dd468.entry.js} +1 -1
  194. package/dist/ldf/{p-342e45c0.entry.js → p-ca698b8f.entry.js} +1 -1
  195. package/dist/ldf/p-ca7e0de9.entry.js +1 -0
  196. package/dist/ldf/{p-059fcd05.entry.js → p-cbfbb80c.entry.js} +1 -1
  197. package/dist/ldf/{p-a8264864.entry.js → p-d195c957.entry.js} +1 -1
  198. package/dist/ldf/{p-664b2872.js → p-d282d4f9.js} +1 -1
  199. package/dist/ldf/{p-bc59e89e.entry.js → p-d7966e9b.entry.js} +1 -1
  200. package/dist/ldf/{p-f562ae50.js → p-d7f8c770.js} +1 -1
  201. package/dist/ldf/{p-396025ba.entry.js → p-d7fa99cc.entry.js} +1 -1
  202. package/dist/ldf/{p-ae136041.entry.js → p-db435131.entry.js} +1 -1
  203. package/dist/ldf/{p-ae287f67.entry.js → p-dc445c36.entry.js} +1 -1
  204. package/dist/ldf/{p-385a3ecf.entry.js → p-dd99e42a.entry.js} +1 -1
  205. package/dist/ldf/{p-b8a8f9c8.js → p-de5bb5ad.js} +1 -1
  206. package/dist/ldf/{p-7e388cb7.entry.js → p-e0e12ae3.entry.js} +1 -1
  207. package/dist/ldf/{p-128ac9e9.entry.js → p-e215fd02.entry.js} +1 -1
  208. package/dist/ldf/{p-4b7027b1.entry.js → p-e4be11ad.entry.js} +1 -1
  209. package/dist/ldf/{p-8d6f1d6b.entry.js → p-ea66c343.entry.js} +1 -1
  210. package/dist/ldf/{p-ac9a93aa.entry.js → p-ec5eecdc.entry.js} +1 -1
  211. package/dist/ldf/{p-64c46765.js → p-f2ce126e.js} +1 -1
  212. package/dist/ldf/{p-186eed18.entry.js → p-fe59a676.entry.js} +1 -1
  213. package/dist/ldf/p-ff51dbd0.entry.js +1 -0
  214. package/dist/types/components/liturgical-document/liturgical-document.d.ts +2 -0
  215. package/dist/types/components/prayers-and-thanksgivings/prayers-and-thanksgivings.d.ts +1 -1
  216. package/dist/types/components.d.ts +8 -0
  217. package/package.json +2 -2
  218. package/dist/cjs/ion-button_3.cjs.entry.js +0 -413
  219. package/dist/cjs/ion-buttons_6.cjs.entry.js +0 -584
  220. package/dist/cjs/ion-content.cjs.entry.js +0 -303
  221. package/dist/cjs/ion-item_2.cjs.entry.js +0 -168
  222. package/dist/cjs/ion-ripple-effect.cjs.entry.js +0 -93
  223. package/dist/cjs/ion-searchbar.cjs.entry.js +0 -330
  224. package/dist/cjs/ion-title.cjs.entry.js +0 -48
  225. package/dist/cjs/ldf-prayers-and-thanksgivings.cjs.entry.js +0 -108
  226. package/dist/esm/ion-button_3.entry.js +0 -407
  227. package/dist/esm/ion-buttons_6.entry.js +0 -575
  228. package/dist/esm/ion-content.entry.js +0 -299
  229. package/dist/esm/ion-item_2.entry.js +0 -163
  230. package/dist/esm/ion-ripple-effect.entry.js +0 -89
  231. package/dist/esm/ion-searchbar.entry.js +0 -326
  232. package/dist/esm/ion-title.entry.js +0 -44
  233. package/dist/esm/ldf-prayers-and-thanksgivings.entry.js +0 -104
  234. package/dist/ldf/p-01655d40.js +0 -1
  235. package/dist/ldf/p-07e48862.entry.js +0 -1
  236. package/dist/ldf/p-2471a9c7.entry.js +0 -1
  237. package/dist/ldf/p-356f9ee6.entry.js +0 -1
  238. package/dist/ldf/p-68f963c7.entry.js +0 -1
  239. package/dist/ldf/p-72718314.entry.js +0 -1
  240. package/dist/ldf/p-78ed7ef0.entry.js +0 -1
  241. package/dist/ldf/p-7aecb410.js +0 -1
  242. package/dist/ldf/p-7ccf2257.entry.js +0 -1
  243. package/dist/ldf/p-867f7c02.js +0 -1
  244. package/dist/ldf/p-8e1286c3.entry.js +0 -1
  245. package/dist/ldf/p-92461769.entry.js +0 -1
  246. package/dist/ldf/p-9382bbe1.entry.js +0 -1
  247. package/dist/ldf/p-96967103.entry.js +0 -1
  248. package/dist/ldf/p-accacaed.entry.js +0 -1
  249. package/dist/ldf/p-bcb82c8e.js +0 -1
  250. package/dist/ldf/p-c7c0acf1.entry.js +0 -1
  251. package/dist/ldf/p-cee7604d.entry.js +0 -1
  252. package/dist/ldf/p-e3ce57d7.entry.js +0 -1
  253. package/dist/ldf/p-ecb2e631.entry.js +0 -1
@@ -0,0 +1,1771 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, a as getElement, d as readTask, f as forceUpdate, w as writeTask, e as getAssetPath } from './index-f0f6a379.js';
2
+ import { g as getIonMode$1, i as isPlatform, c as config } from './ionic-global-ef89a0a5.js';
3
+ import { h as hasShadowDom, c as clamp, d as debounceEvent, r as raf } from './helpers-8c93393b.js';
4
+ import { o as openURL, c as createColorClasses$1, h as hostContext } from './theme-74c22054.js';
5
+ import { p as popoverController } from './overlays-06b43b65.js';
6
+ import './index-f5b9b789.js';
7
+ import { C as Change } from './change-ea574d32.js';
8
+ import { g as getComponentClosestLanguage } from './locale-ec8e14e6.js';
9
+ import './hardware-back-button-b3b61715.js';
10
+ import './_commonjsHelpers-ba3f0406.js';
11
+
12
+ const buttonIosCss = ":host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;pointer-events:auto;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #3880ff);--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;display:block;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;display:block;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;box-sizing:border-box;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::-moz-focus-inner{border:0}.button-inner{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted(ion-icon){font-size:1.4em;pointer-events:none}::slotted(ion-icon[slot=start]){margin-left:-0.3em;margin-right:0.3em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}::slotted(ion-icon[slot=end]){margin-left:0.3em;margin-right:-0.2em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em}}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:10px;--padding-top:0;--padding-bottom:0;--padding-start:1em;--padding-end:1em;--transition:background-color, opacity 100ms linear;margin-left:2px;margin-right:2px;margin-top:4px;margin-bottom:4px;height:2.8em;font-size:16px;font-weight:500;letter-spacing:-0.03em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.button-solid){--background-activated:var(--ion-color-primary-shade, #3171e0);--background-focused:var(--ion-color-primary-shade, #3171e0);--background-hover:var(--ion-color-primary-tint, #4c8dff);--background-activated-opacity:1;--background-focused-opacity:1;--background-hover-opacity:1}:host(.button-outline){--border-radius:10px;--border-width:1px;--border-style:solid;--background-activated:var(--ion-color-primary, #3880ff);--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;--color-activated:var(--ion-color-primary-contrast, #fff)}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:transparent;--background-focused-opacity:.1;font-size:17px;font-weight:normal;letter-spacing:0}:host(.button-large){--border-radius:12px;--padding-top:0;--padding-start:1em;--padding-end:1em;--padding-bottom:0;height:2.8em;font-size:20px}:host(.button-small){--border-radius:6px;--padding-top:0;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:0;height:2.1em;font-size:13px}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-strong){font-weight:600}:host(.button-clear.ion-activated){opacity:0.4}:host(.button-outline.ion-activated.ion-color) .button-native{color:var(--ion-color-contrast)}:host(.button-outline.ion-activated.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-activated) .button-native::after{background:var(--ion-color-shade)}:host(.button-outline.ion-focused.ion-color) .button-native,:host(.button-clear.ion-focused.ion-color) .button-native{color:var(--ion-color-base)}:host(.button-outline.ion-focused.ion-color) .button-native::after,:host(.button-clear.ion-focused.ion-color) .button-native::after{background:var(--ion-color-base)}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-shade)}@media (any-hover: hover){:host(.button-clear:hover),:host(.button-outline:hover){opacity:0.6}:host(.button-clear.ion-color:hover) .button-native,:host(.button-outline.ion-color:hover) .button-native{color:var(--ion-color-base)}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:transparent}:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-tint)}:host(:hover.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native::after{background:#fff;opacity:0.1}}";
13
+
14
+ const buttonMdCss = ":host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;pointer-events:auto;font-kerning:none}:host(.button-disabled){cursor:default;opacity:0.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary, #3880ff);--color:var(--ion-color-primary-contrast, #fff)}:host(.button-outline){--border-color:var(--ion-color-primary, #3880ff);--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-clear){--border-width:0;--background:transparent;--color:var(--ion-color-primary, #3880ff)}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;display:block;width:100%;clear:both;contain:content}:host(.button-block) .button-native::after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;display:block;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;box-sizing:border-box;appearance:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::-moz-focus-inner{border:0}.button-inner{display:flex;position:relative;flex-flow:row nowrap;flex-shrink:0;align-items:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted(ion-icon){font-size:1.4em;pointer-events:none}::slotted(ion-icon[slot=start]){margin-left:-0.3em;margin-right:0.3em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:-0.3em;margin-inline-start:-0.3em;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}::slotted(ion-icon[slot=end]){margin-left:0.3em;margin-right:-0.2em;margin-top:0;margin-bottom:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:0.3em;margin-inline-start:0.3em;-webkit-margin-end:-0.2em;margin-inline-end:-0.2em}}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}@media (any-hover: hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base);background:transparent;color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color, var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color, var(--color, var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color, var(--background));color:var(--ion-toolbar-background, var(--color))}:host{--border-radius:4px;--padding-top:0;--padding-bottom:0;--padding-start:1.1em;--padding-end:1.1em;--transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),\n background-color 15ms linear,\n color 15ms linear;margin-left:2px;margin-right:2px;margin-top:4px;margin-bottom:4px;height:36px;font-size:14px;font-weight:500;letter-spacing:0.06em;text-transform:uppercase}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.button-solid){--background-activated:transparent;--background-hover:var(--ion-color-primary-contrast, #fff);--background-focused:var(--ion-color-primary-contrast, #fff);--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--box-shadow:0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)}:host(.button-solid.ion-activated){--box-shadow:0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)}:host(.button-outline){--border-width:2px;--border-style:solid;--box-shadow:none;--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:var(--ion-color-primary, #3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-outline.ion-activated.ion-color) .button-native{background:transparent}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary, #3880ff);--background-hover:var(--ion-color-primary, #3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-large){--padding-top:0;--padding-start:1em;--padding-end:1em;--padding-bottom:0;height:2.8em;font-size:20px}:host(.button-small){--padding-top:0;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:0;height:2.1em;font-size:13px}:host(.button-strong){font-weight:bold}::slotted(ion-icon[slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host(.button-solid.ion-color.ion-focused) .button-native::after{background:var(--ion-color-contrast);opacity:0.24}:host(.button-clear.ion-color.ion-focused) .button-native::after,:host(.button-outline.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base);opacity:0.12}@media (any-hover: hover){:host(.button-solid.ion-color:hover) .button-native::after{background:var(--ion-color-contrast);opacity:0.08}:host(.button-clear.ion-color:hover) .button-native::after,:host(.button-outline.ion-color:hover) .button-native::after{background:var(--ion-color-base);opacity:0.04}}";
15
+
16
+ const Button = class {
17
+ constructor(hostRef) {
18
+ registerInstance(this, hostRef);
19
+ this.ionFocus = createEvent(this, "ionFocus", 7);
20
+ this.ionBlur = createEvent(this, "ionBlur", 7);
21
+ this.inItem = false;
22
+ this.inListHeader = false;
23
+ this.inToolbar = false;
24
+ /**
25
+ * The type of button.
26
+ */
27
+ this.buttonType = 'button';
28
+ /**
29
+ * If `true`, the user cannot interact with the button.
30
+ */
31
+ this.disabled = false;
32
+ /**
33
+ * When using a router, it specifies the transition direction when navigating to
34
+ * another page using `href`.
35
+ */
36
+ this.routerDirection = 'forward';
37
+ /**
38
+ * If `true`, activates a button with a heavier font weight.
39
+ */
40
+ this.strong = false;
41
+ /**
42
+ * The type of the button.
43
+ */
44
+ this.type = 'button';
45
+ this.handleClick = (ev) => {
46
+ if (this.type === 'button') {
47
+ openURL(this.href, ev, this.routerDirection);
48
+ }
49
+ else if (hasShadowDom(this.el)) {
50
+ // this button wants to specifically submit a form
51
+ // climb up the dom to see if we're in a <form>
52
+ // and if so, then use JS to submit it
53
+ const form = this.el.closest('form');
54
+ if (form) {
55
+ ev.preventDefault();
56
+ const fakeButton = document.createElement('button');
57
+ fakeButton.type = this.type;
58
+ fakeButton.style.display = 'none';
59
+ form.appendChild(fakeButton);
60
+ fakeButton.click();
61
+ fakeButton.remove();
62
+ }
63
+ }
64
+ };
65
+ this.onFocus = () => {
66
+ this.ionFocus.emit();
67
+ };
68
+ this.onBlur = () => {
69
+ this.ionBlur.emit();
70
+ };
71
+ }
72
+ componentWillLoad() {
73
+ this.inToolbar = !!this.el.closest('ion-buttons');
74
+ this.inListHeader = !!this.el.closest('ion-list-header');
75
+ this.inItem = !!this.el.closest('ion-item') || !!this.el.closest('ion-item-divider');
76
+ }
77
+ get hasIconOnly() {
78
+ return !!this.el.querySelector('ion-icon[slot="icon-only"]');
79
+ }
80
+ get rippleType() {
81
+ const hasClearFill = this.fill === undefined || this.fill === 'clear';
82
+ // If the button is in a toolbar, has a clear fill (which is the default)
83
+ // and only has an icon we use the unbounded "circular" ripple effect
84
+ if (hasClearFill && this.hasIconOnly && this.inToolbar) {
85
+ return 'unbounded';
86
+ }
87
+ return 'bounded';
88
+ }
89
+ render() {
90
+ const mode = getIonMode$1(this);
91
+ const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong } = this;
92
+ const finalSize = size === undefined && this.inItem ? 'small' : size;
93
+ const TagType = href === undefined ? 'button' : 'a';
94
+ const attrs = (TagType === 'button')
95
+ ? { type }
96
+ : {
97
+ download: this.download,
98
+ href,
99
+ rel,
100
+ target
101
+ };
102
+ let fill = this.fill;
103
+ if (fill === undefined) {
104
+ fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';
105
+ }
106
+ return (h(Host, { onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: Object.assign(Object.assign({}, createColorClasses$1(color)), { [mode]: true, [buttonType]: true, [`${buttonType}-${expand}`]: expand !== undefined, [`${buttonType}-${finalSize}`]: finalSize !== undefined, [`${buttonType}-${shape}`]: shape !== undefined, [`${buttonType}-${fill}`]: true, [`${buttonType}-strong`]: strong, 'in-toolbar': hostContext('ion-toolbar', this.el), 'in-toolbar-color': hostContext('ion-toolbar[color]', this.el), 'button-has-icon-only': hasIconOnly, 'button-disabled': disabled, 'ion-activatable': true, 'ion-focusable': true }) }, h(TagType, Object.assign({}, attrs, { class: "button-native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }), h("span", { class: "button-inner" }, h("slot", { name: "icon-only" }), h("slot", { name: "start" }), h("slot", null), h("slot", { name: "end" })), mode === 'md' && h("ion-ripple-effect", { type: this.rippleType }))));
107
+ }
108
+ get el() { return getElement(this); }
109
+ };
110
+ Button.style = {
111
+ ios: buttonIosCss,
112
+ md: buttonMdCss
113
+ };
114
+
115
+ const buttonsIosCss = ".sc-ion-buttons-ios-h{display:flex;align-items:center;transform:translateZ(0);z-index:99}.sc-ion-buttons-ios-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-ios-s ion-button{--padding-start:5px;--padding-end:5px;margin-left:2px;margin-right:2px;height:32px;font-size:17px;font-weight:400}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-buttons-ios-s ion-button{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}.sc-ion-buttons-ios-s ion-button:not(.button-round){--border-radius:4px}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button{--color:initial;--border-color:initial;--background-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-solid,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-solid{--background:var(--ion-color-contrast);--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12;--background-hover:var(--ion-color-base);--background-hover-opacity:0.45;--color:var(--ion-color-base);--color-focused:var(--ion-color-base)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-clear,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-clear{--color-activated:var(--ion-color-contrast);--color-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-outline,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-outline{--color-activated:var(--ion-color-base);--color-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-s .button-clear,.sc-ion-buttons-ios-s .button-outline{--background-activated:transparent;--background-focused:currentColor;--background-hover:transparent}.sc-ion-buttons-ios-s .button-solid:not(.ion-color){--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12}.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-right:0.3em;font-size:24px;line-height:0.67}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-left:0.4em;font-size:24px;line-height:0.67}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:unset;-webkit-margin-start:0.4em;margin-inline-start:0.4em}}.sc-ion-buttons-ios-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:28px;line-height:0.67}";
116
+
117
+ const buttonsMdCss = ".sc-ion-buttons-md-h{display:flex;align-items:center;transform:translateZ(0);z-index:99}.sc-ion-buttons-md-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-md-s ion-button{--padding-top:0;--padding-bottom:0;--padding-start:8px;--padding-end:8px;--box-shadow:none;margin-left:2px;margin-right:2px;height:32px;font-size:14px;font-weight:500}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-buttons-md-s ion-button{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}.sc-ion-buttons-md-s ion-button:not(.button-round){--border-radius:2px}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button{--color:initial;--color-focused:var(--ion-color-contrast);--color-hover:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-contrast);--background-hover:var(--ion-color-contrast)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-solid,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-solid{--background:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-shade);--background-hover:var(--ion-color-base);--color:var(--ion-color-base);--color-focused:var(--ion-color-base);--color-hover:var(--ion-color-base)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-outline,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-outline{--border-color:var(--ion-color-contrast)}.sc-ion-buttons-md-s .button-has-icon-only.button-clear{--padding-top:12px;--padding-end:12px;--padding-bottom:12px;--padding-start:12px;--border-radius:50%;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:48px;height:48px}.sc-ion-buttons-md-s .button{--background-hover:currentColor}.sc-ion-buttons-md-s .button-solid{--color:var(--ion-toolbar-background, var(--ion-background-color, #fff));--background:var(--ion-toolbar-color, var(--ion-text-color, #424242));--background-activated:transparent;--background-focused:currentColor}.sc-ion-buttons-md-s .button-outline{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor;--border-color:currentColor}.sc-ion-buttons-md-s .button-clear{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor}.sc-ion-buttons-md-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-right:0.3em;font-size:1.4em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-buttons-md-s ion-icon[slot=start]{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.sc-ion-buttons-md-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-left:0.4em;font-size:1.4em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-buttons-md-s ion-icon[slot=end]{margin-left:unset;-webkit-margin-start:0.4em;margin-inline-start:0.4em}}.sc-ion-buttons-md-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.8em}";
118
+
119
+ const Buttons = class {
120
+ constructor(hostRef) {
121
+ registerInstance(this, hostRef);
122
+ /**
123
+ * If true, buttons will disappear when its
124
+ * parent toolbar has fully collapsed if the toolbar
125
+ * is not the first toolbar. If the toolbar is the
126
+ * first toolbar, the buttons will be hidden and will
127
+ * only be shown once all toolbars have fully collapsed.
128
+ *
129
+ * Only applies in `ios` mode with `collapse` set to
130
+ * `true` on `ion-header`.
131
+ *
132
+ * Typically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles)
133
+ */
134
+ this.collapse = false;
135
+ }
136
+ render() {
137
+ const mode = getIonMode$1(this);
138
+ return (h(Host, { class: {
139
+ [mode]: true,
140
+ ['buttons-collapse']: this.collapse
141
+ } }));
142
+ }
143
+ };
144
+ Buttons.style = {
145
+ ios: buttonsIosCss,
146
+ md: buttonsMdCss
147
+ };
148
+
149
+ const contentCss = ":host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.outer-content){--background:var(--ion-color-step-50, #f2f2f2)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);box-sizing:border-box;overflow:hidden}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.inner-scroll{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;will-change:scroll-position}.scroll-y{touch-action:pan-y;overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{touch-action:pan-x;overflow-x:var(--overflow);overscroll-behavior-x:contain}.scroll-x.scroll-y{touch-action:auto}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:\"\"}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){contain:none}:host(.content-sizing) .inner-scroll{position:relative}.transition-effect{display:none;position:absolute;left:-100%;width:100%;height:100%;opacity:0;pointer-events:none}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;right:0;width:10px;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAgCAYAAAAIXrg4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTE3MDgzRkQ5QTkyMTFFOUEwNzQ5MkJFREE1NUY2MjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTE3MDgzRkU5QTkyMTFFOUEwNzQ5MkJFREE1NUY2MjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxMTcwODNGQjlBOTIxMUU5QTA3NDkyQkVEQTU1RjYyNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoxMTcwODNGQzlBOTIxMUU5QTA3NDkyQkVEQTU1RjYyNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmePEuQAAABNSURBVHjaYvz//z8DIxAwMDAwATGMhmFmPDQuOSZks0AMmoJBaQHjkPfB0Lfg/2gQjVow+HPy/yHvg9GiYjQfjMbBqAWjFgy/4hogwADYqwdzxy5BuwAAAABJRU5ErkJggg==);background-repeat:repeat-y;background-size:10px 16px}::slotted([slot=fixed]){position:absolute}";
150
+
151
+ const Content = class {
152
+ constructor(hostRef) {
153
+ registerInstance(this, hostRef);
154
+ this.ionScrollStart = createEvent(this, "ionScrollStart", 7);
155
+ this.ionScroll = createEvent(this, "ionScroll", 7);
156
+ this.ionScrollEnd = createEvent(this, "ionScrollEnd", 7);
157
+ this.isScrolling = false;
158
+ this.lastScroll = 0;
159
+ this.queued = false;
160
+ this.cTop = -1;
161
+ this.cBottom = -1;
162
+ // Detail is used in a hot loop in the scroll event, by allocating it here
163
+ // V8 will be able to inline any read/write to it since it's a monomorphic class.
164
+ // https://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html
165
+ this.detail = {
166
+ scrollTop: 0,
167
+ scrollLeft: 0,
168
+ type: 'scroll',
169
+ event: undefined,
170
+ startX: 0,
171
+ startY: 0,
172
+ startTime: 0,
173
+ currentX: 0,
174
+ currentY: 0,
175
+ velocityX: 0,
176
+ velocityY: 0,
177
+ deltaX: 0,
178
+ deltaY: 0,
179
+ currentTime: 0,
180
+ data: undefined,
181
+ isScrolling: true,
182
+ };
183
+ /**
184
+ * If `true`, the content will scroll behind the headers
185
+ * and footers. This effect can easily be seen by setting the toolbar
186
+ * to transparent.
187
+ */
188
+ this.fullscreen = false;
189
+ /**
190
+ * If you want to enable the content scrolling in the X axis, set this property to `true`.
191
+ */
192
+ this.scrollX = false;
193
+ /**
194
+ * If you want to disable the content scrolling in the Y axis, set this property to `false`.
195
+ */
196
+ this.scrollY = true;
197
+ /**
198
+ * Because of performance reasons, ionScroll events are disabled by default, in order to enable them
199
+ * and start listening from (ionScroll), set this property to `true`.
200
+ */
201
+ this.scrollEvents = false;
202
+ }
203
+ disconnectedCallback() {
204
+ this.onScrollEnd();
205
+ }
206
+ onAppLoad() {
207
+ this.resize();
208
+ }
209
+ onClick(ev) {
210
+ if (this.isScrolling) {
211
+ ev.preventDefault();
212
+ ev.stopPropagation();
213
+ }
214
+ }
215
+ shouldForceOverscroll() {
216
+ const { forceOverscroll } = this;
217
+ const mode = getIonMode$1(this);
218
+ return forceOverscroll === undefined
219
+ ? mode === 'ios' && isPlatform('ios')
220
+ : forceOverscroll;
221
+ }
222
+ resize() {
223
+ if (this.fullscreen) {
224
+ readTask(() => this.readDimensions());
225
+ }
226
+ else if (this.cTop !== 0 || this.cBottom !== 0) {
227
+ this.cTop = this.cBottom = 0;
228
+ forceUpdate(this);
229
+ }
230
+ }
231
+ readDimensions() {
232
+ const page = getPageElement(this.el);
233
+ const top = Math.max(this.el.offsetTop, 0);
234
+ const bottom = Math.max(page.offsetHeight - top - this.el.offsetHeight, 0);
235
+ const dirty = top !== this.cTop || bottom !== this.cBottom;
236
+ if (dirty) {
237
+ this.cTop = top;
238
+ this.cBottom = bottom;
239
+ forceUpdate(this);
240
+ }
241
+ }
242
+ onScroll(ev) {
243
+ const timeStamp = Date.now();
244
+ const shouldStart = !this.isScrolling;
245
+ this.lastScroll = timeStamp;
246
+ if (shouldStart) {
247
+ this.onScrollStart();
248
+ }
249
+ if (!this.queued && this.scrollEvents) {
250
+ this.queued = true;
251
+ readTask(ts => {
252
+ this.queued = false;
253
+ this.detail.event = ev;
254
+ updateScrollDetail(this.detail, this.scrollEl, ts, shouldStart);
255
+ this.ionScroll.emit(this.detail);
256
+ });
257
+ }
258
+ }
259
+ /**
260
+ * Get the element where the actual scrolling takes place.
261
+ * This element can be used to subscribe to `scroll` events or manually modify
262
+ * `scrollTop`. However, it's recommended to use the API provided by `ion-content`:
263
+ *
264
+ * i.e. Using `ionScroll`, `ionScrollStart`, `ionScrollEnd` for scrolling events
265
+ * and `scrollToPoint()` to scroll the content into a certain point.
266
+ */
267
+ getScrollElement() {
268
+ return Promise.resolve(this.scrollEl);
269
+ }
270
+ /**
271
+ * Scroll to the top of the component.
272
+ *
273
+ * @param duration The amount of time to take scrolling to the top. Defaults to `0`.
274
+ */
275
+ scrollToTop(duration = 0) {
276
+ return this.scrollToPoint(undefined, 0, duration);
277
+ }
278
+ /**
279
+ * Scroll to the bottom of the component.
280
+ *
281
+ * @param duration The amount of time to take scrolling to the bottom. Defaults to `0`.
282
+ */
283
+ scrollToBottom(duration = 0) {
284
+ const y = this.scrollEl.scrollHeight - this.scrollEl.clientHeight;
285
+ return this.scrollToPoint(undefined, y, duration);
286
+ }
287
+ /**
288
+ * Scroll by a specified X/Y distance in the component.
289
+ *
290
+ * @param x The amount to scroll by on the horizontal axis.
291
+ * @param y The amount to scroll by on the vertical axis.
292
+ * @param duration The amount of time to take scrolling by that amount.
293
+ */
294
+ scrollByPoint(x, y, duration) {
295
+ return this.scrollToPoint(x + this.scrollEl.scrollLeft, y + this.scrollEl.scrollTop, duration);
296
+ }
297
+ /**
298
+ * Scroll to a specified X/Y location in the component.
299
+ *
300
+ * @param x The point to scroll to on the horizontal axis.
301
+ * @param y The point to scroll to on the vertical axis.
302
+ * @param duration The amount of time to take scrolling to that point. Defaults to `0`.
303
+ */
304
+ async scrollToPoint(x, y, duration = 0) {
305
+ const el = this.scrollEl;
306
+ if (duration < 32) {
307
+ if (y != null) {
308
+ el.scrollTop = y;
309
+ }
310
+ if (x != null) {
311
+ el.scrollLeft = x;
312
+ }
313
+ return;
314
+ }
315
+ let resolve;
316
+ let startTime = 0;
317
+ const promise = new Promise(r => resolve = r);
318
+ const fromY = el.scrollTop;
319
+ const fromX = el.scrollLeft;
320
+ const deltaY = y != null ? y - fromY : 0;
321
+ const deltaX = x != null ? x - fromX : 0;
322
+ // scroll loop
323
+ const step = (timeStamp) => {
324
+ const linearTime = Math.min(1, ((timeStamp - startTime) / duration)) - 1;
325
+ const easedT = Math.pow(linearTime, 3) + 1;
326
+ if (deltaY !== 0) {
327
+ el.scrollTop = Math.floor((easedT * deltaY) + fromY);
328
+ }
329
+ if (deltaX !== 0) {
330
+ el.scrollLeft = Math.floor((easedT * deltaX) + fromX);
331
+ }
332
+ if (easedT < 1) {
333
+ // do not use DomController here
334
+ // must use nativeRaf in order to fire in the next frame
335
+ // TODO: remove as any
336
+ requestAnimationFrame(step);
337
+ }
338
+ else {
339
+ resolve();
340
+ }
341
+ };
342
+ // chill out for a frame first
343
+ requestAnimationFrame(ts => {
344
+ startTime = ts;
345
+ step(ts);
346
+ });
347
+ return promise;
348
+ }
349
+ onScrollStart() {
350
+ this.isScrolling = true;
351
+ this.ionScrollStart.emit({
352
+ isScrolling: true
353
+ });
354
+ if (this.watchDog) {
355
+ clearInterval(this.watchDog);
356
+ }
357
+ // watchdog
358
+ this.watchDog = setInterval(() => {
359
+ if (this.lastScroll < Date.now() - 120) {
360
+ this.onScrollEnd();
361
+ }
362
+ }, 100);
363
+ }
364
+ onScrollEnd() {
365
+ clearInterval(this.watchDog);
366
+ this.watchDog = null;
367
+ if (this.isScrolling) {
368
+ this.isScrolling = false;
369
+ this.ionScrollEnd.emit({
370
+ isScrolling: false
371
+ });
372
+ }
373
+ }
374
+ render() {
375
+ const { scrollX, scrollY } = this;
376
+ const mode = getIonMode$1(this);
377
+ const forceOverscroll = this.shouldForceOverscroll();
378
+ const transitionShadow = (mode === 'ios' && config.getBoolean('experimentalTransitionShadow', true));
379
+ this.resize();
380
+ return (h(Host, { class: Object.assign(Object.assign({}, createColorClasses$1(this.color)), { [mode]: true, 'content-sizing': hostContext('ion-popover', this.el), 'overscroll': forceOverscroll }), style: {
381
+ '--offset-top': `${this.cTop}px`,
382
+ '--offset-bottom': `${this.cBottom}px`,
383
+ } }, h("div", { id: "background-content", part: "background" }), h("main", { class: {
384
+ 'inner-scroll': true,
385
+ 'scroll-x': scrollX,
386
+ 'scroll-y': scrollY,
387
+ 'overscroll': (scrollX || scrollY) && forceOverscroll
388
+ }, ref: el => this.scrollEl = el, onScroll: (this.scrollEvents) ? ev => this.onScroll(ev) : undefined, part: "scroll" }, h("slot", null)), transitionShadow ? (h("div", { class: "transition-effect" }, h("div", { class: "transition-cover" }), h("div", { class: "transition-shadow" }))) : null, h("slot", { name: "fixed" })));
389
+ }
390
+ get el() { return getElement(this); }
391
+ };
392
+ const getParentElement = (el) => {
393
+ if (el.parentElement) {
394
+ // normal element with a parent element
395
+ return el.parentElement;
396
+ }
397
+ if (el.parentNode && el.parentNode.host) {
398
+ // shadow dom's document fragment
399
+ return el.parentNode.host;
400
+ }
401
+ return null;
402
+ };
403
+ const getPageElement = (el) => {
404
+ const tabs = el.closest('ion-tabs');
405
+ if (tabs) {
406
+ return tabs;
407
+ }
408
+ const page = el.closest('ion-app,ion-page,.ion-page,page-inner');
409
+ if (page) {
410
+ return page;
411
+ }
412
+ return getParentElement(el);
413
+ };
414
+ // ******** DOM READ ****************
415
+ const updateScrollDetail = (detail, el, timestamp, shouldStart) => {
416
+ const prevX = detail.currentX;
417
+ const prevY = detail.currentY;
418
+ const prevT = detail.currentTime;
419
+ const currentX = el.scrollLeft;
420
+ const currentY = el.scrollTop;
421
+ const timeDelta = timestamp - prevT;
422
+ if (shouldStart) {
423
+ // remember the start positions
424
+ detail.startTime = timestamp;
425
+ detail.startX = currentX;
426
+ detail.startY = currentY;
427
+ detail.velocityX = detail.velocityY = 0;
428
+ }
429
+ detail.currentTime = timestamp;
430
+ detail.currentX = detail.scrollLeft = currentX;
431
+ detail.currentY = detail.scrollTop = currentY;
432
+ detail.deltaX = currentX - detail.startX;
433
+ detail.deltaY = currentY - detail.startY;
434
+ if (timeDelta > 0 && timeDelta < 100) {
435
+ const velocityX = (currentX - prevX) / timeDelta;
436
+ const velocityY = (currentY - prevY) / timeDelta;
437
+ detail.velocityX = velocityX * 0.7 + detail.velocityX * 0.3;
438
+ detail.velocityY = velocityY * 0.7 + detail.velocityY * 0.3;
439
+ }
440
+ };
441
+ Content.style = contentCss;
442
+
443
+ const TRANSITION = 'all 0.2s ease-in-out';
444
+ const cloneElement = (tagName) => {
445
+ const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
446
+ if (getCachedEl !== null) {
447
+ return getCachedEl;
448
+ }
449
+ const clonedEl = document.createElement(tagName);
450
+ clonedEl.classList.add('ion-cloned-element');
451
+ clonedEl.style.setProperty('display', 'none');
452
+ document.body.appendChild(clonedEl);
453
+ return clonedEl;
454
+ };
455
+ const createHeaderIndex = (headerEl) => {
456
+ if (!headerEl) {
457
+ return;
458
+ }
459
+ const toolbars = headerEl.querySelectorAll('ion-toolbar');
460
+ return {
461
+ el: headerEl,
462
+ toolbars: Array.from(toolbars).map((toolbar) => {
463
+ const ionTitleEl = toolbar.querySelector('ion-title');
464
+ return {
465
+ el: toolbar,
466
+ background: toolbar.shadowRoot.querySelector('.toolbar-background'),
467
+ ionTitleEl,
468
+ innerTitleEl: (ionTitleEl) ? ionTitleEl.shadowRoot.querySelector('.toolbar-title') : null,
469
+ ionButtonsEl: Array.from(toolbar.querySelectorAll('ion-buttons')) || []
470
+ };
471
+ }) || []
472
+ };
473
+ };
474
+ const handleContentScroll = (scrollEl, scrollHeaderIndex, contentEl) => {
475
+ readTask(() => {
476
+ const scrollTop = scrollEl.scrollTop;
477
+ const scale = clamp(1, 1 + (-scrollTop / 500), 1.1);
478
+ // Native refresher should not cause titles to scale
479
+ const nativeRefresher = contentEl.querySelector('ion-refresher.refresher-native');
480
+ if (nativeRefresher === null) {
481
+ writeTask(() => {
482
+ scaleLargeTitles(scrollHeaderIndex.toolbars, scale);
483
+ });
484
+ }
485
+ });
486
+ };
487
+ const setToolbarBackgroundOpacity = (toolbar, opacity) => {
488
+ if (opacity === undefined) {
489
+ toolbar.background.style.removeProperty('--opacity');
490
+ }
491
+ else {
492
+ toolbar.background.style.setProperty('--opacity', opacity.toString());
493
+ }
494
+ };
495
+ const handleToolbarBorderIntersection = (ev, mainHeaderIndex) => {
496
+ if (!ev[0].isIntersecting) {
497
+ return;
498
+ }
499
+ /**
500
+ * There is a bug in Safari where overflow scrolling on a non-body element
501
+ * does not always reset the scrollTop position to 0 when letting go. It will
502
+ * set to 1 once the rubber band effect has ended. This causes the background to
503
+ * appear slightly on certain app setups.
504
+ */
505
+ const scale = (ev[0].intersectionRatio > 0.9) ? 0 : ((1 - ev[0].intersectionRatio) * 100) / 75;
506
+ mainHeaderIndex.toolbars.forEach(toolbar => {
507
+ setToolbarBackgroundOpacity(toolbar, (scale === 1) ? undefined : scale);
508
+ });
509
+ };
510
+ /**
511
+ * If toolbars are intersecting, hide the scrollable toolbar content
512
+ * and show the primary toolbar content. If the toolbars are not intersecting,
513
+ * hide the primary toolbar content and show the scrollable toolbar content
514
+ */
515
+ const handleToolbarIntersection = (ev, mainHeaderIndex, scrollHeaderIndex) => {
516
+ writeTask(() => {
517
+ handleToolbarBorderIntersection(ev, mainHeaderIndex);
518
+ const event = ev[0];
519
+ const intersection = event.intersectionRect;
520
+ const intersectionArea = intersection.width * intersection.height;
521
+ const rootArea = event.rootBounds.width * event.rootBounds.height;
522
+ const isPageHidden = intersectionArea === 0 && rootArea === 0;
523
+ const leftDiff = Math.abs(intersection.left - event.boundingClientRect.left);
524
+ const rightDiff = Math.abs(intersection.right - event.boundingClientRect.right);
525
+ const isPageTransitioning = intersectionArea > 0 && (leftDiff >= 5 || rightDiff >= 5);
526
+ if (isPageHidden || isPageTransitioning) {
527
+ return;
528
+ }
529
+ if (event.isIntersecting) {
530
+ setHeaderActive(mainHeaderIndex, false);
531
+ setHeaderActive(scrollHeaderIndex);
532
+ }
533
+ else {
534
+ /**
535
+ * There is a bug with IntersectionObserver on Safari
536
+ * where `event.isIntersecting === false` when cancelling
537
+ * a swipe to go back gesture. Checking the intersection
538
+ * x, y, width, and height provides a workaround. This bug
539
+ * does not happen when using Safari + Web Animations,
540
+ * only Safari + CSS Animations.
541
+ */
542
+ const hasValidIntersection = (intersection.x === 0 && intersection.y === 0) || (intersection.width !== 0 && intersection.height !== 0);
543
+ if (hasValidIntersection) {
544
+ setHeaderActive(mainHeaderIndex);
545
+ setHeaderActive(scrollHeaderIndex, false);
546
+ setToolbarBackgroundOpacity(mainHeaderIndex.toolbars[0]);
547
+ }
548
+ }
549
+ });
550
+ };
551
+ const setHeaderActive = (headerIndex, active = true) => {
552
+ if (active) {
553
+ headerIndex.el.classList.remove('header-collapse-condense-inactive');
554
+ }
555
+ else {
556
+ headerIndex.el.classList.add('header-collapse-condense-inactive');
557
+ }
558
+ };
559
+ const scaleLargeTitles = (toolbars = [], scale = 1, transition = false) => {
560
+ toolbars.forEach(toolbar => {
561
+ const ionTitle = toolbar.ionTitleEl;
562
+ const titleDiv = toolbar.innerTitleEl;
563
+ if (!ionTitle || ionTitle.size !== 'large') {
564
+ return;
565
+ }
566
+ titleDiv.style.transformOrigin = 'left center';
567
+ titleDiv.style.transition = (transition) ? TRANSITION : '';
568
+ titleDiv.style.transform = `scale3d(${scale}, ${scale}, 1)`;
569
+ });
570
+ };
571
+
572
+ const headerIosCss = "ion-header{display:block;position:relative;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports (backdrop-filter: blur(0)){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:7px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}";
573
+
574
+ const headerMdCss = "ion-header{display:block;position:relative;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md::after{left:0;bottom:-5px;background-position:left 0 top -2px;position:absolute;width:100%;height:5px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAHBAMAAADzDtBxAAAAD1BMVEUAAAAAAAAAAAAAAAAAAABPDueNAAAABXRSTlMUCS0gBIh/TXEAAAAaSURBVAjXYxCEAgY4UIICBmMogMsgFLtAAQCNSwXZKOdPxgAAAABJRU5ErkJggg==);background-repeat:repeat-x;content:\"\"}[dir=rtl] .header-md::after,:host-context([dir=rtl]) .header-md::after{left:unset;right:unset;right:0}[dir=rtl] .header-md::after,:host-context([dir=rtl]) .header-md::after{background-position:right 0 top -2px}.header-collapse-condense{display:none}.header-md.ion-no-border::after{display:none}";
575
+
576
+ const Header = class {
577
+ constructor(hostRef) {
578
+ registerInstance(this, hostRef);
579
+ this.collapsibleHeaderInitialized = false;
580
+ /**
581
+ * If `true`, the header will be translucent.
582
+ * Only applies when the mode is `"ios"` and the device supports
583
+ * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
584
+ *
585
+ * Note: In order to scroll content behind the header, the `fullscreen`
586
+ * attribute needs to be set on the content.
587
+ */
588
+ this.translucent = false;
589
+ }
590
+ async componentDidLoad() {
591
+ await this.checkCollapsibleHeader();
592
+ }
593
+ async componentDidUpdate() {
594
+ await this.checkCollapsibleHeader();
595
+ }
596
+ componentDidUnload() {
597
+ this.destroyCollapsibleHeader();
598
+ }
599
+ async checkCollapsibleHeader() {
600
+ // Determine if the header can collapse
601
+ const hasCollapse = this.collapse === 'condense';
602
+ const canCollapse = (hasCollapse && getIonMode$1(this) === 'ios') ? hasCollapse : false;
603
+ if (!canCollapse && this.collapsibleHeaderInitialized) {
604
+ this.destroyCollapsibleHeader();
605
+ }
606
+ else if (canCollapse && !this.collapsibleHeaderInitialized) {
607
+ const pageEl = this.el.closest('ion-app,ion-page,.ion-page,page-inner');
608
+ const contentEl = (pageEl) ? pageEl.querySelector('ion-content') : null;
609
+ await this.setupCollapsibleHeader(contentEl, pageEl);
610
+ }
611
+ }
612
+ destroyCollapsibleHeader() {
613
+ if (this.intersectionObserver) {
614
+ this.intersectionObserver.disconnect();
615
+ this.intersectionObserver = undefined;
616
+ }
617
+ if (this.scrollEl && this.contentScrollCallback) {
618
+ this.scrollEl.removeEventListener('scroll', this.contentScrollCallback);
619
+ this.contentScrollCallback = undefined;
620
+ }
621
+ if (this.collapsibleMainHeader) {
622
+ this.collapsibleMainHeader.classList.remove('header-collapse-main');
623
+ this.collapsibleMainHeader = undefined;
624
+ }
625
+ }
626
+ async setupCollapsibleHeader(contentEl, pageEl) {
627
+ if (!contentEl || !pageEl) {
628
+ console.error('ion-header requires a content to collapse, make sure there is an ion-content.');
629
+ return;
630
+ }
631
+ this.scrollEl = await contentEl.getScrollElement();
632
+ const headers = pageEl.querySelectorAll('ion-header');
633
+ this.collapsibleMainHeader = Array.from(headers).find((header) => header.collapse !== 'condense');
634
+ if (!this.collapsibleMainHeader) {
635
+ return;
636
+ }
637
+ const mainHeaderIndex = createHeaderIndex(this.collapsibleMainHeader);
638
+ const scrollHeaderIndex = createHeaderIndex(this.el);
639
+ if (!mainHeaderIndex || !scrollHeaderIndex) {
640
+ return;
641
+ }
642
+ setHeaderActive(mainHeaderIndex, false);
643
+ mainHeaderIndex.toolbars.forEach(toolbar => {
644
+ setToolbarBackgroundOpacity(toolbar, 0);
645
+ });
646
+ /**
647
+ * Handle interaction between toolbar collapse and
648
+ * showing/hiding content in the primary ion-header
649
+ * as well as progressively showing/hiding the main header
650
+ * border as the top-most toolbar collapses or expands.
651
+ */
652
+ const toolbarIntersection = (ev) => { handleToolbarIntersection(ev, mainHeaderIndex, scrollHeaderIndex); };
653
+ this.intersectionObserver = new IntersectionObserver(toolbarIntersection, { root: contentEl, threshold: [0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] });
654
+ this.intersectionObserver.observe(scrollHeaderIndex.toolbars[scrollHeaderIndex.toolbars.length - 1].el);
655
+ /**
656
+ * Handle scaling of large iOS titles and
657
+ * showing/hiding border on last toolbar
658
+ * in primary header
659
+ */
660
+ this.contentScrollCallback = () => { handleContentScroll(this.scrollEl, scrollHeaderIndex, contentEl); };
661
+ this.scrollEl.addEventListener('scroll', this.contentScrollCallback);
662
+ writeTask(() => {
663
+ const title = cloneElement('ion-title');
664
+ title.size = 'large';
665
+ cloneElement('ion-back-button');
666
+ if (this.collapsibleMainHeader !== undefined) {
667
+ this.collapsibleMainHeader.classList.add('header-collapse-main');
668
+ }
669
+ });
670
+ this.collapsibleHeaderInitialized = true;
671
+ }
672
+ render() {
673
+ const { translucent } = this;
674
+ const mode = getIonMode$1(this);
675
+ const collapse = this.collapse || 'none';
676
+ return (h(Host, { role: "banner", class: {
677
+ [mode]: true,
678
+ // Used internally for styling
679
+ [`header-${mode}`]: true,
680
+ [`header-translucent`]: this.translucent,
681
+ [`header-collapse-${collapse}`]: true,
682
+ [`header-translucent-${mode}`]: this.translucent,
683
+ } }, mode === 'ios' && translucent &&
684
+ h("div", { class: "header-background" }), h("slot", null)));
685
+ }
686
+ get el() { return getElement(this); }
687
+ };
688
+ Header.style = {
689
+ ios: headerIosCss,
690
+ md: headerMdCss
691
+ };
692
+
693
+ let CACHED_MAP;
694
+ const getIconMap = () => {
695
+ if (typeof window === 'undefined') {
696
+ return new Map();
697
+ }
698
+ else {
699
+ if (!CACHED_MAP) {
700
+ const win = window;
701
+ win.Ionicons = win.Ionicons || {};
702
+ CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();
703
+ }
704
+ return CACHED_MAP;
705
+ }
706
+ };
707
+ const getUrl = (i) => {
708
+ let url = getSrc(i.src);
709
+ if (url) {
710
+ return url;
711
+ }
712
+ url = getName(i.name, i.icon, i.mode, i.ios, i.md);
713
+ if (url) {
714
+ return getNamedUrl(url);
715
+ }
716
+ if (i.icon) {
717
+ url = getSrc(i.icon);
718
+ if (url) {
719
+ return url;
720
+ }
721
+ url = getSrc(i.icon[i.mode]);
722
+ if (url) {
723
+ return url;
724
+ }
725
+ }
726
+ return null;
727
+ };
728
+ const getNamedUrl = (iconName) => {
729
+ const url = getIconMap().get(iconName);
730
+ if (url) {
731
+ return url;
732
+ }
733
+ return getAssetPath(`svg/${iconName}.svg`);
734
+ };
735
+ const getName = (iconName, icon, mode, ios, md) => {
736
+ // default to "md" if somehow the mode wasn't set
737
+ mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';
738
+ // if an icon was passed in using the ios or md attributes
739
+ // set the iconName to whatever was passed in
740
+ if (ios && mode === 'ios') {
741
+ iconName = toLower(ios);
742
+ }
743
+ else if (md && mode === 'md') {
744
+ iconName = toLower(md);
745
+ }
746
+ else {
747
+ if (!iconName && icon && !isSrc(icon)) {
748
+ iconName = icon;
749
+ }
750
+ if (isStr(iconName)) {
751
+ iconName = toLower(iconName);
752
+ }
753
+ }
754
+ if (!isStr(iconName) || iconName.trim() === '') {
755
+ return null;
756
+ }
757
+ // only allow alpha characters and dash
758
+ const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
759
+ if (invalidChars !== '') {
760
+ return null;
761
+ }
762
+ return iconName;
763
+ };
764
+ const getSrc = (src) => {
765
+ if (isStr(src)) {
766
+ src = src.trim();
767
+ if (isSrc(src)) {
768
+ return src;
769
+ }
770
+ }
771
+ return null;
772
+ };
773
+ const isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
774
+ const isStr = (val) => typeof val === 'string';
775
+ const toLower = (val) => val.toLowerCase();
776
+
777
+ const validateContent = (svgContent) => {
778
+ if (svgContent && typeof document !== 'undefined') {
779
+ const div = document.createElement('div');
780
+ div.innerHTML = svgContent;
781
+ // setup this way to ensure it works on our buddy IE
782
+ for (let i = div.childNodes.length - 1; i >= 0; i--) {
783
+ if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {
784
+ div.removeChild(div.childNodes[i]);
785
+ }
786
+ }
787
+ // must only have 1 root element
788
+ const svgElm = div.firstElementChild;
789
+ if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
790
+ const svgClass = svgElm.getAttribute('class') || '';
791
+ svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());
792
+ // root element must be an svg
793
+ // lets double check we've got valid elements
794
+ // do not allow scripts
795
+ if (isValid(svgElm)) {
796
+ return div.innerHTML;
797
+ }
798
+ }
799
+ }
800
+ return '';
801
+ };
802
+ const isValid = (elm) => {
803
+ if (elm.nodeType === 1) {
804
+ if (elm.nodeName.toLowerCase() === 'script') {
805
+ return false;
806
+ }
807
+ for (let i = 0; i < elm.attributes.length; i++) {
808
+ const val = elm.attributes[i].value;
809
+ if (isStr(val) && val.toLowerCase().indexOf('on') === 0) {
810
+ return false;
811
+ }
812
+ }
813
+ for (let i = 0; i < elm.childNodes.length; i++) {
814
+ if (!isValid(elm.childNodes[i])) {
815
+ return false;
816
+ }
817
+ }
818
+ }
819
+ return true;
820
+ };
821
+
822
+ const ioniconContent = new Map();
823
+ const requests = new Map();
824
+ const getSvgContent = (url) => {
825
+ // see if we already have a request for this url
826
+ let req = requests.get(url);
827
+ if (!req) {
828
+ if (typeof fetch !== 'undefined') {
829
+ // we don't already have a request
830
+ req = fetch(url).then(rsp => {
831
+ if (rsp.ok) {
832
+ return rsp.text().then(svgContent => {
833
+ ioniconContent.set(url, validateContent(svgContent));
834
+ });
835
+ }
836
+ ioniconContent.set(url, '');
837
+ });
838
+ // cache for the same requests
839
+ requests.set(url, req);
840
+ }
841
+ else {
842
+ // set to empty for ssr scenarios and resolve promise
843
+ ioniconContent.set(url, '');
844
+ return Promise.resolve();
845
+ }
846
+ }
847
+ return req;
848
+ };
849
+
850
+ const iconCss = ":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:32px;stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}:host(.flip-rtl) .icon-inner{transform:scaleX(-1)}:host(.icon-small){font-size:18px !important}:host(.icon-large){font-size:32px !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";
851
+
852
+ const Icon = class {
853
+ constructor(hostRef) {
854
+ registerInstance(this, hostRef);
855
+ this.isVisible = false;
856
+ /**
857
+ * The mode determines which platform styles to use.
858
+ */
859
+ this.mode = getIonMode();
860
+ /**
861
+ * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
862
+ * Default, `false`.
863
+ */
864
+ this.lazy = false;
865
+ }
866
+ connectedCallback() {
867
+ // purposely do not return the promise here because loading
868
+ // the svg file should not hold up loading the app
869
+ // only load the svg if it's visible
870
+ this.waitUntilVisible(this.el, '50px', () => {
871
+ this.isVisible = true;
872
+ this.loadIcon();
873
+ });
874
+ }
875
+ disconnectedCallback() {
876
+ if (this.io) {
877
+ this.io.disconnect();
878
+ this.io = undefined;
879
+ }
880
+ }
881
+ waitUntilVisible(el, rootMargin, cb) {
882
+ if (this.lazy && typeof window !== 'undefined' && window.IntersectionObserver) {
883
+ const io = this.io = new window.IntersectionObserver((data) => {
884
+ if (data[0].isIntersecting) {
885
+ io.disconnect();
886
+ this.io = undefined;
887
+ cb();
888
+ }
889
+ }, { rootMargin });
890
+ io.observe(el);
891
+ }
892
+ else {
893
+ // browser doesn't support IntersectionObserver
894
+ // so just fallback to always show it
895
+ cb();
896
+ }
897
+ }
898
+ loadIcon() {
899
+ if (this.isVisible) {
900
+ const url = getUrl(this);
901
+ if (url) {
902
+ if (ioniconContent.has(url)) {
903
+ // sync if it's already loaded
904
+ this.svgContent = ioniconContent.get(url);
905
+ }
906
+ else {
907
+ // async if it hasn't been loaded
908
+ getSvgContent(url).then(() => this.svgContent = ioniconContent.get(url));
909
+ }
910
+ }
911
+ }
912
+ if (!this.ariaLabel) {
913
+ const label = getName(this.name, this.icon, this.mode, this.ios, this.md);
914
+ // user did not provide a label
915
+ // come up with the label based on the icon name
916
+ if (label) {
917
+ this.ariaLabel = label.replace(/\-/g, ' ');
918
+ }
919
+ }
920
+ }
921
+ render() {
922
+ const mode = this.mode || 'md';
923
+ const flipRtl = this.flipRtl || (this.ariaLabel && (this.ariaLabel.indexOf('arrow') > -1 || this.ariaLabel.indexOf('chevron') > -1) && this.flipRtl !== false);
924
+ return (h(Host, { role: "img", class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), { [`icon-${this.size}`]: !!this.size, 'flip-rtl': !!flipRtl && this.el.ownerDocument.dir === 'rtl' }) }, ((this.svgContent)
925
+ ? h("div", { class: "icon-inner", innerHTML: this.svgContent })
926
+ : h("div", { class: "icon-inner" }))));
927
+ }
928
+ static get assetsDirs() { return ["svg"]; }
929
+ get el() { return getElement(this); }
930
+ static get watchers() { return {
931
+ "name": ["loadIcon"],
932
+ "src": ["loadIcon"],
933
+ "icon": ["loadIcon"]
934
+ }; }
935
+ };
936
+ const getIonMode = () => (typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';
937
+ const createColorClasses = (color) => {
938
+ return (color) ? {
939
+ 'ion-color': true,
940
+ [`ion-color-${color}`]: true
941
+ } : null;
942
+ };
943
+ Icon.style = iconCss;
944
+
945
+ const itemIosCss = ":host{--border-radius:0px;--border-width:0px;--border-style:solid;--padding-top:0px;--padding-bottom:0px;--padding-end:0px;--padding-start:0px;--inner-border-width:0px;--inner-padding-top:0px;--inner-padding-bottom:0px;--inner-padding-start:0px;--inner-padding-end:0px;--inner-box-shadow:none;--show-full-highlight:0;--show-inset-highlight:0;--detail-icon-color:initial;--detail-icon-font-size:20px;--detail-icon-opacity:0.25;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:initial;text-decoration:none;box-sizing:border-box;overflow:hidden}:host(.ion-color) .item-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.ion-color) .item-native,:host(.ion-color) .item-inner{border-color:var(--ion-color-shade)}:host(.ion-activated) .item-native{color:var(--color-activated)}:host(.ion-activated) .item-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-color.ion-activated) .item-native{color:var(--ion-color-contrast)}:host(.ion-focused) .item-native{color:var(--color-focused)}:host(.ion-focused) .item-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}:host(.ion-color.ion-focused) .item-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-focused) .item-native::after{background:var(--ion-color-contrast)}@media (any-hover: hover){:host(.ion-activatable:hover) .item-native{color:var(--color-hover)}:host(.ion-activatable:hover) .item-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.ion-color.ion-activatable:hover) .item-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-activatable:hover) .item-native::after{background:var(--ion-color-contrast)}}:host(.item-interactive-disabled:not(.item-multiple-inputs)){cursor:default;pointer-events:none}:host(.item-disabled){cursor:default;opacity:0.3;pointer-events:none}.item-native{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:calc(var(--padding-start) + var(--ion-safe-area-left, 0px));padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:flex;position:relative;align-items:center;justify-content:space-between;width:100%;min-height:var(--min-height);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);overflow:inherit;box-sizing:border-box;z-index:1}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.item-native{padding-left:unset;padding-right:unset;-webkit-padding-start:calc(var(--padding-start) + var(--ion-safe-area-left, 0px));padding-inline-start:calc(var(--padding-start) + var(--ion-safe-area-left, 0px));-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.item-native::-moz-focus-inner{border:0}.item-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;transition:var(--transition);z-index:-1}button,a{cursor:pointer;user-select:none;-webkit-user-drag:none}.item-inner{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--inner-padding-start);padding-right:calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));padding-top:var(--inner-padding-top);padding-bottom:var(--inner-padding-bottom);display:flex;position:relative;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;min-height:inherit;border-width:var(--inner-border-width);border-style:var(--border-style);border-color:var(--border-color);box-shadow:var(--inner-box-shadow);overflow:inherit;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.item-inner{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--inner-padding-start);padding-inline-start:var(--inner-padding-start);-webkit-padding-end:calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));padding-inline-end:calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end))}}.item-detail-icon{color:var(--detail-icon-color);font-size:var(--detail-icon-font-size);opacity:var(--detail-icon-opacity)}::slotted(ion-icon){font-size:1.6em}::slotted(ion-button){--margin-top:0;--margin-bottom:0;--margin-start:0;--margin-end:0;z-index:1}::slotted(ion-label){flex:1}:host([vertical-align-top]),:host(.item-input){align-items:flex-start}.input-wrapper{display:flex;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box}:host(.item-label-stacked) .item-native,:host(.item-label-floating) .item-native{align-items:start}:host(.item-label-stacked) .input-wrapper,:host(.item-label-floating) .input-wrapper{flex:1;flex-direction:column}.item-highlight,.item-inner-highlight{left:0;right:0;bottom:0;position:absolute;background:var(--highlight-background);z-index:1}.item-highlight{height:var(--full-highlight-height)}.item-inner-highlight{height:var(--inset-highlight-height)}:host(.item-interactive.item-has-focus),:host(.item-interactive.ion-touched.ion-invalid){--full-highlight-height:calc(var(--highlight-height) * var(--show-full-highlight));--inset-highlight-height:calc(var(--highlight-height) * var(--show-inset-highlight))}:host(.item-interactive.item-has-focus){--highlight-background:var(--highlight-color-focused)}:host(.item-interactive.ion-valid){--highlight-background:var(--highlight-color-valid)}:host(.item-interactive.ion-invalid){--highlight-background:var(--highlight-color-invalid)}:host(.item-label-stacked) ::slotted(ion-select),:host(.item-label-floating) ::slotted(ion-select){--padding-start:0;align-self:stretch;width:100%;max-width:100%}:host(.item-label-stacked) ::slotted(ion-datetime),:host(.item-label-floating) ::slotted(ion-datetime){--padding-start:0;width:100%}:host(.item-multiple-inputs) ::slotted(ion-checkbox),:host(.item-multiple-inputs) ::slotted(ion-datetime),:host(.item-multiple-inputs) ::slotted(ion-radio),:host(.item-multiple-inputs) ::slotted(ion-select){position:relative}:host(.item-textarea){align-items:stretch}::slotted(ion-reorder[slot]){margin-top:0;margin-bottom:0}ion-ripple-effect{color:var(--ripple-color)}:host{--min-height:44px;--transition:background-color 200ms linear, opacity 200ms linear;--padding-start:20px;--inner-padding-end:10px;--inner-border-width:0px 0px 0.55px 0px;--background:var(--ion-item-background, var(--ion-background-color, #fff));--background-activated:#000;--background-focused:#000;--background-hover:currentColor;--background-activated-opacity:.12;--background-focused-opacity:.15;--background-hover-opacity:.04;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-250, #c8c7cc)));--color:var(--ion-item-color, var(--ion-text-color, #000));--highlight-height:0;--highlight-color-focused:var(--ion-color-primary, #3880ff);--highlight-color-valid:var(--ion-color-success, #2dd36f);--highlight-color-invalid:var(--ion-color-danger, #eb445a);font-size:17px}:host(.ion-activated){--transition:none}:host(.ion-color.ion-focused) .item-native::after{background:#000;opacity:0.15}:host(.ion-color.ion-activated) .item-native::after{background:#000;opacity:0.12}:host(.item-interactive){--show-full-highlight:0;--show-inset-highlight:1}:host(.item-lines-full){--border-width:0px 0px 0.55px 0px;--show-full-highlight:1;--show-inset-highlight:0}:host(.item-lines-inset){--inner-border-width:0px 0px 0.55px 0px;--show-full-highlight:0;--show-inset-highlight:1}:host(.item-lines-inset),:host(.item-lines-none){--border-width:0px;--show-full-highlight:0}:host(.item-lines-full),:host(.item-lines-none){--inner-border-width:0px;--show-inset-highlight:0}::slotted([slot=start]){margin-left:0;margin-right:20px;margin-top:2px;margin-bottom:2px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:20px;margin-inline-end:20px}}::slotted([slot=end]){margin-left:10px;margin-right:10px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}::slotted(ion-icon[slot=start]),::slotted(ion-icon[slot=end]){margin-top:7px;margin-bottom:7px}::slotted(ion-toggle[slot=start]),::slotted(ion-toggle[slot=end]){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host(.item-label-stacked) ::slotted([slot=end]),:host(.item-label-floating) ::slotted([slot=end]){margin-top:7px;margin-bottom:7px}::slotted(.button-small){--padding-top:0px;--padding-bottom:0px;--padding-start:.5em;--padding-end:.5em;height:24px;font-size:13px}::slotted(ion-avatar){width:36px;height:36px}::slotted(ion-thumbnail){width:56px;height:56px}::slotted(ion-avatar[slot=end]),::slotted(ion-thumbnail[slot=end]){margin-left:10px;margin-right:10px;margin-top:10px;margin-bottom:10px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar[slot=end]),::slotted(ion-thumbnail[slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:10px;margin-inline-start:10px;-webkit-margin-end:10px;margin-inline-end:10px}}:host(.item-radio) ::slotted(ion-label),:host(.item-toggle) ::slotted(ion-label){margin-left:0px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.item-radio) ::slotted(ion-label),:host(.item-toggle) ::slotted(ion-label){margin-left:unset;-webkit-margin-start:0px;margin-inline-start:0px}}::slotted(ion-label){margin-left:0;margin-right:8px;margin-top:10px;margin-bottom:10px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-label){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px}}:host(.item-label-floating),:host(.item-label-stacked){--min-height:68px}:host(.item-label-stacked) ::slotted(ion-select),:host(.item-label-floating) ::slotted(ion-select){--padding-top:8px;--padding-bottom:8px;--padding-start:0px}";
946
+
947
+ const itemMdCss = ":host{--border-radius:0px;--border-width:0px;--border-style:solid;--padding-top:0px;--padding-bottom:0px;--padding-end:0px;--padding-start:0px;--inner-border-width:0px;--inner-padding-top:0px;--inner-padding-bottom:0px;--inner-padding-start:0px;--inner-padding-end:0px;--inner-box-shadow:none;--show-full-highlight:0;--show-inset-highlight:0;--detail-icon-color:initial;--detail-icon-font-size:20px;--detail-icon-opacity:0.25;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--ripple-color:currentColor;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:block;position:relative;outline:none;color:var(--color);font-family:var(--ion-font-family, inherit);text-align:initial;text-decoration:none;box-sizing:border-box;overflow:hidden}:host(.ion-color) .item-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.ion-color) .item-native,:host(.ion-color) .item-inner{border-color:var(--ion-color-shade)}:host(.ion-activated) .item-native{color:var(--color-activated)}:host(.ion-activated) .item-native::after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-color.ion-activated) .item-native{color:var(--ion-color-contrast)}:host(.ion-focused) .item-native{color:var(--color-focused)}:host(.ion-focused) .item-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}:host(.ion-color.ion-focused) .item-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-focused) .item-native::after{background:var(--ion-color-contrast)}@media (any-hover: hover){:host(.ion-activatable:hover) .item-native{color:var(--color-hover)}:host(.ion-activatable:hover) .item-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}:host(.ion-color.ion-activatable:hover) .item-native{color:var(--ion-color-contrast)}:host(.ion-color.ion-activatable:hover) .item-native::after{background:var(--ion-color-contrast)}}:host(.item-interactive-disabled:not(.item-multiple-inputs)){cursor:default;pointer-events:none}:host(.item-disabled){cursor:default;opacity:0.3;pointer-events:none}.item-native{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:calc(var(--padding-start) + var(--ion-safe-area-left, 0px));padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:flex;position:relative;align-items:center;justify-content:space-between;width:100%;min-height:var(--min-height);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);overflow:inherit;box-sizing:border-box;z-index:1}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.item-native{padding-left:unset;padding-right:unset;-webkit-padding-start:calc(var(--padding-start) + var(--ion-safe-area-left, 0px));padding-inline-start:calc(var(--padding-start) + var(--ion-safe-area-left, 0px));-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.item-native::-moz-focus-inner{border:0}.item-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0;transition:var(--transition);z-index:-1}button,a{cursor:pointer;user-select:none;-webkit-user-drag:none}.item-inner{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--inner-padding-start);padding-right:calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));padding-top:var(--inner-padding-top);padding-bottom:var(--inner-padding-bottom);display:flex;position:relative;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;min-height:inherit;border-width:var(--inner-border-width);border-style:var(--border-style);border-color:var(--border-color);box-shadow:var(--inner-box-shadow);overflow:inherit;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.item-inner{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--inner-padding-start);padding-inline-start:var(--inner-padding-start);-webkit-padding-end:calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end));padding-inline-end:calc(var(--ion-safe-area-right, 0px) + var(--inner-padding-end))}}.item-detail-icon{color:var(--detail-icon-color);font-size:var(--detail-icon-font-size);opacity:var(--detail-icon-opacity)}::slotted(ion-icon){font-size:1.6em}::slotted(ion-button){--margin-top:0;--margin-bottom:0;--margin-start:0;--margin-end:0;z-index:1}::slotted(ion-label){flex:1}:host([vertical-align-top]),:host(.item-input){align-items:flex-start}.input-wrapper{display:flex;flex:1;flex-direction:inherit;align-items:inherit;align-self:stretch;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box}:host(.item-label-stacked) .item-native,:host(.item-label-floating) .item-native{align-items:start}:host(.item-label-stacked) .input-wrapper,:host(.item-label-floating) .input-wrapper{flex:1;flex-direction:column}.item-highlight,.item-inner-highlight{left:0;right:0;bottom:0;position:absolute;background:var(--highlight-background);z-index:1}.item-highlight{height:var(--full-highlight-height)}.item-inner-highlight{height:var(--inset-highlight-height)}:host(.item-interactive.item-has-focus),:host(.item-interactive.ion-touched.ion-invalid){--full-highlight-height:calc(var(--highlight-height) * var(--show-full-highlight));--inset-highlight-height:calc(var(--highlight-height) * var(--show-inset-highlight))}:host(.item-interactive.item-has-focus){--highlight-background:var(--highlight-color-focused)}:host(.item-interactive.ion-valid){--highlight-background:var(--highlight-color-valid)}:host(.item-interactive.ion-invalid){--highlight-background:var(--highlight-color-invalid)}:host(.item-label-stacked) ::slotted(ion-select),:host(.item-label-floating) ::slotted(ion-select){--padding-start:0;align-self:stretch;width:100%;max-width:100%}:host(.item-label-stacked) ::slotted(ion-datetime),:host(.item-label-floating) ::slotted(ion-datetime){--padding-start:0;width:100%}:host(.item-multiple-inputs) ::slotted(ion-checkbox),:host(.item-multiple-inputs) ::slotted(ion-datetime),:host(.item-multiple-inputs) ::slotted(ion-radio),:host(.item-multiple-inputs) ::slotted(ion-select){position:relative}:host(.item-textarea){align-items:stretch}::slotted(ion-reorder[slot]){margin-top:0;margin-bottom:0}ion-ripple-effect{color:var(--ripple-color)}:host{--min-height:48px;--background:var(--ion-item-background, var(--ion-background-color, #fff));--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor;--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04;--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--color:var(--ion-item-color, var(--ion-text-color, #000));--transition:opacity 15ms linear, background-color 15ms linear;--padding-start:16px;--color:var(--ion-item-color, var(--ion-text-color, #000));--border-color:var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.13))));--inner-padding-end:16px;--inner-border-width:0 0 1px 0;--highlight-height:2px;--highlight-color-focused:var(--ion-color-primary, #3880ff);--highlight-color-valid:var(--ion-color-success, #2dd36f);--highlight-color-invalid:var(--ion-color-danger, #eb445a);font-size:16px;font-weight:normal;text-transform:none}:host(.ion-color.ion-activated) .item-native::after{background:transparent}:host(.item-interactive){--border-width:0 0 1px 0;--inner-border-width:0;--show-full-highlight:1;--show-inset-highlight:0}:host(.item-lines-full){--border-width:0 0 1px 0;--show-full-highlight:1;--show-inset-highlight:0}:host(.item-lines-inset){--inner-border-width:0 0 1px 0;--show-full-highlight:0;--show-inset-highlight:1}:host(.item-lines-inset),:host(.item-lines-none){--border-width:0;--show-full-highlight:0}:host(.item-lines-full),:host(.item-lines-none){--inner-border-width:0;--show-inset-highlight:0}:host(.item-multi-line) ::slotted([slot=start]),:host(.item-multi-line) ::slotted([slot=end]){margin-top:16px;margin-bottom:16px;align-self:flex-start}::slotted([slot=start]){margin-right:32px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=start]){margin-right:unset;-webkit-margin-end:32px;margin-inline-end:32px}}::slotted([slot=end]){margin-left:32px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted([slot=end]){margin-left:unset;-webkit-margin-start:32px;margin-inline-start:32px}}::slotted(ion-icon){color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.54);font-size:24px}:host(.ion-color) ::slotted(ion-icon){color:var(--ion-color-contrast)}::slotted(ion-icon[slot]){margin-top:12px;margin-bottom:12px}::slotted(ion-icon[slot=start]){margin-right:32px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=start]){margin-right:unset;-webkit-margin-end:32px;margin-inline-end:32px}}::slotted(ion-icon[slot=end]){margin-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-icon[slot=end]){margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}::slotted(ion-toggle[slot=start]),::slotted(ion-toggle[slot=end]){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}::slotted(ion-note){margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;align-self:flex-start;font-size:11px}::slotted(ion-note[slot]){padding-left:0;padding-right:0;padding-top:18px;padding-bottom:10px}::slotted(ion-note[slot=start]){padding-right:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-note[slot=start]){padding-right:unset;-webkit-padding-end:16px;padding-inline-end:16px}}::slotted(ion-note[slot=end]){padding-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-note[slot=end]){padding-left:unset;-webkit-padding-start:16px;padding-inline-start:16px}}::slotted(ion-avatar){width:40px;height:40px}::slotted(ion-thumbnail){width:56px;height:56px}::slotted(ion-avatar),::slotted(ion-thumbnail){margin-top:8px;margin-bottom:8px}::slotted(ion-avatar[slot=start]),::slotted(ion-thumbnail[slot=start]){margin-right:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar[slot=start]),::slotted(ion-thumbnail[slot=start]){margin-right:unset;-webkit-margin-end:16px;margin-inline-end:16px}}::slotted(ion-avatar[slot=end]),::slotted(ion-thumbnail[slot=end]){margin-left:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(ion-avatar[slot=end]),::slotted(ion-thumbnail[slot=end]){margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}::slotted(ion-label){margin-left:0;margin-right:0;margin-top:11px;margin-bottom:10px}:host(.item-label-stacked) ::slotted([slot=end]),:host(.item-label-floating) ::slotted([slot=end]){margin-top:7px;margin-bottom:7px}:host(.item-toggle) ::slotted(ion-label),:host(.item-radio) ::slotted(ion-label){margin-left:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.item-toggle) ::slotted(ion-label),:host(.item-radio) ::slotted(ion-label){margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}::slotted(.button-small){--padding-top:0;--padding-bottom:0;--padding-start:.6em;--padding-end:.6em;height:25px;font-size:12px}:host(.item-label-floating),:host(.item-label-stacked){--min-height:55px}:host(.item-label-stacked) ::slotted(ion-select),:host(.item-label-floating) ::slotted(ion-select){--padding-top:8px;--padding-bottom:8px;--padding-start:0}:host(.item-has-focus:not(.ion-color)) ::slotted(.label-stacked),:host(.item-has-focus:not(.ion-color)) ::slotted(.label-floating){color:var(--ion-color-primary, #3880ff)}";
948
+
949
+ const Item = class {
950
+ constructor(hostRef) {
951
+ registerInstance(this, hostRef);
952
+ this.itemStyles = new Map();
953
+ this.multipleInputs = false;
954
+ /**
955
+ * If `true`, a button tag will be rendered and the item will be tappable.
956
+ */
957
+ this.button = false;
958
+ /**
959
+ * The icon to use when `detail` is set to `true`.
960
+ */
961
+ this.detailIcon = 'chevron-forward';
962
+ /**
963
+ * If `true`, the user cannot interact with the item.
964
+ */
965
+ this.disabled = false;
966
+ /**
967
+ * When using a router, it specifies the transition direction when navigating to
968
+ * another page using `href`.
969
+ */
970
+ this.routerDirection = 'forward';
971
+ /**
972
+ * The type of the button. Only used when an `onclick` or `button` property is present.
973
+ */
974
+ this.type = 'button';
975
+ }
976
+ itemStyle(ev) {
977
+ ev.stopPropagation();
978
+ const tagName = ev.target.tagName;
979
+ const updatedStyles = ev.detail;
980
+ const newStyles = {};
981
+ const childStyles = this.itemStyles.get(tagName) || {};
982
+ let hasStyleChange = false;
983
+ Object.keys(updatedStyles).forEach(key => {
984
+ if (updatedStyles[key]) {
985
+ const itemKey = `item-${key}`;
986
+ if (!childStyles[itemKey]) {
987
+ hasStyleChange = true;
988
+ }
989
+ newStyles[itemKey] = true;
990
+ }
991
+ });
992
+ if (!hasStyleChange && Object.keys(newStyles).length !== Object.keys(childStyles).length) {
993
+ hasStyleChange = true;
994
+ }
995
+ if (hasStyleChange) {
996
+ this.itemStyles.set(tagName, newStyles);
997
+ forceUpdate(this);
998
+ }
999
+ }
1000
+ componentDidLoad() {
1001
+ // The following elements have a clickable cover that is relative to the entire item
1002
+ const covers = this.el.querySelectorAll('ion-checkbox, ion-datetime, ion-select, ion-radio');
1003
+ // The following elements can accept focus alongside the previous elements
1004
+ // therefore if these elements are also a child of item, we don't want the
1005
+ // input cover on top of those interfering with their clicks
1006
+ const inputs = this.el.querySelectorAll('ion-input, ion-range, ion-searchbar, ion-segment, ion-textarea, ion-toggle');
1007
+ // The following elements should also stay clickable when an input with cover is present
1008
+ const clickables = this.el.querySelectorAll('ion-anchor, ion-button, a, button');
1009
+ // Check for multiple inputs to change the position of the input cover to relative
1010
+ // for all of the covered inputs above
1011
+ this.multipleInputs = covers.length + inputs.length > 1
1012
+ || covers.length + clickables.length > 1
1013
+ || covers.length > 0 && this.isClickable();
1014
+ }
1015
+ // If the item contains an input including a checkbox, datetime, select, or radio
1016
+ // then the item will have a clickable input cover that covers the item
1017
+ // that should get the hover, focused and activated states UNLESS it has multiple
1018
+ // inputs, then those need to individually get each click
1019
+ hasCover() {
1020
+ const inputs = this.el.querySelectorAll('ion-checkbox, ion-datetime, ion-select, ion-radio');
1021
+ return inputs.length === 1 && !this.multipleInputs;
1022
+ }
1023
+ // If the item has an href or button property it will render a native
1024
+ // anchor or button that is clickable
1025
+ isClickable() {
1026
+ return (this.href !== undefined || this.button);
1027
+ }
1028
+ canActivate() {
1029
+ return (this.isClickable() || this.hasCover());
1030
+ }
1031
+ render() {
1032
+ const { detail, detailIcon, download, lines, disabled, href, rel, target, routerDirection } = this;
1033
+ const childStyles = {};
1034
+ const mode = getIonMode$1(this);
1035
+ const clickable = this.isClickable();
1036
+ const canActivate = this.canActivate();
1037
+ const TagType = clickable ? (href === undefined ? 'button' : 'a') : 'div';
1038
+ const attrs = (TagType === 'button')
1039
+ ? { type: this.type }
1040
+ : {
1041
+ download,
1042
+ href,
1043
+ rel,
1044
+ target
1045
+ };
1046
+ const showDetail = detail !== undefined ? detail : mode === 'ios' && clickable;
1047
+ this.itemStyles.forEach(value => {
1048
+ Object.assign(childStyles, value);
1049
+ });
1050
+ return (h(Host, { "aria-disabled": disabled ? 'true' : null, class: Object.assign(Object.assign(Object.assign({}, childStyles), createColorClasses$1(this.color)), { 'item': true, [mode]: true, [`item-lines-${lines}`]: lines !== undefined, 'item-disabled': disabled, 'in-list': hostContext('ion-list', this.el), 'item-multiple-inputs': this.multipleInputs, 'ion-activatable': canActivate, 'ion-focusable': true }) }, h(TagType, Object.assign({}, attrs, { class: "item-native", disabled: disabled, onClick: (ev) => openURL(href, ev, routerDirection) }), h("slot", { name: "start" }), h("div", { class: "item-inner" }, h("div", { class: "input-wrapper" }, h("slot", null)), h("slot", { name: "end" }), showDetail && h("ion-icon", { icon: detailIcon, lazy: false, class: "item-detail-icon", part: "detail-icon" }), h("div", { class: "item-inner-highlight" })), canActivate && mode === 'md' && h("ion-ripple-effect", null)), h("div", { class: "item-highlight" })));
1051
+ }
1052
+ get el() { return getElement(this); }
1053
+ };
1054
+ Item.style = {
1055
+ ios: itemIosCss,
1056
+ md: itemMdCss
1057
+ };
1058
+
1059
+ const labelIosCss = ".item.sc-ion-label-ios-h,.item .sc-ion-label-ios-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:border-box}.ion-color.sc-ion-label-ios-h{color:var(--ion-color-base)}.ion-text-wrap.sc-ion-label-ios-h,[text-wrap].sc-ion-label-ios-h{white-space:normal}.item-interactive-disabled.sc-ion-label-ios-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-ios-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-ios-h,.item-input .sc-ion-label-ios-h{flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-ios-h,.item-textarea .sc-ion-label-ios-h{align-self:baseline}.label-fixed.sc-ion-label-ios-h{flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-ios-h,.label-floating.sc-ion-label-ios-h{margin-bottom:0;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-ios-h{transition:none}.sc-ion-label-ios-s h1,.sc-ion-label-ios-s h2,.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-ios-h,[text-wrap].sc-ion-label-ios-h{font-size:14px;line-height:1.5}.label-stacked.sc-ion-label-ios-h{margin-bottom:4px;font-size:14px}.label-floating.sc-ion-label-ios-h{margin-bottom:0;transform:translate3d(0, 27px, 0);transform-origin:left top;transition:transform 150ms ease-in-out}[dir=rtl].sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl] .sc-ion-label-ios-h -no-combinator.label-floating.sc-ion-label-ios-h,[dir=rtl].label-floating.sc-ion-label-ios-h,[dir=rtl] .label-floating.sc-ion-label-ios-h{transform-origin:right top}.item-has-focus.label-floating.sc-ion-label-ios-h,.item-has-focus .label-floating.sc-ion-label-ios-h,.item-has-placeholder.label-floating.sc-ion-label-ios-h,.item-has-placeholder .label-floating.sc-ion-label-ios-h,.item-has-value.label-floating.sc-ion-label-ios-h,.item-has-value .label-floating.sc-ion-label-ios-h{transform:translate3d(0, 0, 0) scale(0.82)}.sc-ion-label-ios-s h1{margin-left:0;margin-right:0;margin-top:3px;margin-bottom:2px;font-size:22px;font-weight:normal}.sc-ion-label-ios-s h2{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:17px;font-weight:normal}.sc-ion-label-ios-s h3,.sc-ion-label-ios-s h4,.sc-ion-label-ios-s h5,.sc-ion-label-ios-s h6{margin-left:0;margin-right:0;margin-top:0;margin-bottom:3px;font-size:14px;font-weight:normal;line-height:normal}.sc-ion-label-ios-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:14px;line-height:normal;text-overflow:inherit;overflow:inherit}.sc-ion-label-ios-s>p{color:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.4)}.sc-ion-label-ios-h.ion-color.sc-ion-label-ios-s>p,.ion-color .sc-ion-label-ios-h.sc-ion-label-ios-s>p{color:inherit}.sc-ion-label-ios-s h2:last-child,.sc-ion-label-ios-s h3:last-child,.sc-ion-label-ios-s h4:last-child,.sc-ion-label-ios-s h5:last-child,.sc-ion-label-ios-s h6:last-child,.sc-ion-label-ios-s p:last-child{margin-bottom:0}";
1060
+
1061
+ const labelMdCss = ".item.sc-ion-label-md-h,.item .sc-ion-label-md-h{--color:initial;display:block;color:var(--color);font-family:var(--ion-font-family, inherit);font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:border-box}.ion-color.sc-ion-label-md-h{color:var(--ion-color-base)}.ion-text-wrap.sc-ion-label-md-h,[text-wrap].sc-ion-label-md-h{white-space:normal}.item-interactive-disabled.sc-ion-label-md-h:not(.item-multiple-inputs),.item-interactive-disabled:not(.item-multiple-inputs) .sc-ion-label-md-h{cursor:default;opacity:0.3;pointer-events:none}.item-input.sc-ion-label-md-h,.item-input .sc-ion-label-md-h{flex:initial;max-width:200px;pointer-events:none}.item-textarea.sc-ion-label-md-h,.item-textarea .sc-ion-label-md-h{align-self:baseline}.label-fixed.sc-ion-label-md-h{flex:0 0 100px;width:100px;min-width:100px;max-width:200px}.label-stacked.sc-ion-label-md-h,.label-floating.sc-ion-label-md-h{margin-bottom:0;align-self:stretch;width:auto;max-width:100%}.label-no-animate.label-floating.sc-ion-label-md-h{transition:none}.sc-ion-label-md-s h1,.sc-ion-label-md-s h2,.sc-ion-label-md-s h3,.sc-ion-label-md-s h4,.sc-ion-label-md-s h5,.sc-ion-label-md-s h6{text-overflow:inherit;overflow:inherit}.ion-text-wrap.sc-ion-label-md-h,[text-wrap].sc-ion-label-md-h{line-height:1.5}.label-stacked.sc-ion-label-md-h{transform-origin:left top;transform:translate3d(0, 50%, 0) scale(0.75);transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl].sc-ion-label-md-h -no-combinator.label-stacked.sc-ion-label-md-h,[dir=rtl] .sc-ion-label-md-h -no-combinator.label-stacked.sc-ion-label-md-h,[dir=rtl].label-stacked.sc-ion-label-md-h,[dir=rtl] .label-stacked.sc-ion-label-md-h{transform-origin:right top}.label-floating.sc-ion-label-md-h{transform:translate3d(0, 96%, 0);transform-origin:left top;transition:color 150ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl].sc-ion-label-md-h -no-combinator.label-floating.sc-ion-label-md-h,[dir=rtl] .sc-ion-label-md-h -no-combinator.label-floating.sc-ion-label-md-h,[dir=rtl].label-floating.sc-ion-label-md-h,[dir=rtl] .label-floating.sc-ion-label-md-h{transform-origin:right top}.label-stacked.sc-ion-label-md-h,.label-floating.sc-ion-label-md-h{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.item-select.label-floating.sc-ion-label-md-h,.item-select .label-floating.sc-ion-label-md-h{transform:translate3d(0, 130%, 0)}.item-has-focus.label-floating.sc-ion-label-md-h,.item-has-focus .label-floating.sc-ion-label-md-h,.item-has-placeholder.label-floating.sc-ion-label-md-h,.item-has-placeholder .label-floating.sc-ion-label-md-h,.item-has-value.label-floating.sc-ion-label-md-h,.item-has-value .label-floating.sc-ion-label-md-h{transform:translate3d(0, 50%, 0) scale(0.75)}.item-has-focus.label-stacked.sc-ion-label-md-h,.item-has-focus .label-stacked.sc-ion-label-md-h,.item-has-focus.label-floating.sc-ion-label-md-h,.item-has-focus .label-floating.sc-ion-label-md-h{color:var(--ion-color-primary, #3880ff)}.sc-ion-label-md-s h1{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:24px;font-weight:normal}.sc-ion-label-md-s h2{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:16px;font-weight:normal}.sc-ion-label-md-s h3,.sc-ion-label-md-s h4,.sc-ion-label-md-s h5,.sc-ion-label-md-s h6{margin-left:0;margin-right:0;margin-top:2px;margin-bottom:2px;font-size:14px;font-weight:normal;line-height:normal}.sc-ion-label-md-s p{margin-left:0;margin-right:0;margin-top:0;margin-bottom:2px;font-size:14px;line-height:20px;text-overflow:inherit;overflow:inherit}.sc-ion-label-md-s>p{color:var(--ion-color-step-600, #666666)}.sc-ion-label-md-h.ion-color.sc-ion-label-md-s>p,.ion-color .sc-ion-label-md-h.sc-ion-label-md-s>p{color:inherit}";
1062
+
1063
+ const Label = class {
1064
+ constructor(hostRef) {
1065
+ registerInstance(this, hostRef);
1066
+ this.ionStyle = createEvent(this, "ionStyle", 7);
1067
+ this.noAnimate = false;
1068
+ }
1069
+ componentWillLoad() {
1070
+ this.noAnimate = (this.position === 'floating');
1071
+ this.emitStyle();
1072
+ }
1073
+ componentDidLoad() {
1074
+ if (this.noAnimate) {
1075
+ setTimeout(() => {
1076
+ this.noAnimate = false;
1077
+ }, 1000);
1078
+ }
1079
+ }
1080
+ positionChanged() {
1081
+ this.emitStyle();
1082
+ }
1083
+ emitStyle() {
1084
+ const position = this.position;
1085
+ this.ionStyle.emit({
1086
+ 'label': true,
1087
+ [`label-${position}`]: position !== undefined
1088
+ });
1089
+ }
1090
+ render() {
1091
+ const position = this.position;
1092
+ const mode = getIonMode$1(this);
1093
+ return (h(Host, { class: Object.assign(Object.assign({}, createColorClasses$1(this.color)), { [mode]: true, [`label-${position}`]: position !== undefined, [`label-no-animate`]: (this.noAnimate) }) }));
1094
+ }
1095
+ get el() { return getElement(this); }
1096
+ static get watchers() { return {
1097
+ "position": ["positionChanged"]
1098
+ }; }
1099
+ };
1100
+ Label.style = {
1101
+ ios: labelIosCss,
1102
+ md: labelMdCss
1103
+ };
1104
+
1105
+ const listIosCss = "ion-list{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:block;contain:content;list-style-type:none}ion-list.list-inset{transform:translateZ(0);overflow:hidden}.list-ios{background:var(--ion-item-background, var(--ion-background-color, #fff))}.list-ios.list-inset{margin-left:16px;margin-right:16px;margin-top:16px;margin-bottom:16px;border-radius:4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.list-ios.list-inset{margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px}}.list-ios.list-inset ion-item{--border-width:0 0 1px 0;--inner-border-width:0}.list-ios.list-inset ion-item:last-child{--border-width:0;--inner-border-width:0}.list-ios.list-inset+ion-list.list-inset{margin-top:0}.list-ios-lines-none .item{--border-width:0;--inner-border-width:0}.list-ios-lines-full .item,.list-ios .item-lines-full{--border-width:0 0 0.55px 0}.list-ios-lines-full .item{--inner-border-width:0}.list-ios-lines-inset .item,.list-ios .item-lines-inset{--inner-border-width:0 0 0.55px 0}.list-ios .item-lines-inset{--border-width:0}.list-ios .item-lines-full{--inner-border-width:0}.list-ios .item-lines-none{--border-width:0;--inner-border-width:0}ion-card .list-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}";
1106
+
1107
+ const listMdCss = "ion-list{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:block;contain:content;list-style-type:none}ion-list.list-inset{transform:translateZ(0);overflow:hidden}.list-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:8px;padding-bottom:8px;background:var(--ion-item-background, var(--ion-background-color, #fff))}.list-md>.input:last-child::after{left:0}[dir=rtl] .list-md>.input:last-child::after,:host-context([dir=rtl]) .list-md>.input:last-child::after{left:unset;right:unset;right:0}.list-md.list-inset{margin-left:16px;margin-right:16px;margin-top:16px;margin-bottom:16px;border-radius:2px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.list-md.list-inset{margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:16px;margin-inline-end:16px}}.list-md.list-inset ion-item:first-child{--border-radius:2px 2px 0 0;--border-width:0 0 1px 0}.list-md.list-inset ion-item:last-child{--border-radius:0 0 2px, 2px;--border-width:0}.list-md.list-inset .item-interactive{--padding-start:0;--padding-end:0}.list-md.list-inset+ion-list.list-inset{margin-top:0}.list-md-lines-none .item{--border-width:0;--inner-border-width:0}.list-md-lines-full .item,.list-md .item-lines-full{--border-width:0 0 1px 0}.list-md-lines-full .item{--inner-border-width:0}.list-md-lines-inset .item,.list-md .item-lines-inset{--inner-border-width:0 0 1px 0}.list-md .item-lines-inset{--border-width:0}.list-md .item-lines-full{--inner-border-width:0}.list-md .item-lines-none{--border-width:0;--inner-border-width:0}ion-card .list-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}";
1108
+
1109
+ const List = class {
1110
+ constructor(hostRef) {
1111
+ registerInstance(this, hostRef);
1112
+ /**
1113
+ * If `true`, the list will have margin around it and rounded corners.
1114
+ */
1115
+ this.inset = false;
1116
+ }
1117
+ /**
1118
+ * If `ion-item-sliding` are used inside the list, this method closes
1119
+ * any open sliding item.
1120
+ *
1121
+ * Returns `true` if an actual `ion-item-sliding` is closed.
1122
+ */
1123
+ async closeSlidingItems() {
1124
+ const item = this.el.querySelector('ion-item-sliding');
1125
+ if (item && item.closeOpened) {
1126
+ return item.closeOpened();
1127
+ }
1128
+ return false;
1129
+ }
1130
+ render() {
1131
+ const mode = getIonMode$1(this);
1132
+ const { lines, inset } = this;
1133
+ return (h(Host, { class: {
1134
+ [mode]: true,
1135
+ // Used internally for styling
1136
+ [`list-${mode}`]: true,
1137
+ 'list-inset': inset,
1138
+ [`list-lines-${lines}`]: lines !== undefined,
1139
+ [`list-${mode}-lines-${lines}`]: lines !== undefined
1140
+ } }));
1141
+ }
1142
+ get el() { return getElement(this); }
1143
+ };
1144
+ List.style = {
1145
+ ios: listIosCss,
1146
+ md: listMdCss
1147
+ };
1148
+
1149
+ const rippleEffectCss = ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{transform:translate(var(--translate-end)) scale(var(--final-scale, 1));animation:150ms fadeOutAnimation forwards}@keyframes rippleAnimation{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:scale(1)}to{transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes fadeInAnimation{from{animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeOutAnimation{from{animation-timing-function:linear;opacity:0.16}to{opacity:0}}";
1150
+
1151
+ const RippleEffect = class {
1152
+ constructor(hostRef) {
1153
+ registerInstance(this, hostRef);
1154
+ /**
1155
+ * Sets the type of ripple-effect:
1156
+ *
1157
+ * - `bounded`: the ripple effect expands from the user's click position
1158
+ * - `unbounded`: the ripple effect expands from the center of the button and overflows the container.
1159
+ *
1160
+ * NOTE: Surfaces for bounded ripples should have the overflow property set to hidden,
1161
+ * while surfaces for unbounded ripples should have it set to visible.
1162
+ */
1163
+ this.type = 'bounded';
1164
+ }
1165
+ /**
1166
+ * Adds the ripple effect to the parent element.
1167
+ *
1168
+ * @param x The horizontal coordinate of where the ripple should start.
1169
+ * @param y The vertical coordinate of where the ripple should start.
1170
+ */
1171
+ async addRipple(x, y) {
1172
+ return new Promise(resolve => {
1173
+ readTask(() => {
1174
+ const rect = this.el.getBoundingClientRect();
1175
+ const width = rect.width;
1176
+ const height = rect.height;
1177
+ const hypotenuse = Math.sqrt(width * width + height * height);
1178
+ const maxDim = Math.max(height, width);
1179
+ const maxRadius = this.unbounded ? maxDim : hypotenuse + PADDING;
1180
+ const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);
1181
+ const finalScale = maxRadius / initialSize;
1182
+ let posX = x - rect.left;
1183
+ let posY = y - rect.top;
1184
+ if (this.unbounded) {
1185
+ posX = width * 0.5;
1186
+ posY = height * 0.5;
1187
+ }
1188
+ const styleX = posX - initialSize * 0.5;
1189
+ const styleY = posY - initialSize * 0.5;
1190
+ const moveX = width * 0.5 - posX;
1191
+ const moveY = height * 0.5 - posY;
1192
+ writeTask(() => {
1193
+ const div = document.createElement('div');
1194
+ div.classList.add('ripple-effect');
1195
+ const style = div.style;
1196
+ style.top = styleY + 'px';
1197
+ style.left = styleX + 'px';
1198
+ style.width = style.height = initialSize + 'px';
1199
+ style.setProperty('--final-scale', `${finalScale}`);
1200
+ style.setProperty('--translate-end', `${moveX}px, ${moveY}px`);
1201
+ const container = this.el.shadowRoot || this.el;
1202
+ container.appendChild(div);
1203
+ setTimeout(() => {
1204
+ resolve(() => {
1205
+ removeRipple(div);
1206
+ });
1207
+ }, 225 + 100);
1208
+ });
1209
+ });
1210
+ });
1211
+ }
1212
+ get unbounded() {
1213
+ return this.type === 'unbounded';
1214
+ }
1215
+ render() {
1216
+ const mode = getIonMode$1(this);
1217
+ return (h(Host, { role: "presentation", class: {
1218
+ [mode]: true,
1219
+ 'unbounded': this.unbounded
1220
+ } }));
1221
+ }
1222
+ get el() { return getElement(this); }
1223
+ };
1224
+ const removeRipple = (ripple) => {
1225
+ ripple.classList.add('fade-out');
1226
+ setTimeout(() => {
1227
+ ripple.remove();
1228
+ }, 200);
1229
+ };
1230
+ const PADDING = 10;
1231
+ const INITIAL_ORIGIN_SCALE = 0.5;
1232
+ RippleEffect.style = rippleEffectCss;
1233
+
1234
+ const searchbarIosCss = ".sc-ion-searchbar-ios-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);box-sizing:border-box}.ion-color.sc-ion-searchbar-ios-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:inherit}.searchbar-search-icon.sc-ion-searchbar-ios{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-ios{display:block;position:relative;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-ios{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;border:0;outline:none;background:var(--background);font-family:inherit;box-shadow:var(--box-shadow);box-sizing:border-box;appearance:none}.searchbar-input.sc-ion-searchbar-ios::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-ios::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-ios::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-ios>div.sc-ion-searchbar-ios{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-ios{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);appearance:none}.searchbar-has-value.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{display:block}.searchbar-disabled.sc-ion-searchbar-ios-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-ios-h{--background:rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.07);--border-radius:10px;--box-shadow:none;--cancel-button-color:var(--ion-color-primary, #3880ff);--clear-button-color:var(--ion-color-step-600, #666666);--color:var(--ion-text-color, #000);--icon-color:var(--ion-color-step-600, #666666);padding-left:12px;padding-right:12px;padding-top:12px;padding-bottom:12px;height:60px;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-searchbar-ios-h{padding-left:unset;padding-right:unset;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px}}.searchbar-input-container.sc-ion-searchbar-ios{height:36px}.searchbar-search-icon.sc-ion-searchbar-ios{margin-left:calc(50% - 60px);left:5px;top:0;position:absolute;width:22px;height:100%;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-search-icon.sc-ion-searchbar-ios{margin-left:unset;-webkit-margin-start:calc(50% - 60px);margin-inline-start:calc(50% - 60px)}}[dir=rtl].sc-ion-searchbar-ios .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl].sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{left:unset;right:unset;right:5px}.searchbar-input.sc-ion-searchbar-ios{padding-left:28px;padding-right:28px;padding-top:0;padding-bottom:0;height:100%;font-size:17px;font-weight:400;contain:strict}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-input.sc-ion-searchbar-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:28px;padding-inline-start:28px;-webkit-padding-end:28px;padding-inline-end:28px}}.searchbar-clear-button.sc-ion-searchbar-ios{right:0;top:0;background-position:center;position:absolute;width:30px;height:100%;border:0;background-color:transparent}[dir=rtl].sc-ion-searchbar-ios .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl].sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios,[dir=rtl] .sc-ion-searchbar-ios-h .searchbar-clear-button.sc-ion-searchbar-ios{left:unset;right:unset;left:0}.searchbar-clear-icon.sc-ion-searchbar-ios{width:18px;height:100%}.searchbar-cancel-button.sc-ion-searchbar-ios{padding-left:8px;padding-right:0;padding-top:0;padding-bottom:0;flex-shrink:0;background-color:transparent;font-size:16px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-cancel-button.sc-ion-searchbar-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:0;padding-inline-end:0}}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{margin-left:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{padding-left:30px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-left-aligned.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{padding-left:unset;-webkit-padding-start:30px;padding-inline-start:30px}}.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{display:block}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios{transition:all 300ms ease}.searchbar-animated.searchbar-has-focus.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios,.searchbar-animated.searchbar-should-show-cancel.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{opacity:1;pointer-events:auto}.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{margin-right:-100%;transform:translate3d(0, 0, 0);transition:all 300ms ease;opacity:0;pointer-events:none}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-animated.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{margin-right:unset;-webkit-margin-end:-100%;margin-inline-end:-100%}}.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-input.sc-ion-searchbar-ios,.searchbar-no-animate.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{transition-duration:0ms}.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios{color:var(--ion-color-base)}@media (any-hover: hover){.ion-color.sc-ion-searchbar-ios-h .searchbar-cancel-button.sc-ion-searchbar-ios:hover{color:var(--ion-color-tint)}}ion-toolbar.sc-ion-searchbar-ios-h,ion-toolbar .sc-ion-searchbar-ios-h{padding-top:1px;padding-bottom:15px;height:52px}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color),ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color){color:inherit}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-cancel-button.sc-ion-searchbar-ios{color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h .searchbar-search-icon.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-input.sc-ion-searchbar-ios{background:rgba(var(--ion-color-contrast-rgb), 0.07);color:currentColor}ion-toolbar.ion-color.sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios,ion-toolbar.ion-color .sc-ion-searchbar-ios-h:not(.ion-color) .searchbar-clear-button.sc-ion-searchbar-ios{color:currentColor;opacity:0.5}";
1235
+
1236
+ const searchbarMdCss = ".sc-ion-searchbar-md-h{--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:.5;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);box-sizing:border-box}.ion-color.sc-ion-searchbar-md-h{color:var(--ion-color-contrast)}.ion-color.sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background:var(--ion-color-base)}.ion-color.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.ion-color.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{color:inherit}.searchbar-search-icon.sc-ion-searchbar-md{color:var(--icon-color);pointer-events:none}.searchbar-input-container.sc-ion-searchbar-md{display:block;position:relative;flex-shrink:1;width:100%}.searchbar-input.sc-ion-searchbar-md{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;border-radius:var(--border-radius);display:block;width:100%;border:0;outline:none;background:var(--background);font-family:inherit;box-shadow:var(--box-shadow);box-sizing:border-box;appearance:none}.searchbar-input.sc-ion-searchbar-md::placeholder{color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.searchbar-input.sc-ion-searchbar-md::-webkit-search-cancel-button,.searchbar-input.sc-ion-searchbar-md::-ms-clear{display:none}.searchbar-cancel-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;height:100%;border:0;outline:none;color:var(--cancel-button-color);cursor:pointer;appearance:none}.searchbar-cancel-button.sc-ion-searchbar-md>div.sc-ion-searchbar-md{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.searchbar-clear-button.sc-ion-searchbar-md{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;display:none;min-height:0;outline:none;color:var(--clear-button-color);appearance:none}.searchbar-has-value.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{display:block}.searchbar-disabled.sc-ion-searchbar-md-h{cursor:default;opacity:0.4;pointer-events:none}.sc-ion-searchbar-md-h{--background:var(--ion-background-color, #fff);--border-radius:2px;--box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);--cancel-button-color:var(--ion-color-step-900, #1a1a1a);--clear-button-color:initial;--color:var(--ion-color-step-850, #262626);--icon-color:var(--ion-color-step-600, #666666);padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;background:inherit}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.sc-ion-searchbar-md-h{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.searchbar-search-icon.sc-ion-searchbar-md{left:16px;top:11px;width:21px;height:21px}[dir=rtl].sc-ion-searchbar-md .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{left:unset;right:unset;right:16px}.searchbar-cancel-button.sc-ion-searchbar-md{left:5px;top:0;background-color:transparent;font-size:1.6em}[dir=rtl].sc-ion-searchbar-md .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{left:unset;right:unset;right:5px}.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-cancel-button.sc-ion-searchbar-md{position:absolute}.searchbar-search-icon.ion-activated.sc-ion-searchbar-md,.searchbar-cancel-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-input.sc-ion-searchbar-md{padding-left:55px;padding-right:55px;padding-top:6px;padding-bottom:6px;background-position:left 8px center;height:auto;font-size:16px;font-weight:400;line-height:30px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.searchbar-input.sc-ion-searchbar-md{padding-left:unset;padding-right:unset;-webkit-padding-start:55px;padding-inline-start:55px;-webkit-padding-end:55px;padding-inline-end:55px}}[dir=rtl].sc-ion-searchbar-md .searchbar-input.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-input.sc-ion-searchbar-md{background-position:right 8px center}.searchbar-clear-button.sc-ion-searchbar-md{right:13px;top:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;position:absolute;height:100%;border:0;background-color:transparent}[dir=rtl].sc-ion-searchbar-md .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl].sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md,[dir=rtl] .sc-ion-searchbar-md-h .searchbar-clear-button.sc-ion-searchbar-md{left:unset;right:unset;left:13px}.searchbar-clear-button.ion-activated.sc-ion-searchbar-md{background-color:transparent}.searchbar-clear-icon.sc-ion-searchbar-md{width:22px;height:100%}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-search-icon.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md{display:block}.searchbar-has-focus.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md,.searchbar-should-show-cancel.sc-ion-searchbar-md-h .searchbar-cancel-button.sc-ion-searchbar-md+.searchbar-search-icon.sc-ion-searchbar-md{display:none}ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{padding-left:7px;padding-right:7px;padding-top:3px;padding-bottom:3px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){ion-toolbar.sc-ion-searchbar-md-h,ion-toolbar .sc-ion-searchbar-md-h{padding-left:unset;padding-right:unset;-webkit-padding-start:7px;padding-inline-start:7px;-webkit-padding-end:7px;padding-inline-end:7px}}";
1237
+
1238
+ const Searchbar = class {
1239
+ constructor(hostRef) {
1240
+ registerInstance(this, hostRef);
1241
+ this.ionInput = createEvent(this, "ionInput", 7);
1242
+ this.ionChange = createEvent(this, "ionChange", 7);
1243
+ this.ionCancel = createEvent(this, "ionCancel", 7);
1244
+ this.ionClear = createEvent(this, "ionClear", 7);
1245
+ this.ionBlur = createEvent(this, "ionBlur", 7);
1246
+ this.ionFocus = createEvent(this, "ionFocus", 7);
1247
+ this.ionStyle = createEvent(this, "ionStyle", 7);
1248
+ this.isCancelVisible = false;
1249
+ this.shouldAlignLeft = true;
1250
+ this.focused = false;
1251
+ this.noAnimate = true;
1252
+ /**
1253
+ * If `true`, enable searchbar animation.
1254
+ */
1255
+ this.animated = false;
1256
+ /**
1257
+ * Set the input's autocomplete property.
1258
+ */
1259
+ this.autocomplete = 'off';
1260
+ /**
1261
+ * Set the input's autocorrect property.
1262
+ */
1263
+ this.autocorrect = 'off';
1264
+ /**
1265
+ * Set the cancel button icon. Only applies to `md` mode.
1266
+ * Defaults to `"arrow-back-sharp"`.
1267
+ */
1268
+ this.cancelButtonIcon = config.get('backButtonIcon', 'arrow-back-sharp');
1269
+ /**
1270
+ * Set the the cancel button text. Only applies to `ios` mode.
1271
+ */
1272
+ this.cancelButtonText = 'Cancel';
1273
+ /**
1274
+ * Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke.
1275
+ */
1276
+ this.debounce = 250;
1277
+ /**
1278
+ * If `true`, the user cannot interact with the input.
1279
+ */
1280
+ this.disabled = false;
1281
+ /**
1282
+ * Set the input's placeholder.
1283
+ * `placeholder` can accept either plaintext or HTML as a string.
1284
+ * To display characters normally reserved for HTML, they
1285
+ * must be escaped. For example `<Ionic>` would become
1286
+ * `&lt;Ionic&gt;`
1287
+ *
1288
+ * For more information: [Security Documentation](https://ionicframework.com/docs/faq/security)
1289
+ */
1290
+ this.placeholder = 'Search';
1291
+ /**
1292
+ * Sets the behavior for the cancel button. Defaults to `"never"`.
1293
+ * Setting to `"focus"` shows the cancel button on focus.
1294
+ * Setting to `"never"` hides the cancel button.
1295
+ * Setting to `"always"` shows the cancel button regardless
1296
+ * of focus state.
1297
+ */
1298
+ this.showCancelButton = 'never';
1299
+ /**
1300
+ * If `true`, enable spellcheck on the input.
1301
+ */
1302
+ this.spellcheck = false;
1303
+ /**
1304
+ * Set the type of the input.
1305
+ */
1306
+ this.type = 'search';
1307
+ /**
1308
+ * the value of the searchbar.
1309
+ */
1310
+ this.value = '';
1311
+ /**
1312
+ * Clears the input field and triggers the control change.
1313
+ */
1314
+ this.onClearInput = (ev) => {
1315
+ this.ionClear.emit();
1316
+ if (ev) {
1317
+ ev.preventDefault();
1318
+ ev.stopPropagation();
1319
+ }
1320
+ // setTimeout() fixes https://github.com/ionic-team/ionic/issues/7527
1321
+ // wait for 4 frames
1322
+ setTimeout(() => {
1323
+ const value = this.getValue();
1324
+ if (value !== '') {
1325
+ this.value = '';
1326
+ this.ionInput.emit();
1327
+ }
1328
+ }, 16 * 4);
1329
+ };
1330
+ /**
1331
+ * Clears the input field and tells the input to blur since
1332
+ * the clearInput function doesn't want the input to blur
1333
+ * then calls the custom cancel function if the user passed one in.
1334
+ */
1335
+ this.onCancelSearchbar = (ev) => {
1336
+ if (ev) {
1337
+ ev.preventDefault();
1338
+ ev.stopPropagation();
1339
+ }
1340
+ this.ionCancel.emit();
1341
+ this.onClearInput();
1342
+ if (this.nativeInput) {
1343
+ this.nativeInput.blur();
1344
+ }
1345
+ };
1346
+ /**
1347
+ * Update the Searchbar input value when the input changes
1348
+ */
1349
+ this.onInput = (ev) => {
1350
+ const input = ev.target;
1351
+ if (input) {
1352
+ this.value = input.value;
1353
+ }
1354
+ this.ionInput.emit(ev);
1355
+ };
1356
+ /**
1357
+ * Sets the Searchbar to not focused and checks if it should align left
1358
+ * based on whether there is a value in the searchbar or not.
1359
+ */
1360
+ this.onBlur = () => {
1361
+ this.focused = false;
1362
+ this.ionBlur.emit();
1363
+ this.positionElements();
1364
+ };
1365
+ /**
1366
+ * Sets the Searchbar to focused and active on input focus.
1367
+ */
1368
+ this.onFocus = () => {
1369
+ this.focused = true;
1370
+ this.ionFocus.emit();
1371
+ this.positionElements();
1372
+ };
1373
+ }
1374
+ debounceChanged() {
1375
+ this.ionChange = debounceEvent(this.ionChange, this.debounce);
1376
+ }
1377
+ valueChanged() {
1378
+ const inputEl = this.nativeInput;
1379
+ const value = this.getValue();
1380
+ if (inputEl && inputEl.value !== value) {
1381
+ inputEl.value = value;
1382
+ }
1383
+ this.ionChange.emit({ value });
1384
+ }
1385
+ showCancelButtonChanged() {
1386
+ requestAnimationFrame(() => {
1387
+ this.positionElements();
1388
+ forceUpdate(this);
1389
+ });
1390
+ }
1391
+ connectedCallback() {
1392
+ this.emitStyle();
1393
+ }
1394
+ componentDidLoad() {
1395
+ this.positionElements();
1396
+ this.debounceChanged();
1397
+ setTimeout(() => {
1398
+ this.noAnimate = false;
1399
+ }, 300);
1400
+ }
1401
+ emitStyle() {
1402
+ this.ionStyle.emit({
1403
+ 'searchbar': true
1404
+ });
1405
+ }
1406
+ /**
1407
+ * Sets focus on the specified `ion-searchbar`. Use this method instead of the global
1408
+ * `input.focus()`.
1409
+ */
1410
+ async setFocus() {
1411
+ if (this.nativeInput) {
1412
+ this.nativeInput.focus();
1413
+ }
1414
+ }
1415
+ /**
1416
+ * Returns the native `<input>` element used under the hood.
1417
+ */
1418
+ getInputElement() {
1419
+ return Promise.resolve(this.nativeInput);
1420
+ }
1421
+ /**
1422
+ * Positions the input search icon, placeholder, and the cancel button
1423
+ * based on the input value and if it is focused. (ios only)
1424
+ */
1425
+ positionElements() {
1426
+ const value = this.getValue();
1427
+ const prevAlignLeft = this.shouldAlignLeft;
1428
+ const mode = getIonMode$1(this);
1429
+ const shouldAlignLeft = (!this.animated || value.trim() !== '' || !!this.focused);
1430
+ this.shouldAlignLeft = shouldAlignLeft;
1431
+ if (mode !== 'ios') {
1432
+ return;
1433
+ }
1434
+ if (prevAlignLeft !== shouldAlignLeft) {
1435
+ this.positionPlaceholder();
1436
+ }
1437
+ if (this.animated) {
1438
+ this.positionCancelButton();
1439
+ }
1440
+ }
1441
+ /**
1442
+ * Positions the input placeholder
1443
+ */
1444
+ positionPlaceholder() {
1445
+ const inputEl = this.nativeInput;
1446
+ if (!inputEl) {
1447
+ return;
1448
+ }
1449
+ const isRTL = document.dir === 'rtl';
1450
+ const iconEl = (this.el.shadowRoot || this.el).querySelector('.searchbar-search-icon');
1451
+ if (this.shouldAlignLeft) {
1452
+ inputEl.removeAttribute('style');
1453
+ iconEl.removeAttribute('style');
1454
+ }
1455
+ else {
1456
+ // Create a dummy span to get the placeholder width
1457
+ const doc = document;
1458
+ const tempSpan = doc.createElement('span');
1459
+ tempSpan.innerText = this.placeholder || '';
1460
+ doc.body.appendChild(tempSpan);
1461
+ // Get the width of the span then remove it
1462
+ raf(() => {
1463
+ const textWidth = tempSpan.offsetWidth;
1464
+ tempSpan.remove();
1465
+ // Calculate the input padding
1466
+ const inputLeft = 'calc(50% - ' + (textWidth / 2) + 'px)';
1467
+ // Calculate the icon margin
1468
+ const iconLeft = 'calc(50% - ' + ((textWidth / 2) + 30) + 'px)';
1469
+ // Set the input padding start and icon margin start
1470
+ if (isRTL) {
1471
+ inputEl.style.paddingRight = inputLeft;
1472
+ iconEl.style.marginRight = iconLeft;
1473
+ }
1474
+ else {
1475
+ inputEl.style.paddingLeft = inputLeft;
1476
+ iconEl.style.marginLeft = iconLeft;
1477
+ }
1478
+ });
1479
+ }
1480
+ }
1481
+ /**
1482
+ * Show the iOS Cancel button on focus, hide it offscreen otherwise
1483
+ */
1484
+ positionCancelButton() {
1485
+ const isRTL = document.dir === 'rtl';
1486
+ const cancelButton = (this.el.shadowRoot || this.el).querySelector('.searchbar-cancel-button');
1487
+ const shouldShowCancel = this.shouldShowCancelButton();
1488
+ if (cancelButton && shouldShowCancel !== this.isCancelVisible) {
1489
+ const cancelStyle = cancelButton.style;
1490
+ this.isCancelVisible = shouldShowCancel;
1491
+ if (shouldShowCancel) {
1492
+ if (isRTL) {
1493
+ cancelStyle.marginLeft = '0';
1494
+ }
1495
+ else {
1496
+ cancelStyle.marginRight = '0';
1497
+ }
1498
+ }
1499
+ else {
1500
+ const offset = cancelButton.offsetWidth;
1501
+ if (offset > 0) {
1502
+ if (isRTL) {
1503
+ cancelStyle.marginLeft = -offset + 'px';
1504
+ }
1505
+ else {
1506
+ cancelStyle.marginRight = -offset + 'px';
1507
+ }
1508
+ }
1509
+ }
1510
+ }
1511
+ }
1512
+ getValue() {
1513
+ return this.value || '';
1514
+ }
1515
+ hasValue() {
1516
+ return this.getValue() !== '';
1517
+ }
1518
+ /**
1519
+ * Determines whether or not the cancel button should be visible onscreen.
1520
+ * Cancel button should be shown if one of two conditions applies:
1521
+ * 1. `showCancelButton` is set to `always`.
1522
+ * 2. `showCancelButton` is set to `focus`, and the searchbar has been focused.
1523
+ */
1524
+ shouldShowCancelButton() {
1525
+ if ((this.showCancelButton === 'never') || (this.showCancelButton === 'focus' && !this.focused)) {
1526
+ return false;
1527
+ }
1528
+ return true;
1529
+ }
1530
+ render() {
1531
+ const { cancelButtonText } = this;
1532
+ const animated = this.animated && config.getBoolean('animated', true);
1533
+ const mode = getIonMode$1(this);
1534
+ const clearIcon = this.clearIcon || (mode === 'ios' ? 'close-circle' : 'close-sharp');
1535
+ const searchIcon = this.searchIcon || (mode === 'ios' ? 'search-outline' : 'search-sharp');
1536
+ const shouldShowCancelButton = this.shouldShowCancelButton();
1537
+ const cancelButton = (this.showCancelButton !== 'never') && (h("button", { "aria-label": cancelButtonText, "aria-hidden": shouldShowCancelButton ? undefined : 'true', type: "button", tabIndex: mode === 'ios' && !shouldShowCancelButton ? -1 : undefined, onMouseDown: this.onCancelSearchbar, onTouchStart: this.onCancelSearchbar, class: "searchbar-cancel-button" }, h("div", { "aria-hidden": "true" }, mode === 'md'
1538
+ ? h("ion-icon", { "aria-hidden": "true", mode: mode, icon: this.cancelButtonIcon, lazy: false })
1539
+ : cancelButtonText)));
1540
+ return (h(Host, { role: "search", "aria-disabled": this.disabled ? 'true' : null, class: Object.assign(Object.assign({}, createColorClasses$1(this.color)), { [mode]: true, 'searchbar-animated': animated, 'searchbar-disabled': this.disabled, 'searchbar-no-animate': animated && this.noAnimate, 'searchbar-has-value': this.hasValue(), 'searchbar-left-aligned': this.shouldAlignLeft, 'searchbar-has-focus': this.focused, 'searchbar-should-show-cancel': this.shouldShowCancelButton() }) }, h("div", { class: "searchbar-input-container" }, h("input", { "aria-label": "search text", disabled: this.disabled, ref: el => this.nativeInput = el, class: "searchbar-input", inputMode: this.inputmode, enterKeyHint: this.enterkeyhint, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, placeholder: this.placeholder, type: this.type, value: this.getValue(), autoComplete: this.autocomplete, autoCorrect: this.autocorrect, spellCheck: this.spellcheck }), mode === 'md' && cancelButton, h("ion-icon", { "aria-hidden": "true", mode: mode, icon: searchIcon, lazy: false, class: "searchbar-search-icon" }), h("button", { "aria-label": "reset", type: "button", "no-blur": true, class: "searchbar-clear-button", onMouseDown: this.onClearInput, onTouchStart: this.onClearInput }, h("ion-icon", { "aria-hidden": "true", mode: mode, icon: clearIcon, lazy: false, class: "searchbar-clear-icon" }))), mode === 'ios' && cancelButton));
1541
+ }
1542
+ get el() { return getElement(this); }
1543
+ static get watchers() { return {
1544
+ "debounce": ["debounceChanged"],
1545
+ "value": ["valueChanged"],
1546
+ "showCancelButton": ["showCancelButtonChanged"]
1547
+ }; }
1548
+ };
1549
+ Searchbar.style = {
1550
+ ios: searchbarIosCss,
1551
+ md: searchbarMdCss
1552
+ };
1553
+
1554
+ const titleIosCss = ":host{--color:initial;display:flex;flex:1;align-items:center;transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{left:0;top:0;padding-left:90px;padding-right:90px;padding-top:0;padding-bottom:0;position:absolute;width:100%;height:100%;transform:translateZ(0);font-size:17px;font-weight:600;text-align:center;box-sizing:border-box;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:90px;padding-inline-start:90px;-webkit-padding-end:90px;padding-inline-end:90px}}:host(.title-small){padding-left:9px;padding-right:9px;padding-top:6px;padding-bottom:16px;position:relative;font-size:13px;font-weight:normal}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.title-small){padding-left:unset;padding-right:unset;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px}}:host(.title-large){padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:0;bottom:0;align-items:flex-end;min-width:100%;padding-bottom:6px;font-size:34px;font-weight:700;text-align:start}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host(.title-large){padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host(.title-large.ion-cloned-element){--color:var(--ion-text-color, #000)}";
1555
+
1556
+ const titleMdCss = ":host{--color:initial;display:flex;flex:1;align-items:center;transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{padding-left:20px;padding-right:20px;padding-top:0;padding-bottom:0;font-size:20px;font-weight:500;letter-spacing:0.0125em}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}:host(.title-small){width:100%;height:100%;font-size:15px;font-weight:normal}";
1557
+
1558
+ const ToolbarTitle = class {
1559
+ constructor(hostRef) {
1560
+ registerInstance(this, hostRef);
1561
+ this.ionStyle = createEvent(this, "ionStyle", 7);
1562
+ }
1563
+ sizeChanged() {
1564
+ this.emitStyle();
1565
+ }
1566
+ connectedCallback() {
1567
+ this.emitStyle();
1568
+ }
1569
+ emitStyle() {
1570
+ const size = this.getSize();
1571
+ this.ionStyle.emit({
1572
+ [`title-${size}`]: true
1573
+ });
1574
+ }
1575
+ getSize() {
1576
+ return (this.size !== undefined) ? this.size : 'default';
1577
+ }
1578
+ render() {
1579
+ const mode = getIonMode$1(this);
1580
+ const size = this.getSize();
1581
+ return (h(Host, { class: Object.assign({ [mode]: true, [`title-${size}`]: true }, createColorClasses$1(this.color)) }, h("div", { class: "toolbar-title" }, h("slot", null))));
1582
+ }
1583
+ get el() { return getElement(this); }
1584
+ static get watchers() { return {
1585
+ "size": ["sizeChanged"]
1586
+ }; }
1587
+ };
1588
+ ToolbarTitle.style = {
1589
+ ios: titleIosCss,
1590
+ md: titleMdCss
1591
+ };
1592
+
1593
+ const toolbarIosCss = ":host{--border-width:0;--border-style:solid;--opacity:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--ion-safe-area-left);padding-right:var(--ion-safe-area-right);display:block;position:relative;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;z-index:10;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-safe-area-left);padding-inline-start:var(--ion-safe-area-left);-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;flex-direction:row;align-items:center;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toolbar-container{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.toolbar-background{left:0;right:0;top:0;bottom:0;position:absolute;transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:var(--opacity);z-index:-1;pointer-events:none}::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background, var(--ion-color-step-50, #fff));--color:var(--ion-toolbar-color, var(--ion-text-color, #000));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.2))));--padding-top:3px;--padding-bottom:3px;--padding-start:4px;--padding-end:4px;--min-height:44px}.toolbar-content{flex:1;order:4;min-width:0}:host(.toolbar-segment) .toolbar-content{display:inline-flex}:host(.toolbar-searchbar) .toolbar-container{padding-top:0;padding-bottom:0}:host(.toolbar-searchbar) ::slotted(*){align-self:start}:host(.toolbar-searchbar) ::slotted(ion-chip){margin-top:3px}:host(.toolbar-searchbar) ::slotted(ion-back-button){height:38px}::slotted(ion-buttons){min-height:38px}::slotted([slot=start]){order:2}::slotted([slot=secondary]){order:3}::slotted([slot=primary]){order:5;text-align:end}::slotted([slot=end]){order:6;text-align:end}:host(.toolbar-title-large) .toolbar-container{flex-wrap:wrap;align-items:flex-start}:host(.toolbar-title-large) .toolbar-content ion-title{flex:1;order:8;min-width:100%}";
1594
+
1595
+ const toolbarMdCss = ":host{--border-width:0;--border-style:solid;--opacity:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--ion-safe-area-left);padding-right:var(--ion-safe-area-right);display:block;position:relative;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;z-index:10;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-safe-area-left);padding-inline-start:var(--ion-safe-area-left);-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:flex;position:relative;flex-direction:row;align-items:center;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;box-sizing:border-box}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.toolbar-container{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.toolbar-background{left:0;right:0;top:0;bottom:0;position:absolute;transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:var(--opacity);z-index:-1;pointer-events:none}::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background, var(--ion-background-color, #fff));--color:var(--ion-toolbar-color, var(--ion-text-color, #424242));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, #c1c4cd)));--padding-top:0;--padding-bottom:0;--padding-start:0;--padding-end:0;--min-height:56px}.toolbar-content{flex:1;order:3;min-width:0;max-width:100%}::slotted(ion-segment){min-height:var(--min-height)}::slotted(.buttons-first-slot){margin-left:4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(.buttons-first-slot){margin-left:unset;-webkit-margin-start:4px;margin-inline-start:4px}}::slotted(.buttons-last-slot){margin-right:4px}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){::slotted(.buttons-last-slot){margin-right:unset;-webkit-margin-end:4px;margin-inline-end:4px}}::slotted([slot=start]){order:2}::slotted([slot=secondary]){order:4}::slotted([slot=primary]){order:5;text-align:end}::slotted([slot=end]){order:6;text-align:end}";
1596
+
1597
+ const Toolbar = class {
1598
+ constructor(hostRef) {
1599
+ registerInstance(this, hostRef);
1600
+ this.childrenStyles = new Map();
1601
+ }
1602
+ componentWillLoad() {
1603
+ const buttons = Array.from(this.el.querySelectorAll('ion-buttons'));
1604
+ const firstButtons = buttons.find(button => {
1605
+ return button.slot === 'start';
1606
+ });
1607
+ if (firstButtons) {
1608
+ firstButtons.classList.add('buttons-first-slot');
1609
+ }
1610
+ const buttonsReversed = buttons.reverse();
1611
+ const lastButtons = buttonsReversed.find(button => button.slot === 'end') ||
1612
+ buttonsReversed.find(button => button.slot === 'primary') ||
1613
+ buttonsReversed.find(button => button.slot === 'secondary');
1614
+ if (lastButtons) {
1615
+ lastButtons.classList.add('buttons-last-slot');
1616
+ }
1617
+ }
1618
+ childrenStyle(ev) {
1619
+ ev.stopPropagation();
1620
+ const tagName = ev.target.tagName;
1621
+ const updatedStyles = ev.detail;
1622
+ const newStyles = {};
1623
+ const childStyles = this.childrenStyles.get(tagName) || {};
1624
+ let hasStyleChange = false;
1625
+ Object.keys(updatedStyles).forEach(key => {
1626
+ const childKey = `toolbar-${key}`;
1627
+ const newValue = updatedStyles[key];
1628
+ if (newValue !== childStyles[childKey]) {
1629
+ hasStyleChange = true;
1630
+ }
1631
+ if (newValue) {
1632
+ newStyles[childKey] = true;
1633
+ }
1634
+ });
1635
+ if (hasStyleChange) {
1636
+ this.childrenStyles.set(tagName, newStyles);
1637
+ forceUpdate(this);
1638
+ }
1639
+ }
1640
+ render() {
1641
+ const mode = getIonMode$1(this);
1642
+ const childStyles = {};
1643
+ this.childrenStyles.forEach(value => {
1644
+ Object.assign(childStyles, value);
1645
+ });
1646
+ return (h(Host, { class: Object.assign(Object.assign({ 'in-toolbar': hostContext('ion-toolbar', this.el), [mode]: true }, childStyles), createColorClasses$1(this.color)) }, h("div", { class: "toolbar-background" }), h("div", { class: "toolbar-container" }, h("slot", { name: "start" }), h("slot", { name: "secondary" }), h("div", { class: "toolbar-content" }, h("slot", null)), h("slot", { name: "primary" }), h("slot", { name: "end" }))));
1647
+ }
1648
+ get el() { return getElement(this); }
1649
+ };
1650
+ Toolbar.style = {
1651
+ ios: toolbarIosCss,
1652
+ md: toolbarMdCss
1653
+ };
1654
+
1655
+ const title = "Prayers and Thanksgivings";
1656
+ const EN = {
1657
+ title: title
1658
+ };
1659
+
1660
+ const prayersAndThanksgivingsCss = ".padded.sc-ldf-prayers-and-thanksgivings{padding-left:14px}";
1661
+
1662
+ const LOCALE = {
1663
+ 'en': EN,
1664
+ };
1665
+ const PrayersAndThanksgivingsComponent = class {
1666
+ constructor(hostRef) {
1667
+ registerInstance(this, hostRef);
1668
+ this.ldfAskForPrayersAndThanksgivings = createEvent(this, "ldfAskForPrayersAndThanksgivings", 7);
1669
+ this.localeStrings = {};
1670
+ this.filter = '';
1671
+ }
1672
+ optionsChange(newOptions) {
1673
+ console.log("new options");
1674
+ this.currentOptions = newOptions;
1675
+ }
1676
+ /** Set the list of available prayers */
1677
+ async setOptions(options) {
1678
+ this.optionsChange(options);
1679
+ if (this.loading) {
1680
+ this.loading.dismiss();
1681
+ }
1682
+ }
1683
+ // Lifecycle events
1684
+ async componentWillLoad() {
1685
+ this.ldfAskForPrayersAndThanksgivings.emit(true);
1686
+ this.loadLocaleStrings();
1687
+ }
1688
+ // Private methods
1689
+ async loadLocaleStrings() {
1690
+ try {
1691
+ this.localeStrings = LOCALE[getComponentClosestLanguage(this.element)];
1692
+ }
1693
+ catch (e) {
1694
+ console.warn(e);
1695
+ }
1696
+ }
1697
+ async addPrayer(value) {
1698
+ var _a;
1699
+ // if passed a parent, send the message to it that we should insert this doc
1700
+ if (this.parent) {
1701
+ this.parent.ldfDocShouldChange.emit(new Change({
1702
+ path: this.base,
1703
+ op: [{
1704
+ type: 'insertAt',
1705
+ index: this.index,
1706
+ value
1707
+ }]
1708
+ }));
1709
+ (_a = this.modal) === null || _a === void 0 ? void 0 : _a.dismiss();
1710
+ }
1711
+ // otherwise, just pop up the text
1712
+ else {
1713
+ const popover = await popoverController.create({
1714
+ backdropDismiss: true,
1715
+ component: "ldf-liturgical-document",
1716
+ componentProps: {
1717
+ doc: Object.assign(Object.assign({}, value), { value: value.value.map(line => typeof line === "string" ? line.replace(" ", " ") : line) }),
1718
+ padding: "1em"
1719
+ }
1720
+ });
1721
+ await popover.present();
1722
+ }
1723
+ }
1724
+ buildTree() {
1725
+ function groupBy(list, keyGetter) {
1726
+ const map = new Map();
1727
+ list.forEach((item) => {
1728
+ const key = keyGetter(item);
1729
+ const collection = map.get(key);
1730
+ if (!collection) {
1731
+ map.set(key, [item]);
1732
+ }
1733
+ else {
1734
+ collection.push(item);
1735
+ }
1736
+ });
1737
+ return map;
1738
+ }
1739
+ const options = !this.filter ? this.currentOptions || [] :
1740
+ (this.currentOptions || []).filter(doc => { var _a, _b, _c, _d; return ((_b = (_a = doc.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes(this.filter.toLowerCase())) || ((_d = (_c = (doc.value || [])[0]) === null || _c === void 0 ? void 0 : _c.toLowerCase()) === null || _d === void 0 ? void 0 : _d.includes(this.filter.toLowerCase())); });
1741
+ const categories = Array.from(groupBy(options, (item) => (item.category || [])[1]));
1742
+ const subcategories = categories.map(([categoryLabel, values]) => [categoryLabel, Array.from(groupBy(values, (item) => (item.category || [])[2]))]);
1743
+ return subcategories;
1744
+ }
1745
+ // Render
1746
+ render() {
1747
+ const localeStrings = this.localeStrings || {};
1748
+ const tree = this.buildTree(), list = h("ion-list", null, h("ion-searchbar", { debounce: 100, onIonChange: (ev) => this.filter = ev.detail.value }), tree.map(([category, values]) => [
1749
+ h("h2", { class: "padded" }, category),
1750
+ ...values.map(([subcategory, subvalues]) => [
1751
+ h("h3", { class: "padded" }, subcategory),
1752
+ ...subvalues
1753
+ .sort((a, b) => { var _a, _b; return Number((_a = a.label) === null || _a === void 0 ? void 0 : _a.split('.')[0]) < Number((_b = b.label) === null || _b === void 0 ? void 0 : _b.split('.')[0]) ? -1 : 1; })
1754
+ .map(option => h("ion-item", { button: true, onClick: () => this.addPrayer(option) }, h("ion-label", null, h("h3", null, option.label), h("p", null, option.value[0].replace(/\*/g, '').replace(" ", " ")))))
1755
+ ])
1756
+ ]));
1757
+ return this.modal
1758
+ ? [
1759
+ h("ion-header", null, h("ion-toolbar", null, h("ion-title", null, localeStrings.title), h("ion-buttons", { slot: "end" }, h("ion-button", { onClick: () => this.modal.dismiss() }, h("ion-icon", { slot: "icon-only", name: "close" }))))),
1760
+ h("ion-content", { class: "ion-padding" }, list)
1761
+ ]
1762
+ : [list];
1763
+ }
1764
+ get element() { return getElement(this); }
1765
+ static get watchers() { return {
1766
+ "options": ["optionsChange"]
1767
+ }; }
1768
+ };
1769
+ PrayersAndThanksgivingsComponent.style = prayersAndThanksgivingsCss;
1770
+
1771
+ export { Button as ion_button, Buttons as ion_buttons, Content as ion_content, Header as ion_header, Icon as ion_icon, Item as ion_item, Label as ion_label, List as ion_list, RippleEffect as ion_ripple_effect, Searchbar as ion_searchbar, ToolbarTitle as ion_title, Toolbar as ion_toolbar, PrayersAndThanksgivingsComponent as ldf_prayers_and_thanksgivings };