@nextcloud/vue 8.12.0 → 8.14.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 (797) hide show
  1. package/CHANGELOG.md +68 -2
  2. package/README.md +5 -0
  3. package/dist/Components/NcActionButton.cjs +3 -3
  4. package/dist/Components/NcActionButton.cjs.map +1 -1
  5. package/dist/Components/NcActionButton.mjs +3 -3
  6. package/dist/Components/NcActionButton.mjs.map +1 -1
  7. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  8. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  9. package/dist/Components/NcActionCaption.cjs +2 -2
  10. package/dist/Components/NcActionCaption.cjs.map +1 -1
  11. package/dist/Components/NcActionCaption.mjs +2 -2
  12. package/dist/Components/NcActionCaption.mjs.map +1 -1
  13. package/dist/Components/NcActionCheckbox.cjs +6 -8
  14. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  15. package/dist/Components/NcActionCheckbox.mjs +6 -8
  16. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  17. package/dist/Components/NcActionInput.cjs +1 -1
  18. package/dist/Components/NcActionInput.mjs +1 -1
  19. package/dist/Components/NcActionLink.cjs +3 -3
  20. package/dist/Components/NcActionLink.cjs.map +1 -1
  21. package/dist/Components/NcActionLink.mjs +3 -3
  22. package/dist/Components/NcActionLink.mjs.map +1 -1
  23. package/dist/Components/NcActionRadio.cjs +6 -8
  24. package/dist/Components/NcActionRadio.cjs.map +1 -1
  25. package/dist/Components/NcActionRadio.mjs +6 -8
  26. package/dist/Components/NcActionRadio.mjs.map +1 -1
  27. package/dist/Components/NcActionRouter.cjs +3 -3
  28. package/dist/Components/NcActionRouter.cjs.map +1 -1
  29. package/dist/Components/NcActionRouter.mjs +3 -3
  30. package/dist/Components/NcActionRouter.mjs.map +1 -1
  31. package/dist/Components/NcActionSeparator.cjs +2 -2
  32. package/dist/Components/NcActionSeparator.cjs.map +1 -1
  33. package/dist/Components/NcActionSeparator.mjs +2 -2
  34. package/dist/Components/NcActionSeparator.mjs.map +1 -1
  35. package/dist/Components/NcActionText.cjs +3 -3
  36. package/dist/Components/NcActionText.cjs.map +1 -1
  37. package/dist/Components/NcActionText.mjs +3 -3
  38. package/dist/Components/NcActionText.mjs.map +1 -1
  39. package/dist/Components/NcActionTextEditable.cjs +4 -4
  40. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  41. package/dist/Components/NcActionTextEditable.mjs +4 -4
  42. package/dist/Components/NcActionTextEditable.mjs.map +1 -1
  43. package/dist/Components/NcActions.cjs +1 -1
  44. package/dist/Components/NcActions.mjs +1 -1
  45. package/dist/Components/NcAppContent.cjs +1 -1
  46. package/dist/Components/NcAppContent.mjs +1 -1
  47. package/dist/Components/NcAppContentDetails.cjs.map +1 -1
  48. package/dist/Components/NcAppContentDetails.mjs.map +1 -1
  49. package/dist/Components/NcAppContentList.cjs.map +1 -1
  50. package/dist/Components/NcAppContentList.mjs.map +1 -1
  51. package/dist/Components/NcAppNavigation.cjs +1 -1
  52. package/dist/Components/NcAppNavigation.mjs +1 -1
  53. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  54. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  55. package/dist/Components/NcAppNavigationIconBullet.cjs +2 -2
  56. package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
  57. package/dist/Components/NcAppNavigationIconBullet.mjs +2 -2
  58. package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
  59. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  60. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  61. package/dist/Components/NcAppNavigationList.cjs +2 -2
  62. package/dist/Components/NcAppNavigationList.cjs.map +1 -1
  63. package/dist/Components/NcAppNavigationList.mjs +2 -2
  64. package/dist/Components/NcAppNavigationList.mjs.map +1 -1
  65. package/dist/Components/NcAppNavigationNew.cjs +2 -2
  66. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  67. package/dist/Components/NcAppNavigationNew.mjs +2 -2
  68. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  69. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  70. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  71. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  72. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  73. package/dist/Components/NcAppNavigationSpacer.cjs +2 -2
  74. package/dist/Components/NcAppNavigationSpacer.cjs.map +1 -1
  75. package/dist/Components/NcAppNavigationSpacer.mjs +2 -2
  76. package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
  77. package/dist/Components/NcAppNavigationToggle.cjs +1 -21
  78. package/dist/Components/NcAppNavigationToggle.cjs.map +1 -1
  79. package/dist/Components/NcAppNavigationToggle.mjs +1 -21
  80. package/dist/Components/NcAppNavigationToggle.mjs.map +1 -1
  81. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  82. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  83. package/dist/Components/NcAppSettingsSection.cjs +3 -3
  84. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  85. package/dist/Components/NcAppSettingsSection.mjs +3 -3
  86. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  87. package/dist/Components/NcAppSidebar.cjs +1 -1
  88. package/dist/Components/NcAppSidebar.mjs +1 -1
  89. package/dist/Components/NcAppSidebarTab.cjs +2 -2
  90. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  91. package/dist/Components/NcAppSidebarTab.mjs +2 -2
  92. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  93. package/dist/Components/NcAvatar.cjs +1 -1
  94. package/dist/Components/NcAvatar.mjs +1 -1
  95. package/dist/Components/NcBreadcrumb.cjs +1 -1
  96. package/dist/Components/NcBreadcrumb.mjs +1 -1
  97. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  98. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  99. package/dist/Components/NcButton.cjs +15 -3
  100. package/dist/Components/NcButton.cjs.map +1 -1
  101. package/dist/Components/NcButton.mjs +15 -3
  102. package/dist/Components/NcButton.mjs.map +1 -1
  103. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  104. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  105. package/dist/Components/NcChip.cjs +111 -0
  106. package/dist/Components/NcChip.cjs.map +1 -0
  107. package/dist/Components/NcChip.mjs +112 -0
  108. package/dist/Components/NcChip.mjs.map +1 -0
  109. package/dist/Components/NcCollectionList.cjs +3 -0
  110. package/dist/Components/NcCollectionList.cjs.map +1 -0
  111. package/dist/Components/NcCollectionList.mjs +4 -0
  112. package/dist/Components/NcCollectionList.mjs.map +1 -0
  113. package/dist/Components/NcColorPicker.cjs +1 -1
  114. package/dist/Components/NcColorPicker.mjs +1 -1
  115. package/dist/Components/NcContent.cjs +1 -1
  116. package/dist/Components/NcContent.mjs +1 -1
  117. package/dist/Components/NcCounterBubble.cjs +2 -2
  118. package/dist/Components/NcCounterBubble.cjs.map +1 -1
  119. package/dist/Components/NcCounterBubble.mjs +2 -2
  120. package/dist/Components/NcCounterBubble.mjs.map +1 -1
  121. package/dist/Components/NcDashboardWidget.cjs +1 -1
  122. package/dist/Components/NcDashboardWidget.mjs +1 -1
  123. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  124. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  125. package/dist/Components/NcDateTime.cjs +1 -1
  126. package/dist/Components/NcDateTime.mjs +1 -1
  127. package/dist/Components/NcDateTimePicker.cjs +8 -29
  128. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  129. package/dist/Components/NcDateTimePicker.mjs +8 -29
  130. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  131. package/dist/Components/NcDateTimePickerNative.cjs +3 -24
  132. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  133. package/dist/Components/NcDateTimePickerNative.mjs +3 -24
  134. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  135. package/dist/Components/NcDialog.cjs +1 -1
  136. package/dist/Components/NcDialog.mjs +1 -1
  137. package/dist/Components/NcDialogButton.cjs +1 -1
  138. package/dist/Components/NcDialogButton.mjs +1 -1
  139. package/dist/Components/NcEllipsisedOption.cjs +9 -3
  140. package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
  141. package/dist/Components/NcEllipsisedOption.mjs +9 -3
  142. package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
  143. package/dist/Components/NcEmojiPicker.cjs +1 -1
  144. package/dist/Components/NcEmojiPicker.mjs +1 -1
  145. package/dist/Components/NcEmptyContent.cjs +2 -2
  146. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  147. package/dist/Components/NcEmptyContent.mjs +2 -2
  148. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  149. package/dist/Components/NcGuestContent.cjs +2 -2
  150. package/dist/Components/NcGuestContent.cjs.map +1 -1
  151. package/dist/Components/NcGuestContent.mjs +2 -2
  152. package/dist/Components/NcGuestContent.mjs.map +1 -1
  153. package/dist/Components/NcHeaderMenu.cjs +1 -1
  154. package/dist/Components/NcHeaderMenu.mjs +1 -1
  155. package/dist/Components/NcHighlight.cjs +1 -1
  156. package/dist/Components/NcHighlight.mjs +1 -1
  157. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  158. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  159. package/dist/Components/NcInputField.cjs +3 -3
  160. package/dist/Components/NcInputField.cjs.map +1 -1
  161. package/dist/Components/NcInputField.mjs +3 -3
  162. package/dist/Components/NcInputField.mjs.map +1 -1
  163. package/dist/Components/NcListItem.cjs +1 -1
  164. package/dist/Components/NcListItem.mjs +1 -1
  165. package/dist/Components/NcListItemIcon.cjs +1 -1
  166. package/dist/Components/NcListItemIcon.mjs +1 -1
  167. package/dist/Components/NcLoadingIcon.cjs +2 -2
  168. package/dist/Components/NcLoadingIcon.cjs.map +1 -1
  169. package/dist/Components/NcLoadingIcon.mjs +2 -2
  170. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  171. package/dist/Components/NcModal.cjs +32 -55
  172. package/dist/Components/NcModal.cjs.map +1 -1
  173. package/dist/Components/NcModal.mjs +30 -55
  174. package/dist/Components/NcModal.mjs.map +1 -1
  175. package/dist/Components/NcNoteCard.cjs +2 -2
  176. package/dist/Components/NcNoteCard.cjs.map +1 -1
  177. package/dist/Components/NcNoteCard.mjs +2 -2
  178. package/dist/Components/NcNoteCard.mjs.map +1 -1
  179. package/dist/Components/NcPasswordField.cjs +1 -1
  180. package/dist/Components/NcPasswordField.mjs +1 -1
  181. package/dist/Components/NcPopover.cjs +1 -1
  182. package/dist/Components/NcPopover.mjs +1 -1
  183. package/dist/Components/NcProgressBar.cjs +1 -1
  184. package/dist/Components/NcProgressBar.mjs +1 -1
  185. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  186. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  187. package/dist/Components/NcRichContenteditable.cjs +2 -2
  188. package/dist/Components/NcRichContenteditable.mjs +2 -2
  189. package/dist/Components/NcRichText.cjs +2 -23
  190. package/dist/Components/NcRichText.cjs.map +1 -1
  191. package/dist/Components/NcRichText.mjs +3 -24
  192. package/dist/Components/NcRichText.mjs.map +1 -1
  193. package/dist/Components/NcSelect.cjs +1 -1
  194. package/dist/Components/NcSelect.mjs +1 -1
  195. package/dist/Components/NcSelectTags.cjs +1 -1
  196. package/dist/Components/NcSelectTags.mjs +1 -1
  197. package/dist/Components/NcSettingsInputText.cjs +1 -1
  198. package/dist/Components/NcSettingsInputText.mjs +1 -1
  199. package/dist/Components/NcSettingsSection.cjs +1 -1
  200. package/dist/Components/NcSettingsSection.mjs +1 -1
  201. package/dist/Components/NcSettingsSelectGroup.cjs +1 -22
  202. package/dist/Components/NcSettingsSelectGroup.cjs.map +1 -1
  203. package/dist/Components/NcSettingsSelectGroup.mjs +1 -22
  204. package/dist/Components/NcSettingsSelectGroup.mjs.map +1 -1
  205. package/dist/Components/NcTextArea.cjs +3 -3
  206. package/dist/Components/NcTextArea.cjs.map +1 -1
  207. package/dist/Components/NcTextArea.mjs +3 -3
  208. package/dist/Components/NcTextArea.mjs.map +1 -1
  209. package/dist/Components/NcTextField.cjs +1 -1
  210. package/dist/Components/NcTextField.mjs +1 -1
  211. package/dist/Components/NcTimezonePicker.cjs +1 -1
  212. package/dist/Components/NcTimezonePicker.mjs +1 -1
  213. package/dist/Components/NcUserBubble.cjs +1 -1
  214. package/dist/Components/NcUserBubble.mjs +1 -1
  215. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  216. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  217. package/dist/Components/NcVNodes.cjs.map +1 -1
  218. package/dist/Components/NcVNodes.mjs.map +1 -1
  219. package/dist/Composables/useIsFullscreen.cjs +0 -21
  220. package/dist/Composables/useIsFullscreen.cjs.map +1 -1
  221. package/dist/Composables/useIsFullscreen.mjs +0 -21
  222. package/dist/Composables/useIsFullscreen.mjs.map +1 -1
  223. package/dist/Composables/useIsMobile.cjs +0 -21
  224. package/dist/Composables/useIsMobile.cjs.map +1 -1
  225. package/dist/Composables/useIsMobile.mjs +0 -21
  226. package/dist/Composables/useIsMobile.mjs.map +1 -1
  227. package/dist/Directives/Focus.cjs +0 -21
  228. package/dist/Directives/Focus.cjs.map +1 -1
  229. package/dist/Directives/Focus.mjs +0 -21
  230. package/dist/Directives/Focus.mjs.map +1 -1
  231. package/dist/Directives/Linkify.cjs +1 -1
  232. package/dist/Directives/Linkify.cjs.map +1 -1
  233. package/dist/Directives/Linkify.mjs +1 -1
  234. package/dist/Directives/Linkify.mjs.map +1 -1
  235. package/dist/Directives/Tooltip.cjs +1 -23
  236. package/dist/Directives/Tooltip.cjs.map +1 -1
  237. package/dist/Directives/Tooltip.mjs +1 -23
  238. package/dist/Directives/Tooltip.mjs.map +1 -1
  239. package/dist/Functions/a11y.cjs +0 -21
  240. package/dist/Functions/a11y.cjs.map +1 -1
  241. package/dist/Functions/a11y.mjs +0 -21
  242. package/dist/Functions/a11y.mjs.map +1 -1
  243. package/dist/Functions/emoji.cjs +1 -1
  244. package/dist/Functions/emoji.mjs +1 -1
  245. package/dist/Functions/reference.cjs +1 -1
  246. package/dist/Functions/reference.mjs +1 -1
  247. package/dist/Functions/usernameToColor.cjs +1 -1
  248. package/dist/Functions/usernameToColor.mjs +1 -1
  249. package/dist/Mixins/clickOutsideOptions.cjs +0 -21
  250. package/dist/Mixins/clickOutsideOptions.cjs.map +1 -1
  251. package/dist/Mixins/clickOutsideOptions.mjs +0 -21
  252. package/dist/Mixins/clickOutsideOptions.mjs.map +1 -1
  253. package/dist/Mixins/isFullscreen.cjs +0 -21
  254. package/dist/Mixins/isFullscreen.cjs.map +1 -1
  255. package/dist/Mixins/isFullscreen.mjs +0 -21
  256. package/dist/Mixins/isFullscreen.mjs.map +1 -1
  257. package/dist/Mixins/isMobile.cjs +0 -21
  258. package/dist/Mixins/isMobile.cjs.map +1 -1
  259. package/dist/Mixins/isMobile.mjs +0 -21
  260. package/dist/Mixins/isMobile.mjs.map +1 -1
  261. package/dist/Mixins/richEditor.cjs +2 -2
  262. package/dist/Mixins/richEditor.mjs +2 -2
  263. package/dist/assets/NcActionButton-D90PTEA5.css +107 -0
  264. package/dist/assets/{NcActionButtonGroup-CvloX35s.css → NcActionButtonGroup-CQxLn2fv.css} +6 -20
  265. package/dist/assets/NcActionCaption-B7FZTc3Y.css +32 -0
  266. package/dist/assets/NcActionCheckbox-C-PJVvtb.css +78 -0
  267. package/dist/assets/NcActionInput-C_3Csa6A.css +220 -0
  268. package/dist/assets/NcActionLink-Db_ZlqWs.css +92 -0
  269. package/dist/assets/NcActionRadio-CpCvyMa_.css +78 -0
  270. package/dist/assets/NcActionRouter-DidTlbov.css +103 -0
  271. package/dist/assets/NcActionSeparator-CEbb5P6P.css +24 -0
  272. package/dist/assets/NcActionText-DCx1DWXe.css +107 -0
  273. package/dist/assets/NcActionTextEditable-Dud9NOdm.css +238 -0
  274. package/dist/assets/NcActions-JDMMURyt.css +83 -0
  275. package/dist/assets/NcAppContent-B1ZWQTUv.css +125 -0
  276. package/dist/assets/NcAppNavigation-DvCTUTpR.css +103 -0
  277. package/dist/assets/NcAppNavigationCaption-Cgexlz2n.css +48 -0
  278. package/dist/assets/NcAppNavigationIconBullet-By_0o2dG.css +30 -0
  279. package/dist/assets/NcAppNavigationItem-Cas1plMr.css +211 -0
  280. package/dist/assets/NcAppNavigationList-BIbyyT7b.css +29 -0
  281. package/dist/assets/NcAppNavigationNew-BKfawNII.css +27 -0
  282. package/dist/assets/{NcAppNavigationNewItem-DF3nldsK.css → NcAppNavigationNewItem-Dw2sHtEO.css} +58 -68
  283. package/dist/assets/NcAppNavigationSettings-DtCFYPKb.css +79 -0
  284. package/dist/assets/NcAppNavigationSpacer-CfNqmQeR.css +6 -0
  285. package/dist/assets/NcAppNavigationToggle-DvYpNzHv.css +27 -0
  286. package/dist/assets/NcAppSettingsDialog-YgAGku7I.css +74 -0
  287. package/dist/assets/NcAppSettingsSection-AUZ2NjMX.css +30 -0
  288. package/dist/assets/{NcAppSidebar-DixS4RLm.css → NcAppSidebar-GLK326IR.css} +126 -172
  289. package/dist/assets/NcAppSidebarTab-BieYhqvk.css +34 -0
  290. package/dist/assets/NcAvatar-m0lTnGXX.css +129 -0
  291. package/dist/assets/NcBreadcrumb-DOvK-XG1.css +68 -0
  292. package/dist/assets/NcBreadcrumbs-CPUAM38l.css +37 -0
  293. package/dist/assets/NcButton-BHxZm42y.css +210 -0
  294. package/dist/assets/{NcCheckboxRadioSwitch-DArK1Q95.css → NcCheckboxRadioSwitch-BkBep4wT.css} +58 -86
  295. package/dist/assets/NcChip-CQm1mq2C.css +61 -0
  296. package/dist/assets/NcCollectionList-ETQTqkqt.css +221 -0
  297. package/dist/assets/NcColorPicker-Ctv2cwt1.css +122 -0
  298. package/dist/assets/NcContent--2CGtswk.css +82 -0
  299. package/dist/assets/NcCounterBubble-BlAq2Vim.css +53 -0
  300. package/dist/assets/NcDashboardWidget-CpstyXok.css +73 -0
  301. package/dist/assets/NcDashboardWidgetItem-Qe5SSOhA.css +85 -0
  302. package/dist/assets/{NcDateTimePicker-3FfsWOh0.css → NcDateTimePicker-BR1KY59N.css} +39 -77
  303. package/dist/assets/NcDateTimePickerNative-BAcKr0B3.css +47 -0
  304. package/dist/assets/NcDialog-j6_6dpiF.css +132 -0
  305. package/dist/assets/NcEllipsisedOption-DZK2vWD1.css +34 -0
  306. package/dist/assets/{NcEmojiPicker-XL3oUsqE.css → NcEmojiPicker-ielwHIhs.css} +16 -44
  307. package/dist/assets/NcEmptyContent-BU0QVo3d.css +65 -0
  308. package/dist/assets/NcGuestContent-BLJ37yLM.css +50 -0
  309. package/dist/assets/NcHeaderMenu-CuAI7Fgb.css +77 -0
  310. package/dist/assets/NcIconSvgWrapper-BwsJ8wBM.css +39 -0
  311. package/dist/assets/NcInputConfirmCancel-SGr0-6w8.css +39 -0
  312. package/dist/assets/{NcInputField-CXoTqF9T.css → NcInputField-CrdP183e.css} +43 -56
  313. package/dist/assets/NcListItem-DTaecNLV.css +156 -0
  314. package/dist/assets/NcListItemIcon-DxPdaRV5.css +64 -0
  315. package/dist/assets/NcLoadingIcon-BSONDy7x.css +21 -0
  316. package/dist/assets/NcMentionBubble-C6t8od-_.css +73 -0
  317. package/dist/assets/NcModal-CYa2IEvm.css +282 -0
  318. package/dist/assets/NcNoteCard-BLPU1den.css +50 -0
  319. package/dist/assets/{NcPopover-BwI1hPzy.css → NcPopover-BDlL00qZ.css} +6 -20
  320. package/dist/assets/NcProgressBar-BsqdCn-x.css +56 -0
  321. package/dist/assets/NcRelatedResourcesPanel-BE9CQ8s8.css +158 -0
  322. package/dist/assets/{NcRichContenteditable-C-eZyVQM.css → NcRichContenteditable-CkvTrjfG.css} +58 -100
  323. package/dist/assets/NcRichText-BzeK2YTS.css +217 -0
  324. package/dist/assets/{NcSelect-Fmyu7qyl.css → NcSelect-BQt_SpyP.css} +10 -22
  325. package/dist/assets/NcSettingsInputText-DbTNj9E6.css +35 -0
  326. package/dist/assets/NcSettingsSection-DZwOPKg1.css +56 -0
  327. package/dist/assets/NcSettingsSelectGroup-CzD7YrGm.css +23 -0
  328. package/dist/assets/{NcTextArea-XCi8a16Y.css → NcTextArea-D8bZi2fT.css} +30 -42
  329. package/dist/assets/NcUserBubble-DMjZyrGY.css +48 -0
  330. package/dist/assets/NcUserStatusIcon-DMxcdM51.css +30 -0
  331. package/dist/assets/{Tooltip-jHgt4m-W.css → Tooltip-4CSl8xev.css} +10 -30
  332. package/dist/assets/referencePickerModal-9BcmmfUy.css +413 -0
  333. package/dist/chunks/{GenColors-CAUl-IDP.cjs → GenColors-Dt-3yZwf.cjs} +1 -23
  334. package/dist/chunks/GenColors-Dt-3yZwf.cjs.map +1 -0
  335. package/dist/chunks/{GenColors-DcjtQMk3.mjs → GenColors-DtEnxSd9.mjs} +1 -23
  336. package/dist/chunks/GenColors-DtEnxSd9.mjs.map +1 -0
  337. package/dist/chunks/GenRandomId-BQDud3d4.cjs +5 -0
  338. package/dist/chunks/GenRandomId-BQDud3d4.cjs.map +1 -0
  339. package/dist/chunks/GenRandomId-CMooMQt0.mjs +6 -0
  340. package/dist/chunks/GenRandomId-CMooMQt0.mjs.map +1 -0
  341. package/dist/chunks/Linkify-BtgR-dXX.mjs +14 -0
  342. package/dist/chunks/Linkify-BtgR-dXX.mjs.map +1 -0
  343. package/dist/chunks/Linkify-yeOn5L6T.cjs +15 -0
  344. package/dist/chunks/Linkify-yeOn5L6T.cjs.map +1 -0
  345. package/dist/chunks/{NcActionButtonGroup-D650-6zv.mjs → NcActionButtonGroup-B62_HajM.mjs} +3 -3
  346. package/dist/chunks/NcActionButtonGroup-B62_HajM.mjs.map +1 -0
  347. package/dist/chunks/{NcActionButtonGroup-D7hycpXY.cjs → NcActionButtonGroup-DKtkuRy5.cjs} +3 -3
  348. package/dist/chunks/NcActionButtonGroup-DKtkuRy5.cjs.map +1 -0
  349. package/dist/chunks/{NcActionInput-BqG7gSLn.mjs → NcActionInput-DvbN3P1D.mjs} +9 -9
  350. package/dist/chunks/NcActionInput-DvbN3P1D.mjs.map +1 -0
  351. package/dist/chunks/{NcActionInput-CHucaM0V.cjs → NcActionInput-Dw1TL9ig.cjs} +9 -9
  352. package/dist/chunks/NcActionInput-Dw1TL9ig.cjs.map +1 -0
  353. package/dist/chunks/{NcActions-CocYka0Y.mjs → NcActions-CL3YRRgz.mjs} +6 -6
  354. package/dist/chunks/NcActions-CL3YRRgz.mjs.map +1 -0
  355. package/dist/chunks/{NcActions-JX6wbAVA.cjs → NcActions-DRSoPS6a.cjs} +6 -6
  356. package/dist/chunks/NcActions-DRSoPS6a.cjs.map +1 -0
  357. package/dist/chunks/{NcAppContent-wlhVbyg0.mjs → NcAppContent-Cgay0O3i.mjs} +5 -5
  358. package/dist/chunks/NcAppContent-Cgay0O3i.mjs.map +1 -0
  359. package/dist/chunks/{NcAppContent-CkO1Y93z.cjs → NcAppContent-ibyvoVc4.cjs} +5 -5
  360. package/dist/chunks/NcAppContent-ibyvoVc4.cjs.map +1 -0
  361. package/dist/chunks/{NcAppNavigation-Du3J8BTm.cjs → NcAppNavigation-Cw8qnf4l.cjs} +5 -6
  362. package/dist/chunks/NcAppNavigation-Cw8qnf4l.cjs.map +1 -0
  363. package/dist/chunks/{NcAppNavigation-BKiDVBw7.mjs → NcAppNavigation-D15PXjlO.mjs} +5 -6
  364. package/dist/chunks/NcAppNavigation-D15PXjlO.mjs.map +1 -0
  365. package/dist/chunks/{NcAppNavigationCaption-BoN0P7tD.cjs → NcAppNavigationCaption-CO8Hwyrb.cjs} +3 -3
  366. package/dist/chunks/NcAppNavigationCaption-CO8Hwyrb.cjs.map +1 -0
  367. package/dist/chunks/{NcAppNavigationCaption-CKTQZ_u_.mjs → NcAppNavigationCaption-DsGPHQvj.mjs} +3 -3
  368. package/dist/chunks/NcAppNavigationCaption-DsGPHQvj.mjs.map +1 -0
  369. package/dist/chunks/{NcAppNavigationItem-D_lh17am.cjs → NcAppNavigationItem-BVLg_dnQ.cjs} +11 -13
  370. package/dist/chunks/NcAppNavigationItem-BVLg_dnQ.cjs.map +1 -0
  371. package/dist/chunks/{NcAppNavigationItem-qe8jnLow.mjs → NcAppNavigationItem-fKe0Oi-K.mjs} +11 -13
  372. package/dist/chunks/NcAppNavigationItem-fKe0Oi-K.mjs.map +1 -0
  373. package/dist/chunks/{NcAppNavigationNewItem-B107Beoc.mjs → NcAppNavigationNewItem-BEVsUTrd.mjs} +3 -3
  374. package/dist/chunks/NcAppNavigationNewItem-BEVsUTrd.mjs.map +1 -0
  375. package/dist/chunks/{NcAppNavigationNewItem-DyxVXE5t.cjs → NcAppNavigationNewItem-DlC2GWGK.cjs} +3 -3
  376. package/dist/chunks/NcAppNavigationNewItem-DlC2GWGK.cjs.map +1 -0
  377. package/dist/chunks/{NcAppNavigationSettings-CmP_tXFm.cjs → NcAppNavigationSettings-BidyunnY.cjs} +5 -5
  378. package/dist/chunks/NcAppNavigationSettings-BidyunnY.cjs.map +1 -0
  379. package/dist/chunks/{NcAppNavigationSettings-DZ1-Sbdz.mjs → NcAppNavigationSettings-CEHSXiJt.mjs} +5 -5
  380. package/dist/chunks/NcAppNavigationSettings-CEHSXiJt.mjs.map +1 -0
  381. package/dist/chunks/{NcAppNavigationToggle-zCGgvNDT.mjs → NcAppNavigationToggle-CdNG26lR.mjs} +4 -4
  382. package/dist/chunks/NcAppNavigationToggle-CdNG26lR.mjs.map +1 -0
  383. package/dist/chunks/{NcAppNavigationToggle-hmEUqxbP.cjs → NcAppNavigationToggle-DFhfV_Ic.cjs} +4 -4
  384. package/dist/chunks/NcAppNavigationToggle-DFhfV_Ic.cjs.map +1 -0
  385. package/dist/chunks/{NcAppSettingsDialog-D9cNYQ8b.mjs → NcAppSettingsDialog-BExa9wmg.mjs} +6 -7
  386. package/dist/chunks/NcAppSettingsDialog-BExa9wmg.mjs.map +1 -0
  387. package/dist/chunks/{NcAppSettingsDialog-YqNhco1P.cjs → NcAppSettingsDialog-Zy4akEYz.cjs} +6 -7
  388. package/dist/chunks/NcAppSettingsDialog-Zy4akEYz.cjs.map +1 -0
  389. package/dist/chunks/{NcAppSidebar-CQWODfsy.mjs → NcAppSidebar-CYd47NKe.mjs} +91 -67
  390. package/dist/chunks/NcAppSidebar-CYd47NKe.mjs.map +1 -0
  391. package/dist/chunks/{NcAppSidebar-J15zHyfq.cjs → NcAppSidebar-kuqm78Wl.cjs} +91 -67
  392. package/dist/chunks/NcAppSidebar-kuqm78Wl.cjs.map +1 -0
  393. package/dist/chunks/{NcAvatar-CX3OX2C4.mjs → NcAvatar-BC884DnC.mjs} +11 -32
  394. package/dist/chunks/NcAvatar-BC884DnC.mjs.map +1 -0
  395. package/dist/chunks/{NcAvatar-CYzikYku.cjs → NcAvatar-BX8J9gZF.cjs} +11 -32
  396. package/dist/chunks/NcAvatar-BX8J9gZF.cjs.map +1 -0
  397. package/dist/chunks/{NcBreadcrumb-DytGDsr8.mjs → NcBreadcrumb-BVLavjOe.mjs} +4 -4
  398. package/dist/chunks/NcBreadcrumb-BVLavjOe.mjs.map +1 -0
  399. package/dist/chunks/{NcBreadcrumb-jMJw2OQJ.cjs → NcBreadcrumb-DbuEPD5w.cjs} +4 -4
  400. package/dist/chunks/NcBreadcrumb-DbuEPD5w.cjs.map +1 -0
  401. package/dist/chunks/{NcBreadcrumbs-BqFPBZ-h.mjs → NcBreadcrumbs-BBO2DLP1.mjs} +8 -33
  402. package/dist/chunks/NcBreadcrumbs-BBO2DLP1.mjs.map +1 -0
  403. package/dist/chunks/{NcBreadcrumbs-CzObAKB-.cjs → NcBreadcrumbs-iIR1Tw0r.cjs} +8 -33
  404. package/dist/chunks/NcBreadcrumbs-iIR1Tw0r.cjs.map +1 -0
  405. package/dist/chunks/{NcCheckboxRadioSwitch-CIHl8lnP.cjs → NcCheckboxRadioSwitch-B0HYTOsR.cjs} +12 -6
  406. package/dist/chunks/NcCheckboxRadioSwitch-B0HYTOsR.cjs.map +1 -0
  407. package/dist/chunks/{NcCheckboxRadioSwitch-CpupDtee.mjs → NcCheckboxRadioSwitch-D2GbHtCS.mjs} +12 -6
  408. package/dist/chunks/NcCheckboxRadioSwitch-D2GbHtCS.mjs.map +1 -0
  409. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-CPc4BraS.cjs +4 -0
  410. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-CPc4BraS.cjs.map +1 -0
  411. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-ScT6WV__.mjs +3 -0
  412. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-ScT6WV__.mjs.map +1 -0
  413. package/dist/chunks/NcCollectionList-3O-OrcfS.mjs +428 -0
  414. package/dist/chunks/NcCollectionList-3O-OrcfS.mjs.map +1 -0
  415. package/dist/chunks/NcCollectionList-D4oNsvJ0.cjs +430 -0
  416. package/dist/chunks/NcCollectionList-D4oNsvJ0.cjs.map +1 -0
  417. package/dist/chunks/{NcColorPicker-BEs2B-HB.mjs → NcColorPicker-D7awy8o_.mjs} +6 -6
  418. package/dist/chunks/NcColorPicker-D7awy8o_.mjs.map +1 -0
  419. package/dist/chunks/{NcColorPicker-KrvDMhej.cjs → NcColorPicker-hOteJtis.cjs} +6 -6
  420. package/dist/chunks/NcColorPicker-hOteJtis.cjs.map +1 -0
  421. package/dist/chunks/NcContent-CQn8oXxp.mjs +105 -0
  422. package/dist/chunks/NcContent-CQn8oXxp.mjs.map +1 -0
  423. package/dist/chunks/NcContent-Dr9e_aYA.cjs +104 -0
  424. package/dist/chunks/NcContent-Dr9e_aYA.cjs.map +1 -0
  425. package/dist/chunks/{NcDashboardWidget-BvNtltPU.cjs → NcDashboardWidget-DnDLhRmV.cjs} +6 -6
  426. package/dist/chunks/NcDashboardWidget-DnDLhRmV.cjs.map +1 -0
  427. package/dist/chunks/{NcDashboardWidget-Da715DSB.mjs → NcDashboardWidget-hTBgsnwG.mjs} +6 -6
  428. package/dist/chunks/NcDashboardWidget-hTBgsnwG.mjs.map +1 -0
  429. package/dist/chunks/{NcDashboardWidgetItem-CKv_fb-1.cjs → NcDashboardWidgetItem-BorZC7ZL.cjs} +4 -4
  430. package/dist/chunks/NcDashboardWidgetItem-BorZC7ZL.cjs.map +1 -0
  431. package/dist/chunks/{NcDashboardWidgetItem-BkJTg3kj.mjs → NcDashboardWidgetItem-CorJJt6-.mjs} +4 -4
  432. package/dist/chunks/NcDashboardWidgetItem-CorJJt6-.mjs.map +1 -0
  433. package/dist/chunks/{NcDateTime-CpJDGhl7.mjs → NcDateTime-Eat0YWPN.mjs} +1 -22
  434. package/dist/chunks/NcDateTime-Eat0YWPN.mjs.map +1 -0
  435. package/dist/chunks/{NcDateTime-Cy5Bp0d2.cjs → NcDateTime-K3Rie9qv.cjs} +1 -22
  436. package/dist/chunks/NcDateTime-K3Rie9qv.cjs.map +1 -0
  437. package/dist/chunks/{NcDialog-C7KRNdTc.cjs → NcDialog-DGaf6Udc.cjs} +8 -6
  438. package/dist/chunks/NcDialog-DGaf6Udc.cjs.map +1 -0
  439. package/dist/chunks/{NcDialog-B3ZaXnpn.mjs → NcDialog-VincZ0XS.mjs} +8 -6
  440. package/dist/chunks/NcDialog-VincZ0XS.mjs.map +1 -0
  441. package/dist/chunks/{NcDialogButton-CLWLvwpm.cjs → NcDialogButton-CNWF4urB.cjs} +9 -2
  442. package/dist/chunks/NcDialogButton-CNWF4urB.cjs.map +1 -0
  443. package/dist/chunks/{NcDialogButton-BV3Kf9U7.mjs → NcDialogButton-JvyN3X6S.mjs} +9 -2
  444. package/dist/chunks/NcDialogButton-JvyN3X6S.mjs.map +1 -0
  445. package/dist/chunks/{NcEmojiPicker-LFuZ15M5.cjs → NcEmojiPicker-DCT0-SIC.cjs} +9 -9
  446. package/dist/chunks/NcEmojiPicker-DCT0-SIC.cjs.map +1 -0
  447. package/dist/chunks/{NcEmojiPicker-SqbRSwu2.mjs → NcEmojiPicker-ziqKge9K.mjs} +9 -9
  448. package/dist/chunks/NcEmojiPicker-ziqKge9K.mjs.map +1 -0
  449. package/dist/chunks/{NcHeaderMenu-830tFszI.cjs → NcHeaderMenu-D-Jo3l41.cjs} +6 -6
  450. package/dist/chunks/NcHeaderMenu-D-Jo3l41.cjs.map +1 -0
  451. package/dist/chunks/{NcHeaderMenu-2n5GDt37.mjs → NcHeaderMenu-Da6Ob-6t.mjs} +6 -6
  452. package/dist/chunks/NcHeaderMenu-Da6Ob-6t.mjs.map +1 -0
  453. package/dist/chunks/{NcIconSvgWrapper-KWEbPRC9.mjs → NcIconSvgWrapper-Ckqpz-vm.mjs} +3 -3
  454. package/dist/chunks/NcIconSvgWrapper-Ckqpz-vm.mjs.map +1 -0
  455. package/dist/chunks/{NcIconSvgWrapper-O61kZVNp.cjs → NcIconSvgWrapper-DaSgIT19.cjs} +3 -3
  456. package/dist/chunks/NcIconSvgWrapper-DaSgIT19.cjs.map +1 -0
  457. package/dist/chunks/{NcInputConfirmCancel-CJ7nPGEd.cjs → NcInputConfirmCancel-Bt_VDaTA.cjs} +7 -10
  458. package/dist/chunks/NcInputConfirmCancel-Bt_VDaTA.cjs.map +1 -0
  459. package/dist/chunks/{NcInputConfirmCancel-XXXgXoSw.mjs → NcInputConfirmCancel-BvsvyKxD.mjs} +7 -10
  460. package/dist/chunks/NcInputConfirmCancel-BvsvyKxD.mjs.map +1 -0
  461. package/dist/chunks/{NcListItem-CxpC4EKk.cjs → NcListItem-BwUN8FaS.cjs} +5 -6
  462. package/dist/chunks/{NcListItem-DrTIia88.mjs.map → NcListItem-BwUN8FaS.cjs.map} +1 -1
  463. package/dist/chunks/{NcListItem-DrTIia88.mjs → NcListItem-DwIZ95t7.mjs} +5 -6
  464. package/dist/chunks/{NcListItem-CxpC4EKk.cjs.map → NcListItem-DwIZ95t7.mjs.map} +1 -1
  465. package/dist/chunks/{NcListItemIcon-CTTJYWzN.mjs → NcListItemIcon-DhW1Fob8.mjs} +6 -6
  466. package/dist/chunks/NcListItemIcon-DhW1Fob8.mjs.map +1 -0
  467. package/dist/chunks/{NcListItemIcon-44A7fm62.cjs → NcListItemIcon-JeS1a2jI.cjs} +6 -6
  468. package/dist/chunks/NcListItemIcon-JeS1a2jI.cjs.map +1 -0
  469. package/dist/chunks/{NcPasswordField-DN-kdAfl.cjs → NcPasswordField-9h22h-sl.cjs} +5 -4
  470. package/dist/chunks/NcPasswordField-9h22h-sl.cjs.map +1 -0
  471. package/dist/chunks/{NcPasswordField-Z6BCKScy.mjs → NcPasswordField-xauR6801.mjs} +4 -3
  472. package/dist/chunks/NcPasswordField-xauR6801.mjs.map +1 -0
  473. package/dist/chunks/{NcPopover-BS1bBSkg.cjs → NcPopover-Cl1AvQ5o.cjs} +2 -2
  474. package/dist/chunks/NcPopover-Cl1AvQ5o.cjs.map +1 -0
  475. package/dist/chunks/{NcPopover-foxJPAfG.mjs → NcPopover-VxUr4c6P.mjs} +2 -2
  476. package/dist/chunks/NcPopover-VxUr4c6P.mjs.map +1 -0
  477. package/dist/chunks/{NcProgressBar-mFqoqB4L.cjs → NcProgressBar-BnKA91Pj.cjs} +3 -3
  478. package/dist/chunks/NcProgressBar-BnKA91Pj.cjs.map +1 -0
  479. package/dist/chunks/{NcProgressBar-BafFcKiu.mjs → NcProgressBar-CZtllSde.mjs} +3 -3
  480. package/dist/chunks/NcProgressBar-CZtllSde.mjs.map +1 -0
  481. package/dist/chunks/{NcRelatedResourcesPanel-Dcm2wvfd.cjs → NcRelatedResourcesPanel-Be1fGCiu.cjs} +10 -10
  482. package/dist/chunks/NcRelatedResourcesPanel-Be1fGCiu.cjs.map +1 -0
  483. package/dist/chunks/{NcRelatedResourcesPanel-D3QlWSNc.mjs → NcRelatedResourcesPanel-mSjo_nq5.mjs} +10 -10
  484. package/dist/chunks/NcRelatedResourcesPanel-mSjo_nq5.mjs.map +1 -0
  485. package/dist/chunks/{NcRichContenteditable-DljQv8gw.cjs → NcRichContenteditable-BbPOC-_I.cjs} +60 -48
  486. package/dist/chunks/NcRichContenteditable-BbPOC-_I.cjs.map +1 -0
  487. package/dist/chunks/{NcRichContenteditable-BB-qsHEm.mjs → NcRichContenteditable-CakN30zF.mjs} +60 -48
  488. package/dist/chunks/NcRichContenteditable-CakN30zF.mjs.map +1 -0
  489. package/dist/chunks/{NcRichText-BDVKgmY5.cjs → NcRichText-65CdQLUw.cjs} +9 -8
  490. package/dist/chunks/NcRichText-65CdQLUw.cjs.map +1 -0
  491. package/dist/chunks/{NcRichText-BT4VjvXi.mjs → NcRichText-CCM1HmZE.mjs} +9 -8
  492. package/dist/chunks/NcRichText-CCM1HmZE.mjs.map +1 -0
  493. package/dist/chunks/NcSavingIndicatorIcon-Bhy7wcoT.mjs.map +1 -1
  494. package/dist/chunks/NcSavingIndicatorIcon-BzKAIkhk.cjs.map +1 -1
  495. package/dist/chunks/{NcSelect-CNm4fmR6.mjs → NcSelect-CKgXIbQN.mjs} +5 -5
  496. package/dist/chunks/NcSelect-CKgXIbQN.mjs.map +1 -0
  497. package/dist/chunks/{NcSelect-DckQCxxX.cjs → NcSelect-CmV2Q0A0.cjs} +5 -5
  498. package/dist/chunks/NcSelect-CmV2Q0A0.cjs.map +1 -0
  499. package/dist/chunks/{NcSelectTags-nCqLANFH.mjs → NcSelectTags-BIha_vfa.mjs} +2 -23
  500. package/dist/chunks/NcSelectTags-BIha_vfa.mjs.map +1 -0
  501. package/dist/chunks/{NcSelectTags-CnkBJ3vP.cjs → NcSelectTags-eQRTXuQr.cjs} +2 -23
  502. package/dist/chunks/NcSelectTags-eQRTXuQr.cjs.map +1 -0
  503. package/dist/chunks/{NcSettingsInputText-Dd3wEwGy.cjs → NcSettingsInputText-Cdw4mTrp.cjs} +5 -5
  504. package/dist/chunks/NcSettingsInputText-Cdw4mTrp.cjs.map +1 -0
  505. package/dist/chunks/{NcSettingsInputText-D-S5LBmN.mjs → NcSettingsInputText-DDJdALzH.mjs} +5 -5
  506. package/dist/chunks/NcSettingsInputText-DDJdALzH.mjs.map +1 -0
  507. package/dist/chunks/{NcSettingsSection-B0-LmypW.mjs → NcSettingsSection-CFn4bRnA.mjs} +4 -4
  508. package/dist/chunks/NcSettingsSection-CFn4bRnA.mjs.map +1 -0
  509. package/dist/chunks/{NcSettingsSection-ayl3nvdL.cjs → NcSettingsSection-uZhZY4jp.cjs} +4 -4
  510. package/dist/chunks/NcSettingsSection-uZhZY4jp.cjs.map +1 -0
  511. package/dist/chunks/{NcSettingsSelectGroup-C51Km4wj.mjs → NcSettingsSelectGroup-BJIByip9.mjs} +6 -6
  512. package/dist/chunks/NcSettingsSelectGroup-BJIByip9.mjs.map +1 -0
  513. package/dist/chunks/{NcSettingsSelectGroup-Dc7oy0Jg.cjs → NcSettingsSelectGroup-fY7wG4iL.cjs} +6 -6
  514. package/dist/chunks/NcSettingsSelectGroup-fY7wG4iL.cjs.map +1 -0
  515. package/dist/chunks/{NcTextField-BmaDUUfq.mjs → NcTextField-CjEhJrIE.mjs} +2 -2
  516. package/dist/chunks/NcTextField-CjEhJrIE.mjs.map +1 -0
  517. package/dist/chunks/{NcTextField-BmOKGaQ4.cjs → NcTextField-DGywgzwv.cjs} +2 -2
  518. package/dist/chunks/NcTextField-DGywgzwv.cjs.map +1 -0
  519. package/dist/chunks/NcTimezonePicker-DLFrgfqk.cjs +184 -0
  520. package/dist/chunks/NcTimezonePicker-DLFrgfqk.cjs.map +1 -0
  521. package/dist/chunks/NcTimezonePicker-J8vQyRH8.mjs +185 -0
  522. package/dist/chunks/NcTimezonePicker-J8vQyRH8.mjs.map +1 -0
  523. package/dist/chunks/{NcUserBubble-BJp-ZBGW.mjs → NcUserBubble-C1ecV_fU.mjs} +4 -4
  524. package/dist/chunks/NcUserBubble-C1ecV_fU.mjs.map +1 -0
  525. package/dist/chunks/{NcUserBubble-BsQJPVXD.cjs → NcUserBubble-C4fdYO4b.cjs} +4 -4
  526. package/dist/chunks/NcUserBubble-C4fdYO4b.cjs.map +1 -0
  527. package/dist/chunks/{NcUserStatusIcon-Ba9ajMhK.cjs → NcUserStatusIcon-BqUz25xE.cjs} +9 -37
  528. package/dist/chunks/NcUserStatusIcon-BqUz25xE.cjs.map +1 -0
  529. package/dist/chunks/{NcUserStatusIcon-BkO1ZAdq.mjs → NcUserStatusIcon-DQyfBtYn.mjs} +9 -36
  530. package/dist/chunks/NcUserStatusIcon-DQyfBtYn.mjs.map +1 -0
  531. package/dist/chunks/ScopeComponent-00_hPc9T.mjs +13 -0
  532. package/dist/chunks/ScopeComponent-00_hPc9T.mjs.map +1 -0
  533. package/dist/chunks/ScopeComponent-ByTiGqjs.cjs +12 -0
  534. package/dist/chunks/ScopeComponent-ByTiGqjs.cjs.map +1 -0
  535. package/dist/chunks/_l10n-CWsOa8mM.cjs +125 -0
  536. package/dist/chunks/{_l10n-BYPqjHzt.cjs.map → _l10n-CWsOa8mM.cjs.map} +1 -1
  537. package/dist/chunks/_l10n-DDx8P-X1.mjs +126 -0
  538. package/dist/chunks/_l10n-DDx8P-X1.mjs.map +1 -0
  539. package/dist/chunks/actionGlobal-DqVa7c7G.mjs +25 -0
  540. package/dist/chunks/actionGlobal-DqVa7c7G.mjs.map +1 -0
  541. package/dist/chunks/actionGlobal-L0Ls8tPJ.cjs +24 -0
  542. package/dist/chunks/actionGlobal-L0Ls8tPJ.cjs.map +1 -0
  543. package/dist/chunks/{actionText-BnA6RS9I.cjs → actionText-BcrK4uH1.cjs} +1 -43
  544. package/dist/chunks/actionText-BcrK4uH1.cjs.map +1 -0
  545. package/dist/chunks/{actionText-BaGktsVf.mjs → actionText-fFcUPi2g.mjs} +1 -43
  546. package/dist/chunks/actionText-fFcUPi2g.mjs.map +1 -0
  547. package/dist/chunks/{autolink-Bgjz08wN.cjs → autolink-BAgL31EZ.cjs} +7 -24
  548. package/dist/chunks/autolink-BAgL31EZ.cjs.map +1 -0
  549. package/dist/chunks/{autolink-DA7VzS8Y.mjs → autolink-cbuFALXr.mjs} +7 -24
  550. package/dist/chunks/autolink-cbuFALXr.mjs.map +1 -0
  551. package/dist/chunks/{emoji-CWr00EYY.cjs → emoji-BCCCB3t3.cjs} +9 -30
  552. package/dist/chunks/emoji-BCCCB3t3.cjs.map +1 -0
  553. package/dist/chunks/{emoji-CbOkKZx5.mjs → emoji-V6ytyzoR.mjs} +9 -30
  554. package/dist/chunks/emoji-V6ytyzoR.mjs.map +1 -0
  555. package/dist/chunks/focusTrap-Cecv_gjR.mjs +7 -0
  556. package/dist/chunks/focusTrap-Cecv_gjR.mjs.map +1 -0
  557. package/dist/chunks/focusTrap-EeXFmjdI.cjs +6 -0
  558. package/dist/chunks/focusTrap-EeXFmjdI.cjs.map +1 -0
  559. package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs +10 -0
  560. package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs.map +1 -0
  561. package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs +11 -0
  562. package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs.map +1 -0
  563. package/dist/chunks/{index-Dl-SBuhJ.cjs → index-BANjku4q.cjs} +0 -21
  564. package/dist/chunks/index-BANjku4q.cjs.map +1 -0
  565. package/dist/chunks/index-BwyQ2N-M.mjs.map +1 -1
  566. package/dist/chunks/{index-DYccGIvD.mjs → index-CsogA-K5.mjs} +0 -21
  567. package/dist/chunks/index-CsogA-K5.mjs.map +1 -0
  568. package/dist/chunks/{index-BRQQ9NaL.mjs → index-DbA2OZyf.mjs} +4 -25
  569. package/dist/chunks/index-DbA2OZyf.mjs.map +1 -0
  570. package/dist/chunks/index-Dsgv-f-l.cjs.map +1 -1
  571. package/dist/chunks/{index-D0euettC.cjs → index-oIpl1nrk.cjs} +4 -25
  572. package/dist/chunks/index-oIpl1nrk.cjs.map +1 -0
  573. package/dist/chunks/referencePickerModal-Dab6KzWL.cjs +1115 -0
  574. package/dist/chunks/referencePickerModal-Dab6KzWL.cjs.map +1 -0
  575. package/dist/chunks/referencePickerModal-KbBRUf9r.mjs +1113 -0
  576. package/dist/chunks/referencePickerModal-KbBRUf9r.mjs.map +1 -0
  577. package/dist/chunks/usernameToColor-BzDTLedj.cjs +27 -0
  578. package/dist/chunks/usernameToColor-BzDTLedj.cjs.map +1 -0
  579. package/dist/chunks/usernameToColor-CB3rGdYw.mjs +26 -0
  580. package/dist/chunks/usernameToColor-CB3rGdYw.mjs.map +1 -0
  581. package/dist/components/NcCollectionList/service.d.ts +47 -0
  582. package/dist/composables/actions/useActionText.d.ts +14 -0
  583. package/dist/composables/useFormatDateTime.d.ts +6 -6
  584. package/dist/functions/a11y/index.d.ts +2 -19
  585. package/dist/functions/emoji/emoji.d.ts +23 -27
  586. package/dist/functions/emoji/index.d.ts +2 -19
  587. package/dist/functions/reference/widgets.d.ts +4 -0
  588. package/dist/index.cjs +63 -92
  589. package/dist/index.cjs.map +1 -1
  590. package/dist/index.mjs +65 -94
  591. package/dist/index.mjs.map +1 -1
  592. package/dist/utils/UserStatus.d.ts +2 -19
  593. package/dist/utils/getAvatarUrl.d.ts +2 -19
  594. package/dist/vendor.LICENSE.txt +4 -4
  595. package/package.json +11 -9
  596. package/LICENSE +0 -661
  597. package/dist/assets/NcActionButton-D08gPtwM.css +0 -139
  598. package/dist/assets/NcActionCaption-sfcjBZnu.css +0 -46
  599. package/dist/assets/NcActionCheckbox-DTlI7y7p.css +0 -110
  600. package/dist/assets/NcActionInput-B8l22cnm.css +0 -271
  601. package/dist/assets/NcActionLink-ufhOZDI9.css +0 -124
  602. package/dist/assets/NcActionRadio-syUIsm9B.css +0 -110
  603. package/dist/assets/NcActionRouter-BbTCI4sn.css +0 -135
  604. package/dist/assets/NcActionSeparator-CB59y4di.css +0 -38
  605. package/dist/assets/NcActionText-Ceh88fy8.css +0 -139
  606. package/dist/assets/NcActionTextEditable-BoxziChR.css +0 -287
  607. package/dist/assets/NcActions-N_Y6Nzew.css +0 -111
  608. package/dist/assets/NcAppContent-C08OMmgh.css +0 -153
  609. package/dist/assets/NcAppNavigation-DlFgsfe2.css +0 -131
  610. package/dist/assets/NcAppNavigationCaption-DnApJ5OW.css +0 -62
  611. package/dist/assets/NcAppNavigationIconBullet-B8q3pUL5.css +0 -44
  612. package/dist/assets/NcAppNavigationItem-OJEHVyVk.css +0 -235
  613. package/dist/assets/NcAppNavigationList-DnIxrbVX.css +0 -43
  614. package/dist/assets/NcAppNavigationNew-BPZ1O8Xm.css +0 -41
  615. package/dist/assets/NcAppNavigationSettings-BCkvRAy8.css +0 -93
  616. package/dist/assets/NcAppNavigationSpacer-Cb4q1zb5.css +0 -6
  617. package/dist/assets/NcAppNavigationToggle-0yhQ9xse.css +0 -41
  618. package/dist/assets/NcAppSettingsDialog-CajWZJNV.css +0 -88
  619. package/dist/assets/NcAppSettingsSection-BDvzWKkd.css +0 -44
  620. package/dist/assets/NcAppSidebarTab-CBFET-hQ.css +0 -48
  621. package/dist/assets/NcAvatar-C2EFGp-3.css +0 -143
  622. package/dist/assets/NcBreadcrumb-AES5eSWo.css +0 -82
  623. package/dist/assets/NcBreadcrumbs-tYrp1DVs.css +0 -51
  624. package/dist/assets/NcButton-DZS360ia.css +0 -204
  625. package/dist/assets/NcColorPicker-CzKZjMxY.css +0 -136
  626. package/dist/assets/NcContent-Cuv2HvFH.css +0 -110
  627. package/dist/assets/NcCounterBubble-CWi_P1Tb.css +0 -67
  628. package/dist/assets/NcDashboardWidget-CGOA8X60.css +0 -87
  629. package/dist/assets/NcDashboardWidgetItem-BevETFRF.css +0 -99
  630. package/dist/assets/NcDateTimePickerNative-CV_VuzvQ.css +0 -61
  631. package/dist/assets/NcDialog-DFMxsFp5.css +0 -160
  632. package/dist/assets/NcEllipsisedOption-ClDzkIX6.css +0 -48
  633. package/dist/assets/NcEmptyContent-BY1-Gge4.css +0 -79
  634. package/dist/assets/NcGuestContent-CeRLfUEi.css +0 -78
  635. package/dist/assets/NcHeaderMenu-N5y8yFGd.css +0 -91
  636. package/dist/assets/NcIconSvgWrapper-DF9sBD2g.css +0 -53
  637. package/dist/assets/NcInputConfirmCancel-UcHrm0al.css +0 -53
  638. package/dist/assets/NcListItem-DMYcn1cc.css +0 -170
  639. package/dist/assets/NcListItemIcon-CuPMgXoB.css +0 -78
  640. package/dist/assets/NcLoadingIcon-gxK0ujO0.css +0 -35
  641. package/dist/assets/NcMentionBubble-DmzU72Mw.css +0 -84
  642. package/dist/assets/NcModal-Cof88czY.css +0 -299
  643. package/dist/assets/NcNoteCard-e7-Bxio8.css +0 -64
  644. package/dist/assets/NcProgressBar-D5VftcJm.css +0 -70
  645. package/dist/assets/NcRelatedResourcesPanel-BrXxbjgR.css +0 -200
  646. package/dist/assets/NcRichText-Cdp_2wEm.css +0 -240
  647. package/dist/assets/NcSettingsInputText-CU65Coab.css +0 -49
  648. package/dist/assets/NcSettingsSection-TX28tYCG.css +0 -70
  649. package/dist/assets/NcSettingsSelectGroup-CPauLI-o.css +0 -37
  650. package/dist/assets/NcUserBubble-D5ieZC-f.css +0 -62
  651. package/dist/assets/NcUserStatusIcon-BcLArDqV.css +0 -44
  652. package/dist/assets/referencePickerModal-BaGbKZky.css +0 -539
  653. package/dist/chunks/GenColors-CAUl-IDP.cjs.map +0 -1
  654. package/dist/chunks/GenColors-DcjtQMk3.mjs.map +0 -1
  655. package/dist/chunks/GenRandomId-CXkjMlAT.mjs +0 -27
  656. package/dist/chunks/GenRandomId-CXkjMlAT.mjs.map +0 -1
  657. package/dist/chunks/GenRandomId-kBCcgMJd.cjs +0 -26
  658. package/dist/chunks/GenRandomId-kBCcgMJd.cjs.map +0 -1
  659. package/dist/chunks/Linkify-BBPJHBma.mjs +0 -35
  660. package/dist/chunks/Linkify-BBPJHBma.mjs.map +0 -1
  661. package/dist/chunks/Linkify-CIO279AG.cjs +0 -36
  662. package/dist/chunks/Linkify-CIO279AG.cjs.map +0 -1
  663. package/dist/chunks/NcActionButtonGroup-D650-6zv.mjs.map +0 -1
  664. package/dist/chunks/NcActionButtonGroup-D7hycpXY.cjs.map +0 -1
  665. package/dist/chunks/NcActionInput-BqG7gSLn.mjs.map +0 -1
  666. package/dist/chunks/NcActionInput-CHucaM0V.cjs.map +0 -1
  667. package/dist/chunks/NcActions-CocYka0Y.mjs.map +0 -1
  668. package/dist/chunks/NcActions-JX6wbAVA.cjs.map +0 -1
  669. package/dist/chunks/NcAppContent-CkO1Y93z.cjs.map +0 -1
  670. package/dist/chunks/NcAppContent-wlhVbyg0.mjs.map +0 -1
  671. package/dist/chunks/NcAppNavigation-BKiDVBw7.mjs.map +0 -1
  672. package/dist/chunks/NcAppNavigation-Du3J8BTm.cjs.map +0 -1
  673. package/dist/chunks/NcAppNavigationCaption-BoN0P7tD.cjs.map +0 -1
  674. package/dist/chunks/NcAppNavigationCaption-CKTQZ_u_.mjs.map +0 -1
  675. package/dist/chunks/NcAppNavigationItem-D_lh17am.cjs.map +0 -1
  676. package/dist/chunks/NcAppNavigationItem-qe8jnLow.mjs.map +0 -1
  677. package/dist/chunks/NcAppNavigationNewItem-B107Beoc.mjs.map +0 -1
  678. package/dist/chunks/NcAppNavigationNewItem-DyxVXE5t.cjs.map +0 -1
  679. package/dist/chunks/NcAppNavigationSettings-CmP_tXFm.cjs.map +0 -1
  680. package/dist/chunks/NcAppNavigationSettings-DZ1-Sbdz.mjs.map +0 -1
  681. package/dist/chunks/NcAppNavigationToggle-hmEUqxbP.cjs.map +0 -1
  682. package/dist/chunks/NcAppNavigationToggle-zCGgvNDT.mjs.map +0 -1
  683. package/dist/chunks/NcAppSettingsDialog-D9cNYQ8b.mjs.map +0 -1
  684. package/dist/chunks/NcAppSettingsDialog-YqNhco1P.cjs.map +0 -1
  685. package/dist/chunks/NcAppSidebar-CQWODfsy.mjs.map +0 -1
  686. package/dist/chunks/NcAppSidebar-J15zHyfq.cjs.map +0 -1
  687. package/dist/chunks/NcAvatar-CX3OX2C4.mjs.map +0 -1
  688. package/dist/chunks/NcAvatar-CYzikYku.cjs.map +0 -1
  689. package/dist/chunks/NcBreadcrumb-DytGDsr8.mjs.map +0 -1
  690. package/dist/chunks/NcBreadcrumb-jMJw2OQJ.cjs.map +0 -1
  691. package/dist/chunks/NcBreadcrumbs-BqFPBZ-h.mjs.map +0 -1
  692. package/dist/chunks/NcBreadcrumbs-CzObAKB-.cjs.map +0 -1
  693. package/dist/chunks/NcCheckboxRadioSwitch-CIHl8lnP.cjs.map +0 -1
  694. package/dist/chunks/NcCheckboxRadioSwitch-CpupDtee.mjs.map +0 -1
  695. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-CAFQAKcK.mjs +0 -3
  696. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-CAFQAKcK.mjs.map +0 -1
  697. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-D2wGnjg7.cjs +0 -4
  698. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_6d6e6a47_lang-D2wGnjg7.cjs.map +0 -1
  699. package/dist/chunks/NcColorPicker-BEs2B-HB.mjs.map +0 -1
  700. package/dist/chunks/NcColorPicker-KrvDMhej.cjs.map +0 -1
  701. package/dist/chunks/NcContent-CcrNrpVC.mjs +0 -104
  702. package/dist/chunks/NcContent-CcrNrpVC.mjs.map +0 -1
  703. package/dist/chunks/NcContent-DChC6Khv.cjs +0 -103
  704. package/dist/chunks/NcContent-DChC6Khv.cjs.map +0 -1
  705. package/dist/chunks/NcDashboardWidget-BvNtltPU.cjs.map +0 -1
  706. package/dist/chunks/NcDashboardWidget-Da715DSB.mjs.map +0 -1
  707. package/dist/chunks/NcDashboardWidgetItem-BkJTg3kj.mjs.map +0 -1
  708. package/dist/chunks/NcDashboardWidgetItem-CKv_fb-1.cjs.map +0 -1
  709. package/dist/chunks/NcDateTime-CpJDGhl7.mjs.map +0 -1
  710. package/dist/chunks/NcDateTime-Cy5Bp0d2.cjs.map +0 -1
  711. package/dist/chunks/NcDialog-B3ZaXnpn.mjs.map +0 -1
  712. package/dist/chunks/NcDialog-C7KRNdTc.cjs.map +0 -1
  713. package/dist/chunks/NcDialogButton-BV3Kf9U7.mjs.map +0 -1
  714. package/dist/chunks/NcDialogButton-CLWLvwpm.cjs.map +0 -1
  715. package/dist/chunks/NcEmojiPicker-LFuZ15M5.cjs.map +0 -1
  716. package/dist/chunks/NcEmojiPicker-SqbRSwu2.mjs.map +0 -1
  717. package/dist/chunks/NcHeaderMenu-2n5GDt37.mjs.map +0 -1
  718. package/dist/chunks/NcHeaderMenu-830tFszI.cjs.map +0 -1
  719. package/dist/chunks/NcIconSvgWrapper-KWEbPRC9.mjs.map +0 -1
  720. package/dist/chunks/NcIconSvgWrapper-O61kZVNp.cjs.map +0 -1
  721. package/dist/chunks/NcInputConfirmCancel-CJ7nPGEd.cjs.map +0 -1
  722. package/dist/chunks/NcInputConfirmCancel-XXXgXoSw.mjs.map +0 -1
  723. package/dist/chunks/NcListItemIcon-44A7fm62.cjs.map +0 -1
  724. package/dist/chunks/NcListItemIcon-CTTJYWzN.mjs.map +0 -1
  725. package/dist/chunks/NcPasswordField-DN-kdAfl.cjs.map +0 -1
  726. package/dist/chunks/NcPasswordField-Z6BCKScy.mjs.map +0 -1
  727. package/dist/chunks/NcPopover-BS1bBSkg.cjs.map +0 -1
  728. package/dist/chunks/NcPopover-foxJPAfG.mjs.map +0 -1
  729. package/dist/chunks/NcProgressBar-BafFcKiu.mjs.map +0 -1
  730. package/dist/chunks/NcProgressBar-mFqoqB4L.cjs.map +0 -1
  731. package/dist/chunks/NcRelatedResourcesPanel-D3QlWSNc.mjs.map +0 -1
  732. package/dist/chunks/NcRelatedResourcesPanel-Dcm2wvfd.cjs.map +0 -1
  733. package/dist/chunks/NcRichContenteditable-BB-qsHEm.mjs.map +0 -1
  734. package/dist/chunks/NcRichContenteditable-DljQv8gw.cjs.map +0 -1
  735. package/dist/chunks/NcRichText-BDVKgmY5.cjs.map +0 -1
  736. package/dist/chunks/NcRichText-BT4VjvXi.mjs.map +0 -1
  737. package/dist/chunks/NcSelect-CNm4fmR6.mjs.map +0 -1
  738. package/dist/chunks/NcSelect-DckQCxxX.cjs.map +0 -1
  739. package/dist/chunks/NcSelectTags-CnkBJ3vP.cjs.map +0 -1
  740. package/dist/chunks/NcSelectTags-nCqLANFH.mjs.map +0 -1
  741. package/dist/chunks/NcSettingsInputText-D-S5LBmN.mjs.map +0 -1
  742. package/dist/chunks/NcSettingsInputText-Dd3wEwGy.cjs.map +0 -1
  743. package/dist/chunks/NcSettingsSection-B0-LmypW.mjs.map +0 -1
  744. package/dist/chunks/NcSettingsSection-ayl3nvdL.cjs.map +0 -1
  745. package/dist/chunks/NcSettingsSelectGroup-C51Km4wj.mjs.map +0 -1
  746. package/dist/chunks/NcSettingsSelectGroup-Dc7oy0Jg.cjs.map +0 -1
  747. package/dist/chunks/NcTextField-BmOKGaQ4.cjs.map +0 -1
  748. package/dist/chunks/NcTextField-BmaDUUfq.mjs.map +0 -1
  749. package/dist/chunks/NcTimezonePicker-BSgT2QA5.mjs +0 -4049
  750. package/dist/chunks/NcTimezonePicker-BSgT2QA5.mjs.map +0 -1
  751. package/dist/chunks/NcTimezonePicker-iD8mrVb_.cjs +0 -4048
  752. package/dist/chunks/NcTimezonePicker-iD8mrVb_.cjs.map +0 -1
  753. package/dist/chunks/NcUserBubble-BJp-ZBGW.mjs.map +0 -1
  754. package/dist/chunks/NcUserBubble-BsQJPVXD.cjs.map +0 -1
  755. package/dist/chunks/NcUserStatusIcon-Ba9ajMhK.cjs.map +0 -1
  756. package/dist/chunks/NcUserStatusIcon-BkO1ZAdq.mjs.map +0 -1
  757. package/dist/chunks/ScopeComponent-BpyBuaF3.cjs +0 -33
  758. package/dist/chunks/ScopeComponent-BpyBuaF3.cjs.map +0 -1
  759. package/dist/chunks/ScopeComponent-Dy6ublmy.mjs +0 -34
  760. package/dist/chunks/ScopeComponent-Dy6ublmy.mjs.map +0 -1
  761. package/dist/chunks/_l10n-BYPqjHzt.cjs +0 -121
  762. package/dist/chunks/_l10n-hRR5zBTZ.mjs +0 -122
  763. package/dist/chunks/_l10n-hRR5zBTZ.mjs.map +0 -1
  764. package/dist/chunks/actionGlobal-BfK-CImU.cjs +0 -45
  765. package/dist/chunks/actionGlobal-BfK-CImU.cjs.map +0 -1
  766. package/dist/chunks/actionGlobal-DV5ZiuS0.mjs +0 -46
  767. package/dist/chunks/actionGlobal-DV5ZiuS0.mjs.map +0 -1
  768. package/dist/chunks/actionText-BaGktsVf.mjs.map +0 -1
  769. package/dist/chunks/actionText-BnA6RS9I.cjs.map +0 -1
  770. package/dist/chunks/autolink-Bgjz08wN.cjs.map +0 -1
  771. package/dist/chunks/autolink-DA7VzS8Y.mjs.map +0 -1
  772. package/dist/chunks/emoji-CWr00EYY.cjs.map +0 -1
  773. package/dist/chunks/emoji-CbOkKZx5.mjs.map +0 -1
  774. package/dist/chunks/focusTrap-Dsmd28wG.cjs +0 -27
  775. package/dist/chunks/focusTrap-Dsmd28wG.cjs.map +0 -1
  776. package/dist/chunks/focusTrap-hWDNhn4t.mjs +0 -28
  777. package/dist/chunks/focusTrap-hWDNhn4t.mjs.map +0 -1
  778. package/dist/chunks/getAvatarUrl-BBvqBOJD.mjs +0 -32
  779. package/dist/chunks/getAvatarUrl-BBvqBOJD.mjs.map +0 -1
  780. package/dist/chunks/getAvatarUrl-C40xfr4C.cjs +0 -31
  781. package/dist/chunks/getAvatarUrl-C40xfr4C.cjs.map +0 -1
  782. package/dist/chunks/index-BRQQ9NaL.mjs.map +0 -1
  783. package/dist/chunks/index-D0euettC.cjs.map +0 -1
  784. package/dist/chunks/index-DYccGIvD.mjs.map +0 -1
  785. package/dist/chunks/index-Dl-SBuhJ.cjs.map +0 -1
  786. package/dist/chunks/logger-BcZGm6Un.cjs +0 -24
  787. package/dist/chunks/logger-BcZGm6Un.cjs.map +0 -1
  788. package/dist/chunks/logger-C7ZZ6zFQ.mjs +0 -25
  789. package/dist/chunks/logger-C7ZZ6zFQ.mjs.map +0 -1
  790. package/dist/chunks/referencePickerModal-CFPdv-m1.mjs +0 -3469
  791. package/dist/chunks/referencePickerModal-CFPdv-m1.mjs.map +0 -1
  792. package/dist/chunks/referencePickerModal-m0FcnvxK.cjs +0 -3471
  793. package/dist/chunks/referencePickerModal-m0FcnvxK.cjs.map +0 -1
  794. package/dist/chunks/usernameToColor-CLlyFMmy.mjs +0 -47
  795. package/dist/chunks/usernameToColor-CLlyFMmy.mjs.map +0 -1
  796. package/dist/chunks/usernameToColor-cfXKb46d.cjs +0 -48
  797. package/dist/chunks/usernameToColor-cfXKb46d.cjs.map +0 -1
@@ -1,3471 +0,0 @@
1
- require('../assets/referencePickerModal-BaGbKZky.css');
2
- "use strict";
3
- const Functions_registerReference = require("./index-Dsgv-f-l.cjs");
4
- const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
5
- const _l10n = require("./_l10n-BYPqjHzt.cjs");
6
- const axios = require("@nextcloud/axios");
7
- const initialState = require("@nextcloud/initial-state");
8
- const router = require("@nextcloud/router");
9
- const Components_NcEmptyContent = require("../Components/NcEmptyContent.cjs");
10
- const Components_NcHighlight = require("./index-Dl-SBuhJ.cjs");
11
- const NcSelect = require("./NcSelect-DckQCxxX.cjs");
12
- const core = require("@vueuse/core");
13
- const Vue = require("vue");
14
- const autolink = require("./autolink-Bgjz08wN.cjs");
15
- const Components_NcButton = require("../Components/NcButton.cjs");
16
- const Components_NcLoadingIcon = require("../Components/NcLoadingIcon.cjs");
17
- const NcTextField = require("./NcTextField-BmOKGaQ4.cjs");
18
- const DotsHorizontal = require("./DotsHorizontal-Cjw3-45t.cjs");
19
- const Components_NcModal = require("../Components/NcModal.cjs");
20
- const eventBus = require("@nextcloud/event-bus");
21
- const ArrowLeft = require("./ArrowLeft-BhNmMdMz.cjs");
22
- const Close = require("./Close-C2VrgKj3.cjs");
23
- const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
24
- const axios__default = /* @__PURE__ */ _interopDefault(axios);
25
- const Vue__default = /* @__PURE__ */ _interopDefault(Vue);
26
- /*!
27
- * vue-router v3.6.5
28
- * (c) 2022 Evan You
29
- * @license MIT
30
- */
31
- function assert(condition, message) {
32
- if (!condition) {
33
- throw new Error("[vue-router] " + message);
34
- }
35
- }
36
- function warn(condition, message) {
37
- if (!condition) {
38
- typeof console !== "undefined" && console.warn("[vue-router] " + message);
39
- }
40
- }
41
- function extend(a, b) {
42
- for (var key in b) {
43
- a[key] = b[key];
44
- }
45
- return a;
46
- }
47
- var encodeReserveRE = /[!'()*]/g;
48
- var encodeReserveReplacer = function(c) {
49
- return "%" + c.charCodeAt(0).toString(16);
50
- };
51
- var commaRE = /%2C/g;
52
- var encode = function(str) {
53
- return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ",");
54
- };
55
- function decode(str) {
56
- try {
57
- return decodeURIComponent(str);
58
- } catch (err) {
59
- if (process.env.NODE_ENV !== "production") {
60
- warn(false, 'Error decoding "' + str + '". Leaving it intact.');
61
- }
62
- }
63
- return str;
64
- }
65
- function resolveQuery(query, extraQuery, _parseQuery) {
66
- if (extraQuery === void 0)
67
- extraQuery = {};
68
- var parse2 = _parseQuery || parseQuery;
69
- var parsedQuery;
70
- try {
71
- parsedQuery = parse2(query || "");
72
- } catch (e) {
73
- process.env.NODE_ENV !== "production" && warn(false, e.message);
74
- parsedQuery = {};
75
- }
76
- for (var key in extraQuery) {
77
- var value = extraQuery[key];
78
- parsedQuery[key] = Array.isArray(value) ? value.map(castQueryParamValue) : castQueryParamValue(value);
79
- }
80
- return parsedQuery;
81
- }
82
- var castQueryParamValue = function(value) {
83
- return value == null || typeof value === "object" ? value : String(value);
84
- };
85
- function parseQuery(query) {
86
- var res = {};
87
- query = query.trim().replace(/^(\?|#|&)/, "");
88
- if (!query) {
89
- return res;
90
- }
91
- query.split("&").forEach(function(param) {
92
- var parts = param.replace(/\+/g, " ").split("=");
93
- var key = decode(parts.shift());
94
- var val = parts.length > 0 ? decode(parts.join("=")) : null;
95
- if (res[key] === void 0) {
96
- res[key] = val;
97
- } else if (Array.isArray(res[key])) {
98
- res[key].push(val);
99
- } else {
100
- res[key] = [res[key], val];
101
- }
102
- });
103
- return res;
104
- }
105
- function stringifyQuery(obj) {
106
- var res = obj ? Object.keys(obj).map(function(key) {
107
- var val = obj[key];
108
- if (val === void 0) {
109
- return "";
110
- }
111
- if (val === null) {
112
- return encode(key);
113
- }
114
- if (Array.isArray(val)) {
115
- var result = [];
116
- val.forEach(function(val2) {
117
- if (val2 === void 0) {
118
- return;
119
- }
120
- if (val2 === null) {
121
- result.push(encode(key));
122
- } else {
123
- result.push(encode(key) + "=" + encode(val2));
124
- }
125
- });
126
- return result.join("&");
127
- }
128
- return encode(key) + "=" + encode(val);
129
- }).filter(function(x) {
130
- return x.length > 0;
131
- }).join("&") : null;
132
- return res ? "?" + res : "";
133
- }
134
- var trailingSlashRE = /\/?$/;
135
- function createRoute(record, location, redirectedFrom, router2) {
136
- var stringifyQuery2 = router2 && router2.options.stringifyQuery;
137
- var query = location.query || {};
138
- try {
139
- query = clone(query);
140
- } catch (e) {
141
- }
142
- var route = {
143
- name: location.name || record && record.name,
144
- meta: record && record.meta || {},
145
- path: location.path || "/",
146
- hash: location.hash || "",
147
- query,
148
- params: location.params || {},
149
- fullPath: getFullPath(location, stringifyQuery2),
150
- matched: record ? formatMatch(record) : []
151
- };
152
- if (redirectedFrom) {
153
- route.redirectedFrom = getFullPath(redirectedFrom, stringifyQuery2);
154
- }
155
- return Object.freeze(route);
156
- }
157
- function clone(value) {
158
- if (Array.isArray(value)) {
159
- return value.map(clone);
160
- } else if (value && typeof value === "object") {
161
- var res = {};
162
- for (var key in value) {
163
- res[key] = clone(value[key]);
164
- }
165
- return res;
166
- } else {
167
- return value;
168
- }
169
- }
170
- var START = createRoute(null, {
171
- path: "/"
172
- });
173
- function formatMatch(record) {
174
- var res = [];
175
- while (record) {
176
- res.unshift(record);
177
- record = record.parent;
178
- }
179
- return res;
180
- }
181
- function getFullPath(ref, _stringifyQuery) {
182
- var path = ref.path;
183
- var query = ref.query;
184
- if (query === void 0)
185
- query = {};
186
- var hash = ref.hash;
187
- if (hash === void 0)
188
- hash = "";
189
- var stringify = _stringifyQuery || stringifyQuery;
190
- return (path || "/") + stringify(query) + hash;
191
- }
192
- function isSameRoute(a, b, onlyPath) {
193
- if (b === START) {
194
- return a === b;
195
- } else if (!b) {
196
- return false;
197
- } else if (a.path && b.path) {
198
- return a.path.replace(trailingSlashRE, "") === b.path.replace(trailingSlashRE, "") && (onlyPath || a.hash === b.hash && isObjectEqual(a.query, b.query));
199
- } else if (a.name && b.name) {
200
- return a.name === b.name && (onlyPath || a.hash === b.hash && isObjectEqual(a.query, b.query) && isObjectEqual(a.params, b.params));
201
- } else {
202
- return false;
203
- }
204
- }
205
- function isObjectEqual(a, b) {
206
- if (a === void 0)
207
- a = {};
208
- if (b === void 0)
209
- b = {};
210
- if (!a || !b) {
211
- return a === b;
212
- }
213
- var aKeys = Object.keys(a).sort();
214
- var bKeys = Object.keys(b).sort();
215
- if (aKeys.length !== bKeys.length) {
216
- return false;
217
- }
218
- return aKeys.every(function(key, i) {
219
- var aVal = a[key];
220
- var bKey = bKeys[i];
221
- if (bKey !== key) {
222
- return false;
223
- }
224
- var bVal = b[key];
225
- if (aVal == null || bVal == null) {
226
- return aVal === bVal;
227
- }
228
- if (typeof aVal === "object" && typeof bVal === "object") {
229
- return isObjectEqual(aVal, bVal);
230
- }
231
- return String(aVal) === String(bVal);
232
- });
233
- }
234
- function isIncludedRoute(current, target) {
235
- return current.path.replace(trailingSlashRE, "/").indexOf(
236
- target.path.replace(trailingSlashRE, "/")
237
- ) === 0 && (!target.hash || current.hash === target.hash) && queryIncludes(current.query, target.query);
238
- }
239
- function queryIncludes(current, target) {
240
- for (var key in target) {
241
- if (!(key in current)) {
242
- return false;
243
- }
244
- }
245
- return true;
246
- }
247
- function handleRouteEntered(route) {
248
- for (var i = 0; i < route.matched.length; i++) {
249
- var record = route.matched[i];
250
- for (var name in record.instances) {
251
- var instance = record.instances[name];
252
- var cbs = record.enteredCbs[name];
253
- if (!instance || !cbs) {
254
- continue;
255
- }
256
- delete record.enteredCbs[name];
257
- for (var i$1 = 0; i$1 < cbs.length; i$1++) {
258
- if (!instance._isBeingDestroyed) {
259
- cbs[i$1](instance);
260
- }
261
- }
262
- }
263
- }
264
- }
265
- var View = {
266
- name: "RouterView",
267
- functional: true,
268
- props: {
269
- name: {
270
- type: String,
271
- default: "default"
272
- }
273
- },
274
- render: function render(_, ref) {
275
- var props = ref.props;
276
- var children = ref.children;
277
- var parent = ref.parent;
278
- var data = ref.data;
279
- data.routerView = true;
280
- var h = parent.$createElement;
281
- var name = props.name;
282
- var route = parent.$route;
283
- var cache = parent._routerViewCache || (parent._routerViewCache = {});
284
- var depth = 0;
285
- var inactive = false;
286
- while (parent && parent._routerRoot !== parent) {
287
- var vnodeData = parent.$vnode ? parent.$vnode.data : {};
288
- if (vnodeData.routerView) {
289
- depth++;
290
- }
291
- if (vnodeData.keepAlive && parent._directInactive && parent._inactive) {
292
- inactive = true;
293
- }
294
- parent = parent.$parent;
295
- }
296
- data.routerViewDepth = depth;
297
- if (inactive) {
298
- var cachedData = cache[name];
299
- var cachedComponent = cachedData && cachedData.component;
300
- if (cachedComponent) {
301
- if (cachedData.configProps) {
302
- fillPropsinData(cachedComponent, data, cachedData.route, cachedData.configProps);
303
- }
304
- return h(cachedComponent, data, children);
305
- } else {
306
- return h();
307
- }
308
- }
309
- var matched = route.matched[depth];
310
- var component = matched && matched.components[name];
311
- if (!matched || !component) {
312
- cache[name] = null;
313
- return h();
314
- }
315
- cache[name] = { component };
316
- data.registerRouteInstance = function(vm, val) {
317
- var current = matched.instances[name];
318
- if (val && current !== vm || !val && current === vm) {
319
- matched.instances[name] = val;
320
- }
321
- };
322
- (data.hook || (data.hook = {})).prepatch = function(_2, vnode) {
323
- matched.instances[name] = vnode.componentInstance;
324
- };
325
- data.hook.init = function(vnode) {
326
- if (vnode.data.keepAlive && vnode.componentInstance && vnode.componentInstance !== matched.instances[name]) {
327
- matched.instances[name] = vnode.componentInstance;
328
- }
329
- handleRouteEntered(route);
330
- };
331
- var configProps = matched.props && matched.props[name];
332
- if (configProps) {
333
- extend(cache[name], {
334
- route,
335
- configProps
336
- });
337
- fillPropsinData(component, data, route, configProps);
338
- }
339
- return h(component, data, children);
340
- }
341
- };
342
- function fillPropsinData(component, data, route, configProps) {
343
- var propsToPass = data.props = resolveProps(route, configProps);
344
- if (propsToPass) {
345
- propsToPass = data.props = extend({}, propsToPass);
346
- var attrs = data.attrs = data.attrs || {};
347
- for (var key in propsToPass) {
348
- if (!component.props || !(key in component.props)) {
349
- attrs[key] = propsToPass[key];
350
- delete propsToPass[key];
351
- }
352
- }
353
- }
354
- }
355
- function resolveProps(route, config) {
356
- switch (typeof config) {
357
- case "undefined":
358
- return;
359
- case "object":
360
- return config;
361
- case "function":
362
- return config(route);
363
- case "boolean":
364
- return config ? route.params : void 0;
365
- default:
366
- if (process.env.NODE_ENV !== "production") {
367
- warn(
368
- false,
369
- 'props in "' + route.path + '" is a ' + typeof config + ", expecting an object, function or boolean."
370
- );
371
- }
372
- }
373
- }
374
- function resolvePath(relative, base, append) {
375
- var firstChar = relative.charAt(0);
376
- if (firstChar === "/") {
377
- return relative;
378
- }
379
- if (firstChar === "?" || firstChar === "#") {
380
- return base + relative;
381
- }
382
- var stack = base.split("/");
383
- if (!append || !stack[stack.length - 1]) {
384
- stack.pop();
385
- }
386
- var segments = relative.replace(/^\//, "").split("/");
387
- for (var i = 0; i < segments.length; i++) {
388
- var segment = segments[i];
389
- if (segment === "..") {
390
- stack.pop();
391
- } else if (segment !== ".") {
392
- stack.push(segment);
393
- }
394
- }
395
- if (stack[0] !== "") {
396
- stack.unshift("");
397
- }
398
- return stack.join("/");
399
- }
400
- function parsePath(path) {
401
- var hash = "";
402
- var query = "";
403
- var hashIndex = path.indexOf("#");
404
- if (hashIndex >= 0) {
405
- hash = path.slice(hashIndex);
406
- path = path.slice(0, hashIndex);
407
- }
408
- var queryIndex = path.indexOf("?");
409
- if (queryIndex >= 0) {
410
- query = path.slice(queryIndex + 1);
411
- path = path.slice(0, queryIndex);
412
- }
413
- return {
414
- path,
415
- query,
416
- hash
417
- };
418
- }
419
- function cleanPath(path) {
420
- return path.replace(/\/(?:\s*\/)+/g, "/");
421
- }
422
- var isarray = Array.isArray || function(arr) {
423
- return Object.prototype.toString.call(arr) == "[object Array]";
424
- };
425
- var pathToRegexp_1 = pathToRegexp;
426
- var parse_1 = parse;
427
- var compile_1 = compile;
428
- var tokensToFunction_1 = tokensToFunction;
429
- var tokensToRegExp_1 = tokensToRegExp;
430
- var PATH_REGEXP = new RegExp([
431
- // Match escaped characters that would otherwise appear in future matches.
432
- // This allows the user to escape special characters that won't transform.
433
- "(\\\\.)",
434
- // Match Express-style parameters and un-named parameters with a prefix
435
- // and optional suffixes. Matches appear as:
436
- //
437
- // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
438
- // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
439
- // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
440
- "([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
441
- ].join("|"), "g");
442
- function parse(str, options) {
443
- var tokens = [];
444
- var key = 0;
445
- var index = 0;
446
- var path = "";
447
- var defaultDelimiter = options && options.delimiter || "/";
448
- var res;
449
- while ((res = PATH_REGEXP.exec(str)) != null) {
450
- var m = res[0];
451
- var escaped = res[1];
452
- var offset = res.index;
453
- path += str.slice(index, offset);
454
- index = offset + m.length;
455
- if (escaped) {
456
- path += escaped[1];
457
- continue;
458
- }
459
- var next = str[index];
460
- var prefix = res[2];
461
- var name = res[3];
462
- var capture = res[4];
463
- var group = res[5];
464
- var modifier = res[6];
465
- var asterisk = res[7];
466
- if (path) {
467
- tokens.push(path);
468
- path = "";
469
- }
470
- var partial = prefix != null && next != null && next !== prefix;
471
- var repeat = modifier === "+" || modifier === "*";
472
- var optional = modifier === "?" || modifier === "*";
473
- var delimiter = res[2] || defaultDelimiter;
474
- var pattern = capture || group;
475
- tokens.push({
476
- name: name || key++,
477
- prefix: prefix || "",
478
- delimiter,
479
- optional,
480
- repeat,
481
- partial,
482
- asterisk: !!asterisk,
483
- pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
484
- });
485
- }
486
- if (index < str.length) {
487
- path += str.substr(index);
488
- }
489
- if (path) {
490
- tokens.push(path);
491
- }
492
- return tokens;
493
- }
494
- function compile(str, options) {
495
- return tokensToFunction(parse(str, options), options);
496
- }
497
- function encodeURIComponentPretty(str) {
498
- return encodeURI(str).replace(/[\/?#]/g, function(c) {
499
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
500
- });
501
- }
502
- function encodeAsterisk(str) {
503
- return encodeURI(str).replace(/[?#]/g, function(c) {
504
- return "%" + c.charCodeAt(0).toString(16).toUpperCase();
505
- });
506
- }
507
- function tokensToFunction(tokens, options) {
508
- var matches = new Array(tokens.length);
509
- for (var i = 0; i < tokens.length; i++) {
510
- if (typeof tokens[i] === "object") {
511
- matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
512
- }
513
- }
514
- return function(obj, opts) {
515
- var path = "";
516
- var data = obj || {};
517
- var options2 = opts || {};
518
- var encode2 = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
519
- for (var i2 = 0; i2 < tokens.length; i2++) {
520
- var token = tokens[i2];
521
- if (typeof token === "string") {
522
- path += token;
523
- continue;
524
- }
525
- var value = data[token.name];
526
- var segment;
527
- if (value == null) {
528
- if (token.optional) {
529
- if (token.partial) {
530
- path += token.prefix;
531
- }
532
- continue;
533
- } else {
534
- throw new TypeError('Expected "' + token.name + '" to be defined');
535
- }
536
- }
537
- if (isarray(value)) {
538
- if (!token.repeat) {
539
- throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
540
- }
541
- if (value.length === 0) {
542
- if (token.optional) {
543
- continue;
544
- } else {
545
- throw new TypeError('Expected "' + token.name + '" to not be empty');
546
- }
547
- }
548
- for (var j = 0; j < value.length; j++) {
549
- segment = encode2(value[j]);
550
- if (!matches[i2].test(segment)) {
551
- throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
552
- }
553
- path += (j === 0 ? token.prefix : token.delimiter) + segment;
554
- }
555
- continue;
556
- }
557
- segment = token.asterisk ? encodeAsterisk(value) : encode2(value);
558
- if (!matches[i2].test(segment)) {
559
- throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
560
- }
561
- path += token.prefix + segment;
562
- }
563
- return path;
564
- };
565
- }
566
- function escapeString(str) {
567
- return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
568
- }
569
- function escapeGroup(group) {
570
- return group.replace(/([=!:$\/()])/g, "\\$1");
571
- }
572
- function attachKeys(re, keys) {
573
- re.keys = keys;
574
- return re;
575
- }
576
- function flags(options) {
577
- return options && options.sensitive ? "" : "i";
578
- }
579
- function regexpToRegexp(path, keys) {
580
- var groups = path.source.match(/\((?!\?)/g);
581
- if (groups) {
582
- for (var i = 0; i < groups.length; i++) {
583
- keys.push({
584
- name: i,
585
- prefix: null,
586
- delimiter: null,
587
- optional: false,
588
- repeat: false,
589
- partial: false,
590
- asterisk: false,
591
- pattern: null
592
- });
593
- }
594
- }
595
- return attachKeys(path, keys);
596
- }
597
- function arrayToRegexp(path, keys, options) {
598
- var parts = [];
599
- for (var i = 0; i < path.length; i++) {
600
- parts.push(pathToRegexp(path[i], keys, options).source);
601
- }
602
- var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
603
- return attachKeys(regexp, keys);
604
- }
605
- function stringToRegexp(path, keys, options) {
606
- return tokensToRegExp(parse(path, options), keys, options);
607
- }
608
- function tokensToRegExp(tokens, keys, options) {
609
- if (!isarray(keys)) {
610
- options = /** @type {!Object} */
611
- keys || options;
612
- keys = [];
613
- }
614
- options = options || {};
615
- var strict = options.strict;
616
- var end = options.end !== false;
617
- var route = "";
618
- for (var i = 0; i < tokens.length; i++) {
619
- var token = tokens[i];
620
- if (typeof token === "string") {
621
- route += escapeString(token);
622
- } else {
623
- var prefix = escapeString(token.prefix);
624
- var capture = "(?:" + token.pattern + ")";
625
- keys.push(token);
626
- if (token.repeat) {
627
- capture += "(?:" + prefix + capture + ")*";
628
- }
629
- if (token.optional) {
630
- if (!token.partial) {
631
- capture = "(?:" + prefix + "(" + capture + "))?";
632
- } else {
633
- capture = prefix + "(" + capture + ")?";
634
- }
635
- } else {
636
- capture = prefix + "(" + capture + ")";
637
- }
638
- route += capture;
639
- }
640
- }
641
- var delimiter = escapeString(options.delimiter || "/");
642
- var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
643
- if (!strict) {
644
- route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
645
- }
646
- if (end) {
647
- route += "$";
648
- } else {
649
- route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
650
- }
651
- return attachKeys(new RegExp("^" + route, flags(options)), keys);
652
- }
653
- function pathToRegexp(path, keys, options) {
654
- if (!isarray(keys)) {
655
- options = /** @type {!Object} */
656
- keys || options;
657
- keys = [];
658
- }
659
- options = options || {};
660
- if (path instanceof RegExp) {
661
- return regexpToRegexp(
662
- path,
663
- /** @type {!Array} */
664
- keys
665
- );
666
- }
667
- if (isarray(path)) {
668
- return arrayToRegexp(
669
- /** @type {!Array} */
670
- path,
671
- /** @type {!Array} */
672
- keys,
673
- options
674
- );
675
- }
676
- return stringToRegexp(
677
- /** @type {string} */
678
- path,
679
- /** @type {!Array} */
680
- keys,
681
- options
682
- );
683
- }
684
- pathToRegexp_1.parse = parse_1;
685
- pathToRegexp_1.compile = compile_1;
686
- pathToRegexp_1.tokensToFunction = tokensToFunction_1;
687
- pathToRegexp_1.tokensToRegExp = tokensToRegExp_1;
688
- var regexpCompileCache = /* @__PURE__ */ Object.create(null);
689
- function fillParams(path, params, routeMsg) {
690
- params = params || {};
691
- try {
692
- var filler = regexpCompileCache[path] || (regexpCompileCache[path] = pathToRegexp_1.compile(path));
693
- if (typeof params.pathMatch === "string") {
694
- params[0] = params.pathMatch;
695
- }
696
- return filler(params, { pretty: true });
697
- } catch (e) {
698
- if (process.env.NODE_ENV !== "production") {
699
- warn(typeof params.pathMatch === "string", "missing param for " + routeMsg + ": " + e.message);
700
- }
701
- return "";
702
- } finally {
703
- delete params[0];
704
- }
705
- }
706
- function normalizeLocation(raw, current, append, router2) {
707
- var next = typeof raw === "string" ? { path: raw } : raw;
708
- if (next._normalized) {
709
- return next;
710
- } else if (next.name) {
711
- next = extend({}, raw);
712
- var params = next.params;
713
- if (params && typeof params === "object") {
714
- next.params = extend({}, params);
715
- }
716
- return next;
717
- }
718
- if (!next.path && next.params && current) {
719
- next = extend({}, next);
720
- next._normalized = true;
721
- var params$1 = extend(extend({}, current.params), next.params);
722
- if (current.name) {
723
- next.name = current.name;
724
- next.params = params$1;
725
- } else if (current.matched.length) {
726
- var rawPath = current.matched[current.matched.length - 1].path;
727
- next.path = fillParams(rawPath, params$1, "path " + current.path);
728
- } else if (process.env.NODE_ENV !== "production") {
729
- warn(false, "relative params navigation requires a current route.");
730
- }
731
- return next;
732
- }
733
- var parsedPath = parsePath(next.path || "");
734
- var basePath = current && current.path || "/";
735
- var path = parsedPath.path ? resolvePath(parsedPath.path, basePath, append || next.append) : basePath;
736
- var query = resolveQuery(
737
- parsedPath.query,
738
- next.query,
739
- router2 && router2.options.parseQuery
740
- );
741
- var hash = next.hash || parsedPath.hash;
742
- if (hash && hash.charAt(0) !== "#") {
743
- hash = "#" + hash;
744
- }
745
- return {
746
- _normalized: true,
747
- path,
748
- query,
749
- hash
750
- };
751
- }
752
- var toTypes = [String, Object];
753
- var eventTypes = [String, Array];
754
- var noop = function() {
755
- };
756
- var warnedCustomSlot;
757
- var warnedTagProp;
758
- var warnedEventProp;
759
- var Link = {
760
- name: "RouterLink",
761
- props: {
762
- to: {
763
- type: toTypes,
764
- required: true
765
- },
766
- tag: {
767
- type: String,
768
- default: "a"
769
- },
770
- custom: Boolean,
771
- exact: Boolean,
772
- exactPath: Boolean,
773
- append: Boolean,
774
- replace: Boolean,
775
- activeClass: String,
776
- exactActiveClass: String,
777
- ariaCurrentValue: {
778
- type: String,
779
- default: "page"
780
- },
781
- event: {
782
- type: eventTypes,
783
- default: "click"
784
- }
785
- },
786
- render: function render2(h) {
787
- var this$1$1 = this;
788
- var router2 = this.$router;
789
- var current = this.$route;
790
- var ref = router2.resolve(
791
- this.to,
792
- current,
793
- this.append
794
- );
795
- var location = ref.location;
796
- var route = ref.route;
797
- var href = ref.href;
798
- var classes = {};
799
- var globalActiveClass = router2.options.linkActiveClass;
800
- var globalExactActiveClass = router2.options.linkExactActiveClass;
801
- var activeClassFallback = globalActiveClass == null ? "router-link-active" : globalActiveClass;
802
- var exactActiveClassFallback = globalExactActiveClass == null ? "router-link-exact-active" : globalExactActiveClass;
803
- var activeClass = this.activeClass == null ? activeClassFallback : this.activeClass;
804
- var exactActiveClass = this.exactActiveClass == null ? exactActiveClassFallback : this.exactActiveClass;
805
- var compareTarget = route.redirectedFrom ? createRoute(null, normalizeLocation(route.redirectedFrom), null, router2) : route;
806
- classes[exactActiveClass] = isSameRoute(current, compareTarget, this.exactPath);
807
- classes[activeClass] = this.exact || this.exactPath ? classes[exactActiveClass] : isIncludedRoute(current, compareTarget);
808
- var ariaCurrentValue = classes[exactActiveClass] ? this.ariaCurrentValue : null;
809
- var handler = function(e) {
810
- if (guardEvent(e)) {
811
- if (this$1$1.replace) {
812
- router2.replace(location, noop);
813
- } else {
814
- router2.push(location, noop);
815
- }
816
- }
817
- };
818
- var on = { click: guardEvent };
819
- if (Array.isArray(this.event)) {
820
- this.event.forEach(function(e) {
821
- on[e] = handler;
822
- });
823
- } else {
824
- on[this.event] = handler;
825
- }
826
- var data = { class: classes };
827
- var scopedSlot = !this.$scopedSlots.$hasNormal && this.$scopedSlots.default && this.$scopedSlots.default({
828
- href,
829
- route,
830
- navigate: handler,
831
- isActive: classes[activeClass],
832
- isExactActive: classes[exactActiveClass]
833
- });
834
- if (scopedSlot) {
835
- if (process.env.NODE_ENV !== "production" && !this.custom) {
836
- !warnedCustomSlot && warn(false, 'In Vue Router 4, the v-slot API will by default wrap its content with an <a> element. Use the custom prop to remove this warning:\n<router-link v-slot="{ navigate, href }" custom></router-link>\n');
837
- warnedCustomSlot = true;
838
- }
839
- if (scopedSlot.length === 1) {
840
- return scopedSlot[0];
841
- } else if (scopedSlot.length > 1 || !scopedSlot.length) {
842
- if (process.env.NODE_ENV !== "production") {
843
- warn(
844
- false,
845
- '<router-link> with to="' + this.to + "\" is trying to use a scoped slot but it didn't provide exactly one child. Wrapping the content with a span element."
846
- );
847
- }
848
- return scopedSlot.length === 0 ? h() : h("span", {}, scopedSlot);
849
- }
850
- }
851
- if (process.env.NODE_ENV !== "production") {
852
- if ("tag" in this.$options.propsData && !warnedTagProp) {
853
- warn(
854
- false,
855
- "<router-link>'s tag prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
856
- );
857
- warnedTagProp = true;
858
- }
859
- if ("event" in this.$options.propsData && !warnedEventProp) {
860
- warn(
861
- false,
862
- "<router-link>'s event prop is deprecated and has been removed in Vue Router 4. Use the v-slot API to remove this warning: https://next.router.vuejs.org/guide/migration/#removal-of-event-and-tag-props-in-router-link."
863
- );
864
- warnedEventProp = true;
865
- }
866
- }
867
- if (this.tag === "a") {
868
- data.on = on;
869
- data.attrs = { href, "aria-current": ariaCurrentValue };
870
- } else {
871
- var a = findAnchor(this.$slots.default);
872
- if (a) {
873
- a.isStatic = false;
874
- var aData = a.data = extend({}, a.data);
875
- aData.on = aData.on || {};
876
- for (var event in aData.on) {
877
- var handler$1 = aData.on[event];
878
- if (event in on) {
879
- aData.on[event] = Array.isArray(handler$1) ? handler$1 : [handler$1];
880
- }
881
- }
882
- for (var event$1 in on) {
883
- if (event$1 in aData.on) {
884
- aData.on[event$1].push(on[event$1]);
885
- } else {
886
- aData.on[event$1] = handler;
887
- }
888
- }
889
- var aAttrs = a.data.attrs = extend({}, a.data.attrs);
890
- aAttrs.href = href;
891
- aAttrs["aria-current"] = ariaCurrentValue;
892
- } else {
893
- data.on = on;
894
- }
895
- }
896
- return h(this.tag, data, this.$slots.default);
897
- }
898
- };
899
- function guardEvent(e) {
900
- if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) {
901
- return;
902
- }
903
- if (e.defaultPrevented) {
904
- return;
905
- }
906
- if (e.button !== void 0 && e.button !== 0) {
907
- return;
908
- }
909
- if (e.currentTarget && e.currentTarget.getAttribute) {
910
- var target = e.currentTarget.getAttribute("target");
911
- if (/\b_blank\b/i.test(target)) {
912
- return;
913
- }
914
- }
915
- if (e.preventDefault) {
916
- e.preventDefault();
917
- }
918
- return true;
919
- }
920
- function findAnchor(children) {
921
- if (children) {
922
- var child;
923
- for (var i = 0; i < children.length; i++) {
924
- child = children[i];
925
- if (child.tag === "a") {
926
- return child;
927
- }
928
- if (child.children && (child = findAnchor(child.children))) {
929
- return child;
930
- }
931
- }
932
- }
933
- }
934
- var _Vue;
935
- function install(Vue2) {
936
- if (install.installed && _Vue === Vue2) {
937
- return;
938
- }
939
- install.installed = true;
940
- _Vue = Vue2;
941
- var isDef = function(v) {
942
- return v !== void 0;
943
- };
944
- var registerInstance = function(vm, callVal) {
945
- var i = vm.$options._parentVnode;
946
- if (isDef(i) && isDef(i = i.data) && isDef(i = i.registerRouteInstance)) {
947
- i(vm, callVal);
948
- }
949
- };
950
- Vue2.mixin({
951
- beforeCreate: function beforeCreate() {
952
- if (isDef(this.$options.router)) {
953
- this._routerRoot = this;
954
- this._router = this.$options.router;
955
- this._router.init(this);
956
- Vue2.util.defineReactive(this, "_route", this._router.history.current);
957
- } else {
958
- this._routerRoot = this.$parent && this.$parent._routerRoot || this;
959
- }
960
- registerInstance(this, this);
961
- },
962
- destroyed: function destroyed() {
963
- registerInstance(this);
964
- }
965
- });
966
- Object.defineProperty(Vue2.prototype, "$router", {
967
- get: function get() {
968
- return this._routerRoot._router;
969
- }
970
- });
971
- Object.defineProperty(Vue2.prototype, "$route", {
972
- get: function get() {
973
- return this._routerRoot._route;
974
- }
975
- });
976
- Vue2.component("RouterView", View);
977
- Vue2.component("RouterLink", Link);
978
- var strats = Vue2.config.optionMergeStrategies;
979
- strats.beforeRouteEnter = strats.beforeRouteLeave = strats.beforeRouteUpdate = strats.created;
980
- }
981
- var inBrowser = typeof window !== "undefined";
982
- function createRouteMap(routes, oldPathList, oldPathMap, oldNameMap, parentRoute) {
983
- var pathList = oldPathList || [];
984
- var pathMap = oldPathMap || /* @__PURE__ */ Object.create(null);
985
- var nameMap = oldNameMap || /* @__PURE__ */ Object.create(null);
986
- routes.forEach(function(route) {
987
- addRouteRecord(pathList, pathMap, nameMap, route, parentRoute);
988
- });
989
- for (var i = 0, l = pathList.length; i < l; i++) {
990
- if (pathList[i] === "*") {
991
- pathList.push(pathList.splice(i, 1)[0]);
992
- l--;
993
- i--;
994
- }
995
- }
996
- if (process.env.NODE_ENV === "development") {
997
- var found = pathList.filter(function(path) {
998
- return path && path.charAt(0) !== "*" && path.charAt(0) !== "/";
999
- });
1000
- if (found.length > 0) {
1001
- var pathNames = found.map(function(path) {
1002
- return "- " + path;
1003
- }).join("\n");
1004
- warn(false, "Non-nested routes must include a leading slash character. Fix the following routes: \n" + pathNames);
1005
- }
1006
- }
1007
- return {
1008
- pathList,
1009
- pathMap,
1010
- nameMap
1011
- };
1012
- }
1013
- function addRouteRecord(pathList, pathMap, nameMap, route, parent, matchAs) {
1014
- var path = route.path;
1015
- var name = route.name;
1016
- if (process.env.NODE_ENV !== "production") {
1017
- assert(path != null, '"path" is required in a route configuration.');
1018
- assert(
1019
- typeof route.component !== "string",
1020
- 'route config "component" for path: ' + String(
1021
- path || name
1022
- ) + " cannot be a string id. Use an actual component instead."
1023
- );
1024
- warn(
1025
- // eslint-disable-next-line no-control-regex
1026
- !/[^\u0000-\u007F]+/.test(path),
1027
- 'Route with path "' + path + '" contains unencoded characters, make sure your path is correctly encoded before passing it to the router. Use encodeURI to encode static segments of your path.'
1028
- );
1029
- }
1030
- var pathToRegexpOptions = route.pathToRegexpOptions || {};
1031
- var normalizedPath = normalizePath(path, parent, pathToRegexpOptions.strict);
1032
- if (typeof route.caseSensitive === "boolean") {
1033
- pathToRegexpOptions.sensitive = route.caseSensitive;
1034
- }
1035
- var record = {
1036
- path: normalizedPath,
1037
- regex: compileRouteRegex(normalizedPath, pathToRegexpOptions),
1038
- components: route.components || { default: route.component },
1039
- alias: route.alias ? typeof route.alias === "string" ? [route.alias] : route.alias : [],
1040
- instances: {},
1041
- enteredCbs: {},
1042
- name,
1043
- parent,
1044
- matchAs,
1045
- redirect: route.redirect,
1046
- beforeEnter: route.beforeEnter,
1047
- meta: route.meta || {},
1048
- props: route.props == null ? {} : route.components ? route.props : { default: route.props }
1049
- };
1050
- if (route.children) {
1051
- if (process.env.NODE_ENV !== "production") {
1052
- if (route.name && !route.redirect && route.children.some(function(child) {
1053
- return /^\/?$/.test(child.path);
1054
- })) {
1055
- warn(
1056
- false,
1057
- "Named Route '" + route.name + "' has a default child route. When navigating to this named route (:to=\"{name: '" + route.name + "'}\"), the default child route will not be rendered. Remove the name from this route and use the name of the default child route for named links instead."
1058
- );
1059
- }
1060
- }
1061
- route.children.forEach(function(child) {
1062
- var childMatchAs = matchAs ? cleanPath(matchAs + "/" + child.path) : void 0;
1063
- addRouteRecord(pathList, pathMap, nameMap, child, record, childMatchAs);
1064
- });
1065
- }
1066
- if (!pathMap[record.path]) {
1067
- pathList.push(record.path);
1068
- pathMap[record.path] = record;
1069
- }
1070
- if (route.alias !== void 0) {
1071
- var aliases = Array.isArray(route.alias) ? route.alias : [route.alias];
1072
- for (var i = 0; i < aliases.length; ++i) {
1073
- var alias = aliases[i];
1074
- if (process.env.NODE_ENV !== "production" && alias === path) {
1075
- warn(
1076
- false,
1077
- 'Found an alias with the same value as the path: "' + path + '". You have to remove that alias. It will be ignored in development.'
1078
- );
1079
- continue;
1080
- }
1081
- var aliasRoute = {
1082
- path: alias,
1083
- children: route.children
1084
- };
1085
- addRouteRecord(
1086
- pathList,
1087
- pathMap,
1088
- nameMap,
1089
- aliasRoute,
1090
- parent,
1091
- record.path || "/"
1092
- // matchAs
1093
- );
1094
- }
1095
- }
1096
- if (name) {
1097
- if (!nameMap[name]) {
1098
- nameMap[name] = record;
1099
- } else if (process.env.NODE_ENV !== "production" && !matchAs) {
1100
- warn(
1101
- false,
1102
- 'Duplicate named routes definition: { name: "' + name + '", path: "' + record.path + '" }'
1103
- );
1104
- }
1105
- }
1106
- }
1107
- function compileRouteRegex(path, pathToRegexpOptions) {
1108
- var regex = pathToRegexp_1(path, [], pathToRegexpOptions);
1109
- if (process.env.NODE_ENV !== "production") {
1110
- var keys = /* @__PURE__ */ Object.create(null);
1111
- regex.keys.forEach(function(key) {
1112
- warn(
1113
- !keys[key.name],
1114
- 'Duplicate param keys in route with path: "' + path + '"'
1115
- );
1116
- keys[key.name] = true;
1117
- });
1118
- }
1119
- return regex;
1120
- }
1121
- function normalizePath(path, parent, strict) {
1122
- if (!strict) {
1123
- path = path.replace(/\/$/, "");
1124
- }
1125
- if (path[0] === "/") {
1126
- return path;
1127
- }
1128
- if (parent == null) {
1129
- return path;
1130
- }
1131
- return cleanPath(parent.path + "/" + path);
1132
- }
1133
- function createMatcher(routes, router2) {
1134
- var ref = createRouteMap(routes);
1135
- var pathList = ref.pathList;
1136
- var pathMap = ref.pathMap;
1137
- var nameMap = ref.nameMap;
1138
- function addRoutes2(routes2) {
1139
- createRouteMap(routes2, pathList, pathMap, nameMap);
1140
- }
1141
- function addRoute2(parentOrRoute, route) {
1142
- var parent = typeof parentOrRoute !== "object" ? nameMap[parentOrRoute] : void 0;
1143
- createRouteMap([route || parentOrRoute], pathList, pathMap, nameMap, parent);
1144
- if (parent && parent.alias.length) {
1145
- createRouteMap(
1146
- // $flow-disable-line route is defined if parent is
1147
- parent.alias.map(function(alias2) {
1148
- return { path: alias2, children: [route] };
1149
- }),
1150
- pathList,
1151
- pathMap,
1152
- nameMap,
1153
- parent
1154
- );
1155
- }
1156
- }
1157
- function getRoutes2() {
1158
- return pathList.map(function(path) {
1159
- return pathMap[path];
1160
- });
1161
- }
1162
- function match2(raw, currentRoute, redirectedFrom) {
1163
- var location = normalizeLocation(raw, currentRoute, false, router2);
1164
- var name = location.name;
1165
- if (name) {
1166
- var record = nameMap[name];
1167
- if (process.env.NODE_ENV !== "production") {
1168
- warn(record, "Route with name '" + name + "' does not exist");
1169
- }
1170
- if (!record) {
1171
- return _createRoute(null, location);
1172
- }
1173
- var paramNames = record.regex.keys.filter(function(key2) {
1174
- return !key2.optional;
1175
- }).map(function(key2) {
1176
- return key2.name;
1177
- });
1178
- if (typeof location.params !== "object") {
1179
- location.params = {};
1180
- }
1181
- if (currentRoute && typeof currentRoute.params === "object") {
1182
- for (var key in currentRoute.params) {
1183
- if (!(key in location.params) && paramNames.indexOf(key) > -1) {
1184
- location.params[key] = currentRoute.params[key];
1185
- }
1186
- }
1187
- }
1188
- location.path = fillParams(record.path, location.params, 'named route "' + name + '"');
1189
- return _createRoute(record, location, redirectedFrom);
1190
- } else if (location.path) {
1191
- location.params = {};
1192
- for (var i = 0; i < pathList.length; i++) {
1193
- var path = pathList[i];
1194
- var record$1 = pathMap[path];
1195
- if (matchRoute(record$1.regex, location.path, location.params)) {
1196
- return _createRoute(record$1, location, redirectedFrom);
1197
- }
1198
- }
1199
- }
1200
- return _createRoute(null, location);
1201
- }
1202
- function redirect(record, location) {
1203
- var originalRedirect = record.redirect;
1204
- var redirect2 = typeof originalRedirect === "function" ? originalRedirect(createRoute(record, location, null, router2)) : originalRedirect;
1205
- if (typeof redirect2 === "string") {
1206
- redirect2 = { path: redirect2 };
1207
- }
1208
- if (!redirect2 || typeof redirect2 !== "object") {
1209
- if (process.env.NODE_ENV !== "production") {
1210
- warn(
1211
- false,
1212
- "invalid redirect option: " + JSON.stringify(redirect2)
1213
- );
1214
- }
1215
- return _createRoute(null, location);
1216
- }
1217
- var re = redirect2;
1218
- var name = re.name;
1219
- var path = re.path;
1220
- var query = location.query;
1221
- var hash = location.hash;
1222
- var params = location.params;
1223
- query = re.hasOwnProperty("query") ? re.query : query;
1224
- hash = re.hasOwnProperty("hash") ? re.hash : hash;
1225
- params = re.hasOwnProperty("params") ? re.params : params;
1226
- if (name) {
1227
- var targetRecord = nameMap[name];
1228
- if (process.env.NODE_ENV !== "production") {
1229
- assert(targetRecord, 'redirect failed: named route "' + name + '" not found.');
1230
- }
1231
- return match2({
1232
- _normalized: true,
1233
- name,
1234
- query,
1235
- hash,
1236
- params
1237
- }, void 0, location);
1238
- } else if (path) {
1239
- var rawPath = resolveRecordPath(path, record);
1240
- var resolvedPath = fillParams(rawPath, params, 'redirect route with path "' + rawPath + '"');
1241
- return match2({
1242
- _normalized: true,
1243
- path: resolvedPath,
1244
- query,
1245
- hash
1246
- }, void 0, location);
1247
- } else {
1248
- if (process.env.NODE_ENV !== "production") {
1249
- warn(false, "invalid redirect option: " + JSON.stringify(redirect2));
1250
- }
1251
- return _createRoute(null, location);
1252
- }
1253
- }
1254
- function alias(record, location, matchAs) {
1255
- var aliasedPath = fillParams(matchAs, location.params, 'aliased route with path "' + matchAs + '"');
1256
- var aliasedMatch = match2({
1257
- _normalized: true,
1258
- path: aliasedPath
1259
- });
1260
- if (aliasedMatch) {
1261
- var matched = aliasedMatch.matched;
1262
- var aliasedRecord = matched[matched.length - 1];
1263
- location.params = aliasedMatch.params;
1264
- return _createRoute(aliasedRecord, location);
1265
- }
1266
- return _createRoute(null, location);
1267
- }
1268
- function _createRoute(record, location, redirectedFrom) {
1269
- if (record && record.redirect) {
1270
- return redirect(record, redirectedFrom || location);
1271
- }
1272
- if (record && record.matchAs) {
1273
- return alias(record, location, record.matchAs);
1274
- }
1275
- return createRoute(record, location, redirectedFrom, router2);
1276
- }
1277
- return {
1278
- match: match2,
1279
- addRoute: addRoute2,
1280
- getRoutes: getRoutes2,
1281
- addRoutes: addRoutes2
1282
- };
1283
- }
1284
- function matchRoute(regex, path, params) {
1285
- var m = path.match(regex);
1286
- if (!m) {
1287
- return false;
1288
- } else if (!params) {
1289
- return true;
1290
- }
1291
- for (var i = 1, len = m.length; i < len; ++i) {
1292
- var key = regex.keys[i - 1];
1293
- if (key) {
1294
- params[key.name || "pathMatch"] = typeof m[i] === "string" ? decode(m[i]) : m[i];
1295
- }
1296
- }
1297
- return true;
1298
- }
1299
- function resolveRecordPath(path, record) {
1300
- return resolvePath(path, record.parent ? record.parent.path : "/", true);
1301
- }
1302
- var Time = inBrowser && window.performance && window.performance.now ? window.performance : Date;
1303
- function genStateKey() {
1304
- return Time.now().toFixed(3);
1305
- }
1306
- var _key = genStateKey();
1307
- function getStateKey() {
1308
- return _key;
1309
- }
1310
- function setStateKey(key) {
1311
- return _key = key;
1312
- }
1313
- var positionStore = /* @__PURE__ */ Object.create(null);
1314
- function setupScroll() {
1315
- if ("scrollRestoration" in window.history) {
1316
- window.history.scrollRestoration = "manual";
1317
- }
1318
- var protocolAndPath = window.location.protocol + "//" + window.location.host;
1319
- var absolutePath = window.location.href.replace(protocolAndPath, "");
1320
- var stateCopy = extend({}, window.history.state);
1321
- stateCopy.key = getStateKey();
1322
- window.history.replaceState(stateCopy, "", absolutePath);
1323
- window.addEventListener("popstate", handlePopState);
1324
- return function() {
1325
- window.removeEventListener("popstate", handlePopState);
1326
- };
1327
- }
1328
- function handleScroll(router2, to, from, isPop) {
1329
- if (!router2.app) {
1330
- return;
1331
- }
1332
- var behavior = router2.options.scrollBehavior;
1333
- if (!behavior) {
1334
- return;
1335
- }
1336
- if (process.env.NODE_ENV !== "production") {
1337
- assert(typeof behavior === "function", "scrollBehavior must be a function");
1338
- }
1339
- router2.app.$nextTick(function() {
1340
- var position = getScrollPosition();
1341
- var shouldScroll = behavior.call(
1342
- router2,
1343
- to,
1344
- from,
1345
- isPop ? position : null
1346
- );
1347
- if (!shouldScroll) {
1348
- return;
1349
- }
1350
- if (typeof shouldScroll.then === "function") {
1351
- shouldScroll.then(function(shouldScroll2) {
1352
- scrollToPosition(shouldScroll2, position);
1353
- }).catch(function(err) {
1354
- if (process.env.NODE_ENV !== "production") {
1355
- assert(false, err.toString());
1356
- }
1357
- });
1358
- } else {
1359
- scrollToPosition(shouldScroll, position);
1360
- }
1361
- });
1362
- }
1363
- function saveScrollPosition() {
1364
- var key = getStateKey();
1365
- if (key) {
1366
- positionStore[key] = {
1367
- x: window.pageXOffset,
1368
- y: window.pageYOffset
1369
- };
1370
- }
1371
- }
1372
- function handlePopState(e) {
1373
- saveScrollPosition();
1374
- if (e.state && e.state.key) {
1375
- setStateKey(e.state.key);
1376
- }
1377
- }
1378
- function getScrollPosition() {
1379
- var key = getStateKey();
1380
- if (key) {
1381
- return positionStore[key];
1382
- }
1383
- }
1384
- function getElementPosition(el, offset) {
1385
- var docEl = document.documentElement;
1386
- var docRect = docEl.getBoundingClientRect();
1387
- var elRect = el.getBoundingClientRect();
1388
- return {
1389
- x: elRect.left - docRect.left - offset.x,
1390
- y: elRect.top - docRect.top - offset.y
1391
- };
1392
- }
1393
- function isValidPosition(obj) {
1394
- return isNumber(obj.x) || isNumber(obj.y);
1395
- }
1396
- function normalizePosition(obj) {
1397
- return {
1398
- x: isNumber(obj.x) ? obj.x : window.pageXOffset,
1399
- y: isNumber(obj.y) ? obj.y : window.pageYOffset
1400
- };
1401
- }
1402
- function normalizeOffset(obj) {
1403
- return {
1404
- x: isNumber(obj.x) ? obj.x : 0,
1405
- y: isNumber(obj.y) ? obj.y : 0
1406
- };
1407
- }
1408
- function isNumber(v) {
1409
- return typeof v === "number";
1410
- }
1411
- var hashStartsWithNumberRE = /^#\d/;
1412
- function scrollToPosition(shouldScroll, position) {
1413
- var isObject = typeof shouldScroll === "object";
1414
- if (isObject && typeof shouldScroll.selector === "string") {
1415
- var el = hashStartsWithNumberRE.test(shouldScroll.selector) ? document.getElementById(shouldScroll.selector.slice(1)) : document.querySelector(shouldScroll.selector);
1416
- if (el) {
1417
- var offset = shouldScroll.offset && typeof shouldScroll.offset === "object" ? shouldScroll.offset : {};
1418
- offset = normalizeOffset(offset);
1419
- position = getElementPosition(el, offset);
1420
- } else if (isValidPosition(shouldScroll)) {
1421
- position = normalizePosition(shouldScroll);
1422
- }
1423
- } else if (isObject && isValidPosition(shouldScroll)) {
1424
- position = normalizePosition(shouldScroll);
1425
- }
1426
- if (position) {
1427
- if ("scrollBehavior" in document.documentElement.style) {
1428
- window.scrollTo({
1429
- left: position.x,
1430
- top: position.y,
1431
- // $flow-disable-line
1432
- behavior: shouldScroll.behavior
1433
- });
1434
- } else {
1435
- window.scrollTo(position.x, position.y);
1436
- }
1437
- }
1438
- }
1439
- var supportsPushState = inBrowser && function() {
1440
- var ua = window.navigator.userAgent;
1441
- if ((ua.indexOf("Android 2.") !== -1 || ua.indexOf("Android 4.0") !== -1) && ua.indexOf("Mobile Safari") !== -1 && ua.indexOf("Chrome") === -1 && ua.indexOf("Windows Phone") === -1) {
1442
- return false;
1443
- }
1444
- return window.history && typeof window.history.pushState === "function";
1445
- }();
1446
- function pushState(url, replace2) {
1447
- saveScrollPosition();
1448
- var history = window.history;
1449
- try {
1450
- if (replace2) {
1451
- var stateCopy = extend({}, history.state);
1452
- stateCopy.key = getStateKey();
1453
- history.replaceState(stateCopy, "", url);
1454
- } else {
1455
- history.pushState({ key: setStateKey(genStateKey()) }, "", url);
1456
- }
1457
- } catch (e) {
1458
- window.location[replace2 ? "replace" : "assign"](url);
1459
- }
1460
- }
1461
- function replaceState(url) {
1462
- pushState(url, true);
1463
- }
1464
- var NavigationFailureType = {
1465
- redirected: 2,
1466
- aborted: 4,
1467
- cancelled: 8,
1468
- duplicated: 16
1469
- };
1470
- function createNavigationRedirectedError(from, to) {
1471
- return createRouterError(
1472
- from,
1473
- to,
1474
- NavigationFailureType.redirected,
1475
- 'Redirected when going from "' + from.fullPath + '" to "' + stringifyRoute(
1476
- to
1477
- ) + '" via a navigation guard.'
1478
- );
1479
- }
1480
- function createNavigationDuplicatedError(from, to) {
1481
- var error = createRouterError(
1482
- from,
1483
- to,
1484
- NavigationFailureType.duplicated,
1485
- 'Avoided redundant navigation to current location: "' + from.fullPath + '".'
1486
- );
1487
- error.name = "NavigationDuplicated";
1488
- return error;
1489
- }
1490
- function createNavigationCancelledError(from, to) {
1491
- return createRouterError(
1492
- from,
1493
- to,
1494
- NavigationFailureType.cancelled,
1495
- 'Navigation cancelled from "' + from.fullPath + '" to "' + to.fullPath + '" with a new navigation.'
1496
- );
1497
- }
1498
- function createNavigationAbortedError(from, to) {
1499
- return createRouterError(
1500
- from,
1501
- to,
1502
- NavigationFailureType.aborted,
1503
- 'Navigation aborted from "' + from.fullPath + '" to "' + to.fullPath + '" via a navigation guard.'
1504
- );
1505
- }
1506
- function createRouterError(from, to, type, message) {
1507
- var error = new Error(message);
1508
- error._isRouter = true;
1509
- error.from = from;
1510
- error.to = to;
1511
- error.type = type;
1512
- return error;
1513
- }
1514
- var propertiesToLog = ["params", "query", "hash"];
1515
- function stringifyRoute(to) {
1516
- if (typeof to === "string") {
1517
- return to;
1518
- }
1519
- if ("path" in to) {
1520
- return to.path;
1521
- }
1522
- var location = {};
1523
- propertiesToLog.forEach(function(key) {
1524
- if (key in to) {
1525
- location[key] = to[key];
1526
- }
1527
- });
1528
- return JSON.stringify(location, null, 2);
1529
- }
1530
- function isError(err) {
1531
- return Object.prototype.toString.call(err).indexOf("Error") > -1;
1532
- }
1533
- function isNavigationFailure(err, errorType) {
1534
- return isError(err) && err._isRouter && (errorType == null || err.type === errorType);
1535
- }
1536
- function runQueue(queue, fn, cb) {
1537
- var step = function(index) {
1538
- if (index >= queue.length) {
1539
- cb();
1540
- } else {
1541
- if (queue[index]) {
1542
- fn(queue[index], function() {
1543
- step(index + 1);
1544
- });
1545
- } else {
1546
- step(index + 1);
1547
- }
1548
- }
1549
- };
1550
- step(0);
1551
- }
1552
- function resolveAsyncComponents(matched) {
1553
- return function(to, from, next) {
1554
- var hasAsync = false;
1555
- var pending = 0;
1556
- var error = null;
1557
- flatMapComponents(matched, function(def, _, match2, key) {
1558
- if (typeof def === "function" && def.cid === void 0) {
1559
- hasAsync = true;
1560
- pending++;
1561
- var resolve2 = once(function(resolvedDef) {
1562
- if (isESModule(resolvedDef)) {
1563
- resolvedDef = resolvedDef.default;
1564
- }
1565
- def.resolved = typeof resolvedDef === "function" ? resolvedDef : _Vue.extend(resolvedDef);
1566
- match2.components[key] = resolvedDef;
1567
- pending--;
1568
- if (pending <= 0) {
1569
- next();
1570
- }
1571
- });
1572
- var reject = once(function(reason) {
1573
- var msg = "Failed to resolve async component " + key + ": " + reason;
1574
- process.env.NODE_ENV !== "production" && warn(false, msg);
1575
- if (!error) {
1576
- error = isError(reason) ? reason : new Error(msg);
1577
- next(error);
1578
- }
1579
- });
1580
- var res;
1581
- try {
1582
- res = def(resolve2, reject);
1583
- } catch (e) {
1584
- reject(e);
1585
- }
1586
- if (res) {
1587
- if (typeof res.then === "function") {
1588
- res.then(resolve2, reject);
1589
- } else {
1590
- var comp = res.component;
1591
- if (comp && typeof comp.then === "function") {
1592
- comp.then(resolve2, reject);
1593
- }
1594
- }
1595
- }
1596
- }
1597
- });
1598
- if (!hasAsync) {
1599
- next();
1600
- }
1601
- };
1602
- }
1603
- function flatMapComponents(matched, fn) {
1604
- return flatten(matched.map(function(m) {
1605
- return Object.keys(m.components).map(function(key) {
1606
- return fn(
1607
- m.components[key],
1608
- m.instances[key],
1609
- m,
1610
- key
1611
- );
1612
- });
1613
- }));
1614
- }
1615
- function flatten(arr) {
1616
- return Array.prototype.concat.apply([], arr);
1617
- }
1618
- var hasSymbol = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol";
1619
- function isESModule(obj) {
1620
- return obj.__esModule || hasSymbol && obj[Symbol.toStringTag] === "Module";
1621
- }
1622
- function once(fn) {
1623
- var called = false;
1624
- return function() {
1625
- var args = [], len = arguments.length;
1626
- while (len--)
1627
- args[len] = arguments[len];
1628
- if (called) {
1629
- return;
1630
- }
1631
- called = true;
1632
- return fn.apply(this, args);
1633
- };
1634
- }
1635
- var History = function History2(router2, base) {
1636
- this.router = router2;
1637
- this.base = normalizeBase(base);
1638
- this.current = START;
1639
- this.pending = null;
1640
- this.ready = false;
1641
- this.readyCbs = [];
1642
- this.readyErrorCbs = [];
1643
- this.errorCbs = [];
1644
- this.listeners = [];
1645
- };
1646
- History.prototype.listen = function listen(cb) {
1647
- this.cb = cb;
1648
- };
1649
- History.prototype.onReady = function onReady(cb, errorCb) {
1650
- if (this.ready) {
1651
- cb();
1652
- } else {
1653
- this.readyCbs.push(cb);
1654
- if (errorCb) {
1655
- this.readyErrorCbs.push(errorCb);
1656
- }
1657
- }
1658
- };
1659
- History.prototype.onError = function onError(errorCb) {
1660
- this.errorCbs.push(errorCb);
1661
- };
1662
- History.prototype.transitionTo = function transitionTo(location, onComplete, onAbort) {
1663
- var this$1$1 = this;
1664
- var route;
1665
- try {
1666
- route = this.router.match(location, this.current);
1667
- } catch (e) {
1668
- this.errorCbs.forEach(function(cb) {
1669
- cb(e);
1670
- });
1671
- throw e;
1672
- }
1673
- var prev = this.current;
1674
- this.confirmTransition(
1675
- route,
1676
- function() {
1677
- this$1$1.updateRoute(route);
1678
- onComplete && onComplete(route);
1679
- this$1$1.ensureURL();
1680
- this$1$1.router.afterHooks.forEach(function(hook) {
1681
- hook && hook(route, prev);
1682
- });
1683
- if (!this$1$1.ready) {
1684
- this$1$1.ready = true;
1685
- this$1$1.readyCbs.forEach(function(cb) {
1686
- cb(route);
1687
- });
1688
- }
1689
- },
1690
- function(err) {
1691
- if (onAbort) {
1692
- onAbort(err);
1693
- }
1694
- if (err && !this$1$1.ready) {
1695
- if (!isNavigationFailure(err, NavigationFailureType.redirected) || prev !== START) {
1696
- this$1$1.ready = true;
1697
- this$1$1.readyErrorCbs.forEach(function(cb) {
1698
- cb(err);
1699
- });
1700
- }
1701
- }
1702
- }
1703
- );
1704
- };
1705
- History.prototype.confirmTransition = function confirmTransition(route, onComplete, onAbort) {
1706
- var this$1$1 = this;
1707
- var current = this.current;
1708
- this.pending = route;
1709
- var abort = function(err) {
1710
- if (!isNavigationFailure(err) && isError(err)) {
1711
- if (this$1$1.errorCbs.length) {
1712
- this$1$1.errorCbs.forEach(function(cb) {
1713
- cb(err);
1714
- });
1715
- } else {
1716
- if (process.env.NODE_ENV !== "production") {
1717
- warn(false, "uncaught error during route navigation:");
1718
- }
1719
- console.error(err);
1720
- }
1721
- }
1722
- onAbort && onAbort(err);
1723
- };
1724
- var lastRouteIndex = route.matched.length - 1;
1725
- var lastCurrentIndex = current.matched.length - 1;
1726
- if (isSameRoute(route, current) && // in the case the route map has been dynamically appended to
1727
- lastRouteIndex === lastCurrentIndex && route.matched[lastRouteIndex] === current.matched[lastCurrentIndex]) {
1728
- this.ensureURL();
1729
- if (route.hash) {
1730
- handleScroll(this.router, current, route, false);
1731
- }
1732
- return abort(createNavigationDuplicatedError(current, route));
1733
- }
1734
- var ref = resolveQueue(
1735
- this.current.matched,
1736
- route.matched
1737
- );
1738
- var updated = ref.updated;
1739
- var deactivated = ref.deactivated;
1740
- var activated = ref.activated;
1741
- var queue = [].concat(
1742
- // in-component leave guards
1743
- extractLeaveGuards(deactivated),
1744
- // global before hooks
1745
- this.router.beforeHooks,
1746
- // in-component update hooks
1747
- extractUpdateHooks(updated),
1748
- // in-config enter guards
1749
- activated.map(function(m) {
1750
- return m.beforeEnter;
1751
- }),
1752
- // async components
1753
- resolveAsyncComponents(activated)
1754
- );
1755
- var iterator = function(hook, next) {
1756
- if (this$1$1.pending !== route) {
1757
- return abort(createNavigationCancelledError(current, route));
1758
- }
1759
- try {
1760
- hook(route, current, function(to) {
1761
- if (to === false) {
1762
- this$1$1.ensureURL(true);
1763
- abort(createNavigationAbortedError(current, route));
1764
- } else if (isError(to)) {
1765
- this$1$1.ensureURL(true);
1766
- abort(to);
1767
- } else if (typeof to === "string" || typeof to === "object" && (typeof to.path === "string" || typeof to.name === "string")) {
1768
- abort(createNavigationRedirectedError(current, route));
1769
- if (typeof to === "object" && to.replace) {
1770
- this$1$1.replace(to);
1771
- } else {
1772
- this$1$1.push(to);
1773
- }
1774
- } else {
1775
- next(to);
1776
- }
1777
- });
1778
- } catch (e) {
1779
- abort(e);
1780
- }
1781
- };
1782
- runQueue(queue, iterator, function() {
1783
- var enterGuards = extractEnterGuards(activated);
1784
- var queue2 = enterGuards.concat(this$1$1.router.resolveHooks);
1785
- runQueue(queue2, iterator, function() {
1786
- if (this$1$1.pending !== route) {
1787
- return abort(createNavigationCancelledError(current, route));
1788
- }
1789
- this$1$1.pending = null;
1790
- onComplete(route);
1791
- if (this$1$1.router.app) {
1792
- this$1$1.router.app.$nextTick(function() {
1793
- handleRouteEntered(route);
1794
- });
1795
- }
1796
- });
1797
- });
1798
- };
1799
- History.prototype.updateRoute = function updateRoute(route) {
1800
- this.current = route;
1801
- this.cb && this.cb(route);
1802
- };
1803
- History.prototype.setupListeners = function setupListeners() {
1804
- };
1805
- History.prototype.teardown = function teardown() {
1806
- this.listeners.forEach(function(cleanupListener) {
1807
- cleanupListener();
1808
- });
1809
- this.listeners = [];
1810
- this.current = START;
1811
- this.pending = null;
1812
- };
1813
- function normalizeBase(base) {
1814
- if (!base) {
1815
- if (inBrowser) {
1816
- var baseEl = document.querySelector("base");
1817
- base = baseEl && baseEl.getAttribute("href") || "/";
1818
- base = base.replace(/^https?:\/\/[^\/]+/, "");
1819
- } else {
1820
- base = "/";
1821
- }
1822
- }
1823
- if (base.charAt(0) !== "/") {
1824
- base = "/" + base;
1825
- }
1826
- return base.replace(/\/$/, "");
1827
- }
1828
- function resolveQueue(current, next) {
1829
- var i;
1830
- var max = Math.max(current.length, next.length);
1831
- for (i = 0; i < max; i++) {
1832
- if (current[i] !== next[i]) {
1833
- break;
1834
- }
1835
- }
1836
- return {
1837
- updated: next.slice(0, i),
1838
- activated: next.slice(i),
1839
- deactivated: current.slice(i)
1840
- };
1841
- }
1842
- function extractGuards(records, name, bind, reverse) {
1843
- var guards = flatMapComponents(records, function(def, instance, match2, key) {
1844
- var guard = extractGuard(def, name);
1845
- if (guard) {
1846
- return Array.isArray(guard) ? guard.map(function(guard2) {
1847
- return bind(guard2, instance, match2, key);
1848
- }) : bind(guard, instance, match2, key);
1849
- }
1850
- });
1851
- return flatten(reverse ? guards.reverse() : guards);
1852
- }
1853
- function extractGuard(def, key) {
1854
- if (typeof def !== "function") {
1855
- def = _Vue.extend(def);
1856
- }
1857
- return def.options[key];
1858
- }
1859
- function extractLeaveGuards(deactivated) {
1860
- return extractGuards(deactivated, "beforeRouteLeave", bindGuard, true);
1861
- }
1862
- function extractUpdateHooks(updated) {
1863
- return extractGuards(updated, "beforeRouteUpdate", bindGuard);
1864
- }
1865
- function bindGuard(guard, instance) {
1866
- if (instance) {
1867
- return function boundRouteGuard() {
1868
- return guard.apply(instance, arguments);
1869
- };
1870
- }
1871
- }
1872
- function extractEnterGuards(activated) {
1873
- return extractGuards(
1874
- activated,
1875
- "beforeRouteEnter",
1876
- function(guard, _, match2, key) {
1877
- return bindEnterGuard(guard, match2, key);
1878
- }
1879
- );
1880
- }
1881
- function bindEnterGuard(guard, match2, key) {
1882
- return function routeEnterGuard(to, from, next) {
1883
- return guard(to, from, function(cb) {
1884
- if (typeof cb === "function") {
1885
- if (!match2.enteredCbs[key]) {
1886
- match2.enteredCbs[key] = [];
1887
- }
1888
- match2.enteredCbs[key].push(cb);
1889
- }
1890
- next(cb);
1891
- });
1892
- };
1893
- }
1894
- var HTML5History = /* @__PURE__ */ function(History3) {
1895
- function HTML5History2(router2, base) {
1896
- History3.call(this, router2, base);
1897
- this._startLocation = getLocation(this.base);
1898
- }
1899
- if (History3)
1900
- HTML5History2.__proto__ = History3;
1901
- HTML5History2.prototype = Object.create(History3 && History3.prototype);
1902
- HTML5History2.prototype.constructor = HTML5History2;
1903
- HTML5History2.prototype.setupListeners = function setupListeners2() {
1904
- var this$1$1 = this;
1905
- if (this.listeners.length > 0) {
1906
- return;
1907
- }
1908
- var router2 = this.router;
1909
- var expectScroll = router2.options.scrollBehavior;
1910
- var supportsScroll = supportsPushState && expectScroll;
1911
- if (supportsScroll) {
1912
- this.listeners.push(setupScroll());
1913
- }
1914
- var handleRoutingEvent = function() {
1915
- var current = this$1$1.current;
1916
- var location = getLocation(this$1$1.base);
1917
- if (this$1$1.current === START && location === this$1$1._startLocation) {
1918
- return;
1919
- }
1920
- this$1$1.transitionTo(location, function(route) {
1921
- if (supportsScroll) {
1922
- handleScroll(router2, route, current, true);
1923
- }
1924
- });
1925
- };
1926
- window.addEventListener("popstate", handleRoutingEvent);
1927
- this.listeners.push(function() {
1928
- window.removeEventListener("popstate", handleRoutingEvent);
1929
- });
1930
- };
1931
- HTML5History2.prototype.go = function go2(n) {
1932
- window.history.go(n);
1933
- };
1934
- HTML5History2.prototype.push = function push2(location, onComplete, onAbort) {
1935
- var this$1$1 = this;
1936
- var ref = this;
1937
- var fromRoute = ref.current;
1938
- this.transitionTo(location, function(route) {
1939
- pushState(cleanPath(this$1$1.base + route.fullPath));
1940
- handleScroll(this$1$1.router, route, fromRoute, false);
1941
- onComplete && onComplete(route);
1942
- }, onAbort);
1943
- };
1944
- HTML5History2.prototype.replace = function replace2(location, onComplete, onAbort) {
1945
- var this$1$1 = this;
1946
- var ref = this;
1947
- var fromRoute = ref.current;
1948
- this.transitionTo(location, function(route) {
1949
- replaceState(cleanPath(this$1$1.base + route.fullPath));
1950
- handleScroll(this$1$1.router, route, fromRoute, false);
1951
- onComplete && onComplete(route);
1952
- }, onAbort);
1953
- };
1954
- HTML5History2.prototype.ensureURL = function ensureURL(push2) {
1955
- if (getLocation(this.base) !== this.current.fullPath) {
1956
- var current = cleanPath(this.base + this.current.fullPath);
1957
- push2 ? pushState(current) : replaceState(current);
1958
- }
1959
- };
1960
- HTML5History2.prototype.getCurrentLocation = function getCurrentLocation() {
1961
- return getLocation(this.base);
1962
- };
1963
- return HTML5History2;
1964
- }(History);
1965
- function getLocation(base) {
1966
- var path = window.location.pathname;
1967
- var pathLowerCase = path.toLowerCase();
1968
- var baseLowerCase = base.toLowerCase();
1969
- if (base && (pathLowerCase === baseLowerCase || pathLowerCase.indexOf(cleanPath(baseLowerCase + "/")) === 0)) {
1970
- path = path.slice(base.length);
1971
- }
1972
- return (path || "/") + window.location.search + window.location.hash;
1973
- }
1974
- var HashHistory = /* @__PURE__ */ function(History3) {
1975
- function HashHistory2(router2, base, fallback) {
1976
- History3.call(this, router2, base);
1977
- if (fallback && checkFallback(this.base)) {
1978
- return;
1979
- }
1980
- ensureSlash();
1981
- }
1982
- if (History3)
1983
- HashHistory2.__proto__ = History3;
1984
- HashHistory2.prototype = Object.create(History3 && History3.prototype);
1985
- HashHistory2.prototype.constructor = HashHistory2;
1986
- HashHistory2.prototype.setupListeners = function setupListeners2() {
1987
- var this$1$1 = this;
1988
- if (this.listeners.length > 0) {
1989
- return;
1990
- }
1991
- var router2 = this.router;
1992
- var expectScroll = router2.options.scrollBehavior;
1993
- var supportsScroll = supportsPushState && expectScroll;
1994
- if (supportsScroll) {
1995
- this.listeners.push(setupScroll());
1996
- }
1997
- var handleRoutingEvent = function() {
1998
- var current = this$1$1.current;
1999
- if (!ensureSlash()) {
2000
- return;
2001
- }
2002
- this$1$1.transitionTo(getHash(), function(route) {
2003
- if (supportsScroll) {
2004
- handleScroll(this$1$1.router, route, current, true);
2005
- }
2006
- if (!supportsPushState) {
2007
- replaceHash(route.fullPath);
2008
- }
2009
- });
2010
- };
2011
- var eventType = supportsPushState ? "popstate" : "hashchange";
2012
- window.addEventListener(
2013
- eventType,
2014
- handleRoutingEvent
2015
- );
2016
- this.listeners.push(function() {
2017
- window.removeEventListener(eventType, handleRoutingEvent);
2018
- });
2019
- };
2020
- HashHistory2.prototype.push = function push2(location, onComplete, onAbort) {
2021
- var this$1$1 = this;
2022
- var ref = this;
2023
- var fromRoute = ref.current;
2024
- this.transitionTo(
2025
- location,
2026
- function(route) {
2027
- pushHash(route.fullPath);
2028
- handleScroll(this$1$1.router, route, fromRoute, false);
2029
- onComplete && onComplete(route);
2030
- },
2031
- onAbort
2032
- );
2033
- };
2034
- HashHistory2.prototype.replace = function replace2(location, onComplete, onAbort) {
2035
- var this$1$1 = this;
2036
- var ref = this;
2037
- var fromRoute = ref.current;
2038
- this.transitionTo(
2039
- location,
2040
- function(route) {
2041
- replaceHash(route.fullPath);
2042
- handleScroll(this$1$1.router, route, fromRoute, false);
2043
- onComplete && onComplete(route);
2044
- },
2045
- onAbort
2046
- );
2047
- };
2048
- HashHistory2.prototype.go = function go2(n) {
2049
- window.history.go(n);
2050
- };
2051
- HashHistory2.prototype.ensureURL = function ensureURL(push2) {
2052
- var current = this.current.fullPath;
2053
- if (getHash() !== current) {
2054
- push2 ? pushHash(current) : replaceHash(current);
2055
- }
2056
- };
2057
- HashHistory2.prototype.getCurrentLocation = function getCurrentLocation() {
2058
- return getHash();
2059
- };
2060
- return HashHistory2;
2061
- }(History);
2062
- function checkFallback(base) {
2063
- var location = getLocation(base);
2064
- if (!/^\/#/.test(location)) {
2065
- window.location.replace(cleanPath(base + "/#" + location));
2066
- return true;
2067
- }
2068
- }
2069
- function ensureSlash() {
2070
- var path = getHash();
2071
- if (path.charAt(0) === "/") {
2072
- return true;
2073
- }
2074
- replaceHash("/" + path);
2075
- return false;
2076
- }
2077
- function getHash() {
2078
- var href = window.location.href;
2079
- var index = href.indexOf("#");
2080
- if (index < 0) {
2081
- return "";
2082
- }
2083
- href = href.slice(index + 1);
2084
- return href;
2085
- }
2086
- function getUrl(path) {
2087
- var href = window.location.href;
2088
- var i = href.indexOf("#");
2089
- var base = i >= 0 ? href.slice(0, i) : href;
2090
- return base + "#" + path;
2091
- }
2092
- function pushHash(path) {
2093
- if (supportsPushState) {
2094
- pushState(getUrl(path));
2095
- } else {
2096
- window.location.hash = path;
2097
- }
2098
- }
2099
- function replaceHash(path) {
2100
- if (supportsPushState) {
2101
- replaceState(getUrl(path));
2102
- } else {
2103
- window.location.replace(getUrl(path));
2104
- }
2105
- }
2106
- var AbstractHistory = /* @__PURE__ */ function(History3) {
2107
- function AbstractHistory2(router2, base) {
2108
- History3.call(this, router2, base);
2109
- this.stack = [];
2110
- this.index = -1;
2111
- }
2112
- if (History3)
2113
- AbstractHistory2.__proto__ = History3;
2114
- AbstractHistory2.prototype = Object.create(History3 && History3.prototype);
2115
- AbstractHistory2.prototype.constructor = AbstractHistory2;
2116
- AbstractHistory2.prototype.push = function push2(location, onComplete, onAbort) {
2117
- var this$1$1 = this;
2118
- this.transitionTo(
2119
- location,
2120
- function(route) {
2121
- this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index + 1).concat(route);
2122
- this$1$1.index++;
2123
- onComplete && onComplete(route);
2124
- },
2125
- onAbort
2126
- );
2127
- };
2128
- AbstractHistory2.prototype.replace = function replace2(location, onComplete, onAbort) {
2129
- var this$1$1 = this;
2130
- this.transitionTo(
2131
- location,
2132
- function(route) {
2133
- this$1$1.stack = this$1$1.stack.slice(0, this$1$1.index).concat(route);
2134
- onComplete && onComplete(route);
2135
- },
2136
- onAbort
2137
- );
2138
- };
2139
- AbstractHistory2.prototype.go = function go2(n) {
2140
- var this$1$1 = this;
2141
- var targetIndex = this.index + n;
2142
- if (targetIndex < 0 || targetIndex >= this.stack.length) {
2143
- return;
2144
- }
2145
- var route = this.stack[targetIndex];
2146
- this.confirmTransition(
2147
- route,
2148
- function() {
2149
- var prev = this$1$1.current;
2150
- this$1$1.index = targetIndex;
2151
- this$1$1.updateRoute(route);
2152
- this$1$1.router.afterHooks.forEach(function(hook) {
2153
- hook && hook(route, prev);
2154
- });
2155
- },
2156
- function(err) {
2157
- if (isNavigationFailure(err, NavigationFailureType.duplicated)) {
2158
- this$1$1.index = targetIndex;
2159
- }
2160
- }
2161
- );
2162
- };
2163
- AbstractHistory2.prototype.getCurrentLocation = function getCurrentLocation() {
2164
- var current = this.stack[this.stack.length - 1];
2165
- return current ? current.fullPath : "/";
2166
- };
2167
- AbstractHistory2.prototype.ensureURL = function ensureURL() {
2168
- };
2169
- return AbstractHistory2;
2170
- }(History);
2171
- var VueRouter = function VueRouter2(options) {
2172
- if (options === void 0)
2173
- options = {};
2174
- if (process.env.NODE_ENV !== "production") {
2175
- warn(this instanceof VueRouter2, "Router must be called with the new operator.");
2176
- }
2177
- this.app = null;
2178
- this.apps = [];
2179
- this.options = options;
2180
- this.beforeHooks = [];
2181
- this.resolveHooks = [];
2182
- this.afterHooks = [];
2183
- this.matcher = createMatcher(options.routes || [], this);
2184
- var mode = options.mode || "hash";
2185
- this.fallback = mode === "history" && !supportsPushState && options.fallback !== false;
2186
- if (this.fallback) {
2187
- mode = "hash";
2188
- }
2189
- if (!inBrowser) {
2190
- mode = "abstract";
2191
- }
2192
- this.mode = mode;
2193
- switch (mode) {
2194
- case "history":
2195
- this.history = new HTML5History(this, options.base);
2196
- break;
2197
- case "hash":
2198
- this.history = new HashHistory(this, options.base, this.fallback);
2199
- break;
2200
- case "abstract":
2201
- this.history = new AbstractHistory(this, options.base);
2202
- break;
2203
- default:
2204
- if (process.env.NODE_ENV !== "production") {
2205
- assert(false, "invalid mode: " + mode);
2206
- }
2207
- }
2208
- };
2209
- var prototypeAccessors = { currentRoute: { configurable: true } };
2210
- VueRouter.prototype.match = function match(raw, current, redirectedFrom) {
2211
- return this.matcher.match(raw, current, redirectedFrom);
2212
- };
2213
- prototypeAccessors.currentRoute.get = function() {
2214
- return this.history && this.history.current;
2215
- };
2216
- VueRouter.prototype.init = function init(app) {
2217
- var this$1$1 = this;
2218
- process.env.NODE_ENV !== "production" && assert(
2219
- install.installed,
2220
- "not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."
2221
- );
2222
- this.apps.push(app);
2223
- app.$once("hook:destroyed", function() {
2224
- var index = this$1$1.apps.indexOf(app);
2225
- if (index > -1) {
2226
- this$1$1.apps.splice(index, 1);
2227
- }
2228
- if (this$1$1.app === app) {
2229
- this$1$1.app = this$1$1.apps[0] || null;
2230
- }
2231
- if (!this$1$1.app) {
2232
- this$1$1.history.teardown();
2233
- }
2234
- });
2235
- if (this.app) {
2236
- return;
2237
- }
2238
- this.app = app;
2239
- var history = this.history;
2240
- if (history instanceof HTML5History || history instanceof HashHistory) {
2241
- var handleInitialScroll = function(routeOrError) {
2242
- var from = history.current;
2243
- var expectScroll = this$1$1.options.scrollBehavior;
2244
- var supportsScroll = supportsPushState && expectScroll;
2245
- if (supportsScroll && "fullPath" in routeOrError) {
2246
- handleScroll(this$1$1, routeOrError, from, false);
2247
- }
2248
- };
2249
- var setupListeners2 = function(routeOrError) {
2250
- history.setupListeners();
2251
- handleInitialScroll(routeOrError);
2252
- };
2253
- history.transitionTo(
2254
- history.getCurrentLocation(),
2255
- setupListeners2,
2256
- setupListeners2
2257
- );
2258
- }
2259
- history.listen(function(route) {
2260
- this$1$1.apps.forEach(function(app2) {
2261
- app2._route = route;
2262
- });
2263
- });
2264
- };
2265
- VueRouter.prototype.beforeEach = function beforeEach(fn) {
2266
- return registerHook(this.beforeHooks, fn);
2267
- };
2268
- VueRouter.prototype.beforeResolve = function beforeResolve(fn) {
2269
- return registerHook(this.resolveHooks, fn);
2270
- };
2271
- VueRouter.prototype.afterEach = function afterEach(fn) {
2272
- return registerHook(this.afterHooks, fn);
2273
- };
2274
- VueRouter.prototype.onReady = function onReady2(cb, errorCb) {
2275
- this.history.onReady(cb, errorCb);
2276
- };
2277
- VueRouter.prototype.onError = function onError2(errorCb) {
2278
- this.history.onError(errorCb);
2279
- };
2280
- VueRouter.prototype.push = function push(location, onComplete, onAbort) {
2281
- var this$1$1 = this;
2282
- if (!onComplete && !onAbort && typeof Promise !== "undefined") {
2283
- return new Promise(function(resolve2, reject) {
2284
- this$1$1.history.push(location, resolve2, reject);
2285
- });
2286
- } else {
2287
- this.history.push(location, onComplete, onAbort);
2288
- }
2289
- };
2290
- VueRouter.prototype.replace = function replace(location, onComplete, onAbort) {
2291
- var this$1$1 = this;
2292
- if (!onComplete && !onAbort && typeof Promise !== "undefined") {
2293
- return new Promise(function(resolve2, reject) {
2294
- this$1$1.history.replace(location, resolve2, reject);
2295
- });
2296
- } else {
2297
- this.history.replace(location, onComplete, onAbort);
2298
- }
2299
- };
2300
- VueRouter.prototype.go = function go(n) {
2301
- this.history.go(n);
2302
- };
2303
- VueRouter.prototype.back = function back() {
2304
- this.go(-1);
2305
- };
2306
- VueRouter.prototype.forward = function forward() {
2307
- this.go(1);
2308
- };
2309
- VueRouter.prototype.getMatchedComponents = function getMatchedComponents(to) {
2310
- var route = to ? to.matched ? to : this.resolve(to).route : this.currentRoute;
2311
- if (!route) {
2312
- return [];
2313
- }
2314
- return [].concat.apply(
2315
- [],
2316
- route.matched.map(function(m) {
2317
- return Object.keys(m.components).map(function(key) {
2318
- return m.components[key];
2319
- });
2320
- })
2321
- );
2322
- };
2323
- VueRouter.prototype.resolve = function resolve(to, current, append) {
2324
- current = current || this.history.current;
2325
- var location = normalizeLocation(to, current, append, this);
2326
- var route = this.match(location, current);
2327
- var fullPath = route.redirectedFrom || route.fullPath;
2328
- var base = this.history.base;
2329
- var href = createHref(base, fullPath, this.mode);
2330
- return {
2331
- location,
2332
- route,
2333
- href,
2334
- // for backwards compat
2335
- normalizedTo: location,
2336
- resolved: route
2337
- };
2338
- };
2339
- VueRouter.prototype.getRoutes = function getRoutes() {
2340
- return this.matcher.getRoutes();
2341
- };
2342
- VueRouter.prototype.addRoute = function addRoute(parentOrRoute, route) {
2343
- this.matcher.addRoute(parentOrRoute, route);
2344
- if (this.history.current !== START) {
2345
- this.history.transitionTo(this.history.getCurrentLocation());
2346
- }
2347
- };
2348
- VueRouter.prototype.addRoutes = function addRoutes(routes) {
2349
- if (process.env.NODE_ENV !== "production") {
2350
- warn(false, "router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead.");
2351
- }
2352
- this.matcher.addRoutes(routes);
2353
- if (this.history.current !== START) {
2354
- this.history.transitionTo(this.history.getCurrentLocation());
2355
- }
2356
- };
2357
- Object.defineProperties(VueRouter.prototype, prototypeAccessors);
2358
- function registerHook(list, fn) {
2359
- list.push(fn);
2360
- return function() {
2361
- var i = list.indexOf(fn);
2362
- if (i > -1) {
2363
- list.splice(i, 1);
2364
- }
2365
- };
2366
- }
2367
- function createHref(base, fullPath, mode) {
2368
- var path = mode === "hash" ? "#" + fullPath : fullPath;
2369
- return base ? cleanPath(base + "/" + path) : path;
2370
- }
2371
- VueRouter.install = install;
2372
- VueRouter.version = "3.6.5";
2373
- VueRouter.isNavigationFailure = isNavigationFailure;
2374
- VueRouter.NavigationFailureType = NavigationFailureType;
2375
- VueRouter.START_LOCATION = START;
2376
- if (inBrowser && window.Vue) {
2377
- window.Vue.use(VueRouter);
2378
- }
2379
- _l10n.register(_l10n.t20);
2380
- const IDLE_TIMEOUT = 3 * 60 * 1e3;
2381
- const _sfc_main$8 = {
2382
- name: "NcReferenceWidget",
2383
- components: {
2384
- NcButton: Components_NcButton
2385
- },
2386
- props: {
2387
- reference: {
2388
- type: Object,
2389
- required: true
2390
- },
2391
- interactive: {
2392
- type: Boolean,
2393
- default: true
2394
- },
2395
- interactiveOptIn: {
2396
- type: Boolean,
2397
- default: false
2398
- }
2399
- },
2400
- setup() {
2401
- const isVisible = Vue.ref(false);
2402
- const widgetRoot = Vue.ref();
2403
- const { width } = core.useElementSize(widgetRoot);
2404
- core.useIntersectionObserver(widgetRoot, () => {
2405
- Vue.nextTick(() => {
2406
- var _a, _b;
2407
- isVisible.value = (_b = (_a = widgetRoot.value) == null ? void 0 : _a.isIntersecting) != null ? _b : false;
2408
- });
2409
- });
2410
- return {
2411
- width,
2412
- isVisible,
2413
- widgetRoot
2414
- };
2415
- },
2416
- data() {
2417
- return {
2418
- showInteractive: false,
2419
- rendered: false,
2420
- idleTimeout: null
2421
- };
2422
- },
2423
- computed: {
2424
- isInteractive() {
2425
- return !this.interactiveOptIn && this.interactive || this.showInteractive;
2426
- },
2427
- hasFullWidth() {
2428
- return Functions_registerReference.hasFullWidth(this.reference.richObjectType);
2429
- },
2430
- hasCustomWidget() {
2431
- return Functions_registerReference.isWidgetRegistered(this.reference.richObjectType);
2432
- },
2433
- hasInteractiveView() {
2434
- return Functions_registerReference.isWidgetRegistered(this.reference.richObjectType) && Functions_registerReference.hasInteractiveView(this.reference.richObjectType);
2435
- },
2436
- noAccess() {
2437
- return this.reference && !this.reference.accessible;
2438
- },
2439
- descriptionStyle() {
2440
- if (this.numberOfLines === 0) {
2441
- return {
2442
- display: "none"
2443
- };
2444
- }
2445
- const lineClamp = this.numberOfLines;
2446
- return {
2447
- lineClamp,
2448
- webkitLineClamp: lineClamp
2449
- };
2450
- },
2451
- numberOfLines() {
2452
- const lineCountOffsets = [450, 550, 650, Infinity];
2453
- return lineCountOffsets.findIndex((max) => this.width < max);
2454
- },
2455
- compactLink() {
2456
- const link = this.reference.openGraphObject.link;
2457
- if (!link) {
2458
- return "";
2459
- }
2460
- if (link.startsWith("https://")) {
2461
- return link.substring(8);
2462
- }
2463
- if (link.startsWith("http://")) {
2464
- return link.substring(7);
2465
- }
2466
- return link;
2467
- },
2468
- route() {
2469
- return autolink.getRoute(this.$router, this.reference.openGraphObject.link);
2470
- },
2471
- referenceWidgetLinkComponent() {
2472
- return this.route ? Link : "a";
2473
- },
2474
- referenceWidgetLinkProps() {
2475
- return this.route ? { to: this.route } : { href: this.reference.openGraphObject.link, target: "_blank" };
2476
- }
2477
- },
2478
- watch: {
2479
- isVisible: {
2480
- handler(val) {
2481
- if (!val) {
2482
- this.idleTimeout = setTimeout(() => {
2483
- if (!this.isVisible) {
2484
- this.destroyWidget();
2485
- }
2486
- }, IDLE_TIMEOUT);
2487
- return;
2488
- }
2489
- if (this.idleTimeout) {
2490
- clearTimeout(this.idleTimeout);
2491
- this.idleTimeout = null;
2492
- }
2493
- if (!this.rendered) {
2494
- this.renderWidget();
2495
- }
2496
- },
2497
- immediate: true
2498
- }
2499
- },
2500
- beforeDestroy() {
2501
- this.destroyWidget();
2502
- },
2503
- methods: {
2504
- t: _l10n.t,
2505
- enableInteractive() {
2506
- this.showInteractive = true;
2507
- this.renderWidget();
2508
- },
2509
- renderWidget() {
2510
- var _a;
2511
- if (!this.$refs.customWidget) {
2512
- return;
2513
- }
2514
- if (((_a = this == null ? void 0 : this.reference) == null ? void 0 : _a.richObjectType) === "open-graph") {
2515
- return;
2516
- }
2517
- this.$refs.customWidget.innerHTML = "";
2518
- const widget = document.createElement("div");
2519
- this.$refs.customWidget.appendChild(widget);
2520
- this.$nextTick(() => {
2521
- Functions_registerReference.renderWidget(widget, {
2522
- ...this.reference,
2523
- interactive: this.isInteractive
2524
- });
2525
- this.rendered = true;
2526
- });
2527
- },
2528
- destroyWidget() {
2529
- if (this.rendered) {
2530
- Functions_registerReference.destroyWidget(this.reference.richObjectType, this.$el);
2531
- this.rendered = false;
2532
- }
2533
- }
2534
- }
2535
- };
2536
- var _sfc_render$8 = function render3() {
2537
- var _vm = this, _c = _vm._self._c;
2538
- return _c("div", { ref: "widgetRoot", class: { "toggle-interactive": _vm.hasInteractiveView && !_vm.isInteractive } }, [_vm.reference && _vm.hasCustomWidget ? _c("div", { ref: "customWidget", staticClass: "widget-custom", class: { "full-width": _vm.hasFullWidth } }) : !_vm.noAccess && _vm.reference && _vm.reference.openGraphObject && !_vm.hasCustomWidget ? _c(_vm.referenceWidgetLinkComponent, _vm._b({ tag: "component", staticClass: "widget-default", attrs: { "rel": "noopener noreferrer" } }, "component", _vm.referenceWidgetLinkProps, false), [_vm.reference.openGraphObject.thumb ? _c("img", { staticClass: "widget-default--image", attrs: { "src": _vm.reference.openGraphObject.thumb } }) : _vm._e(), _c("div", { staticClass: "widget-default--details" }, [_c("p", { staticClass: "widget-default--name" }, [_vm._v(" " + _vm._s(_vm.reference.openGraphObject.name) + " ")]), _c("p", { staticClass: "widget-default--description", style: _vm.descriptionStyle }, [_vm._v(" " + _vm._s(_vm.reference.openGraphObject.description) + " ")]), _c("p", { staticClass: "widget-default--link" }, [_vm._v(" " + _vm._s(_vm.compactLink) + " ")])])]) : _vm._e(), _vm.interactiveOptIn && _vm.hasInteractiveView && !_vm.isInteractive ? _c("NcButton", { staticClass: "toggle-interactive--button", on: { "click": _vm.enableInteractive } }, [_vm._v(" " + _vm._s(_vm.t("Enable interactive view")) + " ")]) : _vm._e()], 1);
2539
- };
2540
- var _sfc_staticRenderFns$8 = [];
2541
- var __component__$8 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
2542
- _sfc_main$8,
2543
- _sfc_render$8,
2544
- _sfc_staticRenderFns$8,
2545
- false,
2546
- null,
2547
- "48a2ac1d",
2548
- null,
2549
- null
2550
- );
2551
- const NcReferenceWidget = __component__$8.exports;
2552
- const _sfc_main$7 = {
2553
- name: "NcCustomPickerElement",
2554
- props: {
2555
- /**
2556
- * The reference provider
2557
- */
2558
- provider: {
2559
- type: Object,
2560
- required: true
2561
- }
2562
- },
2563
- emits: [
2564
- "cancel",
2565
- "submit"
2566
- ],
2567
- data() {
2568
- return {
2569
- isRegistered: Functions_registerReference.isCustomPickerElementRegistered(this.provider.id),
2570
- renderResult: null
2571
- };
2572
- },
2573
- mounted() {
2574
- if (this.isRegistered) {
2575
- this.renderElement();
2576
- }
2577
- },
2578
- beforeDestroy() {
2579
- if (this.isRegistered) {
2580
- Functions_registerReference.destroyCustomPickerElement(this.provider.id, this.$el, this.renderResult);
2581
- }
2582
- },
2583
- methods: {
2584
- renderElement() {
2585
- if (this.$refs.domElement) {
2586
- this.$refs.domElement.innerHTML = "";
2587
- }
2588
- const renderFunctionResult = Functions_registerReference.renderCustomPickerElement(this.$refs.domElement, { providerId: this.provider.id, accessible: false });
2589
- Promise.resolve(renderFunctionResult).then((result) => {
2590
- var _a, _b;
2591
- this.renderResult = result;
2592
- if (((_a = this.renderResult.object) == null ? void 0 : _a._isVue) && ((_b = this.renderResult.object) == null ? void 0 : _b.$on)) {
2593
- this.renderResult.object.$on("submit", this.onSubmit);
2594
- this.renderResult.object.$on("cancel", this.onCancel);
2595
- }
2596
- this.renderResult.element.addEventListener("submit", (e) => {
2597
- this.onSubmit(e.detail);
2598
- });
2599
- this.renderResult.element.addEventListener("cancel", this.onCancel);
2600
- });
2601
- },
2602
- onSubmit(value) {
2603
- this.$emit("submit", value);
2604
- },
2605
- onCancel() {
2606
- this.$emit("cancel");
2607
- }
2608
- }
2609
- };
2610
- var _sfc_render$7 = function render4() {
2611
- var _vm = this, _c = _vm._self._c;
2612
- return _c("div", { ref: "domElement" });
2613
- };
2614
- var _sfc_staticRenderFns$7 = [];
2615
- var __component__$7 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
2616
- _sfc_main$7,
2617
- _sfc_render$7,
2618
- _sfc_staticRenderFns$7,
2619
- false,
2620
- null,
2621
- "25f1cef8",
2622
- null,
2623
- null
2624
- );
2625
- const NcCustomPickerElement = __component__$7.exports;
2626
- _l10n.register(_l10n.t7);
2627
- const anyLinkProviderId = "any-link";
2628
- const anyLinkProvider = {
2629
- id: anyLinkProviderId,
2630
- title: _l10n.t("Any link"),
2631
- icon_url: router.imagePath("core", "filetypes/link.svg")
2632
- };
2633
- if (!window._vue_richtext_reference_providers) {
2634
- window._vue_richtext_reference_providers = initialState.loadState("core", "reference-provider-list", []);
2635
- }
2636
- if (!window._vue_richtext_reference_provider_timestamps) {
2637
- window._vue_richtext_reference_provider_timestamps = initialState.loadState("core", "reference-provider-timestamps", {});
2638
- }
2639
- function getProvider(providerId) {
2640
- if (providerId === anyLinkProviderId) {
2641
- return anyLinkProvider;
2642
- }
2643
- return getProviders().find((p) => p.id === providerId);
2644
- }
2645
- function getProviders() {
2646
- return window._vue_richtext_reference_providers.filter((p) => {
2647
- const keep = !!p.search_providers_ids && p.search_providers_ids.length > 0 || Functions_registerReference.isCustomPickerElementRegistered(p.id);
2648
- if (!keep) {
2649
- console.debug("[smart picker]", p.id, "reference provider is discoverable but does not have any related search provider or custom picker component registered");
2650
- }
2651
- return keep;
2652
- });
2653
- }
2654
- function sortProviders(providerList) {
2655
- const timestamps = window._vue_richtext_reference_provider_timestamps;
2656
- return providerList.sort((a, b) => {
2657
- return a.order === b.order ? 0 : a.order > b.order ? 1 : -1;
2658
- }).sort((a, b) => {
2659
- const ta = timestamps[a.id];
2660
- const tb = timestamps[b.id];
2661
- return ta === tb ? 0 : tb === void 0 ? -1 : ta === void 0 ? 1 : ta > tb ? -1 : 1;
2662
- });
2663
- }
2664
- function searchProvider(query, limit = null) {
2665
- const providers = getProviders();
2666
- const escapedQuery = query.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&");
2667
- const regexp = new RegExp(escapedQuery, "i");
2668
- const sortedProviders = sortProviders(providers);
2669
- const filteredSortedProviders = sortedProviders.filter((p) => {
2670
- return p.title.match(regexp);
2671
- });
2672
- const searchResult = limit ? filteredSortedProviders.slice(0, limit) : filteredSortedProviders;
2673
- if (query === "" || searchResult.length === 0) {
2674
- searchResult.push(anyLinkProvider);
2675
- }
2676
- return searchResult;
2677
- }
2678
- function touchProvider(providerId) {
2679
- const timestamp = Math.floor(Date.now() / 1e3);
2680
- const params = {
2681
- timestamp
2682
- };
2683
- const url = router.generateOcsUrl("references/provider/{providerId}", { providerId });
2684
- axios__default.default.put(url, params).then((response) => {
2685
- window._vue_richtext_reference_provider_timestamps[providerId] = timestamp;
2686
- });
2687
- }
2688
- let mytimer = 0;
2689
- function delay(callback, ms) {
2690
- return function() {
2691
- const context = this;
2692
- const args = arguments;
2693
- clearTimeout(mytimer);
2694
- mytimer = setTimeout(function() {
2695
- callback.apply(context, args);
2696
- }, ms || 0);
2697
- };
2698
- }
2699
- function isUrl(str) {
2700
- try {
2701
- return Boolean(new URL(str));
2702
- } catch (error) {
2703
- return false;
2704
- }
2705
- }
2706
- _l10n.register(_l10n.t34, _l10n.t38);
2707
- const _sfc_main$6 = {
2708
- name: "LinkVariantIcon",
2709
- emits: ["click"],
2710
- props: {
2711
- title: {
2712
- type: String
2713
- },
2714
- fillColor: {
2715
- type: String,
2716
- default: "currentColor"
2717
- },
2718
- size: {
2719
- type: Number,
2720
- default: 24
2721
- }
2722
- }
2723
- };
2724
- var _sfc_render$6 = function render5() {
2725
- var _vm = this, _c = _vm._self._c;
2726
- return _c("span", _vm._b({ staticClass: "material-design-icon link-variant-icon", attrs: { "aria-hidden": _vm.title ? null : true, "aria-label": _vm.title, "role": "img" }, on: { "click": function($event) {
2727
- return _vm.$emit("click", $event);
2728
- } } }, "span", _vm.$attrs, false), [_c("svg", { staticClass: "material-design-icon__svg", attrs: { "fill": _vm.fillColor, "width": _vm.size, "height": _vm.size, "viewBox": "0 0 24 24" } }, [_c("path", { attrs: { "d": "M10.59,13.41C11,13.8 11,14.44 10.59,14.83C10.2,15.22 9.56,15.22 9.17,14.83C7.22,12.88 7.22,9.71 9.17,7.76V7.76L12.71,4.22C14.66,2.27 17.83,2.27 19.78,4.22C21.73,6.17 21.73,9.34 19.78,11.29L18.29,12.78C18.3,11.96 18.17,11.14 17.89,10.36L18.36,9.88C19.54,8.71 19.54,6.81 18.36,5.64C17.19,4.46 15.29,4.46 14.12,5.64L10.59,9.17C9.41,10.34 9.41,12.24 10.59,13.41M13.41,9.17C13.8,8.78 14.44,8.78 14.83,9.17C16.78,11.12 16.78,14.29 14.83,16.24V16.24L11.29,19.78C9.34,21.73 6.17,21.73 4.22,19.78C2.27,17.83 2.27,14.66 4.22,12.71L5.71,11.22C5.7,12.04 5.83,12.86 6.11,13.65L5.64,14.12C4.46,15.29 4.46,17.19 5.64,18.36C6.81,19.54 8.71,19.54 9.88,18.36L13.41,14.83C14.59,13.66 14.59,11.76 13.41,10.59C13,10.2 13,9.56 13.41,9.17Z" } }, [_vm.title ? _c("title", [_vm._v(_vm._s(_vm.title))]) : _vm._e()])])]);
2729
- };
2730
- var _sfc_staticRenderFns$6 = [];
2731
- var __component__$6 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
2732
- _sfc_main$6,
2733
- _sfc_render$6,
2734
- _sfc_staticRenderFns$6,
2735
- false,
2736
- null,
2737
- null,
2738
- null,
2739
- null
2740
- );
2741
- const LinkVariantIcon = __component__$6.exports;
2742
- const _sfc_main$5 = {
2743
- name: "NcProviderList",
2744
- components: {
2745
- NcSelect: NcSelect.NcSelect,
2746
- NcHighlight: Components_NcHighlight.NcHighlight,
2747
- NcEmptyContent: Components_NcEmptyContent,
2748
- LinkVariantIcon
2749
- },
2750
- emits: [
2751
- "select-provider",
2752
- "submit"
2753
- ],
2754
- data() {
2755
- return {
2756
- selectedProvider: null,
2757
- query: "",
2758
- multiselectPlaceholder: _l10n.t("Select provider"),
2759
- providerIconAlt: _l10n.t("Provider icon")
2760
- };
2761
- },
2762
- computed: {
2763
- options() {
2764
- const result = [];
2765
- if (this.query !== "" && isUrl(this.query)) {
2766
- result.push({
2767
- id: this.query,
2768
- title: this.query,
2769
- isLink: true
2770
- });
2771
- }
2772
- result.push(...searchProvider(this.query));
2773
- return result;
2774
- }
2775
- },
2776
- methods: {
2777
- focus() {
2778
- setTimeout(() => {
2779
- var _a, _b, _c;
2780
- (_c = (_b = (_a = this.$refs["provider-select"]) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector("#provider-select-input")) == null ? void 0 : _c.focus();
2781
- }, 300);
2782
- },
2783
- onProviderSelected(p) {
2784
- if (p !== null) {
2785
- if (p.isLink) {
2786
- this.$emit("submit", p.title);
2787
- } else {
2788
- this.$emit("select-provider", p);
2789
- }
2790
- this.selectedProvider = null;
2791
- }
2792
- },
2793
- onSearch(query, loading) {
2794
- this.query = query;
2795
- }
2796
- }
2797
- };
2798
- var _sfc_render$5 = function render6() {
2799
- var _vm = this, _c = _vm._self._c;
2800
- return _c("div", { staticClass: "provider-list" }, [_c("NcSelect", { ref: "provider-select", staticClass: "provider-list--select", attrs: { "input-id": "provider-select-input", "label": "title", "placeholder": _vm.multiselectPlaceholder, "options": _vm.options, "append-to-body": false, "clear-search-on-select": true, "clear-search-on-blur": () => false, "filterable": false }, on: { "search": _vm.onSearch, "input": _vm.onProviderSelected }, scopedSlots: _vm._u([{ key: "option", fn: function(option) {
2801
- return [option.isLink ? _c("div", { staticClass: "provider" }, [_c("LinkVariantIcon", { staticClass: "link-icon", attrs: { "size": 20 } }), _c("span", [_vm._v(_vm._s(option.title))])], 1) : _c("div", { staticClass: "provider" }, [_c("img", { staticClass: "provider-icon", attrs: { "src": option.icon_url, "alt": _vm.providerIconAlt } }), _c("NcHighlight", { staticClass: "option-text", attrs: { "search": _vm.query, "text": option.title } })], 1)];
2802
- } }]), model: { value: _vm.selectedProvider, callback: function($$v) {
2803
- _vm.selectedProvider = $$v;
2804
- }, expression: "selectedProvider" } }), _c("NcEmptyContent", { staticClass: "provider-list--empty-content", scopedSlots: _vm._u([{ key: "icon", fn: function() {
2805
- return [_c("LinkVariantIcon")];
2806
- }, proxy: true }]) })], 1);
2807
- };
2808
- var _sfc_staticRenderFns$5 = [];
2809
- var __component__$5 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
2810
- _sfc_main$5,
2811
- _sfc_render$5,
2812
- _sfc_staticRenderFns$5,
2813
- false,
2814
- null,
2815
- "e880790e",
2816
- null,
2817
- null
2818
- );
2819
- const NcProviderList = __component__$5.exports;
2820
- _l10n.register(_l10n.t21);
2821
- const _sfc_main$4 = {
2822
- name: "NcRawLinkInput",
2823
- components: {
2824
- LinkVariantIcon,
2825
- NcEmptyContent: Components_NcEmptyContent,
2826
- NcLoadingIcon: Components_NcLoadingIcon,
2827
- NcReferenceWidget,
2828
- NcTextField: NcTextField.NcTextField
2829
- },
2830
- props: {
2831
- /**
2832
- * The reference provider
2833
- */
2834
- provider: {
2835
- type: Object,
2836
- required: true
2837
- }
2838
- },
2839
- emits: [
2840
- "submit"
2841
- ],
2842
- data() {
2843
- return {
2844
- inputValue: "",
2845
- loading: false,
2846
- reference: null,
2847
- abortController: null,
2848
- inputPlaceholder: _l10n.t("Enter link")
2849
- };
2850
- },
2851
- computed: {
2852
- isLinkValid() {
2853
- return isUrl(this.inputValue);
2854
- }
2855
- },
2856
- methods: {
2857
- focus() {
2858
- var _a;
2859
- (_a = this.$refs["url-input"].$el.getElementsByTagName("input")[0]) == null ? void 0 : _a.focus();
2860
- },
2861
- onSubmit(e) {
2862
- const value = e.target.value;
2863
- if (this.isLinkValid) {
2864
- this.$emit("submit", value);
2865
- }
2866
- },
2867
- onClear() {
2868
- this.inputValue = "";
2869
- this.reference = null;
2870
- },
2871
- onInput() {
2872
- this.reference = null;
2873
- if (this.abortController) {
2874
- this.abortController.abort();
2875
- }
2876
- if (this.isLinkValid) {
2877
- delay(() => {
2878
- this.updateReference();
2879
- }, 500)();
2880
- }
2881
- },
2882
- updateReference() {
2883
- this.loading = true;
2884
- this.abortController = new AbortController();
2885
- axios__default.default.get(router.generateOcsUrl("references/resolve", 2) + "?reference=" + encodeURIComponent(this.inputValue), {
2886
- signal: this.abortController.signal
2887
- }).then((response) => {
2888
- this.reference = response.data.ocs.data.references[this.inputValue];
2889
- }).catch((error) => {
2890
- console.error(error);
2891
- }).then(() => {
2892
- this.loading = false;
2893
- });
2894
- }
2895
- }
2896
- };
2897
- var _sfc_render$4 = function render7() {
2898
- var _vm = this, _c = _vm._self._c;
2899
- return _c("div", { staticClass: "raw-link" }, [_c("div", { staticClass: "input-wrapper" }, [_c("NcTextField", { ref: "url-input", attrs: { "value": _vm.inputValue, "show-trailing-button": _vm.inputValue !== "", "label": _vm.inputPlaceholder }, on: { "update:value": [function($event) {
2900
- _vm.inputValue = $event;
2901
- }, _vm.onInput], "trailing-button-click": _vm.onClear }, nativeOn: { "keyup": function($event) {
2902
- if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter"))
2903
- return null;
2904
- return _vm.onSubmit.apply(null, arguments);
2905
- } } }, [_vm.loading ? _c("NcLoadingIcon", { attrs: { "size": 16 } }) : _c("LinkVariantIcon", { attrs: { "size": 16 } })], 1)], 1), _vm.reference !== null ? _c("NcReferenceWidget", { staticClass: "reference-widget", attrs: { "reference": _vm.reference } }) : _c("NcEmptyContent", { staticClass: "raw-link--empty-content", scopedSlots: _vm._u([{ key: "icon", fn: function() {
2906
- return [_vm.provider.icon_url ? _c("img", { staticClass: "provider-icon", attrs: { "src": _vm.provider.icon_url } }) : _c("LinkVariantIcon")];
2907
- }, proxy: true }]) })], 1);
2908
- };
2909
- var _sfc_staticRenderFns$4 = [];
2910
- var __component__$4 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
2911
- _sfc_main$4,
2912
- _sfc_render$4,
2913
- _sfc_staticRenderFns$4,
2914
- false,
2915
- null,
2916
- "d0ba247a",
2917
- null,
2918
- null
2919
- );
2920
- const NcRawLinkInput = __component__$4.exports;
2921
- const _sfc_main$3 = {
2922
- name: "NcSearchResult",
2923
- components: {
2924
- NcHighlight: Components_NcHighlight.NcHighlight
2925
- },
2926
- props: {
2927
- /**
2928
- * Unified search result entry
2929
- */
2930
- entry: {
2931
- type: Object,
2932
- required: true
2933
- },
2934
- /**
2935
- * The query that led to getting this result
2936
- * Used to highlight the entry text
2937
- */
2938
- query: {
2939
- type: String,
2940
- required: true
2941
- }
2942
- }
2943
- };
2944
- var _sfc_render$3 = function render8() {
2945
- var _vm = this, _c = _vm._self._c;
2946
- return _c("div", { staticClass: "result" }, [_vm.entry.icon ? _c("div", { staticClass: "result--icon-class", class: { [_vm.entry.icon]: true, rounded: _vm.entry.rounded } }) : _c("img", { staticClass: "result--image", class: { rounded: _vm.entry.rounded }, attrs: { "src": _vm.entry.thumbnailUrl } }), _c("div", { staticClass: "result--content" }, [_c("span", { staticClass: "result--content--name" }, [_c("NcHighlight", { attrs: { "search": _vm.query, "text": _vm.entry.title } })], 1), _c("span", { staticClass: "result--content--subline" }, [_c("NcHighlight", { attrs: { "search": _vm.query, "text": _vm.entry.subline } })], 1)])]);
2947
- };
2948
- var _sfc_staticRenderFns$3 = [];
2949
- var __component__$3 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
2950
- _sfc_main$3,
2951
- _sfc_render$3,
2952
- _sfc_staticRenderFns$3,
2953
- false,
2954
- null,
2955
- "7a394a58",
2956
- null,
2957
- null
2958
- );
2959
- const NcSearchResult = __component__$3.exports;
2960
- _l10n.register(_l10n.t27, _l10n.t34, _l10n.t36);
2961
- const LIMIT = 5;
2962
- const _sfc_main$2 = {
2963
- name: "NcSearch",
2964
- components: {
2965
- LinkVariantIcon,
2966
- DotsHorizontalIcon: DotsHorizontal.DotsHorizontal,
2967
- NcEmptyContent: Components_NcEmptyContent,
2968
- NcSelect: NcSelect.NcSelect,
2969
- NcSearchResult
2970
- },
2971
- props: {
2972
- /**
2973
- * The selected reference provider
2974
- */
2975
- provider: {
2976
- type: Object,
2977
- required: true
2978
- },
2979
- showEmptyContent: {
2980
- type: Boolean,
2981
- default: true
2982
- },
2983
- searchPlaceholder: {
2984
- type: String,
2985
- default: null
2986
- }
2987
- },
2988
- emits: [
2989
- "submit"
2990
- ],
2991
- data() {
2992
- return {
2993
- searchQuery: "",
2994
- selectedResult: null,
2995
- resultsBySearchProvider: {},
2996
- searching: false,
2997
- searchingMoreOf: null,
2998
- abortController: null,
2999
- noOptionsText: _l10n.t("Start typing to search"),
3000
- providerIconAlt: _l10n.t("Provider icon")
3001
- };
3002
- },
3003
- computed: {
3004
- mySearchPlaceholder() {
3005
- return this.searchPlaceholder || _l10n.t("Search");
3006
- },
3007
- searchProviderIds() {
3008
- return this.provider.search_providers_ids;
3009
- },
3010
- options() {
3011
- if (this.searchQuery === "") {
3012
- return [];
3013
- }
3014
- const options = [];
3015
- if (isUrl(this.searchQuery)) {
3016
- options.push(this.rawLinkEntry);
3017
- }
3018
- options.push(...this.formattedSearchResults);
3019
- return options;
3020
- },
3021
- rawLinkEntry() {
3022
- return {
3023
- id: "rawLinkEntry",
3024
- resourceUrl: this.searchQuery,
3025
- isRawLink: true
3026
- };
3027
- },
3028
- formattedSearchResults() {
3029
- const results = [];
3030
- this.searchProviderIds.forEach((pid) => {
3031
- if (this.resultsBySearchProvider[pid].entries.length > 0) {
3032
- if (this.searchProviderIds.length > 1 || this.resultsBySearchProvider[pid].entries.length > 1) {
3033
- results.push({
3034
- id: "groupTitle-" + pid,
3035
- name: this.resultsBySearchProvider[pid].name,
3036
- isCustomGroupTitle: true,
3037
- providerId: pid
3038
- });
3039
- }
3040
- const providerEntriesWithId = this.resultsBySearchProvider[pid].entries.map((entry, index) => {
3041
- return {
3042
- id: "provider-" + pid + "-entry-" + index,
3043
- ...entry
3044
- };
3045
- });
3046
- results.push(...providerEntriesWithId);
3047
- if (this.resultsBySearchProvider[pid].isPaginated) {
3048
- results.push({
3049
- id: "moreOf-" + pid,
3050
- name: this.resultsBySearchProvider[pid].name,
3051
- isMore: true,
3052
- providerId: pid,
3053
- isLoading: this.searchingMoreOf === pid
3054
- });
3055
- }
3056
- }
3057
- });
3058
- return results;
3059
- }
3060
- },
3061
- mounted() {
3062
- this.resetResults();
3063
- },
3064
- beforeDestroy() {
3065
- this.cancelSearchRequests();
3066
- },
3067
- methods: {
3068
- t: _l10n.t,
3069
- resetResults() {
3070
- const resultsBySearchProvider = {};
3071
- this.searchProviderIds.forEach((pid) => {
3072
- resultsBySearchProvider[pid] = {
3073
- entries: []
3074
- };
3075
- });
3076
- this.resultsBySearchProvider = resultsBySearchProvider;
3077
- },
3078
- focus() {
3079
- setTimeout(() => {
3080
- var _a, _b, _c;
3081
- (_c = (_b = (_a = this.$refs["search-select"]) == null ? void 0 : _a.$el) == null ? void 0 : _b.querySelector("#search-select-input")) == null ? void 0 : _c.focus();
3082
- }, 300);
3083
- },
3084
- cancelSearchRequests() {
3085
- if (this.abortController) {
3086
- this.abortController.abort();
3087
- }
3088
- },
3089
- onSearchInput(query, loading) {
3090
- this.searchQuery = query;
3091
- delay(() => {
3092
- this.updateSearch();
3093
- }, 500)();
3094
- },
3095
- onSelectResultSelected(item) {
3096
- if (item !== null) {
3097
- if (item.resourceUrl) {
3098
- this.cancelSearchRequests();
3099
- this.$emit("submit", item.resourceUrl);
3100
- } else if (item.isMore) {
3101
- this.searchMoreOf(item.providerId).then(() => {
3102
- this.selectedResult = null;
3103
- });
3104
- }
3105
- }
3106
- },
3107
- searchMoreOf(searchProviderId) {
3108
- this.searchingMoreOf = searchProviderId;
3109
- this.cancelSearchRequests();
3110
- return this.searchProviders(searchProviderId);
3111
- },
3112
- updateSearch() {
3113
- this.cancelSearchRequests();
3114
- this.resetResults();
3115
- if (this.searchQuery === "") {
3116
- this.searching = false;
3117
- return;
3118
- }
3119
- return this.searchProviders();
3120
- },
3121
- searchProviders(searchProviderId = null) {
3122
- var _a, _b;
3123
- this.abortController = new AbortController();
3124
- this.searching = true;
3125
- const searchPromises = searchProviderId === null ? [...this.searchProviderIds].map((pid) => {
3126
- return this.searchOneProvider(pid);
3127
- }) : [this.searchOneProvider(searchProviderId, (_b = (_a = this.resultsBySearchProvider[searchProviderId]) == null ? void 0 : _a.cursor) != null ? _b : null)];
3128
- return Promise.allSettled(searchPromises).then((promises) => {
3129
- const isOneCanceled = !!promises.find((p) => {
3130
- return p.status === "rejected" && (p.reason.name === "CanceledError" || p.reason.code === "ERR_CANCELED");
3131
- });
3132
- if (!isOneCanceled) {
3133
- this.searching = false;
3134
- this.searchingMoreOf = null;
3135
- }
3136
- });
3137
- },
3138
- searchOneProvider(providerId, cursor = null) {
3139
- const url = cursor === null ? router.generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}", { providerId, term: this.searchQuery, limit: LIMIT }) : router.generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}", { providerId, term: this.searchQuery, limit: LIMIT, cursor });
3140
- return axios__default.default.get(url, {
3141
- signal: this.abortController.signal
3142
- }).then((response) => {
3143
- const data = response.data.ocs.data;
3144
- this.resultsBySearchProvider[providerId].name = data.name;
3145
- this.resultsBySearchProvider[providerId].cursor = data.cursor;
3146
- this.resultsBySearchProvider[providerId].isPaginated = data.isPaginated;
3147
- this.resultsBySearchProvider[providerId].entries.push(...data.entries);
3148
- });
3149
- }
3150
- }
3151
- };
3152
- var _sfc_render$2 = function render9() {
3153
- var _vm = this, _c = _vm._self._c;
3154
- return _c("div", { staticClass: "smart-picker-search", class: { "with-empty-content": _vm.showEmptyContent } }, [_c("NcSelect", { ref: "search-select", staticClass: "smart-picker-search--select", attrs: { "input-id": "search-select-input", "label": "name", "placeholder": _vm.mySearchPlaceholder, "options": _vm.options, "append-to-body": false, "close-on-select": false, "clear-search-on-select": false, "clear-search-on-blur": () => false, "reset-focus-on-options-change": false, "filterable": false, "autoscroll": true, "reset-on-options-change": false, "loading": _vm.searching }, on: { "search": _vm.onSearchInput, "input": _vm.onSelectResultSelected }, scopedSlots: _vm._u([{ key: "option", fn: function(option) {
3155
- return [option.isRawLink ? _c("div", { staticClass: "custom-option" }, [_c("LinkVariantIcon", { staticClass: "option-simple-icon", attrs: { "size": 20 } }), _c("span", { staticClass: "option-text" }, [_vm._v(" " + _vm._s(_vm.t("Raw link {options}", { options: option.resourceUrl })) + " ")])], 1) : option.resourceUrl ? _c("NcSearchResult", { staticClass: "search-result", attrs: { "entry": option, "query": _vm.searchQuery } }) : option.isCustomGroupTitle ? _c("span", { staticClass: "custom-option group-name" }, [_vm.provider.icon_url ? _c("img", { staticClass: "provider-icon group-name-icon", attrs: { "src": _vm.provider.icon_url } }) : _vm._e(), _c("span", { staticClass: "option-text" }, [_c("strong", [_vm._v(_vm._s(option.name))])])]) : option.isMore ? _c("span", { class: { "custom-option": true } }, [option.isLoading ? _c("span", { staticClass: "option-simple-icon icon-loading-small" }) : _c("DotsHorizontalIcon", { staticClass: "option-simple-icon", attrs: { "size": 20 } }), _c("span", { staticClass: "option-text" }, [_vm._v(" " + _vm._s(_vm.t('Load more "{options}"', { options: option.name })) + " ")])], 1) : _vm._e()];
3156
- } }, { key: "no-options", fn: function() {
3157
- return [_vm._v(" " + _vm._s(_vm.noOptionsText) + " ")];
3158
- }, proxy: true }]), model: { value: _vm.selectedResult, callback: function($$v) {
3159
- _vm.selectedResult = $$v;
3160
- }, expression: "selectedResult" } }), _vm.showEmptyContent ? _c("NcEmptyContent", { staticClass: "smart-picker-search--empty-content", scopedSlots: _vm._u([{ key: "icon", fn: function() {
3161
- return [_vm.provider.icon_url ? _c("img", { staticClass: "provider-icon", attrs: { "alt": _vm.providerIconAlt, "src": _vm.provider.icon_url } }) : _c("LinkVariantIcon")];
3162
- }, proxy: true }], null, false, 2922132592) }) : _vm._e()], 1);
3163
- };
3164
- var _sfc_staticRenderFns$2 = [];
3165
- var __component__$2 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
3166
- _sfc_main$2,
3167
- _sfc_render$2,
3168
- _sfc_staticRenderFns$2,
3169
- false,
3170
- null,
3171
- "97d196f0",
3172
- null,
3173
- null
3174
- );
3175
- const NcSearch = __component__$2.exports;
3176
- const MODES = {
3177
- providerList: 1,
3178
- standardLinkInput: 2,
3179
- searchInput: 3,
3180
- customElement: 4
3181
- };
3182
- const _sfc_main$1 = {
3183
- name: "NcReferencePicker",
3184
- components: {
3185
- NcCustomPickerElement,
3186
- NcProviderList,
3187
- NcRawLinkInput,
3188
- NcSearch
3189
- },
3190
- props: {
3191
- /**
3192
- * Provider to select on creation
3193
- * Default: null. Show the provider list
3194
- */
3195
- initialProvider: {
3196
- type: Object,
3197
- default: () => null
3198
- },
3199
- /**
3200
- * Optional width in pixels
3201
- * Default: 100%
3202
- */
3203
- width: {
3204
- type: Number,
3205
- default: null
3206
- },
3207
- /**
3208
- * Focus on the provider list select input on creation
3209
- * Default: true
3210
- */
3211
- focusOnCreate: {
3212
- type: Boolean,
3213
- default: true
3214
- }
3215
- },
3216
- emits: [
3217
- "cancel",
3218
- "cancel-raw-link",
3219
- "cancel-search",
3220
- "provider-selected",
3221
- "submit"
3222
- ],
3223
- data() {
3224
- return {
3225
- MODES,
3226
- selectedProvider: this.initialProvider
3227
- };
3228
- },
3229
- computed: {
3230
- mode() {
3231
- return this.selectedProvider === null ? MODES.providerList : Functions_registerReference.isCustomPickerElementRegistered(this.selectedProvider.id) ? MODES.customElement : this.selectedProvider.search_providers_ids ? MODES.searchInput : MODES.standardLinkInput;
3232
- },
3233
- pickerWrapperStyle() {
3234
- return {
3235
- width: this.width ? this.width + "px" : void 0
3236
- };
3237
- }
3238
- },
3239
- mounted() {
3240
- if (this.focusOnCreate) {
3241
- if (this.initialProvider) {
3242
- setTimeout(() => {
3243
- var _a;
3244
- (_a = this.$refs["url-input"]) == null ? void 0 : _a.focus();
3245
- }, 300);
3246
- } else {
3247
- this.$nextTick(() => {
3248
- var _a;
3249
- (_a = this.$refs["provider-list"]) == null ? void 0 : _a.focus();
3250
- });
3251
- }
3252
- }
3253
- },
3254
- methods: {
3255
- onEscapePressed() {
3256
- if (this.selectedProvider !== null) {
3257
- this.deselectProvider();
3258
- } else {
3259
- this.cancelProviderSelection();
3260
- }
3261
- },
3262
- onProviderSelected(provider) {
3263
- this.selectedProvider = provider;
3264
- this.$emit("provider-selected", provider);
3265
- this.$nextTick(() => {
3266
- var _a;
3267
- (_a = this.$refs["url-input"]) == null ? void 0 : _a.focus();
3268
- });
3269
- },
3270
- cancelCustomElement() {
3271
- this.deselectProvider();
3272
- },
3273
- cancelSearch() {
3274
- var _a;
3275
- this.$emit("cancel-search", (_a = this.selectedProvider) == null ? void 0 : _a.title);
3276
- this.deselectProvider();
3277
- },
3278
- cancelRawLinkInput() {
3279
- var _a;
3280
- this.$emit("cancel-raw-link", (_a = this.selectedProvider) == null ? void 0 : _a.title);
3281
- this.deselectProvider();
3282
- },
3283
- cancelProviderSelection() {
3284
- this.$emit("cancel");
3285
- },
3286
- submitLink(link) {
3287
- if (this.selectedProvider !== null) {
3288
- touchProvider(this.selectedProvider.id);
3289
- }
3290
- this.$emit("submit", link);
3291
- this.deselectProvider();
3292
- },
3293
- deselectProvider() {
3294
- this.selectedProvider = null;
3295
- this.$emit("provider-selected", null);
3296
- setTimeout(() => {
3297
- var _a;
3298
- (_a = this.$refs["provider-list"]) == null ? void 0 : _a.focus();
3299
- }, 300);
3300
- }
3301
- }
3302
- };
3303
- var _sfc_render$1 = function render10() {
3304
- var _vm = this, _c = _vm._self._c;
3305
- return _c("div", { staticClass: "reference-picker", style: _vm.pickerWrapperStyle, attrs: { "tabindex": "-1" }, on: { "keydown": function($event) {
3306
- if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "esc", 27, $event.key, ["Esc", "Escape"]))
3307
- return null;
3308
- $event.stopPropagation();
3309
- $event.preventDefault();
3310
- return _vm.onEscapePressed.apply(null, arguments);
3311
- } } }, [_vm.mode === _vm.MODES.providerList ? _c("NcProviderList", { ref: "provider-list", on: { "select-provider": _vm.onProviderSelected, "submit": _vm.submitLink, "cancel": _vm.cancelProviderSelection } }) : _vm.mode === _vm.MODES.standardLinkInput ? _c("NcRawLinkInput", { ref: "url-input", attrs: { "provider": _vm.selectedProvider }, on: { "submit": _vm.submitLink, "cancel": _vm.cancelRawLinkInput } }) : _vm.mode === _vm.MODES.searchInput ? _c("NcSearch", { ref: "url-input", attrs: { "provider": _vm.selectedProvider }, on: { "cancel": _vm.cancelSearch, "submit": _vm.submitLink } }) : _vm.mode === _vm.MODES.customElement ? _c("div", { staticClass: "custom-element-wrapper" }, [_c("NcCustomPickerElement", { attrs: { "provider": _vm.selectedProvider }, on: { "submit": _vm.submitLink, "cancel": _vm.cancelCustomElement } })], 1) : _vm._e()], 1);
3312
- };
3313
- var _sfc_staticRenderFns$1 = [];
3314
- var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
3315
- _sfc_main$1,
3316
- _sfc_render$1,
3317
- _sfc_staticRenderFns$1,
3318
- false,
3319
- null,
3320
- "12c38c93",
3321
- null,
3322
- null
3323
- );
3324
- const NcReferencePicker = __component__$1.exports;
3325
- _l10n.register(_l10n.t11, _l10n.t16);
3326
- const _sfc_main = {
3327
- name: "NcReferencePickerModal",
3328
- components: {
3329
- NcReferencePicker,
3330
- NcModal: Components_NcModal,
3331
- NcButton: Components_NcButton,
3332
- ArrowLeftIcon: ArrowLeft.ArrowLeft,
3333
- CloseIcon: Close.Close
3334
- },
3335
- props: {
3336
- /**
3337
- * Provider to select on creation
3338
- * Show the provider list if no initial one is provided
3339
- */
3340
- initialProvider: {
3341
- type: Object,
3342
- default: () => null
3343
- },
3344
- /**
3345
- * Focus on the input item on create
3346
- */
3347
- focusOnCreate: {
3348
- type: Boolean,
3349
- default: true
3350
- },
3351
- /**
3352
- * If true, add the modal content to the Viewer trap elements via the event-bus
3353
- */
3354
- isInsideViewer: {
3355
- type: Boolean,
3356
- default: false
3357
- }
3358
- },
3359
- emits: [
3360
- "cancel",
3361
- "submit"
3362
- ],
3363
- data() {
3364
- return {
3365
- show: true,
3366
- selectedProvider: this.initialProvider,
3367
- backButtonTitle: _l10n.t("Back to provider selection"),
3368
- closeButtonTitle: _l10n.t("Close"),
3369
- closeButtonLabel: _l10n.t("Close Smart Picker")
3370
- };
3371
- },
3372
- computed: {
3373
- isProviderSelected() {
3374
- return this.selectedProvider !== null;
3375
- },
3376
- showBackButton() {
3377
- return this.initialProvider === null && this.isProviderSelected;
3378
- },
3379
- modalSize() {
3380
- var _a;
3381
- return this.isProviderSelected && Functions_registerReference.isCustomPickerElementRegistered(this.selectedProvider.id) ? (_a = Functions_registerReference.getCustomPickerElementSize(this.selectedProvider.id)) != null ? _a : "large" : "normal";
3382
- },
3383
- showModalName() {
3384
- return !this.isProviderSelected || !Functions_registerReference.isCustomPickerElementRegistered(this.selectedProvider.id);
3385
- },
3386
- modalName() {
3387
- return this.isProviderSelected ? this.selectedProvider.title : _l10n.t("Smart Picker");
3388
- }
3389
- },
3390
- mounted() {
3391
- if (this.isInsideViewer) {
3392
- const elem = this.$refs.modal_content;
3393
- eventBus.emit("viewer:trapElements:changed", elem);
3394
- }
3395
- },
3396
- methods: {
3397
- onCancel() {
3398
- this.show = false;
3399
- this.$emit("cancel");
3400
- },
3401
- onSubmit(value) {
3402
- this.show = false;
3403
- this.$emit("submit", value);
3404
- },
3405
- onProviderSelect(provider) {
3406
- this.selectedProvider = provider;
3407
- if (provider === null && this.initialProvider !== null) {
3408
- this.onCancel();
3409
- }
3410
- },
3411
- onBackClicked() {
3412
- this.$refs.referencePicker.deselectProvider();
3413
- }
3414
- }
3415
- };
3416
- var _sfc_render = function render11() {
3417
- var _vm = this, _c = _vm._self._c;
3418
- return _vm.show ? _c("NcModal", { staticClass: "reference-picker-modal", attrs: { "size": _vm.modalSize, "can-close": false }, on: { "close": _vm.onCancel } }, [_c("div", { ref: "modal_content", staticClass: "reference-picker-modal--content" }, [_vm.showBackButton ? _c("NcButton", { staticClass: "back-button", attrs: { "aria-label": _vm.backButtonTitle, "title": _vm.backButtonTitle }, on: { "click": _vm.onBackClicked }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
3419
- return [_c("ArrowLeftIcon")];
3420
- }, proxy: true }], null, false, 3001860362) }) : _vm._e(), _c("NcButton", { staticClass: "close-button", attrs: { "aria-label": _vm.closeButtonLabel, "title": _vm.closeButtonTitle, "type": "tertiary" }, on: { "click": _vm.onCancel }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
3421
- return [_c("CloseIcon")];
3422
- }, proxy: true }], null, false, 2491825086) }), _vm.showModalName ? _c("h2", [_vm._v(" " + _vm._s(_vm.modalName) + " ")]) : _vm._e(), _c("NcReferencePicker", { ref: "referencePicker", attrs: { "initial-provider": _vm.initialProvider, "focus-on-create": _vm.focusOnCreate }, on: { "provider-selected": _vm.onProviderSelect, "submit": _vm.onSubmit, "cancel": _vm.onCancel } })], 1)]) : _vm._e();
3423
- };
3424
- var _sfc_staticRenderFns = [];
3425
- var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
3426
- _sfc_main,
3427
- _sfc_render,
3428
- _sfc_staticRenderFns,
3429
- false,
3430
- null,
3431
- "ab09ebaa",
3432
- null,
3433
- null
3434
- );
3435
- const NcReferencePickerModal = __component__.exports;
3436
- async function getLinkWithPicker(providerId = null, isInsideViewer = void 0) {
3437
- return await new Promise((resolve2, reject) => {
3438
- var _a;
3439
- const modalId = "referencePickerModal";
3440
- const modalElement = document.createElement("div");
3441
- modalElement.id = modalId;
3442
- document.body.append(modalElement);
3443
- const initialProvider = providerId === null ? null : (_a = getProvider(providerId)) != null ? _a : null;
3444
- const View2 = Vue__default.default.extend(NcReferencePickerModal);
3445
- const view = new View2({
3446
- propsData: {
3447
- initialProvider,
3448
- isInsideViewer
3449
- }
3450
- }).$mount(modalElement);
3451
- view.$on("cancel", () => {
3452
- view.$destroy();
3453
- reject(new Error("User cancellation"));
3454
- });
3455
- view.$on("submit", (link) => {
3456
- view.$destroy();
3457
- resolve2(link);
3458
- });
3459
- });
3460
- }
3461
- exports.Link = Link;
3462
- exports.NcReferencePicker = NcReferencePicker;
3463
- exports.NcReferencePickerModal = NcReferencePickerModal;
3464
- exports.NcReferenceWidget = NcReferenceWidget;
3465
- exports.NcSearch = NcSearch;
3466
- exports.anyLinkProviderId = anyLinkProviderId;
3467
- exports.getLinkWithPicker = getLinkWithPicker;
3468
- exports.getProvider = getProvider;
3469
- exports.getProviders = getProviders;
3470
- exports.searchProvider = searchProvider;
3471
- exports.sortProviders = sortProviders;