@vonage/vivid 5.15.0 → 5.16.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 (730) hide show
  1. package/README.md +1 -1
  2. package/accordion/definition.cjs +7 -212
  3. package/accordion/definition.js +2 -204
  4. package/accordion/index.cjs +4 -4
  5. package/accordion/index.js +93 -138
  6. package/accordion-item/definition.cjs +6 -146
  7. package/accordion-item/definition.js +2 -139
  8. package/accordion-item/index.cjs +1 -1
  9. package/accordion-item/index.js +6 -2
  10. package/action-group/definition.cjs +5 -69
  11. package/action-group/definition.js +1 -62
  12. package/action-group/index.cjs +4 -4
  13. package/action-group/index.js +16 -46
  14. package/alert/definition.cjs +6 -201
  15. package/alert/definition.js +2 -194
  16. package/alert/index.cjs +15 -15
  17. package/alert/index.js +90 -136
  18. package/audio-player/definition.cjs +6 -463
  19. package/audio-player/definition.js +2 -456
  20. package/audio-player/index.cjs +49 -49
  21. package/audio-player/index.js +234 -308
  22. package/avatar/definition.cjs +6 -117
  23. package/avatar/definition.js +2 -110
  24. package/avatar/index.cjs +14 -14
  25. package/avatar/index.js +44 -84
  26. package/badge/definition.cjs +6 -85
  27. package/badge/definition.js +2 -78
  28. package/badge/index.cjs +4 -4
  29. package/badge/index.js +21 -65
  30. package/banner/definition.cjs +6 -160
  31. package/banner/definition.js +2 -153
  32. package/banner/index.cjs +13 -13
  33. package/banner/index.js +76 -109
  34. package/breadcrumb/definition.cjs +5 -98
  35. package/breadcrumb/definition.js +1 -91
  36. package/breadcrumb/index.cjs +4 -4
  37. package/breadcrumb/index.js +33 -60
  38. package/breadcrumb-item/definition.cjs +7 -47
  39. package/breadcrumb-item/definition.js +3 -40
  40. package/breadcrumb-item/index.cjs +5 -5
  41. package/breadcrumb-item/index.js +20 -32
  42. package/bundled/affix.cjs +10 -10
  43. package/bundled/affix.js +44 -57
  44. package/bundled/anchored.cjs +3 -3
  45. package/bundled/anchored.js +47 -65
  46. package/bundled/aria.cjs +1 -1
  47. package/bundled/aria.js +6 -6
  48. package/bundled/attribute-binding-behaviour.cjs +1 -1
  49. package/bundled/attribute-binding-behaviour.js +17 -30
  50. package/bundled/base-color-picker.cjs +10 -10
  51. package/bundled/base-color-picker.js +115 -202
  52. package/bundled/base-progress.cjs +1 -1
  53. package/bundled/base-progress.js +29 -59
  54. package/bundled/breadcrumb-item.cjs +1 -1
  55. package/bundled/breadcrumb-item.js +11 -20
  56. package/bundled/button.cjs +1 -1
  57. package/bundled/button.js +65 -109
  58. package/bundled/calendar-event.cjs +1 -1
  59. package/bundled/calendar-event.js +11 -34
  60. package/bundled/calendar-picker.template.cjs +77 -77
  61. package/bundled/calendar-picker.template.js +2881 -3297
  62. package/bundled/char-count.cjs +7 -7
  63. package/bundled/char-count.js +31 -46
  64. package/bundled/children.cjs +1 -1
  65. package/bundled/children.js +27 -45
  66. package/bundled/class-names.cjs +1 -1
  67. package/bundled/class-names.js +8 -8
  68. package/bundled/data-grid.options.cjs +1 -1
  69. package/bundled/data-grid.options.js +22 -26
  70. package/bundled/decorate.cjs +1 -0
  71. package/bundled/decorate.js +9 -0
  72. package/bundled/definition.cjs +1 -39
  73. package/bundled/definition.js +5 -122
  74. package/bundled/definition10.cjs +27 -69
  75. package/bundled/definition10.js +173 -362
  76. package/bundled/definition11.cjs +19 -12
  77. package/bundled/definition11.js +77 -93
  78. package/bundled/definition12.cjs +11 -11
  79. package/bundled/definition12.js +122 -217
  80. package/bundled/definition13.cjs +18 -9
  81. package/bundled/definition13.js +76 -42
  82. package/bundled/definition14.cjs +10 -1
  83. package/bundled/definition14.js +28 -19
  84. package/bundled/definition15.cjs +73 -5
  85. package/bundled/definition15.js +194 -28
  86. package/bundled/definition16.cjs +5 -30
  87. package/bundled/definition16.js +16 -79
  88. package/bundled/definition17.cjs +13 -19
  89. package/bundled/definition17.js +81 -105
  90. package/bundled/definition18.cjs +12 -13
  91. package/bundled/definition18.js +67 -147
  92. package/bundled/definition19.cjs +48 -48
  93. package/bundled/definition19.js +365 -699
  94. package/bundled/definition2.cjs +8 -8
  95. package/bundled/definition2.js +80 -124
  96. package/bundled/definition20.cjs +5 -20
  97. package/bundled/definition20.js +11 -106
  98. package/bundled/definition21.cjs +20 -5
  99. package/bundled/definition21.js +57 -18
  100. package/bundled/definition22.cjs +16 -16
  101. package/bundled/definition22.js +79 -141
  102. package/bundled/definition3.cjs +1 -29
  103. package/bundled/definition3.js +183 -195
  104. package/bundled/definition4.cjs +39 -6
  105. package/bundled/definition4.js +71 -41
  106. package/bundled/definition5.cjs +30 -1
  107. package/bundled/definition5.js +48 -351
  108. package/bundled/definition6.cjs +28 -30
  109. package/bundled/definition6.js +110 -265
  110. package/bundled/definition7.cjs +6 -30
  111. package/bundled/definition7.js +22 -291
  112. package/bundled/definition8.cjs +13 -18
  113. package/bundled/definition8.js +150 -143
  114. package/bundled/definition9.cjs +29 -13
  115. package/bundled/definition9.js +157 -232
  116. package/bundled/delegates-aria.cjs +1 -1
  117. package/bundled/delegates-aria.js +56 -90
  118. package/bundled/dialog.cjs +1 -0
  119. package/bundled/dialog.js +6 -0
  120. package/bundled/divider.cjs +1 -1
  121. package/bundled/divider.js +16 -33
  122. package/bundled/dom.cjs +1 -1
  123. package/bundled/dom.js +5 -5
  124. package/bundled/enums.cjs +1 -1
  125. package/bundled/enums.js +16 -9
  126. package/bundled/floating-ui.dom.cjs +1 -1
  127. package/bundled/floating-ui.dom.js +953 -1234
  128. package/bundled/form-associated.cjs +1 -1
  129. package/bundled/form-associated.js +165 -327
  130. package/bundled/form-element.cjs +1 -1
  131. package/bundled/form-element.js +33 -55
  132. package/bundled/host-semantics.cjs +1 -1
  133. package/bundled/host-semantics.js +46 -69
  134. package/bundled/key-codes.cjs +1 -1
  135. package/bundled/key-codes.js +4 -16
  136. package/bundled/linkable.cjs +6 -6
  137. package/bundled/linkable.js +25 -45
  138. package/bundled/listbox.cjs +1 -1
  139. package/bundled/listbox.js +176 -368
  140. package/bundled/localized.cjs +1 -1
  141. package/bundled/localized.js +451 -564
  142. package/bundled/mixins.cjs +20 -20
  143. package/bundled/mixins.js +162 -213
  144. package/bundled/normalize.cjs +1 -1
  145. package/bundled/normalize.js +6 -6
  146. package/bundled/numbers.cjs +1 -1
  147. package/bundled/numbers.js +9 -11
  148. package/bundled/picker-field.template.cjs +23 -23
  149. package/bundled/picker-field.template.js +108 -172
  150. package/bundled/playbackRates.cjs +1 -1
  151. package/bundled/playbackRates.js +10 -10
  152. package/bundled/ref.cjs +1 -1
  153. package/bundled/ref.js +10 -14
  154. package/bundled/repeat.cjs +1 -1
  155. package/bundled/repeat.js +421 -552
  156. package/bundled/scrollIntoView.cjs +1 -1
  157. package/bundled/scrollIntoView.js +26 -32
  158. package/bundled/single-date-picker.cjs +1 -1
  159. package/bundled/single-date-picker.js +23 -38
  160. package/bundled/single-value-picker.cjs +1 -1
  161. package/bundled/single-value-picker.js +58 -86
  162. package/bundled/slider.template.cjs +13 -13
  163. package/bundled/slider.template.js +67 -78
  164. package/bundled/slottable-request.cjs +4 -4
  165. package/bundled/slottable-request.js +1937 -2904
  166. package/bundled/slotted.cjs +1 -1
  167. package/bundled/slotted.js +47 -97
  168. package/bundled/strings.cjs +1 -1
  169. package/bundled/strings.js +6 -6
  170. package/bundled/text-field.cjs +1 -1
  171. package/bundled/text-field.js +4 -4
  172. package/bundled/time-selection-picker.template.cjs +26 -26
  173. package/bundled/time-selection-picker.template.js +355 -555
  174. package/bundled/trapped-focus.cjs +1 -1
  175. package/bundled/trapped-focus.js +18 -25
  176. package/bundled/vivid-element.cjs +4 -5
  177. package/bundled/vivid-element.js +1778 -2794
  178. package/bundled/when.cjs +1 -1
  179. package/bundled/when.js +10 -10
  180. package/bundled/with-contextual-help.cjs +1 -1
  181. package/bundled/with-contextual-help.js +15 -31
  182. package/bundled/with-error-text.cjs +1 -1
  183. package/bundled/with-error-text.js +25 -38
  184. package/bundled/with-success-text.cjs +1 -1
  185. package/bundled/with-success-text.js +8 -15
  186. package/button/definition.cjs +6 -14
  187. package/button/definition.js +3 -4
  188. package/button/index.cjs +1 -1
  189. package/button/index.js +6 -2
  190. package/calendar/definition.cjs +5 -360
  191. package/calendar/definition.js +1 -353
  192. package/calendar/index.cjs +20 -20
  193. package/calendar/index.js +346 -403
  194. package/calendar-event/definition.cjs +6 -58
  195. package/calendar-event/definition.js +2 -51
  196. package/calendar-event/index.cjs +7 -7
  197. package/calendar-event/index.js +25 -41
  198. package/card/definition.cjs +6 -194
  199. package/card/definition.js +2 -187
  200. package/card/index.cjs +34 -34
  201. package/card/index.js +80 -133
  202. package/checkbox/definition.cjs +6 -210
  203. package/checkbox/definition.js +2 -203
  204. package/checkbox/index.cjs +1 -1
  205. package/checkbox/index.js +6 -2
  206. package/color-picker/definition.cjs +6 -1180
  207. package/color-picker/definition.js +2 -1173
  208. package/color-picker/index.cjs +94 -94
  209. package/color-picker/index.js +605 -742
  210. package/combobox/definition.cjs +6 -653
  211. package/combobox/definition.js +2 -646
  212. package/combobox/index.cjs +37 -37
  213. package/combobox/index.js +254 -465
  214. package/contextual-help/definition.cjs +6 -63
  215. package/contextual-help/definition.js +2 -56
  216. package/contextual-help/index.cjs +1 -1
  217. package/contextual-help/index.js +6 -2
  218. package/country/definition.cjs +6 -340
  219. package/country/definition.js +2 -333
  220. package/country/index.cjs +6 -6
  221. package/country/index.js +1209 -308
  222. package/custom-elements.json +550 -1571
  223. package/data-grid/definition.cjs +10 -2363
  224. package/data-grid/definition.js +2 -2352
  225. package/data-grid/index.cjs +61 -61
  226. package/data-grid/index.js +642 -1024
  227. package/date-picker/definition.cjs +6 -152
  228. package/date-picker/definition.js +2 -145
  229. package/date-picker/index.cjs +1 -1
  230. package/date-picker/index.js +66 -114
  231. package/date-range-picker/definition.cjs +6 -469
  232. package/date-range-picker/definition.js +2 -462
  233. package/date-range-picker/index.cjs +1 -1
  234. package/date-range-picker/index.js +218 -338
  235. package/date-time-picker/definition.cjs +6 -285
  236. package/date-time-picker/definition.js +2 -278
  237. package/date-time-picker/index.cjs +4 -4
  238. package/date-time-picker/index.js +116 -211
  239. package/dial-pad/definition.cjs +6 -469
  240. package/dial-pad/definition.js +2 -462
  241. package/dial-pad/index.cjs +42 -42
  242. package/dial-pad/index.js +195 -311
  243. package/dialog/definition.cjs +6 -350
  244. package/dialog/definition.js +2 -343
  245. package/dialog/index.cjs +28 -28
  246. package/dialog/index.js +148 -230
  247. package/divider/definition.cjs +6 -42
  248. package/divider/definition.js +2 -35
  249. package/divider/index.cjs +1 -1
  250. package/divider/index.js +5 -2
  251. package/elevation/definition.cjs +4 -11
  252. package/elevation/definition.js +2 -2
  253. package/elevation/index.cjs +1 -1
  254. package/elevation/index.js +5 -2
  255. package/empty-state/definition.cjs +6 -86
  256. package/empty-state/definition.js +2 -79
  257. package/empty-state/index.cjs +9 -9
  258. package/empty-state/index.js +28 -60
  259. package/fab/definition.cjs +6 -106
  260. package/fab/definition.js +2 -99
  261. package/fab/index.cjs +17 -17
  262. package/fab/index.js +46 -82
  263. package/file-picker/definition.cjs +6 -526
  264. package/file-picker/definition.js +2 -519
  265. package/file-picker/index.cjs +25 -25
  266. package/file-picker/index.js +246 -354
  267. package/header/definition.cjs +5 -78
  268. package/header/definition.js +1 -71
  269. package/header/index.cjs +5 -5
  270. package/header/index.js +28 -42
  271. package/icon/definition.cjs +5 -200
  272. package/icon/definition.js +1 -193
  273. package/icon/index.cjs +1 -1
  274. package/icon/index.js +5 -2
  275. package/index.cjs +350 -356
  276. package/index.js +79 -78
  277. package/layout/definition.cjs +5 -72
  278. package/layout/definition.js +1 -65
  279. package/layout/index.cjs +2 -2
  280. package/layout/index.js +10 -51
  281. package/lib/alert/alert.d.ts +0 -1
  282. package/lib/audio-player/audio-player.d.ts +0 -1
  283. package/lib/banner/banner.d.ts +0 -2
  284. package/lib/button/button.d.ts +0 -1
  285. package/lib/calendar/calendar.d.ts +0 -1
  286. package/lib/card/card.d.ts +0 -2
  287. package/lib/combobox/combobox.d.ts +1 -1
  288. package/lib/data-grid/data-grid-cell.d.ts +0 -3
  289. package/lib/data-grid/data-grid-row.d.ts +0 -3
  290. package/lib/data-grid/data-grid.d.ts +0 -1
  291. package/lib/fab/fab.d.ts +0 -1
  292. package/lib/file-picker/file-picker.d.ts +1 -1
  293. package/lib/icon/icon.d.ts +0 -2
  294. package/lib/menu/menu.d.ts +0 -1
  295. package/lib/menu-item/menu-item.d.ts +0 -1
  296. package/lib/option/option.d.ts +4 -0
  297. package/lib/pagination/pagination.d.ts +0 -7
  298. package/lib/popover/popover.d.ts +0 -5
  299. package/lib/select/select.d.ts +2 -2
  300. package/lib/split-button/split-button.d.ts +0 -2
  301. package/lib/tab/tab.d.ts +0 -2
  302. package/lib/table/table-head.d.ts +1 -0
  303. package/lib/tabs/tabs.d.ts +0 -1
  304. package/lib/tag/tag.d.ts +0 -2
  305. package/lib/text-field/text-field.d.ts +0 -1
  306. package/lib/toggletip/toggletip.d.ts +0 -1
  307. package/lib/tree-item/tree-item.d.ts +0 -2
  308. package/lib/tree-view/tree-view.d.ts +0 -1
  309. package/locales/de-DE.cjs +382 -492
  310. package/locales/de-DE.js +383 -490
  311. package/locales/en-GB.cjs +271 -382
  312. package/locales/en-GB.js +272 -380
  313. package/locales/en-US.cjs +2 -552
  314. package/locales/en-US.js +1 -549
  315. package/locales/ja-JP.cjs +376 -492
  316. package/locales/ja-JP.js +377 -490
  317. package/locales/zh-CN.cjs +378 -495
  318. package/locales/zh-CN.js +379 -493
  319. package/menu/definition.cjs +6 -394
  320. package/menu/definition.js +2 -387
  321. package/menu/index.cjs +1 -1
  322. package/menu/index.js +6 -2
  323. package/menu-item/definition.cjs +7 -14
  324. package/menu-item/definition.js +3 -3
  325. package/menu-item/index.cjs +1 -1
  326. package/menu-item/index.js +6 -2
  327. package/nav/definition.cjs +5 -27
  328. package/nav/definition.js +1 -20
  329. package/nav/index.cjs +3 -3
  330. package/nav/index.js +7 -10
  331. package/nav-disclosure/definition.cjs +6 -122
  332. package/nav-disclosure/definition.js +2 -115
  333. package/nav-disclosure/index.cjs +8 -8
  334. package/nav-disclosure/index.js +49 -86
  335. package/nav-item/definition.cjs +6 -79
  336. package/nav-item/definition.js +2 -72
  337. package/nav-item/index.cjs +2 -2
  338. package/nav-item/index.js +33 -58
  339. package/note/definition.cjs +6 -61
  340. package/note/definition.js +2 -54
  341. package/note/index.cjs +5 -5
  342. package/note/index.js +24 -38
  343. package/number-field/definition.cjs +6 -440
  344. package/number-field/definition.js +2 -433
  345. package/number-field/index.cjs +31 -31
  346. package/number-field/index.js +160 -328
  347. package/option/definition.cjs +6 -13
  348. package/option/definition.js +3 -3
  349. package/option/index.cjs +1 -1
  350. package/option/index.js +6 -2
  351. package/package.json +24 -23
  352. package/pagination/definition.cjs +6 -256
  353. package/pagination/definition.js +2 -249
  354. package/pagination/index.cjs +37 -37
  355. package/pagination/index.js +148 -188
  356. package/popover/definition.cjs +6 -363
  357. package/popover/definition.js +2 -356
  358. package/popover/index.cjs +16 -16
  359. package/popover/index.js +161 -250
  360. package/popup/definition.cjs +5 -13
  361. package/popup/definition.js +3 -4
  362. package/popup/index.cjs +1 -1
  363. package/popup/index.js +6 -2
  364. package/progress/definition.cjs +5 -87
  365. package/progress/definition.js +1 -80
  366. package/progress/index.cjs +9 -9
  367. package/progress/index.js +33 -55
  368. package/progress-ring/definition.cjs +5 -95
  369. package/progress-ring/definition.js +1 -88
  370. package/progress-ring/index.cjs +1 -1
  371. package/progress-ring/index.js +5 -2
  372. package/radio/definition.cjs +5 -231
  373. package/radio/definition.js +1 -224
  374. package/radio/index.cjs +1 -1
  375. package/radio/index.js +5 -2
  376. package/radio-group/definition.cjs +6 -361
  377. package/radio-group/definition.js +2 -354
  378. package/radio-group/index.cjs +10 -10
  379. package/radio-group/index.js +160 -242
  380. package/range-slider/definition.cjs +6 -632
  381. package/range-slider/definition.js +2 -625
  382. package/range-slider/index.cjs +41 -41
  383. package/range-slider/index.js +259 -429
  384. package/rich-text-editor/definition.cjs +32 -15609
  385. package/rich-text-editor/definition.js +2 -15576
  386. package/rich-text-editor/index.cjs +17 -17
  387. package/rich-text-editor/index.js +9061 -11419
  388. package/rich-text-view/definition.cjs +5 -171
  389. package/rich-text-view/definition.js +1 -164
  390. package/rich-text-view/index.cjs +1 -1
  391. package/rich-text-view/index.js +68 -102
  392. package/searchable-select/definition.cjs +5 -1404
  393. package/searchable-select/definition.js +2 -1398
  394. package/searchable-select/index.cjs +94 -94
  395. package/searchable-select/index.js +600 -1019
  396. package/select/definition.cjs +6 -1012
  397. package/select/definition.js +2 -1005
  398. package/select/index.cjs +1 -1
  399. package/select/index.js +6 -2
  400. package/selectable-box/definition.cjs +6 -174
  401. package/selectable-box/definition.js +2 -167
  402. package/selectable-box/index.cjs +18 -18
  403. package/selectable-box/index.js +66 -127
  404. package/side-drawer/definition.cjs +5 -130
  405. package/side-drawer/definition.js +1 -123
  406. package/side-drawer/index.cjs +7 -7
  407. package/side-drawer/index.js +47 -92
  408. package/simple-color-picker/definition.cjs +6 -216
  409. package/simple-color-picker/definition.js +2 -209
  410. package/simple-color-picker/index.cjs +15 -15
  411. package/simple-color-picker/index.js +98 -135
  412. package/slider/definition.cjs +6 -504
  413. package/slider/definition.js +2 -497
  414. package/slider/index.cjs +1 -1
  415. package/slider/index.js +6 -2
  416. package/split-button/definition.cjs +6 -176
  417. package/split-button/definition.js +2 -169
  418. package/split-button/index.cjs +15 -15
  419. package/split-button/index.js +74 -135
  420. package/status/definition.cjs +6 -76
  421. package/status/definition.js +2 -69
  422. package/status/index.cjs +10 -7
  423. package/status/index.js +38 -48
  424. package/styles/core/all.css +6 -5
  425. package/styles/core/theme.css +6 -5
  426. package/styles/core/typography.css +1 -2
  427. package/styles/tokens/theme-dark.css +17 -21
  428. package/styles/tokens/theme-light.css +17 -21
  429. package/styles/tokens/vivid-2-compat.css +1 -2
  430. package/switch/definition.cjs +6 -149
  431. package/switch/definition.js +2 -142
  432. package/switch/index.cjs +8 -8
  433. package/switch/index.js +48 -93
  434. package/tab/definition.cjs +6 -127
  435. package/tab/definition.js +2 -120
  436. package/tab/index.cjs +1 -1
  437. package/tab/index.js +6 -2
  438. package/tab-panel/definition.cjs +5 -29
  439. package/tab-panel/definition.js +1 -22
  440. package/tab-panel/index.cjs +1 -1
  441. package/tab-panel/index.js +5 -2
  442. package/table/definition.cjs +15 -168
  443. package/table/definition.js +1 -151
  444. package/table/index.cjs +20 -16
  445. package/table/index.js +36 -85
  446. package/tabs/definition.cjs +7 -469
  447. package/tabs/definition.js +2 -461
  448. package/tabs/index.cjs +11 -11
  449. package/tabs/index.js +169 -298
  450. package/tag/definition.cjs +6 -176
  451. package/tag/definition.js +2 -169
  452. package/tag/index.cjs +26 -26
  453. package/tag/index.js +65 -126
  454. package/tag-group/definition.cjs +5 -40
  455. package/tag-group/definition.js +1 -33
  456. package/tag-group/index.cjs +4 -4
  457. package/tag-group/index.js +10 -21
  458. package/text-area/definition.cjs +6 -361
  459. package/text-area/definition.js +2 -354
  460. package/text-area/index.cjs +11 -11
  461. package/text-area/index.js +153 -266
  462. package/text-field/definition.cjs +6 -433
  463. package/text-field/definition.js +2 -426
  464. package/text-field/index.cjs +1 -1
  465. package/text-field/index.js +6 -2
  466. package/time-picker/definition.cjs +7 -43
  467. package/time-picker/definition.js +3 -36
  468. package/time-picker/index.cjs +1 -1
  469. package/time-picker/index.js +24 -29
  470. package/toggletip/definition.cjs +6 -161
  471. package/toggletip/definition.js +2 -154
  472. package/toggletip/index.cjs +1 -1
  473. package/toggletip/index.js +6 -2
  474. package/tooltip/definition.cjs +6 -140
  475. package/tooltip/definition.js +2 -133
  476. package/tooltip/index.cjs +1 -1
  477. package/tooltip/index.js +6 -2
  478. package/tree-item/definition.cjs +6 -13
  479. package/tree-item/definition.js +3 -3
  480. package/tree-item/index.cjs +1 -1
  481. package/tree-item/index.js +6 -2
  482. package/tree-view/definition.cjs +6 -318
  483. package/tree-view/definition.js +2 -311
  484. package/tree-view/index.cjs +11 -11
  485. package/tree-view/index.js +145 -190
  486. package/unbundled/affix.cjs +89 -62
  487. package/unbundled/affix.js +58 -55
  488. package/unbundled/anchored.cjs +87 -94
  489. package/unbundled/anchored.js +74 -90
  490. package/unbundled/attribute-binding-behaviour.cjs +37 -43
  491. package/unbundled/attribute-binding-behaviour.js +31 -41
  492. package/unbundled/base-color-picker.cjs +226 -278
  493. package/unbundled/base-color-picker.js +214 -275
  494. package/unbundled/base-progress.cjs +63 -81
  495. package/unbundled/base-progress.js +57 -79
  496. package/unbundled/breadcrumb-item.cjs +24 -28
  497. package/unbundled/breadcrumb-item.js +18 -26
  498. package/unbundled/button.cjs +115 -175
  499. package/unbundled/button.js +109 -173
  500. package/unbundled/calendar-event.cjs +28 -41
  501. package/unbundled/calendar-event.js +22 -39
  502. package/unbundled/calendar-picker.template.cjs +620 -785
  503. package/unbundled/calendar-picker.template.js +560 -774
  504. package/unbundled/char-count.cjs +50 -80
  505. package/unbundled/char-count.js +44 -78
  506. package/unbundled/chunk.cjs +50 -0
  507. package/unbundled/chunk.js +33 -0
  508. package/unbundled/data-grid.options.cjs +80 -29
  509. package/unbundled/data-grid.options.js +51 -23
  510. package/unbundled/decorate.cjs +14 -0
  511. package/unbundled/decorate.js +9 -0
  512. package/unbundled/definition.cjs +42 -226
  513. package/unbundled/definition.js +24 -221
  514. package/unbundled/definition10.cjs +253 -0
  515. package/unbundled/definition10.js +229 -0
  516. package/unbundled/definition11.cjs +397 -0
  517. package/unbundled/definition11.js +379 -0
  518. package/unbundled/definition12.cjs +317 -0
  519. package/unbundled/definition12.js +287 -0
  520. package/unbundled/definition13.cjs +328 -0
  521. package/unbundled/definition13.js +310 -0
  522. package/unbundled/definition14.cjs +406 -0
  523. package/unbundled/definition14.js +388 -0
  524. package/unbundled/definition15.cjs +107 -0
  525. package/unbundled/definition15.js +89 -0
  526. package/unbundled/definition16.cjs +63 -0
  527. package/unbundled/definition16.js +45 -0
  528. package/unbundled/definition17.cjs +151 -0
  529. package/unbundled/definition17.js +133 -0
  530. package/unbundled/definition18.cjs +47 -0
  531. package/unbundled/definition18.js +35 -0
  532. package/unbundled/definition19.cjs +98 -0
  533. package/unbundled/definition19.js +80 -0
  534. package/unbundled/definition2.cjs +179 -401
  535. package/unbundled/definition2.js +161 -395
  536. package/unbundled/definition20.cjs +56 -0
  537. package/unbundled/definition20.js +43 -0
  538. package/unbundled/definition21.cjs +305 -0
  539. package/unbundled/definition21.js +286 -0
  540. package/unbundled/definition22.cjs +174 -0
  541. package/unbundled/definition22.js +156 -0
  542. package/unbundled/definition23.cjs +161 -0
  543. package/unbundled/definition23.js +143 -0
  544. package/unbundled/definition24.cjs +1038 -0
  545. package/unbundled/definition24.js +1020 -0
  546. package/unbundled/definition25.cjs +360 -0
  547. package/unbundled/definition25.js +342 -0
  548. package/unbundled/definition26.cjs +137 -0
  549. package/unbundled/definition26.js +119 -0
  550. package/unbundled/definition27.cjs +235 -0
  551. package/unbundled/definition27.js +211 -0
  552. package/unbundled/definition28.cjs +546 -0
  553. package/unbundled/definition28.js +528 -0
  554. package/unbundled/definition29.cjs +157 -0
  555. package/unbundled/definition29.js +139 -0
  556. package/unbundled/definition3.cjs +131 -285
  557. package/unbundled/definition3.js +113 -280
  558. package/unbundled/definition30.cjs +75 -0
  559. package/unbundled/definition30.js +57 -0
  560. package/unbundled/definition31.cjs +1265 -0
  561. package/unbundled/definition31.js +1247 -0
  562. package/unbundled/definition32.cjs +1908 -0
  563. package/unbundled/definition32.js +1866 -0
  564. package/unbundled/definition33.cjs +261 -0
  565. package/unbundled/definition33.js +183 -0
  566. package/unbundled/definition34.cjs +46 -0
  567. package/unbundled/definition34.js +33 -0
  568. package/unbundled/definition35.cjs +152 -0
  569. package/unbundled/definition35.js +134 -0
  570. package/unbundled/definition36.cjs +426 -0
  571. package/unbundled/definition36.js +408 -0
  572. package/unbundled/definition37.cjs +243 -0
  573. package/unbundled/definition37.js +225 -0
  574. package/unbundled/definition38.cjs +409 -0
  575. package/unbundled/definition38.js +391 -0
  576. package/unbundled/definition39.cjs +298 -0
  577. package/unbundled/definition39.js +280 -0
  578. package/unbundled/definition4.cjs +186 -206
  579. package/unbundled/definition4.js +162 -201
  580. package/unbundled/definition40.cjs +81 -0
  581. package/unbundled/definition40.js +63 -0
  582. package/unbundled/definition41.cjs +100 -0
  583. package/unbundled/definition41.js +82 -0
  584. package/unbundled/definition42.cjs +457 -0
  585. package/unbundled/definition42.js +439 -0
  586. package/unbundled/definition43.cjs +86 -0
  587. package/unbundled/definition43.js +68 -0
  588. package/unbundled/definition44.cjs +60 -0
  589. package/unbundled/definition44.js +41 -0
  590. package/unbundled/definition45.cjs +124 -0
  591. package/unbundled/definition45.js +106 -0
  592. package/unbundled/definition46.cjs +85 -0
  593. package/unbundled/definition46.js +67 -0
  594. package/unbundled/definition47.cjs +52 -0
  595. package/unbundled/definition47.js +31 -0
  596. package/unbundled/definition48.cjs +69 -0
  597. package/unbundled/definition48.js +51 -0
  598. package/unbundled/definition49.cjs +377 -0
  599. package/unbundled/definition49.js +359 -0
  600. package/unbundled/definition5.cjs +69 -298
  601. package/unbundled/definition5.js +44 -293
  602. package/unbundled/definition50.cjs +246 -0
  603. package/unbundled/definition50.js +228 -0
  604. package/unbundled/definition51.cjs +337 -0
  605. package/unbundled/definition51.js +319 -0
  606. package/unbundled/definition52.cjs +86 -0
  607. package/unbundled/definition52.js +67 -0
  608. package/unbundled/definition53.cjs +193 -0
  609. package/unbundled/definition53.js +174 -0
  610. package/unbundled/definition54.cjs +297 -0
  611. package/unbundled/definition54.js +279 -0
  612. package/unbundled/definition55.cjs +510 -0
  613. package/unbundled/definition55.js +492 -0
  614. package/unbundled/definition56.cjs +12728 -0
  615. package/unbundled/definition56.js +12553 -0
  616. package/unbundled/definition57.cjs +837 -0
  617. package/unbundled/definition57.js +819 -0
  618. package/unbundled/definition58.cjs +146 -0
  619. package/unbundled/definition58.js +128 -0
  620. package/unbundled/definition59.cjs +1080 -0
  621. package/unbundled/definition59.js +1062 -0
  622. package/unbundled/definition6.cjs +88 -56
  623. package/unbundled/definition6.js +69 -52
  624. package/unbundled/definition60.cjs +149 -0
  625. package/unbundled/definition60.js +131 -0
  626. package/unbundled/definition61.cjs +116 -0
  627. package/unbundled/definition61.js +97 -0
  628. package/unbundled/definition62.cjs +213 -0
  629. package/unbundled/definition62.js +195 -0
  630. package/unbundled/definition63.cjs +159 -0
  631. package/unbundled/definition63.js +141 -0
  632. package/unbundled/definition64.cjs +86 -0
  633. package/unbundled/definition64.js +68 -0
  634. package/unbundled/definition65.cjs +126 -0
  635. package/unbundled/definition65.js +107 -0
  636. package/unbundled/definition66.cjs +49 -0
  637. package/unbundled/definition66.js +28 -0
  638. package/unbundled/definition67.cjs +119 -0
  639. package/unbundled/definition67.js +101 -0
  640. package/unbundled/definition68.cjs +374 -0
  641. package/unbundled/definition68.js +349 -0
  642. package/unbundled/definition69.cjs +57 -0
  643. package/unbundled/definition69.js +38 -0
  644. package/unbundled/definition7.cjs +190 -0
  645. package/unbundled/definition7.js +166 -0
  646. package/unbundled/definition70.cjs +155 -0
  647. package/unbundled/definition70.js +137 -0
  648. package/unbundled/definition71.cjs +302 -0
  649. package/unbundled/definition71.js +284 -0
  650. package/unbundled/definition72.cjs +49 -0
  651. package/unbundled/definition72.js +38 -0
  652. package/unbundled/definition73.cjs +171 -0
  653. package/unbundled/definition73.js +147 -0
  654. package/unbundled/definition74.cjs +232 -0
  655. package/unbundled/definition74.js +213 -0
  656. package/unbundled/definition75.cjs +52241 -0
  657. package/unbundled/definition75.js +52223 -0
  658. package/unbundled/definition8.cjs +63 -0
  659. package/unbundled/definition8.js +44 -0
  660. package/unbundled/definition9.cjs +183 -0
  661. package/unbundled/definition9.js +165 -0
  662. package/unbundled/delegates-aria.cjs +90 -131
  663. package/unbundled/delegates-aria.js +77 -127
  664. package/unbundled/dialog.cjs +15 -0
  665. package/unbundled/dialog.js +10 -0
  666. package/unbundled/divider.cjs +42 -50
  667. package/unbundled/divider.js +30 -47
  668. package/unbundled/en-US.cjs +447 -0
  669. package/unbundled/en-US.js +443 -0
  670. package/unbundled/enums.cjs +166 -107
  671. package/unbundled/enums.js +95 -94
  672. package/unbundled/form-associated.cjs +408 -464
  673. package/unbundled/form-associated.js +396 -461
  674. package/unbundled/form-element.cjs +74 -83
  675. package/unbundled/form-element.js +68 -81
  676. package/unbundled/host-semantics.cjs +70 -88
  677. package/unbundled/host-semantics.js +57 -84
  678. package/unbundled/key-codes.cjs +16 -10
  679. package/unbundled/key-codes.js +5 -7
  680. package/unbundled/linkable.cjs +35 -56
  681. package/unbundled/linkable.js +27 -52
  682. package/unbundled/listbox.cjs +363 -473
  683. package/unbundled/listbox.js +357 -471
  684. package/unbundled/localized.cjs +79 -74
  685. package/unbundled/localized.js +61 -70
  686. package/unbundled/mixins.cjs +222 -225
  687. package/unbundled/mixins.js +186 -213
  688. package/unbundled/picker-field.template.cjs +188 -218
  689. package/unbundled/picker-field.template.js +165 -209
  690. package/unbundled/playbackRates.cjs +18 -11
  691. package/unbundled/playbackRates.js +13 -9
  692. package/unbundled/scrollIntoView.cjs +38 -44
  693. package/unbundled/scrollIntoView.js +33 -42
  694. package/unbundled/single-date-picker.cjs +48 -45
  695. package/unbundled/single-date-picker.js +43 -43
  696. package/unbundled/single-value-picker.cjs +106 -114
  697. package/unbundled/single-value-picker.js +101 -112
  698. package/unbundled/slider.template.cjs +107 -73
  699. package/unbundled/slider.template.js +67 -62
  700. package/unbundled/slottable-request.cjs +3114 -3503
  701. package/unbundled/slottable-request.js +2995 -3484
  702. package/unbundled/text-field.cjs +9 -5
  703. package/unbundled/text-field.js +4 -3
  704. package/unbundled/time-selection-picker.template.cjs +611 -758
  705. package/unbundled/time-selection-picker.template.js +554 -745
  706. package/unbundled/trapped-focus.cjs +45 -35
  707. package/unbundled/trapped-focus.js +34 -32
  708. package/unbundled/vivid-element.cjs +281 -273
  709. package/unbundled/vivid-element.js +239 -265
  710. package/unbundled/with-contextual-help.cjs +35 -39
  711. package/unbundled/with-contextual-help.js +29 -37
  712. package/unbundled/with-error-text.cjs +45 -55
  713. package/unbundled/with-error-text.js +39 -53
  714. package/unbundled/with-success-text.cjs +18 -22
  715. package/unbundled/with-success-text.js +12 -20
  716. package/video-player/definition.cjs +5 -69602
  717. package/video-player/definition.js +1 -69595
  718. package/video-player/index.cjs +44 -55
  719. package/video-player/index.js +23548 -35488
  720. package/visually-hidden/definition.cjs +5 -30
  721. package/visually-hidden/definition.js +1 -23
  722. package/visually-hidden/index.cjs +1 -1
  723. package/visually-hidden/index.js +5 -2
  724. package/vivid.api.json +197 -2003
  725. package/bundled/index.cjs +0 -1
  726. package/bundled/index.js +0 -6
  727. package/unbundled/_commonjsHelpers.cjs +0 -36
  728. package/unbundled/_commonjsHelpers.js +0 -32
  729. package/unbundled/index.cjs +0 -11
  730. package/unbundled/index.js +0 -9
@@ -1,2815 +1,1799 @@
1
- let F;
2
- const ft = "fast-kernel";
1
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/interfaces.js
2
+ var e, t = "fast-kernel";
3
3
  try {
4
- if (document.currentScript)
5
- F = document.currentScript.getAttribute(ft);
6
- else {
7
- const i = document.getElementsByTagName("script");
8
- F = i[i.length - 1].getAttribute(ft);
9
- }
4
+ if (document.currentScript) e = document.currentScript.getAttribute(t);
5
+ else {
6
+ let n = document.getElementsByTagName("script");
7
+ e = n[n.length - 1].getAttribute(t);
8
+ }
10
9
  } catch {
11
- F = "isolate";
12
- }
13
- let N;
14
- switch (F) {
15
- case "share":
16
- N = Object.freeze({
17
- updateQueue: 1,
18
- observable: 2,
19
- contextEvent: 3,
20
- elementRegistry: 4
21
- });
22
- break;
23
- case "share-v2":
24
- N = Object.freeze({
25
- updateQueue: 1.2,
26
- observable: 2.2,
27
- contextEvent: 3.2,
28
- elementRegistry: 4.2
29
- });
30
- break;
31
- default:
32
- const i = `-${Math.random().toString(36).substring(2, 8)}`;
33
- N = Object.freeze({
34
- updateQueue: `1.2${i}`,
35
- observable: `2.2${i}`,
36
- contextEvent: `3.2${i}`,
37
- elementRegistry: `4.2${i}`
38
- });
39
- break;
40
- }
41
- const E = (i) => typeof i == "function", B = (i) => typeof i == "string", pe = () => {
42
- };
43
- var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
44
- function ci(i) {
45
- return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
46
- }
47
- function di(i) {
48
- if (i.__esModule) return i;
49
- var t = i.default;
50
- if (typeof t == "function") {
51
- var e = function s() {
52
- return this instanceof s ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
53
- };
54
- e.prototype = t.prototype;
55
- } else e = {};
56
- return Object.defineProperty(e, "__esModule", { value: !0 }), Object.keys(i).forEach(function(s) {
57
- var n = Object.getOwnPropertyDescriptor(i, s);
58
- Object.defineProperty(e, s, n.get ? n : {
59
- enumerable: !0,
60
- get: function() {
61
- return i[s];
62
- }
63
- });
64
- }), e;
65
- }
66
- (function() {
67
- if (!(typeof globalThis < "u"))
68
- if (typeof tt < "u")
69
- tt.globalThis = tt;
70
- else if (typeof self < "u")
71
- self.globalThis = self;
72
- else if (typeof window < "u")
73
- window.globalThis = window;
74
- else {
75
- const t = new Function("return this")();
76
- t.globalThis = t;
77
- }
78
- })();
10
+ e = "isolate";
11
+ }
12
+ var n;
13
+ switch (e) {
14
+ case "share":
15
+ n = Object.freeze({
16
+ updateQueue: 1,
17
+ observable: 2,
18
+ contextEvent: 3,
19
+ elementRegistry: 4
20
+ });
21
+ break;
22
+ case "share-v2":
23
+ n = Object.freeze({
24
+ updateQueue: 1.2,
25
+ observable: 2.2,
26
+ contextEvent: 3.2,
27
+ elementRegistry: 4.2
28
+ });
29
+ break;
30
+ default:
31
+ let e = `-${Math.random().toString(36).substring(2, 8)}`;
32
+ n = Object.freeze({
33
+ updateQueue: `1.2${e}`,
34
+ observable: `2.2${e}`,
35
+ contextEvent: `3.2${e}`,
36
+ elementRegistry: `4.2${e}`
37
+ });
38
+ break;
39
+ }
40
+ var r = (e) => typeof e == "function", i = (e) => typeof e == "string", a = () => void 0;
79
41
  (function() {
80
- "requestIdleCallback" in globalThis || (globalThis.requestIdleCallback = function(e, s) {
81
- const n = Date.now();
82
- return setTimeout(() => {
83
- e({
84
- didTimeout: s?.timeout ? Date.now() - n >= s.timeout : !1,
85
- timeRemaining: () => 0
86
- });
87
- }, 1);
88
- }, globalThis.cancelIdleCallback = function(e) {
89
- clearTimeout(e);
90
- });
42
+ if (!(typeof globalThis < "u")) if (typeof global < "u") global.globalThis = global;
43
+ else if (typeof self < "u") self.globalThis = self;
44
+ else if (typeof window < "u") window.globalThis = window;
45
+ else {
46
+ let e = Function("return this")();
47
+ e.globalThis = e;
48
+ }
49
+ })(), (function() {
50
+ "requestIdleCallback" in globalThis || (globalThis.requestIdleCallback = function(e, t) {
51
+ let n = Date.now();
52
+ return setTimeout(() => {
53
+ e({
54
+ didTimeout: t?.timeout ? Date.now() - n >= t.timeout : !1,
55
+ timeRemaining: () => 0
56
+ });
57
+ }, 1);
58
+ }, globalThis.cancelIdleCallback = function(e) {
59
+ clearTimeout(e);
60
+ });
91
61
  })();
92
- const Ht = {
93
- configurable: !1,
94
- enumerable: !1,
95
- writable: !1
62
+ //#endregion
63
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/platform.js
64
+ var o = {
65
+ configurable: !1,
66
+ enumerable: !1,
67
+ writable: !1
96
68
  };
97
- globalThis.FAST === void 0 && Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: /* @__PURE__ */ Object.create(null) }, Ht));
98
- const v = globalThis.FAST;
99
- if (v.getById === void 0) {
100
- const i = /* @__PURE__ */ Object.create(null);
101
- Reflect.defineProperty(v, "getById", Object.assign({ value(t, e) {
102
- let s = i[t];
103
- return s === void 0 && (s = e ? i[t] = e() : null), s;
104
- } }, Ht));
105
- }
106
- v.error === void 0 && Object.assign(v, {
107
- warn() {
108
- },
109
- error(i) {
110
- return new Error(`Error ${i}`);
111
- },
112
- addMessages() {
113
- }
114
- });
115
- const hi = Object.freeze([]);
116
- function Pt() {
117
- const i = /* @__PURE__ */ new Map();
118
- return Object.freeze({
119
- register(t) {
120
- return i.has(t.type) ? !1 : (i.set(t.type, t), !0);
121
- },
122
- getByType(t) {
123
- return i.get(t);
124
- },
125
- getForInstance(t) {
126
- if (t != null)
127
- return i.get(t.constructor);
128
- }
129
- });
130
- }
131
- function zt() {
132
- const i = /* @__PURE__ */ new WeakMap();
133
- return function(t) {
134
- let e = i.get(t);
135
- if (e === void 0) {
136
- let s = Reflect.getPrototypeOf(t);
137
- for (; e === void 0 && s !== null; )
138
- e = i.get(s), s = Reflect.getPrototypeOf(s);
139
- e = e === void 0 ? [] : e.slice(0), i.set(t, e);
140
- }
141
- return e;
142
- };
143
- }
144
- function x(i) {
145
- i.prototype.toJSON = pe;
146
- }
147
- const y = Object.freeze({
148
- /**
149
- * Not aspected.
150
- */
151
- none: 0,
152
- /**
153
- * An attribute.
154
- */
155
- attribute: 1,
156
- /**
157
- * A boolean attribute.
158
- */
159
- booleanAttribute: 2,
160
- /**
161
- * A property.
162
- */
163
- property: 3,
164
- /**
165
- * Content
166
- */
167
- content: 4,
168
- /**
169
- * A token list.
170
- */
171
- tokenList: 5,
172
- /**
173
- * An event.
174
- */
175
- event: 6
176
- }), pt = (i) => i, be = globalThis.trustedTypes ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML: pt }) : { createHTML: pt };
177
- let D = Object.freeze({
178
- createHTML(i) {
179
- return be.createHTML(i);
180
- },
181
- protect(i, t, e, s) {
182
- return s;
183
- }
69
+ globalThis.FAST === void 0 && Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: Object.create(null) }, o));
70
+ var s = globalThis.FAST;
71
+ if (s.getById === void 0) {
72
+ let e = Object.create(null);
73
+ Reflect.defineProperty(s, "getById", Object.assign({ value(t, n) {
74
+ let r = e[t];
75
+ return r === void 0 && (r = n ? e[t] = n() : null), r;
76
+ } }, o));
77
+ }
78
+ s.error === void 0 && Object.assign(s, {
79
+ warn() {},
80
+ error(e) {
81
+ return /* @__PURE__ */ Error(`Error ${e}`);
82
+ },
83
+ addMessages() {}
184
84
  });
185
- const ge = D, T = Object.freeze({
186
- /**
187
- * Gets the dom policy used by the templating system.
188
- */
189
- get policy() {
190
- return D;
191
- },
192
- /**
193
- * Sets the dom policy used by the templating system.
194
- * @param policy - The policy to set.
195
- * @remarks
196
- * This API can only be called once, for security reasons. It should be
197
- * called by the application developer at the start of their program.
198
- */
199
- setPolicy(i) {
200
- if (D !== ge)
201
- throw v.error(
202
- 1201
203
- /* Message.onlySetDOMPolicyOnce */
204
- );
205
- D = i;
206
- },
207
- /**
208
- * Sets an attribute value on an element.
209
- * @param element - The element to set the attribute value on.
210
- * @param attributeName - The attribute name to set.
211
- * @param value - The value of the attribute to set.
212
- * @remarks
213
- * If the value is `null` or `undefined`, the attribute is removed, otherwise
214
- * it is set to the provided value using the standard `setAttribute` API.
215
- */
216
- setAttribute(i, t, e) {
217
- e == null ? i.removeAttribute(t) : i.setAttribute(t, e);
218
- },
219
- /**
220
- * Sets a boolean attribute value.
221
- * @param element - The element to set the boolean attribute value on.
222
- * @param attributeName - The attribute name to set.
223
- * @param value - The value of the attribute to set.
224
- * @remarks
225
- * If the value is true, the attribute is added; otherwise it is removed.
226
- */
227
- setBooleanAttribute(i, t, e) {
228
- e ? i.setAttribute(t, "") : i.removeAttribute(t);
229
- }
230
- }), Ut = v.getById(N.updateQueue, () => {
231
- const i = [], t = [], e = globalThis.requestAnimationFrame;
232
- let s = !0;
233
- function n() {
234
- if (t.length)
235
- throw t.shift();
236
- }
237
- function r(d) {
238
- try {
239
- d.call();
240
- } catch (l) {
241
- if (s)
242
- t.push(l), setTimeout(n, 0);
243
- else
244
- throw i.length = 0, l;
245
- }
246
- }
247
- function o() {
248
- let l = 0;
249
- for (; l < i.length; )
250
- if (r(i[l]), l++, l > 1024) {
251
- for (let a = 0, h = i.length - l; a < h; a++)
252
- i[a] = i[a + l];
253
- i.length -= l, l = 0;
254
- }
255
- i.length = 0;
256
- }
257
- function c(d) {
258
- i.push(d), i.length < 2 && (s ? e(o) : o());
259
- }
260
- return Object.freeze({
261
- enqueue: c,
262
- next: () => new Promise(c),
263
- process: o,
264
- setMode: (d) => s = d
265
- });
85
+ var c = Object.freeze([]);
86
+ function l() {
87
+ let e = /* @__PURE__ */ new Map();
88
+ return Object.freeze({
89
+ register(t) {
90
+ return e.has(t.type) ? !1 : (e.set(t.type, t), !0);
91
+ },
92
+ getByType(t) {
93
+ return e.get(t);
94
+ },
95
+ getForInstance(t) {
96
+ if (t != null) return e.get(t.constructor);
97
+ }
98
+ });
99
+ }
100
+ function u() {
101
+ let e = /* @__PURE__ */ new WeakMap();
102
+ return function(t) {
103
+ let n = e.get(t);
104
+ if (n === void 0) {
105
+ let r = Reflect.getPrototypeOf(t);
106
+ for (; n === void 0 && r !== null;) n = e.get(r), r = Reflect.getPrototypeOf(r);
107
+ n = n === void 0 ? [] : n.slice(0), e.set(t, n);
108
+ }
109
+ return n;
110
+ };
111
+ }
112
+ function d(e) {
113
+ e.prototype.toJSON = a;
114
+ }
115
+ //#endregion
116
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/dom.js
117
+ var f = Object.freeze({
118
+ none: 0,
119
+ attribute: 1,
120
+ booleanAttribute: 2,
121
+ property: 3,
122
+ content: 4,
123
+ tokenList: 5,
124
+ event: 6
125
+ }), p = (e) => e, ee = globalThis.trustedTypes ? globalThis.trustedTypes.createPolicy("fast-html", { createHTML: p }) : { createHTML: p }, m = Object.freeze({
126
+ createHTML(e) {
127
+ return ee.createHTML(e);
128
+ },
129
+ protect(e, t, n, r) {
130
+ return r;
131
+ }
132
+ }), te = m, h = Object.freeze({
133
+ get policy() {
134
+ return m;
135
+ },
136
+ setPolicy(e) {
137
+ if (m !== te) throw s.error(1201);
138
+ m = e;
139
+ },
140
+ setAttribute(e, t, n) {
141
+ n == null ? e.removeAttribute(t) : e.setAttribute(t, n);
142
+ },
143
+ setBooleanAttribute(e, t, n) {
144
+ n ? e.setAttribute(t, "") : e.removeAttribute(t);
145
+ }
146
+ }), g = s.getById(n.updateQueue, () => {
147
+ let e = [], t = [], n = globalThis.requestAnimationFrame, r = !0;
148
+ function i() {
149
+ if (t.length) throw t.shift();
150
+ }
151
+ function a(n) {
152
+ try {
153
+ n.call();
154
+ } catch (n) {
155
+ if (r) t.push(n), setTimeout(i, 0);
156
+ else throw e.length = 0, n;
157
+ }
158
+ }
159
+ function o() {
160
+ let t = 0;
161
+ for (; t < e.length;) if (a(e[t]), t++, t > 1024) {
162
+ for (let n = 0, r = e.length - t; n < r; n++) e[n] = e[n + t];
163
+ e.length -= t, t = 0;
164
+ }
165
+ e.length = 0;
166
+ }
167
+ function s(t) {
168
+ e.push(t), e.length < 2 && (r ? n(o) : o());
169
+ }
170
+ return Object.freeze({
171
+ enqueue: s,
172
+ next: () => new Promise(s),
173
+ process: o,
174
+ setMode: (e) => r = e
175
+ });
176
+ }), _ = class {
177
+ constructor(e, t) {
178
+ this.sub1 = void 0, this.sub2 = void 0, this.spillover = void 0, this.subject = e, this.sub1 = t;
179
+ }
180
+ has(e) {
181
+ return this.spillover === void 0 ? this.sub1 === e || this.sub2 === e : this.spillover.indexOf(e) !== -1;
182
+ }
183
+ subscribe(e) {
184
+ let t = this.spillover;
185
+ if (t === void 0) {
186
+ if (this.has(e)) return;
187
+ if (this.sub1 === void 0) {
188
+ this.sub1 = e;
189
+ return;
190
+ }
191
+ if (this.sub2 === void 0) {
192
+ this.sub2 = e;
193
+ return;
194
+ }
195
+ this.spillover = [
196
+ this.sub1,
197
+ this.sub2,
198
+ e
199
+ ], this.sub1 = void 0, this.sub2 = void 0;
200
+ } else t.indexOf(e) === -1 && t.push(e);
201
+ }
202
+ unsubscribe(e) {
203
+ let t = this.spillover;
204
+ if (t === void 0) this.sub1 === e ? this.sub1 = void 0 : this.sub2 === e && (this.sub2 = void 0);
205
+ else {
206
+ let n = t.indexOf(e);
207
+ n !== -1 && t.splice(n, 1);
208
+ }
209
+ }
210
+ notify(e) {
211
+ let t = this.spillover, n = this.subject;
212
+ if (t === void 0) {
213
+ let t = this.sub1, r = this.sub2;
214
+ t !== void 0 && t.handleChange(n, e), r !== void 0 && r.handleChange(n, e);
215
+ } else for (let r = 0, i = t.length; r < i; ++r) t[r].handleChange(n, e);
216
+ }
217
+ }, ne = class {
218
+ constructor(e) {
219
+ this.subscribers = {}, this.subjectSubscribers = null, this.subject = e;
220
+ }
221
+ notify(e) {
222
+ var t, n;
223
+ (t = this.subscribers[e]) == null || t.notify(e), (n = this.subjectSubscribers) == null || n.notify(e);
224
+ }
225
+ subscribe(e, t) {
226
+ let n;
227
+ n = t ? this.subscribers[t] ?? (this.subscribers[t] = new _(this.subject)) : this.subjectSubscribers ??= new _(this.subject), n.subscribe(e);
228
+ }
229
+ unsubscribe(e, t) {
230
+ var n, r;
231
+ t ? (n = this.subscribers[t]) == null || n.unsubscribe(e) : (r = this.subjectSubscribers) == null || r.unsubscribe(e);
232
+ }
233
+ }, v = Object.freeze({
234
+ unknown: void 0,
235
+ coupled: 1
236
+ }), y = s.getById(n.observable, () => {
237
+ let e = g.enqueue, t = /(:|&&|\|\||if|\?\.)/, n = /* @__PURE__ */ new WeakMap(), a, o = (e) => {
238
+ throw s.error(1101);
239
+ };
240
+ function c(e) {
241
+ let t = e.$fastController ?? n.get(e);
242
+ return t === void 0 && (Array.isArray(e) ? t = o(e) : n.set(e, t = new ne(e))), t;
243
+ }
244
+ let l = u();
245
+ class f {
246
+ constructor(e) {
247
+ this.name = e, this.field = `_${e}`, this.callback = `${e}Changed`;
248
+ }
249
+ getValue(e) {
250
+ return a !== void 0 && a.watch(e, this.name), e[this.field];
251
+ }
252
+ setValue(e, t) {
253
+ let n = this.field, i = e[n];
254
+ if (i !== t) {
255
+ e[n] = t;
256
+ let a = e[this.callback];
257
+ r(a) && a.call(e, i, t), c(e).notify(this.name);
258
+ }
259
+ }
260
+ }
261
+ class p extends _ {
262
+ constructor(e, t, n = !1) {
263
+ super(e, t), this.expression = e, this.isVolatileBinding = n, this.needsRefresh = !0, this.needsQueue = !0, this.isAsync = !0, this.first = this, this.last = null, this.propertySource = void 0, this.propertyName = void 0, this.notifier = void 0, this.next = void 0;
264
+ }
265
+ setMode(e) {
266
+ this.isAsync = this.needsQueue = e;
267
+ }
268
+ bind(e) {
269
+ this.controller = e;
270
+ let t = this.observe(e.source, e.context);
271
+ return !e.isBound && this.requiresUnbind(e) && e.onUnbind(this), t;
272
+ }
273
+ requiresUnbind(e) {
274
+ return e.sourceLifetime !== v.coupled || this.first !== this.last || this.first.propertySource !== e.source;
275
+ }
276
+ unbind(e) {
277
+ this.dispose();
278
+ }
279
+ observe(e, t) {
280
+ this.needsRefresh && this.last !== null && this.dispose();
281
+ let n = a;
282
+ a = this.needsRefresh ? this : void 0, this.needsRefresh = this.isVolatileBinding;
283
+ let r;
284
+ try {
285
+ r = this.expression(e, t);
286
+ } finally {
287
+ a = n;
288
+ }
289
+ return r;
290
+ }
291
+ disconnect() {
292
+ this.dispose();
293
+ }
294
+ dispose() {
295
+ if (this.last !== null) {
296
+ let e = this.first;
297
+ for (; e !== void 0;) e.notifier.unsubscribe(this, e.propertyName), e = e.next;
298
+ this.last = null, this.needsRefresh = this.needsQueue = this.isAsync;
299
+ }
300
+ }
301
+ watch(e, t) {
302
+ let n = this.last, r = c(e), i = n === null ? this.first : {};
303
+ if (i.propertySource = e, i.propertyName = t, i.notifier = r, r.subscribe(this, t), n !== null) {
304
+ if (!this.needsRefresh) {
305
+ let t;
306
+ a = void 0, t = n.propertySource[n.propertyName], a = this, e === t && (this.needsRefresh = !0);
307
+ }
308
+ n.next = i;
309
+ }
310
+ this.last = i;
311
+ }
312
+ handleChange() {
313
+ this.needsQueue ? (this.needsQueue = !1, e(this)) : this.isAsync || this.call();
314
+ }
315
+ call() {
316
+ this.last !== null && (this.needsQueue = this.isAsync, this.notify(this));
317
+ }
318
+ *records() {
319
+ let e = this.first;
320
+ for (; e !== void 0;) yield e, e = e.next;
321
+ }
322
+ }
323
+ return d(p), Object.freeze({
324
+ setArrayObserverFactory(e) {
325
+ o = e;
326
+ },
327
+ getNotifier: c,
328
+ track(e, t) {
329
+ a && a.watch(e, t);
330
+ },
331
+ trackVolatile() {
332
+ a && (a.needsRefresh = !0);
333
+ },
334
+ notify(e, t) {
335
+ c(e).notify(t);
336
+ },
337
+ defineProperty(e, t) {
338
+ i(t) && (t = new f(t)), l(e).push(t), Reflect.defineProperty(e, t.name, {
339
+ enumerable: !0,
340
+ get() {
341
+ return t.getValue(this);
342
+ },
343
+ set(e) {
344
+ t.setValue(this, e);
345
+ }
346
+ });
347
+ },
348
+ getAccessors: l,
349
+ binding(e, t, n = this.isVolatileBinding(e)) {
350
+ return new p(e, t, n);
351
+ },
352
+ isVolatileBinding(e) {
353
+ return t.test(e.toString());
354
+ }
355
+ });
266
356
  });
267
- class rt {
268
- /**
269
- * Creates an instance of SubscriberSet for the specified subject.
270
- * @param subject - The subject that subscribers will receive notifications from.
271
- * @param initialSubscriber - An initial subscriber to changes.
272
- */
273
- constructor(t, e) {
274
- this.sub1 = void 0, this.sub2 = void 0, this.spillover = void 0, this.subject = t, this.sub1 = e;
275
- }
276
- /**
277
- * Checks whether the provided subscriber has been added to this set.
278
- * @param subscriber - The subscriber to test for inclusion in this set.
279
- */
280
- has(t) {
281
- return this.spillover === void 0 ? this.sub1 === t || this.sub2 === t : this.spillover.indexOf(t) !== -1;
282
- }
283
- /**
284
- * Subscribes to notification of changes in an object's state.
285
- * @param subscriber - The object that is subscribing for change notification.
286
- */
287
- subscribe(t) {
288
- const e = this.spillover;
289
- if (e === void 0) {
290
- if (this.has(t))
291
- return;
292
- if (this.sub1 === void 0) {
293
- this.sub1 = t;
294
- return;
295
- }
296
- if (this.sub2 === void 0) {
297
- this.sub2 = t;
298
- return;
299
- }
300
- this.spillover = [this.sub1, this.sub2, t], this.sub1 = void 0, this.sub2 = void 0;
301
- } else
302
- e.indexOf(t) === -1 && e.push(t);
303
- }
304
- /**
305
- * Unsubscribes from notification of changes in an object's state.
306
- * @param subscriber - The object that is unsubscribing from change notification.
307
- */
308
- unsubscribe(t) {
309
- const e = this.spillover;
310
- if (e === void 0)
311
- this.sub1 === t ? this.sub1 = void 0 : this.sub2 === t && (this.sub2 = void 0);
312
- else {
313
- const s = e.indexOf(t);
314
- s !== -1 && e.splice(s, 1);
315
- }
316
- }
317
- /**
318
- * Notifies all subscribers.
319
- * @param args - Data passed along to subscribers during notification.
320
- */
321
- notify(t) {
322
- const e = this.spillover, s = this.subject;
323
- if (e === void 0) {
324
- const n = this.sub1, r = this.sub2;
325
- n !== void 0 && n.handleChange(s, t), r !== void 0 && r.handleChange(s, t);
326
- } else
327
- for (let n = 0, r = e.length; n < r; ++n)
328
- e[n].handleChange(s, t);
329
- }
330
- }
331
- class qt {
332
- /**
333
- * Creates an instance of PropertyChangeNotifier for the specified subject.
334
- * @param subject - The object that subscribers will receive notifications for.
335
- */
336
- constructor(t) {
337
- this.subscribers = {}, this.subjectSubscribers = null, this.subject = t;
338
- }
339
- /**
340
- * Notifies all subscribers, based on the specified property.
341
- * @param propertyName - The property name, passed along to subscribers during notification.
342
- */
343
- notify(t) {
344
- var e, s;
345
- (e = this.subscribers[t]) === null || e === void 0 || e.notify(t), (s = this.subjectSubscribers) === null || s === void 0 || s.notify(t);
346
- }
347
- /**
348
- * Subscribes to notification of changes in an object's state.
349
- * @param subscriber - The object that is subscribing for change notification.
350
- * @param propertyToWatch - The name of the property that the subscriber is interested in watching for changes.
351
- */
352
- subscribe(t, e) {
353
- var s, n;
354
- let r;
355
- e ? r = (s = this.subscribers[e]) !== null && s !== void 0 ? s : this.subscribers[e] = new rt(this.subject) : r = (n = this.subjectSubscribers) !== null && n !== void 0 ? n : this.subjectSubscribers = new rt(this.subject), r.subscribe(t);
356
- }
357
- /**
358
- * Unsubscribes from notification of changes in an object's state.
359
- * @param subscriber - The object that is unsubscribing from change notification.
360
- * @param propertyToUnwatch - The name of the property that the subscriber is no longer interested in watching.
361
- */
362
- unsubscribe(t, e) {
363
- var s, n;
364
- e ? (s = this.subscribers[e]) === null || s === void 0 || s.unsubscribe(t) : (n = this.subjectSubscribers) === null || n === void 0 || n.unsubscribe(t);
365
- }
366
- }
367
- const J = Object.freeze({
368
- /**
369
- * The source to controller lifetime relationship is unknown.
370
- */
371
- unknown: void 0,
372
- /**
373
- * The source and controller lifetimes are coupled to one another.
374
- * They can/will be GC'd together.
375
- */
376
- coupled: 1
377
- }), g = v.getById(N.observable, () => {
378
- const i = Ut.enqueue, t = /(:|&&|\|\||if|\?\.)/, e = /* @__PURE__ */ new WeakMap();
379
- let s, n = (l) => {
380
- throw v.error(
381
- 1101
382
- /* Message.needsArrayObservation */
383
- );
384
- };
385
- function r(l) {
386
- var a;
387
- let h = (a = l.$fastController) !== null && a !== void 0 ? a : e.get(l);
388
- return h === void 0 && (Array.isArray(l) ? h = n(l) : e.set(l, h = new qt(l))), h;
389
- }
390
- const o = zt();
391
- class c {
392
- constructor(a) {
393
- this.name = a, this.field = `_${a}`, this.callback = `${a}Changed`;
394
- }
395
- getValue(a) {
396
- return s !== void 0 && s.watch(a, this.name), a[this.field];
397
- }
398
- setValue(a, h) {
399
- const u = this.field, b = a[u];
400
- if (b !== h) {
401
- a[u] = h;
402
- const k = a[this.callback];
403
- E(k) && k.call(a, b, h), r(a).notify(this.name);
404
- }
405
- }
406
- }
407
- class d extends rt {
408
- constructor(a, h, u = !1) {
409
- super(a, h), this.expression = a, this.isVolatileBinding = u, this.needsRefresh = !0, this.needsQueue = !0, this.isAsync = !0, this.first = this, this.last = null, this.propertySource = void 0, this.propertyName = void 0, this.notifier = void 0, this.next = void 0;
410
- }
411
- setMode(a) {
412
- this.isAsync = this.needsQueue = a;
413
- }
414
- bind(a) {
415
- this.controller = a;
416
- const h = this.observe(a.source, a.context);
417
- return !a.isBound && this.requiresUnbind(a) && a.onUnbind(this), h;
418
- }
419
- requiresUnbind(a) {
420
- return a.sourceLifetime !== J.coupled || this.first !== this.last || this.first.propertySource !== a.source;
421
- }
422
- unbind(a) {
423
- this.dispose();
424
- }
425
- observe(a, h) {
426
- this.needsRefresh && this.last !== null && this.dispose();
427
- const u = s;
428
- s = this.needsRefresh ? this : void 0, this.needsRefresh = this.isVolatileBinding;
429
- let b;
430
- try {
431
- b = this.expression(a, h);
432
- } finally {
433
- s = u;
434
- }
435
- return b;
436
- }
437
- // backwards compat with v1 kernel
438
- disconnect() {
439
- this.dispose();
440
- }
441
- dispose() {
442
- if (this.last !== null) {
443
- let a = this.first;
444
- for (; a !== void 0; )
445
- a.notifier.unsubscribe(this, a.propertyName), a = a.next;
446
- this.last = null, this.needsRefresh = this.needsQueue = this.isAsync;
447
- }
448
- }
449
- watch(a, h) {
450
- const u = this.last, b = r(a), k = u === null ? this.first : {};
451
- if (k.propertySource = a, k.propertyName = h, k.notifier = b, b.subscribe(this, h), u !== null) {
452
- if (!this.needsRefresh) {
453
- let ut;
454
- s = void 0, ut = u.propertySource[u.propertyName], s = this, a === ut && (this.needsRefresh = !0);
455
- }
456
- u.next = k;
457
- }
458
- this.last = k;
459
- }
460
- handleChange() {
461
- this.needsQueue ? (this.needsQueue = !1, i(this)) : this.isAsync || this.call();
462
- }
463
- call() {
464
- this.last !== null && (this.needsQueue = this.isAsync, this.notify(this));
465
- }
466
- *records() {
467
- let a = this.first;
468
- for (; a !== void 0; )
469
- yield a, a = a.next;
470
- }
471
- }
472
- return x(d), Object.freeze({
473
- /**
474
- * @internal
475
- * @param factory - The factory used to create array observers.
476
- */
477
- setArrayObserverFactory(l) {
478
- n = l;
479
- },
480
- /**
481
- * Gets a notifier for an object or Array.
482
- * @param source - The object or Array to get the notifier for.
483
- */
484
- getNotifier: r,
485
- /**
486
- * Records a property change for a source object.
487
- * @param source - The object to record the change against.
488
- * @param propertyName - The property to track as changed.
489
- */
490
- track(l, a) {
491
- s && s.watch(l, a);
492
- },
493
- /**
494
- * Notifies watchers that the currently executing property getter or function is volatile
495
- * with respect to its observable dependencies.
496
- */
497
- trackVolatile() {
498
- s && (s.needsRefresh = !0);
499
- },
500
- /**
501
- * Notifies subscribers of a source object of changes.
502
- * @param source - the object to notify of changes.
503
- * @param args - The change args to pass to subscribers.
504
- */
505
- notify(l, a) {
506
- r(l).notify(a);
507
- },
508
- /**
509
- * Defines an observable property on an object or prototype.
510
- * @param target - The target object to define the observable on.
511
- * @param nameOrAccessor - The name of the property to define as observable;
512
- * or a custom accessor that specifies the property name and accessor implementation.
513
- */
514
- defineProperty(l, a) {
515
- B(a) && (a = new c(a)), o(l).push(a), Reflect.defineProperty(l, a.name, {
516
- enumerable: !0,
517
- get() {
518
- return a.getValue(this);
519
- },
520
- set(h) {
521
- a.setValue(this, h);
522
- }
523
- });
524
- },
525
- /**
526
- * Finds all the observable accessors defined on the target,
527
- * including its prototype chain.
528
- * @param target - The target object to search for accessor on.
529
- */
530
- getAccessors: o,
531
- /**
532
- * Creates a {@link ExpressionNotifier} that can watch the
533
- * provided {@link Expression} for changes.
534
- * @param expression - The binding to observe.
535
- * @param initialSubscriber - An initial subscriber to changes in the binding value.
536
- * @param isVolatileBinding - Indicates whether the binding's dependency list must be re-evaluated on every value evaluation.
537
- */
538
- binding(l, a, h = this.isVolatileBinding(l)) {
539
- return new d(l, a, h);
540
- },
541
- /**
542
- * Determines whether a binding expression is volatile and needs to have its dependency list re-evaluated
543
- * on every evaluation of the value.
544
- * @param expression - The binding to inspect.
545
- */
546
- isVolatileBinding(l) {
547
- return t.test(l.toString());
548
- }
549
- });
550
- });
551
- function ui(i, t) {
552
- g.defineProperty(i, t);
553
- }
554
- function fi(i, t, e) {
555
- return Object.assign({}, e, {
556
- get() {
557
- return g.trackVolatile(), e.get.apply(this);
558
- }
559
- });
560
- }
561
- const bt = v.getById(N.contextEvent, () => {
562
- let i = null;
563
- return {
564
- get() {
565
- return i;
566
- },
567
- set(t) {
568
- i = t;
569
- }
570
- };
571
- }), O = Object.freeze({
572
- /**
573
- * A default execution context.
574
- */
575
- default: {
576
- index: 0,
577
- length: 0,
578
- get event() {
579
- return O.getEvent();
580
- },
581
- eventDetail() {
582
- return this.event.detail;
583
- },
584
- eventTarget() {
585
- return this.event.target;
586
- }
587
- },
588
- /**
589
- * Gets the current event.
590
- * @returns An event object.
591
- */
592
- getEvent() {
593
- return bt.get();
594
- },
595
- /**
596
- * Sets the current event.
597
- * @param event - An event object.
598
- */
599
- setEvent(i) {
600
- bt.set(i);
601
- }
602
- });
603
- class lt {
604
- /**
605
- * Creates a binding.
606
- * @param evaluate - Evaluates the binding.
607
- * @param policy - The security policy to associate with this binding.
608
- * @param isVolatile - Indicates whether the binding is volatile.
609
- */
610
- constructor(t, e, s = !1) {
611
- this.evaluate = t, this.policy = e, this.isVolatile = s;
612
- }
613
- }
614
- class ye extends lt {
615
- createObserver(t) {
616
- return g.binding(this.evaluate, t, this.isVolatile);
617
- }
618
- }
619
- function Wt(i, t, e = g.isVolatileBinding(i)) {
620
- return new ye(i, t, e);
621
- }
622
- class Qt extends lt {
623
- createObserver() {
624
- return this;
625
- }
626
- bind(t) {
627
- return this.evaluate(t.source, t.context);
628
- }
629
- }
630
- x(Qt);
631
- function Gt(i, t) {
632
- return new Qt(i, t);
633
- }
634
- let gt;
635
- function Jt(i) {
636
- return i.map((t) => t instanceof m ? Jt(t.styles) : [t]).reduce((t, e) => t.concat(e), []);
637
- }
638
- class m {
639
- /**
640
- * Creates an instance of ElementStyles.
641
- * @param styles - The styles that will be associated with elements.
642
- */
643
- constructor(t) {
644
- this.styles = t, this.targets = /* @__PURE__ */ new WeakSet(), this._strategy = null, this.behaviors = t.map((e) => e instanceof m ? e.behaviors : null).reduce((e, s) => s === null ? e : e === null ? s : e.concat(s), null);
645
- }
646
- /**
647
- * Gets the StyleStrategy associated with these element styles.
648
- */
649
- get strategy() {
650
- return this._strategy === null && this.withStrategy(gt), this._strategy;
651
- }
652
- /** @internal */
653
- addStylesTo(t) {
654
- this.strategy.addStylesTo(t), this.targets.add(t);
655
- }
656
- /** @internal */
657
- removeStylesFrom(t) {
658
- this.strategy.removeStylesFrom(t), this.targets.delete(t);
659
- }
660
- /** @internal */
661
- isAttachedTo(t) {
662
- return this.targets.has(t);
663
- }
664
- /**
665
- * Associates behaviors with this set of styles.
666
- * @param behaviors - The behaviors to associate.
667
- */
668
- withBehaviors(...t) {
669
- return this.behaviors = this.behaviors === null ? t : this.behaviors.concat(t), this;
670
- }
671
- /**
672
- * Sets the strategy that handles adding/removing these styles for an element.
673
- * @param strategy - The strategy to use.
674
- */
675
- withStrategy(t) {
676
- return this._strategy = new t(Jt(this.styles)), this;
677
- }
678
- /**
679
- * Sets the default strategy type to use when creating style strategies.
680
- * @param Strategy - The strategy type to construct.
681
- */
682
- static setDefaultStrategy(t) {
683
- gt = t;
684
- }
685
- /**
686
- * Normalizes a set of composable style options.
687
- * @param styles - The style options to normalize.
688
- * @returns A singular ElementStyles instance or undefined.
689
- */
690
- static normalize(t) {
691
- return t === void 0 ? void 0 : Array.isArray(t) ? new m(t) : t instanceof m ? t : new m([t]);
692
- }
693
- }
694
- m.supportsAdoptedStyleSheets = Array.isArray(document.adoptedStyleSheets) && "replace" in CSSStyleSheet.prototype;
695
- const yt = /fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/, vt = /fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/, mt = /fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/, wt = /fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/, St = /^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/, Ct = /fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;
696
- function kt(i) {
697
- return i && i.nodeType === Node.COMMENT_NODE;
698
- }
699
- const w = Object.freeze({
700
- attributeMarkerName: "data-fe-b",
701
- attributeBindingSeparator: " ",
702
- contentBindingStartMarker(i, t) {
703
- return `fe-b$$start$$${i}$$${t}$$fe-b`;
704
- },
705
- contentBindingEndMarker(i, t) {
706
- return `fe-b$$end$$${i}$$${t}$$fe-b`;
707
- },
708
- repeatStartMarker(i) {
709
- return `fe-repeat$$start$$${i}$$fe-repeat`;
710
- },
711
- repeatEndMarker(i) {
712
- return `fe-repeat$$end$$${i}$$fe-repeat`;
713
- },
714
- isContentBindingStartMarker(i) {
715
- return yt.test(i);
716
- },
717
- isContentBindingEndMarker(i) {
718
- return vt.test(i);
719
- },
720
- isRepeatViewStartMarker(i) {
721
- return mt.test(i);
722
- },
723
- isRepeatViewEndMarker(i) {
724
- return wt.test(i);
725
- },
726
- isElementBoundaryStartMarker(i) {
727
- return kt(i) && St.test(i.data.trim());
728
- },
729
- isElementBoundaryEndMarker(i) {
730
- return kt(i) && Ct.test(i.data);
731
- },
732
- /**
733
- * Returns the indexes of the ViewBehaviorFactories affecting
734
- * attributes for the element, or null if no factories were found.
735
- */
736
- parseAttributeBinding(i) {
737
- const t = i.getAttribute(this.attributeMarkerName);
738
- return t === null ? t : t.split(this.attributeBindingSeparator).map((e) => parseInt(e));
739
- },
740
- /**
741
- * Returns the indexes of the ViewBehaviorFactories affecting
742
- * attributes for the element, or null if no factories were found.
743
- *
744
- * Uses the alternative syntax of data-fe-b-<number>
745
- */
746
- parseEnumeratedAttributeBinding(i) {
747
- const t = [], e = this.attributeMarkerName.length + 1, s = `${this.attributeMarkerName}-`;
748
- for (const n of i.getAttributeNames())
749
- if (n.startsWith(s)) {
750
- const r = Number(n.slice(e));
751
- if (!Number.isNaN(r))
752
- t.push(r);
753
- else
754
- throw new Error(`Invalid attribute marker name: ${n}. Expected format is ${s}<number>.`);
755
- }
756
- return t.length === 0 ? null : t;
757
- },
758
- /**
759
- * Parses the ViewBehaviorFactory index from string data. Returns
760
- * the binding index or null if the index cannot be retrieved.
761
- */
762
- parseContentBindingStartMarker(i) {
763
- return Nt(yt, i);
764
- },
765
- parseContentBindingEndMarker(i) {
766
- return Nt(vt, i);
767
- },
768
- /**
769
- * Parses the index of a repeat directive from a content string.
770
- */
771
- parseRepeatStartMarker(i) {
772
- return Tt(mt, i);
773
- },
774
- parseRepeatEndMarker(i) {
775
- return Tt(wt, i);
776
- },
777
- /**
778
- * Parses element Id from element boundary markers
779
- */
780
- parseElementBoundaryStartMarker(i) {
781
- return $t(St, i.trim());
782
- },
783
- parseElementBoundaryEndMarker(i) {
784
- return $t(Ct, i);
785
- }
786
- });
787
- function Tt(i, t) {
788
- const e = i.exec(t);
789
- return e === null ? e : parseInt(e[1]);
790
- }
791
- function $t(i, t) {
792
- const e = i.exec(t);
793
- return e === null ? e : e[1];
794
- }
795
- function Nt(i, t) {
796
- const e = i.exec(t);
797
- return e === null ? e : [parseInt(e[1]), e[2]];
798
- }
799
- const z = Symbol.for("fe-hydration");
800
- function U(i) {
801
- return i[z] === z;
802
- }
803
- const ct = `fast-${Math.random().toString(36).substring(2, 8)}`, H = `${ct}{`, R = `}${ct}`, ve = R.length;
804
- let me = 0;
805
- const j = () => `${ct}-${++me}`, Kt = Object.freeze({
806
- /**
807
- * Creates a placeholder string suitable for marking out a location *within*
808
- * an attribute value or HTML content.
809
- * @param index - The directive index to create the placeholder for.
810
- * @remarks
811
- * Used internally by binding directives.
812
- */
813
- interpolation: (i) => `${H}${i}${R}`,
814
- /**
815
- * Creates a placeholder that manifests itself as an attribute on an
816
- * element.
817
- * @param attributeName - The name of the custom attribute.
818
- * @param index - The directive index to create the placeholder for.
819
- * @remarks
820
- * Used internally by attribute directives such as `ref`, `slotted`, and `children`.
821
- */
822
- attribute: (i) => `${j()}="${H}${i}${R}"`,
823
- /**
824
- * Creates a placeholder that manifests itself as a marker within the DOM structure.
825
- * @param index - The directive index to create the placeholder for.
826
- * @remarks
827
- * Used internally by structural directives such as `repeat`.
828
- */
829
- comment: (i) => `<!--${H}${i}${R}-->`
830
- }), K = Object.freeze({
831
- /**
832
- * Parses text content or HTML attribute content, separating out the static strings
833
- * from the directives.
834
- * @param value - The content or attribute string to parse.
835
- * @param factories - A list of directives to search for in the string.
836
- * @returns A heterogeneous array of static strings interspersed with
837
- * directives or null if no directives are found in the string.
838
- */
839
- parse(i, t) {
840
- const e = i.split(H);
841
- if (e.length === 1)
842
- return null;
843
- const s = [];
844
- for (let n = 0, r = e.length; n < r; ++n) {
845
- const o = e[n], c = o.indexOf(R);
846
- let d;
847
- if (c === -1)
848
- d = o;
849
- else {
850
- const l = o.substring(0, c);
851
- s.push(t[l]), d = o.substring(c + ve);
852
- }
853
- d !== "" && s.push(d);
854
- }
855
- return s;
856
- }
857
- }), et = Pt(), $ = Object.freeze({
858
- /**
859
- * Gets the directive definition associated with the instance.
860
- * @param instance - The directive instance to retrieve the definition for.
861
- */
862
- getForInstance: et.getForInstance,
863
- /**
864
- * Gets the directive definition associated with the specified type.
865
- * @param type - The directive type to retrieve the definition for.
866
- */
867
- getByType: et.getByType,
868
- /**
869
- * Defines an HTMLDirective based on the options.
870
- * @param type - The type to define as a directive.
871
- * @param options - Options that specify the directive's application.
872
- */
873
- define(i, t) {
874
- return t = t || {}, t.type = i, et.register(t), i;
875
- },
876
- /**
877
- *
878
- * @param directive - The directive to assign the aspect to.
879
- * @param value - The value to base the aspect determination on.
880
- * @remarks
881
- * If a falsy value is provided, then the content aspect will be assigned.
882
- */
883
- assignAspect(i, t) {
884
- if (!t) {
885
- i.aspectType = y.content;
886
- return;
887
- }
888
- switch (i.sourceAspect = t, t[0]) {
889
- case ":":
890
- i.targetAspect = t.substring(1), i.aspectType = i.targetAspect === "classList" ? y.tokenList : y.property;
891
- break;
892
- case "?":
893
- i.targetAspect = t.substring(1), i.aspectType = y.booleanAttribute;
894
- break;
895
- case "@":
896
- i.targetAspect = t.substring(1), i.aspectType = y.event;
897
- break;
898
- default:
899
- i.targetAspect = t, i.aspectType = y.attribute;
900
- break;
901
- }
902
- }
903
- });
904
- class we {
905
- /**
906
- * Creates an instance of RefDirective.
907
- * @param options - The options to use in configuring the directive.
908
- */
909
- constructor(t) {
910
- this.options = t;
911
- }
912
- /**
913
- * Creates a placeholder string based on the directive's index within the template.
914
- * @param index - The index of the directive within the template.
915
- * @remarks
916
- * Creates a custom attribute placeholder.
917
- */
918
- createHTML(t) {
919
- return Kt.attribute(t(this));
920
- }
921
- /**
922
- * Creates a behavior.
923
- * @param targets - The targets available for behaviors to be attached to.
924
- */
925
- createBehavior() {
926
- return this;
927
- }
928
- }
929
- x(we);
930
- class Xt extends Error {
931
- constructor(t, e, s) {
932
- super(t), this.factories = e, this.node = s;
933
- }
934
- }
935
- function dt(i) {
936
- return i.nodeType === Node.COMMENT_NODE;
937
- }
938
- function Yt(i) {
939
- return i.nodeType === Node.TEXT_NODE;
940
- }
941
- function Zt(i, t) {
942
- const e = document.createRange();
943
- return e.setStart(i, 0), e.setEnd(t, dt(t) || Yt(t) ? t.data.length : t.childNodes.length), e;
944
- }
945
- function Se(i) {
946
- return i instanceof DocumentFragment && "mode" in i;
947
- }
948
- function Ce(i, t, e) {
949
- const s = Zt(i, t), n = s.commonAncestorContainer, r = document.createTreeWalker(n, NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_COMMENT + NodeFilter.SHOW_TEXT, {
950
- acceptNode(l) {
951
- return s.comparePoint(l, 0) === 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
952
- }
953
- }), o = {}, c = {};
954
- let d = r.currentNode = i;
955
- for (; d !== null; ) {
956
- switch (d.nodeType) {
957
- case Node.ELEMENT_NODE: {
958
- ke(d, e, o);
959
- break;
960
- }
961
- case Node.COMMENT_NODE: {
962
- Te(d, r, e, o, c);
963
- break;
964
- }
965
- }
966
- d = r.nextNode();
967
- }
968
- return s.detach(), { targets: o, boundaries: c };
969
- }
970
- function ke(i, t, e) {
971
- var s;
972
- const n = (s = w.parseAttributeBinding(i)) !== null && s !== void 0 ? s : w.parseEnumeratedAttributeBinding(i);
973
- if (n !== null) {
974
- for (const r of n) {
975
- if (!t[r])
976
- throw new Xt(`HydrationView was unable to successfully target factory on ${i.nodeName} inside ${i.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`, t, i);
977
- q(t[r], i, e);
978
- }
979
- i.removeAttribute(w.attributeMarkerName);
980
- }
981
- }
982
- function Te(i, t, e, s, n) {
983
- if (w.isElementBoundaryStartMarker(i)) {
984
- $e(i, t);
985
- return;
986
- }
987
- if (w.isContentBindingStartMarker(i.data)) {
988
- const r = w.parseContentBindingStartMarker(i.data);
989
- if (r === null)
990
- return;
991
- const [o, c] = r, d = e[o], l = [];
992
- let a = t.nextSibling();
993
- i.data = "";
994
- const h = a;
995
- for (; a !== null; ) {
996
- if (dt(a)) {
997
- const u = w.parseContentBindingEndMarker(a.data);
998
- if (u && u[1] === c)
999
- break;
1000
- }
1001
- l.push(a), a = t.nextSibling();
1002
- }
1003
- if (a === null) {
1004
- const u = i.getRootNode();
1005
- throw new Error(`Error hydrating Comment node inside "${Se(u) ? u.host.nodeName : u.nodeName}".`);
1006
- }
1007
- if (a.data = "", l.length === 1 && Yt(l[0]))
1008
- q(d, l[0], s);
1009
- else {
1010
- a !== h && a.previousSibling !== null && (n[d.targetNodeId] = {
1011
- first: h,
1012
- last: a.previousSibling
1013
- });
1014
- const u = a.parentNode.insertBefore(document.createTextNode(""), a);
1015
- q(d, u, s);
1016
- }
1017
- }
1018
- }
1019
- function $e(i, t) {
1020
- const e = w.parseElementBoundaryStartMarker(i.data);
1021
- let s = t.nextSibling();
1022
- for (; s !== null; ) {
1023
- if (dt(s)) {
1024
- const n = w.parseElementBoundaryEndMarker(s.data);
1025
- if (n && n === e)
1026
- break;
1027
- }
1028
- s = t.nextSibling();
1029
- }
1030
- }
1031
- function q(i, t, e) {
1032
- if (i.targetNodeId === void 0)
1033
- throw new Error("Factory could not be target to the node");
1034
- e[i.targetNodeId] = t;
1035
- }
1036
- var te;
1037
- function at(i, t) {
1038
- const e = i.parentNode;
1039
- let s = i, n;
1040
- for (; s !== t; ) {
1041
- if (n = s.nextSibling, !n)
1042
- throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);
1043
- e.removeChild(s), s = n;
1044
- }
1045
- e.removeChild(t);
1046
- }
1047
- class ee {
1048
- constructor() {
1049
- this.index = 0, this.length = 0;
1050
- }
1051
- /**
1052
- * The current event within an event handler.
1053
- */
1054
- get event() {
1055
- return O.getEvent();
1056
- }
1057
- /**
1058
- * Indicates whether the current item within a repeat context
1059
- * has an even index.
1060
- */
1061
- get isEven() {
1062
- return this.index % 2 === 0;
1063
- }
1064
- /**
1065
- * Indicates whether the current item within a repeat context
1066
- * has an odd index.
1067
- */
1068
- get isOdd() {
1069
- return this.index % 2 !== 0;
1070
- }
1071
- /**
1072
- * Indicates whether the current item within a repeat context
1073
- * is the first item in the collection.
1074
- */
1075
- get isFirst() {
1076
- return this.index === 0;
1077
- }
1078
- /**
1079
- * Indicates whether the current item within a repeat context
1080
- * is somewhere in the middle of the collection.
1081
- */
1082
- get isInMiddle() {
1083
- return !this.isFirst && !this.isLast;
1084
- }
1085
- /**
1086
- * Indicates whether the current item within a repeat context
1087
- * is the last item in the collection.
1088
- */
1089
- get isLast() {
1090
- return this.index === this.length - 1;
1091
- }
1092
- /**
1093
- * Returns the typed event detail of a custom event.
1094
- */
1095
- eventDetail() {
1096
- return this.event.detail;
1097
- }
1098
- /**
1099
- * Returns the typed event target of the event.
1100
- */
1101
- eventTarget() {
1102
- return this.event.target;
1103
- }
1104
- }
1105
- class X extends ee {
1106
- /**
1107
- * Constructs an instance of HTMLView.
1108
- * @param fragment - The html fragment that contains the nodes for this view.
1109
- * @param behaviors - The behaviors to be applied to this view.
1110
- */
1111
- constructor(t, e, s) {
1112
- super(), this.fragment = t, this.factories = e, this.targets = s, this.behaviors = null, this.unbindables = [], this.source = null, this.isBound = !1, this.sourceLifetime = J.unknown, this.context = this, this.firstChild = t.firstChild, this.lastChild = t.lastChild;
1113
- }
1114
- /**
1115
- * Appends the view's DOM nodes to the referenced node.
1116
- * @param node - The parent node to append the view's DOM nodes to.
1117
- */
1118
- appendTo(t) {
1119
- t.appendChild(this.fragment);
1120
- }
1121
- /**
1122
- * Inserts the view's DOM nodes before the referenced node.
1123
- * @param node - The node to insert the view's DOM before.
1124
- */
1125
- insertBefore(t) {
1126
- if (this.fragment.hasChildNodes())
1127
- t.parentNode.insertBefore(this.fragment, t);
1128
- else {
1129
- const e = this.lastChild;
1130
- if (t.previousSibling === e)
1131
- return;
1132
- const s = t.parentNode;
1133
- let n = this.firstChild, r;
1134
- for (; n !== e; )
1135
- r = n.nextSibling, s.insertBefore(n, t), n = r;
1136
- s.insertBefore(e, t);
1137
- }
1138
- }
1139
- /**
1140
- * Removes the view's DOM nodes.
1141
- * The nodes are not disposed and the view can later be re-inserted.
1142
- */
1143
- remove() {
1144
- const t = this.fragment, e = this.lastChild;
1145
- let s = this.firstChild, n;
1146
- for (; s !== e; )
1147
- n = s.nextSibling, t.appendChild(s), s = n;
1148
- t.appendChild(e);
1149
- }
1150
- /**
1151
- * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.
1152
- * Once a view has been disposed, it cannot be inserted or bound again.
1153
- */
1154
- dispose() {
1155
- at(this.firstChild, this.lastChild), this.unbind();
1156
- }
1157
- onUnbind(t) {
1158
- this.unbindables.push(t);
1159
- }
1160
- /**
1161
- * Binds a view's behaviors to its binding source.
1162
- * @param source - The binding source for the view's binding behaviors.
1163
- * @param context - The execution context to run the behaviors within.
1164
- */
1165
- bind(t, e = this) {
1166
- if (this.source === t)
1167
- return;
1168
- let s = this.behaviors;
1169
- if (s === null) {
1170
- this.source = t, this.context = e, this.behaviors = s = new Array(this.factories.length);
1171
- const n = this.factories;
1172
- for (let r = 0, o = n.length; r < o; ++r) {
1173
- const c = n[r].createBehavior();
1174
- c.bind(this), s[r] = c;
1175
- }
1176
- } else {
1177
- this.source !== null && this.evaluateUnbindables(), this.isBound = !1, this.source = t, this.context = e;
1178
- for (let n = 0, r = s.length; n < r; ++n)
1179
- s[n].bind(this);
1180
- }
1181
- this.isBound = !0;
1182
- }
1183
- /**
1184
- * Unbinds a view's behaviors from its binding source.
1185
- */
1186
- unbind() {
1187
- !this.isBound || this.source === null || (this.evaluateUnbindables(), this.source = null, this.context = this, this.isBound = !1);
1188
- }
1189
- evaluateUnbindables() {
1190
- const t = this.unbindables;
1191
- for (let e = 0, s = t.length; e < s; ++e)
1192
- t[e].unbind(this);
1193
- t.length = 0;
1194
- }
1195
- /**
1196
- * Efficiently disposes of a contiguous range of synthetic view instances.
1197
- * @param views - A contiguous range of views to be disposed.
1198
- */
1199
- static disposeContiguousBatch(t) {
1200
- if (t.length !== 0) {
1201
- at(t[0].firstChild, t[t.length - 1].lastChild);
1202
- for (let e = 0, s = t.length; e < s; ++e)
1203
- t[e].unbind();
1204
- }
1205
- }
1206
- }
1207
- x(X);
1208
- g.defineProperty(X.prototype, "index");
1209
- g.defineProperty(X.prototype, "length");
1210
- const A = {
1211
- unhydrated: "unhydrated",
1212
- hydrating: "hydrating",
1213
- hydrated: "hydrated"
357
+ function re(e, t) {
358
+ y.defineProperty(e, t);
359
+ }
360
+ function ie(e, t, n) {
361
+ return Object.assign({}, n, { get() {
362
+ return y.trackVolatile(), n.get.apply(this);
363
+ } });
364
+ }
365
+ var ae = s.getById(n.contextEvent, () => {
366
+ let e = null;
367
+ return {
368
+ get() {
369
+ return e;
370
+ },
371
+ set(t) {
372
+ e = t;
373
+ }
374
+ };
375
+ }), b = Object.freeze({
376
+ default: {
377
+ index: 0,
378
+ length: 0,
379
+ get event() {
380
+ return b.getEvent();
381
+ },
382
+ eventDetail() {
383
+ return this.event.detail;
384
+ },
385
+ eventTarget() {
386
+ return this.event.target;
387
+ }
388
+ },
389
+ getEvent() {
390
+ return ae.get();
391
+ },
392
+ setEvent(e) {
393
+ ae.set(e);
394
+ }
395
+ }), x = class {
396
+ constructor(e, t, n = !1) {
397
+ this.evaluate = e, this.policy = t, this.isVolatile = n;
398
+ }
399
+ }, oe = class extends x {
400
+ createObserver(e) {
401
+ return y.binding(this.evaluate, e, this.isVolatile);
402
+ }
1214
403
  };
1215
- class Ne extends Error {
1216
- constructor(t, e, s, n) {
1217
- super(t), this.factory = e, this.fragment = s, this.templateString = n;
1218
- }
1219
- }
1220
- class Be extends ee {
1221
- constructor(t, e, s, n) {
1222
- super(), this.firstChild = t, this.lastChild = e, this.sourceTemplate = s, this.hostBindingTarget = n, this[te] = z, this.context = this, this.source = null, this.isBound = !1, this.sourceLifetime = J.unknown, this.unbindables = [], this.fragment = null, this.behaviors = null, this._hydrationStage = A.unhydrated, this._bindingViewBoundaries = {}, this._targets = {}, this.factories = s.compile().factories;
1223
- }
1224
- get hydrationStage() {
1225
- return this._hydrationStage;
1226
- }
1227
- get targets() {
1228
- return this._targets;
1229
- }
1230
- get bindingViewBoundaries() {
1231
- return this._bindingViewBoundaries;
1232
- }
1233
- /**
1234
- * no-op. Hydrated views are don't need to be moved from a documentFragment
1235
- * to the target node.
1236
- */
1237
- insertBefore(t) {
1238
- if (this.fragment !== null)
1239
- if (this.fragment.hasChildNodes())
1240
- t.parentNode.insertBefore(this.fragment, t);
1241
- else {
1242
- const e = this.lastChild;
1243
- if (t.previousSibling === e)
1244
- return;
1245
- const s = t.parentNode;
1246
- let n = this.firstChild, r;
1247
- for (; n !== e; )
1248
- r = n.nextSibling, s.insertBefore(n, t), n = r;
1249
- s.insertBefore(e, t);
1250
- }
1251
- }
1252
- /**
1253
- * Appends the view to a node. In cases where this is called before the
1254
- * view has been removed, the method will no-op.
1255
- * @param node - the node to append the view to.
1256
- */
1257
- appendTo(t) {
1258
- this.fragment !== null && t.appendChild(this.fragment);
1259
- }
1260
- remove() {
1261
- const t = this.fragment || (this.fragment = document.createDocumentFragment()), e = this.lastChild;
1262
- let s = this.firstChild, n;
1263
- for (; s !== e; ) {
1264
- if (n = s.nextSibling, !n)
1265
- throw new Error(`Unmatched first/last child inside "${e.getRootNode().host.nodeName}".`);
1266
- t.appendChild(s), s = n;
1267
- }
1268
- t.appendChild(e);
1269
- }
1270
- bind(t, e = this) {
1271
- var s;
1272
- if (this.hydrationStage !== A.hydrated && (this._hydrationStage = A.hydrating), this.source === t)
1273
- return;
1274
- let n = this.behaviors;
1275
- if (n === null) {
1276
- this.source = t, this.context = e;
1277
- try {
1278
- const { targets: o, boundaries: c } = Ce(this.firstChild, this.lastChild, this.factories);
1279
- this._targets = o, this._bindingViewBoundaries = c;
1280
- } catch (o) {
1281
- if (o instanceof Xt) {
1282
- let c = this.sourceTemplate.html;
1283
- typeof c != "string" && (c = c.innerHTML), o.templateString = c;
1284
- }
1285
- throw o;
1286
- }
1287
- this.behaviors = n = new Array(this.factories.length);
1288
- const r = this.factories;
1289
- for (let o = 0, c = r.length; o < c; ++o) {
1290
- const d = r[o];
1291
- if (d.targetNodeId === "h" && this.hostBindingTarget && q(d, this.hostBindingTarget, this._targets), d.targetNodeId in this.targets) {
1292
- const l = d.createBehavior();
1293
- l.bind(this), n[o] = l;
1294
- } else {
1295
- let l = this.sourceTemplate.html;
1296
- typeof l != "string" && (l = l.innerHTML);
1297
- const a = ((s = this.firstChild) === null || s === void 0 ? void 0 : s.getRootNode()).host, h = a?.nodeName || "unknown", u = d, b = [
1298
- `HydrationView was unable to successfully target bindings inside "<${h.toLowerCase()}>".`,
1299
- `
1300
- Mismatch Details:`,
1301
- ` - Expected target node ID: "${d.targetNodeId}"`,
1302
- ` - Available target IDs: [${Object.keys(this.targets).join(", ") || "none"}]`
1303
- ];
1304
- throw d.targetTagName && b.push(` - Expected tag name: "${d.targetTagName}"`), u.sourceAspect && b.push(` - Source aspect: "${u.sourceAspect}"`), u.aspectType !== void 0 && b.push(` - Aspect type: ${u.aspectType}`), b.push(`
1305
- This usually means:`, " 1. The server-rendered HTML doesn't match the client template", " 2. The hydration markers are missing or corrupted", " 3. The DOM structure was modified before hydration", `
1306
- Template: ${l.slice(0, 200)}${l.length > 200 ? "..." : ""}`), new Ne(b.join(`
1307
- `), d, Zt(this.firstChild, this.lastChild).cloneContents(), l);
1308
- }
1309
- }
1310
- } else {
1311
- this.source !== null && this.evaluateUnbindables(), this.isBound = !1, this.source = t, this.context = e;
1312
- for (let r = 0, o = n.length; r < o; ++r)
1313
- n[r].bind(this);
1314
- }
1315
- this.isBound = !0, this._hydrationStage = A.hydrated;
1316
- }
1317
- unbind() {
1318
- !this.isBound || this.source === null || (this.evaluateUnbindables(), this.source = null, this.context = this, this.isBound = !1);
1319
- }
1320
- /**
1321
- * Removes the view and unbinds its behaviors, disposing of DOM nodes afterward.
1322
- * Once a view has been disposed, it cannot be inserted or bound again.
1323
- */
1324
- dispose() {
1325
- at(this.firstChild, this.lastChild), this.unbind();
1326
- }
1327
- onUnbind(t) {
1328
- this.unbindables.push(t);
1329
- }
1330
- evaluateUnbindables() {
1331
- const t = this.unbindables;
1332
- for (let e = 0, s = t.length; e < s; ++e)
1333
- t[e].unbind(this);
1334
- t.length = 0;
1335
- }
1336
- }
1337
- te = z;
1338
- x(Be);
1339
- function xe(i) {
1340
- return i.create !== void 0;
1341
- }
1342
- function Ae(i, t, e, s) {
1343
- if (e == null && (e = ""), xe(e)) {
1344
- i.textContent = "";
1345
- let n = i.$fastView;
1346
- if (n === void 0)
1347
- if (U(s) && U(e) && s.bindingViewBoundaries[this.targetNodeId] !== void 0 && s.hydrationStage !== A.hydrated) {
1348
- const r = s.bindingViewBoundaries[this.targetNodeId];
1349
- n = e.hydrate(r.first, r.last);
1350
- } else
1351
- n = e.create();
1352
- else
1353
- i.$fastTemplate !== e && (n.isComposed && (n.remove(), n.unbind()), n = e.create());
1354
- n.isComposed ? n.needsBindOnly && (n.needsBindOnly = !1, n.bind(s.source, s.context)) : (n.isComposed = !0, n.bind(s.source, s.context), n.insertBefore(i), i.$fastView = n, i.$fastTemplate = e);
1355
- } else {
1356
- const n = i.$fastView;
1357
- n !== void 0 && n.isComposed && (n.isComposed = !1, n.remove(), n.needsBindOnly ? n.needsBindOnly = !1 : n.unbind()), i.textContent = e;
1358
- }
1359
- }
1360
- function Me(i, t, e) {
1361
- var s;
1362
- const n = `${this.id}-t`, r = (s = i[n]) !== null && s !== void 0 ? s : i[n] = { v: 0, cv: /* @__PURE__ */ Object.create(null) }, o = r.cv;
1363
- let c = r.v;
1364
- const d = i[t];
1365
- if (e != null && e.length) {
1366
- const l = e.split(/\s+/);
1367
- for (let a = 0, h = l.length; a < h; ++a) {
1368
- const u = l[a];
1369
- u !== "" && (o[u] = c, d.add(u));
1370
- }
1371
- }
1372
- if (r.v = c + 1, c !== 0) {
1373
- c -= 1;
1374
- for (const l in o)
1375
- o[l] === c && d.remove(l);
1376
- }
1377
- }
1378
- const Oe = {
1379
- [y.attribute]: T.setAttribute,
1380
- [y.booleanAttribute]: T.setBooleanAttribute,
1381
- [y.property]: (i, t, e) => i[t] = e,
1382
- [y.content]: Ae,
1383
- [y.tokenList]: Me,
1384
- [y.event]: () => {
1385
- }
404
+ function se(e, t, n = y.isVolatileBinding(e)) {
405
+ return new oe(e, t, n);
406
+ }
407
+ //#endregion
408
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/binding/one-time.js
409
+ var ce = class extends x {
410
+ createObserver() {
411
+ return this;
412
+ }
413
+ bind(e) {
414
+ return this.evaluate(e.source, e.context);
415
+ }
1386
416
  };
1387
- class M {
1388
- /**
1389
- * Creates an instance of HTMLBindingDirective.
1390
- * @param dataBinding - The binding configuration to apply.
1391
- */
1392
- constructor(t) {
1393
- this.dataBinding = t, this.updateTarget = null, this.aspectType = y.content;
1394
- }
1395
- /**
1396
- * Creates HTML to be used within a template.
1397
- * @param add - Can be used to add behavior factories to a template.
1398
- */
1399
- createHTML(t) {
1400
- return Kt.interpolation(t(this));
1401
- }
1402
- /**
1403
- * Creates a behavior.
1404
- */
1405
- createBehavior() {
1406
- var t;
1407
- if (this.updateTarget === null) {
1408
- const e = Oe[this.aspectType], s = (t = this.dataBinding.policy) !== null && t !== void 0 ? t : this.policy;
1409
- if (!e)
1410
- throw v.error(
1411
- 1205
1412
- /* Message.unsupportedBindingBehavior */
1413
- );
1414
- this.data = `${this.id}-d`, this.updateTarget = s.protect(this.targetTagName, this.aspectType, this.targetAspect, e);
1415
- }
1416
- return this;
1417
- }
1418
- /** @internal */
1419
- bind(t) {
1420
- var e;
1421
- const s = t.targets[this.targetNodeId], n = U(t) && t.hydrationStage && t.hydrationStage !== A.hydrated;
1422
- switch (this.aspectType) {
1423
- case y.event:
1424
- s[this.data] = t, s.addEventListener(this.targetAspect, this, this.dataBinding.options);
1425
- break;
1426
- case y.content:
1427
- t.onUnbind(this);
1428
- default:
1429
- const r = (e = s[this.data]) !== null && e !== void 0 ? e : s[this.data] = this.dataBinding.createObserver(this, this);
1430
- if (r.target = s, r.controller = t, n && (this.aspectType === y.attribute || this.aspectType === y.booleanAttribute)) {
1431
- r.bind(t);
1432
- break;
1433
- }
1434
- this.updateTarget(s, this.targetAspect, r.bind(t), t);
1435
- break;
1436
- }
1437
- }
1438
- /** @internal */
1439
- unbind(t) {
1440
- const s = t.targets[this.targetNodeId].$fastView;
1441
- s !== void 0 && s.isComposed && (s.unbind(), s.needsBindOnly = !0);
1442
- }
1443
- /** @internal */
1444
- handleEvent(t) {
1445
- const e = t.currentTarget[this.data];
1446
- if (e.isBound) {
1447
- O.setEvent(t);
1448
- const s = this.dataBinding.evaluate(e.source, e.context);
1449
- O.setEvent(null), s !== !0 && t.preventDefault();
1450
- }
1451
- }
1452
- /** @internal */
1453
- handleChange(t, e) {
1454
- const s = e.target, n = e.controller;
1455
- this.updateTarget(s, this.targetAspect, e.bind(n), n);
1456
- }
1457
- }
1458
- $.define(M, { aspected: !0 });
1459
- const ie = (i, t) => `${i}.${t}`, Bt = {}, C = {
1460
- index: 0,
1461
- node: null
417
+ d(ce);
418
+ function le(e, t) {
419
+ return new ce(e, t);
420
+ }
421
+ //#endregion
422
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/styles/element-styles.js
423
+ var ue;
424
+ function de(e) {
425
+ return e.map((e) => e instanceof S ? de(e.styles) : [e]).reduce((e, t) => e.concat(t), []);
426
+ }
427
+ var S = class e {
428
+ constructor(t) {
429
+ this.styles = t, this.targets = /* @__PURE__ */ new WeakSet(), this._strategy = null, this.behaviors = t.map((t) => t instanceof e ? t.behaviors : null).reduce((e, t) => t === null ? e : e === null ? t : e.concat(t), null);
430
+ }
431
+ get strategy() {
432
+ return this._strategy === null && this.withStrategy(ue), this._strategy;
433
+ }
434
+ addStylesTo(e) {
435
+ this.strategy.addStylesTo(e), this.targets.add(e);
436
+ }
437
+ removeStylesFrom(e) {
438
+ this.strategy.removeStylesFrom(e), this.targets.delete(e);
439
+ }
440
+ isAttachedTo(e) {
441
+ return this.targets.has(e);
442
+ }
443
+ withBehaviors(...e) {
444
+ return this.behaviors = this.behaviors === null ? e : this.behaviors.concat(e), this;
445
+ }
446
+ withStrategy(e) {
447
+ return this._strategy = new e(de(this.styles)), this;
448
+ }
449
+ static setDefaultStrategy(e) {
450
+ ue = e;
451
+ }
452
+ static normalize(t) {
453
+ return t === void 0 ? void 0 : Array.isArray(t) ? new e(t) : t instanceof e ? t : new e([t]);
454
+ }
1462
455
  };
1463
- function xt(i) {
1464
- i.startsWith("fast-") || v.warn(1204, { name: i });
1465
- }
1466
- const Ee = new Proxy(document.createElement("div"), {
1467
- get(i, t) {
1468
- xt(t);
1469
- const e = Reflect.get(i, t);
1470
- return E(e) ? e.bind(i) : e;
1471
- },
1472
- set(i, t, e) {
1473
- return xt(t), Reflect.set(i, t, e);
1474
- }
456
+ S.supportsAdoptedStyleSheets = Array.isArray(document.adoptedStyleSheets) && "replace" in CSSStyleSheet.prototype;
457
+ //#endregion
458
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/components/hydration.js
459
+ var fe = /fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/, pe = /fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/, me = /fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/, he = /fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/, ge = /^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/, _e = /fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;
460
+ function ve(e) {
461
+ return e && e.nodeType === Node.COMMENT_NODE;
462
+ }
463
+ var C = Object.freeze({
464
+ attributeMarkerName: "data-fe-b",
465
+ attributeBindingSeparator: " ",
466
+ contentBindingStartMarker(e, t) {
467
+ return `fe-b$$start$$${e}$$${t}$$fe-b`;
468
+ },
469
+ contentBindingEndMarker(e, t) {
470
+ return `fe-b$$end$$${e}$$${t}$$fe-b`;
471
+ },
472
+ repeatStartMarker(e) {
473
+ return `fe-repeat$$start$$${e}$$fe-repeat`;
474
+ },
475
+ repeatEndMarker(e) {
476
+ return `fe-repeat$$end$$${e}$$fe-repeat`;
477
+ },
478
+ isContentBindingStartMarker(e) {
479
+ return fe.test(e);
480
+ },
481
+ isContentBindingEndMarker(e) {
482
+ return pe.test(e);
483
+ },
484
+ isRepeatViewStartMarker(e) {
485
+ return me.test(e);
486
+ },
487
+ isRepeatViewEndMarker(e) {
488
+ return he.test(e);
489
+ },
490
+ isElementBoundaryStartMarker(e) {
491
+ return ve(e) && ge.test(e.data.trim());
492
+ },
493
+ isElementBoundaryEndMarker(e) {
494
+ return ve(e) && _e.test(e.data);
495
+ },
496
+ parseAttributeBinding(e) {
497
+ let t = e.getAttribute(this.attributeMarkerName);
498
+ return t === null ? t : t.split(this.attributeBindingSeparator).map((e) => parseInt(e));
499
+ },
500
+ parseEnumeratedAttributeBinding(e) {
501
+ let t = [], n = this.attributeMarkerName.length + 1, r = `${this.attributeMarkerName}-`;
502
+ for (let i of e.getAttributeNames()) if (i.startsWith(r)) {
503
+ let e = Number(i.slice(n));
504
+ if (!Number.isNaN(e)) t.push(e);
505
+ else throw Error(`Invalid attribute marker name: ${i}. Expected format is ${r}<number>.`);
506
+ }
507
+ return t.length === 0 ? null : t;
508
+ },
509
+ parseContentBindingStartMarker(e) {
510
+ return xe(fe, e);
511
+ },
512
+ parseContentBindingEndMarker(e) {
513
+ return xe(pe, e);
514
+ },
515
+ parseRepeatStartMarker(e) {
516
+ return ye(me, e);
517
+ },
518
+ parseRepeatEndMarker(e) {
519
+ return ye(he, e);
520
+ },
521
+ parseElementBoundaryStartMarker(e) {
522
+ return be(ge, e.trim());
523
+ },
524
+ parseElementBoundaryEndMarker(e) {
525
+ return be(_e, e);
526
+ }
1475
527
  });
1476
- class Re {
1477
- constructor(t, e, s) {
1478
- this.fragment = t, this.directives = e, this.policy = s, this.proto = null, this.nodeIds = /* @__PURE__ */ new Set(), this.descriptors = {}, this.factories = [];
1479
- }
1480
- addFactory(t, e, s, n, r) {
1481
- var o, c;
1482
- this.nodeIds.has(s) || (this.nodeIds.add(s), this.addTargetDescriptor(e, s, n)), t.id = (o = t.id) !== null && o !== void 0 ? o : j(), t.targetNodeId = s, t.targetTagName = r, t.policy = (c = t.policy) !== null && c !== void 0 ? c : this.policy, this.factories.push(t);
1483
- }
1484
- freeze() {
1485
- return this.proto = Object.create(null, this.descriptors), this;
1486
- }
1487
- addTargetDescriptor(t, e, s) {
1488
- const n = this.descriptors;
1489
- if (e === "r" || // root
1490
- e === "h" || // host
1491
- n[e])
1492
- return;
1493
- if (!n[t]) {
1494
- const o = t.lastIndexOf("."), c = t.substring(0, o), d = parseInt(t.substring(o + 1));
1495
- this.addTargetDescriptor(c, t, d);
1496
- }
1497
- let r = Bt[e];
1498
- if (!r) {
1499
- const o = `_${e}`;
1500
- Bt[e] = r = {
1501
- get() {
1502
- var c;
1503
- return (c = this[o]) !== null && c !== void 0 ? c : this[o] = this[t].childNodes[s];
1504
- }
1505
- };
1506
- }
1507
- n[e] = r;
1508
- }
1509
- createView(t) {
1510
- const e = this.fragment.cloneNode(!0), s = Object.create(this.proto);
1511
- s.r = e, s.h = t ?? Ee;
1512
- for (const n of this.nodeIds)
1513
- s[n];
1514
- return new X(e, this.factories, s);
1515
- }
1516
- }
1517
- function se(i, t, e, s, n, r = !1) {
1518
- const o = e.attributes, c = i.directives;
1519
- for (let d = 0, l = o.length; d < l; ++d) {
1520
- const a = o[d], h = a.value, u = K.parse(h, c);
1521
- let b = null;
1522
- u === null ? r && (b = new M(Gt(() => h, i.policy)), $.assignAspect(b, a.name)) : b = ht.aggregate(u, i.policy), b !== null && (e.removeAttributeNode(a), d--, l--, i.addFactory(b, t, s, n, e.tagName));
1523
- }
1524
- }
1525
- function _e(i, t, e, s, n) {
1526
- const r = K.parse(t.textContent, i.directives);
1527
- if (r === null)
1528
- return C.node = t.nextSibling, C.index = n + 1, C;
1529
- let o, c = o = t;
1530
- for (let d = 0, l = r.length; d < l; ++d) {
1531
- const a = r[d];
1532
- d !== 0 && (n++, s = ie(e, n), o = c.parentNode.insertBefore(document.createTextNode(""), c.nextSibling)), B(a) ? o.textContent = a : (o.textContent = " ", $.assignAspect(a), i.addFactory(a, e, s, n, null)), c = o;
1533
- }
1534
- return C.index = n + 1, C.node = c.nextSibling, C;
1535
- }
1536
- function ne(i, t, e) {
1537
- let s = 0, n = t.firstChild;
1538
- for (; n; ) {
1539
- const r = Ie(i, e, n, s);
1540
- n = r.node, s = r.index;
1541
- }
1542
- }
1543
- function Ie(i, t, e, s) {
1544
- const n = ie(t, s);
1545
- switch (e.nodeType) {
1546
- case 1:
1547
- se(i, t, e, n, s), ne(i, e, n);
1548
- break;
1549
- case 3:
1550
- return _e(i, e, t, n, s);
1551
- case 8:
1552
- const r = K.parse(e.data, i.directives);
1553
- r !== null && i.addFactory(
1554
- /* eslint-disable-next-line @typescript-eslint/no-use-before-define */
1555
- ht.aggregate(r),
1556
- t,
1557
- n,
1558
- s,
1559
- null
1560
- );
1561
- break;
1562
- }
1563
- return C.index = s + 1, C.node = e.nextSibling, C;
1564
- }
1565
- function je(i, t) {
1566
- return i && i.nodeType == 8 && K.parse(i.data, t) !== null;
1567
- }
1568
- const At = "TEMPLATE", ht = {
1569
- /**
1570
- * Compiles a template and associated directives into a compilation
1571
- * result which can be used to create views.
1572
- * @param html - The html string or template element to compile.
1573
- * @param factories - The behavior factories referenced by the template.
1574
- * @param policy - The security policy to compile the html with.
1575
- * @remarks
1576
- * The template that is provided for compilation is altered in-place
1577
- * and cannot be compiled again. If the original template must be preserved,
1578
- * it is recommended that you clone the original and pass the clone to this API.
1579
- * @public
1580
- */
1581
- compile(i, t, e = T.policy) {
1582
- let s;
1583
- if (B(i)) {
1584
- s = document.createElement(At), s.innerHTML = e.createHTML(i);
1585
- const o = s.content.firstElementChild;
1586
- o !== null && o.tagName === At && (s = o);
1587
- } else
1588
- s = i;
1589
- !s.content.firstChild && !s.content.lastChild && s.content.appendChild(document.createComment(""));
1590
- const n = document.adoptNode(s.content), r = new Re(n, t, e);
1591
- return se(
1592
- r,
1593
- "",
1594
- s,
1595
- /* host */
1596
- "h",
1597
- 0,
1598
- !0
1599
- ), // If the first node in a fragment is a marker, that means it's an unstable first node,
1600
- // because something like a when, repeat, etc. could add nodes before the marker.
1601
- // To mitigate this, we insert a stable first node. However, if we insert a node,
1602
- // that will alter the result of the TreeWalker. So, we also need to offset the target index.
1603
- (je(n.firstChild, t) || // Or if there is only one node and a directive, it means the template's content
1604
- // is *only* the directive. In that case, HTMLView.dispose() misses any nodes inserted by
1605
- // the directive. Inserting a new node ensures proper disposal of nodes added by the directive.
1606
- n.childNodes.length === 1 && Object.keys(t).length > 0) && n.insertBefore(document.createComment(""), n.firstChild), ne(
1607
- r,
1608
- n,
1609
- /* root */
1610
- "r"
1611
- ), C.node = null, r.freeze();
1612
- },
1613
- /**
1614
- * Sets the default compilation strategy that will be used by the ViewTemplate whenever
1615
- * it needs to compile a view preprocessed with the html template function.
1616
- * @param strategy - The compilation strategy to use when compiling templates.
1617
- */
1618
- setDefaultStrategy(i) {
1619
- this.compile = i;
1620
- },
1621
- /**
1622
- * Aggregates an array of strings and directives into a single directive.
1623
- * @param parts - A heterogeneous array of static strings interspersed with
1624
- * directives.
1625
- * @param policy - The security policy to use with the aggregated bindings.
1626
- * @returns A single inline directive that aggregates the behavior of all the parts.
1627
- */
1628
- aggregate(i, t = T.policy) {
1629
- if (i.length === 1)
1630
- return i[0];
1631
- let e, s = !1, n;
1632
- const r = i.length, o = i.map((l) => B(l) ? () => l : (e = l.sourceAspect || e, s = s || l.dataBinding.isVolatile, n = n || l.dataBinding.policy, l.dataBinding.evaluate)), c = (l, a) => {
1633
- let h = "";
1634
- for (let u = 0; u < r; ++u)
1635
- h += o[u](l, a);
1636
- return h;
1637
- }, d = new M(Wt(c, n ?? t, s));
1638
- return $.assignAspect(d, e), d;
1639
- }
1640
- }, Le = (
1641
- /* eslint-disable-next-line no-control-regex, max-len */
1642
- /([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/
1643
- ), Ve = /* @__PURE__ */ Object.create(null);
1644
- class L {
1645
- /**
1646
- * Creates an instance of InlineTemplateDirective.
1647
- * @param template - The template to inline.
1648
- */
1649
- constructor(t, e = Ve) {
1650
- this.html = t, this.factories = e;
1651
- }
1652
- /**
1653
- * Creates HTML to be used within a template.
1654
- * @param add - Can be used to add behavior factories to a template.
1655
- */
1656
- createHTML(t) {
1657
- const e = this.factories;
1658
- for (const s in e)
1659
- t(e[s]);
1660
- return this.html;
1661
- }
1662
- }
1663
- L.empty = new L("");
1664
- $.define(L);
1665
- function Fe(i, t, e, s = $.getForInstance(i)) {
1666
- if (s.aspected) {
1667
- const n = Le.exec(t);
1668
- n !== null && $.assignAspect(i, n[2]);
1669
- }
1670
- return i.createHTML(e);
1671
- }
1672
- class Y {
1673
- /**
1674
- * Creates an instance of ViewTemplate.
1675
- * @param html - The html representing what this template will instantiate, including placeholders for directives.
1676
- * @param factories - The directives that will be connected to placeholders in the html.
1677
- * @param policy - The security policy to use when compiling this template.
1678
- */
1679
- constructor(t, e = {}, s) {
1680
- this.policy = s, this.result = null, this.html = t, this.factories = e;
1681
- }
1682
- /**
1683
- * @internal
1684
- */
1685
- compile() {
1686
- return this.result === null && (this.result = ht.compile(this.html, this.factories, this.policy)), this.result;
1687
- }
1688
- /**
1689
- * Creates an HTMLView instance based on this template definition.
1690
- * @param hostBindingTarget - The element that host behaviors will be bound to.
1691
- */
1692
- create(t) {
1693
- return this.compile().createView(t);
1694
- }
1695
- /**
1696
- * Returns a directive that can inline the template.
1697
- */
1698
- inline() {
1699
- return new L(B(this.html) ? this.html : this.html.innerHTML, this.factories);
1700
- }
1701
- /**
1702
- * Sets the DOMPolicy for this template.
1703
- * @param policy - The policy to associated with this template.
1704
- * @returns The modified template instance.
1705
- * @remarks
1706
- * The DOMPolicy can only be set once for a template and cannot be
1707
- * set after the template is compiled.
1708
- */
1709
- withPolicy(t) {
1710
- if (this.result)
1711
- throw v.error(
1712
- 1208
1713
- /* Message.cannotSetTemplatePolicyAfterCompilation */
1714
- );
1715
- if (this.policy)
1716
- throw v.error(
1717
- 1207
1718
- /* Message.onlySetTemplatePolicyOnce */
1719
- );
1720
- return this.policy = t, this;
1721
- }
1722
- /**
1723
- * Creates an HTMLView from this template, binds it to the source, and then appends it to the host.
1724
- * @param source - The data source to bind the template to.
1725
- * @param host - The Element where the template will be rendered.
1726
- * @param hostBindingTarget - An HTML element to target the host bindings at if different from the
1727
- * host that the template is being attached to.
1728
- */
1729
- render(t, e, s) {
1730
- const n = this.create(s);
1731
- return n.bind(t), n.appendTo(e), n;
1732
- }
1733
- /**
1734
- * Creates a template based on a set of static strings and dynamic values.
1735
- * @param strings - The static strings to create the template with.
1736
- * @param values - The dynamic values to create the template with.
1737
- * @param policy - The DOMPolicy to associated with the template.
1738
- * @returns A ViewTemplate.
1739
- * @remarks
1740
- * This API should not be used directly under normal circumstances because constructing
1741
- * a template in this way, if not done properly, can open up the application to XSS
1742
- * attacks. When using this API, provide a strong DOMPolicy that can properly sanitize
1743
- * and also be sure to manually sanitize all static strings particularly if they can
1744
- * come from user input.
1745
- */
1746
- static create(t, e, s) {
1747
- let n = "";
1748
- const r = /* @__PURE__ */ Object.create(null), o = (c) => {
1749
- var d;
1750
- const l = (d = c.id) !== null && d !== void 0 ? d : c.id = j();
1751
- return r[l] = c, l;
1752
- };
1753
- for (let c = 0, d = t.length - 1; c < d; ++c) {
1754
- const l = t[c];
1755
- let a = e[c], h;
1756
- if (n += l, E(a))
1757
- a = new M(Wt(a));
1758
- else if (a instanceof lt)
1759
- a = new M(a);
1760
- else if (!(h = $.getForInstance(a))) {
1761
- const u = a;
1762
- a = new M(Gt(() => u));
1763
- }
1764
- n += Fe(a, l, o, h);
1765
- }
1766
- return new Y(n + t[t.length - 1], r, s);
1767
- }
1768
- }
1769
- x(Y);
1770
- const re = (i, ...t) => {
1771
- if (Array.isArray(i) && Array.isArray(i.raw))
1772
- return Y.create(i, t);
1773
- throw v.error(
1774
- 1206
1775
- /* Message.directCallToHTMLTagNotAllowed */
1776
- );
528
+ function ye(e, t) {
529
+ let n = e.exec(t);
530
+ return n === null ? n : parseInt(n[1]);
531
+ }
532
+ function be(e, t) {
533
+ let n = e.exec(t);
534
+ return n === null ? n : n[1];
535
+ }
536
+ function xe(e, t) {
537
+ let n = e.exec(t);
538
+ return n === null ? n : [parseInt(n[1]), n[2]];
539
+ }
540
+ var w = Symbol.for("fe-hydration");
541
+ function T(e) {
542
+ return e[w] === w;
543
+ }
544
+ //#endregion
545
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/templating/markup.js
546
+ var Se = `fast-${Math.random().toString(36).substring(2, 8)}`, E = `${Se}{`, D = `}${Se}`, Ce = D.length, we = 0, O = () => `${Se}-${++we}`, Te = Object.freeze({
547
+ interpolation: (e) => `${E}${e}${D}`,
548
+ attribute: (e) => `${O()}="${E}${e}${D}"`,
549
+ comment: (e) => `<!--${E}${e}${D}-->`
550
+ }), k = Object.freeze({ parse(e, t) {
551
+ let n = e.split(E);
552
+ if (n.length === 1) return null;
553
+ let r = [];
554
+ for (let e = 0, i = n.length; e < i; ++e) {
555
+ let i = n[e], a = i.indexOf(D), o;
556
+ if (a === -1) o = i;
557
+ else {
558
+ let e = i.substring(0, a);
559
+ r.push(t[e]), o = i.substring(a + Ce);
560
+ }
561
+ o !== "" && r.push(o);
562
+ }
563
+ return r;
564
+ } }), A = l(), j = Object.freeze({
565
+ getForInstance: A.getForInstance,
566
+ getByType: A.getByType,
567
+ define(e, t) {
568
+ return t ||= {}, t.type = e, A.register(t), e;
569
+ },
570
+ assignAspect(e, t) {
571
+ if (!t) {
572
+ e.aspectType = f.content;
573
+ return;
574
+ }
575
+ switch (e.sourceAspect = t, t[0]) {
576
+ case ":":
577
+ e.targetAspect = t.substring(1), e.aspectType = e.targetAspect === "classList" ? f.tokenList : f.property;
578
+ break;
579
+ case "?":
580
+ e.targetAspect = t.substring(1), e.aspectType = f.booleanAttribute;
581
+ break;
582
+ case "@":
583
+ e.targetAspect = t.substring(1), e.aspectType = f.event;
584
+ break;
585
+ default:
586
+ e.targetAspect = t, e.aspectType = f.attribute;
587
+ break;
588
+ }
589
+ }
590
+ }), Ee = class {
591
+ constructor(e) {
592
+ this.options = e;
593
+ }
594
+ createHTML(e) {
595
+ return Te.attribute(e(this));
596
+ }
597
+ createBehavior() {
598
+ return this;
599
+ }
1777
600
  };
1778
- re.partial = (i) => new L(i);
1779
- const Mt = "boolean", Ot = "reflect", ae = Object.freeze({
1780
- /**
1781
- * Locates all attribute configurations associated with a type.
1782
- */
1783
- locate: zt()
1784
- }), De = {
1785
- toView(i) {
1786
- return i ? "true" : "false";
1787
- },
1788
- fromView(i) {
1789
- return !(i == null || i === "false" || i === !1 || i === 0);
1790
- }
601
+ d(Ee);
602
+ //#endregion
603
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/hydration/target-builder.js
604
+ var De = class extends Error {
605
+ constructor(e, t, n) {
606
+ super(e), this.factories = t, this.node = n;
607
+ }
1791
608
  };
1792
- function Et(i) {
1793
- if (i == null)
1794
- return null;
1795
- const t = i * 1;
1796
- return isNaN(t) ? null : t;
1797
- }
1798
- const pi = {
1799
- toView(i) {
1800
- const t = Et(i);
1801
- return t && t.toString();
1802
- },
1803
- fromView: Et
609
+ function M(e) {
610
+ return e.nodeType === Node.COMMENT_NODE;
611
+ }
612
+ function Oe(e) {
613
+ return e.nodeType === Node.TEXT_NODE;
614
+ }
615
+ function ke(e, t) {
616
+ let n = document.createRange();
617
+ return n.setStart(e, 0), n.setEnd(t, M(t) || Oe(t) ? t.data.length : t.childNodes.length), n;
618
+ }
619
+ function Ae(e) {
620
+ return e instanceof DocumentFragment && "mode" in e;
621
+ }
622
+ function je(e, t, n) {
623
+ let r = ke(e, t), i = r.commonAncestorContainer, a = document.createTreeWalker(i, NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_COMMENT + NodeFilter.SHOW_TEXT, { acceptNode(e) {
624
+ return r.comparePoint(e, 0) === 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
625
+ } }), o = {}, s = {}, c = a.currentNode = e;
626
+ for (; c !== null;) {
627
+ switch (c.nodeType) {
628
+ case Node.ELEMENT_NODE:
629
+ Me(c, n, o);
630
+ break;
631
+ case Node.COMMENT_NODE:
632
+ Ne(c, a, n, o, s);
633
+ break;
634
+ }
635
+ c = a.nextNode();
636
+ }
637
+ return r.detach(), {
638
+ targets: o,
639
+ boundaries: s
640
+ };
641
+ }
642
+ function Me(e, t, n) {
643
+ let r = C.parseAttributeBinding(e) ?? C.parseEnumeratedAttributeBinding(e);
644
+ if (r !== null) {
645
+ for (let i of r) {
646
+ if (!t[i]) throw new De(`HydrationView was unable to successfully target factory on ${e.nodeName} inside ${e.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`, t, e);
647
+ N(t[i], e, n);
648
+ }
649
+ e.removeAttribute(C.attributeMarkerName);
650
+ }
651
+ }
652
+ function Ne(e, t, n, r, i) {
653
+ if (C.isElementBoundaryStartMarker(e)) {
654
+ Pe(e, t);
655
+ return;
656
+ }
657
+ if (C.isContentBindingStartMarker(e.data)) {
658
+ let a = C.parseContentBindingStartMarker(e.data);
659
+ if (a === null) return;
660
+ let [o, s] = a, c = n[o], l = [], u = t.nextSibling();
661
+ e.data = "";
662
+ let d = u;
663
+ for (; u !== null;) {
664
+ if (M(u)) {
665
+ let e = C.parseContentBindingEndMarker(u.data);
666
+ if (e && e[1] === s) break;
667
+ }
668
+ l.push(u), u = t.nextSibling();
669
+ }
670
+ if (u === null) {
671
+ let t = e.getRootNode();
672
+ throw Error(`Error hydrating Comment node inside "${Ae(t) ? t.host.nodeName : t.nodeName}".`);
673
+ }
674
+ u.data = "", l.length === 1 && Oe(l[0]) ? N(c, l[0], r) : (u !== d && u.previousSibling !== null && (i[c.targetNodeId] = {
675
+ first: d,
676
+ last: u.previousSibling
677
+ }), N(c, u.parentNode.insertBefore(document.createTextNode(""), u), r));
678
+ }
679
+ }
680
+ function Pe(e, t) {
681
+ let n = C.parseElementBoundaryStartMarker(e.data), r = t.nextSibling();
682
+ for (; r !== null;) {
683
+ if (M(r)) {
684
+ let e = C.parseElementBoundaryEndMarker(r.data);
685
+ if (e && e === n) break;
686
+ }
687
+ r = t.nextSibling();
688
+ }
689
+ }
690
+ function N(e, t, n) {
691
+ if (e.targetNodeId === void 0) throw Error("Factory could not be target to the node");
692
+ n[e.targetNodeId] = t;
693
+ }
694
+ //#endregion
695
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/templating/view.js
696
+ var Fe;
697
+ function P(e, t) {
698
+ let n = e.parentNode, r = e, i;
699
+ for (; r !== t;) {
700
+ if (i = r.nextSibling, !i) throw Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);
701
+ n.removeChild(r), r = i;
702
+ }
703
+ n.removeChild(t);
704
+ }
705
+ var Ie = class {
706
+ constructor() {
707
+ this.index = 0, this.length = 0;
708
+ }
709
+ get event() {
710
+ return b.getEvent();
711
+ }
712
+ get isEven() {
713
+ return this.index % 2 == 0;
714
+ }
715
+ get isOdd() {
716
+ return this.index % 2 != 0;
717
+ }
718
+ get isFirst() {
719
+ return this.index === 0;
720
+ }
721
+ get isInMiddle() {
722
+ return !this.isFirst && !this.isLast;
723
+ }
724
+ get isLast() {
725
+ return this.index === this.length - 1;
726
+ }
727
+ eventDetail() {
728
+ return this.event.detail;
729
+ }
730
+ eventTarget() {
731
+ return this.event.target;
732
+ }
733
+ }, F = class extends Ie {
734
+ constructor(e, t, n) {
735
+ super(), this.fragment = e, this.factories = t, this.targets = n, this.behaviors = null, this.unbindables = [], this.source = null, this.isBound = !1, this.sourceLifetime = v.unknown, this.context = this, this.firstChild = e.firstChild, this.lastChild = e.lastChild;
736
+ }
737
+ appendTo(e) {
738
+ e.appendChild(this.fragment);
739
+ }
740
+ insertBefore(e) {
741
+ if (this.fragment.hasChildNodes()) e.parentNode.insertBefore(this.fragment, e);
742
+ else {
743
+ let t = this.lastChild;
744
+ if (e.previousSibling === t) return;
745
+ let n = e.parentNode, r = this.firstChild, i;
746
+ for (; r !== t;) i = r.nextSibling, n.insertBefore(r, e), r = i;
747
+ n.insertBefore(t, e);
748
+ }
749
+ }
750
+ remove() {
751
+ let e = this.fragment, t = this.lastChild, n = this.firstChild, r;
752
+ for (; n !== t;) r = n.nextSibling, e.appendChild(n), n = r;
753
+ e.appendChild(t);
754
+ }
755
+ dispose() {
756
+ P(this.firstChild, this.lastChild), this.unbind();
757
+ }
758
+ onUnbind(e) {
759
+ this.unbindables.push(e);
760
+ }
761
+ bind(e, t = this) {
762
+ if (this.source === e) return;
763
+ let n = this.behaviors;
764
+ if (n === null) {
765
+ this.source = e, this.context = t, this.behaviors = n = Array(this.factories.length);
766
+ let r = this.factories;
767
+ for (let e = 0, t = r.length; e < t; ++e) {
768
+ let t = r[e].createBehavior();
769
+ t.bind(this), n[e] = t;
770
+ }
771
+ } else {
772
+ this.source !== null && this.evaluateUnbindables(), this.isBound = !1, this.source = e, this.context = t;
773
+ for (let e = 0, t = n.length; e < t; ++e) n[e].bind(this);
774
+ }
775
+ this.isBound = !0;
776
+ }
777
+ unbind() {
778
+ !this.isBound || this.source === null || (this.evaluateUnbindables(), this.source = null, this.context = this, this.isBound = !1);
779
+ }
780
+ evaluateUnbindables() {
781
+ let e = this.unbindables;
782
+ for (let t = 0, n = e.length; t < n; ++t) e[t].unbind(this);
783
+ e.length = 0;
784
+ }
785
+ static disposeContiguousBatch(e) {
786
+ if (e.length !== 0) {
787
+ P(e[0].firstChild, e[e.length - 1].lastChild);
788
+ for (let t = 0, n = e.length; t < n; ++t) e[t].unbind();
789
+ }
790
+ }
1804
791
  };
1805
- class W {
1806
- /**
1807
- * Creates an instance of AttributeDefinition.
1808
- * @param Owner - The class constructor that owns this attribute.
1809
- * @param name - The name of the property associated with the attribute.
1810
- * @param attribute - The name of the attribute in HTML.
1811
- * @param mode - The {@link AttributeMode} that describes the behavior of this attribute.
1812
- * @param converter - A {@link ValueConverter} that integrates with the property getter/setter
1813
- * to convert values to and from a DOM string.
1814
- */
1815
- constructor(t, e, s = e.toLowerCase(), n = Ot, r) {
1816
- this.guards = /* @__PURE__ */ new Set(), this.Owner = t, this.name = e, this.attribute = s, this.mode = n, this.converter = r, this.fieldName = `_${e}`, this.callbackName = `${e}Changed`, this.hasCallback = this.callbackName in t.prototype, n === Mt && r === void 0 && (this.converter = De);
1817
- }
1818
- /**
1819
- * Sets the value of the attribute/property on the source element.
1820
- * @param source - The source element to access.
1821
- * @param newValue - The value to set the attribute/property to.
1822
- */
1823
- setValue(t, e) {
1824
- const s = t[this.fieldName], n = this.converter;
1825
- n !== void 0 && (e = n.fromView(e)), s !== e && (t[this.fieldName] = e, this.tryReflectToAttribute(t), this.hasCallback && t[this.callbackName](s, e), t.$fastController.notify(this.name));
1826
- }
1827
- /**
1828
- * Gets the value of the attribute/property on the source element.
1829
- * @param source - The source element to access.
1830
- */
1831
- getValue(t) {
1832
- return g.track(t, this.name), t[this.fieldName];
1833
- }
1834
- /** @internal */
1835
- onAttributeChangedCallback(t, e) {
1836
- this.guards.has(t) || (this.guards.add(t), this.setValue(t, e), this.guards.delete(t));
1837
- }
1838
- tryReflectToAttribute(t) {
1839
- const e = this.mode, s = this.guards;
1840
- s.has(t) || e === "fromView" || Ut.enqueue(() => {
1841
- s.add(t);
1842
- const n = t[this.fieldName];
1843
- switch (e) {
1844
- case Ot:
1845
- const r = this.converter;
1846
- T.setAttribute(t, this.attribute, r !== void 0 ? r.toView(n) : n);
1847
- break;
1848
- case Mt:
1849
- T.setBooleanAttribute(t, this.attribute, n);
1850
- break;
1851
- }
1852
- s.delete(t);
1853
- });
1854
- }
1855
- /**
1856
- * Collects all attribute definitions associated with the owner.
1857
- * @param Owner - The class constructor to collect attribute for.
1858
- * @param attributeLists - Any existing attributes to collect and merge with those associated with the owner.
1859
- * @internal
1860
- */
1861
- static collect(t, ...e) {
1862
- const s = [];
1863
- e.push(ae.locate(t));
1864
- for (let n = 0, r = e.length; n < r; ++n) {
1865
- const o = e[n];
1866
- if (o !== void 0)
1867
- for (let c = 0, d = o.length; c < d; ++c) {
1868
- const l = o[c];
1869
- B(l) ? s.push(new W(t, l)) : s.push(new W(t, l.property, l.attribute, l.mode, l.converter));
1870
- }
1871
- }
1872
- return s;
1873
- }
1874
- }
1875
- function He(i, t) {
1876
- let e;
1877
- function s(n, r) {
1878
- arguments.length > 1 && (e.property = r), ae.locate(n.constructor).push(e);
1879
- }
1880
- if (arguments.length > 1) {
1881
- e = {}, s(i, t);
1882
- return;
1883
- }
1884
- return e = i === void 0 ? {} : i, s;
1885
- }
1886
- var Pe = function(i, t, e, s) {
1887
- function n(r) {
1888
- return r instanceof e ? r : new e(function(o) {
1889
- o(r);
1890
- });
1891
- }
1892
- return new (e || (e = Promise))(function(r, o) {
1893
- function c(a) {
1894
- try {
1895
- l(s.next(a));
1896
- } catch (h) {
1897
- o(h);
1898
- }
1899
- }
1900
- function d(a) {
1901
- try {
1902
- l(s.throw(a));
1903
- } catch (h) {
1904
- o(h);
1905
- }
1906
- }
1907
- function l(a) {
1908
- a.done ? r(a.value) : n(a.value).then(c, d);
1909
- }
1910
- l((s = s.apply(i, t || [])).next());
1911
- });
792
+ d(F), y.defineProperty(F.prototype, "index"), y.defineProperty(F.prototype, "length");
793
+ var I = {
794
+ unhydrated: "unhydrated",
795
+ hydrating: "hydrating",
796
+ hydrated: "hydrated"
797
+ }, Le = class extends Error {
798
+ constructor(e, t, n, r) {
799
+ super(e), this.factory = t, this.fragment = n, this.templateString = r;
800
+ }
801
+ }, Re = class extends Ie {
802
+ constructor(e, t, n, r) {
803
+ super(), this.firstChild = e, this.lastChild = t, this.sourceTemplate = n, this.hostBindingTarget = r, this[Fe] = w, this.context = this, this.source = null, this.isBound = !1, this.sourceLifetime = v.unknown, this.unbindables = [], this.fragment = null, this.behaviors = null, this._hydrationStage = I.unhydrated, this._bindingViewBoundaries = {}, this._targets = {}, this.factories = n.compile().factories;
804
+ }
805
+ get hydrationStage() {
806
+ return this._hydrationStage;
807
+ }
808
+ get targets() {
809
+ return this._targets;
810
+ }
811
+ get bindingViewBoundaries() {
812
+ return this._bindingViewBoundaries;
813
+ }
814
+ insertBefore(e) {
815
+ if (this.fragment !== null) if (this.fragment.hasChildNodes()) e.parentNode.insertBefore(this.fragment, e);
816
+ else {
817
+ let t = this.lastChild;
818
+ if (e.previousSibling === t) return;
819
+ let n = e.parentNode, r = this.firstChild, i;
820
+ for (; r !== t;) i = r.nextSibling, n.insertBefore(r, e), r = i;
821
+ n.insertBefore(t, e);
822
+ }
823
+ }
824
+ appendTo(e) {
825
+ this.fragment !== null && e.appendChild(this.fragment);
826
+ }
827
+ remove() {
828
+ let e = this.fragment ||= document.createDocumentFragment(), t = this.lastChild, n = this.firstChild, r;
829
+ for (; n !== t;) {
830
+ if (r = n.nextSibling, !r) throw Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);
831
+ e.appendChild(n), n = r;
832
+ }
833
+ e.appendChild(t);
834
+ }
835
+ bind(e, t = this) {
836
+ if (this.hydrationStage !== I.hydrated && (this._hydrationStage = I.hydrating), this.source === e) return;
837
+ let n = this.behaviors;
838
+ if (n === null) {
839
+ this.source = e, this.context = t;
840
+ try {
841
+ let { targets: e, boundaries: t } = je(this.firstChild, this.lastChild, this.factories);
842
+ this._targets = e, this._bindingViewBoundaries = t;
843
+ } catch (e) {
844
+ if (e instanceof De) {
845
+ let t = this.sourceTemplate.html;
846
+ typeof t != "string" && (t = t.innerHTML), e.templateString = t;
847
+ }
848
+ throw e;
849
+ }
850
+ this.behaviors = n = Array(this.factories.length);
851
+ let r = this.factories;
852
+ for (let e = 0, t = r.length; e < t; ++e) {
853
+ let t = r[e];
854
+ if (t.targetNodeId === "h" && this.hostBindingTarget && N(t, this.hostBindingTarget, this._targets), t.targetNodeId in this.targets) {
855
+ let r = t.createBehavior();
856
+ r.bind(this), n[e] = r;
857
+ } else {
858
+ let e = this.sourceTemplate.html;
859
+ typeof e != "string" && (e = e.innerHTML);
860
+ let n = (this.firstChild?.getRootNode()).host?.nodeName || "unknown", r = t, i = [
861
+ `HydrationView was unable to successfully target bindings inside "<${n.toLowerCase()}>".`,
862
+ "\nMismatch Details:",
863
+ ` - Expected target node ID: "${t.targetNodeId}"`,
864
+ ` - Available target IDs: [${Object.keys(this.targets).join(", ") || "none"}]`
865
+ ];
866
+ throw t.targetTagName && i.push(` - Expected tag name: "${t.targetTagName}"`), r.sourceAspect && i.push(` - Source aspect: "${r.sourceAspect}"`), r.aspectType !== void 0 && i.push(` - Aspect type: ${r.aspectType}`), i.push("\nThis usually means:", " 1. The server-rendered HTML doesn't match the client template", " 2. The hydration markers are missing or corrupted", " 3. The DOM structure was modified before hydration", `\nTemplate: ${e.slice(0, 200)}${e.length > 200 ? "..." : ""}`), new Le(i.join("\n"), t, ke(this.firstChild, this.lastChild).cloneContents(), e);
867
+ }
868
+ }
869
+ } else {
870
+ this.source !== null && this.evaluateUnbindables(), this.isBound = !1, this.source = e, this.context = t;
871
+ for (let e = 0, t = n.length; e < t; ++e) n[e].bind(this);
872
+ }
873
+ this.isBound = !0, this._hydrationStage = I.hydrated;
874
+ }
875
+ unbind() {
876
+ !this.isBound || this.source === null || (this.evaluateUnbindables(), this.source = null, this.context = this, this.isBound = !1);
877
+ }
878
+ dispose() {
879
+ P(this.firstChild, this.lastChild), this.unbind();
880
+ }
881
+ onUnbind(e) {
882
+ this.unbindables.push(e);
883
+ }
884
+ evaluateUnbindables() {
885
+ let e = this.unbindables;
886
+ for (let t = 0, n = e.length; t < n; ++t) e[t].unbind(this);
887
+ e.length = 0;
888
+ }
1912
889
  };
1913
- const Rt = { mode: "open" }, _t = {}, it = /* @__PURE__ */ new Set(), _ = v.getById(N.elementRegistry, () => Pt()), ze = {
1914
- deferAndHydrate: "defer-and-hydrate"
890
+ Fe = w, d(Re);
891
+ //#endregion
892
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/templating/html-binding-directive.js
893
+ function ze(e) {
894
+ return e.create !== void 0;
895
+ }
896
+ function Be(e, t, n, r) {
897
+ if (n ??= "", ze(n)) {
898
+ e.textContent = "";
899
+ let t = e.$fastView;
900
+ if (t === void 0) if (T(r) && T(n) && r.bindingViewBoundaries[this.targetNodeId] !== void 0 && r.hydrationStage !== I.hydrated) {
901
+ let e = r.bindingViewBoundaries[this.targetNodeId];
902
+ t = n.hydrate(e.first, e.last);
903
+ } else t = n.create();
904
+ else e.$fastTemplate !== n && (t.isComposed && (t.remove(), t.unbind()), t = n.create());
905
+ t.isComposed ? t.needsBindOnly && (t.needsBindOnly = !1, t.bind(r.source, r.context)) : (t.isComposed = !0, t.bind(r.source, r.context), t.insertBefore(e), e.$fastView = t, e.$fastTemplate = n);
906
+ } else {
907
+ let t = e.$fastView;
908
+ t !== void 0 && t.isComposed && (t.isComposed = !1, t.remove(), t.needsBindOnly ? t.needsBindOnly = !1 : t.unbind()), e.textContent = n;
909
+ }
910
+ }
911
+ function Ve(e, t, n) {
912
+ let r = `${this.id}-t`, i = e[r] ?? (e[r] = {
913
+ v: 0,
914
+ cv: Object.create(null)
915
+ }), a = i.cv, o = i.v, s = e[t];
916
+ if (n != null && n.length) {
917
+ let e = n.split(/\s+/);
918
+ for (let t = 0, n = e.length; t < n; ++t) {
919
+ let n = e[t];
920
+ n !== "" && (a[n] = o, s.add(n));
921
+ }
922
+ }
923
+ if (i.v = o + 1, o !== 0) {
924
+ --o;
925
+ for (let e in a) a[e] === o && s.remove(e);
926
+ }
927
+ }
928
+ var He = {
929
+ [f.attribute]: h.setAttribute,
930
+ [f.booleanAttribute]: h.setBooleanAttribute,
931
+ [f.property]: (e, t, n) => e[t] = n,
932
+ [f.content]: Be,
933
+ [f.tokenList]: Ve,
934
+ [f.event]: () => void 0
935
+ }, L = class {
936
+ constructor(e) {
937
+ this.dataBinding = e, this.updateTarget = null, this.aspectType = f.content;
938
+ }
939
+ createHTML(e) {
940
+ return Te.interpolation(e(this));
941
+ }
942
+ createBehavior() {
943
+ if (this.updateTarget === null) {
944
+ let e = He[this.aspectType], t = this.dataBinding.policy ?? this.policy;
945
+ if (!e) throw s.error(1205);
946
+ this.data = `${this.id}-d`, this.updateTarget = t.protect(this.targetTagName, this.aspectType, this.targetAspect, e);
947
+ }
948
+ return this;
949
+ }
950
+ bind(e) {
951
+ let t = e.targets[this.targetNodeId], n = T(e) && e.hydrationStage && e.hydrationStage !== I.hydrated;
952
+ switch (this.aspectType) {
953
+ case f.event:
954
+ t[this.data] = e, t.addEventListener(this.targetAspect, this, this.dataBinding.options);
955
+ break;
956
+ case f.content: e.onUnbind(this);
957
+ default:
958
+ let r = t[this.data] ?? (t[this.data] = this.dataBinding.createObserver(this, this));
959
+ if (r.target = t, r.controller = e, n && (this.aspectType === f.attribute || this.aspectType === f.booleanAttribute)) {
960
+ r.bind(e);
961
+ break;
962
+ }
963
+ this.updateTarget(t, this.targetAspect, r.bind(e), e);
964
+ break;
965
+ }
966
+ }
967
+ unbind(e) {
968
+ let t = e.targets[this.targetNodeId].$fastView;
969
+ t !== void 0 && t.isComposed && (t.unbind(), t.needsBindOnly = !0);
970
+ }
971
+ handleEvent(e) {
972
+ let t = e.currentTarget[this.data];
973
+ if (t.isBound) {
974
+ b.setEvent(e);
975
+ let n = this.dataBinding.evaluate(t.source, t.context);
976
+ b.setEvent(null), n !== !0 && e.preventDefault();
977
+ }
978
+ }
979
+ handleChange(e, t) {
980
+ let n = t.target, r = t.controller;
981
+ this.updateTarget(n, this.targetAspect, t.bind(r), r);
982
+ }
1915
983
  };
1916
- class p {
1917
- constructor(t, e = t.definition) {
1918
- var s;
1919
- this.platformDefined = !1, B(e) && (e = { name: e }), this.type = t, this.name = e.name, this.template = e.template, this.templateOptions = e.templateOptions, this.registry = (s = e.registry) !== null && s !== void 0 ? s : customElements;
1920
- const n = t.prototype, r = W.collect(t, e.attributes), o = new Array(r.length), c = {}, d = {};
1921
- for (let l = 0, a = r.length; l < a; ++l) {
1922
- const h = r[l];
1923
- o[l] = h.attribute, c[h.name] = h, d[h.attribute] = h, g.defineProperty(n, h);
1924
- }
1925
- Reflect.defineProperty(t, "observedAttributes", {
1926
- value: o,
1927
- enumerable: !0
1928
- }), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ? Rt : e.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, Rt), e.shadowOptions), this.elementOptions = e.elementOptions === void 0 ? _t : Object.assign(Object.assign({}, _t), e.elementOptions), this.styles = m.normalize(e.styles), _.register(this), g.defineProperty(p.isRegistered, this.name), p.isRegistered[this.name] = this.type;
1929
- }
1930
- /**
1931
- * Indicates if this element has been defined in at least one registry.
1932
- */
1933
- get isDefined() {
1934
- return this.platformDefined;
1935
- }
1936
- /**
1937
- * Defines a custom element based on this definition.
1938
- * @param registry - The element registry to define the element in.
1939
- * @remarks
1940
- * This operation is idempotent per registry.
1941
- */
1942
- define(t = this.registry) {
1943
- var e, s;
1944
- const n = this.type;
1945
- return t.get(this.name) || (this.platformDefined = !0, t.define(this.name, n, this.elementOptions), (s = (e = this.lifecycleCallbacks) === null || e === void 0 ? void 0 : e.elementDidDefine) === null || s === void 0 || s.call(e, this.name)), this;
1946
- }
1947
- /**
1948
- * Creates an instance of FASTElementDefinition.
1949
- * @param type - The type this definition is being created for.
1950
- * @param nameOrDef - The name of the element to define or a config object
1951
- * that describes the element to define.
1952
- */
1953
- static compose(t, e) {
1954
- return it.has(t) || _.getByType(t) ? new p(class extends t {
1955
- }, e) : new p(t, e);
1956
- }
1957
- /**
1958
- * Registers a FASTElement base type.
1959
- * @param type - The type to register as a base type.
1960
- * @internal
1961
- */
1962
- static registerBaseType(t) {
1963
- it.add(t);
1964
- }
1965
- /**
1966
- * Creates an instance of FASTElementDefinition asynchronously. This option assumes
1967
- * that a template and shadowOptions will be provided and completes when those requirements
1968
- * are met.
1969
- * @param type - The type this definition is being created for.
1970
- * @param nameOrDef - The name of the element to define or a config object
1971
- * that describes the element to define.
1972
- * @alpha
1973
- */
1974
- static composeAsync(t, e) {
1975
- return new Promise((s) => {
1976
- (it.has(t) || _.getByType(t)) && s(new p(class extends t {
1977
- }, e));
1978
- const n = new p(t, e);
1979
- g.getNotifier(n).subscribe({
1980
- handleChange: () => {
1981
- var r, o;
1982
- (o = (r = n.lifecycleCallbacks) === null || r === void 0 ? void 0 : r.templateDidUpdate) === null || o === void 0 || o.call(r, n.name), s(n);
1983
- }
1984
- }, "template");
1985
- });
1986
- }
1987
- }
1988
- p.isRegistered = {};
1989
- p.getByType = _.getByType;
1990
- p.getForInstance = _.getForInstance;
1991
- p.registerAsync = (i) => Pe(void 0, void 0, void 0, function* () {
1992
- return new Promise((t) => {
1993
- p.isRegistered[i] && t(p.isRegistered[i]), g.getNotifier(p.isRegistered).subscribe({ handleChange: () => t(p.isRegistered[i]) }, i);
1994
- });
1995
- });
1996
- g.defineProperty(p.prototype, "template");
1997
- class Ue extends MutationObserver {
1998
- /**
1999
- * Creates an instance of UnobservableMutationObserver.
2000
- * @param callback - The callback to invoke when observed nodes are changed.
2001
- */
2002
- constructor(t) {
2003
- function e(s) {
2004
- this.callback.call(null, s.filter((n) => this.observedNodes.has(n.target)));
2005
- }
2006
- super(e), this.callback = t, this.observedNodes = /* @__PURE__ */ new Set();
2007
- }
2008
- observe(t, e) {
2009
- this.observedNodes.add(t), super.observe(t, e);
2010
- }
2011
- unobserve(t) {
2012
- this.observedNodes.delete(t), this.observedNodes.size < 1 && this.disconnect();
2013
- }
2014
- }
2015
- const bi = Object.freeze({
2016
- /**
2017
- * Creates a ViewBehaviorOrchestrator.
2018
- * @param source - The source to to associate behaviors with.
2019
- * @returns A ViewBehaviorOrchestrator.
2020
- */
2021
- create(i) {
2022
- const t = [], e = {};
2023
- let s = null, n = !1;
2024
- return {
2025
- source: i,
2026
- context: O.default,
2027
- targets: e,
2028
- get isBound() {
2029
- return n;
2030
- },
2031
- addBehaviorFactory(r, o) {
2032
- var c, d, l, a;
2033
- const h = r;
2034
- h.id = (c = h.id) !== null && c !== void 0 ? c : j(), h.targetNodeId = (d = h.targetNodeId) !== null && d !== void 0 ? d : j(), h.targetTagName = (l = o.tagName) !== null && l !== void 0 ? l : null, h.policy = (a = h.policy) !== null && a !== void 0 ? a : T.policy, this.addTarget(h.targetNodeId, o), this.addBehavior(h.createBehavior());
2035
- },
2036
- addTarget(r, o) {
2037
- e[r] = o;
2038
- },
2039
- addBehavior(r) {
2040
- t.push(r), n && r.bind(this);
2041
- },
2042
- onUnbind(r) {
2043
- s === null && (s = []), s.push(r);
2044
- },
2045
- connectedCallback(r) {
2046
- n || (n = !0, t.forEach((o) => o.bind(this)));
2047
- },
2048
- disconnectedCallback(r) {
2049
- n && (n = !1, s !== null && s.forEach((o) => o.unbind(this)));
2050
- }
2051
- };
2052
- }
2053
- }), qe = {
2054
- bubbles: !0,
2055
- composed: !0,
2056
- cancelable: !0
2057
- }, P = "isConnected", oe = /* @__PURE__ */ new WeakMap();
2058
- function I(i) {
2059
- var t, e;
2060
- return (e = (t = i.shadowRoot) !== null && t !== void 0 ? t : oe.get(i)) !== null && e !== void 0 ? e : null;
2061
- }
2062
- let It;
2063
- class S extends qt {
2064
- /**
2065
- * Creates a Controller to control the specified element.
2066
- * @param element - The element to be controlled by this controller.
2067
- * @param definition - The element definition metadata that instructs this
2068
- * controller in how to handle rendering and other platform integrations.
2069
- * @internal
2070
- */
2071
- constructor(t, e) {
2072
- super(t), this.boundObservables = null, this.needsInitialization = !0, this.hasExistingShadowRoot = !1, this._template = null, this.stage = 3, this.guardBehaviorConnection = !1, this.behaviors = null, this.behaviorsConnected = !1, this._mainStyles = null, this.$fastController = this, this.view = null, this.source = t, this.definition = e, this.shadowOptions = e.shadowOptions;
2073
- const s = g.getAccessors(t);
2074
- if (s.length > 0) {
2075
- const n = this.boundObservables = /* @__PURE__ */ Object.create(null);
2076
- for (let r = 0, o = s.length; r < o; ++r) {
2077
- const c = s[r].name, d = t[c];
2078
- d !== void 0 && (delete t[c], n[c] = d);
2079
- }
2080
- }
2081
- }
2082
- /**
2083
- * Indicates whether or not the custom element has been
2084
- * connected to the document.
2085
- */
2086
- get isConnected() {
2087
- return g.track(this, P), this.stage === 1;
2088
- }
2089
- /**
2090
- * The context the expression is evaluated against.
2091
- */
2092
- get context() {
2093
- var t, e;
2094
- return (e = (t = this.view) === null || t === void 0 ? void 0 : t.context) !== null && e !== void 0 ? e : O.default;
2095
- }
2096
- /**
2097
- * Indicates whether the controller is bound.
2098
- */
2099
- get isBound() {
2100
- var t, e;
2101
- return (e = (t = this.view) === null || t === void 0 ? void 0 : t.isBound) !== null && e !== void 0 ? e : !1;
2102
- }
2103
- /**
2104
- * Indicates how the source's lifetime relates to the controller's lifetime.
2105
- */
2106
- get sourceLifetime() {
2107
- var t;
2108
- return (t = this.view) === null || t === void 0 ? void 0 : t.sourceLifetime;
2109
- }
2110
- /**
2111
- * Gets/sets the template used to render the component.
2112
- * @remarks
2113
- * This value can only be accurately read after connect but can be set at any time.
2114
- */
2115
- get template() {
2116
- var t;
2117
- if (this._template === null) {
2118
- const e = this.definition;
2119
- this.source.resolveTemplate ? this._template = this.source.resolveTemplate() : e.template && (this._template = (t = e.template) !== null && t !== void 0 ? t : null);
2120
- }
2121
- return this._template;
2122
- }
2123
- set template(t) {
2124
- this._template !== t && (this._template = t, this.needsInitialization || this.renderTemplate(t));
2125
- }
2126
- /**
2127
- * The shadow root options for the component.
2128
- */
2129
- get shadowOptions() {
2130
- return this._shadowRootOptions;
2131
- }
2132
- set shadowOptions(t) {
2133
- if (this._shadowRootOptions === void 0 && t !== void 0) {
2134
- this._shadowRootOptions = t;
2135
- let e = this.source.shadowRoot;
2136
- e ? this.hasExistingShadowRoot = !0 : (e = this.source.attachShadow(t), t.mode === "closed" && oe.set(this.source, e));
2137
- }
2138
- }
2139
- /**
2140
- * The main set of styles used for the component, independent
2141
- * of any dynamically added styles.
2142
- */
2143
- get mainStyles() {
2144
- var t;
2145
- if (this._mainStyles === null) {
2146
- const e = this.definition;
2147
- this.source.resolveStyles ? this._mainStyles = this.source.resolveStyles() : e.styles && (this._mainStyles = (t = e.styles) !== null && t !== void 0 ? t : null);
2148
- }
2149
- return this._mainStyles;
2150
- }
2151
- set mainStyles(t) {
2152
- this._mainStyles !== t && (this._mainStyles !== null && this.removeStyles(this._mainStyles), this._mainStyles = t, this.needsInitialization || this.addStyles(t));
2153
- }
2154
- /**
2155
- * Registers an unbind handler with the controller.
2156
- * @param behavior - An object to call when the controller unbinds.
2157
- */
2158
- onUnbind(t) {
2159
- var e;
2160
- (e = this.view) === null || e === void 0 || e.onUnbind(t);
2161
- }
2162
- /**
2163
- * Adds the behavior to the component.
2164
- * @param behavior - The behavior to add.
2165
- */
2166
- addBehavior(t) {
2167
- var e, s;
2168
- const n = (e = this.behaviors) !== null && e !== void 0 ? e : this.behaviors = /* @__PURE__ */ new Map(), r = (s = n.get(t)) !== null && s !== void 0 ? s : 0;
2169
- r === 0 ? (n.set(t, 1), t.addedCallback && t.addedCallback(this), t.connectedCallback && !this.guardBehaviorConnection && (this.stage === 1 || this.stage === 0) && t.connectedCallback(this)) : n.set(t, r + 1);
2170
- }
2171
- /**
2172
- * Removes the behavior from the component.
2173
- * @param behavior - The behavior to remove.
2174
- * @param force - Forces removal even if this behavior was added more than once.
2175
- */
2176
- removeBehavior(t, e = !1) {
2177
- const s = this.behaviors;
2178
- if (s === null)
2179
- return;
2180
- const n = s.get(t);
2181
- n !== void 0 && (n === 1 || e ? (s.delete(t), t.disconnectedCallback && this.stage !== 3 && t.disconnectedCallback(this), t.removedCallback && t.removedCallback(this)) : s.set(t, n - 1));
2182
- }
2183
- /**
2184
- * Adds styles to this element. Providing an HTMLStyleElement will attach the element instance to the shadowRoot.
2185
- * @param styles - The styles to add.
2186
- */
2187
- addStyles(t) {
2188
- var e;
2189
- if (!t)
2190
- return;
2191
- const s = this.source;
2192
- if (t instanceof HTMLElement)
2193
- ((e = I(s)) !== null && e !== void 0 ? e : this.source).append(t);
2194
- else if (!t.isAttachedTo(s)) {
2195
- const n = t.behaviors;
2196
- if (t.addStylesTo(s), n !== null)
2197
- for (let r = 0, o = n.length; r < o; ++r)
2198
- this.addBehavior(n[r]);
2199
- }
2200
- }
2201
- /**
2202
- * Removes styles from this element. Providing an HTMLStyleElement will detach the element instance from the shadowRoot.
2203
- * @param styles - the styles to remove.
2204
- */
2205
- removeStyles(t) {
2206
- var e;
2207
- if (!t)
2208
- return;
2209
- const s = this.source;
2210
- if (t instanceof HTMLElement)
2211
- ((e = I(s)) !== null && e !== void 0 ? e : s).removeChild(t);
2212
- else if (t.isAttachedTo(s)) {
2213
- const n = t.behaviors;
2214
- if (t.removeStylesFrom(s), n !== null)
2215
- for (let r = 0, o = n.length; r < o; ++r)
2216
- this.removeBehavior(n[r]);
2217
- }
2218
- }
2219
- /**
2220
- * Runs connected lifecycle behavior on the associated element.
2221
- */
2222
- connect() {
2223
- this.stage === 3 && (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.needsInitialization ? (this.renderTemplate(this.template), this.addStyles(this.mainStyles), this.needsInitialization = !1) : this.view !== null && this.view.bind(this.source), this.stage = 1, g.notify(this, P));
2224
- }
2225
- /**
2226
- * Binds any observables that were set before upgrade.
2227
- */
2228
- bindObservables() {
2229
- if (this.boundObservables !== null) {
2230
- const t = this.source, e = this.boundObservables, s = Object.keys(e);
2231
- for (let n = 0, r = s.length; n < r; ++n) {
2232
- const o = s[n];
2233
- t[o] = e[o];
2234
- }
2235
- this.boundObservables = null;
2236
- }
2237
- }
2238
- /**
2239
- * Connects any existing behaviors on the associated element.
2240
- */
2241
- connectBehaviors() {
2242
- if (this.behaviorsConnected === !1) {
2243
- const t = this.behaviors;
2244
- if (t !== null) {
2245
- this.guardBehaviorConnection = !0;
2246
- for (const e of t.keys())
2247
- e.connectedCallback && e.connectedCallback(this);
2248
- this.guardBehaviorConnection = !1;
2249
- }
2250
- this.behaviorsConnected = !0;
2251
- }
2252
- }
2253
- /**
2254
- * Disconnects any behaviors on the associated element.
2255
- */
2256
- disconnectBehaviors() {
2257
- if (this.behaviorsConnected === !0) {
2258
- const t = this.behaviors;
2259
- if (t !== null)
2260
- for (const e of t.keys())
2261
- e.disconnectedCallback && e.disconnectedCallback(this);
2262
- this.behaviorsConnected = !1;
2263
- }
2264
- }
2265
- /**
2266
- * Runs disconnected lifecycle behavior on the associated element.
2267
- */
2268
- disconnect() {
2269
- this.stage === 1 && (this.stage = 2, g.notify(this, P), this.view !== null && this.view.unbind(), this.disconnectBehaviors(), this.stage = 3);
2270
- }
2271
- /**
2272
- * Runs the attribute changed callback for the associated element.
2273
- * @param name - The name of the attribute that changed.
2274
- * @param oldValue - The previous value of the attribute.
2275
- * @param newValue - The new value of the attribute.
2276
- */
2277
- onAttributeChangedCallback(t, e, s) {
2278
- const n = this.definition.attributeLookup[t];
2279
- n !== void 0 && n.onAttributeChangedCallback(this.source, s);
2280
- }
2281
- /**
2282
- * Emits a custom HTML event.
2283
- * @param type - The type name of the event.
2284
- * @param detail - The event detail object to send with the event.
2285
- * @param options - The event options. By default bubbles and composed.
2286
- * @remarks
2287
- * Only emits events if connected.
2288
- */
2289
- emit(t, e, s) {
2290
- return this.stage === 1 ? this.source.dispatchEvent(new CustomEvent(t, Object.assign(Object.assign({ detail: e }, qe), s))) : !1;
2291
- }
2292
- /**
2293
- * Renders the provided template to the element.
2294
- *
2295
- * @param template - The template to render.
2296
- * @remarks
2297
- * If `null` is provided, any existing view will be removed.
2298
- */
2299
- renderTemplate(t) {
2300
- var e;
2301
- const s = this.source, n = (e = I(s)) !== null && e !== void 0 ? e : s;
2302
- if (this.view !== null)
2303
- this.view.dispose(), this.view = null;
2304
- else if (!this.needsInitialization || this.hasExistingShadowRoot) {
2305
- this.hasExistingShadowRoot = !1;
2306
- for (let r = n.firstChild; r !== null; r = n.firstChild)
2307
- n.removeChild(r);
2308
- }
2309
- t && (this.view = t.render(s, n, s), this.view.sourceLifetime = J.coupled);
2310
- }
2311
- /**
2312
- * Locates or creates a controller for the specified element.
2313
- * @param element - The element to return the controller for.
2314
- * @param override - Reset the controller even if one has been defined.
2315
- * @remarks
2316
- * The specified element must have a {@link FASTElementDefinition}
2317
- * registered either through the use of the {@link customElement}
2318
- * decorator or a call to `FASTElement.define`.
2319
- */
2320
- static forCustomElement(t, e = !1) {
2321
- const s = t.$fastController;
2322
- if (s !== void 0 && !e)
2323
- return s;
2324
- const n = p.getForInstance(t);
2325
- if (n === void 0)
2326
- throw v.error(
2327
- 1401
2328
- /* Message.missingElementDefinition */
2329
- );
2330
- return g.getNotifier(n).subscribe({
2331
- handleChange: () => {
2332
- S.forCustomElement(t, !0), t.$fastController.connect();
2333
- }
2334
- }, "template"), g.getNotifier(n).subscribe({
2335
- handleChange: () => {
2336
- S.forCustomElement(t, !0), t.$fastController.connect();
2337
- }
2338
- }, "shadowOptions"), t.$fastController = new It(t, n);
2339
- }
2340
- /**
2341
- * Sets the strategy that ElementController.forCustomElement uses to construct
2342
- * ElementController instances for an element.
2343
- * @param strategy - The strategy to use.
2344
- */
2345
- static setStrategy(t) {
2346
- It = t;
2347
- }
2348
- }
2349
- x(S);
2350
- S.setStrategy(S);
2351
- function Q(i) {
2352
- var t;
2353
- return "adoptedStyleSheets" in i ? i : (t = I(i)) !== null && t !== void 0 ? t : i.getRootNode();
2354
- }
2355
- class Z {
2356
- constructor(t) {
2357
- const e = Z.styleSheetCache;
2358
- this.sheets = t.map((s) => {
2359
- if (s instanceof CSSStyleSheet)
2360
- return s;
2361
- let n = e.get(s);
2362
- return n === void 0 && (n = new CSSStyleSheet(), n.replaceSync(s), e.set(s, n)), n;
2363
- });
2364
- }
2365
- addStylesTo(t) {
2366
- le(Q(t), this.sheets);
2367
- }
2368
- removeStylesFrom(t) {
2369
- ce(Q(t), this.sheets);
2370
- }
2371
- }
2372
- Z.styleSheetCache = /* @__PURE__ */ new Map();
2373
- let We = 0;
2374
- const Qe = () => `fast-${++We}`;
2375
- function jt(i) {
2376
- return i === document ? document.body : i;
2377
- }
2378
- class Ge {
2379
- constructor(t) {
2380
- this.styles = t, this.styleClass = Qe();
2381
- }
2382
- addStylesTo(t) {
2383
- t = jt(Q(t));
2384
- const e = this.styles, s = this.styleClass;
2385
- for (let n = 0; n < e.length; n++) {
2386
- const r = document.createElement("style");
2387
- r.innerHTML = e[n], r.className = s, t.append(r);
2388
- }
2389
- }
2390
- removeStylesFrom(t) {
2391
- t = jt(Q(t));
2392
- const e = t.querySelectorAll(`.${this.styleClass}`);
2393
- for (let s = 0, n = e.length; s < n; ++s)
2394
- t.removeChild(e[s]);
2395
- }
2396
- }
2397
- let le = (i, t) => {
2398
- i.adoptedStyleSheets = [...i.adoptedStyleSheets, ...t];
2399
- }, ce = (i, t) => {
2400
- i.adoptedStyleSheets = i.adoptedStyleSheets.filter((e) => t.indexOf(e) === -1);
984
+ j.define(L, { aspected: !0 });
985
+ //#endregion
986
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/templating/compiler.js
987
+ var Ue = (e, t) => `${e}.${t}`, We = {}, R = {
988
+ index: 0,
989
+ node: null
2401
990
  };
2402
- if (m.supportsAdoptedStyleSheets) {
2403
- try {
2404
- document.adoptedStyleSheets.push(), document.adoptedStyleSheets.splice(), le = (i, t) => {
2405
- i.adoptedStyleSheets.push(...t);
2406
- }, ce = (i, t) => {
2407
- for (const e of t) {
2408
- const s = i.adoptedStyleSheets.indexOf(e);
2409
- s !== -1 && i.adoptedStyleSheets.splice(s, 1);
2410
- }
2411
- };
2412
- } catch {
2413
- }
2414
- m.setDefaultStrategy(Z);
2415
- } else
2416
- m.setDefaultStrategy(Ge);
2417
- const V = "defer-hydration", st = "needs-hydration";
2418
- class f extends S {
2419
- /**
2420
- * {@inheritdoc ElementController.shadowOptions}
2421
- */
2422
- get shadowOptions() {
2423
- return super.shadowOptions;
2424
- }
2425
- set shadowOptions(t) {
2426
- super.shadowOptions = t, (this.hasExistingShadowRoot || t !== void 0 && !this.template) && this.definition.templateOptions === ze.deferAndHydrate && (this.source.toggleAttribute(V, !0), this.source.toggleAttribute(st, !0));
2427
- }
2428
- /**
2429
- * Adds the current element instance to the hydrating instances map
2430
- */
2431
- addHydratingInstance() {
2432
- if (!f.hydratingInstances)
2433
- return;
2434
- const t = this.definition.name;
2435
- let e = f.hydratingInstances.get(t);
2436
- e || (e = /* @__PURE__ */ new Set(), f.hydratingInstances.set(t, e)), e.add(this.source);
2437
- }
2438
- /**
2439
- * Configure lifecycle callbacks for hydration events
2440
- */
2441
- static config(t) {
2442
- return f.lifecycleCallbacks = t, this;
2443
- }
2444
- static hydrationObserverHandler(t) {
2445
- for (const e of t)
2446
- e.target.hasAttribute(V) || (f.hydrationObserver.unobserve(e.target), e.target.$fastController.connect());
2447
- }
2448
- /**
2449
- * Checks to see if hydration is complete and if so, invokes the hydrationComplete callback.
2450
- * Then resets the ElementController strategy to the default so that future elements
2451
- * don't use the HydratableElementController.
2452
- *
2453
- * @param deadline - the idle deadline object
2454
- */
2455
- static checkHydrationComplete(t) {
2456
- var e, s, n;
2457
- if (t.didTimeout) {
2458
- f.idleCallbackId = requestIdleCallback(f.checkHydrationComplete, { timeout: 50 });
2459
- return;
2460
- }
2461
- ((e = f.hydratingInstances) === null || e === void 0 ? void 0 : e.size) === 0 && ((n = (s = f.lifecycleCallbacks) === null || s === void 0 ? void 0 : s.hydrationComplete) === null || n === void 0 || n.call(s), S.setStrategy(S));
2462
- }
2463
- /**
2464
- * Runs connected lifecycle behavior on the associated element.
2465
- */
2466
- connect() {
2467
- var t, e, s, n, r;
2468
- if (this.needsHydration = (t = this.needsHydration) !== null && t !== void 0 ? t : this.source.hasAttribute(st), this.needsHydration && ((s = (e = f.lifecycleCallbacks) === null || e === void 0 ? void 0 : e.elementWillHydrate) === null || s === void 0 || s.call(e, this.definition.name)), this.source.hasAttribute(V)) {
2469
- this.addHydratingInstance(), f.hydrationObserver.observe(this.source, {
2470
- attributeFilter: [V]
2471
- });
2472
- return;
2473
- }
2474
- if (!this.needsHydration) {
2475
- super.connect(), this.removeHydratingInstance();
2476
- return;
2477
- }
2478
- if (this.stage === 3) {
2479
- if (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.template)
2480
- if (U(this.template)) {
2481
- const o = this.source, c = (n = I(o)) !== null && n !== void 0 ? n : o;
2482
- let d = c.firstChild, l = c.lastChild;
2483
- o.shadowRoot === null && (w.isElementBoundaryStartMarker(d) && (d.data = "", d = d.nextSibling), w.isElementBoundaryEndMarker(l) && (l.data = "", l = l.previousSibling)), this.view = this.template.hydrate(d, l, o), (r = this.view) === null || r === void 0 || r.bind(this.source);
2484
- } else
2485
- this.renderTemplate(this.template);
2486
- this.addStyles(this.mainStyles), this.stage = 1, this.source.removeAttribute(st), this.needsInitialization = this.needsHydration = !1, this.removeHydratingInstance(), g.notify(this, P);
2487
- }
2488
- }
2489
- /**
2490
- * Removes the current element instance from the hydrating instances map
2491
- */
2492
- removeHydratingInstance() {
2493
- var t, e;
2494
- if (!f.hydratingInstances)
2495
- return;
2496
- const s = this.definition.name, n = f.hydratingInstances.get(s);
2497
- (e = (t = f.lifecycleCallbacks) === null || t === void 0 ? void 0 : t.elementDidHydrate) === null || e === void 0 || e.call(t, this.definition.name), n && (n.delete(this.source), n.size || f.hydratingInstances.delete(s), f.idleCallbackId && cancelIdleCallback(f.idleCallbackId), f.idleCallbackId = requestIdleCallback(f.checkHydrationComplete, { timeout: 50 }));
2498
- }
2499
- /**
2500
- * Unregisters the hydration observer when the element is disconnected.
2501
- */
2502
- disconnect() {
2503
- super.disconnect(), f.hydrationObserver.unobserve(this.source);
2504
- }
2505
- /**
2506
- * Sets the ElementController strategy to HydratableElementController.
2507
- * @remarks
2508
- * This method is typically called during application startup to enable
2509
- * hydration support for FAST elements.
2510
- */
2511
- static install() {
2512
- S.setStrategy(f);
2513
- }
2514
- }
2515
- f.hydrationObserver = new Ue(f.hydrationObserverHandler);
2516
- f.idleCallbackId = null;
2517
- f.hydratingInstances = /* @__PURE__ */ new Map();
2518
- function de(i) {
2519
- const t = class extends i {
2520
- constructor() {
2521
- super(), S.forCustomElement(this);
2522
- }
2523
- $emit(e, s, n) {
2524
- return this.$fastController.emit(e, s, n);
2525
- }
2526
- connectedCallback() {
2527
- this.$fastController.connect();
2528
- }
2529
- disconnectedCallback() {
2530
- this.$fastController.disconnect();
2531
- }
2532
- attributeChangedCallback(e, s, n) {
2533
- this.$fastController.onAttributeChangedCallback(e, s, n);
2534
- }
2535
- };
2536
- return p.registerBaseType(t), t;
2537
- }
2538
- function Je(i, t) {
2539
- return E(i) ? p.compose(i, t) : p.compose(this, i);
2540
- }
2541
- function Ke(i, t) {
2542
- return E(i) ? new Promise((e) => {
2543
- p.composeAsync(i, t).then((s) => {
2544
- e(s);
2545
- });
2546
- }).then((e) => e.define().type) : new Promise((e) => {
2547
- p.composeAsync(this, i).then((s) => {
2548
- e(s);
2549
- });
2550
- }).then((e) => e.define().type);
2551
- }
2552
- function Xe(i, t) {
2553
- return E(i) ? p.compose(i, t).define().type : p.compose(this, i).define().type;
2554
- }
2555
- function Ye(i) {
2556
- return de(i);
2557
- }
2558
- const Ze = Object.assign(de(HTMLElement), {
2559
- /**
2560
- * Creates a new FASTElement base class inherited from the
2561
- * provided base type.
2562
- * @param BaseType - The base element type to inherit from.
2563
- */
2564
- from: Ye,
2565
- /**
2566
- * Defines a platform custom element based on the provided type and definition.
2567
- * @param type - The custom element type to define.
2568
- * @param nameOrDef - The name of the element to define or a definition object
2569
- * that describes the element to define.
2570
- */
2571
- define: Xe,
2572
- /**
2573
- * Defines metadata for a FASTElement which can be used to later define the element.
2574
- * @public
2575
- */
2576
- compose: Je,
2577
- /**
2578
- * Defines metadata for a FASTElement which can be used after it has been resolved to define the element.
2579
- * @alpha
2580
- */
2581
- defineAsync: Ke
991
+ function Ge(e) {
992
+ e.startsWith("fast-") || s.warn(1204, { name: e });
993
+ }
994
+ var Ke = new Proxy(document.createElement("div"), {
995
+ get(e, t) {
996
+ Ge(t);
997
+ let n = Reflect.get(e, t);
998
+ return r(n) ? n.bind(e) : n;
999
+ },
1000
+ set(e, t, n) {
1001
+ return Ge(t), Reflect.set(e, t, n);
1002
+ }
1003
+ }), qe = class {
1004
+ constructor(e, t, n) {
1005
+ this.fragment = e, this.directives = t, this.policy = n, this.proto = null, this.nodeIds = /* @__PURE__ */ new Set(), this.descriptors = {}, this.factories = [];
1006
+ }
1007
+ addFactory(e, t, n, r, i) {
1008
+ this.nodeIds.has(n) || (this.nodeIds.add(n), this.addTargetDescriptor(t, n, r)), e.id = e.id ?? O(), e.targetNodeId = n, e.targetTagName = i, e.policy = e.policy ?? this.policy, this.factories.push(e);
1009
+ }
1010
+ freeze() {
1011
+ return this.proto = Object.create(null, this.descriptors), this;
1012
+ }
1013
+ addTargetDescriptor(e, t, n) {
1014
+ let r = this.descriptors;
1015
+ if (t === "r" || t === "h" || r[t]) return;
1016
+ if (!r[e]) {
1017
+ let t = e.lastIndexOf("."), n = e.substring(0, t), r = parseInt(e.substring(t + 1));
1018
+ this.addTargetDescriptor(n, e, r);
1019
+ }
1020
+ let i = We[t];
1021
+ if (!i) {
1022
+ let r = `_${t}`;
1023
+ We[t] = i = { get() {
1024
+ return this[r] ?? (this[r] = this[e].childNodes[n]);
1025
+ } };
1026
+ }
1027
+ r[t] = i;
1028
+ }
1029
+ createView(e) {
1030
+ let t = this.fragment.cloneNode(!0), n = Object.create(this.proto);
1031
+ n.r = t, n.h = e ?? Ke;
1032
+ for (let e of this.nodeIds) n[e];
1033
+ return new F(t, this.factories, n);
1034
+ }
1035
+ };
1036
+ function Je(e, t, n, r, i, a = !1) {
1037
+ let o = n.attributes, s = e.directives;
1038
+ for (let c = 0, l = o.length; c < l; ++c) {
1039
+ let u = o[c], d = u.value, f = k.parse(d, s), p = null;
1040
+ f === null ? a && (p = new L(le(() => d, e.policy)), j.assignAspect(p, u.name)) : p = z.aggregate(f, e.policy), p !== null && (n.removeAttributeNode(u), c--, l--, e.addFactory(p, t, r, i, n.tagName));
1041
+ }
1042
+ }
1043
+ function Ye(e, t, n, r, a) {
1044
+ let o = k.parse(t.textContent, e.directives);
1045
+ if (o === null) return R.node = t.nextSibling, R.index = a + 1, R;
1046
+ let s, c = s = t;
1047
+ for (let t = 0, l = o.length; t < l; ++t) {
1048
+ let l = o[t];
1049
+ t !== 0 && (a++, r = Ue(n, a), s = c.parentNode.insertBefore(document.createTextNode(""), c.nextSibling)), i(l) ? s.textContent = l : (s.textContent = " ", j.assignAspect(l), e.addFactory(l, n, r, a, null)), c = s;
1050
+ }
1051
+ return R.index = a + 1, R.node = c.nextSibling, R;
1052
+ }
1053
+ function Xe(e, t, n) {
1054
+ let r = 0, i = t.firstChild;
1055
+ for (; i;) {
1056
+ let t = Ze(e, n, i, r);
1057
+ i = t.node, r = t.index;
1058
+ }
1059
+ }
1060
+ function Ze(e, t, n, r) {
1061
+ let i = Ue(t, r);
1062
+ switch (n.nodeType) {
1063
+ case 1:
1064
+ Je(e, t, n, i, r), Xe(e, n, i);
1065
+ break;
1066
+ case 3: return Ye(e, n, t, i, r);
1067
+ case 8:
1068
+ let a = k.parse(n.data, e.directives);
1069
+ a !== null && e.addFactory(z.aggregate(a), t, i, r, null);
1070
+ break;
1071
+ }
1072
+ return R.index = r + 1, R.node = n.nextSibling, R;
1073
+ }
1074
+ function Qe(e, t) {
1075
+ return e && e.nodeType == 8 && k.parse(e.data, t) !== null;
1076
+ }
1077
+ var $e = "TEMPLATE", z = {
1078
+ compile(e, t, n = h.policy) {
1079
+ let r;
1080
+ if (i(e)) {
1081
+ r = document.createElement($e), r.innerHTML = n.createHTML(e);
1082
+ let t = r.content.firstElementChild;
1083
+ t !== null && t.tagName === $e && (r = t);
1084
+ } else r = e;
1085
+ !r.content.firstChild && !r.content.lastChild && r.content.appendChild(document.createComment(""));
1086
+ let a = document.adoptNode(r.content), o = new qe(a, t, n);
1087
+ return Je(o, "", r, "h", 0, !0), (Qe(a.firstChild, t) || a.childNodes.length === 1 && Object.keys(t).length > 0) && a.insertBefore(document.createComment(""), a.firstChild), Xe(o, a, "r"), R.node = null, o.freeze();
1088
+ },
1089
+ setDefaultStrategy(e) {
1090
+ this.compile = e;
1091
+ },
1092
+ aggregate(e, t = h.policy) {
1093
+ if (e.length === 1) return e[0];
1094
+ let n, r = !1, a, o = e.length, s = e.map((e) => i(e) ? () => e : (n = e.sourceAspect || n, r ||= e.dataBinding.isVolatile, a ||= e.dataBinding.policy, e.dataBinding.evaluate)), c = new L(se((e, t) => {
1095
+ let n = "";
1096
+ for (let r = 0; r < o; ++r) n += s[r](e, t);
1097
+ return n;
1098
+ }, a ?? t, r));
1099
+ return j.assignAspect(c, n), c;
1100
+ }
1101
+ }, et = /([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/, tt = Object.create(null), B = class {
1102
+ constructor(e, t = tt) {
1103
+ this.html = e, this.factories = t;
1104
+ }
1105
+ createHTML(e) {
1106
+ let t = this.factories;
1107
+ for (let n in t) e(t[n]);
1108
+ return this.html;
1109
+ }
1110
+ };
1111
+ B.empty = new B(""), j.define(B);
1112
+ function nt(e, t, n, r = j.getForInstance(e)) {
1113
+ if (r.aspected) {
1114
+ let n = et.exec(t);
1115
+ n !== null && j.assignAspect(e, n[2]);
1116
+ }
1117
+ return e.createHTML(n);
1118
+ }
1119
+ var rt = class e {
1120
+ constructor(e, t = {}, n) {
1121
+ this.policy = n, this.result = null, this.html = e, this.factories = t;
1122
+ }
1123
+ compile() {
1124
+ return this.result === null && (this.result = z.compile(this.html, this.factories, this.policy)), this.result;
1125
+ }
1126
+ create(e) {
1127
+ return this.compile().createView(e);
1128
+ }
1129
+ inline() {
1130
+ return new B(i(this.html) ? this.html : this.html.innerHTML, this.factories);
1131
+ }
1132
+ withPolicy(e) {
1133
+ if (this.result) throw s.error(1208);
1134
+ if (this.policy) throw s.error(1207);
1135
+ return this.policy = e, this;
1136
+ }
1137
+ render(e, t, n) {
1138
+ let r = this.create(n);
1139
+ return r.bind(e), r.appendTo(t), r;
1140
+ }
1141
+ static create(t, n, i) {
1142
+ let a = "", o = Object.create(null), s = (e) => {
1143
+ let t = e.id ??= O();
1144
+ return o[t] = e, t;
1145
+ };
1146
+ for (let e = 0, i = t.length - 1; e < i; ++e) {
1147
+ let i = t[e], o = n[e], c;
1148
+ if (a += i, r(o)) o = new L(se(o));
1149
+ else if (o instanceof x) o = new L(o);
1150
+ else if (!(c = j.getForInstance(o))) {
1151
+ let e = o;
1152
+ o = new L(le(() => e));
1153
+ }
1154
+ a += nt(o, i, s, c);
1155
+ }
1156
+ return new e(a + t[t.length - 1], o, i);
1157
+ }
1158
+ };
1159
+ d(rt);
1160
+ var V = ((e, ...t) => {
1161
+ if (Array.isArray(e) && Array.isArray(e.raw)) return rt.create(e, t);
1162
+ throw s.error(1206);
2582
1163
  });
2583
- function ti(i, t) {
2584
- return i instanceof Function ? i(t) : i;
2585
- }
2586
- const Lt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), gi = (i) => (t = "vwc") => {
2587
- const e = (n) => `${t}-${n}`, s = (n) => {
2588
- const r = e(n.name);
2589
- let o = n.type;
2590
- if (o.componentName = n.name, Lt.has(r))
2591
- return;
2592
- nt.has(o) && nt.get(o) !== r && (o = class extends o {
2593
- }), Lt.add(r), nt.set(o, r);
2594
- for (const a of n.dependencies)
2595
- s(a);
2596
- const c = new Map([
2597
- [n.type, r],
2598
- ...n.dependencies.map(
2599
- (a) => [a.type, e(a.name)]
2600
- )
2601
- ]), l = {
2602
- tagFor: (a, h) => {
2603
- if (!c.has(a))
2604
- throw new Error(
2605
- `Could not get tag for ${a.name} as it is not a dependency of ${n.name}.`
2606
- );
2607
- const u = c.get(a);
2608
- return h ? u : re.partial(u);
2609
- },
2610
- tagForNonDependency(a) {
2611
- return e(a);
2612
- }
2613
- };
2614
- p.compose(o, {
2615
- ...n.options,
2616
- template: ti(
2617
- n.template,
2618
- l
2619
- ),
2620
- name: `${t}-${n.name}`
2621
- }).define();
2622
- };
2623
- s(i);
2624
- }, yi = (i, t, e, s, n) => ({
2625
- name: i,
2626
- type: t,
2627
- template: e,
2628
- dependencies: s,
2629
- options: n
2630
- }), Vt = /* @__PURE__ */ new WeakMap(), he = (i) => {
2631
- let t = Vt.get(i);
2632
- return t || (t = [], Vt.set(i, t)), t;
2633
- }, vi = (i, t) => {
2634
- he(i).push(t);
2635
- }, ei = (i, t) => {
2636
- he(i).forEach((e) => e(i, t));
2637
- }, ii = (i) => i === "delegate", Ft = (i) => `vvd${i.charAt(0).toUpperCase()}${i.slice(1)}`, ue = (i, t) => {
2638
- if (ii(i._vividAriaBehaviour)) {
2639
- const e = i[t];
2640
- i[`_${t}`] = null, i.removeAttribute(ot(t)), i[`_${t}`] = e, i[t] !== null ? i.dataset[Ft(t)] = i[t] : delete i.dataset[Ft(t)];
2641
- } else
2642
- T.setAttribute(
2643
- i,
2644
- ot(t),
2645
- i[t]
2646
- );
2647
- }, G = /* @__PURE__ */ new WeakMap(), si = (i, t) => {
2648
- const e = G.get(i);
2649
- e ? e.add(t) : G.set(i, /* @__PURE__ */ new Set([t]));
2650
- }, ni = (i, t) => {
2651
- i.isConnected ? ue(i, t) : si(i, t);
2652
- }, ri = (i) => {
2653
- const t = G.get(i);
2654
- if (t) {
2655
- for (const e of t)
2656
- ue(i, e);
2657
- G.delete(i);
2658
- }
2659
- }, Dt = [
2660
- "role",
2661
- "ariaAtomic",
2662
- "ariaAutoComplete",
2663
- "ariaBusy",
2664
- "ariaChecked",
2665
- "ariaColCount",
2666
- "ariaColIndex",
2667
- "ariaColIndexText",
2668
- "ariaColSpan",
2669
- "ariaCurrent",
2670
- "ariaDescription",
2671
- "ariaDisabled",
2672
- "ariaExpanded",
2673
- "ariaHasPopup",
2674
- "ariaHidden",
2675
- "ariaInvalid",
2676
- "ariaKeyShortcuts",
2677
- "ariaLabel",
2678
- "ariaLevel",
2679
- "ariaLive",
2680
- "ariaModal",
2681
- "ariaMultiLine",
2682
- "ariaMultiSelectable",
2683
- "ariaOrientation",
2684
- "ariaPlaceholder",
2685
- "ariaPosInSet",
2686
- "ariaPressed",
2687
- "ariaReadOnly",
2688
- "ariaRequired",
2689
- "ariaRoleDescription",
2690
- "ariaRowCount",
2691
- "ariaRowIndex",
2692
- "ariaRowIndexText",
2693
- "ariaRowSpan",
2694
- "ariaSelected",
2695
- "ariaSetSize",
2696
- "ariaSort",
2697
- "ariaValueMax",
2698
- "ariaValueMin",
2699
- "ariaValueNow",
2700
- "ariaValueText",
2701
- "ariaRelevant"
2702
- // Non-standard
2703
- ], ot = (i) => i.replace("aria", "aria-").toLowerCase(), ai = (i) => {
2704
- class t extends i {
2705
- constructor(...s) {
2706
- super(...s), this._vividAriaBehaviour = "default";
2707
- for (const n of Dt)
2708
- this[`_${n}`] = null;
2709
- }
2710
- connectedCallback() {
2711
- super.connectedCallback(), ri(this);
2712
- }
2713
- }
2714
- for (const e of Dt)
2715
- He({
2716
- attribute: ot(e),
2717
- mode: "fromView"
2718
- })(t.prototype, e), t.prototype[`${e}Changed`] = function() {
2719
- ni(this, e), this._vividAriaBehaviour !== "default" && ei(this, e);
2720
- };
2721
- return t;
1164
+ V.partial = (e) => new B(e);
1165
+ //#endregion
1166
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/components/attributes.js
1167
+ var it = "boolean", at = "reflect", ot = Object.freeze({ locate: u() }), st = {
1168
+ toView(e) {
1169
+ return e ? "true" : "false";
1170
+ },
1171
+ fromView(e) {
1172
+ return !(e == null || e === "false" || e === !1 || e === 0);
1173
+ }
2722
1174
  };
2723
- function oi() {
2724
- const i = /* @__PURE__ */ new WeakMap();
2725
- return (t) => (i.has(t) || i.set(t, []), i.get(t));
2726
- }
2727
- const fe = oi(), mi = (i) => (t, e) => {
2728
- fe(t.constructor).push({
2729
- newPropertyName: e,
2730
- ...i
2731
- });
2732
- }, li = (i) => {
2733
- class t extends i {
2734
- #t(s) {
2735
- let n = !1, r = !1;
2736
- const o = (a) => r && s.fromDeprecated(
2737
- a[s.deprecatedPropertyName]
2738
- ) === a[s.newPropertyName], c = (a) => n && s.toDeprecated && s.toDeprecated(a[s.newPropertyName]) === a[s.deprecatedPropertyName], d = {
2739
- handleChange(a, h) {
2740
- if (h === s.newPropertyName) {
2741
- if (n = !0, !s.toDeprecated || o(a))
2742
- return;
2743
- a[s.deprecatedPropertyName] = s.toDeprecated(a[s.newPropertyName]);
2744
- }
2745
- if (h === s.deprecatedPropertyName) {
2746
- if (r = !0, c(a))
2747
- return;
2748
- a[s.newPropertyName] = s.fromDeprecated(
2749
- a[s.deprecatedPropertyName]
2750
- );
2751
- }
2752
- }
2753
- }, l = g.getNotifier(this);
2754
- l.subscribe(d, s.newPropertyName), l.subscribe(d, s.deprecatedPropertyName);
2755
- }
2756
- constructor(...s) {
2757
- super(...s);
2758
- for (const n of fe(this.constructor))
2759
- this.#t(n);
2760
- }
2761
- }
2762
- return t;
1175
+ function ct(e) {
1176
+ if (e == null) return null;
1177
+ let t = e * 1;
1178
+ return isNaN(t) ? null : t;
1179
+ }
1180
+ var lt = {
1181
+ toView(e) {
1182
+ let t = ct(e);
1183
+ return t && t.toString();
1184
+ },
1185
+ fromView: ct
1186
+ }, ut = class e {
1187
+ constructor(e, t, n = t.toLowerCase(), r = at, i) {
1188
+ this.guards = /* @__PURE__ */ new Set(), this.Owner = e, this.name = t, this.attribute = n, this.mode = r, this.converter = i, this.fieldName = `_${t}`, this.callbackName = `${t}Changed`, this.hasCallback = this.callbackName in e.prototype, r === it && i === void 0 && (this.converter = st);
1189
+ }
1190
+ setValue(e, t) {
1191
+ let n = e[this.fieldName], r = this.converter;
1192
+ r !== void 0 && (t = r.fromView(t)), n !== t && (e[this.fieldName] = t, this.tryReflectToAttribute(e), this.hasCallback && e[this.callbackName](n, t), e.$fastController.notify(this.name));
1193
+ }
1194
+ getValue(e) {
1195
+ return y.track(e, this.name), e[this.fieldName];
1196
+ }
1197
+ onAttributeChangedCallback(e, t) {
1198
+ this.guards.has(e) || (this.guards.add(e), this.setValue(e, t), this.guards.delete(e));
1199
+ }
1200
+ tryReflectToAttribute(e) {
1201
+ let t = this.mode, n = this.guards;
1202
+ n.has(e) || t === "fromView" || g.enqueue(() => {
1203
+ n.add(e);
1204
+ let r = e[this.fieldName];
1205
+ switch (t) {
1206
+ case at:
1207
+ let t = this.converter;
1208
+ h.setAttribute(e, this.attribute, t === void 0 ? r : t.toView(r));
1209
+ break;
1210
+ case it:
1211
+ h.setBooleanAttribute(e, this.attribute, r);
1212
+ break;
1213
+ }
1214
+ n.delete(e);
1215
+ });
1216
+ }
1217
+ static collect(t, ...n) {
1218
+ let r = [];
1219
+ n.push(ot.locate(t));
1220
+ for (let a = 0, o = n.length; a < o; ++a) {
1221
+ let o = n[a];
1222
+ if (o !== void 0) for (let n = 0, a = o.length; n < a; ++n) {
1223
+ let a = o[n];
1224
+ i(a) ? r.push(new e(t, a)) : r.push(new e(t, a.property, a.attribute, a.mode, a.converter));
1225
+ }
1226
+ }
1227
+ return r;
1228
+ }
2763
1229
  };
2764
- class wi extends ai(li(Ze)) {
2765
- static {
2766
- this.VIVID_VERSION = "5.15.0";
2767
- }
2768
- /**
2769
- * Add data-vvd-component attribute with component name globally,
2770
- * for referring to the elements in CSS, testing or debugging
2771
- */
2772
- connectedCallback() {
2773
- super.connectedCallback();
2774
- const t = this.constructor.componentName;
2775
- this.setAttribute("data-vvd-component", t);
2776
- }
2777
- }
2778
- export {
2779
- di as A,
2780
- lt as B,
2781
- T as D,
2782
- O as E,
2783
- $ as H,
2784
- Kt as M,
2785
- g as O,
2786
- we as S,
2787
- Ut as U,
2788
- wi as V,
2789
- He as a,
2790
- bi as b,
2791
- gi as c,
2792
- yi as d,
2793
- hi as e,
2794
- E as f,
2795
- Wt as g,
2796
- re as h,
2797
- B as i,
2798
- ot as j,
2799
- Dt as k,
2800
- rt as l,
2801
- U as m,
2802
- pi as n,
2803
- ui as o,
2804
- A as p,
2805
- X as q,
2806
- mi as r,
2807
- vi as s,
2808
- w as t,
2809
- Gt as u,
2810
- fi as v,
2811
- m as w,
2812
- pe as x,
2813
- ci as y,
2814
- tt as z
1230
+ function dt(e, t) {
1231
+ let n;
1232
+ function r(e, t) {
1233
+ arguments.length > 1 && (n.property = t), ot.locate(e.constructor).push(n);
1234
+ }
1235
+ if (arguments.length > 1) {
1236
+ n = {}, r(e, t);
1237
+ return;
1238
+ }
1239
+ return n = e === void 0 ? {} : e, r;
1240
+ }
1241
+ //#endregion
1242
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/components/fast-definitions.js
1243
+ var ft = function(e, t, n, r) {
1244
+ function i(e) {
1245
+ return e instanceof n ? e : new n(function(t) {
1246
+ t(e);
1247
+ });
1248
+ }
1249
+ return new (n ||= Promise)(function(n, a) {
1250
+ function o(e) {
1251
+ try {
1252
+ c(r.next(e));
1253
+ } catch (e) {
1254
+ a(e);
1255
+ }
1256
+ }
1257
+ function s(e) {
1258
+ try {
1259
+ c(r.throw(e));
1260
+ } catch (e) {
1261
+ a(e);
1262
+ }
1263
+ }
1264
+ function c(e) {
1265
+ e.done ? n(e.value) : i(e.value).then(o, s);
1266
+ }
1267
+ c((r = r.apply(e, t || [])).next());
1268
+ });
1269
+ }, pt = { mode: "open" }, mt = {}, H = /* @__PURE__ */ new Set(), U = s.getById(n.elementRegistry, () => l()), ht = { deferAndHydrate: "defer-and-hydrate" }, W = class e {
1270
+ constructor(t, n = t.definition) {
1271
+ this.platformDefined = !1, i(n) && (n = { name: n }), this.type = t, this.name = n.name, this.template = n.template, this.templateOptions = n.templateOptions, this.registry = n.registry ?? customElements;
1272
+ let r = t.prototype, a = ut.collect(t, n.attributes), o = Array(a.length), s = {}, c = {};
1273
+ for (let e = 0, t = a.length; e < t; ++e) {
1274
+ let t = a[e];
1275
+ o[e] = t.attribute, s[t.name] = t, c[t.attribute] = t, y.defineProperty(r, t);
1276
+ }
1277
+ Reflect.defineProperty(t, "observedAttributes", {
1278
+ value: o,
1279
+ enumerable: !0
1280
+ }), this.attributes = a, this.propertyLookup = s, this.attributeLookup = c, this.shadowOptions = n.shadowOptions === void 0 ? pt : n.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, pt), n.shadowOptions), this.elementOptions = n.elementOptions === void 0 ? mt : Object.assign(Object.assign({}, mt), n.elementOptions), this.styles = S.normalize(n.styles), U.register(this), y.defineProperty(e.isRegistered, this.name), e.isRegistered[this.name] = this.type;
1281
+ }
1282
+ get isDefined() {
1283
+ return this.platformDefined;
1284
+ }
1285
+ define(e = this.registry) {
1286
+ var t, n;
1287
+ let r = this.type;
1288
+ return e.get(this.name) || (this.platformDefined = !0, e.define(this.name, r, this.elementOptions), (n = (t = this.lifecycleCallbacks)?.elementDidDefine) == null || n.call(t, this.name)), this;
1289
+ }
1290
+ static compose(t, n) {
1291
+ return H.has(t) || U.getByType(t) ? new e(class extends t {}, n) : new e(t, n);
1292
+ }
1293
+ static registerBaseType(e) {
1294
+ H.add(e);
1295
+ }
1296
+ static composeAsync(t, n) {
1297
+ return new Promise((r) => {
1298
+ (H.has(t) || U.getByType(t)) && r(new e(class extends t {}, n));
1299
+ let i = new e(t, n);
1300
+ y.getNotifier(i).subscribe({ handleChange: () => {
1301
+ var e, t;
1302
+ (t = (e = i.lifecycleCallbacks)?.templateDidUpdate) == null || t.call(e, i.name), r(i);
1303
+ } }, "template");
1304
+ });
1305
+ }
1306
+ };
1307
+ W.isRegistered = {}, W.getByType = U.getByType, W.getForInstance = U.getForInstance, W.registerAsync = (e) => ft(void 0, void 0, void 0, function* () {
1308
+ return new Promise((t) => {
1309
+ W.isRegistered[e] && t(W.isRegistered[e]), y.getNotifier(W.isRegistered).subscribe({ handleChange: () => t(W.isRegistered[e]) }, e);
1310
+ });
1311
+ }), y.defineProperty(W.prototype, "template");
1312
+ //#endregion
1313
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/utilities.js
1314
+ var gt = class extends MutationObserver {
1315
+ constructor(e) {
1316
+ function t(e) {
1317
+ this.callback.call(null, e.filter((e) => this.observedNodes.has(e.target)));
1318
+ }
1319
+ super(t), this.callback = e, this.observedNodes = /* @__PURE__ */ new Set();
1320
+ }
1321
+ observe(e, t) {
1322
+ this.observedNodes.add(e), super.observe(e, t);
1323
+ }
1324
+ unobserve(e) {
1325
+ this.observedNodes.delete(e), this.observedNodes.size < 1 && this.disconnect();
1326
+ }
1327
+ }, _t = Object.freeze({ create(e) {
1328
+ let t = [], n = {}, r = null, i = !1;
1329
+ return {
1330
+ source: e,
1331
+ context: b.default,
1332
+ targets: n,
1333
+ get isBound() {
1334
+ return i;
1335
+ },
1336
+ addBehaviorFactory(e, t) {
1337
+ let n = e;
1338
+ n.id = n.id ?? O(), n.targetNodeId = n.targetNodeId ?? O(), n.targetTagName = t.tagName ?? null, n.policy = n.policy ?? h.policy, this.addTarget(n.targetNodeId, t), this.addBehavior(n.createBehavior());
1339
+ },
1340
+ addTarget(e, t) {
1341
+ n[e] = t;
1342
+ },
1343
+ addBehavior(e) {
1344
+ t.push(e), i && e.bind(this);
1345
+ },
1346
+ onUnbind(e) {
1347
+ r === null && (r = []), r.push(e);
1348
+ },
1349
+ connectedCallback(e) {
1350
+ i || (i = !0, t.forEach((e) => e.bind(this)));
1351
+ },
1352
+ disconnectedCallback(e) {
1353
+ i && (i = !1, r !== null && r.forEach((e) => e.unbind(this)));
1354
+ }
1355
+ };
1356
+ } }), vt = {
1357
+ bubbles: !0,
1358
+ composed: !0,
1359
+ cancelable: !0
1360
+ }, G = "isConnected", yt = /* @__PURE__ */ new WeakMap();
1361
+ function K(e) {
1362
+ return e.shadowRoot ?? yt.get(e) ?? null;
1363
+ }
1364
+ var bt, q = class e extends ne {
1365
+ constructor(e, t) {
1366
+ super(e), this.boundObservables = null, this.needsInitialization = !0, this.hasExistingShadowRoot = !1, this._template = null, this.stage = 3, this.guardBehaviorConnection = !1, this.behaviors = null, this.behaviorsConnected = !1, this._mainStyles = null, this.$fastController = this, this.view = null, this.source = e, this.definition = t, this.shadowOptions = t.shadowOptions;
1367
+ let n = y.getAccessors(e);
1368
+ if (n.length > 0) {
1369
+ let t = this.boundObservables = Object.create(null);
1370
+ for (let r = 0, i = n.length; r < i; ++r) {
1371
+ let i = n[r].name, a = e[i];
1372
+ a !== void 0 && (delete e[i], t[i] = a);
1373
+ }
1374
+ }
1375
+ }
1376
+ get isConnected() {
1377
+ return y.track(this, G), this.stage === 1;
1378
+ }
1379
+ get context() {
1380
+ return this.view?.context ?? b.default;
1381
+ }
1382
+ get isBound() {
1383
+ return this.view?.isBound ?? !1;
1384
+ }
1385
+ get sourceLifetime() {
1386
+ return this.view?.sourceLifetime;
1387
+ }
1388
+ get template() {
1389
+ if (this._template === null) {
1390
+ let e = this.definition;
1391
+ this.source.resolveTemplate ? this._template = this.source.resolveTemplate() : e.template && (this._template = e.template ?? null);
1392
+ }
1393
+ return this._template;
1394
+ }
1395
+ set template(e) {
1396
+ this._template !== e && (this._template = e, this.needsInitialization || this.renderTemplate(e));
1397
+ }
1398
+ get shadowOptions() {
1399
+ return this._shadowRootOptions;
1400
+ }
1401
+ set shadowOptions(e) {
1402
+ if (this._shadowRootOptions === void 0 && e !== void 0) {
1403
+ this._shadowRootOptions = e;
1404
+ let t = this.source.shadowRoot;
1405
+ t ? this.hasExistingShadowRoot = !0 : (t = this.source.attachShadow(e), e.mode === "closed" && yt.set(this.source, t));
1406
+ }
1407
+ }
1408
+ get mainStyles() {
1409
+ if (this._mainStyles === null) {
1410
+ let e = this.definition;
1411
+ this.source.resolveStyles ? this._mainStyles = this.source.resolveStyles() : e.styles && (this._mainStyles = e.styles ?? null);
1412
+ }
1413
+ return this._mainStyles;
1414
+ }
1415
+ set mainStyles(e) {
1416
+ this._mainStyles !== e && (this._mainStyles !== null && this.removeStyles(this._mainStyles), this._mainStyles = e, this.needsInitialization || this.addStyles(e));
1417
+ }
1418
+ onUnbind(e) {
1419
+ var t;
1420
+ (t = this.view) == null || t.onUnbind(e);
1421
+ }
1422
+ addBehavior(e) {
1423
+ let t = this.behaviors ??= /* @__PURE__ */ new Map(), n = t.get(e) ?? 0;
1424
+ n === 0 ? (t.set(e, 1), e.addedCallback && e.addedCallback(this), e.connectedCallback && !this.guardBehaviorConnection && (this.stage === 1 || this.stage === 0) && e.connectedCallback(this)) : t.set(e, n + 1);
1425
+ }
1426
+ removeBehavior(e, t = !1) {
1427
+ let n = this.behaviors;
1428
+ if (n === null) return;
1429
+ let r = n.get(e);
1430
+ r !== void 0 && (r === 1 || t ? (n.delete(e), e.disconnectedCallback && this.stage !== 3 && e.disconnectedCallback(this), e.removedCallback && e.removedCallback(this)) : n.set(e, r - 1));
1431
+ }
1432
+ addStyles(e) {
1433
+ if (!e) return;
1434
+ let t = this.source;
1435
+ if (e instanceof HTMLElement) (K(t) ?? this.source).append(e);
1436
+ else if (!e.isAttachedTo(t)) {
1437
+ let n = e.behaviors;
1438
+ if (e.addStylesTo(t), n !== null) for (let e = 0, t = n.length; e < t; ++e) this.addBehavior(n[e]);
1439
+ }
1440
+ }
1441
+ removeStyles(e) {
1442
+ if (!e) return;
1443
+ let t = this.source;
1444
+ if (e instanceof HTMLElement) (K(t) ?? t).removeChild(e);
1445
+ else if (e.isAttachedTo(t)) {
1446
+ let n = e.behaviors;
1447
+ if (e.removeStylesFrom(t), n !== null) for (let e = 0, t = n.length; e < t; ++e) this.removeBehavior(n[e]);
1448
+ }
1449
+ }
1450
+ connect() {
1451
+ this.stage === 3 && (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.needsInitialization ? (this.renderTemplate(this.template), this.addStyles(this.mainStyles), this.needsInitialization = !1) : this.view !== null && this.view.bind(this.source), this.stage = 1, y.notify(this, G));
1452
+ }
1453
+ bindObservables() {
1454
+ if (this.boundObservables !== null) {
1455
+ let e = this.source, t = this.boundObservables, n = Object.keys(t);
1456
+ for (let r = 0, i = n.length; r < i; ++r) {
1457
+ let i = n[r];
1458
+ e[i] = t[i];
1459
+ }
1460
+ this.boundObservables = null;
1461
+ }
1462
+ }
1463
+ connectBehaviors() {
1464
+ if (this.behaviorsConnected === !1) {
1465
+ let e = this.behaviors;
1466
+ if (e !== null) {
1467
+ this.guardBehaviorConnection = !0;
1468
+ for (let t of e.keys()) t.connectedCallback && t.connectedCallback(this);
1469
+ this.guardBehaviorConnection = !1;
1470
+ }
1471
+ this.behaviorsConnected = !0;
1472
+ }
1473
+ }
1474
+ disconnectBehaviors() {
1475
+ if (this.behaviorsConnected === !0) {
1476
+ let e = this.behaviors;
1477
+ if (e !== null) for (let t of e.keys()) t.disconnectedCallback && t.disconnectedCallback(this);
1478
+ this.behaviorsConnected = !1;
1479
+ }
1480
+ }
1481
+ disconnect() {
1482
+ this.stage === 1 && (this.stage = 2, y.notify(this, G), this.view !== null && this.view.unbind(), this.disconnectBehaviors(), this.stage = 3);
1483
+ }
1484
+ onAttributeChangedCallback(e, t, n) {
1485
+ let r = this.definition.attributeLookup[e];
1486
+ r !== void 0 && r.onAttributeChangedCallback(this.source, n);
1487
+ }
1488
+ emit(e, t, n) {
1489
+ return this.stage === 1 ? this.source.dispatchEvent(new CustomEvent(e, Object.assign(Object.assign({ detail: t }, vt), n))) : !1;
1490
+ }
1491
+ renderTemplate(e) {
1492
+ let t = this.source, n = K(t) ?? t;
1493
+ if (this.view !== null) this.view.dispose(), this.view = null;
1494
+ else if (!this.needsInitialization || this.hasExistingShadowRoot) {
1495
+ this.hasExistingShadowRoot = !1;
1496
+ for (let e = n.firstChild; e !== null; e = n.firstChild) n.removeChild(e);
1497
+ }
1498
+ e && (this.view = e.render(t, n, t), this.view.sourceLifetime = v.coupled);
1499
+ }
1500
+ static forCustomElement(t, n = !1) {
1501
+ let r = t.$fastController;
1502
+ if (r !== void 0 && !n) return r;
1503
+ let i = W.getForInstance(t);
1504
+ if (i === void 0) throw s.error(1401);
1505
+ return y.getNotifier(i).subscribe({ handleChange: () => {
1506
+ e.forCustomElement(t, !0), t.$fastController.connect();
1507
+ } }, "template"), y.getNotifier(i).subscribe({ handleChange: () => {
1508
+ e.forCustomElement(t, !0), t.$fastController.connect();
1509
+ } }, "shadowOptions"), t.$fastController = new bt(t, i);
1510
+ }
1511
+ static setStrategy(e) {
1512
+ bt = e;
1513
+ }
1514
+ };
1515
+ d(q), q.setStrategy(q);
1516
+ function J(e) {
1517
+ return "adoptedStyleSheets" in e ? e : K(e) ?? e.getRootNode();
1518
+ }
1519
+ var xt = class e {
1520
+ constructor(t) {
1521
+ let n = e.styleSheetCache;
1522
+ this.sheets = t.map((e) => {
1523
+ if (e instanceof CSSStyleSheet) return e;
1524
+ let t = n.get(e);
1525
+ return t === void 0 && (t = new CSSStyleSheet(), t.replaceSync(e), n.set(e, t)), t;
1526
+ });
1527
+ }
1528
+ addStylesTo(e) {
1529
+ Et(J(e), this.sheets);
1530
+ }
1531
+ removeStylesFrom(e) {
1532
+ Dt(J(e), this.sheets);
1533
+ }
1534
+ };
1535
+ xt.styleSheetCache = /* @__PURE__ */ new Map();
1536
+ var St = 0, Ct = () => `fast-${++St}`;
1537
+ function wt(e) {
1538
+ return e === document ? document.body : e;
1539
+ }
1540
+ var Tt = class {
1541
+ constructor(e) {
1542
+ this.styles = e, this.styleClass = Ct();
1543
+ }
1544
+ addStylesTo(e) {
1545
+ e = wt(J(e));
1546
+ let t = this.styles, n = this.styleClass;
1547
+ for (let r = 0; r < t.length; r++) {
1548
+ let i = document.createElement("style");
1549
+ i.innerHTML = t[r], i.className = n, e.append(i);
1550
+ }
1551
+ }
1552
+ removeStylesFrom(e) {
1553
+ e = wt(J(e));
1554
+ let t = e.querySelectorAll(`.${this.styleClass}`);
1555
+ for (let n = 0, r = t.length; n < r; ++n) e.removeChild(t[n]);
1556
+ }
1557
+ }, Et = (e, t) => {
1558
+ e.adoptedStyleSheets = [...e.adoptedStyleSheets, ...t];
1559
+ }, Dt = (e, t) => {
1560
+ e.adoptedStyleSheets = e.adoptedStyleSheets.filter((e) => t.indexOf(e) === -1);
1561
+ };
1562
+ if (S.supportsAdoptedStyleSheets) {
1563
+ try {
1564
+ document.adoptedStyleSheets.push(), document.adoptedStyleSheets.splice(), Et = (e, t) => {
1565
+ e.adoptedStyleSheets.push(...t);
1566
+ }, Dt = (e, t) => {
1567
+ for (let n of t) {
1568
+ let t = e.adoptedStyleSheets.indexOf(n);
1569
+ t !== -1 && e.adoptedStyleSheets.splice(t, 1);
1570
+ }
1571
+ };
1572
+ } catch {}
1573
+ S.setDefaultStrategy(xt);
1574
+ } else S.setDefaultStrategy(Tt);
1575
+ var Ot = "defer-hydration", kt = "needs-hydration", Y = class e extends q {
1576
+ get shadowOptions() {
1577
+ return super.shadowOptions;
1578
+ }
1579
+ set shadowOptions(e) {
1580
+ super.shadowOptions = e, (this.hasExistingShadowRoot || e !== void 0 && !this.template) && this.definition.templateOptions === ht.deferAndHydrate && (this.source.toggleAttribute(Ot, !0), this.source.toggleAttribute(kt, !0));
1581
+ }
1582
+ addHydratingInstance() {
1583
+ if (!e.hydratingInstances) return;
1584
+ let t = this.definition.name, n = e.hydratingInstances.get(t);
1585
+ n || (n = /* @__PURE__ */ new Set(), e.hydratingInstances.set(t, n)), n.add(this.source);
1586
+ }
1587
+ static config(t) {
1588
+ return e.lifecycleCallbacks = t, this;
1589
+ }
1590
+ static hydrationObserverHandler(t) {
1591
+ for (let n of t) n.target.hasAttribute("defer-hydration") || (e.hydrationObserver.unobserve(n.target), n.target.$fastController.connect());
1592
+ }
1593
+ static checkHydrationComplete(t) {
1594
+ var n, r;
1595
+ if (t.didTimeout) {
1596
+ e.idleCallbackId = requestIdleCallback(e.checkHydrationComplete, { timeout: 50 });
1597
+ return;
1598
+ }
1599
+ e.hydratingInstances?.size === 0 && ((r = (n = e.lifecycleCallbacks)?.hydrationComplete) == null || r.call(n), q.setStrategy(q));
1600
+ }
1601
+ connect() {
1602
+ var t, n, r;
1603
+ if (this.needsHydration = this.needsHydration ?? this.source.hasAttribute(kt), this.needsHydration && ((n = (t = e.lifecycleCallbacks)?.elementWillHydrate) == null || n.call(t, this.definition.name)), this.source.hasAttribute("defer-hydration")) {
1604
+ this.addHydratingInstance(), e.hydrationObserver.observe(this.source, { attributeFilter: [Ot] });
1605
+ return;
1606
+ }
1607
+ if (!this.needsHydration) {
1608
+ super.connect(), this.removeHydratingInstance();
1609
+ return;
1610
+ }
1611
+ if (this.stage === 3) {
1612
+ if (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.template) if (T(this.template)) {
1613
+ let e = this.source, t = K(e) ?? e, n = t.firstChild, i = t.lastChild;
1614
+ e.shadowRoot === null && (C.isElementBoundaryStartMarker(n) && (n.data = "", n = n.nextSibling), C.isElementBoundaryEndMarker(i) && (i.data = "", i = i.previousSibling)), this.view = this.template.hydrate(n, i, e), (r = this.view) == null || r.bind(this.source);
1615
+ } else this.renderTemplate(this.template);
1616
+ this.addStyles(this.mainStyles), this.stage = 1, this.source.removeAttribute(kt), this.needsInitialization = this.needsHydration = !1, this.removeHydratingInstance(), y.notify(this, G);
1617
+ }
1618
+ }
1619
+ removeHydratingInstance() {
1620
+ var t, n;
1621
+ if (!e.hydratingInstances) return;
1622
+ let r = this.definition.name, i = e.hydratingInstances.get(r);
1623
+ (n = (t = e.lifecycleCallbacks)?.elementDidHydrate) == null || n.call(t, this.definition.name), i && (i.delete(this.source), i.size || e.hydratingInstances.delete(r), e.idleCallbackId && cancelIdleCallback(e.idleCallbackId), e.idleCallbackId = requestIdleCallback(e.checkHydrationComplete, { timeout: 50 }));
1624
+ }
1625
+ disconnect() {
1626
+ super.disconnect(), e.hydrationObserver.unobserve(this.source);
1627
+ }
1628
+ static install() {
1629
+ q.setStrategy(e);
1630
+ }
1631
+ };
1632
+ Y.hydrationObserver = new gt(Y.hydrationObserverHandler), Y.idleCallbackId = null, Y.hydratingInstances = /* @__PURE__ */ new Map();
1633
+ //#endregion
1634
+ //#region ../../node_modules/.pnpm/@microsoft+fast-element@2.8.3/node_modules/@microsoft/fast-element/dist/esm/components/fast-element.js
1635
+ function At(e) {
1636
+ let t = class extends e {
1637
+ constructor() {
1638
+ super(), q.forCustomElement(this);
1639
+ }
1640
+ $emit(e, t, n) {
1641
+ return this.$fastController.emit(e, t, n);
1642
+ }
1643
+ connectedCallback() {
1644
+ this.$fastController.connect();
1645
+ }
1646
+ disconnectedCallback() {
1647
+ this.$fastController.disconnect();
1648
+ }
1649
+ attributeChangedCallback(e, t, n) {
1650
+ this.$fastController.onAttributeChangedCallback(e, t, n);
1651
+ }
1652
+ };
1653
+ return W.registerBaseType(t), t;
1654
+ }
1655
+ function jt(e, t) {
1656
+ return r(e) ? W.compose(e, t) : W.compose(this, e);
1657
+ }
1658
+ function Mt(e, t) {
1659
+ return r(e) ? new Promise((n) => {
1660
+ W.composeAsync(e, t).then((e) => {
1661
+ n(e);
1662
+ });
1663
+ }).then((e) => e.define().type) : new Promise((t) => {
1664
+ W.composeAsync(this, e).then((e) => {
1665
+ t(e);
1666
+ });
1667
+ }).then((e) => e.define().type);
1668
+ }
1669
+ function Nt(e, t) {
1670
+ return r(e) ? W.compose(e, t).define().type : W.compose(this, e).define().type;
1671
+ }
1672
+ function Pt(e) {
1673
+ return At(e);
1674
+ }
1675
+ var Ft = Object.assign(At(HTMLElement), {
1676
+ from: Pt,
1677
+ define: Nt,
1678
+ compose: jt,
1679
+ defineAsync: Mt
1680
+ });
1681
+ //#endregion
1682
+ //#region src/shared/design-system/createRegisterFunction.ts
1683
+ function It(e, t) {
1684
+ return e instanceof Function ? e(t) : e;
1685
+ }
1686
+ var Lt = /* @__PURE__ */ new Set(), X = /* @__PURE__ */ new Map(), Rt = (e) => (t = "vwc") => {
1687
+ let n = (e) => `${t}-${e}`, r = (e) => {
1688
+ let i = n(e.name), a = e.type;
1689
+ if (a.componentName = e.name, Lt.has(i)) return;
1690
+ X.has(a) && X.get(a) !== i && (a = class extends a {}), Lt.add(i), X.set(a, i);
1691
+ for (let t of e.dependencies) r(t);
1692
+ let o = new Map([[e.type, i], ...e.dependencies.map((e) => [e.type, n(e.name)])]), s = {
1693
+ tagFor: (t, n) => {
1694
+ if (!o.has(t)) throw Error(`Could not get tag for ${t.name} as it is not a dependency of ${e.name}.`);
1695
+ let r = o.get(t);
1696
+ return n ? r : V.partial(r);
1697
+ },
1698
+ tagForNonDependency(e) {
1699
+ return n(e);
1700
+ }
1701
+ };
1702
+ W.compose(a, {
1703
+ ...e.options,
1704
+ template: It(e.template, s),
1705
+ name: `${t}-${e.name}`
1706
+ }).define();
1707
+ };
1708
+ r(e);
1709
+ }, zt = (e, t, n, r, i) => ({
1710
+ name: e,
1711
+ type: t,
1712
+ template: n,
1713
+ dependencies: r,
1714
+ options: i
1715
+ }), Bt = /* @__PURE__ */ new WeakMap(), Vt = (e) => {
1716
+ let t = Bt.get(e);
1717
+ return t || (t = [], Bt.set(e, t)), t;
1718
+ }, Ht = (e, t) => {
1719
+ Vt(e).push(t);
1720
+ }, Ut = (e, t) => {
1721
+ Vt(e).forEach((n) => n(e, t));
1722
+ }, Wt = (e) => e === "delegate", Gt = (e) => `vvd${e.charAt(0).toUpperCase()}${e.slice(1)}`, Kt = (e, t) => {
1723
+ if (Wt(e._vividAriaBehaviour)) {
1724
+ let n = e[t];
1725
+ e[`_${t}`] = null, e.removeAttribute($(t)), e[`_${t}`] = n, e[t] === null ? delete e.dataset[Gt(t)] : e.dataset[Gt(t)] = e[t];
1726
+ } else h.setAttribute(e, $(t), e[t]);
1727
+ }, Z = /* @__PURE__ */ new WeakMap(), qt = (e, t) => {
1728
+ let n = Z.get(e);
1729
+ n ? n.add(t) : Z.set(e, new Set([t]));
1730
+ }, Jt = (e, t) => {
1731
+ e.isConnected ? Kt(e, t) : qt(e, t);
1732
+ }, Yt = (e) => {
1733
+ let t = Z.get(e);
1734
+ if (t) {
1735
+ for (let n of t) Kt(e, n);
1736
+ Z.delete(e);
1737
+ }
1738
+ }, Q = /* @__PURE__ */ "role.ariaAtomic.ariaAutoComplete.ariaBusy.ariaChecked.ariaColCount.ariaColIndex.ariaColIndexText.ariaColSpan.ariaCurrent.ariaDescription.ariaDisabled.ariaExpanded.ariaHasPopup.ariaHidden.ariaInvalid.ariaKeyShortcuts.ariaLabel.ariaLevel.ariaLive.ariaModal.ariaMultiLine.ariaMultiSelectable.ariaOrientation.ariaPlaceholder.ariaPosInSet.ariaPressed.ariaReadOnly.ariaRequired.ariaRoleDescription.ariaRowCount.ariaRowIndex.ariaRowIndexText.ariaRowSpan.ariaSelected.ariaSetSize.ariaSort.ariaValueMax.ariaValueMin.ariaValueNow.ariaValueText.ariaRelevant".split("."), $ = (e) => e.replace("aria", "aria-").toLowerCase(), Xt = (e) => {
1739
+ class t extends e {
1740
+ constructor(...e) {
1741
+ super(...e), this._vividAriaBehaviour = "default";
1742
+ for (let e of Q) this[`_${e}`] = null;
1743
+ }
1744
+ connectedCallback() {
1745
+ super.connectedCallback(), Yt(this);
1746
+ }
1747
+ }
1748
+ for (let e of Q) dt({
1749
+ attribute: $(e),
1750
+ mode: "fromView"
1751
+ })(t.prototype, e), t.prototype[`${e}Changed`] = function() {
1752
+ Jt(this, e), this._vividAriaBehaviour !== "default" && Ut(this, e);
1753
+ };
1754
+ return t;
1755
+ };
1756
+ //#endregion
1757
+ //#region src/shared/deprecation/replaced-props.ts
1758
+ function Zt() {
1759
+ let e = /* @__PURE__ */ new WeakMap();
1760
+ return (t) => (e.has(t) || e.set(t, []), e.get(t));
1761
+ }
1762
+ var Qt = Zt(), $t = (e) => (t, n) => {
1763
+ Qt(t.constructor).push({
1764
+ newPropertyName: n,
1765
+ ...e
1766
+ });
1767
+ }, en = (e) => {
1768
+ class t extends e {
1769
+ #e(e) {
1770
+ let t = !1, n = !1, r = (t) => n && e.fromDeprecated(t[e.deprecatedPropertyName]) === t[e.newPropertyName], i = (n) => t && e.toDeprecated && e.toDeprecated(n[e.newPropertyName]) === n[e.deprecatedPropertyName], a = { handleChange(a, o) {
1771
+ if (o === e.newPropertyName) {
1772
+ if (t = !0, !e.toDeprecated || r(a)) return;
1773
+ a[e.deprecatedPropertyName] = e.toDeprecated(a[e.newPropertyName]);
1774
+ }
1775
+ if (o === e.deprecatedPropertyName) {
1776
+ if (n = !0, i(a)) return;
1777
+ a[e.newPropertyName] = e.fromDeprecated(a[e.deprecatedPropertyName]);
1778
+ }
1779
+ } }, o = y.getNotifier(this);
1780
+ o.subscribe(a, e.newPropertyName), o.subscribe(a, e.deprecatedPropertyName);
1781
+ }
1782
+ constructor(...e) {
1783
+ super(...e);
1784
+ for (let e of Qt(this.constructor)) this.#e(e);
1785
+ }
1786
+ }
1787
+ return t;
1788
+ }, tn = class extends Xt(en(Ft)) {
1789
+ static {
1790
+ this.VIVID_VERSION = "5.16.0";
1791
+ }
1792
+ connectedCallback() {
1793
+ super.connectedCallback();
1794
+ let e = this.constructor.componentName;
1795
+ this.setAttribute("data-vvd-component", e);
1796
+ }
2815
1797
  };
1798
+ //#endregion
1799
+ export { c as A, b as C, _ as D, ie as E, i as M, a as N, g as O, x as S, re as T, C as _, Ht as a, le as b, _t as c, V as d, F as f, Te as g, Ee as h, Q as i, r as j, h as k, dt as l, j as m, $t as n, zt as o, I as p, $ as r, Rt as s, tn as t, lt as u, T as v, y as w, se as x, S as y };