@nextcloud/vue 8.6.1 → 8.7.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 (211) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/Components/NcActionButton.cjs +6 -6
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +3 -3
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionInput.cjs +1 -1
  7. package/dist/Components/NcActionInput.mjs +1 -1
  8. package/dist/Components/NcActions.cjs +1 -1
  9. package/dist/Components/NcActions.mjs +1 -1
  10. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  11. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  12. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  13. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  14. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  15. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  16. package/dist/Components/NcAppSidebar.cjs +1 -1
  17. package/dist/Components/NcAppSidebar.mjs +1 -1
  18. package/dist/Components/NcAppSidebarTab.cjs +3 -3
  19. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  20. package/dist/Components/NcAppSidebarTab.mjs +5 -5
  21. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  22. package/dist/Components/NcAvatar.cjs +1 -1
  23. package/dist/Components/NcAvatar.mjs +1 -1
  24. package/dist/Components/NcBreadcrumb.cjs +1 -1
  25. package/dist/Components/NcBreadcrumb.mjs +1 -1
  26. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  27. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  28. package/dist/Components/NcDashboardWidget.cjs +1 -1
  29. package/dist/Components/NcDashboardWidget.mjs +1 -1
  30. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  31. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  32. package/dist/Components/NcDateTimePicker.cjs +3 -3
  33. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  34. package/dist/Components/NcDateTimePicker.mjs +8 -8
  35. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  36. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  37. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  38. package/dist/Components/NcHeaderMenu.cjs +1 -1
  39. package/dist/Components/NcHeaderMenu.mjs +1 -1
  40. package/dist/Components/NcListItem.cjs +1 -1
  41. package/dist/Components/NcListItem.mjs +1 -1
  42. package/dist/Components/NcListItemIcon.cjs +1 -1
  43. package/dist/Components/NcListItemIcon.mjs +1 -1
  44. package/dist/Components/NcModal.cjs +7 -7
  45. package/dist/Components/NcModal.cjs.map +1 -1
  46. package/dist/Components/NcModal.mjs +7 -7
  47. package/dist/Components/NcModal.mjs.map +1 -1
  48. package/dist/Components/NcRichContenteditable.cjs +1 -1
  49. package/dist/Components/NcRichContenteditable.mjs +2 -2
  50. package/dist/Components/NcRichText.cjs +11 -11
  51. package/dist/Components/NcRichText.cjs.map +1 -1
  52. package/dist/Components/NcRichText.mjs +22 -21
  53. package/dist/Components/NcRichText.mjs.map +1 -1
  54. package/dist/Components/NcSelect.cjs +1 -1
  55. package/dist/Components/NcSelect.mjs +1 -1
  56. package/dist/Components/NcSelectTags.cjs +1 -1
  57. package/dist/Components/NcSelectTags.mjs +1 -1
  58. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  59. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  60. package/dist/Components/NcTimezonePicker.cjs +1 -1
  61. package/dist/Components/NcTimezonePicker.mjs +1 -1
  62. package/dist/Components/NcUserBubble.cjs +1 -1
  63. package/dist/Components/NcUserBubble.mjs +1 -1
  64. package/dist/Functions/reference.cjs +16 -0
  65. package/dist/Functions/reference.cjs.map +1 -0
  66. package/dist/Functions/reference.mjs +17 -0
  67. package/dist/Functions/reference.mjs.map +1 -0
  68. package/dist/Functions/registerReference.cjs +71 -0
  69. package/dist/Functions/registerReference.cjs.map +1 -0
  70. package/dist/Functions/registerReference.mjs +71 -0
  71. package/dist/Functions/registerReference.mjs.map +1 -0
  72. package/dist/Mixins/richEditor.cjs +1 -1
  73. package/dist/Mixins/richEditor.mjs +1 -1
  74. package/dist/assets/{NcActionButton-1Z9lN7ar.css → NcActionButton-rOZFVQA8.css} +17 -17
  75. package/dist/assets/{NcActions-mSL9fcPO.css → NcActions-4Gq5bZLW.css} +12 -12
  76. package/dist/assets/{NcAppSidebar-iU8Zp4Qk.css → NcAppSidebar-YHd7DpMW.css} +44 -44
  77. package/dist/assets/{NcAppSidebarTab-Phau6edJ.css → NcAppSidebarTab-FywbKxqo.css} +4 -4
  78. package/dist/assets/{NcBreadcrumb-M3hqCbqS.css → NcBreadcrumb-HspaFygg.css} +16 -16
  79. package/dist/assets/{NcDateTimePicker-vivOLt2Q.css → NcDateTimePicker-w8SEtYvQ.css} +17 -17
  80. package/dist/assets/{NcHeaderMenu-06vdn4tC.css → NcHeaderMenu-Srn5iXdL.css} +14 -15
  81. package/dist/assets/NcListItem-L8LeGwpe.css +165 -0
  82. package/dist/assets/{NcMentionBubble-2OXF_uEJ.css → NcMentionBubble-YYl1ib_F.css} +9 -9
  83. package/dist/assets/{NcModal-UZh031V1.css → NcModal-sIK5sUoC.css} +63 -63
  84. package/dist/assets/{NcRichContenteditable-j9edXOEH.css → NcRichContenteditable-N1TxeACO.css} +76 -84
  85. package/dist/assets/NcRichText-kDp48Nji.css +215 -0
  86. package/dist/assets/referencePickerModal-A0PlFUEI.css +316 -0
  87. package/dist/chunks/{NcActionInput-jQFZLsoe.mjs → NcActionInput-XHMzOL_h.mjs} +1 -1
  88. package/dist/chunks/{NcActionInput-jQFZLsoe.mjs.map → NcActionInput-XHMzOL_h.mjs.map} +1 -1
  89. package/dist/chunks/{NcActionInput--MiyWKmE.cjs → NcActionInput-f1Oq2O71.cjs} +1 -1
  90. package/dist/chunks/{NcActionInput--MiyWKmE.cjs.map → NcActionInput-f1Oq2O71.cjs.map} +1 -1
  91. package/dist/chunks/{NcActions-qCVw08zV.mjs → NcActions-5_igU-CH.mjs} +21 -21
  92. package/dist/chunks/{NcActions-qCVw08zV.mjs.map → NcActions-5_igU-CH.mjs.map} +1 -1
  93. package/dist/chunks/{NcActions-SlBohqiI.cjs → NcActions-JXnhQhum.cjs} +7 -7
  94. package/dist/chunks/{NcActions-SlBohqiI.cjs.map → NcActions-JXnhQhum.cjs.map} +1 -1
  95. package/dist/chunks/{NcAppNavigationCaption-0lGP-5CR.mjs → NcAppNavigationCaption-2rUO5Mns.mjs} +1 -1
  96. package/dist/chunks/{NcAppNavigationCaption-0lGP-5CR.mjs.map → NcAppNavigationCaption-2rUO5Mns.mjs.map} +1 -1
  97. package/dist/chunks/{NcAppNavigationCaption-nEKQXQYr.cjs → NcAppNavigationCaption-JQWbmgdy.cjs} +1 -1
  98. package/dist/chunks/{NcAppNavigationCaption-nEKQXQYr.cjs.map → NcAppNavigationCaption-JQWbmgdy.cjs.map} +1 -1
  99. package/dist/chunks/{NcAppNavigationItem-g_XncGxL.mjs → NcAppNavigationItem-A1yAdDNN.mjs} +1 -1
  100. package/dist/chunks/{NcAppNavigationItem-g_XncGxL.mjs.map → NcAppNavigationItem-A1yAdDNN.mjs.map} +1 -1
  101. package/dist/chunks/{NcAppNavigationItem-AdLvgSbV.cjs → NcAppNavigationItem-Wb8gX-Ln.cjs} +1 -1
  102. package/dist/chunks/{NcAppNavigationItem-AdLvgSbV.cjs.map → NcAppNavigationItem-Wb8gX-Ln.cjs.map} +1 -1
  103. package/dist/chunks/{NcAppNavigationSettings-UKQnGAEz.cjs → NcAppNavigationSettings-VLa79G7w.cjs} +1 -1
  104. package/dist/chunks/{NcAppNavigationSettings-UKQnGAEz.cjs.map → NcAppNavigationSettings-VLa79G7w.cjs.map} +1 -1
  105. package/dist/chunks/{NcAppNavigationSettings-DQHPDc4X.mjs → NcAppNavigationSettings-gwL_FqLN.mjs} +1 -1
  106. package/dist/chunks/{NcAppNavigationSettings-DQHPDc4X.mjs.map → NcAppNavigationSettings-gwL_FqLN.mjs.map} +1 -1
  107. package/dist/chunks/{NcAppSidebar-WyDtlgwP.cjs → NcAppSidebar-rRNJnN-k.cjs} +59 -31
  108. package/dist/chunks/NcAppSidebar-rRNJnN-k.cjs.map +1 -0
  109. package/dist/chunks/{NcAppSidebar-Wo8-p3nm.mjs → NcAppSidebar-tnHBPGbL.mjs} +138 -109
  110. package/dist/chunks/NcAppSidebar-tnHBPGbL.mjs.map +1 -0
  111. package/dist/chunks/{NcAvatar-c9ryo-7h.mjs → NcAvatar-xT3kz6mU.mjs} +2 -2
  112. package/dist/chunks/{NcAvatar-c9ryo-7h.mjs.map → NcAvatar-xT3kz6mU.mjs.map} +1 -1
  113. package/dist/chunks/{NcAvatar-khVnYpF2.cjs → NcAvatar-zTS9P1lK.cjs} +2 -2
  114. package/dist/chunks/{NcAvatar-khVnYpF2.cjs.map → NcAvatar-zTS9P1lK.cjs.map} +1 -1
  115. package/dist/chunks/{NcBreadcrumb-SEyo99to.cjs → NcBreadcrumb-DEWk7wO9.cjs} +27 -20
  116. package/dist/chunks/NcBreadcrumb-DEWk7wO9.cjs.map +1 -0
  117. package/dist/chunks/{NcBreadcrumb-Ac0G-oky.mjs → NcBreadcrumb-w1UX2NR-.mjs} +14 -7
  118. package/dist/chunks/NcBreadcrumb-w1UX2NR-.mjs.map +1 -0
  119. package/dist/chunks/{NcBreadcrumbs-DXpOwLNx.cjs → NcBreadcrumbs-VuaG3ex5.cjs} +1 -1
  120. package/dist/chunks/{NcBreadcrumbs-DXpOwLNx.cjs.map → NcBreadcrumbs-VuaG3ex5.cjs.map} +1 -1
  121. package/dist/chunks/{NcBreadcrumbs-YOANgGCY.mjs → NcBreadcrumbs-tRR9CjKD.mjs} +2 -2
  122. package/dist/chunks/{NcBreadcrumbs-YOANgGCY.mjs.map → NcBreadcrumbs-tRR9CjKD.mjs.map} +1 -1
  123. package/dist/chunks/{NcDashboardWidget-zBrcpL_E.cjs → NcDashboardWidget-QciRRvL4.cjs} +1 -1
  124. package/dist/chunks/{NcDashboardWidget-zBrcpL_E.cjs.map → NcDashboardWidget-QciRRvL4.cjs.map} +1 -1
  125. package/dist/chunks/{NcDashboardWidget-bEnoXtKm.mjs → NcDashboardWidget-ogqyHahY.mjs} +2 -2
  126. package/dist/chunks/{NcDashboardWidget-bEnoXtKm.mjs.map → NcDashboardWidget-ogqyHahY.mjs.map} +1 -1
  127. package/dist/chunks/{NcDashboardWidgetItem-LcxIx2-S.cjs → NcDashboardWidgetItem-mIPkPR7r.cjs} +1 -1
  128. package/dist/chunks/{NcDashboardWidgetItem-LcxIx2-S.cjs.map → NcDashboardWidgetItem-mIPkPR7r.cjs.map} +1 -1
  129. package/dist/chunks/{NcDashboardWidgetItem-p7yyFX-b.mjs → NcDashboardWidgetItem-wuUHTeLl.mjs} +2 -2
  130. package/dist/chunks/{NcDashboardWidgetItem-p7yyFX-b.mjs.map → NcDashboardWidgetItem-wuUHTeLl.mjs.map} +1 -1
  131. package/dist/chunks/{NcHeaderMenu-BSi8E43v.cjs → NcHeaderMenu-0d6eqre6.cjs} +6 -6
  132. package/dist/chunks/{NcHeaderMenu-Vytc8Eqg.mjs.map → NcHeaderMenu-0d6eqre6.cjs.map} +1 -1
  133. package/dist/chunks/{NcHeaderMenu-Vytc8Eqg.mjs → NcHeaderMenu-91qMsRIw.mjs} +3 -3
  134. package/dist/chunks/{NcHeaderMenu-BSi8E43v.cjs.map → NcHeaderMenu-91qMsRIw.mjs.map} +1 -1
  135. package/dist/chunks/{NcListItem-lqYZQhuZ.cjs → NcListItem--_PCqetA.cjs} +30 -47
  136. package/dist/chunks/NcListItem--_PCqetA.cjs.map +1 -0
  137. package/dist/chunks/{NcListItem-90hXqC4C.mjs → NcListItem-AMcc69jK.mjs} +33 -50
  138. package/dist/chunks/NcListItem-AMcc69jK.mjs.map +1 -0
  139. package/dist/chunks/{NcListItemIcon-ccke4gpg.cjs → NcListItemIcon-BnoIbVbD.cjs} +2 -2
  140. package/dist/chunks/{NcListItemIcon-ccke4gpg.cjs.map → NcListItemIcon-BnoIbVbD.cjs.map} +1 -1
  141. package/dist/chunks/{NcListItemIcon-hTbMo3-O.mjs → NcListItemIcon-rqgXledP.mjs} +2 -2
  142. package/dist/chunks/{NcListItemIcon-hTbMo3-O.mjs.map → NcListItemIcon-rqgXledP.mjs.map} +1 -1
  143. package/dist/chunks/NcRichContenteditable-eG8Fyo-M.mjs +638 -0
  144. package/dist/chunks/NcRichContenteditable-eG8Fyo-M.mjs.map +1 -0
  145. package/dist/chunks/{NcRichContenteditable-WxSgSNot.cjs → NcRichContenteditable-jReu2l-M.cjs} +235 -111
  146. package/dist/chunks/NcRichContenteditable-jReu2l-M.cjs.map +1 -0
  147. package/dist/chunks/NcRichText-Yo5pFnd0.cjs +310 -0
  148. package/dist/chunks/NcRichText-Yo5pFnd0.cjs.map +1 -0
  149. package/dist/chunks/NcRichText-qID66jAy.mjs +325 -0
  150. package/dist/chunks/NcRichText-qID66jAy.mjs.map +1 -0
  151. package/dist/chunks/{NcSelect-rMSul72R.cjs → NcSelect-U9LJcdIo.cjs} +55 -45
  152. package/dist/chunks/NcSelect-U9LJcdIo.cjs.map +1 -0
  153. package/dist/chunks/{NcSelect-vSPKKiyt.mjs → NcSelect-b2H-YQsK.mjs} +40 -30
  154. package/dist/chunks/NcSelect-b2H-YQsK.mjs.map +1 -0
  155. package/dist/chunks/{NcSelectTags-MwCs_QbM.mjs → NcSelectTags-MlILya2b.mjs} +1 -1
  156. package/dist/chunks/{NcSelectTags-MwCs_QbM.mjs.map → NcSelectTags-MlILya2b.mjs.map} +1 -1
  157. package/dist/chunks/{NcSelectTags-beMN3ZsT.cjs → NcSelectTags-rO88Pk-1.cjs} +1 -1
  158. package/dist/chunks/{NcSelectTags-beMN3ZsT.cjs.map → NcSelectTags-rO88Pk-1.cjs.map} +1 -1
  159. package/dist/chunks/{NcSettingsSelectGroup-msn3aYsn.cjs → NcSettingsSelectGroup-rfeDPLCg.cjs} +1 -1
  160. package/dist/chunks/{NcSettingsSelectGroup-msn3aYsn.cjs.map → NcSettingsSelectGroup-rfeDPLCg.cjs.map} +1 -1
  161. package/dist/chunks/{NcSettingsSelectGroup-HkS2QpZS.mjs → NcSettingsSelectGroup-xhnDBg8a.mjs} +1 -1
  162. package/dist/chunks/{NcSettingsSelectGroup-HkS2QpZS.mjs.map → NcSettingsSelectGroup-xhnDBg8a.mjs.map} +1 -1
  163. package/dist/chunks/{NcTimezonePicker-Cp479kFL.cjs → NcTimezonePicker-KG0dvgUv.cjs} +1 -1
  164. package/dist/chunks/{NcTimezonePicker-Cp479kFL.cjs.map → NcTimezonePicker-KG0dvgUv.cjs.map} +1 -1
  165. package/dist/chunks/{NcTimezonePicker-I6wF2jeF.mjs → NcTimezonePicker-jJeiI-Ff.mjs} +1 -1
  166. package/dist/chunks/{NcTimezonePicker-I6wF2jeF.mjs.map → NcTimezonePicker-jJeiI-Ff.mjs.map} +1 -1
  167. package/dist/chunks/{NcUserBubble-6AbwSr2B.cjs → NcUserBubble-027_C0cM.cjs} +1 -1
  168. package/dist/chunks/{NcUserBubble-6AbwSr2B.cjs.map → NcUserBubble-027_C0cM.cjs.map} +1 -1
  169. package/dist/chunks/{NcUserBubble-imSUw-aP.mjs → NcUserBubble-9StjszDh.mjs} +1 -1
  170. package/dist/chunks/{NcUserBubble-imSUw-aP.mjs.map → NcUserBubble-9StjszDh.mjs.map} +1 -1
  171. package/dist/chunks/{ScopeComponent-CjAOgGnx.mjs → ScopeComponent-9fOoDGYa.mjs} +1 -1
  172. package/dist/chunks/{ScopeComponent-CjAOgGnx.mjs.map → ScopeComponent-9fOoDGYa.mjs.map} +1 -1
  173. package/dist/chunks/{ScopeComponent-V9SPec9g.cjs → ScopeComponent-R0tAsT2f.cjs} +1 -1
  174. package/dist/chunks/{ScopeComponent-V9SPec9g.cjs.map → ScopeComponent-R0tAsT2f.cjs.map} +1 -1
  175. package/dist/chunks/{index-U21dQVa7.cjs → index-5TyVc_TT.cjs} +29 -16
  176. package/dist/chunks/index-5TyVc_TT.cjs.map +1 -0
  177. package/dist/chunks/{index-n2q3iT69.mjs → index-xnq0-IMW.mjs} +26 -13
  178. package/dist/chunks/index-xnq0-IMW.mjs.map +1 -0
  179. package/dist/chunks/referencePickerModal-cPBjsn4r.cjs +2393 -0
  180. package/dist/chunks/referencePickerModal-cPBjsn4r.cjs.map +1 -0
  181. package/dist/chunks/referencePickerModal-gDBkGfNV.mjs +2414 -0
  182. package/dist/chunks/referencePickerModal-gDBkGfNV.mjs.map +1 -0
  183. package/dist/index.cjs +189 -170
  184. package/dist/index.cjs.map +1 -1
  185. package/dist/index.mjs +184 -165
  186. package/dist/index.mjs.map +1 -1
  187. package/dist/vendor.LICENSE.txt +4 -0
  188. package/package.json +4 -4
  189. package/dist/assets/NcListItem-6sL-frKJ.css +0 -165
  190. package/dist/assets/referencePickerModal-iy5QSWj6.css +0 -509
  191. package/dist/chunks/NcAppSidebar-Wo8-p3nm.mjs.map +0 -1
  192. package/dist/chunks/NcAppSidebar-WyDtlgwP.cjs.map +0 -1
  193. package/dist/chunks/NcBreadcrumb-Ac0G-oky.mjs.map +0 -1
  194. package/dist/chunks/NcBreadcrumb-SEyo99to.cjs.map +0 -1
  195. package/dist/chunks/NcListItem-90hXqC4C.mjs.map +0 -1
  196. package/dist/chunks/NcListItem-lqYZQhuZ.cjs.map +0 -1
  197. package/dist/chunks/NcRichContenteditable-WxSgSNot.cjs.map +0 -1
  198. package/dist/chunks/NcRichContenteditable-gQh2HFSV.mjs +0 -515
  199. package/dist/chunks/NcRichContenteditable-gQh2HFSV.mjs.map +0 -1
  200. package/dist/chunks/NcRichText-RSAcESV2.mjs +0 -353
  201. package/dist/chunks/NcRichText-RSAcESV2.mjs.map +0 -1
  202. package/dist/chunks/NcRichText-fHn-j5sa.cjs +0 -337
  203. package/dist/chunks/NcRichText-fHn-j5sa.cjs.map +0 -1
  204. package/dist/chunks/NcSelect-rMSul72R.cjs.map +0 -1
  205. package/dist/chunks/NcSelect-vSPKKiyt.mjs.map +0 -1
  206. package/dist/chunks/index-U21dQVa7.cjs.map +0 -1
  207. package/dist/chunks/index-n2q3iT69.mjs.map +0 -1
  208. package/dist/chunks/referencePickerModal-FeA-PRqB.mjs +0 -897
  209. package/dist/chunks/referencePickerModal-FeA-PRqB.mjs.map +0 -1
  210. package/dist/chunks/referencePickerModal-GXRJ351Q.cjs +0 -880
  211. package/dist/chunks/referencePickerModal-GXRJ351Q.cjs.map +0 -1
@@ -0,0 +1,2393 @@
1
+ require('../assets/referencePickerModal-A0PlFUEI.css');
2
+ "use strict";
3
+ const x = require("../Functions/registerReference.cjs"), $ = require("./_plugin-vue2_normalizer-DCfUPqga.cjs"), y = require("./_l10n-Od-4xzJA.cjs"), Ot = require("@nextcloud/axios"), Xe = require("@nextcloud/initial-state"), j = require("@nextcloud/router"), me = require("../Components/NcEmptyContent.cjs"), Ye = require("./index-FO4BaGaF.cjs"), et = require("./NcSelect-U9LJcdIo.cjs"), Le = require("unist-util-visit"), le = require("unist-builder"), Tt = require("@vueuse/core"), At = require("../Components/NcLoadingIcon.cjs"), It = require("./NcTextField-eclRKl_B.cjs"), qt = require("./DotsHorizontal-6hepLUSS.cjs"), Vt = require("../Components/NcButton.cjs"), Bt = require("../Components/NcModal.cjs"), jt = require("@nextcloud/event-bus"), Mt = require("./ArrowLeft-fC5aEWWu.cjs"), Ut = require("./Close-dotk0707.cjs"), zt = require("vue"), tt = (t) => t && t.__esModule ? t : { default: t }, ge = /* @__PURE__ */ tt(Ot), Dt = /* @__PURE__ */ tt(zt);
4
+ /*!
5
+ * vue-router v3.6.5
6
+ * (c) 2022 Evan You
7
+ * @license MIT
8
+ */
9
+ function q(t, e) {
10
+ if (!t)
11
+ throw new Error("[vue-router] " + e);
12
+ }
13
+ function P(t, e) {
14
+ t || typeof console < "u" && console.warn("[vue-router] " + e);
15
+ }
16
+ function S(t, e) {
17
+ for (var r in e)
18
+ t[r] = e[r];
19
+ return t;
20
+ }
21
+ var Ft = /[!'()*]/g, Wt = function(t) {
22
+ return "%" + t.charCodeAt(0).toString(16);
23
+ }, Ht = /%2C/g, B = function(t) {
24
+ return encodeURIComponent(t).replace(Ft, Wt).replace(Ht, ",");
25
+ };
26
+ function fe(t) {
27
+ try {
28
+ return decodeURIComponent(t);
29
+ } catch {
30
+ process.env.NODE_ENV !== "production" && P(!1, 'Error decoding "' + t + '". Leaving it intact.');
31
+ }
32
+ return t;
33
+ }
34
+ function Gt(t, e, r) {
35
+ e === void 0 && (e = {});
36
+ var n = r || Qt, i;
37
+ try {
38
+ i = n(t || "");
39
+ } catch (a) {
40
+ process.env.NODE_ENV !== "production" && P(!1, a.message), i = {};
41
+ }
42
+ for (var s in e) {
43
+ var o = e[s];
44
+ i[s] = Array.isArray(o) ? o.map($e) : $e(o);
45
+ }
46
+ return i;
47
+ }
48
+ var $e = function(t) {
49
+ return t == null || typeof t == "object" ? t : String(t);
50
+ };
51
+ function Qt(t) {
52
+ var e = {};
53
+ return t = t.trim().replace(/^(\?|#|&)/, ""), t && t.split("&").forEach(function(r) {
54
+ var n = r.replace(/\+/g, " ").split("="), i = fe(n.shift()), s = n.length > 0 ? fe(n.join("=")) : null;
55
+ e[i] === void 0 ? e[i] = s : Array.isArray(e[i]) ? e[i].push(s) : e[i] = [e[i], s];
56
+ }), e;
57
+ }
58
+ function Kt(t) {
59
+ var e = t ? Object.keys(t).map(function(r) {
60
+ var n = t[r];
61
+ if (n === void 0)
62
+ return "";
63
+ if (n === null)
64
+ return B(r);
65
+ if (Array.isArray(n)) {
66
+ var i = [];
67
+ return n.forEach(function(s) {
68
+ s !== void 0 && (s === null ? i.push(B(r)) : i.push(B(r) + "=" + B(s)));
69
+ }), i.join("&");
70
+ }
71
+ return B(r) + "=" + B(n);
72
+ }).filter(function(r) {
73
+ return r.length > 0;
74
+ }).join("&") : null;
75
+ return e ? "?" + e : "";
76
+ }
77
+ var Y = /\/?$/;
78
+ function ee(t, e, r, n) {
79
+ var i = n && n.options.stringifyQuery, s = e.query || {};
80
+ try {
81
+ s = he(s);
82
+ } catch {
83
+ }
84
+ var o = {
85
+ name: e.name || t && t.name,
86
+ meta: t && t.meta || {},
87
+ path: e.path || "/",
88
+ hash: e.hash || "",
89
+ query: s,
90
+ params: e.params || {},
91
+ fullPath: Oe(e, i),
92
+ matched: t ? Zt(t) : []
93
+ };
94
+ return r && (o.redirectedFrom = Oe(r, i)), Object.freeze(o);
95
+ }
96
+ function he(t) {
97
+ if (Array.isArray(t))
98
+ return t.map(he);
99
+ if (t && typeof t == "object") {
100
+ var e = {};
101
+ for (var r in t)
102
+ e[r] = he(t[r]);
103
+ return e;
104
+ } else
105
+ return t;
106
+ }
107
+ var I = ee(null, {
108
+ path: "/"
109
+ });
110
+ function Zt(t) {
111
+ for (var e = []; t; )
112
+ e.unshift(t), t = t.parent;
113
+ return e;
114
+ }
115
+ function Oe(t, e) {
116
+ var r = t.path, n = t.query;
117
+ n === void 0 && (n = {});
118
+ var i = t.hash;
119
+ i === void 0 && (i = "");
120
+ var s = e || Kt;
121
+ return (r || "/") + s(n) + i;
122
+ }
123
+ function rt(t, e, r) {
124
+ return e === I ? t === e : e ? t.path && e.path ? t.path.replace(Y, "") === e.path.replace(Y, "") && (r || t.hash === e.hash && Q(t.query, e.query)) : t.name && e.name ? t.name === e.name && (r || t.hash === e.hash && Q(t.query, e.query) && Q(t.params, e.params)) : !1 : !1;
125
+ }
126
+ function Q(t, e) {
127
+ if (t === void 0 && (t = {}), e === void 0 && (e = {}), !t || !e)
128
+ return t === e;
129
+ var r = Object.keys(t).sort(), n = Object.keys(e).sort();
130
+ return r.length !== n.length ? !1 : r.every(function(i, s) {
131
+ var o = t[i], a = n[s];
132
+ if (a !== i)
133
+ return !1;
134
+ var c = e[i];
135
+ return o == null || c == null ? o === c : typeof o == "object" && typeof c == "object" ? Q(o, c) : String(o) === String(c);
136
+ });
137
+ }
138
+ function Jt(t, e) {
139
+ return t.path.replace(Y, "/").indexOf(
140
+ e.path.replace(Y, "/")
141
+ ) === 0 && (!e.hash || t.hash === e.hash) && Xt(t.query, e.query);
142
+ }
143
+ function Xt(t, e) {
144
+ for (var r in e)
145
+ if (!(r in t))
146
+ return !1;
147
+ return !0;
148
+ }
149
+ function nt(t) {
150
+ for (var e = 0; e < t.matched.length; e++) {
151
+ var r = t.matched[e];
152
+ for (var n in r.instances) {
153
+ var i = r.instances[n], s = r.enteredCbs[n];
154
+ if (!(!i || !s)) {
155
+ delete r.enteredCbs[n];
156
+ for (var o = 0; o < s.length; o++)
157
+ i._isBeingDestroyed || s[o](i);
158
+ }
159
+ }
160
+ }
161
+ }
162
+ var Yt = {
163
+ name: "RouterView",
164
+ functional: !0,
165
+ props: {
166
+ name: {
167
+ type: String,
168
+ default: "default"
169
+ }
170
+ },
171
+ render: function(e, r) {
172
+ var n = r.props, i = r.children, s = r.parent, o = r.data;
173
+ o.routerView = !0;
174
+ for (var a = s.$createElement, c = n.name, u = s.$route, d = s._routerViewCache || (s._routerViewCache = {}), m = 0, h = !1; s && s._routerRoot !== s; ) {
175
+ var v = s.$vnode ? s.$vnode.data : {};
176
+ v.routerView && m++, v.keepAlive && s._directInactive && s._inactive && (h = !0), s = s.$parent;
177
+ }
178
+ if (o.routerViewDepth = m, h) {
179
+ var p = d[c], l = p && p.component;
180
+ return l ? (p.configProps && Te(l, o, p.route, p.configProps), a(l, o, i)) : a();
181
+ }
182
+ var f = u.matched[m], g = f && f.components[c];
183
+ if (!f || !g)
184
+ return d[c] = null, a();
185
+ d[c] = { component: g }, o.registerRouteInstance = function(_, C) {
186
+ var R = f.instances[c];
187
+ (C && R !== _ || !C && R === _) && (f.instances[c] = C);
188
+ }, (o.hook || (o.hook = {})).prepatch = function(_, C) {
189
+ f.instances[c] = C.componentInstance;
190
+ }, o.hook.init = function(_) {
191
+ _.data.keepAlive && _.componentInstance && _.componentInstance !== f.instances[c] && (f.instances[c] = _.componentInstance), nt(u);
192
+ };
193
+ var b = f.props && f.props[c];
194
+ return b && (S(d[c], {
195
+ route: u,
196
+ configProps: b
197
+ }), Te(g, o, u, b)), a(g, o, i);
198
+ }
199
+ };
200
+ function Te(t, e, r, n) {
201
+ var i = e.props = er(r, n);
202
+ if (i) {
203
+ i = e.props = S({}, i);
204
+ var s = e.attrs = e.attrs || {};
205
+ for (var o in i)
206
+ (!t.props || !(o in t.props)) && (s[o] = i[o], delete i[o]);
207
+ }
208
+ }
209
+ function er(t, e) {
210
+ switch (typeof e) {
211
+ case "undefined":
212
+ return;
213
+ case "object":
214
+ return e;
215
+ case "function":
216
+ return e(t);
217
+ case "boolean":
218
+ return e ? t.params : void 0;
219
+ default:
220
+ process.env.NODE_ENV !== "production" && P(
221
+ !1,
222
+ 'props in "' + t.path + '" is a ' + typeof e + ", expecting an object, function or boolean."
223
+ );
224
+ }
225
+ }
226
+ function it(t, e, r) {
227
+ var n = t.charAt(0);
228
+ if (n === "/")
229
+ return t;
230
+ if (n === "?" || n === "#")
231
+ return e + t;
232
+ var i = e.split("/");
233
+ (!r || !i[i.length - 1]) && i.pop();
234
+ for (var s = t.replace(/^\//, "").split("/"), o = 0; o < s.length; o++) {
235
+ var a = s[o];
236
+ a === ".." ? i.pop() : a !== "." && i.push(a);
237
+ }
238
+ return i[0] !== "" && i.unshift(""), i.join("/");
239
+ }
240
+ function tr(t) {
241
+ var e = "", r = "", n = t.indexOf("#");
242
+ n >= 0 && (e = t.slice(n), t = t.slice(0, n));
243
+ var i = t.indexOf("?");
244
+ return i >= 0 && (r = t.slice(i + 1), t = t.slice(0, i)), {
245
+ path: t,
246
+ query: r,
247
+ hash: e
248
+ };
249
+ }
250
+ function O(t) {
251
+ return t.replace(/\/(?:\s*\/)+/g, "/");
252
+ }
253
+ var te = Array.isArray || function(t) {
254
+ return Object.prototype.toString.call(t) == "[object Array]";
255
+ }, U = at, rr = ye, nr = ar, ir = st, sr = ot, or = new RegExp([
256
+ // Match escaped characters that would otherwise appear in future matches.
257
+ // This allows the user to escape special characters that won't transform.
258
+ "(\\\\.)",
259
+ // Match Express-style parameters and un-named parameters with a prefix
260
+ // and optional suffixes. Matches appear as:
261
+ //
262
+ // "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
263
+ // "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
264
+ // "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
265
+ "([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
266
+ ].join("|"), "g");
267
+ function ye(t, e) {
268
+ for (var r = [], n = 0, i = 0, s = "", o = e && e.delimiter || "/", a; (a = or.exec(t)) != null; ) {
269
+ var c = a[0], u = a[1], d = a.index;
270
+ if (s += t.slice(i, d), i = d + c.length, u) {
271
+ s += u[1];
272
+ continue;
273
+ }
274
+ var m = t[i], h = a[2], v = a[3], p = a[4], l = a[5], f = a[6], g = a[7];
275
+ s && (r.push(s), s = "");
276
+ var b = h != null && m != null && m !== h, _ = f === "+" || f === "*", C = f === "?" || f === "*", R = a[2] || o, E = p || l;
277
+ r.push({
278
+ name: v || n++,
279
+ prefix: h || "",
280
+ delimiter: R,
281
+ optional: C,
282
+ repeat: _,
283
+ partial: b,
284
+ asterisk: !!g,
285
+ pattern: E ? lr(E) : g ? ".*" : "[^" + K(R) + "]+?"
286
+ });
287
+ }
288
+ return i < t.length && (s += t.substr(i)), s && r.push(s), r;
289
+ }
290
+ function ar(t, e) {
291
+ return st(ye(t, e), e);
292
+ }
293
+ function cr(t) {
294
+ return encodeURI(t).replace(/[\/?#]/g, function(e) {
295
+ return "%" + e.charCodeAt(0).toString(16).toUpperCase();
296
+ });
297
+ }
298
+ function ur(t) {
299
+ return encodeURI(t).replace(/[?#]/g, function(e) {
300
+ return "%" + e.charCodeAt(0).toString(16).toUpperCase();
301
+ });
302
+ }
303
+ function st(t, e) {
304
+ for (var r = new Array(t.length), n = 0; n < t.length; n++)
305
+ typeof t[n] == "object" && (r[n] = new RegExp("^(?:" + t[n].pattern + ")$", be(e)));
306
+ return function(i, s) {
307
+ for (var o = "", a = i || {}, c = s || {}, u = c.pretty ? cr : encodeURIComponent, d = 0; d < t.length; d++) {
308
+ var m = t[d];
309
+ if (typeof m == "string") {
310
+ o += m;
311
+ continue;
312
+ }
313
+ var h = a[m.name], v;
314
+ if (h == null)
315
+ if (m.optional) {
316
+ m.partial && (o += m.prefix);
317
+ continue;
318
+ } else
319
+ throw new TypeError('Expected "' + m.name + '" to be defined');
320
+ if (te(h)) {
321
+ if (!m.repeat)
322
+ throw new TypeError('Expected "' + m.name + '" to not repeat, but received `' + JSON.stringify(h) + "`");
323
+ if (h.length === 0) {
324
+ if (m.optional)
325
+ continue;
326
+ throw new TypeError('Expected "' + m.name + '" to not be empty');
327
+ }
328
+ for (var p = 0; p < h.length; p++) {
329
+ if (v = u(h[p]), !r[d].test(v))
330
+ throw new TypeError('Expected all "' + m.name + '" to match "' + m.pattern + '", but received `' + JSON.stringify(v) + "`");
331
+ o += (p === 0 ? m.prefix : m.delimiter) + v;
332
+ }
333
+ continue;
334
+ }
335
+ if (v = m.asterisk ? ur(h) : u(h), !r[d].test(v))
336
+ throw new TypeError('Expected "' + m.name + '" to match "' + m.pattern + '", but received "' + v + '"');
337
+ o += m.prefix + v;
338
+ }
339
+ return o;
340
+ };
341
+ }
342
+ function K(t) {
343
+ return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
344
+ }
345
+ function lr(t) {
346
+ return t.replace(/([=!:$\/()])/g, "\\$1");
347
+ }
348
+ function _e(t, e) {
349
+ return t.keys = e, t;
350
+ }
351
+ function be(t) {
352
+ return t && t.sensitive ? "" : "i";
353
+ }
354
+ function fr(t, e) {
355
+ var r = t.source.match(/\((?!\?)/g);
356
+ if (r)
357
+ for (var n = 0; n < r.length; n++)
358
+ e.push({
359
+ name: n,
360
+ prefix: null,
361
+ delimiter: null,
362
+ optional: !1,
363
+ repeat: !1,
364
+ partial: !1,
365
+ asterisk: !1,
366
+ pattern: null
367
+ });
368
+ return _e(t, e);
369
+ }
370
+ function hr(t, e, r) {
371
+ for (var n = [], i = 0; i < t.length; i++)
372
+ n.push(at(t[i], e, r).source);
373
+ var s = new RegExp("(?:" + n.join("|") + ")", be(r));
374
+ return _e(s, e);
375
+ }
376
+ function pr(t, e, r) {
377
+ return ot(ye(t, r), e, r);
378
+ }
379
+ function ot(t, e, r) {
380
+ te(e) || (r = /** @type {!Object} */
381
+ e || r, e = []), r = r || {};
382
+ for (var n = r.strict, i = r.end !== !1, s = "", o = 0; o < t.length; o++) {
383
+ var a = t[o];
384
+ if (typeof a == "string")
385
+ s += K(a);
386
+ else {
387
+ var c = K(a.prefix), u = "(?:" + a.pattern + ")";
388
+ e.push(a), a.repeat && (u += "(?:" + c + u + ")*"), a.optional ? a.partial ? u = c + "(" + u + ")?" : u = "(?:" + c + "(" + u + "))?" : u = c + "(" + u + ")", s += u;
389
+ }
390
+ }
391
+ var d = K(r.delimiter || "/"), m = s.slice(-d.length) === d;
392
+ return n || (s = (m ? s.slice(0, -d.length) : s) + "(?:" + d + "(?=$))?"), i ? s += "$" : s += n && m ? "" : "(?=" + d + "|$)", _e(new RegExp("^" + s, be(r)), e);
393
+ }
394
+ function at(t, e, r) {
395
+ return te(e) || (r = /** @type {!Object} */
396
+ e || r, e = []), r = r || {}, t instanceof RegExp ? fr(
397
+ t,
398
+ /** @type {!Array} */
399
+ e
400
+ ) : te(t) ? hr(
401
+ /** @type {!Array} */
402
+ t,
403
+ /** @type {!Array} */
404
+ e,
405
+ r
406
+ ) : pr(
407
+ /** @type {string} */
408
+ t,
409
+ /** @type {!Array} */
410
+ e,
411
+ r
412
+ );
413
+ }
414
+ U.parse = rr;
415
+ U.compile = nr;
416
+ U.tokensToFunction = ir;
417
+ U.tokensToRegExp = sr;
418
+ var Ae = /* @__PURE__ */ Object.create(null);
419
+ function Z(t, e, r) {
420
+ e = e || {};
421
+ try {
422
+ var n = Ae[t] || (Ae[t] = U.compile(t));
423
+ return typeof e.pathMatch == "string" && (e[0] = e.pathMatch), n(e, { pretty: !0 });
424
+ } catch (i) {
425
+ return process.env.NODE_ENV !== "production" && P(typeof e.pathMatch == "string", "missing param for " + r + ": " + i.message), "";
426
+ } finally {
427
+ delete e[0];
428
+ }
429
+ }
430
+ function we(t, e, r, n) {
431
+ var i = typeof t == "string" ? { path: t } : t;
432
+ if (i._normalized)
433
+ return i;
434
+ if (i.name) {
435
+ i = S({}, t);
436
+ var s = i.params;
437
+ return s && typeof s == "object" && (i.params = S({}, s)), i;
438
+ }
439
+ if (!i.path && i.params && e) {
440
+ i = S({}, i), i._normalized = !0;
441
+ var o = S(S({}, e.params), i.params);
442
+ if (e.name)
443
+ i.name = e.name, i.params = o;
444
+ else if (e.matched.length) {
445
+ var a = e.matched[e.matched.length - 1].path;
446
+ i.path = Z(a, o, "path " + e.path);
447
+ } else
448
+ process.env.NODE_ENV !== "production" && P(!1, "relative params navigation requires a current route.");
449
+ return i;
450
+ }
451
+ var c = tr(i.path || ""), u = e && e.path || "/", d = c.path ? it(c.path, u, r || i.append) : u, m = Gt(
452
+ c.query,
453
+ i.query,
454
+ n && n.options.parseQuery
455
+ ), h = i.hash || c.hash;
456
+ return h && h.charAt(0) !== "#" && (h = "#" + h), {
457
+ _normalized: !0,
458
+ path: d,
459
+ query: m,
460
+ hash: h
461
+ };
462
+ }
463
+ var dr = [String, Object], vr = [String, Array], Ie = function() {
464
+ }, qe, Ve, Be, Ce = {
465
+ name: "RouterLink",
466
+ props: {
467
+ to: {
468
+ type: dr,
469
+ required: !0
470
+ },
471
+ tag: {
472
+ type: String,
473
+ default: "a"
474
+ },
475
+ custom: Boolean,
476
+ exact: Boolean,
477
+ exactPath: Boolean,
478
+ append: Boolean,
479
+ replace: Boolean,
480
+ activeClass: String,
481
+ exactActiveClass: String,
482
+ ariaCurrentValue: {
483
+ type: String,
484
+ default: "page"
485
+ },
486
+ event: {
487
+ type: vr,
488
+ default: "click"
489
+ }
490
+ },
491
+ render: function(e) {
492
+ var r = this, n = this.$router, i = this.$route, s = n.resolve(
493
+ this.to,
494
+ i,
495
+ this.append
496
+ ), o = s.location, a = s.route, c = s.href, u = {}, d = n.options.linkActiveClass, m = n.options.linkExactActiveClass, h = d ?? "router-link-active", v = m ?? "router-link-exact-active", p = this.activeClass == null ? h : this.activeClass, l = this.exactActiveClass == null ? v : this.exactActiveClass, f = a.redirectedFrom ? ee(null, we(a.redirectedFrom), null, n) : a;
497
+ u[l] = rt(i, f, this.exactPath), u[p] = this.exact || this.exactPath ? u[l] : Jt(i, f);
498
+ var g = u[l] ? this.ariaCurrentValue : null, b = function(ue) {
499
+ je(ue) && (r.replace ? n.replace(o, Ie) : n.push(o, Ie));
500
+ }, _ = { click: je };
501
+ Array.isArray(this.event) ? this.event.forEach(function(ue) {
502
+ _[ue] = b;
503
+ }) : _[this.event] = b;
504
+ var C = { class: u }, R = !this.$scopedSlots.$hasNormal && this.$scopedSlots.default && this.$scopedSlots.default({
505
+ href: c,
506
+ route: a,
507
+ navigate: b,
508
+ isActive: u[p],
509
+ isExactActive: u[l]
510
+ });
511
+ if (R) {
512
+ if (process.env.NODE_ENV !== "production" && !this.custom && (!qe && P(!1, `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:
513
+ <router-link v-slot="{ navigate, href }" custom></router-link>
514
+ `), qe = !0), R.length === 1)
515
+ return R[0];
516
+ if (R.length > 1 || !R.length)
517
+ return process.env.NODE_ENV !== "production" && P(
518
+ !1,
519
+ '<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.`
520
+ ), R.length === 0 ? e() : e("span", {}, R);
521
+ }
522
+ if (process.env.NODE_ENV !== "production" && ("tag" in this.$options.propsData && !Ve && (P(
523
+ !1,
524
+ "<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."
525
+ ), Ve = !0), "event" in this.$options.propsData && !Be && (P(
526
+ !1,
527
+ "<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."
528
+ ), Be = !0)), this.tag === "a")
529
+ C.on = _, C.attrs = { href: c, "aria-current": g };
530
+ else {
531
+ var E = ct(this.$slots.default);
532
+ if (E) {
533
+ E.isStatic = !1;
534
+ var k = E.data = S({}, E.data);
535
+ k.on = k.on || {};
536
+ for (var L in k.on) {
537
+ var z = k.on[L];
538
+ L in _ && (k.on[L] = Array.isArray(z) ? z : [z]);
539
+ }
540
+ for (var H in _)
541
+ H in k.on ? k.on[H].push(_[H]) : k.on[H] = b;
542
+ var Ne = E.data.attrs = S({}, E.data.attrs);
543
+ Ne.href = c, Ne["aria-current"] = g;
544
+ } else
545
+ C.on = _;
546
+ }
547
+ return e(this.tag, C, this.$slots.default);
548
+ }
549
+ };
550
+ function je(t) {
551
+ if (!(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey) && !t.defaultPrevented && !(t.button !== void 0 && t.button !== 0)) {
552
+ if (t.currentTarget && t.currentTarget.getAttribute) {
553
+ var e = t.currentTarget.getAttribute("target");
554
+ if (/\b_blank\b/i.test(e))
555
+ return;
556
+ }
557
+ return t.preventDefault && t.preventDefault(), !0;
558
+ }
559
+ }
560
+ function ct(t) {
561
+ if (t) {
562
+ for (var e, r = 0; r < t.length; r++)
563
+ if (e = t[r], e.tag === "a" || e.children && (e = ct(e.children)))
564
+ return e;
565
+ }
566
+ }
567
+ var re;
568
+ function ne(t) {
569
+ if (!(ne.installed && re === t)) {
570
+ ne.installed = !0, re = t;
571
+ var e = function(i) {
572
+ return i !== void 0;
573
+ }, r = function(i, s) {
574
+ var o = i.$options._parentVnode;
575
+ e(o) && e(o = o.data) && e(o = o.registerRouteInstance) && o(i, s);
576
+ };
577
+ t.mixin({
578
+ beforeCreate: function() {
579
+ e(this.$options.router) ? (this._routerRoot = this, this._router = this.$options.router, this._router.init(this), t.util.defineReactive(this, "_route", this._router.history.current)) : this._routerRoot = this.$parent && this.$parent._routerRoot || this, r(this, this);
580
+ },
581
+ destroyed: function() {
582
+ r(this);
583
+ }
584
+ }), Object.defineProperty(t.prototype, "$router", {
585
+ get: function() {
586
+ return this._routerRoot._router;
587
+ }
588
+ }), Object.defineProperty(t.prototype, "$route", {
589
+ get: function() {
590
+ return this._routerRoot._route;
591
+ }
592
+ }), t.component("RouterView", Yt), t.component("RouterLink", Ce);
593
+ var n = t.config.optionMergeStrategies;
594
+ n.beforeRouteEnter = n.beforeRouteLeave = n.beforeRouteUpdate = n.created;
595
+ }
596
+ }
597
+ var W = typeof window < "u";
598
+ function G(t, e, r, n, i) {
599
+ var s = e || [], o = r || /* @__PURE__ */ Object.create(null), a = n || /* @__PURE__ */ Object.create(null);
600
+ t.forEach(function(h) {
601
+ pe(s, o, a, h, i);
602
+ });
603
+ for (var c = 0, u = s.length; c < u; c++)
604
+ s[c] === "*" && (s.push(s.splice(c, 1)[0]), u--, c--);
605
+ if (process.env.NODE_ENV === "development") {
606
+ var d = s.filter(function(h) {
607
+ return h && h.charAt(0) !== "*" && h.charAt(0) !== "/";
608
+ });
609
+ if (d.length > 0) {
610
+ var m = d.map(function(h) {
611
+ return "- " + h;
612
+ }).join(`
613
+ `);
614
+ P(!1, `Non-nested routes must include a leading slash character. Fix the following routes:
615
+ ` + m);
616
+ }
617
+ }
618
+ return {
619
+ pathList: s,
620
+ pathMap: o,
621
+ nameMap: a
622
+ };
623
+ }
624
+ function pe(t, e, r, n, i, s) {
625
+ var o = n.path, a = n.name;
626
+ process.env.NODE_ENV !== "production" && (q(o != null, '"path" is required in a route configuration.'), q(
627
+ typeof n.component != "string",
628
+ 'route config "component" for path: ' + String(
629
+ o || a
630
+ ) + " cannot be a string id. Use an actual component instead."
631
+ ), P(
632
+ // eslint-disable-next-line no-control-regex
633
+ !/[^\u0000-\u007F]+/.test(o),
634
+ 'Route with path "' + o + '" 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.'
635
+ ));
636
+ var c = n.pathToRegexpOptions || {}, u = gr(o, i, c.strict);
637
+ typeof n.caseSensitive == "boolean" && (c.sensitive = n.caseSensitive);
638
+ var d = {
639
+ path: u,
640
+ regex: mr(u, c),
641
+ components: n.components || { default: n.component },
642
+ alias: n.alias ? typeof n.alias == "string" ? [n.alias] : n.alias : [],
643
+ instances: {},
644
+ enteredCbs: {},
645
+ name: a,
646
+ parent: i,
647
+ matchAs: s,
648
+ redirect: n.redirect,
649
+ beforeEnter: n.beforeEnter,
650
+ meta: n.meta || {},
651
+ props: n.props == null ? {} : n.components ? n.props : { default: n.props }
652
+ };
653
+ if (n.children && (process.env.NODE_ENV !== "production" && n.name && !n.redirect && n.children.some(function(l) {
654
+ return /^\/?$/.test(l.path);
655
+ }) && P(
656
+ !1,
657
+ "Named Route '" + n.name + `' has a default child route. When navigating to this named route (:to="{name: '` + n.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.`
658
+ ), n.children.forEach(function(l) {
659
+ var f = s ? O(s + "/" + l.path) : void 0;
660
+ pe(t, e, r, l, d, f);
661
+ })), e[d.path] || (t.push(d.path), e[d.path] = d), n.alias !== void 0)
662
+ for (var m = Array.isArray(n.alias) ? n.alias : [n.alias], h = 0; h < m.length; ++h) {
663
+ var v = m[h];
664
+ if (process.env.NODE_ENV !== "production" && v === o) {
665
+ P(
666
+ !1,
667
+ 'Found an alias with the same value as the path: "' + o + '". You have to remove that alias. It will be ignored in development.'
668
+ );
669
+ continue;
670
+ }
671
+ var p = {
672
+ path: v,
673
+ children: n.children
674
+ };
675
+ pe(
676
+ t,
677
+ e,
678
+ r,
679
+ p,
680
+ i,
681
+ d.path || "/"
682
+ // matchAs
683
+ );
684
+ }
685
+ a && (r[a] ? process.env.NODE_ENV !== "production" && !s && P(
686
+ !1,
687
+ 'Duplicate named routes definition: { name: "' + a + '", path: "' + d.path + '" }'
688
+ ) : r[a] = d);
689
+ }
690
+ function mr(t, e) {
691
+ var r = U(t, [], e);
692
+ if (process.env.NODE_ENV !== "production") {
693
+ var n = /* @__PURE__ */ Object.create(null);
694
+ r.keys.forEach(function(i) {
695
+ P(
696
+ !n[i.name],
697
+ 'Duplicate param keys in route with path: "' + t + '"'
698
+ ), n[i.name] = !0;
699
+ });
700
+ }
701
+ return r;
702
+ }
703
+ function gr(t, e, r) {
704
+ return r || (t = t.replace(/\/$/, "")), t[0] === "/" || e == null ? t : O(e.path + "/" + t);
705
+ }
706
+ function yr(t, e) {
707
+ var r = G(t), n = r.pathList, i = r.pathMap, s = r.nameMap;
708
+ function o(v) {
709
+ G(v, n, i, s);
710
+ }
711
+ function a(v, p) {
712
+ var l = typeof v != "object" ? s[v] : void 0;
713
+ G([p || v], n, i, s, l), l && l.alias.length && G(
714
+ // $flow-disable-line route is defined if parent is
715
+ l.alias.map(function(f) {
716
+ return { path: f, children: [p] };
717
+ }),
718
+ n,
719
+ i,
720
+ s,
721
+ l
722
+ );
723
+ }
724
+ function c() {
725
+ return n.map(function(v) {
726
+ return i[v];
727
+ });
728
+ }
729
+ function u(v, p, l) {
730
+ var f = we(v, p, !1, e), g = f.name;
731
+ if (g) {
732
+ var b = s[g];
733
+ if (process.env.NODE_ENV !== "production" && P(b, "Route with name '" + g + "' does not exist"), !b)
734
+ return h(null, f);
735
+ var _ = b.regex.keys.filter(function(L) {
736
+ return !L.optional;
737
+ }).map(function(L) {
738
+ return L.name;
739
+ });
740
+ if (typeof f.params != "object" && (f.params = {}), p && typeof p.params == "object")
741
+ for (var C in p.params)
742
+ !(C in f.params) && _.indexOf(C) > -1 && (f.params[C] = p.params[C]);
743
+ return f.path = Z(b.path, f.params, 'named route "' + g + '"'), h(b, f, l);
744
+ } else if (f.path) {
745
+ f.params = {};
746
+ for (var R = 0; R < n.length; R++) {
747
+ var E = n[R], k = i[E];
748
+ if (_r(k.regex, f.path, f.params))
749
+ return h(k, f, l);
750
+ }
751
+ }
752
+ return h(null, f);
753
+ }
754
+ function d(v, p) {
755
+ var l = v.redirect, f = typeof l == "function" ? l(ee(v, p, null, e)) : l;
756
+ if (typeof f == "string" && (f = { path: f }), !f || typeof f != "object")
757
+ return process.env.NODE_ENV !== "production" && P(
758
+ !1,
759
+ "invalid redirect option: " + JSON.stringify(f)
760
+ ), h(null, p);
761
+ var g = f, b = g.name, _ = g.path, C = p.query, R = p.hash, E = p.params;
762
+ if (C = g.hasOwnProperty("query") ? g.query : C, R = g.hasOwnProperty("hash") ? g.hash : R, E = g.hasOwnProperty("params") ? g.params : E, b) {
763
+ var k = s[b];
764
+ return process.env.NODE_ENV !== "production" && q(k, 'redirect failed: named route "' + b + '" not found.'), u({
765
+ _normalized: !0,
766
+ name: b,
767
+ query: C,
768
+ hash: R,
769
+ params: E
770
+ }, void 0, p);
771
+ } else if (_) {
772
+ var L = br(_, v), z = Z(L, E, 'redirect route with path "' + L + '"');
773
+ return u({
774
+ _normalized: !0,
775
+ path: z,
776
+ query: C,
777
+ hash: R
778
+ }, void 0, p);
779
+ } else
780
+ return process.env.NODE_ENV !== "production" && P(!1, "invalid redirect option: " + JSON.stringify(f)), h(null, p);
781
+ }
782
+ function m(v, p, l) {
783
+ var f = Z(l, p.params, 'aliased route with path "' + l + '"'), g = u({
784
+ _normalized: !0,
785
+ path: f
786
+ });
787
+ if (g) {
788
+ var b = g.matched, _ = b[b.length - 1];
789
+ return p.params = g.params, h(_, p);
790
+ }
791
+ return h(null, p);
792
+ }
793
+ function h(v, p, l) {
794
+ return v && v.redirect ? d(v, l || p) : v && v.matchAs ? m(v, p, v.matchAs) : ee(v, p, l, e);
795
+ }
796
+ return {
797
+ match: u,
798
+ addRoute: a,
799
+ getRoutes: c,
800
+ addRoutes: o
801
+ };
802
+ }
803
+ function _r(t, e, r) {
804
+ var n = e.match(t);
805
+ if (n) {
806
+ if (!r)
807
+ return !0;
808
+ } else
809
+ return !1;
810
+ for (var i = 1, s = n.length; i < s; ++i) {
811
+ var o = t.keys[i - 1];
812
+ o && (r[o.name || "pathMatch"] = typeof n[i] == "string" ? fe(n[i]) : n[i]);
813
+ }
814
+ return !0;
815
+ }
816
+ function br(t, e) {
817
+ return it(t, e.parent ? e.parent.path : "/", !0);
818
+ }
819
+ var wr = W && window.performance && window.performance.now ? window.performance : Date;
820
+ function ut() {
821
+ return wr.now().toFixed(3);
822
+ }
823
+ var lt = ut();
824
+ function oe() {
825
+ return lt;
826
+ }
827
+ function ft(t) {
828
+ return lt = t;
829
+ }
830
+ var ht = /* @__PURE__ */ Object.create(null);
831
+ function pt() {
832
+ "scrollRestoration" in window.history && (window.history.scrollRestoration = "manual");
833
+ var t = window.location.protocol + "//" + window.location.host, e = window.location.href.replace(t, ""), r = S({}, window.history.state);
834
+ return r.key = oe(), window.history.replaceState(r, "", e), window.addEventListener("popstate", Me), function() {
835
+ window.removeEventListener("popstate", Me);
836
+ };
837
+ }
838
+ function T(t, e, r, n) {
839
+ if (t.app) {
840
+ var i = t.options.scrollBehavior;
841
+ i && (process.env.NODE_ENV !== "production" && q(typeof i == "function", "scrollBehavior must be a function"), t.app.$nextTick(function() {
842
+ var s = Cr(), o = i.call(
843
+ t,
844
+ e,
845
+ r,
846
+ n ? s : null
847
+ );
848
+ o && (typeof o.then == "function" ? o.then(function(a) {
849
+ De(a, s);
850
+ }).catch(function(a) {
851
+ process.env.NODE_ENV !== "production" && q(!1, a.toString());
852
+ }) : De(o, s));
853
+ }));
854
+ }
855
+ }
856
+ function dt() {
857
+ var t = oe();
858
+ t && (ht[t] = {
859
+ x: window.pageXOffset,
860
+ y: window.pageYOffset
861
+ });
862
+ }
863
+ function Me(t) {
864
+ dt(), t.state && t.state.key && ft(t.state.key);
865
+ }
866
+ function Cr() {
867
+ var t = oe();
868
+ if (t)
869
+ return ht[t];
870
+ }
871
+ function Rr(t, e) {
872
+ var r = document.documentElement, n = r.getBoundingClientRect(), i = t.getBoundingClientRect();
873
+ return {
874
+ x: i.left - n.left - e.x,
875
+ y: i.top - n.top - e.y
876
+ };
877
+ }
878
+ function Ue(t) {
879
+ return M(t.x) || M(t.y);
880
+ }
881
+ function ze(t) {
882
+ return {
883
+ x: M(t.x) ? t.x : window.pageXOffset,
884
+ y: M(t.y) ? t.y : window.pageYOffset
885
+ };
886
+ }
887
+ function Pr(t) {
888
+ return {
889
+ x: M(t.x) ? t.x : 0,
890
+ y: M(t.y) ? t.y : 0
891
+ };
892
+ }
893
+ function M(t) {
894
+ return typeof t == "number";
895
+ }
896
+ var Er = /^#\d/;
897
+ function De(t, e) {
898
+ var r = typeof t == "object";
899
+ if (r && typeof t.selector == "string") {
900
+ var n = Er.test(t.selector) ? document.getElementById(t.selector.slice(1)) : document.querySelector(t.selector);
901
+ if (n) {
902
+ var i = t.offset && typeof t.offset == "object" ? t.offset : {};
903
+ i = Pr(i), e = Rr(n, i);
904
+ } else
905
+ Ue(t) && (e = ze(t));
906
+ } else
907
+ r && Ue(t) && (e = ze(t));
908
+ e && ("scrollBehavior" in document.documentElement.style ? window.scrollTo({
909
+ left: e.x,
910
+ top: e.y,
911
+ // $flow-disable-line
912
+ behavior: t.behavior
913
+ }) : window.scrollTo(e.x, e.y));
914
+ }
915
+ var A = W && function() {
916
+ var t = window.navigator.userAgent;
917
+ return (t.indexOf("Android 2.") !== -1 || t.indexOf("Android 4.0") !== -1) && t.indexOf("Mobile Safari") !== -1 && t.indexOf("Chrome") === -1 && t.indexOf("Windows Phone") === -1 ? !1 : window.history && typeof window.history.pushState == "function";
918
+ }();
919
+ function ie(t, e) {
920
+ dt();
921
+ var r = window.history;
922
+ try {
923
+ if (e) {
924
+ var n = S({}, r.state);
925
+ n.key = oe(), r.replaceState(n, "", t);
926
+ } else
927
+ r.pushState({ key: ft(ut()) }, "", t);
928
+ } catch {
929
+ window.location[e ? "replace" : "assign"](t);
930
+ }
931
+ }
932
+ function de(t) {
933
+ ie(t, !0);
934
+ }
935
+ var V = {
936
+ redirected: 2,
937
+ aborted: 4,
938
+ cancelled: 8,
939
+ duplicated: 16
940
+ };
941
+ function kr(t, e) {
942
+ return ae(
943
+ t,
944
+ e,
945
+ V.redirected,
946
+ 'Redirected when going from "' + t.fullPath + '" to "' + Lr(
947
+ e
948
+ ) + '" via a navigation guard.'
949
+ );
950
+ }
951
+ function Sr(t, e) {
952
+ var r = ae(
953
+ t,
954
+ e,
955
+ V.duplicated,
956
+ 'Avoided redundant navigation to current location: "' + t.fullPath + '".'
957
+ );
958
+ return r.name = "NavigationDuplicated", r;
959
+ }
960
+ function Fe(t, e) {
961
+ return ae(
962
+ t,
963
+ e,
964
+ V.cancelled,
965
+ 'Navigation cancelled from "' + t.fullPath + '" to "' + e.fullPath + '" with a new navigation.'
966
+ );
967
+ }
968
+ function xr(t, e) {
969
+ return ae(
970
+ t,
971
+ e,
972
+ V.aborted,
973
+ 'Navigation aborted from "' + t.fullPath + '" to "' + e.fullPath + '" via a navigation guard.'
974
+ );
975
+ }
976
+ function ae(t, e, r, n) {
977
+ var i = new Error(n);
978
+ return i._isRouter = !0, i.from = t, i.to = e, i.type = r, i;
979
+ }
980
+ var Nr = ["params", "query", "hash"];
981
+ function Lr(t) {
982
+ if (typeof t == "string")
983
+ return t;
984
+ if ("path" in t)
985
+ return t.path;
986
+ var e = {};
987
+ return Nr.forEach(function(r) {
988
+ r in t && (e[r] = t[r]);
989
+ }), JSON.stringify(e, null, 2);
990
+ }
991
+ function se(t) {
992
+ return Object.prototype.toString.call(t).indexOf("Error") > -1;
993
+ }
994
+ function ce(t, e) {
995
+ return se(t) && t._isRouter && (e == null || t.type === e);
996
+ }
997
+ function We(t, e, r) {
998
+ var n = function(i) {
999
+ i >= t.length ? r() : t[i] ? e(t[i], function() {
1000
+ n(i + 1);
1001
+ }) : n(i + 1);
1002
+ };
1003
+ n(0);
1004
+ }
1005
+ function $r(t) {
1006
+ return function(e, r, n) {
1007
+ var i = !1, s = 0, o = null;
1008
+ vt(t, function(a, c, u, d) {
1009
+ if (typeof a == "function" && a.cid === void 0) {
1010
+ i = !0, s++;
1011
+ var m = He(function(l) {
1012
+ Tr(l) && (l = l.default), a.resolved = typeof l == "function" ? l : re.extend(l), u.components[d] = l, s--, s <= 0 && n();
1013
+ }), h = He(function(l) {
1014
+ var f = "Failed to resolve async component " + d + ": " + l;
1015
+ process.env.NODE_ENV !== "production" && P(!1, f), o || (o = se(l) ? l : new Error(f), n(o));
1016
+ }), v;
1017
+ try {
1018
+ v = a(m, h);
1019
+ } catch (l) {
1020
+ h(l);
1021
+ }
1022
+ if (v)
1023
+ if (typeof v.then == "function")
1024
+ v.then(m, h);
1025
+ else {
1026
+ var p = v.component;
1027
+ p && typeof p.then == "function" && p.then(m, h);
1028
+ }
1029
+ }
1030
+ }), i || n();
1031
+ };
1032
+ }
1033
+ function vt(t, e) {
1034
+ return mt(t.map(function(r) {
1035
+ return Object.keys(r.components).map(function(n) {
1036
+ return e(
1037
+ r.components[n],
1038
+ r.instances[n],
1039
+ r,
1040
+ n
1041
+ );
1042
+ });
1043
+ }));
1044
+ }
1045
+ function mt(t) {
1046
+ return Array.prototype.concat.apply([], t);
1047
+ }
1048
+ var Or = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
1049
+ function Tr(t) {
1050
+ return t.__esModule || Or && t[Symbol.toStringTag] === "Module";
1051
+ }
1052
+ function He(t) {
1053
+ var e = !1;
1054
+ return function() {
1055
+ for (var r = [], n = arguments.length; n--; )
1056
+ r[n] = arguments[n];
1057
+ if (!e)
1058
+ return e = !0, t.apply(this, r);
1059
+ };
1060
+ }
1061
+ var N = function(e, r) {
1062
+ this.router = e, this.base = Ar(r), this.current = I, this.pending = null, this.ready = !1, this.readyCbs = [], this.readyErrorCbs = [], this.errorCbs = [], this.listeners = [];
1063
+ };
1064
+ N.prototype.listen = function(e) {
1065
+ this.cb = e;
1066
+ };
1067
+ N.prototype.onReady = function(e, r) {
1068
+ this.ready ? e() : (this.readyCbs.push(e), r && this.readyErrorCbs.push(r));
1069
+ };
1070
+ N.prototype.onError = function(e) {
1071
+ this.errorCbs.push(e);
1072
+ };
1073
+ N.prototype.transitionTo = function(e, r, n) {
1074
+ var i = this, s;
1075
+ try {
1076
+ s = this.router.match(e, this.current);
1077
+ } catch (a) {
1078
+ throw this.errorCbs.forEach(function(c) {
1079
+ c(a);
1080
+ }), a;
1081
+ }
1082
+ var o = this.current;
1083
+ this.confirmTransition(
1084
+ s,
1085
+ function() {
1086
+ i.updateRoute(s), r && r(s), i.ensureURL(), i.router.afterHooks.forEach(function(a) {
1087
+ a && a(s, o);
1088
+ }), i.ready || (i.ready = !0, i.readyCbs.forEach(function(a) {
1089
+ a(s);
1090
+ }));
1091
+ },
1092
+ function(a) {
1093
+ n && n(a), a && !i.ready && (!ce(a, V.redirected) || o !== I) && (i.ready = !0, i.readyErrorCbs.forEach(function(c) {
1094
+ c(a);
1095
+ }));
1096
+ }
1097
+ );
1098
+ };
1099
+ N.prototype.confirmTransition = function(e, r, n) {
1100
+ var i = this, s = this.current;
1101
+ this.pending = e;
1102
+ var o = function(l) {
1103
+ !ce(l) && se(l) && (i.errorCbs.length ? i.errorCbs.forEach(function(f) {
1104
+ f(l);
1105
+ }) : (process.env.NODE_ENV !== "production" && P(!1, "uncaught error during route navigation:"), console.error(l))), n && n(l);
1106
+ }, a = e.matched.length - 1, c = s.matched.length - 1;
1107
+ if (rt(e, s) && // in the case the route map has been dynamically appended to
1108
+ a === c && e.matched[a] === s.matched[c])
1109
+ return this.ensureURL(), e.hash && T(this.router, s, e, !1), o(Sr(s, e));
1110
+ var u = Ir(
1111
+ this.current.matched,
1112
+ e.matched
1113
+ ), d = u.updated, m = u.deactivated, h = u.activated, v = [].concat(
1114
+ // in-component leave guards
1115
+ Vr(m),
1116
+ // global before hooks
1117
+ this.router.beforeHooks,
1118
+ // in-component update hooks
1119
+ Br(d),
1120
+ // in-config enter guards
1121
+ h.map(function(l) {
1122
+ return l.beforeEnter;
1123
+ }),
1124
+ // async components
1125
+ $r(h)
1126
+ ), p = function(l, f) {
1127
+ if (i.pending !== e)
1128
+ return o(Fe(s, e));
1129
+ try {
1130
+ l(e, s, function(g) {
1131
+ g === !1 ? (i.ensureURL(!0), o(xr(s, e))) : se(g) ? (i.ensureURL(!0), o(g)) : typeof g == "string" || typeof g == "object" && (typeof g.path == "string" || typeof g.name == "string") ? (o(kr(s, e)), typeof g == "object" && g.replace ? i.replace(g) : i.push(g)) : f(g);
1132
+ });
1133
+ } catch (g) {
1134
+ o(g);
1135
+ }
1136
+ };
1137
+ We(v, p, function() {
1138
+ var l = jr(h), f = l.concat(i.router.resolveHooks);
1139
+ We(f, p, function() {
1140
+ if (i.pending !== e)
1141
+ return o(Fe(s, e));
1142
+ i.pending = null, r(e), i.router.app && i.router.app.$nextTick(function() {
1143
+ nt(e);
1144
+ });
1145
+ });
1146
+ });
1147
+ };
1148
+ N.prototype.updateRoute = function(e) {
1149
+ this.current = e, this.cb && this.cb(e);
1150
+ };
1151
+ N.prototype.setupListeners = function() {
1152
+ };
1153
+ N.prototype.teardown = function() {
1154
+ this.listeners.forEach(function(e) {
1155
+ e();
1156
+ }), this.listeners = [], this.current = I, this.pending = null;
1157
+ };
1158
+ function Ar(t) {
1159
+ if (!t)
1160
+ if (W) {
1161
+ var e = document.querySelector("base");
1162
+ t = e && e.getAttribute("href") || "/", t = t.replace(/^https?:\/\/[^\/]+/, "");
1163
+ } else
1164
+ t = "/";
1165
+ return t.charAt(0) !== "/" && (t = "/" + t), t.replace(/\/$/, "");
1166
+ }
1167
+ function Ir(t, e) {
1168
+ var r, n = Math.max(t.length, e.length);
1169
+ for (r = 0; r < n && t[r] === e[r]; r++)
1170
+ ;
1171
+ return {
1172
+ updated: e.slice(0, r),
1173
+ activated: e.slice(r),
1174
+ deactivated: t.slice(r)
1175
+ };
1176
+ }
1177
+ function Re(t, e, r, n) {
1178
+ var i = vt(t, function(s, o, a, c) {
1179
+ var u = qr(s, e);
1180
+ if (u)
1181
+ return Array.isArray(u) ? u.map(function(d) {
1182
+ return r(d, o, a, c);
1183
+ }) : r(u, o, a, c);
1184
+ });
1185
+ return mt(n ? i.reverse() : i);
1186
+ }
1187
+ function qr(t, e) {
1188
+ return typeof t != "function" && (t = re.extend(t)), t.options[e];
1189
+ }
1190
+ function Vr(t) {
1191
+ return Re(t, "beforeRouteLeave", gt, !0);
1192
+ }
1193
+ function Br(t) {
1194
+ return Re(t, "beforeRouteUpdate", gt);
1195
+ }
1196
+ function gt(t, e) {
1197
+ if (e)
1198
+ return function() {
1199
+ return t.apply(e, arguments);
1200
+ };
1201
+ }
1202
+ function jr(t) {
1203
+ return Re(
1204
+ t,
1205
+ "beforeRouteEnter",
1206
+ function(e, r, n, i) {
1207
+ return Mr(e, n, i);
1208
+ }
1209
+ );
1210
+ }
1211
+ function Mr(t, e, r) {
1212
+ return function(i, s, o) {
1213
+ return t(i, s, function(a) {
1214
+ typeof a == "function" && (e.enteredCbs[r] || (e.enteredCbs[r] = []), e.enteredCbs[r].push(a)), o(a);
1215
+ });
1216
+ };
1217
+ }
1218
+ var yt = /* @__PURE__ */ function(t) {
1219
+ function e(r, n) {
1220
+ t.call(this, r, n), this._startLocation = F(this.base);
1221
+ }
1222
+ return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.setupListeners = function() {
1223
+ var n = this;
1224
+ if (!(this.listeners.length > 0)) {
1225
+ var i = this.router, s = i.options.scrollBehavior, o = A && s;
1226
+ o && this.listeners.push(pt());
1227
+ var a = function() {
1228
+ var c = n.current, u = F(n.base);
1229
+ n.current === I && u === n._startLocation || n.transitionTo(u, function(d) {
1230
+ o && T(i, d, c, !0);
1231
+ });
1232
+ };
1233
+ window.addEventListener("popstate", a), this.listeners.push(function() {
1234
+ window.removeEventListener("popstate", a);
1235
+ });
1236
+ }
1237
+ }, e.prototype.go = function(n) {
1238
+ window.history.go(n);
1239
+ }, e.prototype.push = function(n, i, s) {
1240
+ var o = this, a = this, c = a.current;
1241
+ this.transitionTo(n, function(u) {
1242
+ ie(O(o.base + u.fullPath)), T(o.router, u, c, !1), i && i(u);
1243
+ }, s);
1244
+ }, e.prototype.replace = function(n, i, s) {
1245
+ var o = this, a = this, c = a.current;
1246
+ this.transitionTo(n, function(u) {
1247
+ de(O(o.base + u.fullPath)), T(o.router, u, c, !1), i && i(u);
1248
+ }, s);
1249
+ }, e.prototype.ensureURL = function(n) {
1250
+ if (F(this.base) !== this.current.fullPath) {
1251
+ var i = O(this.base + this.current.fullPath);
1252
+ n ? ie(i) : de(i);
1253
+ }
1254
+ }, e.prototype.getCurrentLocation = function() {
1255
+ return F(this.base);
1256
+ }, e;
1257
+ }(N);
1258
+ function F(t) {
1259
+ var e = window.location.pathname, r = e.toLowerCase(), n = t.toLowerCase();
1260
+ return t && (r === n || r.indexOf(O(n + "/")) === 0) && (e = e.slice(t.length)), (e || "/") + window.location.search + window.location.hash;
1261
+ }
1262
+ var _t = /* @__PURE__ */ function(t) {
1263
+ function e(r, n, i) {
1264
+ t.call(this, r, n), !(i && Ur(this.base)) && Ge();
1265
+ }
1266
+ return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.setupListeners = function() {
1267
+ var n = this;
1268
+ if (!(this.listeners.length > 0)) {
1269
+ var i = this.router, s = i.options.scrollBehavior, o = A && s;
1270
+ o && this.listeners.push(pt());
1271
+ var a = function() {
1272
+ var u = n.current;
1273
+ Ge() && n.transitionTo(J(), function(d) {
1274
+ o && T(n.router, d, u, !0), A || X(d.fullPath);
1275
+ });
1276
+ }, c = A ? "popstate" : "hashchange";
1277
+ window.addEventListener(
1278
+ c,
1279
+ a
1280
+ ), this.listeners.push(function() {
1281
+ window.removeEventListener(c, a);
1282
+ });
1283
+ }
1284
+ }, e.prototype.push = function(n, i, s) {
1285
+ var o = this, a = this, c = a.current;
1286
+ this.transitionTo(
1287
+ n,
1288
+ function(u) {
1289
+ Qe(u.fullPath), T(o.router, u, c, !1), i && i(u);
1290
+ },
1291
+ s
1292
+ );
1293
+ }, e.prototype.replace = function(n, i, s) {
1294
+ var o = this, a = this, c = a.current;
1295
+ this.transitionTo(
1296
+ n,
1297
+ function(u) {
1298
+ X(u.fullPath), T(o.router, u, c, !1), i && i(u);
1299
+ },
1300
+ s
1301
+ );
1302
+ }, e.prototype.go = function(n) {
1303
+ window.history.go(n);
1304
+ }, e.prototype.ensureURL = function(n) {
1305
+ var i = this.current.fullPath;
1306
+ J() !== i && (n ? Qe(i) : X(i));
1307
+ }, e.prototype.getCurrentLocation = function() {
1308
+ return J();
1309
+ }, e;
1310
+ }(N);
1311
+ function Ur(t) {
1312
+ var e = F(t);
1313
+ if (!/^\/#/.test(e))
1314
+ return window.location.replace(O(t + "/#" + e)), !0;
1315
+ }
1316
+ function Ge() {
1317
+ var t = J();
1318
+ return t.charAt(0) === "/" ? !0 : (X("/" + t), !1);
1319
+ }
1320
+ function J() {
1321
+ var t = window.location.href, e = t.indexOf("#");
1322
+ return e < 0 ? "" : (t = t.slice(e + 1), t);
1323
+ }
1324
+ function ve(t) {
1325
+ var e = window.location.href, r = e.indexOf("#"), n = r >= 0 ? e.slice(0, r) : e;
1326
+ return n + "#" + t;
1327
+ }
1328
+ function Qe(t) {
1329
+ A ? ie(ve(t)) : window.location.hash = t;
1330
+ }
1331
+ function X(t) {
1332
+ A ? de(ve(t)) : window.location.replace(ve(t));
1333
+ }
1334
+ var zr = /* @__PURE__ */ function(t) {
1335
+ function e(r, n) {
1336
+ t.call(this, r, n), this.stack = [], this.index = -1;
1337
+ }
1338
+ return t && (e.__proto__ = t), e.prototype = Object.create(t && t.prototype), e.prototype.constructor = e, e.prototype.push = function(n, i, s) {
1339
+ var o = this;
1340
+ this.transitionTo(
1341
+ n,
1342
+ function(a) {
1343
+ o.stack = o.stack.slice(0, o.index + 1).concat(a), o.index++, i && i(a);
1344
+ },
1345
+ s
1346
+ );
1347
+ }, e.prototype.replace = function(n, i, s) {
1348
+ var o = this;
1349
+ this.transitionTo(
1350
+ n,
1351
+ function(a) {
1352
+ o.stack = o.stack.slice(0, o.index).concat(a), i && i(a);
1353
+ },
1354
+ s
1355
+ );
1356
+ }, e.prototype.go = function(n) {
1357
+ var i = this, s = this.index + n;
1358
+ if (!(s < 0 || s >= this.stack.length)) {
1359
+ var o = this.stack[s];
1360
+ this.confirmTransition(
1361
+ o,
1362
+ function() {
1363
+ var a = i.current;
1364
+ i.index = s, i.updateRoute(o), i.router.afterHooks.forEach(function(c) {
1365
+ c && c(o, a);
1366
+ });
1367
+ },
1368
+ function(a) {
1369
+ ce(a, V.duplicated) && (i.index = s);
1370
+ }
1371
+ );
1372
+ }
1373
+ }, e.prototype.getCurrentLocation = function() {
1374
+ var n = this.stack[this.stack.length - 1];
1375
+ return n ? n.fullPath : "/";
1376
+ }, e.prototype.ensureURL = function() {
1377
+ }, e;
1378
+ }(N), w = function t(e) {
1379
+ e === void 0 && (e = {}), process.env.NODE_ENV !== "production" && P(this instanceof t, "Router must be called with the new operator."), this.app = null, this.apps = [], this.options = e, this.beforeHooks = [], this.resolveHooks = [], this.afterHooks = [], this.matcher = yr(e.routes || [], this);
1380
+ var r = e.mode || "hash";
1381
+ switch (this.fallback = r === "history" && !A && e.fallback !== !1, this.fallback && (r = "hash"), W || (r = "abstract"), this.mode = r, r) {
1382
+ case "history":
1383
+ this.history = new yt(this, e.base);
1384
+ break;
1385
+ case "hash":
1386
+ this.history = new _t(this, e.base, this.fallback);
1387
+ break;
1388
+ case "abstract":
1389
+ this.history = new zr(this, e.base);
1390
+ break;
1391
+ default:
1392
+ process.env.NODE_ENV !== "production" && q(!1, "invalid mode: " + r);
1393
+ }
1394
+ }, bt = { currentRoute: { configurable: !0 } };
1395
+ w.prototype.match = function(e, r, n) {
1396
+ return this.matcher.match(e, r, n);
1397
+ };
1398
+ bt.currentRoute.get = function() {
1399
+ return this.history && this.history.current;
1400
+ };
1401
+ w.prototype.init = function(e) {
1402
+ var r = this;
1403
+ if (process.env.NODE_ENV !== "production" && q(
1404
+ ne.installed,
1405
+ "not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."
1406
+ ), this.apps.push(e), e.$once("hook:destroyed", function() {
1407
+ var o = r.apps.indexOf(e);
1408
+ o > -1 && r.apps.splice(o, 1), r.app === e && (r.app = r.apps[0] || null), r.app || r.history.teardown();
1409
+ }), !this.app) {
1410
+ this.app = e;
1411
+ var n = this.history;
1412
+ if (n instanceof yt || n instanceof _t) {
1413
+ var i = function(o) {
1414
+ var a = n.current, c = r.options.scrollBehavior, u = A && c;
1415
+ u && "fullPath" in o && T(r, o, a, !1);
1416
+ }, s = function(o) {
1417
+ n.setupListeners(), i(o);
1418
+ };
1419
+ n.transitionTo(
1420
+ n.getCurrentLocation(),
1421
+ s,
1422
+ s
1423
+ );
1424
+ }
1425
+ n.listen(function(o) {
1426
+ r.apps.forEach(function(a) {
1427
+ a._route = o;
1428
+ });
1429
+ });
1430
+ }
1431
+ };
1432
+ w.prototype.beforeEach = function(e) {
1433
+ return Pe(this.beforeHooks, e);
1434
+ };
1435
+ w.prototype.beforeResolve = function(e) {
1436
+ return Pe(this.resolveHooks, e);
1437
+ };
1438
+ w.prototype.afterEach = function(e) {
1439
+ return Pe(this.afterHooks, e);
1440
+ };
1441
+ w.prototype.onReady = function(e, r) {
1442
+ this.history.onReady(e, r);
1443
+ };
1444
+ w.prototype.onError = function(e) {
1445
+ this.history.onError(e);
1446
+ };
1447
+ w.prototype.push = function(e, r, n) {
1448
+ var i = this;
1449
+ if (!r && !n && typeof Promise < "u")
1450
+ return new Promise(function(s, o) {
1451
+ i.history.push(e, s, o);
1452
+ });
1453
+ this.history.push(e, r, n);
1454
+ };
1455
+ w.prototype.replace = function(e, r, n) {
1456
+ var i = this;
1457
+ if (!r && !n && typeof Promise < "u")
1458
+ return new Promise(function(s, o) {
1459
+ i.history.replace(e, s, o);
1460
+ });
1461
+ this.history.replace(e, r, n);
1462
+ };
1463
+ w.prototype.go = function(e) {
1464
+ this.history.go(e);
1465
+ };
1466
+ w.prototype.back = function() {
1467
+ this.go(-1);
1468
+ };
1469
+ w.prototype.forward = function() {
1470
+ this.go(1);
1471
+ };
1472
+ w.prototype.getMatchedComponents = function(e) {
1473
+ var r = e ? e.matched ? e : this.resolve(e).route : this.currentRoute;
1474
+ return r ? [].concat.apply(
1475
+ [],
1476
+ r.matched.map(function(n) {
1477
+ return Object.keys(n.components).map(function(i) {
1478
+ return n.components[i];
1479
+ });
1480
+ })
1481
+ ) : [];
1482
+ };
1483
+ w.prototype.resolve = function(e, r, n) {
1484
+ r = r || this.history.current;
1485
+ var i = we(e, r, n, this), s = this.match(i, r), o = s.redirectedFrom || s.fullPath, a = this.history.base, c = Dr(a, o, this.mode);
1486
+ return {
1487
+ location: i,
1488
+ route: s,
1489
+ href: c,
1490
+ // for backwards compat
1491
+ normalizedTo: i,
1492
+ resolved: s
1493
+ };
1494
+ };
1495
+ w.prototype.getRoutes = function() {
1496
+ return this.matcher.getRoutes();
1497
+ };
1498
+ w.prototype.addRoute = function(e, r) {
1499
+ this.matcher.addRoute(e, r), this.history.current !== I && this.history.transitionTo(this.history.getCurrentLocation());
1500
+ };
1501
+ w.prototype.addRoutes = function(e) {
1502
+ process.env.NODE_ENV !== "production" && P(!1, "router.addRoutes() is deprecated and has been removed in Vue Router 4. Use router.addRoute() instead."), this.matcher.addRoutes(e), this.history.current !== I && this.history.transitionTo(this.history.getCurrentLocation());
1503
+ };
1504
+ Object.defineProperties(w.prototype, bt);
1505
+ function Pe(t, e) {
1506
+ return t.push(e), function() {
1507
+ var r = t.indexOf(e);
1508
+ r > -1 && t.splice(r, 1);
1509
+ };
1510
+ }
1511
+ function Dr(t, e, r) {
1512
+ var n = r === "hash" ? "#" + e : e;
1513
+ return t ? O(t + "/" + n) : n;
1514
+ }
1515
+ w.install = ne;
1516
+ w.version = "3.6.5";
1517
+ w.isNavigationFailure = ce;
1518
+ w.NavigationFailureType = V;
1519
+ w.START_LOCATION = I;
1520
+ W && window.Vue && window.Vue.use(w);
1521
+ const Fr = /(\s|^)(https?:\/\/)([-A-Z0-9+_.]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig, Ke = /(\s|\(|^)((https?:\/\/)([-A-Z0-9+_.]+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig, Wr = {
1522
+ name: "NcLink",
1523
+ props: {
1524
+ href: {
1525
+ type: String,
1526
+ required: !0
1527
+ }
1528
+ },
1529
+ render(t) {
1530
+ return t("a", {
1531
+ attrs: {
1532
+ href: this.href,
1533
+ rel: "noopener noreferrer",
1534
+ target: "_blank",
1535
+ class: "rich-text--external-link"
1536
+ }
1537
+ }, [this.href.trim()]);
1538
+ }
1539
+ }, Hr = function({ autolink: t, useMarkdown: e, useExtendedMarkdown: r }) {
1540
+ return function(n) {
1541
+ r || !e || !t || Le.visit(n, (i) => i.type === "text", (i, s, o) => {
1542
+ let a = wt(i.value);
1543
+ return a = a.map((c) => typeof c == "string" ? le.u("text", c) : le.u("link", {
1544
+ url: c.props.href
1545
+ }, [le.u("text", c.props.href)])).filter((c) => c), o.children.splice(s, 1, ...a.flat()), [Le.SKIP, s + a.flat().length];
1546
+ });
1547
+ };
1548
+ }, wt = (t) => {
1549
+ let e = Ke.exec(t);
1550
+ const r = [];
1551
+ let n = 0;
1552
+ for (; e !== null; ) {
1553
+ let s = e[2], o, a = t.substring(n, e.index + e[1].length);
1554
+ s[0] === " " && (a += s[0], s = s.substring(1).trim());
1555
+ const c = s[s.length - 1];
1556
+ (c === "." || c === "," || c === ";" || e[0][0] === "(" && c === ")") && (s = s.substring(0, s.length - 1), o = c), r.push(a), r.push({ component: Wr, props: { href: s } }), o && r.push(o), n = e.index + e[0].length, e = Ke.exec(t);
1557
+ }
1558
+ r.push(t.substring(n));
1559
+ const i = r.map((s) => typeof s == "string" ? s : s.props.href).join("");
1560
+ return t === i ? r : (console.error("Failed to reassemble the chunked text: " + t), t);
1561
+ }, Ct = (t, e) => {
1562
+ if (!t || !e.includes(j.getBaseUrl()))
1563
+ return null;
1564
+ const r = t.getRoutes().map((n) => new RegExp(n.regex.source.slice(1, -1), n.regex.flags));
1565
+ for (const n of r) {
1566
+ const i = e.search(n);
1567
+ if (i !== -1)
1568
+ return e.slice(i);
1569
+ }
1570
+ }, Gr = {
1571
+ name: "NcReferenceWidget",
1572
+ props: {
1573
+ reference: {
1574
+ type: Object,
1575
+ required: !0
1576
+ }
1577
+ },
1578
+ data() {
1579
+ return {
1580
+ compact: 3
1581
+ };
1582
+ },
1583
+ computed: {
1584
+ hasCustomWidget() {
1585
+ return x.isWidgetRegistered(this.reference.richObjectType);
1586
+ },
1587
+ noAccess() {
1588
+ return this.reference && !this.reference.accessible;
1589
+ },
1590
+ descriptionStyle() {
1591
+ if (this.compact === 0)
1592
+ return {
1593
+ display: "none"
1594
+ };
1595
+ const t = this.compact < 4 ? this.compact : 3;
1596
+ return {
1597
+ lineClamp: t,
1598
+ webkitLineClamp: t
1599
+ };
1600
+ },
1601
+ compactLink() {
1602
+ const t = this.reference.openGraphObject.link;
1603
+ return t ? t.startsWith("https://") ? t.substring(8) : t.startsWith("http://") ? t.substring(7) : t : "";
1604
+ },
1605
+ route() {
1606
+ return Ct(this.$router, this.reference.openGraphObject.link);
1607
+ },
1608
+ referenceWidgetLinkComponent() {
1609
+ return this.route ? Ce : "a";
1610
+ },
1611
+ referenceWidgetLinkProps() {
1612
+ return this.route ? { to: this.route } : { href: this.reference.openGraphObject.link, target: "_blank" };
1613
+ }
1614
+ },
1615
+ mounted() {
1616
+ this.renderWidget(), Tt.useResizeObserver(this.$el, (t) => {
1617
+ t[0].contentRect.width < 450 ? this.compact = 0 : t[0].contentRect.width < 550 ? this.compact = 1 : t[0].contentRect.width < 650 ? this.compact = 2 : this.compact = 3;
1618
+ });
1619
+ },
1620
+ beforeDestroy() {
1621
+ x.destroyWidget(this.reference.richObjectType, this.$el);
1622
+ },
1623
+ methods: {
1624
+ renderWidget() {
1625
+ this.$refs.customWidget && (this.$refs.customWidget.innerHTML = ""), this?.reference?.richObjectType !== "open-graph" && this.$nextTick(() => {
1626
+ x.renderWidget(this.$refs.customWidget, this.reference);
1627
+ });
1628
+ }
1629
+ }
1630
+ };
1631
+ var Qr = function() {
1632
+ var e = this, r = e._self._c;
1633
+ return r("div", [e.reference && e.hasCustomWidget ? r("div", { staticClass: "widget-custom" }, [r("div", { ref: "customWidget" })]) : !e.noAccess && e.reference && e.reference.openGraphObject && !e.hasCustomWidget ? r(e.referenceWidgetLinkComponent, e._b({ tag: "component", staticClass: "widget-default", attrs: { rel: "noopener noreferrer" } }, "component", e.referenceWidgetLinkProps, !1), [e.reference.openGraphObject.thumb ? r("img", { staticClass: "widget-default--image", attrs: { src: e.reference.openGraphObject.thumb } }) : e._e(), r("div", { staticClass: "widget-default--details" }, [r("p", { staticClass: "widget-default--name" }, [e._v(e._s(e.reference.openGraphObject.name))]), r("p", { staticClass: "widget-default--description", style: e.descriptionStyle }, [e._v(e._s(e.reference.openGraphObject.description))]), r("p", { staticClass: "widget-default--link" }, [e._v(e._s(e.compactLink))])])]) : e._e()], 1);
1634
+ }, Kr = [], Zr = /* @__PURE__ */ $.normalizeComponent(
1635
+ Gr,
1636
+ Qr,
1637
+ Kr,
1638
+ !1,
1639
+ null,
1640
+ "38b1d56a",
1641
+ null,
1642
+ null
1643
+ );
1644
+ const Rt = Zr.exports, Jr = {
1645
+ name: "NcCustomPickerElement",
1646
+ props: {
1647
+ /**
1648
+ * The reference provider
1649
+ */
1650
+ provider: {
1651
+ type: Object,
1652
+ required: !0
1653
+ }
1654
+ },
1655
+ emits: [
1656
+ "cancel",
1657
+ "submit"
1658
+ ],
1659
+ data() {
1660
+ return {
1661
+ isRegistered: x.isCustomPickerElementRegistered(this.provider.id),
1662
+ renderResult: null
1663
+ };
1664
+ },
1665
+ mounted() {
1666
+ this.isRegistered && this.renderElement();
1667
+ },
1668
+ beforeDestroy() {
1669
+ this.isRegistered && x.destroyCustomPickerElement(this.provider.id, this.$el, this.renderResult);
1670
+ },
1671
+ methods: {
1672
+ renderElement() {
1673
+ this.$refs.domElement && (this.$refs.domElement.innerHTML = "");
1674
+ const t = x.renderCustomPickerElement(this.$refs.domElement, { providerId: this.provider.id, accessible: !1 });
1675
+ Promise.resolve(t).then((e) => {
1676
+ this.renderResult = e, this.renderResult.object?._isVue && this.renderResult.object?.$on && (this.renderResult.object.$on("submit", this.onSubmit), this.renderResult.object.$on("cancel", this.onCancel)), this.renderResult.element.addEventListener("submit", (r) => {
1677
+ this.onSubmit(r.detail);
1678
+ }), this.renderResult.element.addEventListener("cancel", this.onCancel);
1679
+ });
1680
+ },
1681
+ onSubmit(t) {
1682
+ this.$emit("submit", t);
1683
+ },
1684
+ onCancel() {
1685
+ this.$emit("cancel");
1686
+ }
1687
+ }
1688
+ };
1689
+ var Xr = function() {
1690
+ var e = this, r = e._self._c;
1691
+ return r("div", { ref: "domElement" });
1692
+ }, Yr = [], en = /* @__PURE__ */ $.normalizeComponent(
1693
+ Jr,
1694
+ Xr,
1695
+ Yr,
1696
+ !1,
1697
+ null,
1698
+ "25f1cef8",
1699
+ null,
1700
+ null
1701
+ );
1702
+ const tn = en.exports;
1703
+ y.register(y.t7);
1704
+ const Ee = "any-link", Pt = {
1705
+ id: Ee,
1706
+ title: y.t("Any link"),
1707
+ icon_url: j.imagePath("core", "filetypes/link.svg")
1708
+ };
1709
+ window._vue_richtext_reference_providers || (window._vue_richtext_reference_providers = Xe.loadState("core", "reference-provider-list", []));
1710
+ window._vue_richtext_reference_provider_timestamps || (window._vue_richtext_reference_provider_timestamps = Xe.loadState("core", "reference-provider-timestamps", {}));
1711
+ function Et(t) {
1712
+ return t === Ee ? Pt : ke().find((e) => e.id === t);
1713
+ }
1714
+ function ke() {
1715
+ return window._vue_richtext_reference_providers.filter((t) => {
1716
+ const e = !!t.search_providers_ids && t.search_providers_ids.length > 0 || x.isCustomPickerElementRegistered(t.id);
1717
+ return e || console.debug("[smart picker]", t.id, "reference provider is discoverable but does not have any related search provider or custom picker component registered"), e;
1718
+ });
1719
+ }
1720
+ function kt(t) {
1721
+ const e = window._vue_richtext_reference_provider_timestamps;
1722
+ return t.sort((r, n) => r.order === n.order ? 0 : r.order > n.order ? 1 : -1).sort((r, n) => {
1723
+ const i = e[r.id], s = e[n.id];
1724
+ return i === s ? 0 : s === void 0 ? -1 : i === void 0 ? 1 : i > s ? -1 : 1;
1725
+ });
1726
+ }
1727
+ function St(t, e = null) {
1728
+ const r = ke(), n = t.replace(/[/\-\\^$*+?.()|[\]{}]/g, "\\$&"), i = new RegExp(n, "i"), o = kt(r).filter((c) => c.title.match(i)), a = e ? o.slice(0, e) : o;
1729
+ return (t === "" || a.length === 0) && a.push(Pt), a;
1730
+ }
1731
+ function rn(t) {
1732
+ const e = Math.floor(Date.now() / 1e3), r = {
1733
+ timestamp: e
1734
+ }, n = j.generateOcsUrl("references/provider/{providerId}", { providerId: t });
1735
+ ge.default.put(n, r).then((i) => {
1736
+ window._vue_richtext_reference_provider_timestamps[t] = e;
1737
+ });
1738
+ }
1739
+ let Ze = 0;
1740
+ function xt(t, e) {
1741
+ return function() {
1742
+ const r = this, n = arguments;
1743
+ clearTimeout(Ze), Ze = setTimeout(function() {
1744
+ t.apply(r, n);
1745
+ }, e || 0);
1746
+ };
1747
+ }
1748
+ function Se(t) {
1749
+ try {
1750
+ return !!new URL(t);
1751
+ } catch {
1752
+ return !1;
1753
+ }
1754
+ }
1755
+ y.register(y.t33, y.t36);
1756
+ const nn = {
1757
+ name: "LinkVariantIcon",
1758
+ emits: ["click"],
1759
+ props: {
1760
+ title: {
1761
+ type: String
1762
+ },
1763
+ fillColor: {
1764
+ type: String,
1765
+ default: "currentColor"
1766
+ },
1767
+ size: {
1768
+ type: Number,
1769
+ default: 24
1770
+ }
1771
+ }
1772
+ };
1773
+ var sn = function() {
1774
+ var e = this, r = e._self._c;
1775
+ return r("span", e._b({ staticClass: "material-design-icon link-variant-icon", attrs: { "aria-hidden": e.title ? null : !0, "aria-label": e.title, role: "img" }, on: { click: function(n) {
1776
+ return e.$emit("click", n);
1777
+ } } }, "span", e.$attrs, !1), [r("svg", { staticClass: "material-design-icon__svg", attrs: { fill: e.fillColor, width: e.size, height: e.size, viewBox: "0 0 24 24" } }, [r("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" } }, [e.title ? r("title", [e._v(e._s(e.title))]) : e._e()])])]);
1778
+ }, on = [], an = /* @__PURE__ */ $.normalizeComponent(
1779
+ nn,
1780
+ sn,
1781
+ on,
1782
+ !1,
1783
+ null,
1784
+ null,
1785
+ null,
1786
+ null
1787
+ );
1788
+ const xe = an.exports, cn = {
1789
+ name: "NcProviderList",
1790
+ components: {
1791
+ NcSelect: et.NcSelect,
1792
+ NcHighlight: Ye.NcHighlight,
1793
+ NcEmptyContent: me,
1794
+ LinkVariantIcon: xe
1795
+ },
1796
+ emits: [
1797
+ "select-provider",
1798
+ "submit"
1799
+ ],
1800
+ data() {
1801
+ return {
1802
+ selectedProvider: null,
1803
+ query: "",
1804
+ multiselectPlaceholder: y.t("Select provider"),
1805
+ providerIconAlt: y.t("Provider icon")
1806
+ };
1807
+ },
1808
+ computed: {
1809
+ options() {
1810
+ const t = [];
1811
+ return this.query !== "" && Se(this.query) && t.push({
1812
+ id: this.query,
1813
+ title: this.query,
1814
+ isLink: !0
1815
+ }), t.push(...St(this.query)), t;
1816
+ }
1817
+ },
1818
+ methods: {
1819
+ focus() {
1820
+ setTimeout(() => {
1821
+ this.$refs["provider-select"]?.$el?.querySelector("#provider-select-input")?.focus();
1822
+ }, 300);
1823
+ },
1824
+ onProviderSelected(t) {
1825
+ t !== null && (t.isLink ? this.$emit("submit", t.title) : this.$emit("select-provider", t), this.selectedProvider = null);
1826
+ },
1827
+ onSearch(t, e) {
1828
+ this.query = t;
1829
+ }
1830
+ }
1831
+ };
1832
+ var un = function() {
1833
+ var e = this, r = e._self._c;
1834
+ return r("div", { staticClass: "provider-list" }, [r("NcSelect", { ref: "provider-select", staticClass: "provider-list--select", attrs: { "input-id": "provider-select-input", label: "title", placeholder: e.multiselectPlaceholder, options: e.options, "append-to-body": !1, "clear-search-on-select": !0, "clear-search-on-blur": () => !1, filterable: !1 }, on: { search: e.onSearch, input: e.onProviderSelected }, scopedSlots: e._u([{ key: "option", fn: function(n) {
1835
+ return [n.isLink ? r("div", { staticClass: "provider" }, [r("LinkVariantIcon", { staticClass: "link-icon", attrs: { size: 20 } }), r("span", [e._v(e._s(n.title))])], 1) : r("div", { staticClass: "provider" }, [r("img", { staticClass: "provider-icon", attrs: { src: n.icon_url, alt: e.providerIconAlt } }), r("NcHighlight", { staticClass: "option-text", attrs: { search: e.query, text: n.title } })], 1)];
1836
+ } }]), model: { value: e.selectedProvider, callback: function(n) {
1837
+ e.selectedProvider = n;
1838
+ }, expression: "selectedProvider" } }), r("NcEmptyContent", { staticClass: "provider-list--empty-content", scopedSlots: e._u([{ key: "icon", fn: function() {
1839
+ return [r("LinkVariantIcon")];
1840
+ }, proxy: !0 }]) })], 1);
1841
+ }, ln = [], fn = /* @__PURE__ */ $.normalizeComponent(
1842
+ cn,
1843
+ un,
1844
+ ln,
1845
+ !1,
1846
+ null,
1847
+ "e880790e",
1848
+ null,
1849
+ null
1850
+ );
1851
+ const hn = fn.exports;
1852
+ y.register(y.t20);
1853
+ const pn = {
1854
+ name: "NcRawLinkInput",
1855
+ components: {
1856
+ LinkVariantIcon: xe,
1857
+ NcEmptyContent: me,
1858
+ NcLoadingIcon: At,
1859
+ NcReferenceWidget: Rt,
1860
+ NcTextField: It.NcTextField
1861
+ },
1862
+ props: {
1863
+ /**
1864
+ * The reference provider
1865
+ */
1866
+ provider: {
1867
+ type: Object,
1868
+ required: !0
1869
+ }
1870
+ },
1871
+ emits: [
1872
+ "submit"
1873
+ ],
1874
+ data() {
1875
+ return {
1876
+ inputValue: "",
1877
+ loading: !1,
1878
+ reference: null,
1879
+ abortController: null,
1880
+ inputPlaceholder: y.t("Enter link")
1881
+ };
1882
+ },
1883
+ computed: {
1884
+ isLinkValid() {
1885
+ return Se(this.inputValue);
1886
+ }
1887
+ },
1888
+ methods: {
1889
+ focus() {
1890
+ this.$refs["url-input"].$el.getElementsByTagName("input")[0]?.focus();
1891
+ },
1892
+ onSubmit(t) {
1893
+ const e = t.target.value;
1894
+ this.isLinkValid && this.$emit("submit", e);
1895
+ },
1896
+ onClear() {
1897
+ this.inputValue = "", this.reference = null;
1898
+ },
1899
+ onInput() {
1900
+ this.reference = null, this.abortController && this.abortController.abort(), this.isLinkValid && xt(() => {
1901
+ this.updateReference();
1902
+ }, 500)();
1903
+ },
1904
+ updateReference() {
1905
+ this.loading = !0, this.abortController = new AbortController(), ge.default.get(j.generateOcsUrl("references/resolve", 2) + "?reference=" + encodeURIComponent(this.inputValue), {
1906
+ signal: this.abortController.signal
1907
+ }).then((t) => {
1908
+ this.reference = t.data.ocs.data.references[this.inputValue];
1909
+ }).catch((t) => {
1910
+ console.error(t);
1911
+ }).then(() => {
1912
+ this.loading = !1;
1913
+ });
1914
+ }
1915
+ }
1916
+ };
1917
+ var dn = function() {
1918
+ var e = this, r = e._self._c;
1919
+ return r("div", { staticClass: "raw-link" }, [r("div", { staticClass: "input-wrapper" }, [r("NcTextField", { ref: "url-input", attrs: { value: e.inputValue, "show-trailing-button": e.inputValue !== "", label: e.inputPlaceholder }, on: { "update:value": [function(n) {
1920
+ e.inputValue = n;
1921
+ }, e.onInput], "trailing-button-click": e.onClear }, nativeOn: { keyup: function(n) {
1922
+ return !n.type.indexOf("key") && e._k(n.keyCode, "enter", 13, n.key, "Enter") ? null : e.onSubmit.apply(null, arguments);
1923
+ } } }, [e.loading ? r("NcLoadingIcon", { attrs: { size: 16 } }) : r("LinkVariantIcon", { attrs: { size: 16 } })], 1)], 1), e.reference !== null ? r("NcReferenceWidget", { staticClass: "reference-widget", attrs: { reference: e.reference } }) : r("NcEmptyContent", { staticClass: "raw-link--empty-content", scopedSlots: e._u([{ key: "icon", fn: function() {
1924
+ return [e.provider.icon_url ? r("img", { staticClass: "provider-icon", attrs: { src: e.provider.icon_url } }) : r("LinkVariantIcon")];
1925
+ }, proxy: !0 }]) })], 1);
1926
+ }, vn = [], mn = /* @__PURE__ */ $.normalizeComponent(
1927
+ pn,
1928
+ dn,
1929
+ vn,
1930
+ !1,
1931
+ null,
1932
+ "d0ba247a",
1933
+ null,
1934
+ null
1935
+ );
1936
+ const gn = mn.exports, yn = {
1937
+ name: "NcSearchResult",
1938
+ components: {
1939
+ NcHighlight: Ye.NcHighlight
1940
+ },
1941
+ props: {
1942
+ /**
1943
+ * Unified search result entry
1944
+ */
1945
+ entry: {
1946
+ type: Object,
1947
+ required: !0
1948
+ },
1949
+ /**
1950
+ * The query that led to getting this result
1951
+ * Used to highlight the entry text
1952
+ */
1953
+ query: {
1954
+ type: String,
1955
+ required: !0
1956
+ }
1957
+ }
1958
+ };
1959
+ var _n = function() {
1960
+ var e = this, r = e._self._c;
1961
+ return r("div", { staticClass: "result" }, [e.entry.icon ? r("div", { staticClass: "result--icon-class", class: { [e.entry.icon]: !0, rounded: e.entry.rounded } }) : r("img", { staticClass: "result--image", class: { rounded: e.entry.rounded }, attrs: { src: e.entry.thumbnailUrl } }), r("div", { staticClass: "result--content" }, [r("span", { staticClass: "result--content--name" }, [r("NcHighlight", { attrs: { search: e.query, text: e.entry.title } })], 1), r("span", { staticClass: "result--content--subline" }, [r("NcHighlight", { attrs: { search: e.query, text: e.entry.subline } })], 1)])]);
1962
+ }, bn = [], wn = /* @__PURE__ */ $.normalizeComponent(
1963
+ yn,
1964
+ _n,
1965
+ bn,
1966
+ !1,
1967
+ null,
1968
+ "7a394a58",
1969
+ null,
1970
+ null
1971
+ );
1972
+ const Cn = wn.exports;
1973
+ y.register(y.t26, y.t33, y.t34);
1974
+ const Je = 5, Rn = {
1975
+ name: "NcSearch",
1976
+ components: {
1977
+ LinkVariantIcon: xe,
1978
+ DotsHorizontalIcon: qt.DotsHorizontal,
1979
+ NcEmptyContent: me,
1980
+ NcSelect: et.NcSelect,
1981
+ NcSearchResult: Cn
1982
+ },
1983
+ props: {
1984
+ /**
1985
+ * The selected reference provider
1986
+ */
1987
+ provider: {
1988
+ type: Object,
1989
+ required: !0
1990
+ },
1991
+ showEmptyContent: {
1992
+ type: Boolean,
1993
+ default: !0
1994
+ },
1995
+ searchPlaceholder: {
1996
+ type: String,
1997
+ default: null
1998
+ }
1999
+ },
2000
+ emits: [
2001
+ "submit"
2002
+ ],
2003
+ data() {
2004
+ return {
2005
+ searchQuery: "",
2006
+ selectedResult: null,
2007
+ resultsBySearchProvider: {},
2008
+ searching: !1,
2009
+ searchingMoreOf: null,
2010
+ abortController: null,
2011
+ noOptionsText: y.t("Start typing to search"),
2012
+ providerIconAlt: y.t("Provider icon")
2013
+ };
2014
+ },
2015
+ computed: {
2016
+ mySearchPlaceholder() {
2017
+ return this.searchPlaceholder || y.t("Search");
2018
+ },
2019
+ searchProviderIds() {
2020
+ return this.provider.search_providers_ids;
2021
+ },
2022
+ options() {
2023
+ if (this.searchQuery === "")
2024
+ return [];
2025
+ const t = [];
2026
+ return Se(this.searchQuery) && t.push(this.rawLinkEntry), t.push(...this.formattedSearchResults), t;
2027
+ },
2028
+ rawLinkEntry() {
2029
+ return {
2030
+ id: "rawLinkEntry",
2031
+ resourceUrl: this.searchQuery,
2032
+ isRawLink: !0
2033
+ };
2034
+ },
2035
+ formattedSearchResults() {
2036
+ const t = [];
2037
+ return this.searchProviderIds.forEach((e) => {
2038
+ if (this.resultsBySearchProvider[e].entries.length > 0) {
2039
+ (this.searchProviderIds.length > 1 || this.resultsBySearchProvider[e].entries.length > 1) && t.push({
2040
+ id: "groupTitle-" + e,
2041
+ name: this.resultsBySearchProvider[e].name,
2042
+ isCustomGroupTitle: !0,
2043
+ providerId: e
2044
+ });
2045
+ const r = this.resultsBySearchProvider[e].entries.map((n, i) => ({
2046
+ id: "provider-" + e + "-entry-" + i,
2047
+ ...n
2048
+ }));
2049
+ t.push(...r), this.resultsBySearchProvider[e].isPaginated && t.push({
2050
+ id: "moreOf-" + e,
2051
+ name: this.resultsBySearchProvider[e].name,
2052
+ isMore: !0,
2053
+ providerId: e,
2054
+ isLoading: this.searchingMoreOf === e
2055
+ });
2056
+ }
2057
+ }), t;
2058
+ }
2059
+ },
2060
+ mounted() {
2061
+ this.resetResults();
2062
+ },
2063
+ beforeDestroy() {
2064
+ this.cancelSearchRequests();
2065
+ },
2066
+ methods: {
2067
+ t: y.t,
2068
+ resetResults() {
2069
+ const t = {};
2070
+ this.searchProviderIds.forEach((e) => {
2071
+ t[e] = {
2072
+ entries: []
2073
+ };
2074
+ }), this.resultsBySearchProvider = t;
2075
+ },
2076
+ focus() {
2077
+ setTimeout(() => {
2078
+ this.$refs["search-select"]?.$el?.querySelector("#search-select-input")?.focus();
2079
+ }, 300);
2080
+ },
2081
+ cancelSearchRequests() {
2082
+ this.abortController && this.abortController.abort();
2083
+ },
2084
+ onSearchInput(t, e) {
2085
+ this.searchQuery = t, xt(() => {
2086
+ this.updateSearch();
2087
+ }, 500)();
2088
+ },
2089
+ onSelectResultSelected(t) {
2090
+ t !== null && (t.resourceUrl ? (this.cancelSearchRequests(), this.$emit("submit", t.resourceUrl)) : t.isMore && this.searchMoreOf(t.providerId).then(() => {
2091
+ this.selectedResult = null;
2092
+ }));
2093
+ },
2094
+ searchMoreOf(t) {
2095
+ return this.searchingMoreOf = t, this.cancelSearchRequests(), this.searchProviders(t);
2096
+ },
2097
+ updateSearch() {
2098
+ if (this.cancelSearchRequests(), this.resetResults(), this.searchQuery === "") {
2099
+ this.searching = !1;
2100
+ return;
2101
+ }
2102
+ return this.searchProviders();
2103
+ },
2104
+ searchProviders(t = null) {
2105
+ this.abortController = new AbortController(), this.searching = !0;
2106
+ const e = t === null ? [...this.searchProviderIds].map((r) => this.searchOneProvider(r)) : [this.searchOneProvider(t, this.resultsBySearchProvider[t]?.cursor ?? null)];
2107
+ return Promise.allSettled(e).then((r) => {
2108
+ !!r.find((i) => i.status === "rejected" && (i.reason.name === "CanceledError" || i.reason.code === "ERR_CANCELED")) || (this.searching = !1, this.searchingMoreOf = null);
2109
+ });
2110
+ },
2111
+ searchOneProvider(t, e = null) {
2112
+ const r = e === null ? j.generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}", { providerId: t, term: this.searchQuery, limit: Je }) : j.generateOcsUrl("search/providers/{providerId}/search?term={term}&limit={limit}&cursor={cursor}", { providerId: t, term: this.searchQuery, limit: Je, cursor: e });
2113
+ return ge.default.get(r, {
2114
+ signal: this.abortController.signal
2115
+ }).then((n) => {
2116
+ const i = n.data.ocs.data;
2117
+ this.resultsBySearchProvider[t].name = i.name, this.resultsBySearchProvider[t].cursor = i.cursor, this.resultsBySearchProvider[t].isPaginated = i.isPaginated, this.resultsBySearchProvider[t].entries.push(...i.entries);
2118
+ });
2119
+ }
2120
+ }
2121
+ };
2122
+ var Pn = function() {
2123
+ var e = this, r = e._self._c;
2124
+ return r("div", { staticClass: "smart-picker-search", class: { "with-empty-content": e.showEmptyContent } }, [r("NcSelect", { ref: "search-select", staticClass: "smart-picker-search--select", attrs: { "input-id": "search-select-input", label: "name", placeholder: e.mySearchPlaceholder, options: e.options, "append-to-body": !1, "close-on-select": !1, "clear-search-on-select": !1, "clear-search-on-blur": () => !1, "reset-focus-on-options-change": !1, filterable: !1, autoscroll: !0, "reset-on-options-change": !1, loading: e.searching }, on: { search: e.onSearchInput, input: e.onSelectResultSelected }, scopedSlots: e._u([{ key: "option", fn: function(n) {
2125
+ return [n.isRawLink ? r("div", { staticClass: "custom-option" }, [r("LinkVariantIcon", { staticClass: "option-simple-icon", attrs: { size: 20 } }), r("span", { staticClass: "option-text" }, [e._v(" " + e._s(e.t("Raw link {options}", { options: n.resourceUrl })) + " ")])], 1) : n.resourceUrl ? r("NcSearchResult", { staticClass: "search-result", attrs: { entry: n, query: e.searchQuery } }) : n.isCustomGroupTitle ? r("span", { staticClass: "custom-option group-name" }, [e.provider.icon_url ? r("img", { staticClass: "provider-icon group-name-icon", attrs: { src: e.provider.icon_url } }) : e._e(), r("span", { staticClass: "option-text" }, [r("strong", [e._v(e._s(n.name))])])]) : n.isMore ? r("span", { class: { "custom-option": !0 } }, [n.isLoading ? r("span", { staticClass: "option-simple-icon icon-loading-small" }) : r("DotsHorizontalIcon", { staticClass: "option-simple-icon", attrs: { size: 20 } }), r("span", { staticClass: "option-text" }, [e._v(" " + e._s(e.t('Load more "{options}"', { options: n.name })) + " ")])], 1) : e._e()];
2126
+ } }, { key: "no-options", fn: function() {
2127
+ return [e._v(" " + e._s(e.noOptionsText) + " ")];
2128
+ }, proxy: !0 }]), model: { value: e.selectedResult, callback: function(n) {
2129
+ e.selectedResult = n;
2130
+ }, expression: "selectedResult" } }), e.showEmptyContent ? r("NcEmptyContent", { staticClass: "smart-picker-search--empty-content", scopedSlots: e._u([{ key: "icon", fn: function() {
2131
+ return [e.provider.icon_url ? r("img", { staticClass: "provider-icon", attrs: { alt: e.providerIconAlt, src: e.provider.icon_url } }) : r("LinkVariantIcon")];
2132
+ }, proxy: !0 }], null, !1, 2922132592) }) : e._e()], 1);
2133
+ }, En = [], kn = /* @__PURE__ */ $.normalizeComponent(
2134
+ Rn,
2135
+ Pn,
2136
+ En,
2137
+ !1,
2138
+ null,
2139
+ "97d196f0",
2140
+ null,
2141
+ null
2142
+ );
2143
+ const Nt = kn.exports, D = {
2144
+ providerList: 1,
2145
+ standardLinkInput: 2,
2146
+ searchInput: 3,
2147
+ customElement: 4
2148
+ }, Sn = {
2149
+ name: "NcReferencePicker",
2150
+ components: {
2151
+ NcCustomPickerElement: tn,
2152
+ NcProviderList: hn,
2153
+ NcRawLinkInput: gn,
2154
+ NcSearch: Nt
2155
+ },
2156
+ props: {
2157
+ /**
2158
+ * Provider to select on creation
2159
+ * Default: null. Show the provider list
2160
+ */
2161
+ initialProvider: {
2162
+ type: Object,
2163
+ default: () => null
2164
+ },
2165
+ /**
2166
+ * Optional width in pixels
2167
+ * Default: 100%
2168
+ */
2169
+ width: {
2170
+ type: Number,
2171
+ default: null
2172
+ },
2173
+ /**
2174
+ * Focus on the provider list select input on creation
2175
+ * Default: true
2176
+ */
2177
+ focusOnCreate: {
2178
+ type: Boolean,
2179
+ default: !0
2180
+ }
2181
+ },
2182
+ emits: [
2183
+ "cancel",
2184
+ "cancel-raw-link",
2185
+ "cancel-search",
2186
+ "provider-selected",
2187
+ "submit"
2188
+ ],
2189
+ data() {
2190
+ return {
2191
+ MODES: D,
2192
+ selectedProvider: this.initialProvider
2193
+ };
2194
+ },
2195
+ computed: {
2196
+ mode() {
2197
+ return this.selectedProvider === null ? D.providerList : x.isCustomPickerElementRegistered(this.selectedProvider.id) ? D.customElement : this.selectedProvider.search_providers_ids ? D.searchInput : D.standardLinkInput;
2198
+ },
2199
+ pickerWrapperStyle() {
2200
+ return {
2201
+ width: this.width ? this.width + "px" : void 0
2202
+ };
2203
+ }
2204
+ },
2205
+ mounted() {
2206
+ this.focusOnCreate && (this.initialProvider ? setTimeout(() => {
2207
+ this.$refs["url-input"]?.focus();
2208
+ }, 300) : this.$nextTick(() => {
2209
+ this.$refs["provider-list"]?.focus();
2210
+ }));
2211
+ },
2212
+ methods: {
2213
+ onEscapePressed() {
2214
+ this.selectedProvider !== null ? this.deselectProvider() : this.cancelProviderSelection();
2215
+ },
2216
+ onProviderSelected(t) {
2217
+ this.selectedProvider = t, this.$emit("provider-selected", t), this.$nextTick(() => {
2218
+ this.$refs["url-input"]?.focus();
2219
+ });
2220
+ },
2221
+ cancelCustomElement() {
2222
+ this.deselectProvider();
2223
+ },
2224
+ cancelSearch() {
2225
+ this.$emit("cancel-search", this.selectedProvider?.title), this.deselectProvider();
2226
+ },
2227
+ cancelRawLinkInput() {
2228
+ this.$emit("cancel-raw-link", this.selectedProvider?.title), this.deselectProvider();
2229
+ },
2230
+ cancelProviderSelection() {
2231
+ this.$emit("cancel");
2232
+ },
2233
+ submitLink(t) {
2234
+ this.selectedProvider !== null && rn(this.selectedProvider.id), this.$emit("submit", t), this.deselectProvider();
2235
+ },
2236
+ deselectProvider() {
2237
+ this.selectedProvider = null, this.$emit("provider-selected", null), setTimeout(() => {
2238
+ this.$refs["provider-list"]?.focus();
2239
+ }, 300);
2240
+ }
2241
+ }
2242
+ };
2243
+ var xn = function() {
2244
+ var e = this, r = e._self._c;
2245
+ return r("div", { staticClass: "reference-picker", style: e.pickerWrapperStyle, attrs: { tabindex: "-1" }, on: { keydown: function(n) {
2246
+ return !n.type.indexOf("key") && e._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : (n.stopPropagation(), n.preventDefault(), e.onEscapePressed.apply(null, arguments));
2247
+ } } }, [e.mode === e.MODES.providerList ? r("NcProviderList", { ref: "provider-list", on: { "select-provider": e.onProviderSelected, submit: e.submitLink, cancel: e.cancelProviderSelection } }) : e.mode === e.MODES.standardLinkInput ? r("NcRawLinkInput", { ref: "url-input", attrs: { provider: e.selectedProvider }, on: { submit: e.submitLink, cancel: e.cancelRawLinkInput } }) : e.mode === e.MODES.searchInput ? r("NcSearch", { ref: "url-input", attrs: { provider: e.selectedProvider }, on: { cancel: e.cancelSearch, submit: e.submitLink } }) : e.mode === e.MODES.customElement ? r("div", { staticClass: "custom-element-wrapper" }, [r("NcCustomPickerElement", { attrs: { provider: e.selectedProvider }, on: { submit: e.submitLink, cancel: e.cancelCustomElement } })], 1) : e._e()], 1);
2248
+ }, Nn = [], Ln = /* @__PURE__ */ $.normalizeComponent(
2249
+ Sn,
2250
+ xn,
2251
+ Nn,
2252
+ !1,
2253
+ null,
2254
+ "12c38c93",
2255
+ null,
2256
+ null
2257
+ );
2258
+ const Lt = Ln.exports;
2259
+ y.register(y.t11, y.t16);
2260
+ const $n = {
2261
+ name: "NcReferencePickerModal",
2262
+ components: {
2263
+ NcReferencePicker: Lt,
2264
+ NcModal: Bt,
2265
+ NcButton: Vt,
2266
+ ArrowLeftIcon: Mt.ArrowLeft,
2267
+ CloseIcon: Ut.Close
2268
+ },
2269
+ props: {
2270
+ /**
2271
+ * Provider to select on creation
2272
+ * Show the provider list if no initial one is provided
2273
+ */
2274
+ initialProvider: {
2275
+ type: Object,
2276
+ default: () => null
2277
+ },
2278
+ /**
2279
+ * Focus on the input item on create
2280
+ */
2281
+ focusOnCreate: {
2282
+ type: Boolean,
2283
+ default: !0
2284
+ },
2285
+ /**
2286
+ * If true, add the modal content to the Viewer trap elements via the event-bus
2287
+ */
2288
+ isInsideViewer: {
2289
+ type: Boolean,
2290
+ default: !1
2291
+ }
2292
+ },
2293
+ emits: [
2294
+ "cancel",
2295
+ "submit"
2296
+ ],
2297
+ data() {
2298
+ return {
2299
+ show: !0,
2300
+ selectedProvider: this.initialProvider,
2301
+ backButtonTitle: y.t("Back to provider selection"),
2302
+ closeButtonTitle: y.t("Close"),
2303
+ closeButtonLabel: y.t("Close Smart Picker")
2304
+ };
2305
+ },
2306
+ computed: {
2307
+ isProviderSelected() {
2308
+ return this.selectedProvider !== null;
2309
+ },
2310
+ showBackButton() {
2311
+ return this.initialProvider === null && this.isProviderSelected;
2312
+ },
2313
+ modalSize() {
2314
+ return this.isProviderSelected && x.isCustomPickerElementRegistered(this.selectedProvider.id) ? x.getCustomPickerElementSize(this.selectedProvider.id) ?? "large" : "normal";
2315
+ },
2316
+ showModalName() {
2317
+ return !this.isProviderSelected || !x.isCustomPickerElementRegistered(this.selectedProvider.id);
2318
+ },
2319
+ modalName() {
2320
+ return this.isProviderSelected ? this.selectedProvider.title : y.t("Smart Picker");
2321
+ }
2322
+ },
2323
+ mounted() {
2324
+ if (this.isInsideViewer) {
2325
+ const t = this.$refs.modal_content;
2326
+ jt.emit("viewer:trapElements:changed", t);
2327
+ }
2328
+ },
2329
+ methods: {
2330
+ onCancel() {
2331
+ this.show = !1, this.$emit("cancel");
2332
+ },
2333
+ onSubmit(t) {
2334
+ this.show = !1, this.$emit("submit", t);
2335
+ },
2336
+ onProviderSelect(t) {
2337
+ this.selectedProvider = t, t === null && this.initialProvider !== null && this.onCancel();
2338
+ },
2339
+ onBackClicked() {
2340
+ this.$refs.referencePicker.deselectProvider();
2341
+ }
2342
+ }
2343
+ };
2344
+ var On = function() {
2345
+ var e = this, r = e._self._c;
2346
+ return e.show ? r("NcModal", { staticClass: "reference-picker-modal", attrs: { size: e.modalSize, "can-close": !1 }, on: { close: e.onCancel } }, [r("div", { ref: "modal_content", staticClass: "reference-picker-modal--content" }, [e.showBackButton ? r("NcButton", { staticClass: "back-button", attrs: { "aria-label": e.backButtonTitle, title: e.backButtonTitle }, on: { click: e.onBackClicked }, scopedSlots: e._u([{ key: "icon", fn: function() {
2347
+ return [r("ArrowLeftIcon")];
2348
+ }, proxy: !0 }], null, !1, 3001860362) }) : e._e(), r("NcButton", { staticClass: "close-button", attrs: { "aria-label": e.closeButtonLabel, title: e.closeButtonTitle, type: "tertiary" }, on: { click: e.onCancel }, scopedSlots: e._u([{ key: "icon", fn: function() {
2349
+ return [r("CloseIcon")];
2350
+ }, proxy: !0 }], null, !1, 2491825086) }), e.showModalName ? r("h2", [e._v(" " + e._s(e.modalName) + " ")]) : e._e(), r("NcReferencePicker", { ref: "referencePicker", attrs: { "initial-provider": e.initialProvider, "focus-on-create": e.focusOnCreate }, on: { "provider-selected": e.onProviderSelect, submit: e.onSubmit, cancel: e.onCancel } })], 1)]) : e._e();
2351
+ }, Tn = [], An = /* @__PURE__ */ $.normalizeComponent(
2352
+ $n,
2353
+ On,
2354
+ Tn,
2355
+ !1,
2356
+ null,
2357
+ "ab09ebaa",
2358
+ null,
2359
+ null
2360
+ );
2361
+ const $t = An.exports;
2362
+ async function In(t = null, e = void 0) {
2363
+ return await new Promise((r, n) => {
2364
+ const i = "referencePickerModal", s = document.createElement("div");
2365
+ s.id = i, document.body.append(s);
2366
+ const o = t === null ? null : Et(t) ?? null, a = Dt.default.extend($t), c = new a({
2367
+ propsData: {
2368
+ initialProvider: o,
2369
+ isInsideViewer: e
2370
+ }
2371
+ }).$mount(s);
2372
+ c.$on("cancel", () => {
2373
+ c.$destroy(), n(new Error("User cancellation"));
2374
+ }), c.$on("submit", (u) => {
2375
+ c.$destroy(), r(u);
2376
+ });
2377
+ });
2378
+ }
2379
+ exports.Link = Ce;
2380
+ exports.NcReferencePicker = Lt;
2381
+ exports.NcReferencePickerModal = $t;
2382
+ exports.NcReferenceWidget = Rt;
2383
+ exports.NcSearch = Nt;
2384
+ exports.URL_PATTERN = Fr;
2385
+ exports.anyLinkProviderId = Ee;
2386
+ exports.getLinkWithPicker = In;
2387
+ exports.getProvider = Et;
2388
+ exports.getProviders = ke;
2389
+ exports.getRoute = Ct;
2390
+ exports.parseUrl = wt;
2391
+ exports.remarkAutolink = Hr;
2392
+ exports.searchProvider = St;
2393
+ exports.sortProviders = kt;