@mintplayer/web-components 2.8.0 → 2.9.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 (701) hide show
  1. package/chunks/ac-C5mj7mOe.mjs +5 -0
  2. package/chunks/ad-DuKUeTXh.mjs +5 -0
  3. package/chunks/ae-BFJrplpe.mjs +5 -0
  4. package/chunks/af-BIQlNFtj.mjs +5 -0
  5. package/chunks/ag-B9GDO0Ip.mjs +5 -0
  6. package/chunks/ai-pifHTP5K.mjs +5 -0
  7. package/chunks/al-CWQ3OuN9.mjs +5 -0
  8. package/chunks/all-flags-BtYcfgjy.mjs +8 -0
  9. package/chunks/all-flags.generated-B7Rctzuq.mjs +493 -0
  10. package/chunks/am-Do56ciQl.mjs +5 -0
  11. package/chunks/ao-Ci_fen-O.mjs +5 -0
  12. package/chunks/ar-BEZTIgF7.mjs +5 -0
  13. package/chunks/as-B29efaG_.mjs +5 -0
  14. package/chunks/at-c7xv31cV.mjs +5 -0
  15. package/chunks/au-DK4ZROf6.mjs +5 -0
  16. package/chunks/aw-eEmOo-kc.mjs +5 -0
  17. package/chunks/ax-CF1cgQbd.mjs +5 -0
  18. package/chunks/az-BXPec7pf.mjs +5 -0
  19. package/chunks/ba-EoocSiX0.mjs +5 -0
  20. package/chunks/bb-BomyOgY0.mjs +5 -0
  21. package/chunks/bd-C2Y9A316.mjs +5 -0
  22. package/chunks/be-DcE56El1.mjs +5 -0
  23. package/chunks/bf-g7XzTHJG.mjs +5 -0
  24. package/chunks/bg-DAHpwJAh.mjs +5 -0
  25. package/chunks/bh-BiHF8vqO.mjs +5 -0
  26. package/chunks/bi-DVAoOy2o.mjs +5 -0
  27. package/chunks/bj-CB6I0T1J.mjs +5 -0
  28. package/chunks/bl-DhUObXcB.mjs +5 -0
  29. package/chunks/bm-d77E6A-Q.mjs +5 -0
  30. package/chunks/bn-CG1_6Vfv.mjs +5 -0
  31. package/chunks/bo-ulcQ_Lws.mjs +5 -0
  32. package/chunks/bq-wOjRpmJJ.mjs +5 -0
  33. package/chunks/br-BwQAEpKL.mjs +5 -0
  34. package/chunks/bs-Cmq3uDf9.mjs +5 -0
  35. package/chunks/bt-Cik-3ebf.mjs +5 -0
  36. package/chunks/bw-ZUkpxAL1.mjs +5 -0
  37. package/chunks/by-Dh-5h5x1.mjs +5 -0
  38. package/chunks/bz-DB0s7-5N.mjs +5 -0
  39. package/chunks/ca-Coq88_mc.mjs +5 -0
  40. package/chunks/cc-1.generated-CkRogBGA.mjs +4 -0
  41. package/chunks/cc-20.generated-DMpg7apl.mjs +4 -0
  42. package/chunks/cc-211.generated-DSnuuKPM.mjs +4 -0
  43. package/chunks/cc-212.generated-Dcg3rrip.mjs +4 -0
  44. package/chunks/cc-213.generated-DPwtGlxT.mjs +4 -0
  45. package/chunks/cc-216.generated-Cgber7dX.mjs +4 -0
  46. package/chunks/cc-218.generated-CZGwxl9D.mjs +4 -0
  47. package/chunks/cc-220.generated-CKmXmpGe.mjs +4 -0
  48. package/chunks/cc-221.generated-BYzgBejl.mjs +4 -0
  49. package/chunks/cc-222.generated-YwuXcbvd.mjs +4 -0
  50. package/chunks/cc-223.generated-9iiHnni6.mjs +4 -0
  51. package/chunks/cc-224.generated-Okty02TJ.mjs +4 -0
  52. package/chunks/cc-225.generated-CYkDnG14.mjs +4 -0
  53. package/chunks/cc-226.generated-GT_rqbCO.mjs +4 -0
  54. package/chunks/cc-227.generated-B1VkrgoB.mjs +4 -0
  55. package/chunks/cc-228.generated-Bhck-C6Z.mjs +4 -0
  56. package/chunks/cc-229.generated-aAR4PP7n.mjs +4 -0
  57. package/chunks/cc-230.generated-CG5TxZtb.mjs +4 -0
  58. package/chunks/cc-231.generated-BjYHl_BP.mjs +4 -0
  59. package/chunks/cc-232.generated-CFDyaA7o.mjs +4 -0
  60. package/chunks/cc-233.generated-ChwvrW0E.mjs +4 -0
  61. package/chunks/cc-234.generated-BIpIojaD.mjs +4 -0
  62. package/chunks/cc-235.generated-Dklizfb9.mjs +4 -0
  63. package/chunks/cc-236.generated-EJZlz23v.mjs +4 -0
  64. package/chunks/cc-237.generated-DwOapZWZ.mjs +4 -0
  65. package/chunks/cc-238.generated-BkCWtGDY.mjs +4 -0
  66. package/chunks/cc-239.generated-S_foXUit.mjs +4 -0
  67. package/chunks/cc-240.generated-CtKfcEWk.mjs +4 -0
  68. package/chunks/cc-241.generated-aAUw2QzS.mjs +4 -0
  69. package/chunks/cc-242.generated-D5jMR3KR.mjs +4 -0
  70. package/chunks/cc-243.generated-Bk5dwdUf.mjs +4 -0
  71. package/chunks/cc-244.generated-DywGvISM.mjs +4 -0
  72. package/chunks/cc-245.generated-Bm7wVXl5.mjs +4 -0
  73. package/chunks/cc-246.generated-CFSezynW.mjs +4 -0
  74. package/chunks/cc-247.generated-DKXGq8p1.mjs +4 -0
  75. package/chunks/cc-248.generated-CnI_kkbi.mjs +4 -0
  76. package/chunks/cc-249.generated-Zenj8WBl.mjs +4 -0
  77. package/chunks/cc-250.generated-140A9gFx.mjs +4 -0
  78. package/chunks/cc-251.generated-BYtVzI1w.mjs +4 -0
  79. package/chunks/cc-252.generated-C9By3_Ih.mjs +4 -0
  80. package/chunks/cc-253.generated-DZIADgzo.mjs +4 -0
  81. package/chunks/cc-254.generated-Bkb5VbuX.mjs +4 -0
  82. package/chunks/cc-255.generated-U_k4UlnG.mjs +4 -0
  83. package/chunks/cc-256.generated-BBGMRLJL.mjs +4 -0
  84. package/chunks/cc-257.generated-2Jiadm-X.mjs +4 -0
  85. package/chunks/cc-258.generated-CSHZFQtI.mjs +4 -0
  86. package/chunks/cc-260.generated-CWgOLjv4.mjs +4 -0
  87. package/chunks/cc-261.generated-DzpnYK1v.mjs +4 -0
  88. package/chunks/cc-262.generated-uZY0cJ08.mjs +4 -0
  89. package/chunks/cc-263.generated-D2QbPttm.mjs +4 -0
  90. package/chunks/cc-264.generated-DhUT_yRg.mjs +4 -0
  91. package/chunks/cc-265.generated-BKIU4vGv.mjs +4 -0
  92. package/chunks/cc-266.generated-O_zgqaDo.mjs +4 -0
  93. package/chunks/cc-267.generated-DpLBLCK1.mjs +4 -0
  94. package/chunks/cc-268.generated-B9Y4LS_4.mjs +4 -0
  95. package/chunks/cc-269.generated-DPQ0A8VW.mjs +4 -0
  96. package/chunks/cc-27.generated-BxeFhsuD.mjs +4 -0
  97. package/chunks/cc-290.generated-DGy2isg7.mjs +4 -0
  98. package/chunks/cc-291.generated-C4LSfffl.mjs +4 -0
  99. package/chunks/cc-297.generated-4k_1JOUj.mjs +4 -0
  100. package/chunks/cc-298.generated-A2xB0PKR.mjs +4 -0
  101. package/chunks/cc-299.generated-BwDC9B1N.mjs +4 -0
  102. package/chunks/cc-30.generated-JhyYglqU.mjs +4 -0
  103. package/chunks/cc-31.generated-5GOCJzfN.mjs +4 -0
  104. package/chunks/cc-32.generated-CpVvykA2.mjs +4 -0
  105. package/chunks/cc-33.generated-BDzHxbR_.mjs +4 -0
  106. package/chunks/cc-34.generated-P3nQfhBw.mjs +4 -0
  107. package/chunks/cc-350.generated-BGl8hYsP.mjs +4 -0
  108. package/chunks/cc-351.generated-pJBouwSG.mjs +4 -0
  109. package/chunks/cc-352.generated-8_NbdAx6.mjs +4 -0
  110. package/chunks/cc-353.generated-Cfz2tBdq.mjs +4 -0
  111. package/chunks/cc-354.generated-CEgaa6qB.mjs +4 -0
  112. package/chunks/cc-355.generated-DGZ-kJ0i.mjs +4 -0
  113. package/chunks/cc-356.generated-BZqLs86A.mjs +4 -0
  114. package/chunks/cc-357.generated-CfCB5cHL.mjs +4 -0
  115. package/chunks/cc-358.generated-wL2JzNDk.mjs +4 -0
  116. package/chunks/cc-359.generated-BxJe3xGt.mjs +4 -0
  117. package/chunks/cc-36.generated-CJdA4Rvi.mjs +4 -0
  118. package/chunks/cc-370.generated-B6SpL74q.mjs +4 -0
  119. package/chunks/cc-371.generated-Cx6lrGG9.mjs +4 -0
  120. package/chunks/cc-372.generated-Ckc30SHu.mjs +4 -0
  121. package/chunks/cc-373.generated-BK0ypz55.mjs +4 -0
  122. package/chunks/cc-374.generated-B51ogwAh.mjs +4 -0
  123. package/chunks/cc-375.generated-CMbmbMav.mjs +4 -0
  124. package/chunks/cc-376.generated-DZngLeqA.mjs +4 -0
  125. package/chunks/cc-377.generated-BYuCOf7K.mjs +4 -0
  126. package/chunks/cc-378.generated-CuNlUjOw.mjs +4 -0
  127. package/chunks/cc-380.generated-A2e4FwA4.mjs +4 -0
  128. package/chunks/cc-381.generated-Cvwf7aDo.mjs +4 -0
  129. package/chunks/cc-382.generated-B-x4jIQ_.mjs +4 -0
  130. package/chunks/cc-383.generated-B6E63WN4.mjs +4 -0
  131. package/chunks/cc-385.generated-CbYlsCsW.mjs +4 -0
  132. package/chunks/cc-386.generated-BUSyzthQ.mjs +4 -0
  133. package/chunks/cc-387.generated-IhkhnsGu.mjs +4 -0
  134. package/chunks/cc-389.generated-SNuHIdqu.mjs +4 -0
  135. package/chunks/cc-39.generated-BGZK1sVL.mjs +4 -0
  136. package/chunks/cc-40.generated-Bo8WnsNc.mjs +4 -0
  137. package/chunks/cc-41.generated-CG0098r3.mjs +4 -0
  138. package/chunks/cc-420.generated-C59jh2M8.mjs +4 -0
  139. package/chunks/cc-421.generated-BhxO-pTK.mjs +4 -0
  140. package/chunks/cc-423.generated-B4UJk2xr.mjs +4 -0
  141. package/chunks/cc-43.generated-BIdhhcvA.mjs +4 -0
  142. package/chunks/cc-44.generated-BfeK0wEP.mjs +4 -0
  143. package/chunks/cc-45.generated-BEJCwF4o.mjs +4 -0
  144. package/chunks/cc-46.generated-DeEMtTcI.mjs +4 -0
  145. package/chunks/cc-47.generated-DQy2Xk_0.mjs +4 -0
  146. package/chunks/cc-48.generated-C4yA7R1Q.mjs +4 -0
  147. package/chunks/cc-49.generated-a02djmT4.mjs +4 -0
  148. package/chunks/cc-500.generated-glAZ4AUe.mjs +4 -0
  149. package/chunks/cc-501.generated-D-GCAbI8.mjs +4 -0
  150. package/chunks/cc-502.generated-Co-n0usI.mjs +4 -0
  151. package/chunks/cc-503.generated-BM58qC_M.mjs +4 -0
  152. package/chunks/cc-504.generated-cTtfXvjR.mjs +4 -0
  153. package/chunks/cc-505.generated-DLSKmmzY.mjs +4 -0
  154. package/chunks/cc-506.generated-BMyMgwgZ.mjs +4 -0
  155. package/chunks/cc-507.generated-DWOdIJMd.mjs +4 -0
  156. package/chunks/cc-508.generated-DN3D0FwY.mjs +4 -0
  157. package/chunks/cc-509.generated-D-jyniz5.mjs +4 -0
  158. package/chunks/cc-51.generated-Bjy1G3kG.mjs +4 -0
  159. package/chunks/cc-52.generated-CDeO-q1n.mjs +4 -0
  160. package/chunks/cc-53.generated-Bg_ETBvx.mjs +4 -0
  161. package/chunks/cc-54.generated-BCfSFUZP.mjs +4 -0
  162. package/chunks/cc-55.generated-C1iLoSl1.mjs +4 -0
  163. package/chunks/cc-56.generated-ChgDDlud.mjs +4 -0
  164. package/chunks/cc-57.generated-qfDFimii.mjs +4 -0
  165. package/chunks/cc-58.generated-Cl6DzTam.mjs +4 -0
  166. package/chunks/cc-590.generated-DhG2cP7S.mjs +4 -0
  167. package/chunks/cc-591.generated-CjxsaggL.mjs +4 -0
  168. package/chunks/cc-592.generated-DnF2AtPs.mjs +4 -0
  169. package/chunks/cc-593.generated-J4b4KU_z.mjs +4 -0
  170. package/chunks/cc-594.generated-BDqHqvBX.mjs +4 -0
  171. package/chunks/cc-595.generated-Di23-NWq.mjs +4 -0
  172. package/chunks/cc-596.generated-B92oLPvz.mjs +4 -0
  173. package/chunks/cc-597.generated-pdvIpWWG.mjs +4 -0
  174. package/chunks/cc-598.generated-C9i6NuuS.mjs +4 -0
  175. package/chunks/cc-599.generated-Cot_Tjya.mjs +4 -0
  176. package/chunks/cc-60.generated-Dt21L5ED.mjs +4 -0
  177. package/chunks/cc-61.generated-CsF19uOz.mjs +4 -0
  178. package/chunks/cc-62.generated-CXe9l8jN.mjs +4 -0
  179. package/chunks/cc-63.generated-CyxqKEMz.mjs +4 -0
  180. package/chunks/cc-64.generated-B1U2VUWE.mjs +4 -0
  181. package/chunks/cc-65.generated-BqB9SL91.mjs +4 -0
  182. package/chunks/cc-66.generated-DSW4cKRJ.mjs +4 -0
  183. package/chunks/cc-670.generated-B5lMBLIA.mjs +4 -0
  184. package/chunks/cc-672.generated-rtLnRViR.mjs +4 -0
  185. package/chunks/cc-673.generated-CCfKxiHb.mjs +4 -0
  186. package/chunks/cc-674.generated-DqEenJAu.mjs +4 -0
  187. package/chunks/cc-675.generated-CDZsNVmA.mjs +4 -0
  188. package/chunks/cc-676.generated-CtuzuSpR.mjs +4 -0
  189. package/chunks/cc-677.generated-B6Vdcheb.mjs +4 -0
  190. package/chunks/cc-678.generated-Bu-wQLCv.mjs +4 -0
  191. package/chunks/cc-679.generated-C_vQNfa9.mjs +4 -0
  192. package/chunks/cc-680.generated-DgD0sTpR.mjs +4 -0
  193. package/chunks/cc-681.generated-CgCDLpTf.mjs +4 -0
  194. package/chunks/cc-682.generated-BBdb0LCA.mjs +4 -0
  195. package/chunks/cc-683.generated-BYq9qGSN.mjs +4 -0
  196. package/chunks/cc-685.generated-BeVt0xOD.mjs +4 -0
  197. package/chunks/cc-686.generated-DSuHUyGC.mjs +4 -0
  198. package/chunks/cc-687.generated-CAYCkQGn.mjs +4 -0
  199. package/chunks/cc-688.generated-BxoYuhyI.mjs +4 -0
  200. package/chunks/cc-689.generated-D1LJPuEc.mjs +4 -0
  201. package/chunks/cc-690.generated-wBJlIR_d.mjs +4 -0
  202. package/chunks/cc-691.generated-D3313DJE.mjs +4 -0
  203. package/chunks/cc-692.generated-BjRLK6LH.mjs +4 -0
  204. package/chunks/cc-7.generated-Be8Per3z.mjs +4 -0
  205. package/chunks/cc-81.generated-Bfr_1Ik4.mjs +4 -0
  206. package/chunks/cc-82.generated-CXvQgAj0.mjs +4 -0
  207. package/chunks/cc-84.generated-DsMrssxQ.mjs +4 -0
  208. package/chunks/cc-850.generated-B6dMNsJB.mjs +4 -0
  209. package/chunks/cc-852.generated-DoLs1jmz.mjs +4 -0
  210. package/chunks/cc-853.generated-C9J4qDF6.mjs +4 -0
  211. package/chunks/cc-855.generated-rriF89dH.mjs +4 -0
  212. package/chunks/cc-856.generated-DWMBTBFS.mjs +4 -0
  213. package/chunks/cc-86.generated-C8Ob3yVb.mjs +4 -0
  214. package/chunks/cc-880.generated-gteZx8SL.mjs +4 -0
  215. package/chunks/cc-886.generated-QyIDP1_q.mjs +4 -0
  216. package/chunks/cc-90.generated-DSXR50SV.mjs +4 -0
  217. package/chunks/cc-91.generated-C_cDq0Xp.mjs +4 -0
  218. package/chunks/cc-92.generated-Cxd7f_QX.mjs +4 -0
  219. package/chunks/cc-93.generated-Cyqo0e91.mjs +4 -0
  220. package/chunks/cc-94.generated-EsnmfbnH.mjs +4 -0
  221. package/chunks/cc-95.generated-D_8p55mp.mjs +4 -0
  222. package/chunks/cc-960.generated-DletKApH.mjs +4 -0
  223. package/chunks/cc-961.generated-CXVHoWFk.mjs +4 -0
  224. package/chunks/cc-962.generated-B7EPSakT.mjs +4 -0
  225. package/chunks/cc-963.generated-D71Y75mr.mjs +4 -0
  226. package/chunks/cc-964.generated-B8-RYrVD.mjs +4 -0
  227. package/chunks/cc-965.generated-tesjPkaP.mjs +4 -0
  228. package/chunks/cc-966.generated-CkCCmcR2.mjs +4 -0
  229. package/chunks/cc-967.generated-Bz1kG3rR.mjs +4 -0
  230. package/chunks/cc-968.generated-B8izDjLu.mjs +4 -0
  231. package/chunks/cc-970.generated-CKTkdIET.mjs +4 -0
  232. package/chunks/cc-971.generated-Wzj17K10.mjs +4 -0
  233. package/chunks/cc-972.generated-CJO02ZmJ.mjs +4 -0
  234. package/chunks/cc-973.generated-CL9ZE2Of.mjs +4 -0
  235. package/chunks/cc-974.generated-ZkYqGi9L.mjs +4 -0
  236. package/chunks/cc-975.generated-DP2Teiuc.mjs +4 -0
  237. package/chunks/cc-976.generated-GGNMRuFQ.mjs +4 -0
  238. package/chunks/cc-977.generated-KwvwlHUw.mjs +4 -0
  239. package/chunks/cc-98.generated-DW-Wj2k5.mjs +4 -0
  240. package/chunks/cc-992.generated-NRREmly7.mjs +4 -0
  241. package/chunks/cc-993.generated-BNlup4k-.mjs +4 -0
  242. package/chunks/cc-994.generated-BUD4e8ho.mjs +4 -0
  243. package/chunks/cc-995.generated-8P4TnVbi.mjs +4 -0
  244. package/chunks/cc-996.generated-CKCe7foO.mjs +4 -0
  245. package/chunks/cc-998.generated-CsAmnJYd.mjs +4 -0
  246. package/chunks/cc-BZdCRpNT.mjs +5 -0
  247. package/chunks/cd-9O28tBfy.mjs +5 -0
  248. package/chunks/cf-BdhmyWlv.mjs +5 -0
  249. package/chunks/cg-C-Qu4NMU.mjs +5 -0
  250. package/chunks/ch-A1RQVYLO.mjs +5 -0
  251. package/chunks/ci-DZY7fgO7.mjs +5 -0
  252. package/chunks/ck-D-2C9a72.mjs +5 -0
  253. package/chunks/cl-3HNgrmyT.mjs +5 -0
  254. package/chunks/cm-DJ4mixO9.mjs +5 -0
  255. package/chunks/cn-Cw6Qlqzd.mjs +5 -0
  256. package/chunks/co-B6rvgyRo.mjs +5 -0
  257. package/chunks/cr-jJzoBrc7.mjs +5 -0
  258. package/chunks/cu-BRzz3vV_.mjs +5 -0
  259. package/chunks/cv-BzZilEMp.mjs +5 -0
  260. package/chunks/cw-5PnLdxCt.mjs +5 -0
  261. package/chunks/cx-C0sAUlCS.mjs +5 -0
  262. package/chunks/cy-DeC9FFGV.mjs +5 -0
  263. package/chunks/cz-C3rh8aUO.mjs +5 -0
  264. package/chunks/de-Q2c2XZ_v.mjs +5 -0
  265. package/chunks/dj-DWAmmYDE.mjs +5 -0
  266. package/chunks/dk-FTaySAJe.mjs +5 -0
  267. package/chunks/dm-DgSJioJq.mjs +5 -0
  268. package/chunks/do-C549n3on.mjs +5 -0
  269. package/chunks/dz-CPgKocaY.mjs +5 -0
  270. package/chunks/ec-DkC-cDOb.mjs +5 -0
  271. package/chunks/ee-BQmFOHXA.mjs +5 -0
  272. package/chunks/eg-DMVarwMR.mjs +5 -0
  273. package/chunks/eh--oxmiCXh.mjs +5 -0
  274. package/chunks/er-DjB_DDiD.mjs +5 -0
  275. package/chunks/es-D__9e8wL.mjs +5 -0
  276. package/chunks/et-C3reU7Z2.mjs +5 -0
  277. package/chunks/fi-C1K0Kh4o.mjs +5 -0
  278. package/chunks/fj-Cs7ECsE1.mjs +5 -0
  279. package/chunks/fk-DYEJDgjs.mjs +5 -0
  280. package/chunks/fm-C7r_OFnj.mjs +5 -0
  281. package/chunks/fo-DsT-wW0Q.mjs +5 -0
  282. package/chunks/form-control.styles-BOTBdmvg.mjs +171 -0
  283. package/chunks/fr-oy8Uo1bo.mjs +5 -0
  284. package/chunks/ga-DESElBvk.mjs +5 -0
  285. package/chunks/gb-D5r9QI-K.mjs +5 -0
  286. package/chunks/gd-BuRviRXt.mjs +5 -0
  287. package/chunks/ge-BpGz5nUs.mjs +5 -0
  288. package/chunks/gf-BQgWe_yS.mjs +5 -0
  289. package/chunks/gg-BLNQrqls.mjs +5 -0
  290. package/chunks/gh-BzVF8tSr.mjs +5 -0
  291. package/chunks/gi-DfKOJdRQ.mjs +5 -0
  292. package/chunks/gl-C558Toee.mjs +5 -0
  293. package/chunks/gm-DNdinxnD.mjs +5 -0
  294. package/chunks/gn-DwEBOZ3-.mjs +5 -0
  295. package/chunks/gp-oy8Uo1bo.mjs +5 -0
  296. package/chunks/gq-BSkOSQWe.mjs +5 -0
  297. package/chunks/gr-CTJJbGEC.mjs +5 -0
  298. package/chunks/gt-D4BwgazI.mjs +5 -0
  299. package/chunks/gu-CQpMzEB_.mjs +5 -0
  300. package/chunks/gw-DxZDYMtv.mjs +5 -0
  301. package/chunks/gy-BWZVUGl8.mjs +5 -0
  302. package/chunks/hk-BHxjZMf4.mjs +5 -0
  303. package/chunks/hn-BEVgQ0QQ.mjs +5 -0
  304. package/chunks/hr-BpVWlAoF.mjs +5 -0
  305. package/chunks/ht-CfzU-07O.mjs +5 -0
  306. package/chunks/hu-5Yy5WRy5.mjs +5 -0
  307. package/chunks/id-BfVg05v7.mjs +5 -0
  308. package/chunks/ie-DvpkJVl8.mjs +5 -0
  309. package/chunks/il-DDofIlI0.mjs +5 -0
  310. package/chunks/im-CW65ei4K.mjs +5 -0
  311. package/chunks/in-i60GVnCJ.mjs +5 -0
  312. package/chunks/io-Diyu5soM.mjs +5 -0
  313. package/chunks/iq-B74bFnMJ.mjs +5 -0
  314. package/chunks/ir-BWGwwJq9.mjs +5 -0
  315. package/chunks/is-CK4oIk76.mjs +5 -0
  316. package/chunks/it-Y7rj3hMY.mjs +5 -0
  317. package/chunks/je-DMoX3evy.mjs +5 -0
  318. package/chunks/jm-DZUStFkR.mjs +5 -0
  319. package/chunks/jo-DVQ6-ojE.mjs +5 -0
  320. package/chunks/jp-Y5R0MQfN.mjs +5 -0
  321. package/chunks/ke-CGq6XP7w.mjs +5 -0
  322. package/chunks/kg-DAoQwbeR.mjs +5 -0
  323. package/chunks/kh-kMI7MghQ.mjs +5 -0
  324. package/chunks/ki-Cu7fdPLn.mjs +5 -0
  325. package/chunks/km-CM7URKBO.mjs +5 -0
  326. package/chunks/kn-DBVGPz8w.mjs +5 -0
  327. package/chunks/kp-D3Ea15h2.mjs +5 -0
  328. package/chunks/kr-DKM0Jy7P.mjs +5 -0
  329. package/chunks/kw-B7J-nbX9.mjs +5 -0
  330. package/chunks/ky-p4ckNq_W.mjs +5 -0
  331. package/chunks/kz-D936idA9.mjs +5 -0
  332. package/chunks/la-CUKVKbGp.mjs +5 -0
  333. package/chunks/lb-CzUWz90e.mjs +5 -0
  334. package/chunks/lc-DuHqL5FW.mjs +5 -0
  335. package/chunks/li-DgJDzs_F.mjs +5 -0
  336. package/chunks/lk-3zaagaQ9.mjs +5 -0
  337. package/chunks/lr-B6Vn6C_9.mjs +5 -0
  338. package/chunks/ls-DrI0Fh7Y.mjs +5 -0
  339. package/chunks/lt-PBck9Sgv.mjs +5 -0
  340. package/chunks/lu-B_xY22fB.mjs +5 -0
  341. package/chunks/lv-D16yLm3v.mjs +5 -0
  342. package/chunks/ly-C1adX4Zr.mjs +5 -0
  343. package/chunks/ma-B7rH3zoW.mjs +5 -0
  344. package/chunks/mc-Xqh4jc6i.mjs +5 -0
  345. package/chunks/md-wW4zZzbN.mjs +5 -0
  346. package/chunks/me-DCy_XMtC.mjs +5 -0
  347. package/chunks/metadata-loaders.generated-Bu_7pFwU.mjs +250 -0
  348. package/chunks/mf-DP_tIA6i.mjs +5 -0
  349. package/chunks/mg-InflpHX7.mjs +5 -0
  350. package/chunks/mh-VKf434Ww.mjs +5 -0
  351. package/chunks/mk-C64VS9I-.mjs +5 -0
  352. package/chunks/ml-BjOQYgou.mjs +5 -0
  353. package/chunks/mm-DgKeX7WQ.mjs +5 -0
  354. package/chunks/mn-BBubqCvd.mjs +5 -0
  355. package/chunks/mo-BtY-l2cE.mjs +5 -0
  356. package/chunks/mp-DlkcjH8B.mjs +5 -0
  357. package/chunks/mp-input-group-Bf9a9Xut.mjs +193 -0
  358. package/chunks/{mp-select-CKX0eM5C.mjs → mp-select-lHP00OBH.mjs} +177 -33
  359. package/chunks/mq-BK7HwZSV.mjs +5 -0
  360. package/chunks/mr-C0S-6dqR.mjs +5 -0
  361. package/chunks/ms-DpwSSTE-.mjs +5 -0
  362. package/chunks/mt-B1ie-04J.mjs +5 -0
  363. package/chunks/mu-DTA25SEP.mjs +5 -0
  364. package/chunks/mv-DW49amZl.mjs +5 -0
  365. package/chunks/mw-V-bbqGPN.mjs +5 -0
  366. package/chunks/mx-CtTJw0SX.mjs +5 -0
  367. package/chunks/my-DThIQKCq.mjs +5 -0
  368. package/chunks/mz-Btgk8Li_.mjs +5 -0
  369. package/chunks/na-D08-xA7q.mjs +5 -0
  370. package/chunks/nc-hb1s2KqL.mjs +5 -0
  371. package/chunks/ne-B5vEjeNk.mjs +5 -0
  372. package/chunks/nf-DDFUS5Ht.mjs +5 -0
  373. package/chunks/ng-DBhdmXcS.mjs +5 -0
  374. package/chunks/ni-_x4RKVT8.mjs +5 -0
  375. package/chunks/nl-DBxW_qVy.mjs +5 -0
  376. package/chunks/no-LyFCuMlU.mjs +5 -0
  377. package/chunks/np-DEvIQAys.mjs +5 -0
  378. package/chunks/nr-CuzElmFx.mjs +5 -0
  379. package/chunks/nu-C6vVHkwP.mjs +5 -0
  380. package/chunks/nz-BkhNYKha.mjs +5 -0
  381. package/chunks/om-BsI3oHrd.mjs +5 -0
  382. package/chunks/pa-CtNQVaHE.mjs +5 -0
  383. package/chunks/pe-vcSV6ioD.mjs +5 -0
  384. package/chunks/pf-BOetDvnB.mjs +5 -0
  385. package/chunks/pg-BDqa4YXR.mjs +5 -0
  386. package/chunks/ph-BlAaFzEE.mjs +5 -0
  387. package/chunks/pk-2auAZIDh.mjs +5 -0
  388. package/chunks/pl-W6WZfuq9.mjs +5 -0
  389. package/chunks/pm-oy8Uo1bo.mjs +5 -0
  390. package/chunks/pr-B3p98s5J.mjs +5 -0
  391. package/chunks/ps-RET8kTuo.mjs +5 -0
  392. package/chunks/pt-Z2yfZJAz.mjs +5 -0
  393. package/chunks/pw-Dm4Y4noS.mjs +5 -0
  394. package/chunks/py-1pKD7w9y.mjs +5 -0
  395. package/chunks/qa-DpK5_Q-a.mjs +5 -0
  396. package/chunks/re-oy8Uo1bo.mjs +5 -0
  397. package/chunks/ro-VYde6hop.mjs +5 -0
  398. package/chunks/rs-Dj7Wicw9.mjs +5 -0
  399. package/chunks/ru-CkWEkuTy.mjs +5 -0
  400. package/chunks/rw-DjRHPIJ_.mjs +5 -0
  401. package/chunks/sa-BBdaW-_G.mjs +5 -0
  402. package/chunks/sb-nNr9S0gd.mjs +5 -0
  403. package/chunks/sc-DcbShXuj.mjs +5 -0
  404. package/chunks/sd-B1jbITc6.mjs +5 -0
  405. package/chunks/se-B-CIMrxu.mjs +5 -0
  406. package/chunks/sg-BIR0OErL.mjs +5 -0
  407. package/chunks/sh-BR9c9S8h.mjs +5 -0
  408. package/chunks/si-B5HzM3z8.mjs +5 -0
  409. package/chunks/sj-LyFCuMlU.mjs +5 -0
  410. package/chunks/sk-7ZEImIK5.mjs +5 -0
  411. package/chunks/sl-DuhHodH6.mjs +5 -0
  412. package/chunks/sm-BrM5UOOM.mjs +5 -0
  413. package/chunks/sn-jptojE_-.mjs +5 -0
  414. package/chunks/so-auBJUCeE.mjs +5 -0
  415. package/chunks/sr-DqWWIG11.mjs +5 -0
  416. package/chunks/ss-BcJF0rd5.mjs +5 -0
  417. package/chunks/st-D65H7-IP.mjs +5 -0
  418. package/chunks/sv-D8EgdK15.mjs +5 -0
  419. package/chunks/sx-Cmd53qC5.mjs +5 -0
  420. package/chunks/sy-LL8b7cLC.mjs +5 -0
  421. package/chunks/sz-D-qYq589.mjs +5 -0
  422. package/chunks/tc-AIE9LFuJ.mjs +5 -0
  423. package/chunks/td-C5AP4EiN.mjs +5 -0
  424. package/chunks/tg-Dt9WAF7L.mjs +5 -0
  425. package/chunks/th-DyfDlw-o.mjs +5 -0
  426. package/chunks/tj-U7xsGAAg.mjs +5 -0
  427. package/chunks/tk-BWjKruB4.mjs +5 -0
  428. package/chunks/tl-CcXsJf98.mjs +5 -0
  429. package/chunks/tm-DTASSSkf.mjs +5 -0
  430. package/chunks/tn-DttZvPz0.mjs +5 -0
  431. package/chunks/to-ChsX5Z4Q.mjs +5 -0
  432. package/chunks/tr-C2CRhai0.mjs +5 -0
  433. package/chunks/tt-DPpP-HbL.mjs +5 -0
  434. package/chunks/tv-CiTLokZi.mjs +5 -0
  435. package/chunks/tw--J7h_fxf.mjs +5 -0
  436. package/chunks/tz-qS3mKSkx.mjs +5 -0
  437. package/chunks/ua-DiZstskV.mjs +5 -0
  438. package/chunks/ug-BxVGZUby.mjs +5 -0
  439. package/chunks/us-BvyIwpav.mjs +5 -0
  440. package/chunks/uy-Dsr4HSrP.mjs +5 -0
  441. package/chunks/uz-D25kmTp8.mjs +5 -0
  442. package/chunks/va-hG27DTVe.mjs +5 -0
  443. package/chunks/validation-ChktfuxI.mjs +137 -0
  444. package/chunks/vc-7r46jyD5.mjs +5 -0
  445. package/chunks/ve-R8UkJHAj.mjs +5 -0
  446. package/chunks/vg-BLSugSwb.mjs +5 -0
  447. package/chunks/vi-DSyJsPSD.mjs +5 -0
  448. package/chunks/vn-BwGpRkWs.mjs +5 -0
  449. package/chunks/vu-aFyzktTY.mjs +5 -0
  450. package/chunks/wf-Ca9RrMIP.mjs +5 -0
  451. package/chunks/ws-DphODgja.mjs +5 -0
  452. package/chunks/xk-sugAykhS.mjs +5 -0
  453. package/chunks/ye-D2MZq-93.mjs +5 -0
  454. package/chunks/yt-tAecYEDU.mjs +5 -0
  455. package/chunks/za-DadXcfMa.mjs +5 -0
  456. package/chunks/zm--rp7ufAJ.mjs +5 -0
  457. package/chunks/zw-BG5nNe2I.mjs +5 -0
  458. package/flags/README.md +64 -0
  459. package/flags/index.d.ts +1 -0
  460. package/flags/index.mjs +264 -0
  461. package/flags/src/all-flags.d.ts +32 -0
  462. package/flags/src/all-flags.generated.d.ts +6 -0
  463. package/flags/src/flag-loaders.generated.d.ts +7 -0
  464. package/flags/src/index.d.ts +3 -0
  465. package/flags/src/load-flag.d.ts +13 -0
  466. package/input-group/index.d.ts +1 -0
  467. package/input-group/index.mjs +4 -0
  468. package/input-group/src/components/mp-input-group.d.ts +61 -0
  469. package/input-group/src/index.d.ts +1 -0
  470. package/input-group/src/styles/index.d.ts +1 -0
  471. package/input-group/src/styles/input-group.styles.d.ts +2 -0
  472. package/package.json +20 -2
  473. package/phone-core/README.md +57 -0
  474. package/phone-core/index.d.ts +1 -0
  475. package/phone-core/index.mjs +8 -0
  476. package/phone-core/src/countries.d.ts +57 -0
  477. package/phone-core/src/dial-code.d.ts +30 -0
  478. package/phone-core/src/index.d.ts +4 -0
  479. package/phone-core/src/metadata/cc-1.generated.d.ts +3 -0
  480. package/phone-core/src/metadata/cc-20.generated.d.ts +3 -0
  481. package/phone-core/src/metadata/cc-211.generated.d.ts +3 -0
  482. package/phone-core/src/metadata/cc-212.generated.d.ts +3 -0
  483. package/phone-core/src/metadata/cc-213.generated.d.ts +3 -0
  484. package/phone-core/src/metadata/cc-216.generated.d.ts +3 -0
  485. package/phone-core/src/metadata/cc-218.generated.d.ts +3 -0
  486. package/phone-core/src/metadata/cc-220.generated.d.ts +3 -0
  487. package/phone-core/src/metadata/cc-221.generated.d.ts +3 -0
  488. package/phone-core/src/metadata/cc-222.generated.d.ts +3 -0
  489. package/phone-core/src/metadata/cc-223.generated.d.ts +3 -0
  490. package/phone-core/src/metadata/cc-224.generated.d.ts +3 -0
  491. package/phone-core/src/metadata/cc-225.generated.d.ts +3 -0
  492. package/phone-core/src/metadata/cc-226.generated.d.ts +3 -0
  493. package/phone-core/src/metadata/cc-227.generated.d.ts +3 -0
  494. package/phone-core/src/metadata/cc-228.generated.d.ts +3 -0
  495. package/phone-core/src/metadata/cc-229.generated.d.ts +3 -0
  496. package/phone-core/src/metadata/cc-230.generated.d.ts +3 -0
  497. package/phone-core/src/metadata/cc-231.generated.d.ts +3 -0
  498. package/phone-core/src/metadata/cc-232.generated.d.ts +3 -0
  499. package/phone-core/src/metadata/cc-233.generated.d.ts +3 -0
  500. package/phone-core/src/metadata/cc-234.generated.d.ts +3 -0
  501. package/phone-core/src/metadata/cc-235.generated.d.ts +3 -0
  502. package/phone-core/src/metadata/cc-236.generated.d.ts +3 -0
  503. package/phone-core/src/metadata/cc-237.generated.d.ts +3 -0
  504. package/phone-core/src/metadata/cc-238.generated.d.ts +3 -0
  505. package/phone-core/src/metadata/cc-239.generated.d.ts +3 -0
  506. package/phone-core/src/metadata/cc-240.generated.d.ts +3 -0
  507. package/phone-core/src/metadata/cc-241.generated.d.ts +3 -0
  508. package/phone-core/src/metadata/cc-242.generated.d.ts +3 -0
  509. package/phone-core/src/metadata/cc-243.generated.d.ts +3 -0
  510. package/phone-core/src/metadata/cc-244.generated.d.ts +3 -0
  511. package/phone-core/src/metadata/cc-245.generated.d.ts +3 -0
  512. package/phone-core/src/metadata/cc-246.generated.d.ts +3 -0
  513. package/phone-core/src/metadata/cc-247.generated.d.ts +3 -0
  514. package/phone-core/src/metadata/cc-248.generated.d.ts +3 -0
  515. package/phone-core/src/metadata/cc-249.generated.d.ts +3 -0
  516. package/phone-core/src/metadata/cc-250.generated.d.ts +3 -0
  517. package/phone-core/src/metadata/cc-251.generated.d.ts +3 -0
  518. package/phone-core/src/metadata/cc-252.generated.d.ts +3 -0
  519. package/phone-core/src/metadata/cc-253.generated.d.ts +3 -0
  520. package/phone-core/src/metadata/cc-254.generated.d.ts +3 -0
  521. package/phone-core/src/metadata/cc-255.generated.d.ts +3 -0
  522. package/phone-core/src/metadata/cc-256.generated.d.ts +3 -0
  523. package/phone-core/src/metadata/cc-257.generated.d.ts +3 -0
  524. package/phone-core/src/metadata/cc-258.generated.d.ts +3 -0
  525. package/phone-core/src/metadata/cc-260.generated.d.ts +3 -0
  526. package/phone-core/src/metadata/cc-261.generated.d.ts +3 -0
  527. package/phone-core/src/metadata/cc-262.generated.d.ts +3 -0
  528. package/phone-core/src/metadata/cc-263.generated.d.ts +3 -0
  529. package/phone-core/src/metadata/cc-264.generated.d.ts +3 -0
  530. package/phone-core/src/metadata/cc-265.generated.d.ts +3 -0
  531. package/phone-core/src/metadata/cc-266.generated.d.ts +3 -0
  532. package/phone-core/src/metadata/cc-267.generated.d.ts +3 -0
  533. package/phone-core/src/metadata/cc-268.generated.d.ts +3 -0
  534. package/phone-core/src/metadata/cc-269.generated.d.ts +3 -0
  535. package/phone-core/src/metadata/cc-27.generated.d.ts +3 -0
  536. package/phone-core/src/metadata/cc-290.generated.d.ts +3 -0
  537. package/phone-core/src/metadata/cc-291.generated.d.ts +3 -0
  538. package/phone-core/src/metadata/cc-297.generated.d.ts +3 -0
  539. package/phone-core/src/metadata/cc-298.generated.d.ts +3 -0
  540. package/phone-core/src/metadata/cc-299.generated.d.ts +3 -0
  541. package/phone-core/src/metadata/cc-30.generated.d.ts +3 -0
  542. package/phone-core/src/metadata/cc-31.generated.d.ts +3 -0
  543. package/phone-core/src/metadata/cc-32.generated.d.ts +3 -0
  544. package/phone-core/src/metadata/cc-33.generated.d.ts +3 -0
  545. package/phone-core/src/metadata/cc-34.generated.d.ts +3 -0
  546. package/phone-core/src/metadata/cc-350.generated.d.ts +3 -0
  547. package/phone-core/src/metadata/cc-351.generated.d.ts +3 -0
  548. package/phone-core/src/metadata/cc-352.generated.d.ts +3 -0
  549. package/phone-core/src/metadata/cc-353.generated.d.ts +3 -0
  550. package/phone-core/src/metadata/cc-354.generated.d.ts +3 -0
  551. package/phone-core/src/metadata/cc-355.generated.d.ts +3 -0
  552. package/phone-core/src/metadata/cc-356.generated.d.ts +3 -0
  553. package/phone-core/src/metadata/cc-357.generated.d.ts +3 -0
  554. package/phone-core/src/metadata/cc-358.generated.d.ts +3 -0
  555. package/phone-core/src/metadata/cc-359.generated.d.ts +3 -0
  556. package/phone-core/src/metadata/cc-36.generated.d.ts +3 -0
  557. package/phone-core/src/metadata/cc-370.generated.d.ts +3 -0
  558. package/phone-core/src/metadata/cc-371.generated.d.ts +3 -0
  559. package/phone-core/src/metadata/cc-372.generated.d.ts +3 -0
  560. package/phone-core/src/metadata/cc-373.generated.d.ts +3 -0
  561. package/phone-core/src/metadata/cc-374.generated.d.ts +3 -0
  562. package/phone-core/src/metadata/cc-375.generated.d.ts +3 -0
  563. package/phone-core/src/metadata/cc-376.generated.d.ts +3 -0
  564. package/phone-core/src/metadata/cc-377.generated.d.ts +3 -0
  565. package/phone-core/src/metadata/cc-378.generated.d.ts +3 -0
  566. package/phone-core/src/metadata/cc-380.generated.d.ts +3 -0
  567. package/phone-core/src/metadata/cc-381.generated.d.ts +3 -0
  568. package/phone-core/src/metadata/cc-382.generated.d.ts +3 -0
  569. package/phone-core/src/metadata/cc-383.generated.d.ts +3 -0
  570. package/phone-core/src/metadata/cc-385.generated.d.ts +3 -0
  571. package/phone-core/src/metadata/cc-386.generated.d.ts +3 -0
  572. package/phone-core/src/metadata/cc-387.generated.d.ts +3 -0
  573. package/phone-core/src/metadata/cc-389.generated.d.ts +3 -0
  574. package/phone-core/src/metadata/cc-39.generated.d.ts +3 -0
  575. package/phone-core/src/metadata/cc-40.generated.d.ts +3 -0
  576. package/phone-core/src/metadata/cc-41.generated.d.ts +3 -0
  577. package/phone-core/src/metadata/cc-420.generated.d.ts +3 -0
  578. package/phone-core/src/metadata/cc-421.generated.d.ts +3 -0
  579. package/phone-core/src/metadata/cc-423.generated.d.ts +3 -0
  580. package/phone-core/src/metadata/cc-43.generated.d.ts +3 -0
  581. package/phone-core/src/metadata/cc-44.generated.d.ts +3 -0
  582. package/phone-core/src/metadata/cc-45.generated.d.ts +3 -0
  583. package/phone-core/src/metadata/cc-46.generated.d.ts +3 -0
  584. package/phone-core/src/metadata/cc-47.generated.d.ts +3 -0
  585. package/phone-core/src/metadata/cc-48.generated.d.ts +3 -0
  586. package/phone-core/src/metadata/cc-49.generated.d.ts +3 -0
  587. package/phone-core/src/metadata/cc-500.generated.d.ts +3 -0
  588. package/phone-core/src/metadata/cc-501.generated.d.ts +3 -0
  589. package/phone-core/src/metadata/cc-502.generated.d.ts +3 -0
  590. package/phone-core/src/metadata/cc-503.generated.d.ts +3 -0
  591. package/phone-core/src/metadata/cc-504.generated.d.ts +3 -0
  592. package/phone-core/src/metadata/cc-505.generated.d.ts +3 -0
  593. package/phone-core/src/metadata/cc-506.generated.d.ts +3 -0
  594. package/phone-core/src/metadata/cc-507.generated.d.ts +3 -0
  595. package/phone-core/src/metadata/cc-508.generated.d.ts +3 -0
  596. package/phone-core/src/metadata/cc-509.generated.d.ts +3 -0
  597. package/phone-core/src/metadata/cc-51.generated.d.ts +3 -0
  598. package/phone-core/src/metadata/cc-52.generated.d.ts +3 -0
  599. package/phone-core/src/metadata/cc-53.generated.d.ts +3 -0
  600. package/phone-core/src/metadata/cc-54.generated.d.ts +3 -0
  601. package/phone-core/src/metadata/cc-55.generated.d.ts +3 -0
  602. package/phone-core/src/metadata/cc-56.generated.d.ts +3 -0
  603. package/phone-core/src/metadata/cc-57.generated.d.ts +3 -0
  604. package/phone-core/src/metadata/cc-58.generated.d.ts +3 -0
  605. package/phone-core/src/metadata/cc-590.generated.d.ts +3 -0
  606. package/phone-core/src/metadata/cc-591.generated.d.ts +3 -0
  607. package/phone-core/src/metadata/cc-592.generated.d.ts +3 -0
  608. package/phone-core/src/metadata/cc-593.generated.d.ts +3 -0
  609. package/phone-core/src/metadata/cc-594.generated.d.ts +3 -0
  610. package/phone-core/src/metadata/cc-595.generated.d.ts +3 -0
  611. package/phone-core/src/metadata/cc-596.generated.d.ts +3 -0
  612. package/phone-core/src/metadata/cc-597.generated.d.ts +3 -0
  613. package/phone-core/src/metadata/cc-598.generated.d.ts +3 -0
  614. package/phone-core/src/metadata/cc-599.generated.d.ts +3 -0
  615. package/phone-core/src/metadata/cc-60.generated.d.ts +3 -0
  616. package/phone-core/src/metadata/cc-61.generated.d.ts +3 -0
  617. package/phone-core/src/metadata/cc-62.generated.d.ts +3 -0
  618. package/phone-core/src/metadata/cc-63.generated.d.ts +3 -0
  619. package/phone-core/src/metadata/cc-64.generated.d.ts +3 -0
  620. package/phone-core/src/metadata/cc-65.generated.d.ts +3 -0
  621. package/phone-core/src/metadata/cc-66.generated.d.ts +3 -0
  622. package/phone-core/src/metadata/cc-670.generated.d.ts +3 -0
  623. package/phone-core/src/metadata/cc-672.generated.d.ts +3 -0
  624. package/phone-core/src/metadata/cc-673.generated.d.ts +3 -0
  625. package/phone-core/src/metadata/cc-674.generated.d.ts +3 -0
  626. package/phone-core/src/metadata/cc-675.generated.d.ts +3 -0
  627. package/phone-core/src/metadata/cc-676.generated.d.ts +3 -0
  628. package/phone-core/src/metadata/cc-677.generated.d.ts +3 -0
  629. package/phone-core/src/metadata/cc-678.generated.d.ts +3 -0
  630. package/phone-core/src/metadata/cc-679.generated.d.ts +3 -0
  631. package/phone-core/src/metadata/cc-680.generated.d.ts +3 -0
  632. package/phone-core/src/metadata/cc-681.generated.d.ts +3 -0
  633. package/phone-core/src/metadata/cc-682.generated.d.ts +3 -0
  634. package/phone-core/src/metadata/cc-683.generated.d.ts +3 -0
  635. package/phone-core/src/metadata/cc-685.generated.d.ts +3 -0
  636. package/phone-core/src/metadata/cc-686.generated.d.ts +3 -0
  637. package/phone-core/src/metadata/cc-687.generated.d.ts +3 -0
  638. package/phone-core/src/metadata/cc-688.generated.d.ts +3 -0
  639. package/phone-core/src/metadata/cc-689.generated.d.ts +3 -0
  640. package/phone-core/src/metadata/cc-690.generated.d.ts +3 -0
  641. package/phone-core/src/metadata/cc-691.generated.d.ts +3 -0
  642. package/phone-core/src/metadata/cc-692.generated.d.ts +3 -0
  643. package/phone-core/src/metadata/cc-7.generated.d.ts +3 -0
  644. package/phone-core/src/metadata/cc-81.generated.d.ts +3 -0
  645. package/phone-core/src/metadata/cc-82.generated.d.ts +3 -0
  646. package/phone-core/src/metadata/cc-84.generated.d.ts +3 -0
  647. package/phone-core/src/metadata/cc-850.generated.d.ts +3 -0
  648. package/phone-core/src/metadata/cc-852.generated.d.ts +3 -0
  649. package/phone-core/src/metadata/cc-853.generated.d.ts +3 -0
  650. package/phone-core/src/metadata/cc-855.generated.d.ts +3 -0
  651. package/phone-core/src/metadata/cc-856.generated.d.ts +3 -0
  652. package/phone-core/src/metadata/cc-86.generated.d.ts +3 -0
  653. package/phone-core/src/metadata/cc-880.generated.d.ts +3 -0
  654. package/phone-core/src/metadata/cc-886.generated.d.ts +3 -0
  655. package/phone-core/src/metadata/cc-90.generated.d.ts +3 -0
  656. package/phone-core/src/metadata/cc-91.generated.d.ts +3 -0
  657. package/phone-core/src/metadata/cc-92.generated.d.ts +3 -0
  658. package/phone-core/src/metadata/cc-93.generated.d.ts +3 -0
  659. package/phone-core/src/metadata/cc-94.generated.d.ts +3 -0
  660. package/phone-core/src/metadata/cc-95.generated.d.ts +3 -0
  661. package/phone-core/src/metadata/cc-960.generated.d.ts +3 -0
  662. package/phone-core/src/metadata/cc-961.generated.d.ts +3 -0
  663. package/phone-core/src/metadata/cc-962.generated.d.ts +3 -0
  664. package/phone-core/src/metadata/cc-963.generated.d.ts +3 -0
  665. package/phone-core/src/metadata/cc-964.generated.d.ts +3 -0
  666. package/phone-core/src/metadata/cc-965.generated.d.ts +3 -0
  667. package/phone-core/src/metadata/cc-966.generated.d.ts +3 -0
  668. package/phone-core/src/metadata/cc-967.generated.d.ts +3 -0
  669. package/phone-core/src/metadata/cc-968.generated.d.ts +3 -0
  670. package/phone-core/src/metadata/cc-970.generated.d.ts +3 -0
  671. package/phone-core/src/metadata/cc-971.generated.d.ts +3 -0
  672. package/phone-core/src/metadata/cc-972.generated.d.ts +3 -0
  673. package/phone-core/src/metadata/cc-973.generated.d.ts +3 -0
  674. package/phone-core/src/metadata/cc-974.generated.d.ts +3 -0
  675. package/phone-core/src/metadata/cc-975.generated.d.ts +3 -0
  676. package/phone-core/src/metadata/cc-976.generated.d.ts +3 -0
  677. package/phone-core/src/metadata/cc-977.generated.d.ts +3 -0
  678. package/phone-core/src/metadata/cc-98.generated.d.ts +3 -0
  679. package/phone-core/src/metadata/cc-992.generated.d.ts +3 -0
  680. package/phone-core/src/metadata/cc-993.generated.d.ts +3 -0
  681. package/phone-core/src/metadata/cc-994.generated.d.ts +3 -0
  682. package/phone-core/src/metadata/cc-995.generated.d.ts +3 -0
  683. package/phone-core/src/metadata/cc-996.generated.d.ts +3 -0
  684. package/phone-core/src/metadata/cc-998.generated.d.ts +3 -0
  685. package/phone-core/src/metadata-loaders.generated.d.ts +15 -0
  686. package/phone-core/src/validation.d.ts +55 -0
  687. package/phone-input/index.d.ts +1 -0
  688. package/phone-input/index.mjs +514 -0
  689. package/phone-input/src/components/caret.d.ts +25 -0
  690. package/phone-input/src/components/mp-phone-input.d.ts +149 -0
  691. package/phone-input/src/index.d.ts +1 -0
  692. package/phone-input/src/styles/index.d.ts +1 -0
  693. package/phone-input/src/styles/phone-input.styles.d.ts +2 -0
  694. package/query-builder/index.mjs +1 -1
  695. package/scheduler/index.mjs +768 -914
  696. package/select/index.mjs +1 -1
  697. package/select/src/components/index.d.ts +1 -1
  698. package/select/src/components/mp-select.d.ts +38 -0
  699. package/select/src/index.d.ts +1 -1
  700. package/select/src/styles/index.d.ts +1 -0
  701. package/select/src/styles/select.styles.d.ts +2 -0
@@ -1,16 +1,17 @@
1
- import { unsafeCSS as ne, LitElement as he, html as S, nothing as k } from "lit";
1
+ import { unsafeCSS as ce, LitElement as he, html as S, nothing as k } from "lit";
2
2
  import { L as ue } from "../chunks/live-announcer-Bi0orG4n.mjs";
3
3
  import { e as pe } from "../chunks/error-text-B45eDAt1.mjs";
4
- import { D as me, s as H, d as h, j as E, w, v as X, p as ve, x as j, z as C, y as O, r as oe, u as ie, q as ge, k as fe } from "../chunks/id-DNZVAnGC.mjs";
5
- import { i as ye } from "../chunks/invalid-feedback.styles-he0JYrJm.mjs";
4
+ import { D as ve, s as H, d as h, j as E, w, v as X, p as me, x as j, z as C, y as O, r as ie, u as re, q as ge, k as fe } from "../chunks/id-DNZVAnGC.mjs";
5
+ import { f as ye } from "../chunks/form-control.styles-BOTBdmvg.mjs";
6
+ import { i as be } from "../chunks/invalid-feedback.styles-he0JYrJm.mjs";
6
7
  import { O as _ } from "../chunks/overlay-controller-D6agzzOI.mjs";
7
8
  import "../chunks/mp-checkbox-6EJwdUIn.mjs";
8
- import "../chunks/mp-select-CKX0eM5C.mjs";
9
+ import "../chunks/mp-select-lHP00OBH.mjs";
9
10
  import "../chunks/mp-datetime-picker.element-D1CiLbHm.mjs";
10
- function ae(p, e = []) {
11
+ function oe(p, e = []) {
11
12
  for (const t of p) {
12
13
  if (H(t)) {
13
- ae(t.children, e);
14
+ oe(t.children, e);
14
15
  continue;
15
16
  }
16
17
  for (const s of t.events ?? [])
@@ -19,39 +20,39 @@ function ae(p, e = []) {
19
20
  return e;
20
21
  }
21
22
  function te(p, e) {
22
- const t = ae(e);
23
+ const t = oe(e);
23
24
  if (t.length === 0) return p;
24
25
  const s = /* @__PURE__ */ new Map();
25
- for (const n of t) s.set(n.id, n);
26
- const r = [];
27
- for (const n of p)
28
- s.has(n.id) && r.push(n.id), s.set(n.id, n);
29
- return r.length > 0 && console.warn(
30
- `[mp-scheduler] ${r.length} event id(s) appear in both the "events" input and under a resource; the "events" entry wins. Ids: ${r.join(", ")}`
26
+ for (const i of t) s.set(i.id, i);
27
+ const n = [];
28
+ for (const i of p)
29
+ s.has(i.id) && n.push(i.id), s.set(i.id, i);
30
+ return n.length > 0 && console.warn(
31
+ `[mp-scheduler] ${n.length} event id(s) appear in both the "events" input and under a resource; the "events" entry wins. Ids: ${n.join(", ")}`
31
32
  ), [...s.values()];
32
33
  }
33
- function be(p, e, t) {
34
- const s = new Set(e), r = (n) => {
35
- for (const o of n)
36
- H(o) && (t.has(o.id) || (t.add(o.id), o.collapsed && s.add(o.id)), r(o.children));
34
+ function we(p, e, t) {
35
+ const s = new Set(e), n = (i) => {
36
+ for (const r of i)
37
+ H(r) && (t.has(r.id) || (t.add(r.id), r.collapsed && s.add(r.id)), n(r.children));
37
38
  };
38
- return r(p), s;
39
+ return n(p), s;
39
40
  }
40
- function le(p, e = /* @__PURE__ */ new Map()) {
41
+ function ae(p, e = /* @__PURE__ */ new Map()) {
41
42
  for (const t of p)
42
- H(t) ? le(t.children, e) : e.set(t.id, t);
43
+ H(t) ? ae(t.children, e) : e.set(t.id, t);
43
44
  return e;
44
45
  }
45
- function we(p, e) {
46
+ function Ee(p, e) {
46
47
  const t = /* @__PURE__ */ new Map();
47
48
  for (const s of p) {
48
- const r = s.resourceId != null && e.has(s.resourceId) ? s.resourceId : null, n = t.get(r);
49
- n ? n.push(s) : t.set(r, [s]);
49
+ const n = s.resourceId != null && e.has(s.resourceId) ? s.resourceId : null, i = t.get(n);
50
+ i ? i.push(s) : t.set(n, [s]);
50
51
  }
51
52
  return t;
52
53
  }
53
- function Ee(p = {}) {
54
- const e = { ...me, ...p };
54
+ function xe(p = {}) {
55
+ const e = { ...ve, ...p };
55
56
  return {
56
57
  view: e.initialView,
57
58
  date: e.initialDate,
@@ -78,9 +79,9 @@ function Ee(p = {}) {
78
79
  focusedDate: null
79
80
  };
80
81
  }
81
- class xe {
82
+ class De {
82
83
  constructor(e = {}) {
83
- this.listeners = /* @__PURE__ */ new Set(), this.warnedUnassignedIds = /* @__PURE__ */ new Set(), this.warnedDanglingIds = /* @__PURE__ */ new Set(), this.flatEventsInput = [], this.seededGroupIds = /* @__PURE__ */ new Set(), this.state = Ee(e);
84
+ this.listeners = /* @__PURE__ */ new Set(), this.warnedUnassignedIds = /* @__PURE__ */ new Set(), this.warnedDanglingIds = /* @__PURE__ */ new Set(), this.flatEventsInput = [], this.seededGroupIds = /* @__PURE__ */ new Set(), this.state = xe(e);
84
85
  }
85
86
  /**
86
87
  * Get current state
@@ -92,8 +93,8 @@ class xe {
92
93
  * Update state with partial update or updater function
93
94
  */
94
95
  setState(e) {
95
- const t = typeof e == "function" ? e(this.state) : e, s = { ...this.state, ...t }, r = s.resources !== this.state.resources || !this.state.resourceById;
96
- r && (s.resourceById = le(s.resources)), (s.events !== this.state.events || r || !this.state.eventsByResource) && (s.eventsByResource = we(s.events, s.resourceById)), this.state = s, this.warnUnassignedEvents(), this.warnDanglingEvents(), this.notifyListeners();
96
+ const t = typeof e == "function" ? e(this.state) : e, s = { ...this.state, ...t }, n = s.resources !== this.state.resources || !this.state.resourceById;
97
+ n && (s.resourceById = ae(s.resources)), (s.events !== this.state.events || n || !this.state.eventsByResource) && (s.eventsByResource = Ee(s.events, s.resourceById)), this.state = s, this.warnUnassignedEvents(), this.warnDanglingEvents(), this.notifyListeners();
97
98
  }
98
99
  /**
99
100
  * `options.requireEventResource` is a DEVELOPMENT signal, not a filter: the
@@ -211,7 +212,7 @@ class xe {
211
212
  this.setState((t) => ({
212
213
  resources: e,
213
214
  events: te(this.flatEventsInput, e),
214
- collapsedGroups: be(
215
+ collapsedGroups: we(
215
216
  e,
216
217
  t.collapsedGroups,
217
218
  this.seededGroupIds
@@ -378,11 +379,11 @@ class xe {
378
379
  */
379
380
  extendSelection(e, t = null) {
380
381
  this.setState((s) => {
381
- const r = s.selectionAnchor ?? s.focusedCell ?? e, n = s.selectionResourceId ?? s.focusedResourceId ?? t;
382
+ const n = s.selectionAnchor ?? s.focusedCell ?? e, i = s.selectionResourceId ?? s.focusedResourceId ?? t;
382
383
  return {
383
- selectionAnchor: r,
384
+ selectionAnchor: n,
384
385
  selectionExtent: e,
385
- selectionResourceId: n
386
+ selectionResourceId: i
386
387
  };
387
388
  });
388
389
  }
@@ -404,22 +405,22 @@ class xe {
404
405
  this.setState({ focusedDate: e });
405
406
  }
406
407
  }
407
- function de(p) {
408
+ function le(p) {
408
409
  return `${p.getFullYear()}-${String(p.getMonth() + 1).padStart(2, "0")}-${String(
409
410
  p.getDate()
410
411
  ).padStart(2, "0")}`;
411
412
  }
412
413
  function W(p, e, t) {
413
- const s = t.timeFormat, r = h.formatTime(p.start, s, t.locale), n = h.formatTime(p.end, s, t.locale), o = p.start.toLocaleDateString(t.locale, { weekday: "long", month: "short", day: "numeric" }), i = [`${p.title}, ${r}–${n}`, o];
414
- return e && i.push(E(w(t.messages).eventOnResource, { resource: e })), i.join(", ");
414
+ const s = t.timeFormat, n = h.formatTime(p.start, s, t.locale), i = h.formatTime(p.end, s, t.locale), r = p.start.toLocaleDateString(t.locale, { weekday: "long", month: "short", day: "numeric" }), o = [`${p.title}, ${n}–${i}`, r];
415
+ return e && o.push(E(w(t.messages).eventOnResource, { resource: e })), o.join(", ");
415
416
  }
416
417
  function G(p) {
417
418
  const { selectionAnchor: e, selectionExtent: t, selectionResourceId: s } = p;
418
419
  if (!e || !t) return null;
419
- const r = Math.min(e.start.getTime(), t.start.getTime()), n = Math.max(e.end.getTime(), t.end.getTime());
420
+ const n = Math.min(e.start.getTime(), t.start.getTime()), i = Math.max(e.end.getTime(), t.end.getTime());
420
421
  return {
421
- start: new Date(r),
422
- end: new Date(n),
422
+ start: new Date(n),
423
+ end: new Date(i),
423
424
  resourceId: s
424
425
  };
425
426
  }
@@ -432,40 +433,40 @@ function q(p, e, t = null) {
432
433
  weekday: "long",
433
434
  month: "short",
434
435
  day: "numeric"
435
- }), r = h.formatTime(p.start, e.timeFormat, e.locale), n = [`${s}, ${r}`];
436
- return t && n.push(t), n.join(", ");
436
+ }), n = h.formatTime(p.start, e.timeFormat, e.locale), i = [`${s}, ${n}`];
437
+ return t && i.push(t), i.join(", ");
437
438
  }
438
- function De(p, e) {
439
+ function Se(p, e) {
439
440
  const t = G(p);
440
441
  if (!t) return "";
441
- const { options: s } = p, r = s.timeFormat, n = { weekday: "short", month: "short", day: "numeric" }, o = `${h.formatTime(t.start, r, s.locale)} ${t.start.toLocaleDateString(s.locale, n)}`, i = `${h.formatTime(t.end, r, s.locale)} ${t.end.toLocaleDateString(s.locale, n)}`, a = e * 1e3, l = Math.max(1, Math.round((t.end.getTime() - t.start.getTime()) / a)), d = w(s.messages);
442
+ const { options: s } = p, n = s.timeFormat, i = { weekday: "short", month: "short", day: "numeric" }, r = `${h.formatTime(t.start, n, s.locale)} ${t.start.toLocaleDateString(s.locale, i)}`, o = `${h.formatTime(t.end, n, s.locale)} ${t.end.toLocaleDateString(s.locale, i)}`, a = e * 1e3, l = Math.max(1, Math.round((t.end.getTime() - t.start.getTime()) / a)), d = w(s.messages);
442
443
  return E(d.selection, {
443
- start: o,
444
- end: i,
444
+ start: r,
445
+ end: o,
445
446
  count: l,
446
447
  slots: l === 1 ? d.slotSingular : d.slotPlural
447
448
  });
448
449
  }
449
- function Se(p, e, t) {
450
- const s = t.timeFormat, r = p.toLocaleDateString(t.locale, { weekday: "short", month: "short", day: "numeric" });
450
+ function ke(p, e, t) {
451
+ const s = t.timeFormat, n = p.toLocaleDateString(t.locale, { weekday: "short", month: "short", day: "numeric" });
451
452
  return E(w(t.messages).movedTo, {
452
453
  start: h.formatTime(p, s, t.locale),
453
454
  end: h.formatTime(e, s, t.locale),
454
- day: r
455
+ day: n
455
456
  });
456
457
  }
457
- function ke(p, e, t, s) {
458
- const r = s.timeFormat, n = w(s.messages);
459
- return E(n.resizedEdge, {
460
- edge: t === "start" ? n.startEdge : n.endEdge,
461
- start: h.formatTime(p, r, s.locale),
462
- end: h.formatTime(e, r, s.locale)
458
+ function Me(p, e, t, s) {
459
+ const n = s.timeFormat, i = w(s.messages);
460
+ return E(i.resizedEdge, {
461
+ edge: t === "start" ? i.startEdge : i.endEdge,
462
+ start: h.formatTime(p, n, s.locale),
463
+ end: h.formatTime(e, n, s.locale)
463
464
  });
464
465
  }
465
- const Me = 40, Ce = 20;
466
+ const Ce = 40, Te = 20;
466
467
  function se(p, e) {
467
- const [t = 0, s = 0, r = 0] = e.split(":").map(Number), n = new Date(p);
468
- return n.setHours(0, 0, 0, 0), n.setSeconds(t * 3600 + s * 60 + r), n;
468
+ const [t = 0, s = 0, n = 0] = e.split(":").map(Number), i = new Date(p);
469
+ return i.setHours(0, 0, 0, 0), i.setSeconds(t * 3600 + s * 60 + n), i;
469
470
  }
470
471
  class K {
471
472
  constructor(e, t) {
@@ -531,15 +532,15 @@ class K {
531
532
  this.state.resourceById,
532
533
  this.state.options.defaultEventColor
533
534
  );
534
- e.style.backgroundColor = s, e.style.color = t.textColor ?? ve(s);
535
+ e.style.backgroundColor = s, e.style.color = t.textColor ?? me(s);
535
536
  }
536
537
  partGeometry(e, t, s) {
537
- const r = s.slotDuration ?? 1800, n = se(e, s.slotMinTime ?? "00:00:00"), o = se(e, s.slotMaxTime ?? "24:00:00"), i = Math.max(e.getTime(), n.getTime()), a = Math.min(t.getTime(), o.getTime());
538
- if (a <= i) return null;
539
- const l = Me / (r * 1e3);
538
+ const n = s.slotDuration ?? 1800, i = se(e, s.slotMinTime ?? "00:00:00"), r = se(e, s.slotMaxTime ?? "24:00:00"), o = Math.max(e.getTime(), i.getTime()), a = Math.min(t.getTime(), r.getTime());
539
+ if (a <= o) return null;
540
+ const l = Ce / (n * 1e3);
540
541
  return {
541
- top: (i - n.getTime()) * l,
542
- height: Math.max((a - i) * l, Ce)
542
+ top: (o - i.getTime()) * l,
543
+ height: Math.max((a - o) * l, Te)
543
544
  };
544
545
  }
545
546
  createElement(e, ...t) {
@@ -550,8 +551,8 @@ class K {
550
551
  * Helper to set data attributes
551
552
  */
552
553
  setData(e, t) {
553
- for (const [s, r] of Object.entries(t))
554
- e.dataset[s] = String(r);
554
+ for (const [s, n] of Object.entries(t))
555
+ e.dataset[s] = String(n);
555
556
  }
556
557
  clearContainer() {
557
558
  const e = !this.pendingScroll && (this.container.scrollLeft || this.container.scrollTop);
@@ -587,15 +588,15 @@ class K {
587
588
  * Position classes are per-view: ['top','bottom'] for time grids,
588
589
  * ['left','right'] for the timeline.
589
590
  */
590
- appendResizeHandles(e, t, [s, r] = ["top", "bottom"]) {
591
- const n = this.state.resolvedPermissions;
592
- t.isStart && j("start", { permissions: n, event: t.event }) && e.appendChild(this.createResizeHandle(s, "start")), t.isEnd && j("end", { permissions: n, event: t.event }) && e.appendChild(this.createResizeHandle(r, "end"));
591
+ appendResizeHandles(e, t, [s, n] = ["top", "bottom"]) {
592
+ const i = this.state.resolvedPermissions;
593
+ t.isStart && j("start", { permissions: i, event: t.event }) && e.appendChild(this.createResizeHandle(s, "start")), t.isEnd && j("end", { permissions: i, event: t.event }) && e.appendChild(this.createResizeHandle(n, "end"));
593
594
  }
594
595
  createResizeHandle(e, t) {
595
596
  const s = this.createElement("div", "resize-handle", e);
596
597
  this.setData(s, { handle: t });
597
- const r = this.createElement("span", "resize-glyph");
598
- return r.setAttribute("aria-hidden", "true"), s.appendChild(r), s;
598
+ const n = this.createElement("span", "resize-glyph");
599
+ return n.setAttribute("aria-hidden", "true"), s.appendChild(n), s;
599
600
  }
600
601
  /**
601
602
  * Retrofit the ARIA grid chain onto a rendered view (wc-aria PRD step 5.7):
@@ -612,14 +613,14 @@ class K {
612
613
  applyGridRoles(e) {
613
614
  const t = this.container;
614
615
  t.getAttribute("role") !== "grid" && t.setAttribute("role", "grid");
615
- const r = this.container.getRootNode().host?.getAttribute(
616
+ const n = this.container.getRootNode().host?.getAttribute(
616
617
  "aria-label"
617
618
  ) || e.label;
618
- r && t.setAttribute("aria-label", r), t.setAttribute("aria-describedby", "scheduler-kbd-grid"), e.multiselectable && t.setAttribute("aria-multiselectable", "true");
619
- const n = (o, i) => t.querySelectorAll(o).forEach((a) => {
620
- a.hasAttribute("role") || a.setAttribute("role", i);
619
+ n && t.setAttribute("aria-label", n), t.setAttribute("aria-describedby", "scheduler-kbd-grid"), e.multiselectable && t.setAttribute("aria-multiselectable", "true");
620
+ const i = (r, o) => t.querySelectorAll(r).forEach((a) => {
621
+ a.hasAttribute("role") || a.setAttribute("role", o);
621
622
  });
622
- e.columnHeaderRow && n(e.columnHeaderRow, "row"), e.columnHeaders && n(e.columnHeaders, "columnheader"), (e.presentation ?? []).forEach((o) => n(o, "presentation")), e.rows && n(e.rows, "row"), e.cells && n(e.cells, "gridcell");
623
+ e.columnHeaderRow && i(e.columnHeaderRow, "row"), e.columnHeaders && i(e.columnHeaders, "columnheader"), (e.presentation ?? []).forEach((r) => i(r, "presentation")), e.rows && i(e.rows, "row"), e.cells && i(e.cells, "gridcell");
623
624
  }
624
625
  /** aria-current="date" on every element the views styled `.today`. */
625
626
  markToday() {
@@ -632,13 +633,13 @@ class U extends K {
632
633
  }
633
634
  render() {
634
635
  this.clearContainer(), this.container.classList.add("scheduler-year-view");
635
- const { date: e, options: t } = this.state, s = h.getYearMonths(e), r = this.createElement("div", "scheduler-year-grid");
636
+ const { date: e, options: t } = this.state, s = h.getYearMonths(e), n = this.createElement("div", "scheduler-year-grid");
636
637
  this.monthCards.clear();
637
- for (const n of s) {
638
- const o = this.createMonthCard(n);
639
- r.appendChild(o);
638
+ for (const i of s) {
639
+ const r = this.createMonthCard(i);
640
+ n.appendChild(r);
640
641
  }
641
- this.container.appendChild(r), this.applyGridRoles({
642
+ this.container.appendChild(n), this.applyGridRoles({
642
643
  label: E(w(this.state.options.messages).yearGridLabel, {
643
644
  date: String(this.state.date.getFullYear())
644
645
  }),
@@ -656,38 +657,38 @@ class U extends K {
656
657
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`;
657
658
  }
658
659
  createMonthCard(e) {
659
- const { events: t, options: s } = this.state, r = this.createElement("div", "scheduler-year-month"), n = U.monthKey(e);
660
- r.setAttribute("role", "gridcell"), r.setAttribute("tabindex", "-1"), r.id = `scheduler-cell-y-${n}`, this.setData(r, { month: e.toISOString() }), this.monthCards.set(n, r);
661
- const o = this.createElement("div", "scheduler-year-month-header");
662
- o.textContent = h.getMonthName(e, s.locale), o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), this.setData(o, { month: e.toISOString() }), r.appendChild(o);
663
- const i = this.createElement("div", "scheduler-mini-month"), a = h.getMonthWeeks(e, this.firstDayOfWeek), l = a[0];
660
+ const { events: t, options: s } = this.state, n = this.createElement("div", "scheduler-year-month"), i = U.monthKey(e);
661
+ n.setAttribute("role", "gridcell"), n.setAttribute("tabindex", "-1"), n.id = `scheduler-cell-y-${i}`, this.setData(n, { month: e.toISOString() }), this.monthCards.set(i, n);
662
+ const r = this.createElement("div", "scheduler-year-month-header");
663
+ r.textContent = h.getMonthName(e, s.locale), r.setAttribute("role", "button"), r.setAttribute("tabindex", "0"), this.setData(r, { month: e.toISOString() }), n.appendChild(r);
664
+ const o = this.createElement("div", "scheduler-mini-month"), a = h.getMonthWeeks(e, this.firstDayOfWeek), l = a[0];
664
665
  for (const f of l) {
665
- const m = this.createElement("div", "scheduler-mini-day", "header");
666
- m.textContent = h.getDayName(f, s.locale, "narrow"), m.style.fontWeight = "600", m.style.color = "#666", i.appendChild(m);
666
+ const v = this.createElement("div", "scheduler-mini-day", "header");
667
+ v.textContent = h.getDayName(f, s.locale, "narrow"), v.style.fontWeight = "600", v.style.color = "#666", o.appendChild(v);
667
668
  }
668
- const d = h.getMonthStart(e), c = h.getMonthEnd(e), u = C.filterByRange(t, d, c), v = w(s.messages);
669
- r.setAttribute(
669
+ const d = h.getMonthStart(e), c = h.getMonthEnd(e), u = C.filterByRange(t, d, c), m = w(s.messages);
670
+ n.setAttribute(
670
671
  "aria-label",
671
- E(v.yearMonthCardLabel, {
672
+ E(m.yearMonthCardLabel, {
672
673
  month: `${h.getMonthName(e, s.locale)} ${e.getFullYear()}`,
673
674
  count: u.length,
674
- events: u.length === 1 ? v.eventSingular : v.eventPlural
675
+ events: u.length === 1 ? m.eventSingular : m.eventPlural
675
676
  })
676
677
  );
677
678
  const g = /* @__PURE__ */ new Set();
678
679
  for (const f of u) {
679
- const m = new Date(f.start);
680
- for (m.setHours(0, 0, 0, 0); m <= f.end; )
681
- g.add(m.toISOString().split("T")[0]), m.setDate(m.getDate() + 1);
680
+ const v = new Date(f.start);
681
+ for (v.setHours(0, 0, 0, 0); v <= f.end; )
682
+ g.add(v.toISOString().split("T")[0]), v.setDate(v.getDate() + 1);
682
683
  }
683
684
  for (const f of a)
684
- for (const m of f) {
685
+ for (const v of f) {
685
686
  const y = this.createElement("div", "scheduler-mini-day");
686
- y.textContent = String(m.getDate()), this.setData(y, { date: m.toISOString() }), h.isSameMonth(m, e) || y.classList.add("other-month"), h.isToday(m) && y.classList.add("today");
687
- const b = m.toISOString().split("T")[0];
688
- g.has(b) && y.classList.add("has-events"), i.appendChild(y);
687
+ y.textContent = String(v.getDate()), this.setData(y, { date: v.toISOString() }), h.isSameMonth(v, e) || y.classList.add("other-month"), h.isToday(v) && y.classList.add("today");
688
+ const b = v.toISOString().split("T")[0];
689
+ g.has(b) && y.classList.add("has-events"), o.appendChild(y);
689
690
  }
690
- return r.appendChild(i), r;
691
+ return n.appendChild(o), n;
691
692
  }
692
693
  /**
693
694
  * Apply roving tabindex based on `state.focusedDate`'s month. Year-view's
@@ -698,9 +699,9 @@ class U extends K {
698
699
  const e = this.state.focusedDate;
699
700
  let t = !1;
700
701
  const s = e ? U.monthKey(e) : null;
701
- for (const [r, n] of this.monthCards) {
702
- const o = r === s;
703
- n.setAttribute("tabindex", o ? "0" : "-1"), n.removeAttribute("aria-selected"), o && (t = !0);
702
+ for (const [n, i] of this.monthCards) {
703
+ const r = n === s;
704
+ i.setAttribute("tabindex", r ? "0" : "-1"), i.removeAttribute("aria-selected"), r && (t = !0);
704
705
  }
705
706
  t || this.monthCards.values().next().value?.setAttribute("tabindex", "0");
706
707
  }
@@ -731,22 +732,22 @@ class N extends K {
731
732
  }
732
733
  render() {
733
734
  this.clearContainer(), this.container.classList.add("scheduler-month-view");
734
- const { date: e, options: t } = this.state, s = h.getMonthWeeks(e, this.firstDayOfWeek), r = this.createElement("div", "scheduler-day-headers"), n = s[0];
735
- for (const i of n) {
735
+ const { date: e, options: t } = this.state, s = h.getMonthWeeks(e, this.firstDayOfWeek), n = this.createElement("div", "scheduler-day-headers"), i = s[0];
736
+ for (const o of i) {
736
737
  const a = this.createElement("div", "scheduler-day-header");
737
- a.textContent = h.getDayName(i, t.locale), r.appendChild(a);
738
+ a.textContent = h.getDayName(o, t.locale), n.appendChild(a);
738
739
  }
739
- this.container.appendChild(r);
740
- const o = this.createElement("div", "scheduler-month-grid");
741
- for (const i of s) {
740
+ this.container.appendChild(n);
741
+ const r = this.createElement("div", "scheduler-month-grid");
742
+ for (const o of s) {
742
743
  const a = this.createElement("div", "scheduler-month-week");
743
- for (const l of i) {
744
+ for (const l of o) {
744
745
  const d = this.createDayCell(l);
745
746
  a.appendChild(d);
746
747
  }
747
- o.appendChild(a);
748
+ r.appendChild(a);
748
749
  }
749
- this.container.appendChild(o), this.renderEvents(), this.updateDayCellFocus(), this.applyGridRoles({
750
+ this.container.appendChild(r), this.renderEvents(), this.updateDayCellFocus(), this.applyGridRoles({
750
751
  label: E(w(this.state.options.messages).monthGridLabel, {
751
752
  date: h.formatDate(this.state.date, this.state.options.locale, {
752
753
  month: "long",
@@ -766,17 +767,17 @@ class N extends K {
766
767
  * cell IDs would not match the visible day numbers.
767
768
  */
768
769
  static dayKey(e) {
769
- return de(e);
770
+ return le(e);
770
771
  }
771
772
  createDayCell(e) {
772
773
  const { date: t } = this.state, s = this.createElement("div", "scheduler-month-day");
773
774
  h.isSameMonth(e, t) || s.classList.add("other-month"), h.isToday(e) && s.classList.add("today");
774
- const r = N.dayKey(e);
775
- s.setAttribute("role", "gridcell"), s.setAttribute("tabindex", "-1"), s.id = `scheduler-cell-m-${r}`;
776
- const n = this.createElement("div", "day-number");
777
- n.textContent = String(e.getDate()), s.appendChild(n);
778
- const o = this.createElement("div", "month-events");
779
- return s.appendChild(o), this.dayCells.set(r, s), this.setData(s, { date: r }), s;
775
+ const n = N.dayKey(e);
776
+ s.setAttribute("role", "gridcell"), s.setAttribute("tabindex", "-1"), s.id = `scheduler-cell-m-${n}`;
777
+ const i = this.createElement("div", "day-number");
778
+ i.textContent = String(e.getDate()), s.appendChild(i);
779
+ const r = this.createElement("div", "month-events");
780
+ return s.appendChild(r), this.dayCells.set(n, s), this.setData(s, { date: n }), s;
780
781
  }
781
782
  /**
782
783
  * Apply roving tabindex based on `state.focusedDate`. The grid must always
@@ -787,46 +788,46 @@ class N extends K {
787
788
  const e = this.state.focusedDate;
788
789
  let t = !1;
789
790
  const s = e ? N.dayKey(e) : null;
790
- for (const [r, n] of this.dayCells) {
791
- const o = r === s;
792
- n.setAttribute("tabindex", o ? "0" : "-1"), n.removeAttribute("aria-selected"), o && (t = !0);
791
+ for (const [n, i] of this.dayCells) {
792
+ const r = n === s;
793
+ i.setAttribute("tabindex", r ? "0" : "-1"), i.removeAttribute("aria-selected"), r && (t = !0);
793
794
  }
794
- t || (Array.from(this.dayCells.values()).find((n) => n.classList.contains("today") && !n.classList.contains("other-month")) || Array.from(this.dayCells.values()).find((n) => !n.classList.contains("other-month")) || this.dayCells.values().next().value)?.setAttribute("tabindex", "0");
795
+ t || (Array.from(this.dayCells.values()).find((i) => i.classList.contains("today") && !i.classList.contains("other-month")) || Array.from(this.dayCells.values()).find((i) => !i.classList.contains("other-month")) || this.dayCells.values().next().value)?.setAttribute("tabindex", "0");
795
796
  }
796
797
  renderEvents() {
797
798
  const { date: e, events: t, options: s } = this.state;
798
799
  h.getMonthStart(e), h.getMonthEnd(e);
799
- const r = h.getMonthWeeks(e, this.firstDayOfWeek), n = r[0][0], o = r[r.length - 1][6];
800
- o.setHours(23, 59, 59, 999);
801
- const i = C.filterByRange(t, n, o), a = /* @__PURE__ */ new Map();
802
- for (const d of i) {
803
- const c = new Date(d.start), u = new Date(d.end), v = new Date(c);
804
- for (v.setHours(0, 0, 0, 0); v <= u; ) {
805
- const g = N.dayKey(v);
806
- a.has(g) || a.set(g, []), a.get(g).push(d), v.setDate(v.getDate() + 1);
800
+ const n = h.getMonthWeeks(e, this.firstDayOfWeek), i = n[0][0], r = n[n.length - 1][6];
801
+ r.setHours(23, 59, 59, 999);
802
+ const o = C.filterByRange(t, i, r), a = /* @__PURE__ */ new Map();
803
+ for (const d of o) {
804
+ const c = new Date(d.start), u = new Date(d.end), m = new Date(c);
805
+ for (m.setHours(0, 0, 0, 0); m <= u; ) {
806
+ const g = N.dayKey(m);
807
+ a.has(g) || a.set(g, []), a.get(g).push(d), m.setDate(m.getDate() + 1);
807
808
  }
808
809
  }
809
810
  const l = typeof s.dayMaxEvents == "number" ? s.dayMaxEvents : s.dayMaxEvents === !1 ? Number.POSITIVE_INFINITY : 3;
810
811
  for (const [d, c] of a) {
811
812
  const u = this.dayCells.get(d);
812
813
  if (!u) continue;
813
- const v = u.querySelector(".month-events");
814
- if (!v) continue;
815
- v.innerHTML = "";
814
+ const m = u.querySelector(".month-events");
815
+ if (!m) continue;
816
+ m.innerHTML = "";
816
817
  const g = c.slice(0, l), f = c.length - g.length;
817
- for (const m of g) {
818
+ for (const v of g) {
818
819
  const y = this.createElement("div", "scheduler-month-event");
819
- y.textContent = m.title, this.applyEventColors(y, m), y.setAttribute("role", "button"), y.setAttribute("tabindex", "0"), y.setAttribute("aria-label", W(m, null, this.state.options)), y.setAttribute(
820
+ y.textContent = v.title, this.applyEventColors(y, v), y.setAttribute("role", "button"), y.setAttribute("tabindex", "0"), y.setAttribute("aria-label", W(v, null, this.state.options)), y.setAttribute(
820
821
  "aria-pressed",
821
- String(this.state.selectedEvent?.id === m.id)
822
- ), y.setAttribute("aria-describedby", "scheduler-kbd-event"), this.setData(y, { eventId: m.id }), v.appendChild(y);
822
+ String(this.state.selectedEvent?.id === v.id)
823
+ ), y.setAttribute("aria-describedby", "scheduler-kbd-event"), this.setData(y, { eventId: v.id }), m.appendChild(y);
823
824
  }
824
825
  if (f > 0) {
825
- const m = this.createElement("div", "scheduler-more-link");
826
- m.textContent = E(
826
+ const v = this.createElement("div", "scheduler-more-link");
827
+ v.textContent = E(
827
828
  w(this.state.options.messages).moreEvents,
828
829
  { count: f }
829
- ), m.setAttribute("role", "button"), m.setAttribute("tabindex", "0"), this.setData(m, { date: d }), v.appendChild(m);
830
+ ), v.setAttribute("role", "button"), v.setAttribute("tabindex", "0"), this.setData(v, { date: d }), m.appendChild(v);
830
831
  }
831
832
  }
832
833
  }
@@ -845,37 +846,37 @@ class N extends K {
845
846
  this.dayCells.clear(), this.clearContainer();
846
847
  }
847
848
  }
848
- function re(p, e) {
849
+ function ne(p, e) {
849
850
  const t = new Date(p.start);
850
851
  t.setHours(0, 0, 0, 0);
851
- const s = p.start.getTime() - t.getTime(), r = p.end.getTime() - p.start.getTime(), n = new Date(e);
852
- n.setHours(0, 0, 0, 0);
853
- const o = n.getTime() + s;
854
- return { start: new Date(o), end: new Date(o + r) };
852
+ const s = p.start.getTime() - t.getTime(), n = p.end.getTime() - p.start.getTime(), i = new Date(e);
853
+ i.setHours(0, 0, 0, 0);
854
+ const r = i.getTime() + s;
855
+ return { start: new Date(r), end: new Date(r + n) };
855
856
  }
856
- class Te extends K {
857
+ class Ie extends K {
857
858
  constructor() {
858
859
  super(...arguments), this.dayColumns = [], this.eventElements = /* @__PURE__ */ new Map(), this.slotElements = /* @__PURE__ */ new Map();
859
860
  }
860
861
  render() {
861
862
  this.clearContainer(), this.container.classList.add("scheduler-week-view");
862
- const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek), r = this.createElement("div", "scheduler-day-headers"), n = this.createElement("div", "scheduler-time-gutter-space");
863
- n.style.width = "var(--scheduler-time-gutter-width)", r.appendChild(n);
863
+ const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek), n = this.createElement("div", "scheduler-day-headers"), i = this.createElement("div", "scheduler-time-gutter-space");
864
+ i.style.width = "var(--scheduler-time-gutter-width)", n.appendChild(i);
864
865
  for (const d of s) {
865
866
  const c = this.createElement("div", "scheduler-day-header");
866
867
  h.isToday(d) && c.classList.add("today");
867
868
  const u = this.createElement("div", "day-name");
868
869
  u.textContent = h.getDayName(d, t.locale);
869
- const v = this.createElement("div", "day-number");
870
- v.textContent = String(d.getDate()), v.setAttribute("role", "button"), v.setAttribute("tabindex", "0"), v.setAttribute(
870
+ const m = this.createElement("div", "day-number");
871
+ m.textContent = String(d.getDate()), m.setAttribute("role", "button"), m.setAttribute("tabindex", "0"), m.setAttribute(
871
872
  "aria-label",
872
873
  E(w(t.messages).openDayView, {
873
874
  date: h.formatDateWithWeekday(d, t.locale)
874
875
  })
875
- ), this.setData(v, { date: de(d) }), c.appendChild(u), c.appendChild(v), r.appendChild(c);
876
+ ), this.setData(m, { date: le(d) }), c.appendChild(u), c.appendChild(m), n.appendChild(c);
876
877
  }
877
- this.container.appendChild(r);
878
- const o = this.createElement("div", "scheduler-time-grid"), i = this.createElement("div", "scheduler-time-gutter"), a = h.getTimeSlots(
878
+ this.container.appendChild(n);
879
+ const r = this.createElement("div", "scheduler-time-grid"), o = this.createElement("div", "scheduler-time-gutter"), a = h.getTimeSlots(
879
880
  s[0],
880
881
  t.slotDuration,
881
882
  t.slotMinTime,
@@ -883,9 +884,9 @@ class Te extends K {
883
884
  );
884
885
  for (const d of a) {
885
886
  const c = this.createElement("div", "scheduler-time-slot-label");
886
- c.textContent = h.formatTime(d.start, t.timeFormat, t.locale), i.appendChild(c);
887
+ c.textContent = h.formatTime(d.start, t.timeFormat, t.locale), o.appendChild(c);
887
888
  }
888
- o.appendChild(i);
889
+ r.appendChild(o);
889
890
  const l = this.createElement("div", "scheduler-days-container");
890
891
  this.dayColumns = [];
891
892
  for (let d = 0; d < s.length; d++) {
@@ -895,23 +896,23 @@ class Te extends K {
895
896
  h.formatDateWithWeekday(c, t.locale)
896
897
  ), u.setAttribute("aria-rowindex", String(d + 2));
897
898
  for (let g = 0; g < a.length; g++) {
898
- const f = a[g], { start: m, end: y } = re(f, c), b = this.createElement("div", "scheduler-time-slot");
899
+ const f = a[g], { start: v, end: y } = ne(f, c), b = this.createElement("div", "scheduler-time-slot");
899
900
  b.setAttribute("role", "gridcell"), b.setAttribute("tabindex", "-1"), b.setAttribute("aria-selected", "false"), b.setAttribute(
900
901
  "aria-label",
901
- q({ start: m }, t)
902
+ q({ start: v }, t)
902
903
  ), b.setAttribute("aria-colindex", String(g + 2)), b.id = `scheduler-cell-w-${d}-${g}`, this.setData(b, {
903
904
  dayIndex: d,
904
905
  slotIndex: g,
905
- start: m.toISOString(),
906
+ start: v.toISOString(),
906
907
  end: y.toISOString()
907
908
  });
908
909
  const M = `${d}-${g}`;
909
910
  this.slotElements.set(M, b), u.appendChild(b);
910
911
  }
911
- const v = this.createElement("div", "scheduler-events-container");
912
- u.appendChild(v), this.dayColumns.push(u), l.appendChild(u);
912
+ const m = this.createElement("div", "scheduler-events-container");
913
+ u.appendChild(m), this.dayColumns.push(u), l.appendChild(u);
913
914
  }
914
- o.appendChild(l), this.container.appendChild(o), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderNowIndicator(s, a), this.applyGridRoles({
915
+ r.appendChild(l), this.container.appendChild(r), this.renderEvents(), this.updateCellFocusAndSelection(), this.renderNowIndicator(s, a), this.applyGridRoles({
915
916
  label: E(w(this.state.options.messages).weekGridLabel, {
916
917
  date: h.formatDateWithWeekday(
917
918
  h.getWeekStart(this.state.date, this.firstDayOfWeek),
@@ -937,12 +938,12 @@ class Te extends K {
937
938
  }), this.markToday();
938
939
  }
939
940
  update(e) {
940
- const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options), r = this.state.selectedEvent?.id !== e.selectedEvent?.id;
941
+ const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options), n = this.state.selectedEvent?.id !== e.selectedEvent?.id;
941
942
  if (this.state = e, t || s) {
942
943
  this.render();
943
944
  return;
944
945
  }
945
- this.updateGreyedSlots(), r ? this.renderEvents() : this.renderEvents(), this.updateCellFocusAndSelection(), this.renderPreviewEvent();
946
+ this.updateGreyedSlots(), n ? this.renderEvents() : this.renderEvents(), this.updateCellFocusAndSelection(), this.renderPreviewEvent();
946
947
  }
947
948
  /**
948
949
  * Apply roving tabindex and aria-selected to each cached slot element. Also
@@ -954,14 +955,14 @@ class Te extends K {
954
955
  updateCellFocusAndSelection() {
955
956
  const e = this.state.focusedCell;
956
957
  let t = !1, s = null;
957
- for (const [, r] of this.slotElements) {
958
- s || (s = r);
959
- const n = r.dataset.start, o = r.dataset.end;
960
- if (!n || !o) continue;
961
- const i = { start: new Date(n), end: new Date(o) }, a = !!e && i.start.getTime() === e.start.getTime();
962
- r.setAttribute("tabindex", a ? "0" : "-1");
963
- const l = Z(i, this.state, null);
964
- r.setAttribute("aria-selected", l ? "true" : "false"), r.classList.toggle("selected", l), a && (t = !0);
958
+ for (const [, n] of this.slotElements) {
959
+ s || (s = n);
960
+ const i = n.dataset.start, r = n.dataset.end;
961
+ if (!i || !r) continue;
962
+ const o = { start: new Date(i), end: new Date(r) }, a = !!e && o.start.getTime() === e.start.getTime();
963
+ n.setAttribute("tabindex", a ? "0" : "-1");
964
+ const l = Z(o, this.state, null);
965
+ n.setAttribute("aria-selected", l ? "true" : "false"), n.classList.toggle("selected", l), a && (t = !0);
965
966
  }
966
967
  !t && s && s.setAttribute("tabindex", "0");
967
968
  }
@@ -969,51 +970,51 @@ class Te extends K {
969
970
  return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.firstDayOfWeek !== t.firstDayOfWeek || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
970
971
  }
971
972
  renderEvents() {
972
- const { date: e, events: t, options: s } = this.state, r = h.getWeekDays(e, this.firstDayOfWeek), n = r[0], o = new Date(r[6]);
973
- o.setHours(23, 59, 59, 999);
974
- const i = C.filterByRange(t, n, o), a = [];
975
- for (const c of i) {
973
+ const { date: e, events: t, options: s } = this.state, n = h.getWeekDays(e, this.firstDayOfWeek), i = n[0], r = new Date(n[6]);
974
+ r.setHours(23, 59, 59, 999);
975
+ const o = C.filterByRange(t, i, r), a = [];
976
+ for (const c of o) {
976
977
  const { parts: u } = C.splitInParts(c);
977
978
  a.push(...u);
978
979
  }
979
- const l = C.filterPartsByRange(a, n, o), d = C.getTimelinedParts(l);
980
+ const l = C.filterPartsByRange(a, i, r), d = C.getTimelinedParts(l);
980
981
  this.eventElements.forEach((c) => c.remove()), this.eventElements.clear();
981
- for (const { part: c, trackIndex: u, totalTracks: v, colspan: g } of d) {
982
+ for (const { part: c, trackIndex: u, totalTracks: m, colspan: g } of d) {
982
983
  if (!c.event) continue;
983
- const f = r.findIndex((M) => h.isSameDay(M, c.start));
984
+ const f = n.findIndex((M) => h.isSameDay(M, c.start));
984
985
  if (f === -1) continue;
985
986
  const y = this.dayColumns[f].querySelector(".scheduler-events-container");
986
987
  if (!y) continue;
987
988
  const b = this.createEventElement(
988
989
  c,
989
990
  u,
990
- v,
991
+ m,
991
992
  g,
992
993
  s.slotDuration ?? 1800
993
994
  );
994
995
  y.appendChild(b), this.eventElements.set(c.id, b);
995
996
  }
996
997
  }
997
- createEventElement(e, t, s, r, n) {
998
- const o = e.event, i = this.createElement("div", "scheduler-event"), a = this.state.selectedEvent?.id === o.id;
999
- this.state.keyboardMoveEventId, o.id, i.setAttribute("role", "button"), i.setAttribute("tabindex", "0"), i.setAttribute(
998
+ createEventElement(e, t, s, n, i) {
999
+ const r = e.event, o = this.createElement("div", "scheduler-event"), a = this.state.selectedEvent?.id === r.id;
1000
+ this.state.keyboardMoveEventId, r.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
1000
1001
  "aria-label",
1001
- W(o, null, this.state.options)
1002
- ), i.setAttribute("aria-pressed", a ? "true" : "false"), i.setAttribute("aria-describedby", "scheduler-kbd-event"), a && i.classList.add("selected");
1002
+ W(r, null, this.state.options)
1003
+ ), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
1003
1004
  const l = this.partGeometry(e.start, e.end, {
1004
1005
  ...this.state.options,
1005
- slotDuration: n
1006
- }), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, v = r / s * 100;
1007
- i.style.top = `${d}px`, i.style.height = `${c}px`, i.style.left = `${u}%`, i.style.width = `calc(${v}% - 2px)`, this.applyEventColors(i, o), this.setData(i, { eventId: o.id });
1006
+ slotDuration: i
1007
+ }), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, m = n / s * 100;
1008
+ o.style.top = `${d}px`, o.style.height = `${c}px`, o.style.left = `${u}%`, o.style.width = `calc(${m}% - 2px)`, this.applyEventColors(o, r), this.setData(o, { eventId: r.id });
1008
1009
  const g = this.createElement("div", "event-content"), f = this.createElement("div", "event-title");
1009
- f.textContent = o.title, g.appendChild(f);
1010
- const m = this.createElement("div", "event-time");
1011
- return m.textContent = h.formatTimeRange(
1010
+ f.textContent = r.title, g.appendChild(f);
1011
+ const v = this.createElement("div", "event-time");
1012
+ return v.textContent = h.formatTimeRange(
1012
1013
  e.start,
1013
1014
  e.end,
1014
1015
  this.state.options.timeFormat,
1015
1016
  this.state.options.locale
1016
- ), g.appendChild(m), i.appendChild(g), this.appendResizeHandles(i, e), i;
1017
+ ), g.appendChild(v), o.appendChild(g), this.appendResizeHandles(o, e), o;
1017
1018
  }
1018
1019
  /**
1019
1020
  * Dashed ghost showing where the dragged/created range will land — ONE box per
@@ -1022,36 +1023,36 @@ class Te extends K {
1022
1023
  * box hanging out of the first column for a 3-day range.
1023
1024
  */
1024
1025
  renderPreviewEvent() {
1025
- this.container.querySelectorAll(".scheduler-event.preview").forEach((o) => o.remove());
1026
+ this.container.querySelectorAll(".scheduler-event.preview").forEach((r) => r.remove());
1026
1027
  const { previewEvent: e, options: t, date: s } = this.state;
1027
1028
  if (!e) return;
1028
- const r = h.getWeekDays(s, this.firstDayOfWeek), { parts: n } = C.splitInParts(e);
1029
- for (const o of n) {
1030
- const i = r.findIndex((c) => h.isSameDay(c, o.start));
1031
- if (i === -1) continue;
1032
- const a = this.dayColumns[i]?.querySelector(".scheduler-events-container");
1029
+ const n = h.getWeekDays(s, this.firstDayOfWeek), { parts: i } = C.splitInParts(e);
1030
+ for (const r of i) {
1031
+ const o = n.findIndex((c) => h.isSameDay(c, r.start));
1032
+ if (o === -1) continue;
1033
+ const a = this.dayColumns[o]?.querySelector(".scheduler-events-container");
1033
1034
  if (!a) continue;
1034
- const l = this.partGeometry(o.start, o.end, t);
1035
+ const l = this.partGeometry(r.start, r.end, t);
1035
1036
  if (!l) continue;
1036
1037
  const d = this.createElement("div", "scheduler-event", "preview");
1037
- o.isStart || d.classList.add("preview-continues-before"), o.isEnd || d.classList.add("preview-continues-after"), d.style.top = `${l.top}px`, d.style.height = `${l.height}px`, d.style.left = "0", d.style.width = "100%", a.appendChild(d);
1038
+ r.isStart || d.classList.add("preview-continues-before"), r.isEnd || d.classList.add("preview-continues-after"), d.style.top = `${l.top}px`, d.style.height = `${l.height}px`, d.style.left = "0", d.style.width = "100%", a.appendChild(d);
1038
1039
  }
1039
1040
  }
1040
1041
  updateGreyedSlots() {
1041
- const { dragState: e, previewEvent: t, options: s, date: r } = this.state;
1042
- if (this.slotElements.forEach((i) => i.classList.remove("greyed")), !e || !t) return;
1043
- const n = h.getWeekDays(r, this.firstDayOfWeek), o = h.getTimeSlots(
1044
- n[0],
1042
+ const { dragState: e, previewEvent: t, options: s, date: n } = this.state;
1043
+ if (this.slotElements.forEach((o) => o.classList.remove("greyed")), !e || !t) return;
1044
+ const i = h.getWeekDays(n, this.firstDayOfWeek), r = h.getTimeSlots(
1045
+ i[0],
1045
1046
  s.slotDuration,
1046
1047
  s.slotMinTime,
1047
1048
  s.slotMaxTime
1048
1049
  );
1049
- for (let i = 0; i < n.length; i++) {
1050
- const a = n[i];
1051
- for (let l = 0; l < o.length; l++) {
1052
- const d = o[l], { start: c, end: u } = re(d, a);
1050
+ for (let o = 0; o < i.length; o++) {
1051
+ const a = i[o];
1052
+ for (let l = 0; l < r.length; l++) {
1053
+ const d = r[l], { start: c, end: u } = ne(d, a);
1053
1054
  if (c < t.end && u > t.start) {
1054
- const v = `${i}-${l}`, g = this.slotElements.get(v);
1055
+ const m = `${o}-${l}`, g = this.slotElements.get(m);
1055
1056
  g && g.classList.add("greyed");
1056
1057
  }
1057
1058
  }
@@ -1059,54 +1060,54 @@ class Te extends K {
1059
1060
  }
1060
1061
  renderNowIndicator(e, t) {
1061
1062
  if (!this.state.options.nowIndicator) return;
1062
- const s = /* @__PURE__ */ new Date(), r = e.findIndex((c) => h.isSameDay(c, s));
1063
- if (r === -1) return;
1064
- const n = this.dayColumns[r];
1065
- if (!n) return;
1066
- const o = new Date(s);
1067
- o.setHours(0, 0, 0, 0);
1068
- const i = (s.getTime() - o.getTime()) / (1e3 * 60), a = (this.state.options.slotDuration ?? 1800) / 60, l = i / a * 40, d = this.createElement("div", "scheduler-now-indicator");
1069
- d.style.top = `${l}px`, n.appendChild(d);
1063
+ const s = /* @__PURE__ */ new Date(), n = e.findIndex((c) => h.isSameDay(c, s));
1064
+ if (n === -1) return;
1065
+ const i = this.dayColumns[n];
1066
+ if (!i) return;
1067
+ const r = new Date(s);
1068
+ r.setHours(0, 0, 0, 0);
1069
+ const o = (s.getTime() - r.getTime()) / (1e3 * 60), a = (this.state.options.slotDuration ?? 1800) / 60, l = o / a * 40, d = this.createElement("div", "scheduler-now-indicator");
1070
+ d.style.top = `${l}px`, i.appendChild(d);
1070
1071
  }
1071
1072
  updateNowIndicator() {
1072
1073
  if (!this.state.options.nowIndicator) return;
1073
- const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek), r = /* @__PURE__ */ new Date(), n = s.findIndex((u) => h.isSameDay(u, r));
1074
- if (n === -1) return;
1075
- const o = this.dayColumns[n];
1076
- if (!o) return;
1077
- const i = o.querySelector(".scheduler-now-indicator"), a = new Date(r);
1074
+ const { date: e, options: t } = this.state, s = h.getWeekDays(e, this.firstDayOfWeek), n = /* @__PURE__ */ new Date(), i = s.findIndex((u) => h.isSameDay(u, n));
1075
+ if (i === -1) return;
1076
+ const r = this.dayColumns[i];
1077
+ if (!r) return;
1078
+ const o = r.querySelector(".scheduler-now-indicator"), a = new Date(n);
1078
1079
  a.setHours(0, 0, 0, 0);
1079
- const l = (r.getTime() - a.getTime()) / (1e3 * 60), d = (t.slotDuration ?? 1800) / 60, c = l / d * 40;
1080
- if (i)
1081
- i.style.top = `${c}px`;
1080
+ const l = (n.getTime() - a.getTime()) / (1e3 * 60), d = (t.slotDuration ?? 1800) / 60, c = l / d * 40;
1081
+ if (o)
1082
+ o.style.top = `${c}px`;
1082
1083
  else {
1083
1084
  const u = this.createElement("div", "scheduler-now-indicator");
1084
- u.style.top = `${c}px`, o.appendChild(u);
1085
+ u.style.top = `${c}px`, r.appendChild(u);
1085
1086
  }
1086
1087
  }
1087
1088
  destroy() {
1088
1089
  this.eventElements.clear(), this.slotElements.clear(), this.dayColumns = [], this.clearContainer();
1089
1090
  }
1090
1091
  }
1091
- class Ie extends K {
1092
+ class Ae extends K {
1092
1093
  constructor() {
1093
1094
  super(...arguments), this.eventsContainer = null, this.slotElements = /* @__PURE__ */ new Map(), this.dayColumn = null;
1094
1095
  }
1095
1096
  render() {
1096
1097
  this.clearContainer(), this.container.classList.add("scheduler-day-view");
1097
- const { date: e, options: t } = this.state, s = this.createElement("div", "scheduler-day-headers"), r = this.createElement("div", "scheduler-time-gutter-space");
1098
- r.style.width = "var(--scheduler-time-gutter-width)", s.appendChild(r);
1099
- const n = this.createElement("div", "scheduler-day-header");
1100
- h.isToday(e) && n.classList.add("today");
1101
- const o = this.createElement("div", "day-name");
1102
- o.textContent = h.getDayName(e, t.locale);
1103
- const i = this.createElement("div", "day-number");
1104
- i.textContent = String(e.getDate());
1098
+ const { date: e, options: t } = this.state, s = this.createElement("div", "scheduler-day-headers"), n = this.createElement("div", "scheduler-time-gutter-space");
1099
+ n.style.width = "var(--scheduler-time-gutter-width)", s.appendChild(n);
1100
+ const i = this.createElement("div", "scheduler-day-header");
1101
+ h.isToday(e) && i.classList.add("today");
1102
+ const r = this.createElement("div", "day-name");
1103
+ r.textContent = h.getDayName(e, t.locale);
1104
+ const o = this.createElement("div", "day-number");
1105
+ o.textContent = String(e.getDate());
1105
1106
  const a = this.createElement("div", "month-year");
1106
1107
  a.textContent = h.formatDate(e, t.locale, {
1107
1108
  month: "long",
1108
1109
  year: "numeric"
1109
- }), a.style.fontSize = "12px", a.style.color = "#666", n.appendChild(o), n.appendChild(i), n.appendChild(a), s.appendChild(n), this.container.appendChild(s);
1110
+ }), a.style.fontSize = "12px", a.style.color = "#666", i.appendChild(r), i.appendChild(o), i.appendChild(a), s.appendChild(i), this.container.appendChild(s);
1110
1111
  const l = this.createElement("div", "scheduler-time-grid"), d = this.createElement("div", "scheduler-time-gutter"), c = h.getTimeSlots(
1111
1112
  e,
1112
1113
  t.slotDuration,
@@ -1120,16 +1121,16 @@ class Ie extends K {
1120
1121
  l.appendChild(d);
1121
1122
  const u = this.createElement("div", "scheduler-days-container");
1122
1123
  this.dayColumn = this.createElement("div", "scheduler-day-column");
1123
- const v = this.dayColumn;
1124
+ const m = this.dayColumn;
1124
1125
  for (let g = 0; g < c.length; g++) {
1125
- const f = c[g], m = this.createElement("div", "scheduler-time-slot");
1126
- m.setAttribute("role", "gridcell"), m.setAttribute("tabindex", "-1"), m.setAttribute("aria-selected", "false"), m.setAttribute("aria-label", q(f, t)), m.id = `scheduler-cell-d-${g}`, this.setData(m, {
1126
+ const f = c[g], v = this.createElement("div", "scheduler-time-slot");
1127
+ v.setAttribute("role", "gridcell"), v.setAttribute("tabindex", "-1"), v.setAttribute("aria-selected", "false"), v.setAttribute("aria-label", q(f, t)), v.id = `scheduler-cell-d-${g}`, this.setData(v, {
1127
1128
  slotIndex: g,
1128
1129
  start: f.start.toISOString(),
1129
1130
  end: f.end.toISOString()
1130
- }), this.slotElements.set(g, m), v.appendChild(m);
1131
+ }), this.slotElements.set(g, v), m.appendChild(v);
1131
1132
  }
1132
- this.eventsContainer = this.createElement("div", "scheduler-events-container"), v.appendChild(this.eventsContainer), u.appendChild(v), l.appendChild(u), this.container.appendChild(l), this.renderEvents(), this.updateCellFocusAndSelection(), h.isToday(e) && t.nowIndicator && this.renderNowIndicator(v), this.applyGridRoles({
1133
+ this.eventsContainer = this.createElement("div", "scheduler-events-container"), m.appendChild(this.eventsContainer), u.appendChild(m), l.appendChild(u), this.container.appendChild(l), this.renderEvents(), this.updateCellFocusAndSelection(), h.isToday(e) && t.nowIndicator && this.renderNowIndicator(m), this.applyGridRoles({
1133
1134
  label: E(w(this.state.options.messages).dayGridLabel, {
1134
1135
  date: h.formatDateWithWeekday(this.state.date, this.state.options.locale)
1135
1136
  }),
@@ -1158,75 +1159,75 @@ class Ie extends K {
1158
1159
  updateCellFocusAndSelection() {
1159
1160
  const e = this.state.focusedCell;
1160
1161
  let t = !1, s = null;
1161
- for (const [, r] of this.slotElements) {
1162
- s || (s = r);
1163
- const n = r.dataset.start, o = r.dataset.end;
1164
- if (!n || !o) continue;
1165
- const i = { start: new Date(n), end: new Date(o) }, a = !!e && i.start.getTime() === e.start.getTime();
1166
- r.setAttribute("tabindex", a ? "0" : "-1");
1167
- const l = Z(i, this.state, null);
1168
- r.setAttribute("aria-selected", l ? "true" : "false"), r.classList.toggle("selected", l), a && (t = !0);
1162
+ for (const [, n] of this.slotElements) {
1163
+ s || (s = n);
1164
+ const i = n.dataset.start, r = n.dataset.end;
1165
+ if (!i || !r) continue;
1166
+ const o = { start: new Date(i), end: new Date(r) }, a = !!e && o.start.getTime() === e.start.getTime();
1167
+ n.setAttribute("tabindex", a ? "0" : "-1");
1168
+ const l = Z(o, this.state, null);
1169
+ n.setAttribute("aria-selected", l ? "true" : "false"), n.classList.toggle("selected", l), a && (t = !0);
1169
1170
  }
1170
1171
  !t && s && s.setAttribute("tabindex", "0");
1171
1172
  }
1172
1173
  renderEvents() {
1173
1174
  if (!this.eventsContainer) return;
1174
1175
  this.eventsContainer.innerHTML = "";
1175
- const { date: e, events: t, options: s } = this.state, r = new Date(e);
1176
- r.setHours(0, 0, 0, 0);
1177
- const n = new Date(e);
1178
- n.setHours(23, 59, 59, 999);
1179
- const o = C.filterByRange(t, r, n), i = [];
1180
- for (const l of o) {
1181
- const { parts: d } = C.splitInParts(l), c = C.filterPartsByRange(d, r, n);
1182
- i.push(...c);
1176
+ const { date: e, events: t, options: s } = this.state, n = new Date(e);
1177
+ n.setHours(0, 0, 0, 0);
1178
+ const i = new Date(e);
1179
+ i.setHours(23, 59, 59, 999);
1180
+ const r = C.filterByRange(t, n, i), o = [];
1181
+ for (const l of r) {
1182
+ const { parts: d } = C.splitInParts(l), c = C.filterPartsByRange(d, n, i);
1183
+ o.push(...c);
1183
1184
  }
1184
- const a = C.getTimelinedParts(i);
1185
+ const a = C.getTimelinedParts(o);
1185
1186
  for (const { part: l, trackIndex: d, totalTracks: c, colspan: u } of a) {
1186
1187
  if (!l.event) continue;
1187
- const v = this.createEventElement(
1188
+ const m = this.createEventElement(
1188
1189
  l,
1189
1190
  d,
1190
1191
  c,
1191
1192
  u,
1192
1193
  s.slotDuration ?? 1800
1193
1194
  );
1194
- this.eventsContainer.appendChild(v);
1195
+ this.eventsContainer.appendChild(m);
1195
1196
  }
1196
1197
  }
1197
- createEventElement(e, t, s, r, n) {
1198
- const o = e.event, i = this.createElement("div", "scheduler-event"), a = this.state.selectedEvent?.id === o.id;
1199
- this.state.keyboardMoveEventId, o.id, i.setAttribute("role", "button"), i.setAttribute("tabindex", "0"), i.setAttribute(
1198
+ createEventElement(e, t, s, n, i) {
1199
+ const r = e.event, o = this.createElement("div", "scheduler-event"), a = this.state.selectedEvent?.id === r.id;
1200
+ this.state.keyboardMoveEventId, r.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
1200
1201
  "aria-label",
1201
- W(o, null, this.state.options)
1202
- ), i.setAttribute("aria-pressed", a ? "true" : "false"), i.setAttribute("aria-describedby", "scheduler-kbd-event"), a && i.classList.add("selected");
1202
+ W(r, null, this.state.options)
1203
+ ), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
1203
1204
  const l = this.partGeometry(e.start, e.end, {
1204
1205
  ...this.state.options,
1205
- slotDuration: n
1206
- }), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, v = r / s * 100;
1207
- i.style.top = `${d}px`, i.style.height = `${c}px`, i.style.left = `${u}%`, i.style.width = `calc(${v}% - 2px)`, this.applyEventColors(i, o), this.setData(i, { eventId: o.id });
1206
+ slotDuration: i
1207
+ }), { top: d, height: c } = l ?? { top: 0, height: 0 }, u = t / s * 100, m = n / s * 100;
1208
+ o.style.top = `${d}px`, o.style.height = `${c}px`, o.style.left = `${u}%`, o.style.width = `calc(${m}% - 2px)`, this.applyEventColors(o, r), this.setData(o, { eventId: r.id });
1208
1209
  const g = this.createElement("div", "event-content"), f = this.createElement("div", "event-title");
1209
- f.textContent = o.title, g.appendChild(f);
1210
- const m = this.createElement("div", "event-time");
1211
- return m.textContent = h.formatTimeRange(
1210
+ f.textContent = r.title, g.appendChild(f);
1211
+ const v = this.createElement("div", "event-time");
1212
+ return v.textContent = h.formatTimeRange(
1212
1213
  e.start,
1213
1214
  e.end,
1214
1215
  this.state.options.timeFormat,
1215
1216
  this.state.options.locale
1216
- ), g.appendChild(m), i.appendChild(g), this.appendResizeHandles(i, e), i;
1217
+ ), g.appendChild(v), o.appendChild(g), this.appendResizeHandles(o, e), o;
1217
1218
  }
1218
1219
  renderNowIndicator(e) {
1219
1220
  const t = /* @__PURE__ */ new Date(), s = new Date(t);
1220
1221
  s.setHours(0, 0, 0, 0);
1221
- const r = (t.getTime() - s.getTime()) / (1e3 * 60), n = (this.state.options.slotDuration ?? 1800) / 60, o = r / n * 40, i = this.createElement("div", "scheduler-now-indicator");
1222
- i.style.top = `${o}px`, e.appendChild(i);
1222
+ const n = (t.getTime() - s.getTime()) / (1e3 * 60), i = (this.state.options.slotDuration ?? 1800) / 60, r = n / i * 40, o = this.createElement("div", "scheduler-now-indicator");
1223
+ o.style.top = `${r}px`, e.appendChild(o);
1223
1224
  }
1224
1225
  updateNowIndicator() {
1225
1226
  if (!this.dayColumn || !this.state.options.nowIndicator || !h.isToday(this.state.date)) return;
1226
1227
  const e = this.dayColumn.querySelector(".scheduler-now-indicator"), t = /* @__PURE__ */ new Date(), s = new Date(t);
1227
1228
  s.setHours(0, 0, 0, 0);
1228
- const r = (t.getTime() - s.getTime()) / (1e3 * 60), n = (this.state.options.slotDuration ?? 1800) / 60, o = r / n * 40;
1229
- e ? e.style.top = `${o}px` : this.renderNowIndicator(this.dayColumn);
1229
+ const n = (t.getTime() - s.getTime()) / (1e3 * 60), i = (this.state.options.slotDuration ?? 1800) / 60, r = n / i * 40;
1230
+ e ? e.style.top = `${r}px` : this.renderNowIndicator(this.dayColumn);
1230
1231
  }
1231
1232
  update(e) {
1232
1233
  const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options);
@@ -1240,18 +1241,18 @@ class Ie extends K {
1240
1241
  return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
1241
1242
  }
1242
1243
  updateGreyedSlots() {
1243
- const { dragState: e, previewEvent: t, options: s, date: r } = this.state;
1244
- if (this.slotElements.forEach((o) => o.classList.remove("greyed")), !e || !t) return;
1245
- const n = h.getTimeSlots(
1246
- r,
1244
+ const { dragState: e, previewEvent: t, options: s, date: n } = this.state;
1245
+ if (this.slotElements.forEach((r) => r.classList.remove("greyed")), !e || !t) return;
1246
+ const i = h.getTimeSlots(
1247
+ n,
1247
1248
  s.slotDuration,
1248
1249
  s.slotMinTime,
1249
1250
  s.slotMaxTime
1250
1251
  );
1251
- for (let o = 0; o < n.length; o++) {
1252
- const i = n[o];
1253
- if (i.start < t.end && i.end > t.start) {
1254
- const a = this.slotElements.get(o);
1252
+ for (let r = 0; r < i.length; r++) {
1253
+ const o = i[r];
1254
+ if (o.start < t.end && o.end > t.start) {
1255
+ const a = this.slotElements.get(r);
1255
1256
  a && a.classList.add("greyed");
1256
1257
  }
1257
1258
  }
@@ -1267,12 +1268,12 @@ class Ie extends K {
1267
1268
  this.eventsContainer.querySelectorAll(".scheduler-event.preview").forEach((a) => a.remove());
1268
1269
  const { previewEvent: e, options: t, date: s } = this.state;
1269
1270
  if (!e) return;
1270
- const { parts: r } = C.splitInParts(e), n = r.find((a) => h.isSameDay(s, a.start));
1271
- if (!n) return;
1272
- const o = this.partGeometry(n.start, n.end, t);
1273
- if (!o) return;
1274
- const i = this.createElement("div", "scheduler-event", "preview");
1275
- n.isStart || i.classList.add("preview-continues-before"), n.isEnd || i.classList.add("preview-continues-after"), i.style.top = `${o.top}px`, i.style.height = `${o.height}px`, i.style.left = "0", i.style.width = "100%", this.eventsContainer.appendChild(i);
1271
+ const { parts: n } = C.splitInParts(e), i = n.find((a) => h.isSameDay(s, a.start));
1272
+ if (!i) return;
1273
+ const r = this.partGeometry(i.start, i.end, t);
1274
+ if (!r) return;
1275
+ const o = this.createElement("div", "scheduler-event", "preview");
1276
+ i.isStart || o.classList.add("preview-continues-before"), i.isEnd || o.classList.add("preview-continues-after"), o.style.top = `${r.top}px`, o.style.height = `${r.height}px`, o.style.left = "0", o.style.width = "100%", this.eventsContainer.appendChild(o);
1276
1277
  }
1277
1278
  destroy() {
1278
1279
  this.eventsContainer = null, this.dayColumn = null, this.slotElements.clear(), this.clearContainer();
@@ -1302,9 +1303,9 @@ class I extends K {
1302
1303
  * the way week/day must (there, height IS duration).
1303
1304
  */
1304
1305
  get trackMetrics() {
1305
- const e = getComputedStyle(this.container), t = (s, r) => {
1306
- const n = Number.parseFloat(e.getPropertyValue(s).trim());
1307
- return Number.isFinite(n) && n >= 0 ? n : r;
1306
+ const e = getComputedStyle(this.container), t = (s, n) => {
1307
+ const i = Number.parseFloat(e.getPropertyValue(s).trim());
1308
+ return Number.isFinite(i) && i >= 0 ? i : n;
1308
1309
  };
1309
1310
  return {
1310
1311
  height: t("--scheduler-timeline-event-height", 28),
@@ -1314,31 +1315,31 @@ class I extends K {
1314
1315
  }
1315
1316
  render() {
1316
1317
  this.captureActionFocus(), this.clearContainer(), this.container.classList.add("scheduler-timeline-view");
1317
- const { date: e, options: t, resources: s, collapsedGroups: r } = this.state, n = h.getWeekDays(e, this.firstDayOfWeek), o = n.map(
1318
+ const { date: e, options: t, resources: s, collapsedGroups: n } = this.state, i = h.getWeekDays(e, this.firstDayOfWeek), r = i.map(
1318
1319
  (D) => h.getTimeSlots(D, t.slotDuration, t.slotMinTime, t.slotMaxTime)
1319
- ), i = o.reduce((D, T) => D + T.length, 0), a = O.flatten(s, r), l = this.hasUnassignedRow(this.state), d = a.filter((D) => D.visible).length + 2 + (l ? 1 : 0), c = this.createElement("div", "scheduler-timeline");
1320
+ ), o = r.reduce((D, T) => D + T.length, 0), a = O.flatten(s, n), l = this.hasUnassignedRow(this.state), d = a.filter((D) => D.visible).length + 2 + (l ? 1 : 0), c = this.createElement("div", "scheduler-timeline");
1320
1321
  c.setAttribute("role", "grid"), c.setAttribute(
1321
1322
  "aria-label",
1322
1323
  E(w(t.messages).timelineGridLabel, {
1323
- date: h.formatDateWithWeekday(n[0], t.locale)
1324
+ date: h.formatDateWithWeekday(i[0], t.locale)
1324
1325
  })
1325
- ), c.setAttribute("aria-rowcount", String(d)), c.setAttribute("aria-colcount", String(1 + i)), c.setAttribute("aria-describedby", "scheduler-kbd-grid"), c.setAttribute("aria-multiselectable", "true");
1326
+ ), c.setAttribute("aria-rowcount", String(d)), c.setAttribute("aria-colcount", String(1 + o)), c.setAttribute("aria-describedby", "scheduler-kbd-grid"), c.setAttribute("aria-multiselectable", "true");
1326
1327
  const u = this.createElement("div", "scheduler-timeline-header");
1327
1328
  u.setAttribute("role", "row"), u.setAttribute("aria-rowindex", "1");
1328
- const v = this.createElement("div", "scheduler-resource-header");
1329
- v.setAttribute("role", "columnheader"), v.setAttribute("aria-colindex", "1"), v.textContent = w(this.state.options.messages).resourcesHeader, v.appendChild(this.createColumnResizer()), u.appendChild(v);
1329
+ const m = this.createElement("div", "scheduler-resource-header");
1330
+ m.setAttribute("role", "columnheader"), m.setAttribute("aria-colindex", "1"), m.textContent = w(this.state.options.messages).resourcesHeader, m.appendChild(this.createColumnResizer()), u.appendChild(m);
1330
1331
  const g = this.createElement("div", "scheduler-timeline-slots-header");
1331
1332
  g.setAttribute("role", "presentation");
1332
1333
  let f = 2;
1333
- for (const [D, T] of n.entries()) {
1334
- const V = o[D].length, P = this.createElement("div", "scheduler-timeline-slot-header", "day");
1334
+ for (const [D, T] of i.entries()) {
1335
+ const V = r[D].length, P = this.createElement("div", "scheduler-timeline-slot-header", "day");
1335
1336
  P.setAttribute("role", "columnheader"), P.setAttribute("aria-colindex", String(f)), P.setAttribute("aria-colspan", String(V)), f += V, P.style.width = `${V * this.slotWidth}px`;
1336
1337
  const ee = this.createElement("span", "day-label");
1337
1338
  ee.textContent = h.formatDateWithWeekday(T, t.locale), P.appendChild(ee), P.style.borderBottom = "1px solid var(--scheduler-border-color)", g.appendChild(P);
1338
1339
  }
1339
1340
  u.appendChild(g);
1340
- const m = this.createElement("div", "scheduler-timeline-head");
1341
- m.appendChild(u), c.appendChild(m);
1341
+ const v = this.createElement("div", "scheduler-timeline-head");
1342
+ v.appendChild(u), c.appendChild(v);
1342
1343
  const y = this.createElement("div", "scheduler-timeline-header");
1343
1344
  y.setAttribute("role", "row"), y.setAttribute("aria-rowindex", "2");
1344
1345
  const b = this.createElement("div", "scheduler-resource-header");
@@ -1346,21 +1347,21 @@ class I extends K {
1346
1347
  const M = this.createElement("div", "scheduler-timeline-slots-header");
1347
1348
  M.setAttribute("role", "presentation");
1348
1349
  let A = 2;
1349
- for (const D of o)
1350
+ for (const D of r)
1350
1351
  for (const T of D) {
1351
1352
  const R = this.createElement("div", "scheduler-timeline-slot-header");
1352
1353
  R.setAttribute("role", "columnheader"), R.setAttribute("aria-colindex", String(A)), A++, R.style.width = `${this.slotWidth}px`, R.textContent = h.formatTime(T.start, t.timeFormat, t.locale), R.style.fontSize = "10px", M.appendChild(R);
1353
1354
  }
1354
- y.appendChild(M), m.appendChild(y);
1355
- const x = this.createElement("div", "scheduler-timeline-body"), F = O.flatten(s, r);
1355
+ y.appendChild(M), v.appendChild(y);
1356
+ const x = this.createElement("div", "scheduler-timeline-body"), F = O.flatten(s, n);
1356
1357
  let L = 3;
1357
1358
  for (const D of F) {
1358
1359
  if (!D.visible) continue;
1359
- const T = this.createResourceRow(D, o);
1360
+ const T = this.createResourceRow(D, r);
1360
1361
  T.setAttribute("aria-rowindex", String(L)), x.appendChild(T), L++;
1361
1362
  }
1362
1363
  if (l) {
1363
- const D = this.createUnassignedRow(o);
1364
+ const D = this.createUnassignedRow(r);
1364
1365
  D.setAttribute("aria-rowindex", String(L)), x.appendChild(D), L++;
1365
1366
  }
1366
1367
  if (c.appendChild(x), this.container.appendChild(c), F.length === 0 && !l) {
@@ -1368,7 +1369,7 @@ class I extends K {
1368
1369
  D.textContent = w(t.messages).noResources, x.appendChild(D);
1369
1370
  }
1370
1371
  const Q = this.createAddBar();
1371
- Q && this.container.appendChild(Q), this.renderEvents(n), this.updateCellFocusAndSelection(), this.restoreActionFocus();
1372
+ Q && this.container.appendChild(Q), this.renderEvents(i), this.updateCellFocusAndSelection(), this.restoreActionFocus();
1372
1373
  }
1373
1374
  /**
1374
1375
  * Focus key of an action control: what it does plus which row it belongs to.
@@ -1400,7 +1401,7 @@ class I extends K {
1400
1401
  if (this.pendingFocusKey = null, !e) return;
1401
1402
  const t = Array.from(
1402
1403
  this.container.querySelectorAll("[data-action]")
1403
- ).find((r) => this.actionFocusKey(r) === e), s = this.container.querySelector(".scheduler-add-button");
1404
+ ).find((n) => this.actionFocusKey(n) === e), s = this.container.querySelector(".scheduler-add-button");
1404
1405
  (t ?? s)?.focus();
1405
1406
  }
1406
1407
  /**
@@ -1410,22 +1411,22 @@ class I extends K {
1410
1411
  */
1411
1412
  updateCellFocusAndSelection() {
1412
1413
  const e = this.state.focusedCell, t = this.state.focusedResourceId, s = this.container.querySelectorAll(".scheduler-timeline-slot");
1413
- let r = !1, n = null;
1414
- s.forEach((o) => {
1415
- n || (n = o);
1416
- const i = o.dataset.start, a = o.dataset.end, l = o.dataset.resourceId ?? null;
1417
- if (!i || !a) return;
1418
- const d = { start: new Date(i), end: new Date(a) }, c = !!e && d.start.getTime() === e.start.getTime() && t === l;
1419
- o.setAttribute("tabindex", c ? "0" : "-1");
1414
+ let n = !1, i = null;
1415
+ s.forEach((r) => {
1416
+ i || (i = r);
1417
+ const o = r.dataset.start, a = r.dataset.end, l = r.dataset.resourceId ?? null;
1418
+ if (!o || !a) return;
1419
+ const d = { start: new Date(o), end: new Date(a) }, c = !!e && d.start.getTime() === e.start.getTime() && t === l;
1420
+ r.setAttribute("tabindex", c ? "0" : "-1");
1420
1421
  const u = Z(d, this.state, l);
1421
- o.setAttribute("aria-selected", u ? "true" : "false"), o.classList.toggle("selected", u), c && (r = !0);
1422
- }), !r && n && n.setAttribute("tabindex", "0");
1422
+ r.setAttribute("aria-selected", u ? "true" : "false"), r.classList.toggle("selected", u), c && (n = !0);
1423
+ }), !n && i && i.setAttribute("tabindex", "0");
1423
1424
  }
1424
1425
  createResourceRow(e, t) {
1425
- const { options: s } = this.state, r = this.createElement("div", "scheduler-timeline-row");
1426
- r.setAttribute("role", "row"), H(e.item) && r.classList.add("group");
1427
- const n = this.createElement("div", "scheduler-resource-cell");
1428
- if (n.setAttribute("role", "rowheader"), n.setAttribute("aria-colindex", "1"), n.style.paddingLeft = `${8 + e.depth * 16}px`, H(e.item)) {
1426
+ const { options: s } = this.state, n = this.createElement("div", "scheduler-timeline-row");
1427
+ n.setAttribute("role", "row"), H(e.item) && n.classList.add("group");
1428
+ const i = this.createElement("div", "scheduler-resource-cell");
1429
+ if (i.setAttribute("role", "rowheader"), i.setAttribute("aria-colindex", "1"), i.style.paddingLeft = `${8 + e.depth * 16}px`, H(e.item)) {
1429
1430
  const l = this.createElement("button", "expand-toggle");
1430
1431
  l.type = "button";
1431
1432
  const d = this.state.collapsedGroups.has(e.item.id);
@@ -1435,12 +1436,12 @@ class I extends K {
1435
1436
  w(this.state.options.messages)[d ? "expandGroup" : "collapseGroup"],
1436
1437
  { title: e.item.title }
1437
1438
  )
1438
- ), this.setData(l, { action: "toggle-group", groupId: e.item.id }), n.appendChild(l);
1439
+ ), this.setData(l, { action: "toggle-group", groupId: e.item.id }), i.appendChild(l);
1439
1440
  }
1440
- const o = this.createElement("span", "resource-title");
1441
- o.textContent = e.item.title, o.title = e.item.title, this.can("updateResource") && this.setData(o, { resourceId: e.item.id }), n.appendChild(o), this.appendResourceActions(n, e.item), r.appendChild(n);
1442
- const i = this.createElement("div", "scheduler-timeline-slots");
1443
- i.setAttribute("role", "presentation");
1441
+ const r = this.createElement("span", "resource-title");
1442
+ r.textContent = e.item.title, r.title = e.item.title, this.can("updateResource") && this.setData(r, { resourceId: e.item.id }), i.appendChild(r), this.appendResourceActions(i, e.item), n.appendChild(i);
1443
+ const o = this.createElement("div", "scheduler-timeline-slots");
1444
+ o.setAttribute("role", "presentation");
1444
1445
  let a = 2;
1445
1446
  for (const l of t)
1446
1447
  for (const d of l) {
@@ -1452,13 +1453,13 @@ class I extends K {
1452
1453
  resourceId: e.item.id,
1453
1454
  start: d.start.toISOString(),
1454
1455
  end: d.end.toISOString()
1455
- }), i.appendChild(c);
1456
+ }), o.appendChild(c);
1456
1457
  }
1457
- if (oe(e.item)) {
1458
+ if (ie(e.item)) {
1458
1459
  const l = this.createElement("div", "scheduler-timeline-events");
1459
- l.setAttribute("role", "gridcell"), l.setAttribute("aria-colindex", "2"), l.setAttribute("aria-colspan", String(a - 2)), i.appendChild(l);
1460
+ l.setAttribute("role", "gridcell"), l.setAttribute("aria-colindex", "2"), l.setAttribute("aria-colspan", String(a - 2)), o.appendChild(l);
1460
1461
  }
1461
- return r.appendChild(i), this.rowElements.set(e.item.id, r), r;
1462
+ return n.appendChild(o), this.rowElements.set(e.item.id, n), n;
1462
1463
  }
1463
1464
  /**
1464
1465
  * Whether the synthetic bucket row renders: only when something is actually
@@ -1499,13 +1500,13 @@ class I extends K {
1499
1500
  return t.setAttribute("role", "separator"), t.setAttribute("tabindex", "0"), t.setAttribute("aria-orientation", "vertical"), t.setAttribute("aria-label", e.resizeResourceColumn), this.updateResizerValue(t), t.addEventListener("pointerdown", (s) => {
1500
1501
  s.preventDefault(), s.stopPropagation(), this.columnDrag = { startX: s.clientX, startWidth: this.currentColumnWidth() }, document.addEventListener("pointermove", this.boundColumnDragMove), document.addEventListener("pointerup", this.boundColumnDragEnd);
1501
1502
  }), t.addEventListener("keydown", (s) => {
1502
- const n = this.currentColumnWidth();
1503
+ const i = this.currentColumnWidth();
1503
1504
  switch (s.key) {
1504
1505
  case "ArrowLeft":
1505
- s.preventDefault(), this.applyColumnWidth(n - 16);
1506
+ s.preventDefault(), this.applyColumnWidth(i - 16);
1506
1507
  break;
1507
1508
  case "ArrowRight":
1508
- s.preventDefault(), this.applyColumnWidth(n + 16);
1509
+ s.preventDefault(), this.applyColumnWidth(i + 16);
1509
1510
  break;
1510
1511
  case "Home":
1511
1512
  s.preventDefault(), this.applyColumnWidth(I.MIN_COLUMN_PX);
@@ -1538,8 +1539,8 @@ class I extends K {
1538
1539
  }
1539
1540
  /** aria-valuenow as a percentage of the scroller, per the splitter pattern. */
1540
1541
  updateResizerValue(e, t) {
1541
- const s = this.container.clientWidth || 1, r = t ?? this.currentColumnWidth();
1542
- e.setAttribute("aria-valuemin", "0"), e.setAttribute("aria-valuemax", "100"), e.setAttribute("aria-valuenow", String(Math.round(r / s * 100)));
1542
+ const s = this.container.clientWidth || 1, n = t ?? this.currentColumnWidth();
1543
+ e.setAttribute("aria-valuemin", "0"), e.setAttribute("aria-valuemax", "100"), e.setAttribute("aria-valuenow", String(Math.round(n / s * 100)));
1543
1544
  }
1544
1545
  onColumnDragMove(e) {
1545
1546
  this.columnDrag && this.applyColumnWidth(this.columnDrag.startWidth + (e.clientX - this.columnDrag.startX));
@@ -1549,7 +1550,7 @@ class I extends K {
1549
1550
  }
1550
1551
  /** True when the capability is granted for the whole scheduler. */
1551
1552
  can(e) {
1552
- return ie(e, { permissions: this.state.resolvedPermissions });
1553
+ return re(e, { permissions: this.state.resolvedPermissions });
1553
1554
  }
1554
1555
  /**
1555
1556
  * Per-row resource actions, rendered into the pinned rowheader cell.
@@ -1597,12 +1598,12 @@ class I extends K {
1597
1598
  */
1598
1599
  appendResourceActions(e, t) {
1599
1600
  if (this.rowActions(t).length === 0) return;
1600
- const s = w(this.state.options.messages), r = E(s.rowMenuLabel, { title: t.title }), n = this.createElement("button", "scheduler-row-menu-button");
1601
- n.type = "button", n.setAttribute("aria-label", r), n.title = r, n.setAttribute("aria-haspopup", "dialog"), n.setAttribute("aria-expanded", "false"), n.tabIndex = -1, this.setData(n, { action: "row-menu", resourceId: t.id });
1602
- const i = t.eventColor ?? t.color, a = i ? ge(i) : null;
1603
- i && a && (n.style.background = i, n.style.color = a, n.style.borderColor = i);
1601
+ const s = w(this.state.options.messages), n = E(s.rowMenuLabel, { title: t.title }), i = this.createElement("button", "scheduler-row-menu-button");
1602
+ i.type = "button", i.setAttribute("aria-label", n), i.title = n, i.setAttribute("aria-haspopup", "dialog"), i.setAttribute("aria-expanded", "false"), i.tabIndex = -1, this.setData(i, { action: "row-menu", resourceId: t.id });
1603
+ const o = t.eventColor ?? t.color, a = o ? ge(o) : null;
1604
+ o && a && (i.style.background = o, i.style.color = a, i.style.borderColor = o);
1604
1605
  const l = this.createElement("span", "action-glyph");
1605
- l.setAttribute("aria-hidden", "true"), l.textContent = "⋯", n.appendChild(l), e.insertBefore(n, e.firstChild);
1606
+ l.setAttribute("aria-hidden", "true"), l.textContent = "⋯", i.appendChild(l), e.insertBefore(i, e.firstChild);
1606
1607
  }
1607
1608
  /**
1608
1609
  * Root-level "Add resource" / "Add group" bar, pinned to the bottom of the
@@ -1616,16 +1617,16 @@ class I extends K {
1616
1617
  createAddBar() {
1617
1618
  const e = this.can("createResource"), t = this.can("createGroup");
1618
1619
  if (!e && !t) return null;
1619
- const s = w(this.state.options.messages), r = this.createElement("div", "scheduler-timeline-addbar");
1620
- if (r.setAttribute("role", "toolbar"), r.setAttribute("aria-label", s.addResourceBarLabel), e) {
1621
- const n = this.createElement("button", "scheduler-add-button");
1622
- n.type = "button", n.textContent = s.addResource, this.setData(n, { action: "add-resource" }), r.appendChild(n);
1620
+ const s = w(this.state.options.messages), n = this.createElement("div", "scheduler-timeline-addbar");
1621
+ if (n.setAttribute("role", "toolbar"), n.setAttribute("aria-label", s.addResourceBarLabel), e) {
1622
+ const i = this.createElement("button", "scheduler-add-button");
1623
+ i.type = "button", i.textContent = s.addResource, this.setData(i, { action: "add-resource" }), n.appendChild(i);
1623
1624
  }
1624
1625
  if (t) {
1625
- const n = this.createElement("button", "scheduler-add-button");
1626
- n.type = "button", n.textContent = s.addGroup, this.setData(n, { action: "add-group" }), r.appendChild(n);
1626
+ const i = this.createElement("button", "scheduler-add-button");
1627
+ i.type = "button", i.textContent = s.addGroup, this.setData(i, { action: "add-group" }), n.appendChild(i);
1627
1628
  }
1628
- return r;
1629
+ return n;
1629
1630
  }
1630
1631
  /**
1631
1632
  * The "(No resource)" bucket row.
@@ -1641,17 +1642,17 @@ class I extends K {
1641
1642
  createUnassignedRow(e) {
1642
1643
  const { options: t } = this.state, s = this.createElement("div", "scheduler-timeline-row", "unassigned");
1643
1644
  s.setAttribute("role", "row");
1644
- const r = this.createElement("div", "scheduler-resource-cell");
1645
- r.setAttribute("role", "rowheader"), r.setAttribute("aria-colindex", "1"), r.style.paddingLeft = "8px";
1646
- const n = this.createElement("span", "resource-title");
1647
- n.textContent = w(t.messages).unassignedResource, n.title = n.textContent, r.appendChild(n), s.appendChild(r);
1648
- const o = this.createElement("div", "scheduler-timeline-slots");
1649
- o.setAttribute("role", "presentation");
1650
- let i = 2;
1645
+ const n = this.createElement("div", "scheduler-resource-cell");
1646
+ n.setAttribute("role", "rowheader"), n.setAttribute("aria-colindex", "1"), n.style.paddingLeft = "8px";
1647
+ const i = this.createElement("span", "resource-title");
1648
+ i.textContent = w(t.messages).unassignedResource, i.title = i.textContent, n.appendChild(i), s.appendChild(n);
1649
+ const r = this.createElement("div", "scheduler-timeline-slots");
1650
+ r.setAttribute("role", "presentation");
1651
+ let o = 2;
1651
1652
  for (const l of e)
1652
1653
  for (const d of l) {
1653
1654
  const c = this.createElement("div", "scheduler-timeline-slot");
1654
- c.setAttribute("role", "gridcell"), c.setAttribute("aria-colindex", String(i)), i++, c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.setAttribute(
1655
+ c.setAttribute("role", "gridcell"), c.setAttribute("aria-colindex", String(o)), o++, c.setAttribute("tabindex", "-1"), c.setAttribute("aria-selected", "false"), c.setAttribute(
1655
1656
  "aria-label",
1656
1657
  q(
1657
1658
  d,
@@ -1662,14 +1663,14 @@ class I extends K {
1662
1663
  start: d.start.toISOString(),
1663
1664
  end: d.end.toISOString(),
1664
1665
  unassigned: "true"
1665
- }), o.appendChild(c);
1666
+ }), r.appendChild(c);
1666
1667
  }
1667
1668
  const a = this.createElement("div", "scheduler-timeline-events");
1668
- return a.setAttribute("role", "gridcell"), a.setAttribute("aria-colindex", "2"), a.setAttribute("aria-colspan", String(i - 2)), o.appendChild(a), s.appendChild(o), this.rowElements.set(z, s), s;
1669
+ return a.setAttribute("role", "gridcell"), a.setAttribute("aria-colindex", "2"), a.setAttribute("aria-colspan", String(o - 2)), r.appendChild(a), s.appendChild(r), this.rowElements.set(z, s), s;
1669
1670
  }
1670
1671
  renderEvents(e) {
1671
- const { resources: t, options: s } = this.state, r = e[0], n = new Date(e[6]);
1672
- n.setHours(23, 59, 59, 999);
1672
+ const { resources: t, options: s } = this.state, n = e[0], i = new Date(e[6]);
1673
+ i.setHours(23, 59, 59, 999);
1673
1674
  const a = h.getTimeSlots(
1674
1675
  e[0],
1675
1676
  s.slotDuration,
@@ -1690,11 +1691,11 @@ class I extends K {
1690
1691
  for (const { resourceId: d, title: c } of l) {
1691
1692
  const u = this.rowElements.get(d ?? z);
1692
1693
  if (!u) continue;
1693
- const v = u.querySelector(".scheduler-timeline-events");
1694
- if (!v) continue;
1695
- v.innerHTML = "";
1694
+ const m = u.querySelector(".scheduler-timeline-events");
1695
+ if (!m) continue;
1696
+ m.innerHTML = "";
1696
1697
  const f = (this.state.eventsByResource.get(d) ?? []).filter(
1697
- (x) => x.start < n && x.end > r
1698
+ (x) => x.start < i && x.end > n
1698
1699
  ).map((x) => ({
1699
1700
  id: x.id,
1700
1701
  event: x,
@@ -1704,33 +1705,33 @@ class I extends K {
1704
1705
  isEnd: !0,
1705
1706
  dayIndex: 0,
1706
1707
  totalDays: 1
1707
- })), m = C.getTimelinedParts(f), y = m.reduce((x, F) => Math.max(x, F.totalTracks), 1), { height: b, gap: M, padding: A } = this.trackMetrics;
1708
+ })), v = C.getTimelinedParts(f), y = v.reduce((x, F) => Math.max(x, F.totalTracks), 1), { height: b, gap: M, padding: A } = this.trackMetrics;
1708
1709
  u.style.minHeight = `${y * b + (y - 1) * M + 2 * A}px`;
1709
- for (const { part: x, trackIndex: F } of m) {
1710
+ for (const { part: x, trackIndex: F } of v) {
1710
1711
  if (!x.event) continue;
1711
1712
  const L = this.createEventElement(
1712
1713
  x.event,
1713
1714
  F,
1714
- r,
1715
+ n,
1715
1716
  a,
1716
1717
  s.slotDuration ?? 1800,
1717
1718
  c
1718
1719
  );
1719
- v.appendChild(L);
1720
+ m.appendChild(L);
1720
1721
  }
1721
1722
  }
1722
1723
  }
1723
- createEventElement(e, t, s, r, n, o = null) {
1724
- const i = this.createElement("div", "scheduler-timeline-event"), a = this.state.selectedEvent?.id === e.id;
1725
- this.state.keyboardMoveEventId, e.id, i.setAttribute("role", "button"), i.setAttribute("tabindex", "0"), i.setAttribute(
1724
+ createEventElement(e, t, s, n, i, r = null) {
1725
+ const o = this.createElement("div", "scheduler-timeline-event"), a = this.state.selectedEvent?.id === e.id;
1726
+ this.state.keyboardMoveEventId, e.id, o.setAttribute("role", "button"), o.setAttribute("tabindex", "0"), o.setAttribute(
1726
1727
  "aria-label",
1727
- W(e, o, this.state.options)
1728
- ), i.setAttribute("aria-pressed", a ? "true" : "false"), i.setAttribute("aria-describedby", "scheduler-kbd-event"), a && i.classList.add("selected");
1729
- const l = Math.max(e.start.getTime(), s.getTime()), d = s.getTime() + 10080 * 60 * 1e3, c = Math.min(e.end.getTime(), d), u = l - s.getTime(), v = c - l, g = d - s.getTime(), f = u / g * r, m = Math.max(v / g * r, 20), { height: y, gap: b, padding: M } = this.trackMetrics;
1730
- i.style.left = `${f}px`, i.style.width = `${m}px`, i.style.top = `${M + t * (y + b)}px`, i.style.height = `${y}px`, this.applyEventColors(i, e), this.setData(i, { eventId: e.id });
1728
+ W(e, r, this.state.options)
1729
+ ), o.setAttribute("aria-pressed", a ? "true" : "false"), o.setAttribute("aria-describedby", "scheduler-kbd-event"), a && o.classList.add("selected");
1730
+ const l = Math.max(e.start.getTime(), s.getTime()), d = s.getTime() + 10080 * 60 * 1e3, c = Math.min(e.end.getTime(), d), u = l - s.getTime(), m = c - l, g = d - s.getTime(), f = u / g * n, v = Math.max(m / g * n, 20), { height: y, gap: b, padding: M } = this.trackMetrics;
1731
+ o.style.left = `${f}px`, o.style.width = `${v}px`, o.style.top = `${M + t * (y + b)}px`, o.style.height = `${y}px`, this.applyEventColors(o, e), this.setData(o, { eventId: e.id });
1731
1732
  const A = this.createElement("div", "event-content"), x = this.createElement("div", "event-title");
1732
- return x.textContent = e.title, A.appendChild(x), i.appendChild(A), this.appendResizeHandles(
1733
- i,
1733
+ return x.textContent = e.title, A.appendChild(x), o.appendChild(A), this.appendResizeHandles(
1734
+ o,
1734
1735
  {
1735
1736
  id: e.id,
1736
1737
  event: e,
@@ -1742,7 +1743,7 @@ class I extends K {
1742
1743
  totalDays: 1
1743
1744
  },
1744
1745
  ["left", "right"]
1745
- ), i;
1746
+ ), o;
1746
1747
  }
1747
1748
  /**
1748
1749
  * Dashed ghost showing where the event will land. Mirrors
@@ -1755,33 +1756,33 @@ class I extends K {
1755
1756
  */
1756
1757
  renderPreviewEvent(e) {
1757
1758
  this.container.querySelector(".scheduler-timeline-event.preview")?.remove();
1758
- const { dragState: t, previewEvent: s, options: r } = this.state;
1759
+ const { dragState: t, previewEvent: s, options: n } = this.state;
1759
1760
  if (!s) return;
1760
- const n = t?.event?.id ?? this.state.keyboardMoveEventId, o = this.previewRowKey();
1761
- if (!o) return;
1762
- const a = this.rowElements.get(o)?.querySelector(".scheduler-timeline-events");
1761
+ const i = t?.event?.id ?? this.state.keyboardMoveEventId, r = this.previewRowKey();
1762
+ if (!r) return;
1763
+ const a = this.rowElements.get(r)?.querySelector(".scheduler-timeline-events");
1763
1764
  if (!a) return;
1764
1765
  const d = h.getTimeSlots(
1765
1766
  e[0],
1766
- r.slotDuration,
1767
- r.slotMinTime,
1768
- r.slotMaxTime
1769
- ).length * 7 * this.slotWidth, c = e[0], u = c.getTime() + 10080 * 60 * 1e3, v = Math.max(s.start.getTime(), c.getTime()), g = Math.min(s.end.getTime(), u), f = u - c.getTime(), m = this.createElement("div", "scheduler-timeline-event", "preview");
1770
- m.style.left = `${(v - c.getTime()) / f * d}px`, m.style.width = `${Math.max((g - v) / f * d, 20)}px`;
1771
- const y = n ? (
1767
+ n.slotDuration,
1768
+ n.slotMinTime,
1769
+ n.slotMaxTime
1770
+ ).length * 7 * this.slotWidth, c = e[0], u = c.getTime() + 10080 * 60 * 1e3, m = Math.max(s.start.getTime(), c.getTime()), g = Math.min(s.end.getTime(), u), f = u - c.getTime(), v = this.createElement("div", "scheduler-timeline-event", "preview");
1771
+ v.style.left = `${(m - c.getTime()) / f * d}px`, v.style.width = `${Math.max((g - m) / f * d, 20)}px`;
1772
+ const y = i ? (
1772
1773
  // dataset match rather than an attribute selector: event ids are
1773
1774
  // consumer-supplied and would need CSS escaping.
1774
1775
  Array.from(
1775
1776
  a.querySelectorAll(".scheduler-timeline-event:not(.preview)")
1776
- ).find((b) => b.dataset.eventId === n)
1777
+ ).find((b) => b.dataset.eventId === i)
1777
1778
  ) : void 0;
1778
1779
  if (y)
1779
- m.style.top = y.style.top, m.style.height = y.style.height;
1780
+ v.style.top = y.style.top, v.style.height = y.style.height;
1780
1781
  else {
1781
1782
  const { height: b, padding: M } = this.trackMetrics;
1782
- m.style.top = `${M}px`, m.style.height = `${b}px`;
1783
+ v.style.top = `${M}px`, v.style.height = `${b}px`;
1783
1784
  }
1784
- a.appendChild(m);
1785
+ a.appendChild(v);
1785
1786
  }
1786
1787
  /**
1787
1788
  * Which row a drag/preview is currently addressing.
@@ -1803,36 +1804,36 @@ class I extends K {
1803
1804
  if (!t) return;
1804
1805
  if (t.resourceId !== void 0)
1805
1806
  return t.resourceId ?? z;
1806
- const s = e?.event?.id ?? this.state.keyboardMoveEventId, r = s ? this.state.events.find((n) => n.id === s) : void 0;
1807
- return r ? r.resourceId ?? z : this.state.selectionResourceId ?? this.state.focusedResourceId ?? void 0;
1807
+ const s = e?.event?.id ?? this.state.keyboardMoveEventId, n = s ? this.state.events.find((i) => i.id === s) : void 0;
1808
+ return n ? n.resourceId ?? z : this.state.selectionResourceId ?? this.state.focusedResourceId ?? void 0;
1808
1809
  }
1809
1810
  update(e) {
1810
- const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options), r = this.state.resources !== e.resources || this.state.collapsedGroups !== e.collapsedGroups || this.state.resolvedPermissions !== e.resolvedPermissions || this.hasUnassignedRow(this.state) !== this.hasUnassignedRow(e);
1811
- if (this.state = e, t || s || r) {
1811
+ const t = this.state.date.getTime() !== e.date.getTime(), s = this.optionsRequireRerender(this.state.options, e.options), n = this.state.resources !== e.resources || this.state.collapsedGroups !== e.collapsedGroups || this.state.resolvedPermissions !== e.resolvedPermissions || this.hasUnassignedRow(this.state) !== this.hasUnassignedRow(e);
1812
+ if (this.state = e, t || s || n) {
1812
1813
  this.render();
1813
1814
  return;
1814
1815
  }
1815
1816
  this.updateGreyedSlots();
1816
- const n = h.getWeekDays(e.date, this.firstDayOfWeek);
1817
- this.renderEvents(n), this.renderPreviewEvent(n), this.updateCellFocusAndSelection();
1817
+ const i = h.getWeekDays(e.date, this.firstDayOfWeek);
1818
+ this.renderEvents(i), this.renderPreviewEvent(i), this.updateCellFocusAndSelection();
1818
1819
  }
1819
1820
  optionsRequireRerender(e, t) {
1820
1821
  return e.slotDuration !== t.slotDuration || e.timeFormat !== t.timeFormat || e.firstDayOfWeek !== t.firstDayOfWeek || e.slotMinTime !== t.slotMinTime || e.slotMaxTime !== t.slotMaxTime || e.locale !== t.locale;
1821
1822
  }
1822
1823
  updateGreyedSlots() {
1823
1824
  const { dragState: e, previewEvent: t } = this.state;
1824
- if (this.container.querySelectorAll(".scheduler-timeline-slot").forEach((o) => o.classList.remove("greyed")), this.container.querySelectorAll(".scheduler-timeline-row.drop-target").forEach((o) => o.classList.remove("drop-target")), !e || !t) return;
1825
- const r = this.previewRowKey(), n = r ? this.rowElements.get(r) : void 0;
1826
- n && (n.classList.add("drop-target"), n.querySelectorAll(".scheduler-timeline-slot").forEach((o) => {
1827
- const i = new Date(o.dataset.start ?? ""), a = new Date(o.dataset.end ?? "");
1828
- i < t.end && a > t.start && o.classList.add("greyed");
1825
+ if (this.container.querySelectorAll(".scheduler-timeline-slot").forEach((r) => r.classList.remove("greyed")), this.container.querySelectorAll(".scheduler-timeline-row.drop-target").forEach((r) => r.classList.remove("drop-target")), !e || !t) return;
1826
+ const n = this.previewRowKey(), i = n ? this.rowElements.get(n) : void 0;
1827
+ i && (i.classList.add("drop-target"), i.querySelectorAll(".scheduler-timeline-slot").forEach((r) => {
1828
+ const o = new Date(r.dataset.start ?? ""), a = new Date(r.dataset.end ?? "");
1829
+ o < t.end && a > t.start && r.classList.add("greyed");
1829
1830
  }));
1830
1831
  }
1831
1832
  destroy() {
1832
1833
  this.onColumnDragEnd(), this.rowElements.clear(), this.clearContainer();
1833
1834
  }
1834
1835
  }
1835
- const Ae = ne(`@charset "UTF-8";
1836
+ const Re = ce(`@charset "UTF-8";
1836
1837
  /* Layering ladder. Nothing between :host and the events establishes a
1837
1838
  stacking context, so every one of these competes in ONE shared context
1838
1839
  across the whole shadow root — a selected event in one day column is
@@ -3408,153 +3409,6 @@ const Ae = ne(`@charset "UTF-8";
3408
3409
  animation: none !important;
3409
3410
  transition: none !important;
3410
3411
  }
3411
- }`), Re = ne(`.form-control {
3412
- display: block;
3413
- width: 100%;
3414
- padding: 0.375rem 0.75rem;
3415
- font-size: 1rem;
3416
- font-weight: 400;
3417
- line-height: 1.5;
3418
- color: var(--bs-body-color);
3419
- appearance: none;
3420
- background-color: var(--bs-body-bg);
3421
- background-clip: padding-box;
3422
- border: var(--bs-border-width) solid var(--bs-border-color);
3423
- border-radius: var(--bs-border-radius);
3424
- transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
3425
- }
3426
- @media (prefers-reduced-motion: reduce) {
3427
- .form-control {
3428
- transition: none;
3429
- }
3430
- }
3431
- .form-control[type=file] {
3432
- overflow: hidden;
3433
- }
3434
- .form-control[type=file]:not(:disabled):not([readonly]) {
3435
- cursor: pointer;
3436
- }
3437
- .form-control:focus {
3438
- color: var(--bs-body-color);
3439
- background-color: var(--bs-body-bg);
3440
- border-color: rgb(134, 182.5, 254);
3441
- outline: 0;
3442
- box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
3443
- }
3444
- .form-control::-webkit-date-and-time-value {
3445
- min-width: 85px;
3446
- height: 1.5em;
3447
- margin: 0;
3448
- }
3449
- .form-control::-webkit-datetime-edit {
3450
- display: block;
3451
- padding: 0;
3452
- }
3453
- .form-control::placeholder {
3454
- color: var(--bs-secondary-color);
3455
- opacity: 1;
3456
- }
3457
- .form-control:disabled {
3458
- background-color: var(--bs-secondary-bg);
3459
- opacity: 1;
3460
- }
3461
- .form-control::file-selector-button {
3462
- padding: 0.375rem 0.75rem;
3463
- margin: -0.375rem -0.75rem;
3464
- margin-inline-end: 0.75rem;
3465
- color: var(--bs-body-color);
3466
- background-color: var(--bs-tertiary-bg);
3467
- pointer-events: none;
3468
- border-color: inherit;
3469
- border-style: solid;
3470
- border-width: 0;
3471
- border-inline-end-width: var(--bs-border-width);
3472
- border-radius: 0;
3473
- transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
3474
- }
3475
- @media (prefers-reduced-motion: reduce) {
3476
- .form-control::file-selector-button {
3477
- transition: none;
3478
- }
3479
- }
3480
- .form-control:hover:not(:disabled):not([readonly])::file-selector-button {
3481
- background-color: var(--bs-secondary-bg);
3482
- }
3483
-
3484
- .form-control-plaintext {
3485
- display: block;
3486
- width: 100%;
3487
- padding: 0.375rem 0;
3488
- margin-bottom: 0;
3489
- line-height: 1.5;
3490
- color: var(--bs-body-color);
3491
- background-color: transparent;
3492
- border: solid transparent;
3493
- border-width: var(--bs-border-width) 0;
3494
- }
3495
- .form-control-plaintext:focus {
3496
- outline: 0;
3497
- }
3498
- .form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg {
3499
- padding-right: 0;
3500
- padding-left: 0;
3501
- }
3502
-
3503
- .form-control-sm {
3504
- min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
3505
- padding: 0.25rem 0.5rem;
3506
- font-size: 0.875rem;
3507
- border-radius: var(--bs-border-radius-sm);
3508
- }
3509
- .form-control-sm::file-selector-button {
3510
- padding: 0.25rem 0.5rem;
3511
- margin: -0.25rem -0.5rem;
3512
- margin-inline-end: 0.5rem;
3513
- }
3514
-
3515
- .form-control-lg {
3516
- min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
3517
- padding: 0.5rem 1rem;
3518
- font-size: 1.25rem;
3519
- border-radius: var(--bs-border-radius-lg);
3520
- }
3521
- .form-control-lg::file-selector-button {
3522
- padding: 0.5rem 1rem;
3523
- margin: -0.5rem -1rem;
3524
- margin-inline-end: 1rem;
3525
- }
3526
-
3527
- textarea.form-control {
3528
- min-height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
3529
- }
3530
- textarea.form-control-sm {
3531
- min-height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
3532
- }
3533
- textarea.form-control-lg {
3534
- min-height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
3535
- }
3536
-
3537
- .form-control-color {
3538
- width: 3rem;
3539
- height: calc(1.5em + 0.75rem + calc(var(--bs-border-width) * 2));
3540
- padding: 0.375rem;
3541
- }
3542
- .form-control-color:not(:disabled):not([readonly]) {
3543
- cursor: pointer;
3544
- }
3545
- .form-control-color::-moz-color-swatch {
3546
- border: 0 !important;
3547
- border-radius: var(--bs-border-radius);
3548
- }
3549
- .form-control-color::-webkit-color-swatch {
3550
- border: 0 !important;
3551
- border-radius: var(--bs-border-radius);
3552
- }
3553
- .form-control-color.form-control-sm {
3554
- height: calc(1.5em + 0.5rem + calc(var(--bs-border-width) * 2));
3555
- }
3556
- .form-control-color.form-control-lg {
3557
- height: calc(1.5em + 1rem + calc(var(--bs-border-width) * 2));
3558
3412
  }`), J = {
3559
3413
  dragThreshold: 5,
3560
3414
  minDurationMs: 1800 * 1e3
@@ -3573,16 +3427,16 @@ class Pe {
3573
3427
  * @param originalEvent - The original event being moved/resized (null for create)
3574
3428
  * @returns The preview event with new start/end, or null if invalid
3575
3429
  */
3576
- calculatePreview(e, t, s, r) {
3430
+ calculatePreview(e, t, s, n) {
3577
3431
  switch (e) {
3578
3432
  case "create":
3579
3433
  return this.calculateCreatePreview(t, s);
3580
3434
  case "move":
3581
- return r ? this.calculateMovePreview(t, s, r) : null;
3435
+ return n ? this.calculateMovePreview(t, s, n) : null;
3582
3436
  case "resize-start":
3583
- return r ? this.calculateResizeStartPreview(s, r) : null;
3437
+ return n ? this.calculateResizeStartPreview(s, n) : null;
3584
3438
  case "resize-end":
3585
- return r ? this.calculateResizeEndPreview(s, r) : null;
3439
+ return n ? this.calculateResizeEndPreview(s, n) : null;
3586
3440
  default:
3587
3441
  return null;
3588
3442
  }
@@ -3594,12 +3448,12 @@ class Pe {
3594
3448
  calculateCreatePreview(e, t) {
3595
3449
  const s = new Date(
3596
3450
  Math.min(e.start.getTime(), t.start.getTime())
3597
- ), r = new Date(
3451
+ ), n = new Date(
3598
3452
  Math.max(e.end.getTime(), t.end.getTime())
3599
3453
  );
3600
3454
  return {
3601
3455
  start: s,
3602
- end: r,
3456
+ end: n,
3603
3457
  ...e.resourceId !== void 0 ? { resourceId: e.resourceId } : {}
3604
3458
  };
3605
3459
  }
@@ -3608,10 +3462,10 @@ class Pe {
3608
3462
  * Preserves event duration, applies offset from drag start.
3609
3463
  */
3610
3464
  calculateMovePreview(e, t, s) {
3611
- const r = t.start.getTime() - e.start.getTime(), n = s.end.getTime() - s.start.getTime(), o = new Date(s.start.getTime() + r), i = new Date(o.getTime() + n), a = t.resourceId !== void 0 ? t.resourceId : s.resourceId;
3465
+ const n = t.start.getTime() - e.start.getTime(), i = s.end.getTime() - s.start.getTime(), r = new Date(s.start.getTime() + n), o = new Date(r.getTime() + i), a = t.resourceId !== void 0 ? t.resourceId : s.resourceId;
3612
3466
  return {
3613
- start: o,
3614
- end: i,
3467
+ start: r,
3468
+ end: o,
3615
3469
  ...a !== void 0 ? { resourceId: a } : {}
3616
3470
  };
3617
3471
  }
@@ -3632,10 +3486,10 @@ class Pe {
3632
3486
  * Enforces minimum duration.
3633
3487
  */
3634
3488
  calculateResizeEndPreview(e, t) {
3635
- const s = t.start.getTime() + this.config.minDurationMs, r = new Date(
3489
+ const s = t.start.getTime() + this.config.minDurationMs, n = new Date(
3636
3490
  Math.max(e.end.getTime(), s)
3637
3491
  );
3638
- return { start: t.start, end: r };
3492
+ return { start: t.start, end: n };
3639
3493
  }
3640
3494
  }
3641
3495
  function B(p) {
@@ -3661,7 +3515,7 @@ function Y(p) {
3661
3515
  isPrimary: e.identifier === 0
3662
3516
  } : null;
3663
3517
  }
3664
- function ce(p, e) {
3518
+ function de(p, e) {
3665
3519
  const t = e.x - p.x, s = e.y - p.y;
3666
3520
  return Math.sqrt(t * t + s * s);
3667
3521
  }
@@ -3760,20 +3614,20 @@ class Fe {
3760
3614
  transitionFromIdle(e) {
3761
3615
  if (e.type !== "POINTER_DOWN")
3762
3616
  return this.state;
3763
- const { target: t, position: s, slot: r, slotElement: n, immediate: o } = e, i = this.getOperationType(t);
3764
- if (!i)
3617
+ const { target: t, position: s, slot: n, slotElement: i, immediate: r } = e, o = this.getOperationType(t);
3618
+ if (!o)
3765
3619
  return this.state;
3766
3620
  const a = t.event ?? null;
3767
3621
  if (a && a.draggable === !1)
3768
3622
  return this.state;
3769
- if (o) {
3770
- let l = r;
3623
+ if (r) {
3624
+ let l = n;
3771
3625
  if (!l && a && (l = {
3772
3626
  start: a.start,
3773
3627
  end: a.end
3774
3628
  }), l) {
3775
3629
  const d = this.previewCalculator.calculatePreview(
3776
- i,
3630
+ o,
3777
3631
  l,
3778
3632
  l,
3779
3633
  a
@@ -3781,7 +3635,7 @@ class Fe {
3781
3635
  if (d)
3782
3636
  return {
3783
3637
  phase: "active",
3784
- operationType: i,
3638
+ operationType: o,
3785
3639
  event: a,
3786
3640
  startSlot: l,
3787
3641
  currentSlot: l,
@@ -3792,11 +3646,11 @@ class Fe {
3792
3646
  }
3793
3647
  return {
3794
3648
  phase: "pending",
3795
- operationType: i,
3649
+ operationType: o,
3796
3650
  event: a,
3797
3651
  startPosition: s,
3798
- startSlot: r,
3799
- slotElement: n
3652
+ startSlot: n,
3653
+ slotElement: i
3800
3654
  };
3801
3655
  }
3802
3656
  /**
@@ -3806,7 +3660,7 @@ class Fe {
3806
3660
  if (this.state.phase !== "pending") return this.state;
3807
3661
  switch (e.type) {
3808
3662
  case "POINTER_MOVE":
3809
- return ce(
3663
+ return de(
3810
3664
  this.state.startPosition,
3811
3665
  e.position
3812
3666
  ) < this.config.dragThreshold ? this.state : this.activateDrag(e.slot);
@@ -3880,19 +3734,19 @@ class Fe {
3880
3734
  const t = this.state.startSlot ?? e;
3881
3735
  if (!t)
3882
3736
  return { phase: "idle" };
3883
- const s = e ?? t, r = this.previewCalculator.calculatePreview(
3737
+ const s = e ?? t, n = this.previewCalculator.calculatePreview(
3884
3738
  this.state.operationType,
3885
3739
  t,
3886
3740
  s,
3887
3741
  this.state.event
3888
3742
  );
3889
- return r ? {
3743
+ return n ? {
3890
3744
  phase: "active",
3891
3745
  operationType: this.state.operationType,
3892
3746
  event: this.state.event,
3893
3747
  startSlot: t,
3894
3748
  currentSlot: s,
3895
- preview: r,
3749
+ preview: n,
3896
3750
  originalEvent: this.state.event ?? void 0
3897
3751
  } : { phase: "idle" };
3898
3752
  }
@@ -3940,12 +3794,12 @@ class Le {
3940
3794
  * @param immediate If true, skip pending state (for touch-initiated drags)
3941
3795
  */
3942
3796
  handlePointerDown(e, t, s = !1) {
3943
- const r = this.getSlotAtPosition?.(e.clientX, e.clientY) ?? null;
3797
+ const n = this.getSlotAtPosition?.(e.clientX, e.clientY) ?? null;
3944
3798
  this.stateMachine.send({
3945
3799
  type: "POINTER_DOWN",
3946
3800
  target: t,
3947
3801
  position: { x: e.clientX, y: e.clientY },
3948
- slot: r,
3802
+ slot: n,
3949
3803
  slotElement: t.slotElement,
3950
3804
  immediate: s
3951
3805
  }), this.stateMachine.isActive() && this.syncToStateManager();
@@ -4115,13 +3969,13 @@ class He {
4115
3969
  analyzeTarget(e) {
4116
3970
  const t = e.closest(".resize-handle");
4117
3971
  if (t) {
4118
- const o = t.closest(
3972
+ const r = t.closest(
4119
3973
  ".scheduler-event, .scheduler-timeline-event"
4120
- )?.dataset.eventId, i = o ? this.config.getEventById(o) : null;
4121
- if (i)
3974
+ )?.dataset.eventId, o = r ? this.config.getEventById(r) : null;
3975
+ if (o)
4122
3976
  return {
4123
3977
  type: "resize-handle",
4124
- event: i,
3978
+ event: o,
4125
3979
  resizeHandle: t.dataset.handle
4126
3980
  };
4127
3981
  }
@@ -4129,14 +3983,14 @@ class He {
4129
3983
  ".scheduler-event:not(.preview), .scheduler-timeline-event:not(.preview)"
4130
3984
  );
4131
3985
  if (s) {
4132
- const n = s.dataset.eventId, o = n ? this.config.getEventById(n) : null;
4133
- if (o)
4134
- return { type: "event", event: o };
3986
+ const i = s.dataset.eventId, r = i ? this.config.getEventById(i) : null;
3987
+ if (r)
3988
+ return { type: "event", event: r };
4135
3989
  }
4136
- const r = e.closest(
3990
+ const n = e.closest(
4137
3991
  ".scheduler-time-slot, .scheduler-timeline-slot"
4138
3992
  );
4139
- return r ? { type: "slot", slotElement: r } : { type: "none" };
3993
+ return n ? { type: "slot", slotElement: n } : { type: "none" };
4140
3994
  }
4141
3995
  // Mouse event handlers
4142
3996
  handleMouseDown(e) {
@@ -4172,22 +4026,22 @@ class He {
4172
4026
  const s = this.analyzeTarget(t.target);
4173
4027
  if (s.type === "none" || s.type === "slot" && !this.config.isSelectable()) return;
4174
4028
  this.touchStartPosition = { x: t.clientX, y: t.clientY }, this.touchHoldTarget = t.target, this.touchHoldPointer = t, this.panStartedOnEvent = s.type === "event" || s.type === "resize-handle";
4175
- const r = this, n = e.target;
4176
- if (n.addEventListener("touchmove", function(i) {
4177
- r.handleTouchMove(i);
4178
- }, { passive: !1 }), n.addEventListener("touchend", function(i) {
4179
- r.handleTouchEnd(i);
4180
- }), n.addEventListener("touchcancel", function(i) {
4181
- r.handleTouchCancel(i);
4029
+ const n = this, i = e.target;
4030
+ if (i.addEventListener("touchmove", function(o) {
4031
+ n.handleTouchMove(o);
4032
+ }, { passive: !1 }), i.addEventListener("touchend", function(o) {
4033
+ n.handleTouchEnd(o);
4034
+ }), i.addEventListener("touchcancel", function(o) {
4035
+ n.handleTouchCancel(o);
4182
4036
  }), s.type === "resize-handle" && s.event && this.config.isEventSelected?.(s.event.id)) {
4183
4037
  this.activateTouchDragMode(t, s);
4184
4038
  return;
4185
4039
  }
4186
4040
  this.addTouchFeedback(t.target, "pending");
4187
- const o = this.config.touchHoldDuration ?? ze;
4041
+ const r = this.config.touchHoldDuration ?? ze;
4188
4042
  this.touchHoldTimer = setTimeout(() => {
4189
4043
  this.activateTouchDragMode(t, s);
4190
- }, o);
4044
+ }, r);
4191
4045
  }
4192
4046
  handleTouchMove(e) {
4193
4047
  if (e.touches.length !== 1) {
@@ -4202,7 +4056,7 @@ class He {
4202
4056
  }
4203
4057
  if (this.touchHoldTimer && this.touchStartPosition) {
4204
4058
  const s = this.config.touchMoveThreshold ?? $e;
4205
- if (ce(this.touchStartPosition, {
4059
+ if (de(this.touchStartPosition, {
4206
4060
  x: t.clientX,
4207
4061
  y: t.clientY
4208
4062
  }) > s) {
@@ -4284,8 +4138,8 @@ class He {
4284
4138
  if (!this.isPanMode || !this.panStartPosition || !this.panStartScroll) return;
4285
4139
  const s = this.callbacks.getScrollContainer?.();
4286
4140
  if (!s) return;
4287
- const r = this.panStartPosition.x - e, n = this.panStartPosition.y - t;
4288
- s.scrollLeft = this.panStartScroll.left + r, s.scrollTop = this.panStartScroll.top + n;
4141
+ const n = this.panStartPosition.x - e, i = this.panStartPosition.y - t;
4142
+ s.scrollLeft = this.panStartScroll.left + n, s.scrollTop = this.panStartScroll.top + i;
4289
4143
  }
4290
4144
  // Scroll blocking helpers
4291
4145
  applyScrollBlock() {
@@ -4339,8 +4193,8 @@ class Oe {
4339
4193
  * the scheduler does not mutate its internal events list — the consumer
4340
4194
  * receives the range and decides whether to construct an event from it.
4341
4195
  */
4342
- emitEventCreate(e, t, s, r) {
4343
- this.emit({ type: "event-create", range: e, view: t, resourceId: r, originalEvent: s });
4196
+ emitEventCreate(e, t, s, n) {
4197
+ this.emit({ type: "event-create", range: e, view: t, resourceId: n, originalEvent: s });
4344
4198
  }
4345
4199
  /**
4346
4200
  * Emit an event-update event.
@@ -4371,8 +4225,8 @@ class Oe {
4371
4225
  * the time-range selection — either may be null. Fires on every transition
4372
4226
  * so consumers can react to the selection clearing without polling.
4373
4227
  */
4374
- emitSelectionChange(e, t, s, r) {
4375
- this.emit({ type: "selection-change", selectedEvent: e, range: t, view: s, resourceId: r });
4228
+ emitSelectionChange(e, t, s, n) {
4229
+ this.emit({ type: "selection-change", selectedEvent: e, range: t, view: s, resourceId: n });
4376
4230
  }
4377
4231
  /**
4378
4232
  * Emit a `resource-create` or `group-create` *request*. Same controlled
@@ -4380,10 +4234,10 @@ class Oe {
4380
4234
  * input, so the consumer decides the id, title and placement. `parentId` is
4381
4235
  * the group to insert into — absent means root level.
4382
4236
  */
4383
- emitResourceCreate(e, t, s, r) {
4237
+ emitResourceCreate(e, t, s, n) {
4384
4238
  this.emit({
4385
4239
  type: e === "group" ? "group-create" : "resource-create",
4386
- parentId: r,
4240
+ parentId: n,
4387
4241
  view: t,
4388
4242
  originalEvent: s
4389
4243
  });
@@ -4446,10 +4300,10 @@ class $ extends he {
4446
4300
  onClose: () => {
4447
4301
  this.editorEventId = null, this.editorError = null, this.editorDraft = null, this.requestUpdate();
4448
4302
  }
4449
- }), this.editorDraft = null, this.headerResizeObserver = null, this.headerIsNarrow = !1, this.keymapView = null, this.previousIsLoading = null, this.edgeScrollFrame = null, this.edgeScrollVector = { x: 0, y: 0 }, this.edgeScrollPointer = null, this.lastEventActivation = null, this.keyboardMove = null, this.stateManager = new xe(), this.eventEmitter = new Oe(this), this.dragManager = new Le(this.stateManager), this.dragManager.setSlotResolver((e, t) => this.getSlotAtPosition(e, t)), this.boundHandleKeyDown = this.handleKeyDown.bind(this), this.boundHandleFocusIn = this.handleFocusIn.bind(this), this.boundHandleValueChange = this.handleValueChange.bind(this), this.boundHandleContextMenu = this.handleContextMenu.bind(this), this.boundHandleDblClick = this.handleNativeDblClick.bind(this), this.boundRepositionPopover = () => this.dayPopover.position(), this.boundRepositionEditor = () => this.eventEditorOverlay.position(), this.stateManager.subscribe((e) => this.onStateChange(e));
4303
+ }), this.editorDraft = null, this.headerResizeObserver = null, this.headerIsNarrow = !1, this.keymapView = null, this.previousIsLoading = null, this.edgeScrollFrame = null, this.edgeScrollVector = { x: 0, y: 0 }, this.edgeScrollPointer = null, this.lastEventActivation = null, this.keyboardMove = null, this.stateManager = new De(), this.eventEmitter = new Oe(this), this.dragManager = new Le(this.stateManager), this.dragManager.setSlotResolver((e, t) => this.getSlotAtPosition(e, t)), this.boundHandleKeyDown = this.handleKeyDown.bind(this), this.boundHandleFocusIn = this.handleFocusIn.bind(this), this.boundHandleValueChange = this.handleValueChange.bind(this), this.boundHandleContextMenu = this.handleContextMenu.bind(this), this.boundHandleDblClick = this.handleNativeDblClick.bind(this), this.boundRepositionPopover = () => this.dayPopover.position(), this.boundRepositionEditor = () => this.eventEditorOverlay.position(), this.stateManager.subscribe((e) => this.onStateChange(e));
4450
4304
  }
4451
4305
  static {
4452
- this.styles = [Re, ye, Ae];
4306
+ this.styles = [ye, be, Re];
4453
4307
  }
4454
4308
  static get observedAttributes() {
4455
4309
  return [
@@ -4484,8 +4338,8 @@ class $ extends he {
4484
4338
  break;
4485
4339
  case "first-day-of-week":
4486
4340
  if (s) {
4487
- const r = parseInt(s, 10);
4488
- Number.isInteger(r) && r >= 0 && r <= 7 && this.stateManager.setOptions({ firstDayOfWeek: r % 7 });
4341
+ const n = parseInt(s, 10);
4342
+ Number.isInteger(n) && n >= 0 && n <= 7 && this.stateManager.setOptions({ firstDayOfWeek: n % 7 });
4489
4343
  }
4490
4344
  break;
4491
4345
  case "slot-duration":
@@ -4778,18 +4632,18 @@ class $ extends he {
4778
4632
  if (!e) return k;
4779
4633
  const t = this.findResourceOrGroup(e), s = this.currentView;
4780
4634
  if (!t || !(s instanceof I)) return k;
4781
- const r = s.rowActions(t);
4782
- if (r.length === 0) return k;
4783
- const n = w(this.stateManager.getState().options.messages), o = t, i = o.eventColor ? "eventColor" : "color", a = o.eventColor ?? t.color;
4635
+ const n = s.rowActions(t);
4636
+ if (n.length === 0) return k;
4637
+ const i = w(this.stateManager.getState().options.messages), r = t, o = r.eventColor ? "eventColor" : "color", a = r.eventColor ?? t.color;
4784
4638
  return S`
4785
4639
  <div
4786
4640
  class="scheduler-row-panel"
4787
4641
  role="dialog"
4788
- aria-label=${E(n.rowMenuDialogLabel, { title: t.title })}
4642
+ aria-label=${E(i.rowMenuDialogLabel, { title: t.title })}
4789
4643
  >
4790
- ${r.map((l) => {
4644
+ ${n.map((l) => {
4791
4645
  if (l === "set-resource-color") {
4792
- const c = E(n.resourceColor, { title: t.title });
4646
+ const c = E(i.resourceColor, { title: t.title });
4793
4647
  return S`
4794
4648
  <label class="row-action row-action-color">
4795
4649
  <span>${c}</span>
@@ -4800,12 +4654,12 @@ class $ extends he {
4800
4654
  .value=${a && /^#[0-9a-f]{6}$/i.test(a) ? a : "#000000"}
4801
4655
  data-action="set-resource-color"
4802
4656
  data-resource-id=${t.id}
4803
- data-field=${i}
4657
+ data-field=${o}
4804
4658
  />
4805
4659
  </label>
4806
4660
  `;
4807
4661
  }
4808
- const d = l === "rename-resource" ? E(n.renameResource, { title: t.title }) : l === "add-resource" ? E(n.addResourceToGroup, { title: t.title }) : l === "add-group" ? E(n.addGroupToGroup, { title: t.title }) : E(n.removeResource, { title: t.title });
4662
+ const d = l === "rename-resource" ? E(i.renameResource, { title: t.title }) : l === "add-resource" ? E(i.addResourceToGroup, { title: t.title }) : l === "add-group" ? E(i.addGroupToGroup, { title: t.title }) : E(i.removeResource, { title: t.title });
4809
4663
  return S`
4810
4664
  <button
4811
4665
  type="button"
@@ -4827,20 +4681,20 @@ class $ extends he {
4827
4681
  renderDayPopover() {
4828
4682
  const e = this.popoverDate;
4829
4683
  if (!e) return k;
4830
- const t = this.stateManager.getState(), { options: s } = t, r = this.popoverScope, n = r === "month" ? this.eventsInMonth(e) : this.eventsOnDay(e), o = r === "month" ? `${h.getMonthName(e, s.locale)} ${e.getFullYear()}` : h.formatDateWithWeekday(e, s.locale), i = [...t.resourceById.values()];
4684
+ const t = this.stateManager.getState(), { options: s } = t, n = this.popoverScope, i = n === "month" ? this.eventsInMonth(e) : this.eventsOnDay(e), r = n === "month" ? `${h.getMonthName(e, s.locale)} ${e.getFullYear()}` : h.formatDateWithWeekday(e, s.locale), o = [...t.resourceById.values()];
4831
4685
  return S`
4832
4686
  <div
4833
4687
  class="scheduler-day-popover"
4834
4688
  role="dialog"
4835
- aria-label=${this.msg("dayPopoverLabel", { date: o })}
4689
+ aria-label=${this.msg("dayPopoverLabel", { date: r })}
4836
4690
  >
4837
4691
  <div class="popover-head">
4838
4692
  <div>
4839
- <div class="popover-date">${o}</div>
4693
+ <div class="popover-date">${r}</div>
4840
4694
  <div class="popover-count">
4841
4695
  ${this.msg("dayPopoverCount", {
4842
- count: n.length,
4843
- events: this.msg(n.length === 1 ? "eventSingular" : "eventPlural")
4696
+ count: i.length,
4697
+ events: this.msg(i.length === 1 ? "eventSingular" : "eventPlural")
4844
4698
  })}
4845
4699
  </div>
4846
4700
  </div>
@@ -4853,12 +4707,12 @@ class $ extends he {
4853
4707
  <span aria-hidden="true">×</span>
4854
4708
  </button>
4855
4709
  </div>
4856
- ${n.length === 0 ? S`<p class="popover-empty">${this.msg("dayPopoverEmpty")}</p>` : r === "month" ? this.renderPopoverDayGroups(n, s) : S`
4710
+ ${i.length === 0 ? S`<p class="popover-empty">${this.msg("dayPopoverEmpty")}</p>` : n === "month" ? this.renderPopoverDayGroups(i, s) : S`
4857
4711
  <ul class="popover-events">
4858
- ${n.map((a) => this.renderPopoverEvent(a, s))}
4712
+ ${i.map((a) => this.renderPopoverEvent(a, s))}
4859
4713
  </ul>
4860
4714
  `}
4861
- ${this.can("createEvent") && i.length > 0 ? S`
4715
+ ${this.can("createEvent") && o.length > 0 ? S`
4862
4716
  <label class="popover-resource">
4863
4717
  <span class="popover-resource-label">${this.msg("newEventResource")}</span>
4864
4718
  <mp-select
@@ -4866,7 +4720,7 @@ class $ extends he {
4866
4720
  input-label=${this.msg("newEventResource")}
4867
4721
  >
4868
4722
  <option value="">${this.msg("unassignedResource")}</option>
4869
- ${i.map(
4723
+ ${o.map(
4870
4724
  (a) => S`<option value=${a.id}>${a.title}</option>`
4871
4725
  )}
4872
4726
  </mp-select>
@@ -4885,7 +4739,7 @@ class $ extends he {
4885
4739
  class="popover-action"
4886
4740
  @click=${() => this.drillFromPopover()}
4887
4741
  >
4888
- ${this.msg(r === "month" ? "showMonth" : "showDay")}
4742
+ ${this.msg(n === "month" ? "showMonth" : "showDay")}
4889
4743
  </button>
4890
4744
  </div>
4891
4745
  </div>
@@ -4939,15 +4793,15 @@ class $ extends he {
4939
4793
  this.announceDenied();
4940
4794
  return;
4941
4795
  }
4942
- const t = this.shadowRoot?.querySelector(".scheduler-day-popover"), r = (t ? [...t.querySelectorAll(".popover-event")] : []).findIndex(
4943
- (n) => n.getAttribute("aria-label") === W(e, null, this.stateManager.getState().options)
4796
+ const t = this.shadowRoot?.querySelector(".scheduler-day-popover"), n = (t ? [...t.querySelectorAll(".popover-event")] : []).findIndex(
4797
+ (i) => i.getAttribute("aria-label") === W(e, null, this.stateManager.getState().options)
4944
4798
  );
4945
4799
  this.eventEmitter.emitEventDelete(e), this.updateComplete.then(
4946
4800
  () => requestAnimationFrame(() => {
4947
- const n = this.shadowRoot?.querySelector(".scheduler-day-popover");
4948
- if (!n) return;
4949
- const o = [...n.querySelectorAll(".popover-event")];
4950
- (o[Math.min(Math.max(r, 0), o.length - 1)] ?? n.querySelector(".popover-action") ?? n.querySelector(".popover-close"))?.focus();
4801
+ const i = this.shadowRoot?.querySelector(".scheduler-day-popover");
4802
+ if (!i) return;
4803
+ const r = [...i.querySelectorAll(".popover-event")];
4804
+ (r[Math.min(Math.max(n, 0), r.length - 1)] ?? i.querySelector(".popover-action") ?? i.querySelector(".popover-close"))?.focus();
4951
4805
  })
4952
4806
  );
4953
4807
  }
@@ -4957,22 +4811,22 @@ class $ extends he {
4957
4811
  * running in from last month sits under the 1st rather than vanishing).
4958
4812
  */
4959
4813
  renderPopoverDayGroups(e, t) {
4960
- const s = this.popoverDate, r = new Date(s.getFullYear(), s.getMonth(), 1), n = e.reduce((o, i) => {
4961
- const a = i.start < r ? new Date(r) : new Date(i.start);
4814
+ const s = this.popoverDate, n = new Date(s.getFullYear(), s.getMonth(), 1), i = e.reduce((r, o) => {
4815
+ const a = o.start < n ? new Date(n) : new Date(o.start);
4962
4816
  a.setHours(0, 0, 0, 0);
4963
- const l = a.getTime(), d = o.get(l) ?? { day: a, events: [] };
4964
- return d.events.push(i), o.set(l, d);
4817
+ const l = a.getTime(), d = r.get(l) ?? { day: a, events: [] };
4818
+ return d.events.push(o), r.set(l, d);
4965
4819
  }, /* @__PURE__ */ new Map());
4966
4820
  return S`
4967
4821
  <ul class="popover-events popover-day-groups">
4968
- ${[...n.values()].map(
4969
- (o) => S`
4822
+ ${[...i.values()].map(
4823
+ (r) => S`
4970
4824
  <li class="popover-day-group">
4971
4825
  <div class="popover-day-label">
4972
- ${h.formatDateWithWeekday(o.day, t.locale)}
4826
+ ${h.formatDateWithWeekday(r.day, t.locale)}
4973
4827
  </div>
4974
4828
  <ul class="popover-events">
4975
- ${o.events.map((i) => this.renderPopoverEvent(i, t))}
4829
+ ${r.events.map((o) => this.renderPopoverEvent(o, t))}
4976
4830
  </ul>
4977
4831
  </li>
4978
4832
  `
@@ -5003,7 +4857,7 @@ class $ extends he {
5003
4857
  const t = new Date(e);
5004
4858
  t.setHours(0, 0, 0, 0);
5005
4859
  const s = new Date(t);
5006
- return s.setDate(s.getDate() + 1), this.stateManager.getState().events.filter((r) => r.start < s && r.end > t).sort((r, n) => r.start.getTime() - n.start.getTime());
4860
+ return s.setDate(s.getDate() + 1), this.stateManager.getState().events.filter((n) => n.start < s && n.end > t).sort((n, i) => n.start.getTime() - i.start.getTime());
5007
4861
  }
5008
4862
  /**
5009
4863
  * Open the date popover for `day`. Anchored on an element resolved LAZILY by
@@ -5028,20 +4882,20 @@ class $ extends he {
5028
4882
  createFromPopover(e) {
5029
4883
  const t = this.popoverDate;
5030
4884
  if (!t) return;
5031
- const r = this.shadowRoot?.querySelector(
4885
+ const n = this.shadowRoot?.querySelector(
5032
4886
  "mp-select.popover-resource-select"
5033
- )?.value || void 0, n = new Date(t);
5034
- n.setHours(0, 0, 0, 0);
5035
- const o = new Date(n);
5036
- if (o.setDate(o.getDate() + 1), this.closeDayPopover(), !this.can("createEvent") || !this.allowsCreateAt({ start: n, end: o }, r)) {
4887
+ )?.value || void 0, i = new Date(t);
4888
+ i.setHours(0, 0, 0, 0);
4889
+ const r = new Date(i);
4890
+ if (r.setDate(r.getDate() + 1), this.closeDayPopover(), !this.can("createEvent") || !this.allowsCreateAt({ start: i, end: r }, n)) {
5037
4891
  this.announceDenied();
5038
4892
  return;
5039
4893
  }
5040
4894
  this.eventEmitter.emitEventCreate(
5041
- { start: n, end: o },
4895
+ { start: i, end: r },
5042
4896
  this.stateManager.getState().view,
5043
4897
  e,
5044
- r
4898
+ n
5045
4899
  );
5046
4900
  }
5047
4901
  /** "Show day" / "Show month" — the drill that matches the popover's scope. */
@@ -5054,7 +4908,7 @@ class $ extends he {
5054
4908
  /** Every event overlapping `day`'s local month, in start order. */
5055
4909
  eventsInMonth(e) {
5056
4910
  const t = new Date(e.getFullYear(), e.getMonth(), 1), s = new Date(e.getFullYear(), e.getMonth() + 1, 1);
5057
- return this.stateManager.getState().events.filter((r) => r.start < s && r.end > t).sort((r, n) => r.start.getTime() - n.start.getTime());
4911
+ return this.stateManager.getState().events.filter((n) => n.start < s && n.end > t).sort((n, i) => n.start.getTime() - i.start.getTime());
5058
4912
  }
5059
4913
  // ============================================
5060
4914
  // Built-in event editor (R20 / D12.8)
@@ -5147,14 +5001,14 @@ class $ extends he {
5147
5001
  "[data-event-id]:not(.preview)"
5148
5002
  );
5149
5003
  if (!s) {
5150
- const o = t?.closest?.(".scheduler-resource-cell")?.querySelector?.(
5004
+ const r = t?.closest?.(".scheduler-resource-cell")?.querySelector?.(
5151
5005
  ".scheduler-row-menu-button"
5152
5006
  )?.dataset.resourceId;
5153
- o && (e.preventDefault(), this.openRowMenu(o));
5007
+ r && (e.preventDefault(), this.openRowMenu(r));
5154
5008
  return;
5155
5009
  }
5156
- const r = this.getEventById(s.dataset.eventId ?? "");
5157
- !r || !this.eventEditor || !this.canOpenEditor(r) || (e.preventDefault(), this.stateManager.setSelectedEvent(r), this.tryOpenEventEditor(r));
5010
+ const n = this.getEventById(s.dataset.eventId ?? "");
5011
+ !n || !this.eventEditor || !this.canOpenEditor(n) || (e.preventDefault(), this.stateManager.setSelectedEvent(n), this.tryOpenEventEditor(n));
5158
5012
  }
5159
5013
  /**
5160
5014
  * Did this `contextmenu` come from a finger?
@@ -5206,10 +5060,10 @@ class $ extends he {
5206
5060
  renderEventEditor() {
5207
5061
  const e = this.editorEventId ? this.getEventById(this.editorEventId) : null, t = this.editorDraft;
5208
5062
  if (!e || !t) return k;
5209
- const { options: s } = this.stateManager.getState(), r = this.can("editEvent", e), n = this.editorError?.field === "title", o = this.editorError?.field === "end", i = pe(
5063
+ const { options: s } = this.stateManager.getState(), n = this.can("editEvent", e), i = this.editorError?.field === "title", r = this.editorError?.field === "end", o = pe(
5210
5064
  this.editorTitleErrorId,
5211
5065
  this.editorError?.message ?? null,
5212
- n
5066
+ i
5213
5067
  ), { canStart: a, canEnd: l, startIsMove: d } = this.editorTimeFields(e), c = t.color ?? X(
5214
5068
  e,
5215
5069
  this.stateManager.getState().resourceById,
@@ -5236,15 +5090,15 @@ class $ extends he {
5236
5090
  <span>${this.msg("editorTitleLabel")}</span>
5237
5091
  <input
5238
5092
  type="text"
5239
- class="form-control form-control-sm editor-input editor-title-input ${n ? "is-invalid" : ""}"
5093
+ class="form-control form-control-sm editor-input editor-title-input ${i ? "is-invalid" : ""}"
5240
5094
  .value=${t.title}
5241
- ?disabled=${!r}
5242
- aria-invalid=${n ? "true" : "false"}
5243
- aria-errormessage=${i.id}
5244
- aria-describedby=${i.id}
5095
+ ?disabled=${!n}
5096
+ aria-invalid=${i ? "true" : "false"}
5097
+ aria-errormessage=${o.id}
5098
+ aria-describedby=${o.id}
5245
5099
  @input=${(u) => this.updateEditorDraft({ title: u.target.value })}
5246
5100
  />
5247
- ${i.node}
5101
+ ${o.node}
5248
5102
  </label>
5249
5103
  <label class="editor-field">
5250
5104
  <span>${this.msg("editorStartLabel")}</span>
@@ -5268,8 +5122,8 @@ class $ extends he {
5268
5122
  .value=${t.end}
5269
5123
  .min=${t.start}
5270
5124
  ?disabled=${!l}
5271
- ?invalid=${o}
5272
- error-text=${o ? this.editorError.message : k}
5125
+ ?invalid=${r}
5126
+ error-text=${r ? this.editorError.message : k}
5273
5127
  @value-change=${(u) => this.onEditorEndChange(u)}
5274
5128
  input-label=${this.msg("editorEndLabel")}
5275
5129
  locale=${s.locale ?? k}
@@ -5284,7 +5138,7 @@ class $ extends he {
5284
5138
  type="color"
5285
5139
  class="form-control form-control-color editor-input editor-color-input"
5286
5140
  .value=${c}
5287
- ?disabled=${!r || t.inheritColor}
5141
+ ?disabled=${!n || t.inheritColor}
5288
5142
  @input=${(u) => this.updateEditorDraft({ color: u.target.value })}
5289
5143
  />
5290
5144
  </label>
@@ -5292,7 +5146,7 @@ class $ extends he {
5292
5146
  <mp-checkbox
5293
5147
  class="editor-inherit-input"
5294
5148
  .checked=${t.inheritColor}
5295
- ?disabled=${!r}
5149
+ ?disabled=${!n}
5296
5150
  @change=${() => this.toggleEditorColorInherit()}
5297
5151
  >${this.msg("editorInheritColor")}</mp-checkbox>
5298
5152
  </div>
@@ -5368,23 +5222,23 @@ class $ extends he {
5368
5222
  onEditorStartChange(e) {
5369
5223
  const t = e.detail, s = this.editorDraft;
5370
5224
  if (!t || !s) return;
5371
- const r = t.getTime() - s.start.getTime();
5372
- if (r === 0) return;
5373
- const n = this.editorEventId ? this.getEventById(this.editorEventId) : null;
5374
- if (!n || this.editorTimeFields(n).startIsMove) {
5375
- this.updateEditorDraft({ start: t, end: new Date(s.end.getTime() + r) });
5225
+ const n = t.getTime() - s.start.getTime();
5226
+ if (n === 0) return;
5227
+ const i = this.editorEventId ? this.getEventById(this.editorEventId) : null;
5228
+ if (!i || this.editorTimeFields(i).startIsMove) {
5229
+ this.updateEditorDraft({ start: t, end: new Date(s.end.getTime() + n) });
5376
5230
  return;
5377
5231
  }
5378
- const o = new Date(s.end.getTime() - this.minutesPerSlot() * 60 * 1e3);
5379
- if (t.getTime() <= o.getTime()) {
5232
+ const r = new Date(s.end.getTime() - this.minutesPerSlot() * 60 * 1e3);
5233
+ if (t.getTime() <= r.getTime()) {
5380
5234
  this.updateEditorDraft({ start: t });
5381
5235
  return;
5382
5236
  }
5383
- this.updateEditorDraft({ start: o });
5384
- const { options: i } = this.stateManager.getState();
5237
+ this.updateEditorDraft({ start: r });
5238
+ const { options: o } = this.stateManager.getState();
5385
5239
  this.liveAnnouncer.announce(
5386
5240
  this.msg("editorStartClamped", {
5387
- start: h.formatTime(o, i.timeFormat, i.locale)
5241
+ start: h.formatTime(r, o.timeFormat, o.locale)
5388
5242
  })
5389
5243
  );
5390
5244
  }
@@ -5410,16 +5264,16 @@ class $ extends he {
5410
5264
  onEditorEndChange(e) {
5411
5265
  const t = e.detail, s = this.editorDraft;
5412
5266
  if (!t || !s) return;
5413
- const r = new Date(s.start.getTime() + this.minutesPerSlot() * 60 * 1e3);
5414
- if (t.getTime() >= r.getTime()) {
5267
+ const n = new Date(s.start.getTime() + this.minutesPerSlot() * 60 * 1e3);
5268
+ if (t.getTime() >= n.getTime()) {
5415
5269
  this.updateEditorDraft({ end: t });
5416
5270
  return;
5417
5271
  }
5418
- this.updateEditorDraft({ end: r });
5419
- const { options: n } = this.stateManager.getState();
5272
+ this.updateEditorDraft({ end: n });
5273
+ const { options: i } = this.stateManager.getState();
5420
5274
  this.liveAnnouncer.announce(
5421
5275
  this.msg("editorEndClamped", {
5422
- end: h.formatTime(r, n.timeFormat, n.locale)
5276
+ end: h.formatTime(n, i.timeFormat, i.locale)
5423
5277
  })
5424
5278
  );
5425
5279
  }
@@ -5447,12 +5301,12 @@ class $ extends he {
5447
5301
  if (!e || !t) return;
5448
5302
  const s = { ...e };
5449
5303
  if (this.can("editEvent", e)) {
5450
- const r = t.title.trim();
5451
- if (!r) {
5304
+ const n = t.title.trim();
5305
+ if (!n) {
5452
5306
  this.refuseSave("title", this.msg("editorTitleRequired"));
5453
5307
  return;
5454
5308
  }
5455
- s.title = r, t.inheritColor ? delete s.color : t.color && (s.color = t.color);
5309
+ s.title = n, t.inheritColor ? delete s.color : t.color && (s.color = t.color);
5456
5310
  }
5457
5311
  if (this.editorTimeFields(e).canTime && (s.start = t.start, s.end = t.end), isNaN(s.start.getTime()) || isNaN(s.end.getTime()) || s.end <= s.start) {
5458
5312
  this.refuseSave("end", this.msg("editorInvalidRange"));
@@ -5489,8 +5343,8 @@ class $ extends he {
5489
5343
  ".resource-title[data-resource-id]"
5490
5344
  );
5491
5345
  if (!s) return;
5492
- const r = s.dataset.resourceId;
5493
- r && this.beginResourceRename(r);
5346
+ const n = s.dataset.resourceId;
5347
+ n && this.beginResourceRename(n);
5494
5348
  }
5495
5349
  /**
5496
5350
  * Swap a resource/group title for an inline input — file-manager's proven
@@ -5506,27 +5360,27 @@ class $ extends he {
5506
5360
  `.resource-title[data-resource-id="${this.cssEscape(e)}"]`
5507
5361
  );
5508
5362
  if (!t || !s || s.querySelector("input")) return;
5509
- const r = t.title, n = document.createElement("input");
5510
- n.type = "text", n.className = "form-control form-control-sm rename-input", n.value = r, n.setAttribute(
5363
+ const n = t.title, i = document.createElement("input");
5364
+ i.type = "text", i.className = "form-control form-control-sm rename-input", i.value = n, i.setAttribute(
5511
5365
  "aria-label",
5512
- this.msg("renameResourceLabel", { title: r })
5366
+ this.msg("renameResourceLabel", { title: n })
5513
5367
  );
5514
- let o = !1;
5515
- const i = (a) => {
5516
- if (o) return;
5517
- o = !0;
5518
- const l = n.value.trim();
5519
- s.textContent = a && l ? l : r, a && l && l !== r && (this.eventEmitter.emitResourceUpdate(t, { title: l }, new CustomEvent("rename")), this.liveAnnouncer.announce(
5520
- this.msg("resourceRenamed", { from: r, to: l })
5368
+ let r = !1;
5369
+ const o = (a) => {
5370
+ if (r) return;
5371
+ r = !0;
5372
+ const l = i.value.trim();
5373
+ s.textContent = a && l ? l : n, a && l && l !== n && (this.eventEmitter.emitResourceUpdate(t, { title: l }, new CustomEvent("rename")), this.liveAnnouncer.announce(
5374
+ this.msg("resourceRenamed", { from: n, to: l })
5521
5375
  )), requestAnimationFrame(() => {
5522
5376
  this.shadowRoot?.querySelector(
5523
5377
  `.scheduler-timeline-slot[data-resource-id="${this.cssEscape(e)}"]`
5524
5378
  )?.focus({ preventScroll: !0 });
5525
5379
  });
5526
5380
  };
5527
- n.addEventListener("keydown", (a) => {
5528
- a.stopPropagation(), a.key === "Enter" ? (a.preventDefault(), i(!0)) : a.key === "Escape" && (a.preventDefault(), i(!1));
5529
- }), n.addEventListener("blur", () => i(!0)), n.addEventListener("pointerdown", (a) => a.stopPropagation()), s.textContent = "", s.appendChild(n), n.focus(), n.select();
5381
+ i.addEventListener("keydown", (a) => {
5382
+ a.stopPropagation(), a.key === "Enter" ? (a.preventDefault(), o(!0)) : a.key === "Escape" && (a.preventDefault(), o(!1));
5383
+ }), i.addEventListener("blur", () => o(!0)), i.addEventListener("pointerdown", (a) => a.stopPropagation()), s.textContent = "", s.appendChild(i), i.focus(), i.select();
5530
5384
  }
5531
5385
  /** The in-grid pointer delete (D12.4b's revised home). */
5532
5386
  deleteFromEditor() {
@@ -5569,7 +5423,7 @@ class $ extends he {
5569
5423
  isEventSelected: (t) => this.stateManager.getState().selectedEvent?.id === t
5570
5424
  },
5571
5425
  {
5572
- onPointerDown: (t, s, r) => this.handlePointerDown(t, s, r),
5426
+ onPointerDown: (t, s, n) => this.handlePointerDown(t, s, n),
5573
5427
  onPointerMove: (t) => this.handlePointerMove(t),
5574
5428
  onPointerUp: (t) => this.handlePointerUp(t),
5575
5429
  onClick: (t, s) => this.handleClick(t, s),
@@ -5583,42 +5437,42 @@ class $ extends he {
5583
5437
  t.className = "scheduler-nav", t.setAttribute("aria-label", this.msg("navLabel"));
5584
5438
  const s = document.createElement("button");
5585
5439
  s.type = "button", s.textContent = "‹", s.setAttribute("aria-label", this.msg("previousPeriod")), s.title = this.msg("previousPeriod"), s.addEventListener("click", () => this.prev());
5586
- const r = document.createElement("button");
5587
- r.type = "button", r.textContent = "›", r.setAttribute("aria-label", this.msg("nextPeriod")), r.title = this.msg("nextPeriod"), r.addEventListener("click", () => this.next());
5588
5440
  const n = document.createElement("button");
5589
- n.type = "button", n.textContent = this.msg("today"), n.setAttribute("aria-label", this.msg("jumpToToday")), n.addEventListener("click", () => this.today()), t.appendChild(s), t.appendChild(r), t.appendChild(n);
5441
+ n.type = "button", n.textContent = "›", n.setAttribute("aria-label", this.msg("nextPeriod")), n.title = this.msg("nextPeriod"), n.addEventListener("click", () => this.next());
5442
+ const i = document.createElement("button");
5443
+ i.type = "button", i.textContent = this.msg("today"), i.setAttribute("aria-label", this.msg("jumpToToday")), i.addEventListener("click", () => this.today()), t.appendChild(s), t.appendChild(n), t.appendChild(i);
5444
+ const r = document.createElement("div");
5445
+ r.className = "scheduler-title", r.setAttribute("aria-live", "polite"), r.setAttribute("aria-atomic", "true"), this.updateTitle(r);
5590
5446
  const o = document.createElement("div");
5591
- o.className = "scheduler-title", o.setAttribute("aria-live", "polite"), o.setAttribute("aria-atomic", "true"), this.updateTitle(o);
5592
- const i = document.createElement("div");
5593
- i.className = "scheduler-view-switcher", i.setAttribute("role", "group"), i.setAttribute("aria-label", this.msg("switchView"));
5447
+ o.className = "scheduler-view-switcher", o.setAttribute("role", "group"), o.setAttribute("aria-label", this.msg("switchView"));
5594
5448
  const a = ["year", "month", "week", "day", "timeline"];
5595
5449
  for (const l of a) {
5596
5450
  const d = document.createElement("button");
5597
5451
  d.type = "button", d.textContent = this.viewLabel(l), d.dataset.view = l;
5598
5452
  const c = l === this.view;
5599
- d.setAttribute("aria-pressed", String(c)), c && d.classList.add("active"), d.addEventListener("click", () => this.changeView(l)), i.appendChild(d);
5453
+ d.setAttribute("aria-pressed", String(c)), c && d.classList.add("active"), d.addEventListener("click", () => this.changeView(l)), o.appendChild(d);
5600
5454
  }
5601
- e.appendChild(t), e.appendChild(o), e.appendChild(i);
5455
+ e.appendChild(t), e.appendChild(r), e.appendChild(o);
5602
5456
  }
5603
5457
  updateTitle(e) {
5604
5458
  const t = e ?? this.shadowRoot.querySelector(".scheduler-title");
5605
5459
  if (!t) return;
5606
- const s = this.stateManager.getState(), { date: r, view: n, options: o } = s;
5607
- let i = "";
5608
- switch (n) {
5460
+ const s = this.stateManager.getState(), { date: n, view: i, options: r } = s;
5461
+ let o = "";
5462
+ switch (i) {
5609
5463
  case "year":
5610
- i = r.getFullYear().toString();
5464
+ o = n.getFullYear().toString();
5611
5465
  break;
5612
5466
  case "month":
5613
- i = h.formatDate(r, o.locale, {
5467
+ o = h.formatDate(n, r.locale, {
5614
5468
  month: "long",
5615
5469
  year: "numeric"
5616
5470
  });
5617
5471
  break;
5618
5472
  case "week":
5619
5473
  case "timeline": {
5620
- const a = h.getWeekStart(r, this.firstDayOfWeek()), l = h.addDays(a, 6);
5621
- i = h.formatDateRange(a, l, o.locale, {
5474
+ const a = h.getWeekStart(n, this.firstDayOfWeek()), l = h.addDays(a, 6);
5475
+ o = h.formatDateRange(a, l, r.locale, {
5622
5476
  month: "short",
5623
5477
  day: "numeric",
5624
5478
  year: "numeric"
@@ -5626,7 +5480,7 @@ class $ extends he {
5626
5480
  break;
5627
5481
  }
5628
5482
  case "day":
5629
- i = h.formatDate(r, o.locale, {
5483
+ o = h.formatDate(n, r.locale, {
5630
5484
  weekday: "long",
5631
5485
  month: "long",
5632
5486
  day: "numeric",
@@ -5634,7 +5488,7 @@ class $ extends he {
5634
5488
  });
5635
5489
  break;
5636
5490
  }
5637
- t.textContent = i;
5491
+ t.textContent = o;
5638
5492
  }
5639
5493
  static {
5640
5494
  this.NARROW_HEADER_WIDTH = 560;
@@ -5648,9 +5502,9 @@ class $ extends he {
5648
5502
  if (typeof ResizeObserver > "u") return;
5649
5503
  const t = this.shadowRoot?.querySelector(".scheduler-container");
5650
5504
  this.headerResizeObserver = new ResizeObserver((s) => {
5651
- const n = (s[0]?.contentRect.width ?? e.clientWidth) < $.NARROW_HEADER_WIDTH;
5652
- n !== this.headerIsNarrow && (this.headerIsNarrow = n, requestAnimationFrame(() => {
5653
- e.toggleAttribute("data-narrow", n), t?.toggleAttribute("data-narrow", n);
5505
+ const i = (s[0]?.contentRect.width ?? e.clientWidth) < $.NARROW_HEADER_WIDTH;
5506
+ i !== this.headerIsNarrow && (this.headerIsNarrow = i, requestAnimationFrame(() => {
5507
+ e.toggleAttribute("data-narrow", i), t?.toggleAttribute("data-narrow", i);
5654
5508
  }));
5655
5509
  }), this.headerResizeObserver.observe(e);
5656
5510
  }
@@ -5667,18 +5521,18 @@ class $ extends he {
5667
5521
  this.currentView = new N(this.contentContainer, s), this.currentViewType = "month";
5668
5522
  break;
5669
5523
  case "week":
5670
- this.currentView = new Te(this.contentContainer, s), this.currentViewType = "week";
5524
+ this.currentView = new Ie(this.contentContainer, s), this.currentViewType = "week";
5671
5525
  break;
5672
5526
  case "day":
5673
- this.currentView = new Ie(this.contentContainer, s), this.currentViewType = "day";
5527
+ this.currentView = new Ae(this.contentContainer, s), this.currentViewType = "day";
5674
5528
  break;
5675
5529
  case "timeline":
5676
5530
  this.currentView = new I(this.contentContainer, s), this.currentViewType = "timeline";
5677
5531
  break;
5678
5532
  }
5679
5533
  this.currentView?.render(), t && requestAnimationFrame(() => {
5680
- const r = this.shadowRoot?.activeElement;
5681
- (!r || r === this.shadowRoot?.host) && this.focusFocusedCell();
5534
+ const n = this.shadowRoot?.activeElement;
5535
+ (!n || n === this.shadowRoot?.host) && this.focusFocusedCell();
5682
5536
  });
5683
5537
  }
5684
5538
  // ============================================
@@ -5688,13 +5542,13 @@ class $ extends he {
5688
5542
  e.isLoading !== this.previousIsLoading && (this.previousIsLoading !== null && this.liveAnnouncer.announce(this.msg(e.isLoading ? "loadingEvents" : "eventsLoaded")), this.previousIsLoading = e.isLoading), this.detectAndEmitChanges(e), this.updateUI(e), this.keymapView !== e.view && (this.keymapView = e.view, this.requestUpdate()), (this.popoverDate || this.editorEventId) && this.requestUpdate();
5689
5543
  }
5690
5544
  detectAndEmitChanges(e) {
5691
- const t = this.previousView !== null && this.previousView !== e.view, s = this.previousDate !== null && this.previousDate.getTime() !== e.date.getTime(), r = e.selectedEvent?.id ?? null, n = G(e), o = n ? `${n.start.getTime()}-${n.end.getTime()}-${e.selectionResourceId ?? ""}` : null, i = this.previousSelectedEventId !== r || this.previousRangeKey !== o;
5692
- (t || s) && this.eventEmitter.emitViewChange(e.view, e.date), i && this.eventEmitter.emitSelectionChange(
5545
+ const t = this.previousView !== null && this.previousView !== e.view, s = this.previousDate !== null && this.previousDate.getTime() !== e.date.getTime(), n = e.selectedEvent?.id ?? null, i = G(e), r = i ? `${i.start.getTime()}-${i.end.getTime()}-${e.selectionResourceId ?? ""}` : null, o = this.previousSelectedEventId !== n || this.previousRangeKey !== r;
5546
+ (t || s) && this.eventEmitter.emitViewChange(e.view, e.date), o && this.eventEmitter.emitSelectionChange(
5693
5547
  e.selectedEvent,
5694
- n,
5548
+ i,
5695
5549
  e.view,
5696
5550
  e.selectionResourceId ?? void 0
5697
- ), this.previousView = e.view, this.previousDate = new Date(e.date), this.previousSelectedEventId = r, this.previousRangeKey = o;
5551
+ ), this.previousView = e.view, this.previousDate = new Date(e.date), this.previousSelectedEventId = n, this.previousRangeKey = r;
5698
5552
  }
5699
5553
  /**
5700
5554
  * Re-apply the header's localized labels.
@@ -5710,10 +5564,10 @@ class $ extends he {
5710
5564
  if (!e) return;
5711
5565
  const t = e.querySelector(".scheduler-nav");
5712
5566
  t?.setAttribute("aria-label", this.msg("navLabel"));
5713
- const s = t?.querySelectorAll("button"), [r, n, o] = s ? [...s] : [];
5714
- r && (r.setAttribute("aria-label", this.msg("previousPeriod")), r.title = this.msg("previousPeriod")), n && (n.setAttribute("aria-label", this.msg("nextPeriod")), n.title = this.msg("nextPeriod")), o && (o.textContent = this.msg("today"), o.setAttribute("aria-label", this.msg("jumpToToday")));
5715
- const i = e.querySelector(".scheduler-view-switcher");
5716
- i?.setAttribute("aria-label", this.msg("switchView")), i?.querySelectorAll("button[data-view]").forEach((a) => {
5567
+ const s = t?.querySelectorAll("button"), [n, i, r] = s ? [...s] : [];
5568
+ n && (n.setAttribute("aria-label", this.msg("previousPeriod")), n.title = this.msg("previousPeriod")), i && (i.setAttribute("aria-label", this.msg("nextPeriod")), i.title = this.msg("nextPeriod")), r && (r.textContent = this.msg("today"), r.setAttribute("aria-label", this.msg("jumpToToday")));
5569
+ const o = e.querySelector(".scheduler-view-switcher");
5570
+ o?.setAttribute("aria-label", this.msg("switchView")), o?.querySelectorAll("button[data-view]").forEach((a) => {
5717
5571
  const l = a.dataset.view;
5718
5572
  l && (a.textContent = this.viewLabel(l));
5719
5573
  });
@@ -5721,8 +5575,8 @@ class $ extends he {
5721
5575
  updateUI(e) {
5722
5576
  if (!this.shadowRoot) return;
5723
5577
  this.updateTitle(), this.applyHeaderLabels(), this.shadowRoot.querySelectorAll(".scheduler-view-switcher button").forEach((s) => {
5724
- const r = s, n = r.dataset.view === e.view;
5725
- r.classList.toggle("active", n), r.setAttribute("aria-pressed", String(n));
5578
+ const n = s, i = n.dataset.view === e.view;
5579
+ n.classList.toggle("active", i), n.setAttribute("aria-pressed", String(i));
5726
5580
  }), this.currentView && (this.currentViewType !== e.view ? this.renderView() : e.dragState || e.previewEvent ? this.scheduleDragUpdate(e) : this.currentView.update(e));
5727
5581
  }
5728
5582
  scheduleDragUpdate(e) {
@@ -5785,10 +5639,10 @@ class $ extends he {
5785
5639
  this.stopEdgeScroll();
5786
5640
  return;
5787
5641
  }
5788
- const s = t.getBoundingClientRect(), r = $.EDGE_SCROLL_ZONE_PX, n = $.EDGE_SCROLL_MAX_PX, o = (i, a, l) => i < a + r ? -Math.min(1, (a + r - i) / r) * n : i > l - r ? Math.min(1, (i - (l - r)) / r) * n : 0;
5642
+ const s = t.getBoundingClientRect(), n = $.EDGE_SCROLL_ZONE_PX, i = $.EDGE_SCROLL_MAX_PX, r = (o, a, l) => o < a + n ? -Math.min(1, (a + n - o) / n) * i : o > l - n ? Math.min(1, (o - (l - n)) / n) * i : 0;
5789
5643
  if (this.edgeScrollVector = {
5790
- x: o(e.clientX, s.left, s.right),
5791
- y: o(e.clientY, s.top, s.bottom)
5644
+ x: r(e.clientX, s.left, s.right),
5645
+ y: r(e.clientY, s.top, s.bottom)
5792
5646
  }, this.edgeScrollPointer = e, this.edgeScrollVector.x === 0 && this.edgeScrollVector.y === 0) {
5793
5647
  this.stopEdgeScroll();
5794
5648
  return;
@@ -5800,8 +5654,8 @@ class $ extends he {
5800
5654
  this.edgeScrollFrame = null;
5801
5655
  const e = this.contentContainer, t = this.edgeScrollPointer;
5802
5656
  if (!e || !t || !this.dragManager.isDragging()) return;
5803
- const s = e.scrollLeft, r = e.scrollTop;
5804
- e.scrollLeft = s + this.edgeScrollVector.x, e.scrollTop = r + this.edgeScrollVector.y, !(e.scrollLeft === s && e.scrollTop === r) && (this.dragManager.handlePointerMove(t), this.scheduleEdgeScroll());
5657
+ const s = e.scrollLeft, n = e.scrollTop;
5658
+ e.scrollLeft = s + this.edgeScrollVector.x, e.scrollTop = n + this.edgeScrollVector.y, !(e.scrollLeft === s && e.scrollTop === n) && (this.dragManager.handlePointerMove(t), this.scheduleEdgeScroll());
5805
5659
  });
5806
5660
  }
5807
5661
  stopEdgeScroll() {
@@ -5811,8 +5665,8 @@ class $ extends he {
5811
5665
  this.DBLCLICK_WINDOW_MS = 500;
5812
5666
  }
5813
5667
  registerEventActivation(e, t) {
5814
- const s = Date.now(), r = this.lastEventActivation;
5815
- this.lastEventActivation = { eventId: e.id, time: s }, r && r.eventId === e.id && s - r.time < $.DBLCLICK_WINDOW_MS && (this.lastEventActivation = null, this.eventEmitter.emitEventDblClick(e, t), this.tryOpenEventEditor(e));
5668
+ const s = Date.now(), n = this.lastEventActivation;
5669
+ this.lastEventActivation = { eventId: e.id, time: s }, n && n.eventId === e.id && s - n.time < $.DBLCLICK_WINDOW_MS && (this.lastEventActivation = null, this.eventEmitter.emitEventDblClick(e, t), this.tryOpenEventEditor(e));
5816
5670
  }
5817
5671
  handleDragComplete(e, t) {
5818
5672
  if (e.wasClick) {
@@ -5854,25 +5708,25 @@ class $ extends he {
5854
5708
  handleClick(e, t) {
5855
5709
  const s = e.target;
5856
5710
  if (this.handleResourceAction(s, e.originalEvent)) return;
5857
- const r = s.closest(".expand-toggle");
5858
- if (r) {
5859
- const a = r.dataset.groupId;
5711
+ const n = s.closest(".expand-toggle");
5712
+ if (n) {
5713
+ const a = n.dataset.groupId;
5860
5714
  if (a) {
5861
5715
  this.stateManager.toggleGroupCollapse(a), this.renderView();
5862
5716
  return;
5863
5717
  }
5864
5718
  }
5865
- const n = s.closest(".scheduler-more-link");
5866
- if (n) {
5867
- const a = n.dataset.date;
5719
+ const i = s.closest(".scheduler-more-link");
5720
+ if (i) {
5721
+ const a = i.dataset.date;
5868
5722
  if (a) {
5869
5723
  this.handleMoreLink(a);
5870
5724
  return;
5871
5725
  }
5872
5726
  }
5873
- const o = s.closest("[data-date]");
5874
- if (o) {
5875
- const a = o.dataset.date;
5727
+ const r = s.closest("[data-date]");
5728
+ if (r) {
5729
+ const a = r.dataset.date;
5876
5730
  if (a) {
5877
5731
  const l = this.parseDayKey(a);
5878
5732
  if (this.eventEmitter.emitDateClick(l, e.originalEvent), s.closest(".day-number")) {
@@ -5886,11 +5740,11 @@ class $ extends he {
5886
5740
  }
5887
5741
  }
5888
5742
  }
5889
- const i = s.closest(
5743
+ const o = s.closest(
5890
5744
  ".scheduler-year-month-header"
5891
5745
  );
5892
- if (i) {
5893
- const a = i.dataset.month;
5746
+ if (o) {
5747
+ const a = o.dataset.month;
5894
5748
  a && (this.stateManager.setDate(this.parseDayKey(a)), this.stateManager.setView("month"));
5895
5749
  }
5896
5750
  t.type === "event" && t.event && (this.stateManager.setSelectedEvent(t.event), this.registerEventActivation(t.event, e.originalEvent));
@@ -5906,24 +5760,24 @@ class $ extends he {
5906
5760
  handleResourceAction(e, t) {
5907
5761
  const s = e.closest("[data-action]");
5908
5762
  if (!s) return !1;
5909
- const { action: r, parentId: n, resourceId: o } = s.dataset, i = this.stateManager.getState().view;
5910
- switch (r) {
5763
+ const { action: n, parentId: i, resourceId: r } = s.dataset, o = this.stateManager.getState().view;
5764
+ switch (n) {
5911
5765
  // The trigger itself is not a request — it opens the panel that carries
5912
5766
  // them. Handled here so the click never falls through to the grid.
5913
5767
  case "row-menu":
5914
- return o && this.openRowMenu(o), !0;
5768
+ return r && this.openRowMenu(r), !0;
5915
5769
  // Starts the same inline edit double-click and F2 already start. The panel
5916
5770
  // closes WITHOUT returning focus first: `beginResourceRename` focuses the
5917
5771
  // input it creates, and handing focus back to the trigger on the way there
5918
5772
  // would be a visible detour.
5919
5773
  case "rename-resource":
5920
- return o && this.can("updateResource") && (this.rowMenuOverlay.close(!1), this.beginResourceRename(o)), !0;
5774
+ return r && this.can("updateResource") && (this.rowMenuOverlay.close(!1), this.beginResourceRename(r)), !0;
5921
5775
  case "add-resource":
5922
- return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource", i, t, n), !0;
5776
+ return this.can("createResource") && this.eventEmitter.emitResourceCreate("resource", o, t, i), !0;
5923
5777
  case "add-group":
5924
- return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group", i, t, n), !0;
5778
+ return this.can("createGroup") && this.eventEmitter.emitResourceCreate("group", o, t, i), !0;
5925
5779
  case "delete-resource": {
5926
- const a = o ? this.findResourceOrGroup(o) : null;
5780
+ const a = r ? this.findResourceOrGroup(r) : null;
5927
5781
  return a && this.can("deleteResource") && this.eventEmitter.emitResourceDelete(a, t), !0;
5928
5782
  }
5929
5783
  // The colour input reports through `change`, not `click` — a click merely
@@ -5943,12 +5797,12 @@ class $ extends he {
5943
5797
  handleValueChange(e) {
5944
5798
  const t = e.composedPath?.()[0] ?? e.target;
5945
5799
  if (!t || t.dataset.action !== "set-resource-color" || !this.can("updateResource")) return;
5946
- const { resourceId: s, field: r } = t.dataset, n = s ? this.findResourceOrGroup(s) : null;
5947
- if (!n) return;
5948
- const o = t.value;
5800
+ const { resourceId: s, field: n } = t.dataset, i = s ? this.findResourceOrGroup(s) : null;
5801
+ if (!i) return;
5802
+ const r = t.value;
5949
5803
  this.eventEmitter.emitResourceUpdate(
5950
- n,
5951
- r === "eventColor" ? { eventColor: o } : { color: o },
5804
+ i,
5805
+ n === "eventColor" ? { eventColor: r } : { color: r },
5952
5806
  e
5953
5807
  );
5954
5808
  }
@@ -5971,13 +5825,13 @@ class $ extends he {
5971
5825
  handleFocusIn(e) {
5972
5826
  const s = (e.composedPath?.() ?? [])[0] ?? e.target;
5973
5827
  if (!s || !s.dataset) return;
5974
- const r = s.dataset.eventId;
5975
- if (!r || !s.classList.contains("scheduler-event") && !s.classList.contains("scheduler-timeline-event") && !s.classList.contains("scheduler-month-event"))
5828
+ const n = s.dataset.eventId;
5829
+ if (!n || !s.classList.contains("scheduler-event") && !s.classList.contains("scheduler-timeline-event") && !s.classList.contains("scheduler-month-event"))
5976
5830
  return;
5977
- const n = this.getEventById(r);
5978
- n && this.stateManager.getState().selectedEvent?.id !== n.id && (this.stateManager.setSelectedEvent(n), this.eventEmitter.emitEventSelected(n, e), requestAnimationFrame(() => {
5979
- const o = `[data-event-id="${this.cssEscape(n.id)}"]`;
5980
- this.shadowRoot?.querySelector(o)?.focus({ preventScroll: !0 });
5831
+ const i = this.getEventById(n);
5832
+ i && this.stateManager.getState().selectedEvent?.id !== i.id && (this.stateManager.setSelectedEvent(i), this.eventEmitter.emitEventSelected(i, e), requestAnimationFrame(() => {
5833
+ const r = `[data-event-id="${this.cssEscape(i.id)}"]`;
5834
+ this.shadowRoot?.querySelector(r)?.focus({ preventScroll: !0 });
5981
5835
  }));
5982
5836
  }
5983
5837
  /**
@@ -5991,8 +5845,8 @@ class $ extends he {
5991
5845
  * Escape arbitration, which is the reason the guards exist.
5992
5846
  */
5993
5847
  eventInsidePanel(e, t) {
5994
- const s = e.composedPath?.() ?? [], r = this.shadowRoot?.querySelector(t);
5995
- return r ? s.includes(r) : !1;
5848
+ const s = e.composedPath?.() ?? [], n = this.shadowRoot?.querySelector(t);
5849
+ return n ? s.includes(n) : !1;
5996
5850
  }
5997
5851
  handleKeyDown(e) {
5998
5852
  if (this.rowMenuOverlay.isOpen) {
@@ -6096,7 +5950,7 @@ class $ extends he {
6096
5950
  */
6097
5951
  can(e, t) {
6098
5952
  const { options: s } = this.stateManager.getState();
6099
- return ie(e, {
5953
+ return re(e, {
6100
5954
  permissions: this.effectivePermissions(s),
6101
5955
  event: t ?? null
6102
5956
  });
@@ -6203,17 +6057,17 @@ class $ extends he {
6203
6057
  * No wrap at the ends — matches the APG list/feed pattern.
6204
6058
  */
6205
6059
  focusAdjacentEvent(e, t) {
6206
- const r = [...this.stateManager.getState().events].sort((l, d) => {
6060
+ const n = [...this.stateManager.getState().events].sort((l, d) => {
6207
6061
  const c = l.start.getTime() - d.start.getTime();
6208
6062
  return c !== 0 ? c : l.id.localeCompare(d.id);
6209
- }), n = r.findIndex((l) => l.id === e.id);
6210
- if (n < 0) return;
6211
- const o = r[n + t];
6063
+ }), i = n.findIndex((l) => l.id === e.id);
6064
+ if (i < 0) return;
6065
+ const r = n[i + t];
6066
+ if (!r) return;
6067
+ const o = this.shadowRoot;
6212
6068
  if (!o) return;
6213
- const i = this.shadowRoot;
6214
- if (!i) return;
6215
- i.querySelector(
6216
- `[data-event-id="${this.cssEscape(o.id)}"]`
6069
+ o.querySelector(
6070
+ `[data-event-id="${this.cssEscape(r.id)}"]`
6217
6071
  )?.focus({ preventScroll: !1 });
6218
6072
  }
6219
6073
  handleCellKeyDown(e) {
@@ -6227,37 +6081,37 @@ class $ extends he {
6227
6081
  return;
6228
6082
  }
6229
6083
  if (t.focusedCell || this.initFocusedCellFromActive(), e.key === "F2" && t.view === "timeline") {
6230
- const o = this.stateManager.getState().focusedResourceId;
6231
- o && (e.preventDefault(), this.beginResourceRename(o));
6084
+ const r = this.stateManager.getState().focusedResourceId;
6085
+ r && (e.preventDefault(), this.beginResourceRename(r));
6232
6086
  return;
6233
6087
  }
6234
- const s = e.shiftKey, r = e.ctrlKey || e.metaKey, n = t.view === "timeline";
6088
+ const s = e.shiftKey, n = e.ctrlKey || e.metaKey, i = t.view === "timeline";
6235
6089
  switch (e.key) {
6236
6090
  case "ArrowUp":
6237
- e.preventDefault(), n ? this.moveCellByResource(-1, s) : this.moveCellByTime(-1, s);
6091
+ e.preventDefault(), i ? this.moveCellByResource(-1, s) : this.moveCellByTime(-1, s);
6238
6092
  break;
6239
6093
  case "ArrowDown":
6240
- e.preventDefault(), n ? this.moveCellByResource(1, s) : this.moveCellByTime(1, s);
6094
+ e.preventDefault(), i ? this.moveCellByResource(1, s) : this.moveCellByTime(1, s);
6241
6095
  break;
6242
6096
  case "ArrowLeft": {
6243
- if (e.preventDefault(), !n) {
6097
+ if (e.preventDefault(), !i) {
6244
6098
  this.moveCellByDay(-1, s);
6245
6099
  break;
6246
6100
  }
6247
- const o = this.stateManager.getState().focusedCell?.start.getTime();
6101
+ const r = this.stateManager.getState().focusedCell?.start.getTime();
6248
6102
  this.moveCellByTime(-1, s);
6249
- const i = this.stateManager.getState().focusedCell?.start.getTime();
6250
- o !== void 0 && o === i && !s && this.focusRowTrigger();
6103
+ const o = this.stateManager.getState().focusedCell?.start.getTime();
6104
+ r !== void 0 && r === o && !s && this.focusRowTrigger();
6251
6105
  break;
6252
6106
  }
6253
6107
  case "ArrowRight":
6254
- e.preventDefault(), n ? this.moveCellByTime(1, s) : this.moveCellByDay(1, s);
6108
+ e.preventDefault(), i ? this.moveCellByTime(1, s) : this.moveCellByDay(1, s);
6255
6109
  break;
6256
6110
  case "Home":
6257
- e.preventDefault(), r ? this.moveCellToViewExtreme("start", s) : this.moveCellToColumnExtreme("start", s);
6111
+ e.preventDefault(), n ? this.moveCellToViewExtreme("start", s) : this.moveCellToColumnExtreme("start", s);
6258
6112
  break;
6259
6113
  case "End":
6260
- e.preventDefault(), r ? this.moveCellToViewExtreme("end", s) : this.moveCellToColumnExtreme("end", s);
6114
+ e.preventDefault(), n ? this.moveCellToViewExtreme("end", s) : this.moveCellToColumnExtreme("end", s);
6261
6115
  break;
6262
6116
  case "PageUp":
6263
6117
  e.preventDefault(), this.moveCellByPeriod(-1);
@@ -6283,8 +6137,8 @@ class $ extends he {
6283
6137
  if (!e) return;
6284
6138
  const t = e.dataset.start, s = e.dataset.end;
6285
6139
  if (!t || !s) return;
6286
- const r = { start: new Date(t), end: new Date(s) }, n = e.dataset.resourceId ?? null;
6287
- this.stateManager.setFocusedCell(r, n, !0);
6140
+ const n = { start: new Date(t), end: new Date(s) }, i = e.dataset.resourceId ?? null;
6141
+ this.stateManager.setFocusedCell(n, i, !0);
6288
6142
  }
6289
6143
  /**
6290
6144
  * Month-view keyboard handler (PRD scheduler-controlled-selection §5.1).
@@ -6387,12 +6241,12 @@ class $ extends he {
6387
6241
  t && this.stateManager.setFocusedDate(this.parseDayKey(t));
6388
6242
  }
6389
6243
  moveFocusedDateByDays(e) {
6390
- const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, r = new Date(s);
6391
- r.setDate(r.getDate() + e), this.commitFocusedDate(r);
6244
+ const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, n = new Date(s);
6245
+ n.setDate(n.getDate() + e), this.commitFocusedDate(n);
6392
6246
  }
6393
6247
  moveFocusedDateByMonths(e) {
6394
- const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, r = new Date(s);
6395
- r.setMonth(r.getMonth() + e), this.commitFocusedDate(r);
6248
+ const t = this.stateManager.getState(), s = t.focusedDate ?? t.date, n = new Date(s);
6249
+ n.setMonth(n.getMonth() + e), this.commitFocusedDate(n);
6396
6250
  }
6397
6251
  /**
6398
6252
  * Apply a focused-date update. If the new date crosses the displayed
@@ -6415,8 +6269,8 @@ class $ extends he {
6415
6269
  scrollAndFocusDateCell(e) {
6416
6270
  const t = this.stateManager.getState(), s = this.shadowRoot;
6417
6271
  if (!s) return;
6418
- const r = `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`, n = t.view === "year" ? `scheduler-cell-y-${r}` : `scheduler-cell-m-${r}-${String(e.getDate()).padStart(2, "0")}`, o = s.getElementById(n);
6419
- o && (o.focus({ preventScroll: !0 }), typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest", inline: "nearest" }));
6272
+ const n = `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}`, i = t.view === "year" ? `scheduler-cell-y-${n}` : `scheduler-cell-m-${n}-${String(e.getDate()).padStart(2, "0")}`, r = s.getElementById(i);
6273
+ r && (r.focus({ preventScroll: !0 }), typeof r.scrollIntoView == "function" && r.scrollIntoView({ block: "nearest", inline: "nearest" }));
6420
6274
  }
6421
6275
  /**
6422
6276
  * Emit `event-create` covering the focused day (month view) or focused
@@ -6424,81 +6278,81 @@ class $ extends he {
6424
6278
  * scheduler-controlled-selection — consumer constructs the actual event.
6425
6279
  */
6426
6280
  commitFocusedDateAsCreate(e, t) {
6427
- const s = this.stateManager.getState(), r = s.focusedDate;
6428
- if (!r) return;
6429
- const n = new Date(r);
6430
- n.setHours(0, 0, 0, 0);
6431
- const o = new Date(n);
6432
- if (t === "day" ? o.setDate(o.getDate() + 1) : o.setMonth(o.getMonth() + 1), !this.can("createEvent") || !this.allowsCreateAt({ start: n, end: o })) {
6281
+ const s = this.stateManager.getState(), n = s.focusedDate;
6282
+ if (!n) return;
6283
+ const i = new Date(n);
6284
+ i.setHours(0, 0, 0, 0);
6285
+ const r = new Date(i);
6286
+ if (t === "day" ? r.setDate(r.getDate() + 1) : r.setMonth(r.getMonth() + 1), !this.can("createEvent") || !this.allowsCreateAt({ start: i, end: r })) {
6433
6287
  this.announceDenied();
6434
6288
  return;
6435
6289
  }
6436
6290
  this.eventEmitter.emitEventCreate(
6437
- { start: n, end: o },
6291
+ { start: i, end: r },
6438
6292
  s.view,
6439
6293
  e
6440
6294
  );
6441
6295
  }
6442
6296
  moveCellByTime(e, t) {
6443
- const s = this.stateManager.getState(), r = s.focusedCell;
6444
- if (!r) return;
6445
- const n = (s.options.slotDuration ?? 1800) * 1e3, o = new Date(r.start.getTime() + e * n), i = new Date(o.getTime() + n);
6446
- this.cellIsWithinView(o, s) && this.commitFocusMove({ start: o, end: i }, s.focusedResourceId, t);
6297
+ const s = this.stateManager.getState(), n = s.focusedCell;
6298
+ if (!n) return;
6299
+ const i = (s.options.slotDuration ?? 1800) * 1e3, r = new Date(n.start.getTime() + e * i), o = new Date(r.getTime() + i);
6300
+ this.cellIsWithinView(r, s) && this.commitFocusMove({ start: r, end: o }, s.focusedResourceId, t);
6447
6301
  }
6448
6302
  /** Week view ArrowLeft/Right: ±1 day, same time-of-day. No-op on day view. */
6449
6303
  moveCellByDay(e, t) {
6450
- const s = this.stateManager.getState(), r = s.focusedCell;
6451
- if (!r || s.view !== "week") return;
6452
- const n = (s.options.slotDuration ?? 1800) * 1e3, o = new Date(r.start);
6453
- o.setDate(o.getDate() + e);
6454
- const i = new Date(o.getTime() + n);
6455
- this.cellIsWithinView(o, s) && this.commitFocusMove({ start: o, end: i }, null, t);
6304
+ const s = this.stateManager.getState(), n = s.focusedCell;
6305
+ if (!n || s.view !== "week") return;
6306
+ const i = (s.options.slotDuration ?? 1800) * 1e3, r = new Date(n.start);
6307
+ r.setDate(r.getDate() + e);
6308
+ const o = new Date(r.getTime() + i);
6309
+ this.cellIsWithinView(r, s) && this.commitFocusMove({ start: r, end: o }, null, t);
6456
6310
  }
6457
6311
  /** Timeline ArrowUp/Down: ±1 resource, same time-of-day. PRD D1: cross-resource
6458
6312
  * Shift+Arrow is intentionally ignored (resource is categorical). */
6459
6313
  moveCellByResource(e, t) {
6460
- const s = this.stateManager.getState(), r = s.focusedCell;
6461
- if (!r || s.view !== "timeline" || t) return;
6462
- const n = this.adjacentRow(s.focusedResourceId, e, s, !0);
6463
- n !== void 0 && this.commitFocusMove(r, n, !1);
6314
+ const s = this.stateManager.getState(), n = s.focusedCell;
6315
+ if (!n || s.view !== "timeline" || t) return;
6316
+ const i = this.adjacentRow(s.focusedResourceId, e, s, !0);
6317
+ i !== void 0 && this.commitFocusMove(n, i, !1);
6464
6318
  }
6465
6319
  moveCellToColumnExtreme(e, t) {
6466
- const s = this.stateManager.getState(), r = s.focusedCell;
6467
- if (!r) return;
6468
- const n = new Date(r.start);
6469
- n.setHours(0, 0, 0, 0);
6470
- const o = h.getTimeSlots(
6471
- n,
6320
+ const s = this.stateManager.getState(), n = s.focusedCell;
6321
+ if (!n) return;
6322
+ const i = new Date(n.start);
6323
+ i.setHours(0, 0, 0, 0);
6324
+ const r = h.getTimeSlots(
6325
+ i,
6472
6326
  s.options.slotDuration,
6473
6327
  s.options.slotMinTime,
6474
6328
  s.options.slotMaxTime
6475
- ), i = e === "start" ? o[0] : o[o.length - 1];
6476
- i && this.commitFocusMove(i, s.focusedResourceId, t);
6329
+ ), o = e === "start" ? r[0] : r[r.length - 1];
6330
+ o && this.commitFocusMove(o, s.focusedResourceId, t);
6477
6331
  }
6478
6332
  moveCellToViewExtreme(e, t) {
6479
6333
  const s = this.stateManager.getState();
6480
- let r = null, n = s.focusedResourceId;
6334
+ let n = null, i = s.focusedResourceId;
6481
6335
  switch (s.view) {
6482
6336
  case "day": {
6483
- const o = h.getTimeSlots(s.date, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
6484
- r = e === "start" ? o[0] : o[o.length - 1];
6337
+ const r = h.getTimeSlots(s.date, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
6338
+ n = e === "start" ? r[0] : r[r.length - 1];
6485
6339
  break;
6486
6340
  }
6487
6341
  case "week": {
6488
- const o = h.getWeekDays(s.date, this.firstDayOfWeek()), i = e === "start" ? o[0] : o[6], a = h.getTimeSlots(i, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
6489
- r = e === "start" ? a[0] : a[a.length - 1];
6342
+ const r = h.getWeekDays(s.date, this.firstDayOfWeek()), o = e === "start" ? r[0] : r[6], a = h.getTimeSlots(o, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
6343
+ n = e === "start" ? a[0] : a[a.length - 1];
6490
6344
  break;
6491
6345
  }
6492
6346
  case "timeline": {
6493
- const o = this.navigableRows(s, !0);
6494
- if (o.length === 0) return;
6495
- n = e === "start" ? o[0] : o[o.length - 1];
6496
- const i = h.getWeekDays(s.date, this.firstDayOfWeek()), a = e === "start" ? i[0] : i[6], l = h.getTimeSlots(a, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
6497
- r = e === "start" ? l[0] : l[l.length - 1];
6347
+ const r = this.navigableRows(s, !0);
6348
+ if (r.length === 0) return;
6349
+ i = e === "start" ? r[0] : r[r.length - 1];
6350
+ const o = h.getWeekDays(s.date, this.firstDayOfWeek()), a = e === "start" ? o[0] : o[6], l = h.getTimeSlots(a, s.options.slotDuration, s.options.slotMinTime, s.options.slotMaxTime);
6351
+ n = e === "start" ? l[0] : l[l.length - 1];
6498
6352
  break;
6499
6353
  }
6500
6354
  }
6501
- r && this.commitFocusMove(r, n, t);
6355
+ n && this.commitFocusMove(n, i, t);
6502
6356
  }
6503
6357
  /**
6504
6358
  * PageUp/PageDown — advance one period (week or day) and re-focus the same
@@ -6506,17 +6360,17 @@ class $ extends he {
6506
6360
  * crossing a period boundary breaks the linear-range invariant.
6507
6361
  */
6508
6362
  moveCellByPeriod(e) {
6509
- const t = this.stateManager.getState(), s = t.focusedCell, r = t.date;
6363
+ const t = this.stateManager.getState(), s = t.focusedCell, n = t.date;
6510
6364
  if (e > 0 ? this.next() : this.prev(), !s) return;
6511
- const n = this.stateManager.getState();
6512
- let o;
6513
- if (n.view === "day")
6514
- o = new Date(n.date), o.setHours(s.start.getHours(), s.start.getMinutes(), s.start.getSeconds(), 0);
6365
+ const i = this.stateManager.getState();
6366
+ let r;
6367
+ if (i.view === "day")
6368
+ r = new Date(i.date), r.setHours(s.start.getHours(), s.start.getMinutes(), s.start.getSeconds(), 0);
6515
6369
  else {
6516
- const l = h.getWeekDays(r, this.firstDayOfWeek()), d = h.getWeekDays(n.date, this.firstDayOfWeek()), c = l.findIndex((v) => h.isSameDay(v, s.start)), u = d[Math.max(0, c)] ?? d[0];
6517
- o = new Date(u), o.setHours(s.start.getHours(), s.start.getMinutes(), s.start.getSeconds(), 0);
6370
+ const l = h.getWeekDays(n, this.firstDayOfWeek()), d = h.getWeekDays(i.date, this.firstDayOfWeek()), c = l.findIndex((m) => h.isSameDay(m, s.start)), u = d[Math.max(0, c)] ?? d[0];
6371
+ r = new Date(u), r.setHours(s.start.getHours(), s.start.getMinutes(), s.start.getSeconds(), 0);
6518
6372
  }
6519
- const i = (n.options.slotDuration ?? 1800) * 1e3, a = { start: o, end: new Date(o.getTime() + i) };
6373
+ const o = (i.options.slotDuration ?? 1800) * 1e3, a = { start: r, end: new Date(r.getTime() + o) };
6520
6374
  this.commitFocusMove(a, t.focusedResourceId, !1);
6521
6375
  }
6522
6376
  /**
@@ -6525,36 +6379,36 @@ class $ extends he {
6525
6379
  * focused cell or selection range.
6526
6380
  */
6527
6381
  commitFocusMove(e, t, s) {
6528
- const r = this.stateManager.getState(), n = r.options.slotDuration ?? 1800;
6382
+ const n = this.stateManager.getState(), i = n.options.slotDuration ?? 1800;
6529
6383
  if (s) {
6530
6384
  this.stateManager.extendSelection(e, t), this.stateManager.setFocusedCell(e, t, !1);
6531
- const o = this.stateManager.getState();
6532
- this.liveAnnouncer.announce(De(o, n));
6385
+ const r = this.stateManager.getState();
6386
+ this.liveAnnouncer.announce(Se(r, i));
6533
6387
  } else {
6534
6388
  this.stateManager.setFocusedCell(e, t, !0);
6535
- const o = this.getResourceTitle(t);
6536
- this.liveAnnouncer.announce(q(e, r.options, o));
6389
+ const r = this.getResourceTitle(t);
6390
+ this.liveAnnouncer.announce(q(e, n.options, r));
6537
6391
  }
6538
6392
  this.scrollAndFocusCell(e, t);
6539
6393
  }
6540
6394
  cellIsWithinView(e, t) {
6541
6395
  switch (t.view) {
6542
6396
  case "day": {
6543
- const s = this.parseTimeOnDay(t.date, t.options.slotMinTime), r = this.parseTimeOnDay(t.date, t.options.slotMaxTime);
6544
- return e.getTime() >= s.getTime() && e.getTime() < r.getTime();
6397
+ const s = this.parseTimeOnDay(t.date, t.options.slotMinTime), n = this.parseTimeOnDay(t.date, t.options.slotMaxTime);
6398
+ return e.getTime() >= s.getTime() && e.getTime() < n.getTime();
6545
6399
  }
6546
6400
  case "week":
6547
6401
  case "timeline": {
6548
- const s = h.getWeekDays(t.date, this.firstDayOfWeek()), r = this.parseTimeOnDay(s[0], t.options.slotMinTime), n = this.parseTimeOnDay(s[6], t.options.slotMaxTime);
6549
- return e.getTime() >= r.getTime() && e.getTime() < n.getTime();
6402
+ const s = h.getWeekDays(t.date, this.firstDayOfWeek()), n = this.parseTimeOnDay(s[0], t.options.slotMinTime), i = this.parseTimeOnDay(s[6], t.options.slotMaxTime);
6403
+ return e.getTime() >= n.getTime() && e.getTime() < i.getTime();
6550
6404
  }
6551
6405
  default:
6552
6406
  return !1;
6553
6407
  }
6554
6408
  }
6555
6409
  parseTimeOnDay(e, t) {
6556
- const [s, r, n] = (t ?? "00:00:00").split(":").map(Number), o = new Date(e);
6557
- return o.setHours(0, 0, 0, 0), o.setSeconds((s ?? 0) * 3600 + (r ?? 0) * 60 + (n ?? 0)), o;
6410
+ const [s, n, i] = (t ?? "00:00:00").split(":").map(Number), r = new Date(e);
6411
+ return r.setHours(0, 0, 0, 0), r.setSeconds((s ?? 0) * 3600 + (n ?? 0) * 60 + (i ?? 0)), r;
6558
6412
  }
6559
6413
  /**
6560
6414
  * Walk the timeline's RENDERED row order: visible leaf resources, then the
@@ -6566,14 +6420,14 @@ class $ extends he {
6566
6420
  * The old version returned `null` for BOTH of the last two, which is exactly
6567
6421
  * why the bucket was unreachable by keyboard.
6568
6422
  */
6569
- adjacentRow(e, t, s, r) {
6570
- const n = this.navigableRows(s, r);
6571
- if (n.length === 0) return;
6572
- const o = n.indexOf(e);
6573
- if (o < 0) return n[0];
6574
- const i = o + t;
6575
- if (!(i < 0 || i >= n.length))
6576
- return n[i];
6423
+ adjacentRow(e, t, s, n) {
6424
+ const i = this.navigableRows(s, n);
6425
+ if (i.length === 0) return;
6426
+ const r = i.indexOf(e);
6427
+ if (r < 0) return i[0];
6428
+ const o = r + t;
6429
+ if (!(o < 0 || o >= i.length))
6430
+ return i[o];
6577
6431
  }
6578
6432
  /**
6579
6433
  * The rows a keyboard user can land on, in the order the timeline draws them.
@@ -6586,7 +6440,7 @@ class $ extends he {
6586
6440
  * group must never be offered as a destination there.
6587
6441
  */
6588
6442
  navigableRows(e, t) {
6589
- const s = O.flatten(e.resources, e.collapsedGroups).filter((r) => r.visible && (t || oe(r.item))).map((r) => r.item.id);
6443
+ const s = O.flatten(e.resources, e.collapsedGroups).filter((n) => n.visible && (t || ie(n.item))).map((n) => n.item.id);
6590
6444
  return (e.eventsByResource.get(null) ?? []).length > 0 && s.push(null), s;
6591
6445
  }
6592
6446
  /**
@@ -6598,7 +6452,7 @@ class $ extends he {
6598
6452
  getResourceTitle(e) {
6599
6453
  if (!e) return null;
6600
6454
  const t = this.stateManager.getState();
6601
- return O.flatten(t.resources, t.collapsedGroups).find((r) => r.item.id === e)?.item.title ?? null;
6455
+ return O.flatten(t.resources, t.collapsedGroups).find((n) => n.item.id === e)?.item.title ?? null;
6602
6456
  }
6603
6457
  /**
6604
6458
  * Find the cell DOM element for a (slot, resource) pair and call .focus()
@@ -6619,8 +6473,8 @@ class $ extends he {
6619
6473
  timeCellElement(e, t) {
6620
6474
  const s = this.shadowRoot;
6621
6475
  if (!s) return null;
6622
- const r = e.toISOString(), o = this.stateManager.getState().view === "timeline" ? t ? `.scheduler-timeline-slot[data-resource-id="${this.cssEscape(t)}"][data-start="${r}"]` : `.scheduler-timeline-slot[data-unassigned][data-start="${r}"]` : `.scheduler-time-slot[data-start="${r}"]`;
6623
- return s.querySelector(o);
6476
+ const n = e.toISOString(), r = this.stateManager.getState().view === "timeline" ? t ? `.scheduler-timeline-slot[data-resource-id="${this.cssEscape(t)}"][data-start="${n}"]` : `.scheduler-timeline-slot[data-unassigned][data-start="${n}"]` : `.scheduler-time-slot[data-start="${n}"]`;
6477
+ return s.querySelector(r);
6624
6478
  }
6625
6479
  /** Re-focus whatever cell the keyboard model currently considers focused. */
6626
6480
  /**
@@ -6667,25 +6521,25 @@ class $ extends he {
6667
6521
  */
6668
6522
  createEventFromCellOrSelection(e) {
6669
6523
  const t = this.stateManager.getState(), s = G(t);
6670
- let r, n, o;
6524
+ let n, i, r;
6671
6525
  if (s)
6672
- r = s.start, n = s.end, o = t.selectionResourceId ?? void 0;
6526
+ n = s.start, i = s.end, r = t.selectionResourceId ?? void 0;
6673
6527
  else if (t.focusedCell)
6674
- r = t.focusedCell.start, n = t.focusedCell.end, o = t.focusedResourceId ?? void 0;
6528
+ n = t.focusedCell.start, i = t.focusedCell.end, r = t.focusedResourceId ?? void 0;
6675
6529
  else
6676
6530
  return;
6677
- if (!this.can("createEvent") || !this.allowsCreateAt({ start: r, end: n }, o)) {
6531
+ if (!this.can("createEvent") || !this.allowsCreateAt({ start: n, end: i }, r)) {
6678
6532
  this.announceDenied();
6679
6533
  return;
6680
6534
  }
6681
6535
  this.eventEmitter.emitEventCreate(
6682
- { start: r, end: n },
6536
+ { start: n, end: i },
6683
6537
  t.view,
6684
6538
  e,
6685
- o
6539
+ r
6686
6540
  ), this.liveAnnouncer.announce(this.msg("selectionCommitted", {
6687
- start: h.formatTime(r, t.options.timeFormat, t.options.locale),
6688
- end: h.formatTime(n, t.options.timeFormat, t.options.locale)
6541
+ start: h.formatTime(n, t.options.timeFormat, t.options.locale),
6542
+ end: h.formatTime(i, t.options.timeFormat, t.options.locale)
6689
6543
  }));
6690
6544
  }
6691
6545
  /**
@@ -6715,15 +6569,15 @@ class $ extends he {
6715
6569
  resourceId: t
6716
6570
  }
6717
6571
  });
6718
- const s = this.minutesPerSlot(), r = this.stateManager.getState().view === "timeline";
6572
+ const s = this.minutesPerSlot(), n = this.stateManager.getState().view === "timeline";
6719
6573
  this.liveAnnouncer.announce(
6720
- this.msg(r ? "moveModeEnteredTimeline" : "moveModeEntered", {
6574
+ this.msg(n ? "moveModeEnteredTimeline" : "moveModeEntered", {
6721
6575
  title: e.title,
6722
6576
  minutes: s
6723
6577
  })
6724
6578
  ), requestAnimationFrame(() => {
6725
- const n = `[data-event-id="${this.cssEscape(e.id)}"]`;
6726
- this.shadowRoot?.querySelector(n)?.focus({ preventScroll: !0 });
6579
+ const i = `[data-event-id="${this.cssEscape(e.id)}"]`;
6580
+ this.shadowRoot?.querySelector(i)?.focus({ preventScroll: !0 });
6727
6581
  });
6728
6582
  }
6729
6583
  /**
@@ -6745,19 +6599,19 @@ class $ extends he {
6745
6599
  e.preventDefault(), this.commitEventMoveMode();
6746
6600
  return;
6747
6601
  }
6748
- const t = this.stateManager.getState().view, s = t === "timeline", r = this.minutesPerSlot() * 60 * 1e3, n = e.shiftKey, o = e.altKey;
6602
+ const t = this.stateManager.getState().view, s = t === "timeline", n = this.minutesPerSlot() * 60 * 1e3, i = e.shiftKey, r = e.altKey;
6749
6603
  switch (e.key) {
6750
6604
  case "ArrowUp":
6751
- e.preventDefault(), s ? !n && !o && this.nudgeKeyboardMoveResource(-1) : n && o ? this.resizeKeyboardMoveEdge("start", -r) : n ? this.resizeKeyboardMoveEdge("end", -r) : this.nudgeKeyboardMove(-r);
6605
+ e.preventDefault(), s ? !i && !r && this.nudgeKeyboardMoveResource(-1) : i && r ? this.resizeKeyboardMoveEdge("start", -n) : i ? this.resizeKeyboardMoveEdge("end", -n) : this.nudgeKeyboardMove(-n);
6752
6606
  return;
6753
6607
  case "ArrowDown":
6754
- e.preventDefault(), s ? !n && !o && this.nudgeKeyboardMoveResource(1) : n && o ? this.resizeKeyboardMoveEdge("start", +r) : n ? this.resizeKeyboardMoveEdge("end", +r) : this.nudgeKeyboardMove(+r);
6608
+ e.preventDefault(), s ? !i && !r && this.nudgeKeyboardMoveResource(1) : i && r ? this.resizeKeyboardMoveEdge("start", +n) : i ? this.resizeKeyboardMoveEdge("end", +n) : this.nudgeKeyboardMove(+n);
6755
6609
  return;
6756
6610
  case "ArrowLeft":
6757
- e.preventDefault(), s ? n && o ? this.resizeKeyboardMoveEdge("start", -r) : n ? this.resizeKeyboardMoveEdge("end", -r) : this.nudgeKeyboardMove(-r) : t === "week" && (n && o ? this.resizeKeyboardMoveEdge("start", -864e5) : n ? this.resizeKeyboardMoveEdge("end", -864e5) : this.nudgeKeyboardMove(-864e5));
6611
+ e.preventDefault(), s ? i && r ? this.resizeKeyboardMoveEdge("start", -n) : i ? this.resizeKeyboardMoveEdge("end", -n) : this.nudgeKeyboardMove(-n) : t === "week" && (i && r ? this.resizeKeyboardMoveEdge("start", -864e5) : i ? this.resizeKeyboardMoveEdge("end", -864e5) : this.nudgeKeyboardMove(-864e5));
6758
6612
  return;
6759
6613
  case "ArrowRight":
6760
- e.preventDefault(), s ? n && o ? this.resizeKeyboardMoveEdge("start", +r) : n ? this.resizeKeyboardMoveEdge("end", +r) : this.nudgeKeyboardMove(+r) : t === "week" && (n && o ? this.resizeKeyboardMoveEdge("start", 864e5) : n ? this.resizeKeyboardMoveEdge("end", 864e5) : this.nudgeKeyboardMove(864e5));
6614
+ e.preventDefault(), s ? i && r ? this.resizeKeyboardMoveEdge("start", +n) : i ? this.resizeKeyboardMoveEdge("end", +n) : this.nudgeKeyboardMove(+n) : t === "week" && (i && r ? this.resizeKeyboardMoveEdge("start", 864e5) : i ? this.resizeKeyboardMoveEdge("end", 864e5) : this.nudgeKeyboardMove(864e5));
6761
6615
  return;
6762
6616
  }
6763
6617
  }
@@ -6769,7 +6623,7 @@ class $ extends he {
6769
6623
  nudgeKeyboardMove(e) {
6770
6624
  if (!this.keyboardMove) return;
6771
6625
  const t = new Date(this.keyboardMove.workingStart.getTime() + e), s = new Date(this.keyboardMove.workingEnd.getTime() + e);
6772
- this.keyboardMove.workingStart = t, this.keyboardMove.workingEnd = s, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(Se(t, s, this.stateManager.getState().options));
6626
+ this.keyboardMove.workingStart = t, this.keyboardMove.workingEnd = s, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(ke(t, s, this.stateManager.getState().options));
6773
6627
  }
6774
6628
  /** Walk to the next/previous row (timeline only). Updates the preview's resourceId. */
6775
6629
  nudgeKeyboardMoveResource(e) {
@@ -6796,18 +6650,18 @@ class $ extends he {
6796
6650
  this.announceDenied();
6797
6651
  return;
6798
6652
  }
6799
- const r = this.minutesPerSlot() * 60 * 1e3;
6800
- let n = this.keyboardMove.workingStart, o = this.keyboardMove.workingEnd;
6653
+ const n = this.minutesPerSlot() * 60 * 1e3;
6654
+ let i = this.keyboardMove.workingStart, r = this.keyboardMove.workingEnd;
6801
6655
  if (e === "end") {
6802
- if (o = new Date(o.getTime() + t), o.getTime() - n.getTime() < r) return;
6803
- } else if (n = new Date(n.getTime() + t), o.getTime() - n.getTime() < r) return;
6804
- this.keyboardMove.workingStart = n, this.keyboardMove.workingEnd = o, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(ke(n, o, e, this.stateManager.getState().options));
6656
+ if (r = new Date(r.getTime() + t), r.getTime() - i.getTime() < n) return;
6657
+ } else if (i = new Date(i.getTime() + t), r.getTime() - i.getTime() < n) return;
6658
+ this.keyboardMove.workingStart = i, this.keyboardMove.workingEnd = r, this.applyKeyboardMovePreview(), this.liveAnnouncer.announce(Me(i, r, e, this.stateManager.getState().options));
6805
6659
  }
6806
6660
  /** Mirror keyboardMove.working* into state.previewEvent so views render the destination,
6807
6661
  * then scroll the destination into view so the sighted-keyboard user can see it (PRD D6). */
6808
6662
  applyKeyboardMovePreview() {
6809
6663
  if (!this.keyboardMove) return;
6810
- const { eventId: e, workingStart: t, workingEnd: s, workingResourceId: r } = this.keyboardMove;
6664
+ const { eventId: e, workingStart: t, workingEnd: s, workingResourceId: n } = this.keyboardMove;
6811
6665
  this.stateManager.setState({
6812
6666
  previewEvent: {
6813
6667
  start: t,
@@ -6815,14 +6669,14 @@ class $ extends he {
6815
6669
  // Explicit: `null` = the bucket row. A truthiness spread dropped it,
6816
6670
  // so a nudge INTO the bucket rendered the ghost back in the event's
6817
6671
  // original row (B26).
6818
- resourceId: r
6672
+ resourceId: n
6819
6673
  }
6820
6674
  }), requestAnimationFrame(() => {
6821
- const n = this.shadowRoot;
6822
- if (!n) return;
6823
- n.querySelector(`[data-event-id="${this.cssEscape(e)}"]`)?.focus({ preventScroll: !0 });
6824
- const i = this.timeCellElement(t, r);
6825
- i && typeof i.scrollIntoView == "function" && i.scrollIntoView({ block: "nearest", inline: "nearest" });
6675
+ const i = this.shadowRoot;
6676
+ if (!i) return;
6677
+ i.querySelector(`[data-event-id="${this.cssEscape(e)}"]`)?.focus({ preventScroll: !0 });
6678
+ const o = this.timeCellElement(t, n);
6679
+ o && typeof o.scrollIntoView == "function" && o.scrollIntoView({ block: "nearest", inline: "nearest" });
6826
6680
  });
6827
6681
  }
6828
6682
  commitEventMoveMode() {
@@ -6863,32 +6717,32 @@ class $ extends he {
6863
6717
  // Slot Resolution
6864
6718
  // ============================================
6865
6719
  getSlotAtPosition(e, t) {
6866
- const r = this.shadowRoot.elementsFromPoint(e, t).find(
6867
- (n) => n.matches(".scheduler-time-slot, .scheduler-timeline-slot")
6720
+ const n = this.shadowRoot.elementsFromPoint(e, t).find(
6721
+ (i) => i.matches(".scheduler-time-slot, .scheduler-timeline-slot")
6868
6722
  );
6869
- return r ? this.getSlotFromElement(r) : null;
6723
+ return n ? this.getSlotFromElement(n) : null;
6870
6724
  }
6871
6725
  getSlotFromElement(e) {
6872
6726
  const t = e.dataset.start, s = e.dataset.end;
6873
6727
  if (!t || !s) return null;
6874
- const r = e.dataset.resourceId ?? (e.dataset.unassigned ? null : void 0);
6728
+ const n = e.dataset.resourceId ?? (e.dataset.unassigned ? null : void 0);
6875
6729
  return {
6876
6730
  start: new Date(t),
6877
6731
  end: new Date(s),
6878
- ...r !== void 0 ? { resourceId: r } : {}
6732
+ ...n !== void 0 ? { resourceId: n } : {}
6879
6733
  };
6880
6734
  }
6881
6735
  }
6882
6736
  typeof customElements < "u" && !customElements.get("mp-scheduler") && customElements.define("mp-scheduler", $);
6883
6737
  export {
6884
6738
  K as BaseView,
6885
- Ie as DayView,
6739
+ Ae as DayView,
6886
6740
  N as MonthView,
6887
6741
  $ as MpScheduler,
6888
- xe as SchedulerStateManager,
6742
+ De as SchedulerStateManager,
6889
6743
  I as TimelineView,
6890
- Te as WeekView,
6744
+ Ie as WeekView,
6891
6745
  U as YearView,
6892
- Ee as createInitialState,
6893
- Ae as schedulerStyles
6746
+ xe as createInitialState,
6747
+ Re as schedulerStyles
6894
6748
  };