@limetech/lime-elements 35.0.0-next.9 → 35.0.0

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 (266) hide show
  1. package/dist/cjs/checkbox.template-b6c6562c.js +43 -0
  2. package/dist/cjs/{component-f7ef9087.js → component-66df95e7.js} +190 -132
  3. package/dist/cjs/{component-f532119f.js → component-67144c1c.js} +47 -3
  4. package/dist/cjs/{component-ed21410d.js → component-ae3bfacf.js} +367 -235
  5. package/dist/cjs/{component-2faaa141.js → component-cf490570.js} +213 -143
  6. package/dist/cjs/{component-10dbdd60.js → component-dd795ff0.js} +7 -5
  7. package/dist/cjs/{dateFormatter-26eac73a.js → dateFormatter-34b77ead.js} +37 -31
  8. package/dist/cjs/{index-e63a89d7.js → index-2a28697b.js} +27 -1
  9. package/dist/cjs/lime-elements.cjs.js +3 -3
  10. package/dist/cjs/limel-badge.cjs.entry.js +4 -4
  11. package/dist/cjs/limel-banner.cjs.entry.js +2 -2
  12. package/dist/cjs/limel-button-group.cjs.entry.js +3 -3
  13. package/dist/cjs/limel-button.cjs.entry.js +3 -3
  14. package/dist/cjs/limel-checkbox.cjs.entry.js +136 -90
  15. package/dist/cjs/limel-chip-set.cjs.entry.js +235 -191
  16. package/dist/cjs/limel-circular-progress.cjs.entry.js +3 -3
  17. package/dist/cjs/limel-code-editor.cjs.entry.js +50 -23
  18. package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
  19. package/dist/cjs/limel-color-picker-palette_2.cjs.entry.js +3 -3
  20. package/dist/cjs/limel-color-picker.cjs.entry.js +2 -2
  21. package/dist/cjs/limel-config.cjs.entry.js +2 -2
  22. package/dist/cjs/limel-date-picker.cjs.entry.js +8 -8
  23. package/dist/cjs/limel-dialog.cjs.entry.js +9 -10
  24. package/dist/cjs/limel-file.cjs.entry.js +11 -9
  25. package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +971 -657
  26. package/dist/cjs/limel-flex-container.cjs.entry.js +6 -2
  27. package/dist/cjs/limel-form.cjs.entry.js +423 -449
  28. package/dist/cjs/limel-grid.cjs.entry.js +2 -2
  29. package/dist/cjs/limel-header.cjs.entry.js +2 -2
  30. package/dist/cjs/limel-icon-button.cjs.entry.js +6 -6
  31. package/dist/cjs/limel-icon.cjs.entry.js +2 -2
  32. package/dist/cjs/limel-input-field.cjs.entry.js +12 -10
  33. package/dist/cjs/limel-linear-progress.cjs.entry.js +4 -4
  34. package/dist/cjs/limel-list_3.cjs.entry.js +154 -91
  35. package/dist/cjs/limel-menu-list.cjs.entry.js +87 -74
  36. package/dist/cjs/limel-menu.cjs.entry.js +2 -2
  37. package/dist/cjs/limel-picker.cjs.entry.js +4 -7
  38. package/dist/cjs/limel-popover-surface.cjs.entry.js +3 -3
  39. package/dist/cjs/limel-progress-flow-item.cjs.entry.js +2 -2
  40. package/dist/cjs/limel-progress-flow.cjs.entry.js +2 -2
  41. package/dist/cjs/limel-select.cjs.entry.js +6 -6
  42. package/dist/cjs/limel-slider.cjs.entry.js +34 -7
  43. package/dist/cjs/limel-snackbar.cjs.entry.js +79 -73
  44. package/dist/cjs/limel-spinner.cjs.entry.js +2 -2
  45. package/dist/cjs/limel-switch.cjs.entry.js +498 -202
  46. package/dist/cjs/limel-tab-bar.cjs.entry.js +263 -186
  47. package/dist/cjs/limel-tab-panel.cjs.entry.js +2 -2
  48. package/dist/cjs/limel-table.cjs.entry.js +73 -13
  49. package/dist/cjs/limel-tooltip_2.cjs.entry.js +3 -3
  50. package/dist/cjs/loader.cjs.js +3 -3
  51. package/dist/cjs/{moment-d287c0ed.js → moment-5c6581b7.js} +94 -79
  52. package/dist/collection/collection-manifest.json +2 -2
  53. package/dist/collection/components/badge/badge.css +9 -15
  54. package/dist/collection/components/badge/badge.js +2 -2
  55. package/dist/collection/components/button/button.css +333 -145
  56. package/dist/collection/components/button-group/button-group.css +30 -5
  57. package/dist/collection/components/checkbox/checkbox.css +71 -20
  58. package/dist/collection/components/checkbox/checkbox.js +5 -4
  59. package/dist/collection/components/checkbox/checkbox.template.js +24 -20
  60. package/dist/collection/components/chip-set/chip-set.css +367 -34
  61. package/dist/collection/components/circular-progress/circular-progress.css +2 -2
  62. package/dist/collection/components/code-editor/code-editor.css +8 -13
  63. package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +1 -1
  64. package/dist/collection/components/dialog/dialog.css +153 -109
  65. package/dist/collection/components/dialog/dialog.js +7 -0
  66. package/dist/collection/components/file/icon-background-colors.js +2 -1
  67. package/dist/collection/components/file/icon-fill-colors.js +2 -1
  68. package/dist/collection/components/file/icons.js +1 -1
  69. package/dist/collection/components/flex-container/flex-container.js +10 -0
  70. package/dist/collection/components/form/fields/schema-field.js +0 -1
  71. package/dist/collection/components/form/form.css +5 -1
  72. package/dist/collection/components/form/form.js +34 -0
  73. package/dist/collection/components/form/form.types.js +0 -1
  74. package/dist/collection/components/form/templates/common.js +4 -1
  75. package/dist/collection/components/icon-button/icon-button.css +116 -59
  76. package/dist/collection/components/icon-button/icon-button.js +1 -0
  77. package/dist/collection/components/input-field/input-field.css +344 -29
  78. package/dist/collection/components/input-field/input-field.js +5 -3
  79. package/dist/collection/components/linear-progress/linear-progress.css +14 -2
  80. package/dist/collection/components/list/list-renderer.js +1 -4
  81. package/dist/collection/components/list/list.css +938 -93
  82. package/dist/collection/components/list/list.js +13 -6
  83. package/dist/collection/components/menu-list/menu-list-renderer.js +1 -4
  84. package/dist/collection/components/menu-list/menu-list.css +938 -93
  85. package/dist/collection/components/menu-surface/menu-surface.css +31 -7
  86. package/dist/collection/components/picker/picker.js +4 -6
  87. package/dist/collection/components/popover-surface/popover-surface.css +1 -0
  88. package/dist/collection/components/select/select.css +424 -17
  89. package/dist/collection/components/select/select.template.js +1 -1
  90. package/dist/collection/components/slider/slider.css +49 -2
  91. package/dist/collection/components/snackbar/snackbar.css +588 -301
  92. package/dist/collection/components/switch/switch.css +592 -222
  93. package/dist/collection/components/switch/switch.js +18 -12
  94. package/dist/collection/components/tab-bar/tab-bar.css +77 -48
  95. package/dist/collection/components/table/table.css +219 -165
  96. package/dist/collection/components/table/table.js +99 -15
  97. package/dist/collection/components/table/table.types.js +0 -1
  98. package/dist/collection/style/functions.scss +3 -1
  99. package/dist/collection/style/internal/lime-theme.scss +30 -31
  100. package/dist/collection/style/internal/lime-typography.scss +55 -56
  101. package/dist/esm/checkbox.template-2f1bbc98.js +41 -0
  102. package/dist/esm/{component-89e0ce26.js → component-19eb6e2b.js} +7 -5
  103. package/dist/esm/{component-2630c3d7.js → component-288691f3.js} +367 -235
  104. package/dist/esm/{component-d682c974.js → component-410aad5a.js} +44 -4
  105. package/dist/esm/{component-429e92ee.js → component-5b4ac85a.js} +213 -143
  106. package/dist/esm/{component-834d85a1.js → component-fffa3419.js} +190 -132
  107. package/dist/esm/{dateFormatter-c9b41548.js → dateFormatter-ed618478.js} +37 -31
  108. package/dist/esm/{index-2316f345.js → index-11cd0b60.js} +27 -1
  109. package/dist/esm/lime-elements.js +3 -3
  110. package/dist/esm/limel-badge.entry.js +4 -4
  111. package/dist/esm/limel-banner.entry.js +2 -2
  112. package/dist/esm/limel-button-group.entry.js +3 -3
  113. package/dist/esm/limel-button.entry.js +3 -3
  114. package/dist/esm/limel-checkbox.entry.js +136 -90
  115. package/dist/esm/limel-chip-set.entry.js +235 -191
  116. package/dist/esm/limel-circular-progress.entry.js +3 -3
  117. package/dist/esm/limel-code-editor.entry.js +50 -23
  118. package/dist/esm/limel-collapsible-section.entry.js +2 -2
  119. package/dist/esm/limel-color-picker-palette_2.entry.js +3 -3
  120. package/dist/esm/limel-color-picker.entry.js +2 -2
  121. package/dist/esm/limel-config.entry.js +2 -2
  122. package/dist/esm/limel-date-picker.entry.js +8 -8
  123. package/dist/esm/limel-dialog.entry.js +9 -10
  124. package/dist/esm/limel-file.entry.js +11 -9
  125. package/dist/esm/limel-flatpickr-adapter.entry.js +971 -657
  126. package/dist/esm/limel-flex-container.entry.js +6 -2
  127. package/dist/esm/limel-form.entry.js +424 -450
  128. package/dist/esm/limel-grid.entry.js +2 -2
  129. package/dist/esm/limel-header.entry.js +2 -2
  130. package/dist/esm/limel-icon-button.entry.js +6 -6
  131. package/dist/esm/limel-icon.entry.js +2 -2
  132. package/dist/esm/limel-input-field.entry.js +12 -10
  133. package/dist/esm/limel-linear-progress.entry.js +4 -4
  134. package/dist/esm/limel-list_3.entry.js +154 -91
  135. package/dist/esm/limel-menu-list.entry.js +87 -74
  136. package/dist/esm/limel-menu.entry.js +2 -2
  137. package/dist/esm/limel-picker.entry.js +4 -7
  138. package/dist/esm/limel-popover-surface.entry.js +3 -3
  139. package/dist/esm/limel-progress-flow-item.entry.js +2 -2
  140. package/dist/esm/limel-progress-flow.entry.js +2 -2
  141. package/dist/esm/limel-select.entry.js +6 -6
  142. package/dist/esm/limel-slider.entry.js +34 -7
  143. package/dist/esm/limel-snackbar.entry.js +79 -73
  144. package/dist/esm/limel-spinner.entry.js +2 -2
  145. package/dist/esm/limel-switch.entry.js +498 -202
  146. package/dist/esm/limel-tab-bar.entry.js +263 -186
  147. package/dist/esm/limel-tab-panel.entry.js +2 -2
  148. package/dist/esm/limel-table.entry.js +73 -13
  149. package/dist/esm/limel-tooltip_2.entry.js +3 -3
  150. package/dist/esm/loader.js +3 -3
  151. package/dist/esm/{moment-8dadd938.js → moment-29c213b7.js} +94 -79
  152. package/dist/esm/polyfills/css-shim.js +1 -1
  153. package/dist/lime-elements/lime-elements.esm.js +1 -1
  154. package/dist/lime-elements/p-04b5bc13.entry.js +82 -0
  155. package/dist/lime-elements/p-101af376.entry.js +1 -0
  156. package/dist/lime-elements/p-1c284626.js +73 -0
  157. package/dist/lime-elements/p-1ede893b.js +1 -0
  158. package/dist/lime-elements/p-2639edf9.entry.js +73 -0
  159. package/dist/lime-elements/p-2da6e2a3.entry.js +1 -0
  160. package/dist/lime-elements/p-2ff40ce6.js +3 -0
  161. package/dist/lime-elements/{p-887d5bda.entry.js → p-358706b6.entry.js} +1 -1
  162. package/dist/lime-elements/p-36ecbd03.entry.js +1 -0
  163. package/dist/lime-elements/p-404e1465.entry.js +1 -0
  164. package/dist/lime-elements/p-42b67933.entry.js +1 -0
  165. package/dist/lime-elements/p-440454ed.entry.js +1 -0
  166. package/dist/lime-elements/{p-076bd4dc.js → p-48d4ef20.js} +3 -3
  167. package/dist/lime-elements/p-53e01330.entry.js +1 -0
  168. package/dist/lime-elements/p-5908c21d.entry.js +1 -0
  169. package/dist/lime-elements/p-5b7a8c61.entry.js +20 -0
  170. package/dist/lime-elements/p-63e25a0a.entry.js +1 -0
  171. package/dist/lime-elements/p-6e7809a6.entry.js +1 -0
  172. package/dist/lime-elements/p-705334c1.entry.js +1 -0
  173. package/dist/lime-elements/p-716a6acd.entry.js +16 -0
  174. package/dist/lime-elements/p-71efe2ca.entry.js +37 -0
  175. package/dist/lime-elements/{p-e1928c0e.js → p-72e03943.js} +1 -1
  176. package/dist/lime-elements/p-80327bb8.entry.js +16 -0
  177. package/dist/lime-elements/p-83ea517b.entry.js +1 -0
  178. package/dist/lime-elements/p-87a1e1cb.entry.js +1 -0
  179. package/dist/lime-elements/{p-8ad5e143.entry.js → p-94899019.entry.js} +1 -1
  180. package/dist/lime-elements/p-95f275ab.entry.js +1 -0
  181. package/dist/lime-elements/p-96f4b892.entry.js +131 -0
  182. package/dist/lime-elements/p-97d6c4a6.entry.js +1 -0
  183. package/dist/lime-elements/p-a465084b.entry.js +82 -0
  184. package/dist/lime-elements/p-a5af84a7.entry.js +1 -0
  185. package/dist/lime-elements/p-b91dc1ef.entry.js +1 -0
  186. package/dist/lime-elements/p-bd8c9384.entry.js +1 -0
  187. package/dist/lime-elements/p-c4b38454.entry.js +1 -0
  188. package/dist/lime-elements/p-c7953a05.entry.js +82 -0
  189. package/dist/lime-elements/p-c80acfb2.entry.js +59 -0
  190. package/dist/lime-elements/p-cbc43682.js +81 -0
  191. package/dist/lime-elements/{p-ace9affc.js → p-d0a7de87.js} +2 -2
  192. package/dist/lime-elements/p-d1ee4501.entry.js +37 -0
  193. package/dist/lime-elements/p-d74fa89e.entry.js +1 -0
  194. package/dist/lime-elements/p-da962c64.entry.js +1 -0
  195. package/dist/lime-elements/p-dfba92de.js +126 -0
  196. package/dist/lime-elements/p-dfbe015e.entry.js +1 -0
  197. package/dist/lime-elements/p-e83dddcd.entry.js +126 -0
  198. package/dist/lime-elements/p-e98d76e8.entry.js +59 -0
  199. package/dist/lime-elements/{p-92146da6.js → p-e9a95b8f.js} +1 -1
  200. package/dist/lime-elements/p-eae8c615.entry.js +1 -0
  201. package/dist/lime-elements/p-ed65468d.entry.js +1 -0
  202. package/dist/lime-elements/p-f0c9dadd.entry.js +1 -0
  203. package/dist/lime-elements/style/functions.scss +3 -1
  204. package/dist/lime-elements/style/internal/lime-theme.scss +30 -31
  205. package/dist/lime-elements/style/internal/lime-typography.scss +55 -56
  206. package/dist/types/components/badge/badge.d.ts +1 -1
  207. package/dist/types/components/checkbox/checkbox.d.ts +3 -2
  208. package/dist/types/components/checkbox/checkbox.template.d.ts +1 -0
  209. package/dist/types/components/dialog/dialog.d.ts +7 -0
  210. package/dist/types/components/flex-container/flex-container.d.ts +7 -0
  211. package/dist/types/components/form/fields/array-field.d.ts +0 -1
  212. package/dist/types/components/form/fields/object-field.d.ts +2 -2
  213. package/dist/types/components/form/form.d.ts +8 -1
  214. package/dist/types/components/form/form.types.d.ts +6 -0
  215. package/dist/types/components/picker/picker.d.ts +2 -1
  216. package/dist/types/components/switch/switch.d.ts +2 -2
  217. package/dist/types/components/table/table.d.ts +10 -1
  218. package/dist/types/components/table/table.types.d.ts +13 -0
  219. package/dist/types/components.d.ts +20 -4
  220. package/dist/types/stencil-public-runtime.d.ts +6 -4
  221. package/package.json +30 -43
  222. package/dist/cjs/checkbox.template-50eb8b76.js +0 -39
  223. package/dist/esm/checkbox.template-50f7c07b.js +0 -37
  224. package/dist/lime-elements/p-041ae00c.entry.js +0 -1
  225. package/dist/lime-elements/p-0ce9165f.entry.js +0 -1
  226. package/dist/lime-elements/p-0fd208f3.entry.js +0 -82
  227. package/dist/lime-elements/p-143705b1.entry.js +0 -1
  228. package/dist/lime-elements/p-1876a96a.entry.js +0 -1
  229. package/dist/lime-elements/p-1fb5340d.entry.js +0 -1
  230. package/dist/lime-elements/p-250f55be.js +0 -1
  231. package/dist/lime-elements/p-29f054cc.entry.js +0 -37
  232. package/dist/lime-elements/p-31fecf5d.entry.js +0 -1
  233. package/dist/lime-elements/p-34c7872e.entry.js +0 -1
  234. package/dist/lime-elements/p-3ae6bb75.entry.js +0 -82
  235. package/dist/lime-elements/p-3ae6dfba.entry.js +0 -73
  236. package/dist/lime-elements/p-468e940e.entry.js +0 -16
  237. package/dist/lime-elements/p-4932c029.entry.js +0 -1
  238. package/dist/lime-elements/p-4b5af81b.entry.js +0 -1
  239. package/dist/lime-elements/p-510bb5a4.entry.js +0 -1
  240. package/dist/lime-elements/p-58cbe99d.entry.js +0 -1
  241. package/dist/lime-elements/p-597cbe05.entry.js +0 -1
  242. package/dist/lime-elements/p-6003f817.entry.js +0 -1
  243. package/dist/lime-elements/p-668795a7.js +0 -73
  244. package/dist/lime-elements/p-714fde78.entry.js +0 -1
  245. package/dist/lime-elements/p-7476efe0.entry.js +0 -1
  246. package/dist/lime-elements/p-8a2c1038.entry.js +0 -16
  247. package/dist/lime-elements/p-902347b9.js +0 -81
  248. package/dist/lime-elements/p-90c6fa15.js +0 -126
  249. package/dist/lime-elements/p-90f3e17c.entry.js +0 -37
  250. package/dist/lime-elements/p-a2cf74c1.entry.js +0 -1
  251. package/dist/lime-elements/p-a397bab7.js +0 -3
  252. package/dist/lime-elements/p-a4c532a7.entry.js +0 -1
  253. package/dist/lime-elements/p-be56ffab.entry.js +0 -1
  254. package/dist/lime-elements/p-c306c953.entry.js +0 -1
  255. package/dist/lime-elements/p-c35874db.entry.js +0 -1
  256. package/dist/lime-elements/p-c8c8a946.entry.js +0 -59
  257. package/dist/lime-elements/p-ca664c9f.entry.js +0 -1
  258. package/dist/lime-elements/p-d2c74396.entry.js +0 -1
  259. package/dist/lime-elements/p-d48ad9f7.entry.js +0 -126
  260. package/dist/lime-elements/p-d93a3b07.entry.js +0 -16
  261. package/dist/lime-elements/p-df8faeb4.entry.js +0 -59
  262. package/dist/lime-elements/p-dfe0a58b.entry.js +0 -1
  263. package/dist/lime-elements/p-e275f502.entry.js +0 -37
  264. package/dist/lime-elements/p-e881e98d.entry.js +0 -1
  265. package/dist/lime-elements/p-f2c706b8.entry.js +0 -131
  266. package/dist/lime-elements/p-fc30b8e3.entry.js +0 -1
@@ -0,0 +1,126 @@
1
+ import{M as t,a as i}from"./p-48d4ef20.js";import{m as n,c as e}from"./p-dcc97cc2.js";import{n as s}from"./p-6e219bb4.js";import{g as r}from"./p-9faad6eb.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2018 Google Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ * THE SOFTWARE.
23
+ */var o,u,h={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},c={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},f={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(o||(o={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(u||(u={}));
24
+ /*! *****************************************************************************
25
+ Copyright (c) Microsoft Corporation.
26
+
27
+ Permission to use, copy, modify, and/or distribute this software for any
28
+ purpose with or without fee is hereby granted.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
31
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
32
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
33
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
34
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
35
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
36
+ PERFORMANCE OF THIS SOFTWARE.
37
+ ***************************************************************************** */
38
+ var a=function(t,i){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,i)};function d(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}a(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var l,m,b=function(){return(b=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var s in i=arguments[n])Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s]);return t}).apply(this,arguments)},I={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},E=((l={})[""+I.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",l[""+I.LIST_ITEM_CLASS]="mdc-list-item",l[""+I.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",l[""+I.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",l[""+I.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",l[""+I.ROOT]="mdc-list",l),A=((m={})[""+I.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",m[""+I.LIST_ITEM_CLASS]="mdc-deprecated-list-item",m[""+I.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",m[""+I.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",m[""+I.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",m[""+I.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",m[""+I.ROOT]="mdc-deprecated-list",m),v={ACTION_EVENT:"MDCList:action",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+I.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+I.LIST_ITEM_CLASS+" a,\n ."+A[I.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+A[I.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+I.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+I.LIST_ITEM_CLASS+" a,\n ."+I.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+I.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled),\n .'+A[I.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+A[I.LIST_ITEM_CLASS]+" a,\n ."+A[I.LIST_ITEM_CLASS]+' input[type="radio"]:not(:disabled),\n .'+A[I.LIST_ITEM_CLASS]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},T={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},x=["input","button","textarea","select"],C=function(t){var i=t.target;if(i){var n=(""+i.tagName).toLowerCase();-1===x.indexOf(n)&&t.preventDefault()}};
39
+ /**
40
+ * @license
41
+ * Copyright 2018 Google Inc.
42
+ *
43
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
44
+ * of this software and associated documentation files (the "Software"), to deal
45
+ * in the Software without restriction, including without limitation the rights
46
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
47
+ * copies of the Software, and to permit persons to whom the Software is
48
+ * furnished to do so, subject to the following conditions:
49
+ *
50
+ * The above copyright notice and this permission notice shall be included in
51
+ * all copies or substantial portions of the Software.
52
+ *
53
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
55
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
56
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
57
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
58
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
59
+ * THE SOFTWARE.
60
+ */function _(t,i){var n,e=t.nextChar,s=t.focusItemAtIndex,r=t.sortedIndexByFirstChar,o=t.focusedItemIndex,u=t.skipFocus,h=t.isItemAtIndexDisabled;return clearTimeout(i.bufferClearTimeout),i.bufferClearTimeout=setTimeout((function(){p(i)}),T.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),i.typeaheadBuffer=i.typeaheadBuffer+e,-1===(n=1===i.typeaheadBuffer.length?function(t,i,n,e){var s=e.typeaheadBuffer[0],r=t.get(s);if(!r)return-1;if(s===e.currentFirstChar&&r[e.sortedIndexCursor].index===i){e.sortedIndexCursor=(e.sortedIndexCursor+1)%r.length;var o=r[e.sortedIndexCursor].index;if(!n(o))return o}e.currentFirstChar=s;var u,h=-1;for(u=0;u<r.length;u++)if(!n(r[u].index)){h=u;break}for(;u<r.length;u++)if(r[u].index>i&&!n(r[u].index)){h=u;break}return-1!==h?(e.sortedIndexCursor=h,r[e.sortedIndexCursor].index):-1}(r,o,h,i):function(t,i,n){var e=t.get(n.typeaheadBuffer[0]);if(!e)return-1;var s=e[n.sortedIndexCursor];if(0===s.text.lastIndexOf(n.typeaheadBuffer,0)&&!i(s.index))return s.index;for(var r=(n.sortedIndexCursor+1)%e.length,o=-1;r!==n.sortedIndexCursor;){var u=e[r],h=0===u.text.lastIndexOf(n.typeaheadBuffer,0),c=!i(u.index);if(h&&c){o=r;break}r=(r+1)%e.length}return-1!==o?(n.sortedIndexCursor=o,e[n.sortedIndexCursor].index):-1}(r,h,i))||u||s(n),n}function O(t){return t.typeaheadBuffer.length>0}function p(t){t.typeaheadBuffer=""}function g(t,i){var n=t.event,e=t.isTargetListItem,r=t.focusedItemIndex,o=t.focusItemAtIndex,u=t.sortedIndexByFirstChar,h=t.isItemAtIndexDisabled,c="ArrowLeft"===s(n),f="ArrowUp"===s(n),a="ArrowRight"===s(n),d="ArrowDown"===s(n),l="Home"===s(n),m="End"===s(n),b="Enter"===s(n),I="Spacebar"===s(n);return n.ctrlKey||n.metaKey||c||f||a||d||l||m||b?-1:I||1!==n.key.length?I?(e&&C(n),e&&O(i)?_({focusItemAtIndex:o,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:u,skipFocus:!1,isItemAtIndexDisabled:h},i):-1):-1:(C(n),_({focusItemAtIndex:o,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:u,skipFocus:!1,isItemAtIndexDisabled:h},i))}
61
+ /**
62
+ * @license
63
+ * Copyright 2018 Google Inc.
64
+ *
65
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
66
+ * of this software and associated documentation files (the "Software"), to deal
67
+ * in the Software without restriction, including without limitation the rights
68
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69
+ * copies of the Software, and to permit persons to whom the Software is
70
+ * furnished to do so, subject to the following conditions:
71
+ *
72
+ * The above copyright notice and this permission notice shall be included in
73
+ * all copies or substantial portions of the Software.
74
+ *
75
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
81
+ * THE SOFTWARE.
82
+ */var y=function(t){function i(n){var e=t.call(this,b(b({},i.defaultAdapter),n))||this;return e.wrapFocus=!1,e.isVertical=!0,e.isSingleSelectionList=!1,e.selectedIndex=T.UNSET_INDEX,e.focusedItemIndex=T.UNSET_INDEX,e.useActivatedClass=!1,e.useSelectedAttr=!1,e.ariaCurrentAttrValue=null,e.isCheckboxList=!1,e.isRadioList=!1,e.hasTypeahead=!1,e.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},e.sortedIndexByFirstChar=new Map,e}return d(i,t),Object.defineProperty(i,"strings",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(i,"cssClasses",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),i.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},i.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},i.prototype.setWrapFocus=function(t){this.wrapFocus=t},i.prototype.setVerticalOrientation=function(t){this.isVertical=t},i.prototype.setSingleSelection=function(t){this.isSingleSelectionList=t,t&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},i.prototype.maybeInitializeSingleSelection=function(){var t=this.getSelectedIndexFromDOM();t!==T.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=t)},i.prototype.getSelectedIndexFromDOM=function(){for(var t=T.UNSET_INDEX,i=this.adapter.getListItemCount(),n=0;n<i;n++){var e=this.adapter.listItemAtIndexHasClass(n,I.LIST_ITEM_SELECTED_CLASS),s=this.adapter.listItemAtIndexHasClass(n,I.LIST_ITEM_ACTIVATED_CLASS);if(e||s){t=n;break}}return t},i.prototype.setHasTypeahead=function(t){this.hasTypeahead=t,t&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},i.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&O(this.typeaheadState)},i.prototype.setUseActivatedClass=function(t){this.useActivatedClass=t},i.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr=t},i.prototype.getSelectedIndex=function(){return this.selectedIndex},i.prototype.setSelectedIndex=function(t,i){var n=(void 0===i?{}:i).forceUpdate;this.isIndexValid(t)&&(this.isCheckboxList?this.setCheckboxAtIndex(t):this.isRadioList?this.setRadioAtIndex(t):this.setSingleSelectionAtIndex(t,{forceUpdate:n}))},i.prototype.handleFocusIn=function(t){t>=0&&(this.focusedItemIndex=t,this.adapter.setAttributeForElementIndex(t,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(t,"0"))},i.prototype.handleFocusOut=function(t){var i=this;t>=0&&(this.adapter.setAttributeForElementIndex(t,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(t,"-1")),setTimeout((function(){i.adapter.isFocusInsideList()||i.setTabindexToFirstSelectedOrFocusedItem()}),0)},i.prototype.handleKeydown=function(t,i,n){var e=this,r="ArrowLeft"===s(t),o="ArrowUp"===s(t),u="ArrowRight"===s(t),h="ArrowDown"===s(t),c="Home"===s(t),f="End"===s(t),a="Enter"===s(t),d="Spacebar"===s(t),l="A"===t.key||"a"===t.key;if(this.adapter.isRootFocused())o||f?(t.preventDefault(),this.focusLastElement()):(h||c)&&(t.preventDefault(),this.focusFirstElement()),this.hasTypeahead&&g({event:t,focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:-1,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState);else{var m=this.adapter.getFocusedElementIndex();if(!(-1===m&&(m=n)<0)){if(this.isVertical&&h||!this.isVertical&&u)C(t),this.focusNextElement(m);else if(this.isVertical&&o||!this.isVertical&&r)C(t),this.focusPrevElement(m);else if(c)C(t),this.focusFirstElement();else if(f)C(t),this.focusLastElement();else if(l&&t.ctrlKey&&this.isCheckboxList)t.preventDefault(),this.toggleAll(this.selectedIndex===T.UNSET_INDEX?[]:this.selectedIndex);else if((a||d)&&i){var b=t.target;if(b&&"A"===b.tagName&&a)return;if(C(t),this.adapter.listItemAtIndexHasClass(m,I.LIST_ITEM_DISABLED_CLASS))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(m),this.adapter.notifyAction(m))}this.hasTypeahead&&g({event:t,focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:i,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)}}},i.prototype.handleClick=function(t,i){t!==T.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList()&&this.setSelectedIndexOnAction(t,i),this.adapter.notifyAction(t)))},i.prototype.focusNextElement=function(t){var i=t+1;if(i>=this.adapter.getListItemCount()){if(!this.wrapFocus)return t;i=0}return this.focusItemAtIndex(i),i},i.prototype.focusPrevElement=function(t){var i=t-1;if(i<0){if(!this.wrapFocus)return t;i=this.adapter.getListItemCount()-1}return this.focusItemAtIndex(i),i},i.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},i.prototype.focusLastElement=function(){var t=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(t),t},i.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},i.prototype.setEnabled=function(t,i){this.isIndexValid(t)&&(i?(this.adapter.removeClassForElementIndex(t,I.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,v.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,I.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,v.ARIA_DISABLED,"true")))},i.prototype.setSingleSelectionAtIndex=function(t,i){if(this.selectedIndex!==t||(void 0===i?{}:i).forceUpdate){var n=I.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=I.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==T.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(t),this.setTabindexAtIndex(t),t!==T.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,n),this.selectedIndex=t}},i.prototype.setAriaForSingleSelectionAtIndex=function(t){this.selectedIndex===T.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(t,v.ARIA_CURRENT));var i=null!==this.ariaCurrentAttrValue,n=i?v.ARIA_CURRENT:v.ARIA_SELECTED;this.selectedIndex!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),t!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,n,i?this.ariaCurrentAttrValue:"true")},i.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?v.ARIA_SELECTED:v.ARIA_CHECKED},i.prototype.setRadioAtIndex=function(t){var i=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,i,"false"),this.adapter.setAttributeForElementIndex(t,i,"true"),this.selectedIndex=t},i.prototype.setCheckboxAtIndex=function(t){for(var i=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var e=!1;t.indexOf(n)>=0&&(e=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,e),this.adapter.setAttributeForElementIndex(n,i,e?"true":"false")}this.selectedIndex=t},i.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===T.UNSET_INDEX&&0!==t?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===t||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),t!==T.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},i.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},i.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},i.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?"number"==typeof this.selectedIndex&&this.selectedIndex!==T.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce((function(t,i){return Math.min(t,i)})):0:Math.max(this.focusedItemIndex,0)},i.prototype.isIndexValid=function(t){var i=this;if(t instanceof Array){if(!this.isCheckboxList)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some((function(t){return i.isIndexInRange(t)}))}if("number"==typeof t){if(this.isCheckboxList)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange(t)||this.isSingleSelectionList&&t===T.UNSET_INDEX}return!1},i.prototype.isIndexInRange=function(t){var i=this.adapter.getListItemCount();return t>=0&&t<i},i.prototype.setSelectedIndexOnAction=function(t,i){void 0===i&&(i=!0),this.isCheckboxList?this.toggleCheckboxAtIndex(t,i):this.setSelectedIndex(t)},i.prototype.toggleCheckboxAtIndex=function(t,i){var n=this.getSelectionAttribute(),e=this.adapter.isCheckboxCheckedAtIndex(t);i&&this.adapter.setCheckedCheckboxOrRadioAtIndex(t,e=!e),this.adapter.setAttributeForElementIndex(t,n,e?"true":"false");var s=this.selectedIndex===T.UNSET_INDEX?[]:this.selectedIndex.slice();e?s.push(t):s=s.filter((function(i){return i!==t})),this.selectedIndex=s},i.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t),this.focusedItemIndex=t},i.prototype.toggleAll=function(t){var i=this.adapter.getListItemCount();if(t.length===i)this.setCheckboxAtIndex([]);else{for(var n=[],e=0;e<i;e++)(!this.adapter.listItemAtIndexHasClass(e,I.LIST_ITEM_DISABLED_CLASS)||t.indexOf(e)>-1)&&n.push(e);this.setCheckboxAtIndex(n)}},i.prototype.typeaheadMatchItem=function(t,i,n){var e=this;return void 0===n&&(n=!1),_({focusItemAtIndex:function(t){e.focusItemAtIndex(t)},focusedItemIndex:i||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(t){return e.adapter.listItemAtIndexHasClass(t,I.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},i.prototype.typeaheadInitSortedIndex=function(){return function(t,i){for(var n=new Map,e=0;e<t;e++){var s=i(e).trim();if(s){var r=s[0].toLowerCase();n.has(r)||n.set(r,[]),n.get(r).push({text:s.toLowerCase(),index:e})}}return n.forEach((function(t){t.sort((function(t,i){return t.index-i.index}))})),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},i.prototype.clearTypeaheadBuffer=function(){p(this.typeaheadState)},i}(t),S=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return d(i,t),Object.defineProperty(i.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"listElements",{get:function(){return Array.from(this.root.querySelectorAll("."+this.classNameMap[I.LIST_ITEM_CLASS]))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:!1,configurable:!0}),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){this.isEvolutionEnabled="evolution"in this.root.dataset,this.classNameMap=this.isEvolutionEnabled?E:n(this.root,v.DEPRECATED_SELECTOR)?A:Object.values(I).reduce((function(t,i){return t[i]=i,t}),{}),this.handleClick=this.handleClickEvent.bind(this),this.handleKeydown=this.handleKeydownEvent.bind(this),this.focusInEventListener=this.handleFocusInEvent.bind(this),this.focusOutEventListener=this.handleFocusOutEvent.bind(this),this.listen("keydown",this.handleKeydown),this.listen("click",this.handleClick),this.listen("focusin",this.focusInEventListener),this.listen("focusout",this.focusOutEventListener),this.layout(),this.initializeListType(),this.ensureFocusable()},i.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten("click",this.handleClick),this.unlisten("focusin",this.focusInEventListener),this.unlisten("focusout",this.focusOutEventListener)},i.prototype.layout=function(){var t=this.root.getAttribute(v.ARIA_ORIENTATION);this.vertical=t!==v.ARIA_ORIENTATION_HORIZONTAL;var i=v.FOCUSABLE_CHILD_ELEMENTS,n=this.root.querySelectorAll("."+this.classNameMap[I.LIST_ITEM_CLASS]+":not([tabindex])");n.length&&Array.prototype.forEach.call(n,(function(t){t.setAttribute("tabindex","-1")}));var e=this.root.querySelectorAll(i);e.length&&Array.prototype.forEach.call(e,(function(t){t.setAttribute("tabindex","-1")})),this.isEvolutionEnabled&&this.foundation.setUseSelectedAttribute(!0),this.foundation.layout()},i.prototype.getPrimaryText=function(t){var i,n=t.querySelector("."+this.classNameMap[I.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(this.isEvolutionEnabled||n)return null!==(i=null==n?void 0:n.textContent)&&void 0!==i?i:"";var e=t.querySelector("."+this.classNameMap[I.LIST_ITEM_TEXT_CLASS]);return e&&e.textContent||""},i.prototype.initializeListType=function(){var t=this;if(this.isInteractive=n(this.root,v.ARIA_INTERACTIVE_ROLES_SELECTOR),this.isEvolutionEnabled&&this.isInteractive){var i=Array.from(this.root.querySelectorAll(v.SELECTED_ITEM_SELECTOR),(function(i){return t.listElements.indexOf(i)}));n(this.root,v.ARIA_MULTI_SELECTABLE_SELECTOR)?this.selectedIndex=i:i.length>0&&(this.selectedIndex=i[0])}else{var e=this.root.querySelectorAll(v.ARIA_ROLE_CHECKBOX_SELECTOR),s=this.root.querySelector(v.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var r=this.root.querySelectorAll(v.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(r,(function(i){return t.listElements.indexOf(i)}))}else s&&(this.selectedIndex=this.listElements.indexOf(s))}},i.prototype.setEnabled=function(t,i){this.foundation.setEnabled(t,i)},i.prototype.typeaheadMatchItem=function(t,i){return this.foundation.typeaheadMatchItem(t,i,!0)},i.prototype.getDefaultFoundation=function(){var t=this;return new y({addClassForElementIndex:function(i,n){var e=t.listElements[i];e&&e.classList.add(t.classNameMap[n])},focusItemAtIndex:function(i){var n=t.listElements[i];n&&n.focus()},getAttributeForElementIndex:function(i,n){return t.listElements[i].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(i){return t.getPrimaryText(t.listElements[i])},hasCheckboxAtIndex:function(i){return!!t.listElements[i].querySelector(v.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(i){return!!t.listElements[i].querySelector(v.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(i){return t.listElements[i].querySelector(v.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(i,n){return t.listElements[i].classList.contains(t.classNameMap[n])},notifyAction:function(i){t.emit(v.ACTION_EVENT,{index:i},!0)},removeClassForElementIndex:function(i,n){var e=t.listElements[i];e&&e.classList.remove(t.classNameMap[n])},setAttributeForElementIndex:function(i,n,e){var s=t.listElements[i];s&&s.setAttribute(n,e)},setCheckedCheckboxOrRadioAtIndex:function(i,n){var e=t.listElements[i].querySelector(v.CHECKBOX_RADIO_SELECTOR);e.checked=n;var s=document.createEvent("Event");s.initEvent("change",!0,!0),e.dispatchEvent(s)},setTabIndexForListItemChildren:function(i,n){Array.prototype.forEach.call(t.listElements[i].querySelectorAll(v.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX),(function(t){t.setAttribute("tabindex",n)}))}})},i.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive&&!this.root.querySelector("."+this.classNameMap[I.LIST_ITEM_CLASS]+'[tabindex="0"]')){var t=this.initialFocusIndex();-1!==t&&(this.listElements[t].tabIndex=0)}},i.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0)return this.selectedIndex[0];if("number"==typeof this.selectedIndex&&this.selectedIndex!==T.UNSET_INDEX)return this.selectedIndex;var t=this.root.querySelector("."+this.classNameMap[I.LIST_ITEM_CLASS]+":not(."+this.classNameMap[I.LIST_ITEM_DISABLED_CLASS]+")");return null===t?-1:this.getListItemIndex(t)},i.prototype.getListItemIndex=function(t){var i=e(t,"."+this.classNameMap[I.LIST_ITEM_CLASS]+", ."+this.classNameMap[I.ROOT]);return i&&n(i,"."+this.classNameMap[I.LIST_ITEM_CLASS])?this.listElements.indexOf(i):-1},i.prototype.handleFocusInEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleFocusIn(i)},i.prototype.handleFocusOutEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleFocusOut(i)},i.prototype.handleKeydownEvent=function(t){var i=this.getListItemIndex(t.target);this.foundation.handleKeydown(t,t.target.classList.contains(this.classNameMap[I.LIST_ITEM_CLASS]),i)},i.prototype.handleClickEvent=function(t){var i=this.getListItemIndex(t.target),e=!n(t.target,v.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(i,e)},i}(i),R=function(t,i){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])})(t,i)};
83
+ /**
84
+ * @license
85
+ * Copyright 2018 Google Inc.
86
+ *
87
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
88
+ * of this software and associated documentation files (the "Software"), to deal
89
+ * in the Software without restriction, including without limitation the rights
90
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
91
+ * copies of the Software, and to permit persons to whom the Software is
92
+ * furnished to do so, subject to the following conditions:
93
+ *
94
+ * The above copyright notice and this permission notice shall be included in
95
+ * all copies or substantial portions of the Software.
96
+ *
97
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
99
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
100
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
101
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
102
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
103
+ * THE SOFTWARE.
104
+ */function L(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function n(){this.constructor=t}R(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}var w=function(){return(w=Object.assign||function(t){for(var i,n=1,e=arguments.length;n<e;n++)for(var s in i=arguments[n])Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s]);return t}).apply(this,arguments)},D=function(t){function i(n){var e=t.call(this,w(w({},i.defaultAdapter),n))||this;return e.isSurfaceOpen=!1,e.isQuickOpen=!1,e.isHoistedElement=!1,e.isFixedPosition=!1,e.isHorizontallyCenteredOnViewport=!1,e.maxHeight=0,e.openAnimationEndTimerId=0,e.closeAnimationEndTimerId=0,e.animationRequestId=0,e.anchorCorner=u.TOP_START,e.originCorner=u.TOP_START,e.anchorMargin={top:0,right:0,bottom:0,left:0},e.position={x:0,y:0},e}return L(i,t),Object.defineProperty(i,"cssClasses",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return c},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return f},enumerable:!1,configurable:!0}),Object.defineProperty(i,"Corner",{get:function(){return u},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){},notifyClosing:function(){}}},enumerable:!1,configurable:!0}),i.prototype.init=function(){var t=i.cssClasses,n=t.ROOT,e=t.OPEN;if(!this.adapter.hasClass(n))throw new Error(n+" class required in root element.");this.adapter.hasClass(e)&&(this.isSurfaceOpen=!0)},i.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},i.prototype.setAnchorCorner=function(t){this.anchorCorner=t},i.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^o.RIGHT},i.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},i.prototype.setIsHoisted=function(t){this.isHoistedElement=t},i.prototype.setFixedPosition=function(t){this.isFixedPosition=t},i.prototype.isFixed=function(){return this.isFixedPosition},i.prototype.setAbsolutePosition=function(t,i){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(i)?i:0},i.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},i.prototype.setQuickOpen=function(t){this.isQuickOpen=t},i.prototype.setMaxHeight=function(t){this.maxHeight=t},i.prototype.isOpen=function(){return this.isSurfaceOpen},i.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(i.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(i.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame((function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(i.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout((function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(i.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()}),f.TRANSITION_OPEN_DURATION)})),this.isSurfaceOpen=!0))},i.prototype.close=function(t){var n=this;if(void 0===t&&(t=!1),this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen)return this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(i.cssClasses.OPEN),this.adapter.removeClass(i.cssClasses.IS_OPEN_BELOW),void this.adapter.notifyClose();this.adapter.addClass(i.cssClasses.ANIMATING_CLOSED),requestAnimationFrame((function(){n.adapter.removeClass(i.cssClasses.OPEN),n.adapter.removeClass(i.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout((function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(i.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()}),f.TRANSITION_CLOSE_DURATION)})),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},i.prototype.handleBodyClick=function(t){this.adapter.isElementInContainer(t.target)||this.close()},i.prototype.handleKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&this.close()},i.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var n=this.getoriginCorner(),e=this.getMenuSurfaceMaxHeight(n),s=this.hasBit(n,o.BOTTOM)?"bottom":"top",r=this.hasBit(n,o.RIGHT)?"right":"left",u=this.getHorizontalOriginOffset(n),h=this.getVerticalOriginOffset(n),c=this.measurements,a=c.anchorSize,d=c.surfaceSize,l=((t={})[r]=u,t[s]=h,t);a.width/d.width>f.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(r="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(l),this.adapter.setTransformOrigin(r+" "+s),this.adapter.setPosition(l),this.adapter.setMaxHeight(e?e+"px":""),this.hasBit(n,o.BOTTOM)||this.adapter.addClass(i.cssClasses.IS_OPEN_BELOW)},i.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),i=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),e=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:e}},i.prototype.getoriginCorner=function(){var t,n,e=this.originCorner,s=this.measurements,r=s.viewportDistance,u=s.anchorSize,h=s.surfaceSize,c=i.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,o.BOTTOM)?(t=r.top-c+this.anchorMargin.bottom,n=r.bottom-c-this.anchorMargin.bottom):(t=r.top-c+this.anchorMargin.top,n=r.bottom-c+u.height-this.anchorMargin.top),!(n-h.height>0)&&t>n&&(e=this.setBit(e,o.BOTTOM));var f,a,d,l=this.adapter.isRtl(),m=this.hasBit(this.anchorCorner,o.FLIP_RTL),b=this.hasBit(this.anchorCorner,o.RIGHT)||this.hasBit(e,o.RIGHT);(d=l&&m?!b:b)?(f=r.left+u.width+this.anchorMargin.right,a=r.right-this.anchorMargin.right):(f=r.left+this.anchorMargin.left,a=r.right+u.width-this.anchorMargin.left);var I=f-h.width>0,E=a-h.width>0,A=this.hasBit(e,o.FLIP_RTL)&&this.hasBit(e,o.RIGHT);return E&&A&&l||!I&&A?e=this.unsetBit(e,o.RIGHT):(I&&d&&l||I&&!d&&b||!E&&f>=a)&&(e=this.setBit(e,o.RIGHT)),e},i.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var n=this.measurements.viewportDistance,e=0,s=this.hasBit(t,o.BOTTOM),r=this.hasBit(this.anchorCorner,o.BOTTOM),u=i.numbers.MARGIN_TO_EDGE;return s?(e=n.top+this.anchorMargin.top-u,r||(e+=this.measurements.anchorSize.height)):(e=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-u,r&&(e-=this.measurements.anchorSize.height)),e},i.prototype.getHorizontalOriginOffset=function(t){var i=this.measurements.anchorSize,n=this.hasBit(t,o.RIGHT),e=this.hasBit(this.anchorCorner,o.RIGHT);if(n){var s=e?i.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?s-(this.measurements.viewportSize.width-this.measurements.bodySize.width):s}return e?i.width-this.anchorMargin.right:this.anchorMargin.left},i.prototype.getVerticalOriginOffset=function(t){var i=this.measurements.anchorSize,n=this.hasBit(t,o.BOTTOM),e=this.hasBit(this.anchorCorner,o.BOTTOM);return n?e?i.height-this.anchorMargin.top:-this.anchorMargin.bottom:e?i.height+this.anchorMargin.bottom:this.anchorMargin.top},i.prototype.adjustPositionForHoistedElement=function(t){var i,n,e=this.measurements,s=e.windowScroll,r=e.viewportDistance,o=e.surfaceSize,u=e.viewportSize,h=Object.keys(t);try{for(var c=function(t){var i="function"==typeof Symbol&&Symbol.iterator,n=i&&t[i],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}
105
+ /**
106
+ * @license
107
+ * Copyright 2018 Google Inc.
108
+ *
109
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
110
+ * of this software and associated documentation files (the "Software"), to deal
111
+ * in the Software without restriction, including without limitation the rights
112
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
113
+ * copies of the Software, and to permit persons to whom the Software is
114
+ * furnished to do so, subject to the following conditions:
115
+ *
116
+ * The above copyright notice and this permission notice shall be included in
117
+ * all copies or substantial portions of the Software.
118
+ *
119
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
122
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
123
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
124
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
125
+ * THE SOFTWARE.
126
+ */(h),f=c.next();!f.done;f=c.next()){var a=f.value,d=t[a]||0;!this.isHorizontallyCenteredOnViewport||"left"!==a&&"right"!==a?(d+=r[a],this.isFixedPosition||("top"===a?d+=s.y:"bottom"===a?d-=s.y:"left"===a?d+=s.x:d-=s.x),t[a]=d):t[a]=(u.width-o.width)/2}}catch(t){i={error:t}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}},i.prototype.maybeRestoreFocus=function(){var t=this,i=this.adapter.isFocused(),n=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(i||n)&&setTimeout((function(){t.adapter.restoreFocus()}),f.TOUCH_EVENT_WAIT_MS)},i.prototype.hasBit=function(t,i){return Boolean(t&i)},i.prototype.setBit=function(t,i){return t|i},i.prototype.unsetBit=function(t,i){return t^i},i.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},i}(t),F=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return L(i,t),i.attachTo=function(t){return new i(t)},i.prototype.initialSyncWithDOM=function(){var t=this,i=this.root.parentElement;this.anchorElement=i&&i.classList.contains(h.ANCHOR)?i:null,this.root.classList.contains(h.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(i){t.foundation.handleKeydown(i)},this.handleBodyClick=function(i){t.foundation.handleBodyClick(i)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(c.OPENED_EVENT,this.registerBodyClickListener),this.listen(c.CLOSED_EVENT,this.deregisterBodyClickListener)},i.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(c.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(c.CLOSED_EVENT,this.deregisterBodyClickListener),t.prototype.destroy.call(this)},i.prototype.isOpen=function(){return this.foundation.isOpen()},i.prototype.open=function(){this.foundation.open()},i.prototype.close=function(t){void 0===t&&(t=!1),this.foundation.close(t)},Object.defineProperty(i.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!1,configurable:!0}),i.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)},i.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},i.prototype.setFixedPosition=function(t){t?this.root.classList.add(h.FIXED):this.root.classList.remove(h.FIXED),this.foundation.setFixedPosition(t)},i.prototype.setAbsolutePosition=function(t,i){this.foundation.setAbsolutePosition(t,i),this.setIsHoisted(!0)},i.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)},i.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)},i.prototype.getDefaultFoundation=function(){var t=this;return new D({addClass:function(i){return t.root.classList.add(i)},removeClass:function(i){return t.root.classList.remove(i)},hasClass:function(i){return t.root.classList.contains(i)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(D.strings.CLOSED_EVENT,{})},notifyClosing:function(){t.emit(D.strings.CLOSING_EVENT,{})},notifyOpen:function(){return t.emit(D.strings.OPENED_EVENT,{})},isElementInContainer:function(i){return t.root.contains(i)},isRtl:function(){return"rtl"===getComputedStyle(t.root).getPropertyValue("direction")},setTransformOrigin:function(i){var n=r(window,"transform")+"-origin";t.root.style.setProperty(n,i)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){t.root.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(i){var n=t.root;n.style.left="left"in i?i.left+"px":"",n.style.right="right"in i?i.right+"px":"",n.style.top="top"in i?i.top+"px":"",n.style.bottom="bottom"in i?i.bottom+"px":""},setMaxHeight:function(i){t.root.style.maxHeight=i}})},i}(i);export{u as C,D as M,y as a,F as b,I as c,S as d,T as n,v as s}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s,g as i}from"./p-e9a95b8f.js";const o=class{constructor(i){t(this,i),this.change=e(this,"change",7),this.flowItems=[],this.disabled=!1,this.readonly=!1,this.renderRegularFlowItem=(t,e,i)=>s("limel-progress-flow-item",{class:{"flow-item":!0,first:0===e,last:e===i.length-1,passed:e<this.selectedItemIndex,selected:t.selected},style:this.getItemStyle(t),disabled:this.disabled||this.readonly,readonly:this.readonly,item:t,onInteract:this.handleFlowItemClick(t)}),this.renderEndPhaseItem=(t,e,i)=>s("limel-progress-flow-item",{class:{"flow-item":!0,"off-progress-item":!0,selected:t.selected,"first-off-progress-item":0===e,"last-off-progress-item":e===i.length-1},style:this.getItemStyle(t),disabled:this.disabled||this.readonly,readonly:this.readonly,item:t,onInteract:this.handleFlowItemClick(t)}),this.handleFlowItemClick=t=>()=>{t.selected||t.disabled||this.disabled||this.change.emit(t)}}componentDidRender(){this.scrollToSelectedItem()}render(){const t=this.flowItems.filter((t=>!t.isOffProgress)),e=this.flowItems.filter((t=>t.isOffProgress));return this.selectedItemIndex=t.findIndex((t=>t.selected)),[t.map(this.renderRegularFlowItem),e.map(this.renderEndPhaseItem)]}getItemStyle(t){const e={};return(null==t?void 0:t.selectedColor)&&(e["--progress-flow-step-background-color--selected"]=t.selectedColor),(null==t?void 0:t.passedColor)&&(e["--progress-flow-step-background-color--passed"]=t.passedColor),(null==t?void 0:t.iconColor)&&(e["--progress-flow-icon-color--inactive"]=t.iconColor),e}scrollToSelectedItem(){const t=this.getElementForSelectedItem();t&&this.element.scrollTo({behavior:"smooth",left:t.offsetLeft-this.element.offsetLeft-this.element.offsetWidth/2+t.offsetWidth/2})}getElementForSelectedItem(){return this.element.shadowRoot.querySelector(".flow-item.selected")}get element(){return i(this)}};o.style=":host{--step-height:2.5rem;--selected-indicator-right:-0.5rem;--max-text-width:10rem;box-sizing:border-box;width:100%;display:flex;flex-direction:row;align-items:flex-start;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none;padding:0.25rem}:host::-webkit-scrollbar{display:none}:host(.is-narrow){--step-height:1.5rem;--selected-indicator-right:0}";export{o as limel_progress_flow}