primevue 3.50.0 → 3.52.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 (413) hide show
  1. package/accordion/Accordion.d.ts +2 -2
  2. package/accordiontab/AccordionTab.d.ts +2 -2
  3. package/autocomplete/AutoComplete.d.ts +2 -2
  4. package/autocomplete/AutoComplete.vue +10 -4
  5. package/autocomplete/autocomplete.cjs.js +35 -25
  6. package/autocomplete/autocomplete.cjs.min.js +1 -1
  7. package/autocomplete/autocomplete.esm.js +35 -25
  8. package/autocomplete/autocomplete.esm.min.js +1 -1
  9. package/autocomplete/autocomplete.js +35 -25
  10. package/autocomplete/autocomplete.min.js +1 -1
  11. package/avatar/Avatar.d.ts +2 -2
  12. package/avatargroup/AvatarGroup.d.ts +2 -2
  13. package/badge/Badge.d.ts +2 -2
  14. package/blockui/BlockUI.d.ts +2 -2
  15. package/breadcrumb/Breadcrumb.d.ts +2 -2
  16. package/button/Button.d.ts +2 -2
  17. package/buttongroup/ButtonGroup.d.ts +2 -2
  18. package/calendar/Calendar.d.ts +6 -5
  19. package/calendar/Calendar.vue +10 -13
  20. package/calendar/calendar.cjs.js +9 -11
  21. package/calendar/calendar.cjs.min.js +1 -1
  22. package/calendar/calendar.esm.js +10 -12
  23. package/calendar/calendar.esm.min.js +1 -1
  24. package/calendar/calendar.js +9 -11
  25. package/calendar/calendar.min.js +1 -1
  26. package/card/Card.d.ts +2 -2
  27. package/carousel/Carousel.d.ts +6 -2
  28. package/carousel/Carousel.vue +62 -52
  29. package/carousel/carousel.cjs.js +65 -49
  30. package/carousel/carousel.cjs.min.js +1 -1
  31. package/carousel/carousel.esm.js +66 -50
  32. package/carousel/carousel.esm.min.js +1 -1
  33. package/carousel/carousel.js +65 -49
  34. package/carousel/carousel.min.js +1 -1
  35. package/cascadeselect/CascadeSelect.d.ts +2 -2
  36. package/cascadeselect/CascadeSelectSub.vue +4 -1
  37. package/cascadeselect/cascadeselect.cjs.js +11 -6
  38. package/cascadeselect/cascadeselect.cjs.min.js +1 -1
  39. package/cascadeselect/cascadeselect.esm.js +11 -6
  40. package/cascadeselect/cascadeselect.esm.min.js +1 -1
  41. package/cascadeselect/cascadeselect.js +11 -6
  42. package/cascadeselect/cascadeselect.min.js +1 -1
  43. package/chart/Chart.d.ts +2 -2
  44. package/checkbox/Checkbox.d.ts +2 -2
  45. package/chip/Chip.d.ts +2 -2
  46. package/chips/Chips.d.ts +2 -2
  47. package/colorpicker/ColorPicker.d.ts +2 -2
  48. package/column/Column.d.ts +2 -2
  49. package/columngroup/ColumnGroup.d.ts +2 -2
  50. package/config/PrimeVue.d.ts +1 -0
  51. package/config/config.cjs.js +2 -1
  52. package/config/config.cjs.min.js +1 -1
  53. package/config/config.esm.js +2 -1
  54. package/config/config.esm.min.js +1 -1
  55. package/config/config.js +2 -1
  56. package/config/config.min.js +1 -1
  57. package/confirmdialog/ConfirmDialog.d.ts +2 -2
  58. package/confirmpopup/ConfirmPopup.d.ts +2 -2
  59. package/contextmenu/ContextMenu.d.ts +2 -2
  60. package/contextmenu/ContextMenu.vue +4 -1
  61. package/contextmenu/contextmenu.cjs.js +4 -1
  62. package/contextmenu/contextmenu.cjs.min.js +1 -1
  63. package/contextmenu/contextmenu.esm.js +4 -1
  64. package/contextmenu/contextmenu.esm.min.js +1 -1
  65. package/contextmenu/contextmenu.js +4 -1
  66. package/contextmenu/contextmenu.min.js +1 -1
  67. package/core/core.js +60 -34
  68. package/core/core.min.js +8 -8
  69. package/datatable/BodyRow.vue +1 -0
  70. package/datatable/DataTable.d.ts +10 -7
  71. package/datatable/DataTable.vue +1 -0
  72. package/datatable/TableHeader.vue +5 -0
  73. package/datatable/datatable.cjs.js +9 -2
  74. package/datatable/datatable.cjs.min.js +1 -1
  75. package/datatable/datatable.esm.js +9 -2
  76. package/datatable/datatable.esm.min.js +1 -1
  77. package/datatable/datatable.js +9 -2
  78. package/datatable/datatable.min.js +1 -1
  79. package/dataview/DataView.d.ts +2 -2
  80. package/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +2 -2
  81. package/deferredcontent/DeferredContent.d.ts +2 -2
  82. package/dialog/Dialog.d.ts +2 -2
  83. package/divider/Divider.d.ts +2 -2
  84. package/dock/Dock.d.ts +2 -2
  85. package/dropdown/Dropdown.d.ts +11 -3
  86. package/dropdown/Dropdown.vue +6 -1
  87. package/dropdown/dropdown.cjs.js +8 -2
  88. package/dropdown/dropdown.cjs.min.js +1 -1
  89. package/dropdown/dropdown.esm.js +8 -2
  90. package/dropdown/dropdown.esm.min.js +1 -1
  91. package/dropdown/dropdown.js +8 -2
  92. package/dropdown/dropdown.min.js +1 -1
  93. package/dropdown/style/dropdownstyle.cjs.js +2 -1
  94. package/dropdown/style/dropdownstyle.cjs.min.js +1 -1
  95. package/dropdown/style/dropdownstyle.esm.js +2 -1
  96. package/dropdown/style/dropdownstyle.esm.min.js +1 -1
  97. package/dropdown/style/dropdownstyle.js +2 -1
  98. package/dropdown/style/dropdownstyle.min.js +1 -1
  99. package/dynamicdialog/DynamicDialog.d.ts +2 -2
  100. package/editor/Editor.d.ts +2 -2
  101. package/fieldset/Fieldset.d.ts +2 -2
  102. package/fileupload/FileUpload.d.ts +2 -2
  103. package/fileupload/FileUpload.vue +1 -1
  104. package/fileupload/fileupload.cjs.js +10 -10
  105. package/fileupload/fileupload.cjs.min.js +1 -1
  106. package/fileupload/fileupload.esm.js +10 -10
  107. package/fileupload/fileupload.esm.min.js +1 -1
  108. package/fileupload/fileupload.js +10 -10
  109. package/fileupload/fileupload.min.js +1 -1
  110. package/floatlabel/FloatLabel.d.ts +2 -2
  111. package/galleria/Galleria.d.ts +2 -2
  112. package/iconfield/IconField.d.ts +2 -2
  113. package/icons/angledoubledown/index.d.ts +2 -2
  114. package/icons/angledoubleleft/index.d.ts +2 -2
  115. package/icons/angledoubleright/index.d.ts +2 -2
  116. package/icons/angledoubleup/index.d.ts +2 -2
  117. package/icons/angledown/index.d.ts +2 -2
  118. package/icons/angleleft/index.d.ts +2 -2
  119. package/icons/angleright/index.d.ts +2 -2
  120. package/icons/angleup/index.d.ts +2 -2
  121. package/icons/arrowdown/index.d.ts +2 -2
  122. package/icons/arrowup/index.d.ts +2 -2
  123. package/icons/ban/index.d.ts +2 -2
  124. package/icons/bars/index.d.ts +2 -2
  125. package/icons/blank/index.d.ts +2 -2
  126. package/icons/calendar/index.d.ts +2 -2
  127. package/icons/check/index.d.ts +2 -2
  128. package/icons/chevrondown/index.d.ts +2 -2
  129. package/icons/chevronleft/index.d.ts +2 -2
  130. package/icons/chevronright/index.d.ts +2 -2
  131. package/icons/chevronup/index.d.ts +2 -2
  132. package/icons/exclamationtriangle/index.d.ts +2 -2
  133. package/icons/eye/index.d.ts +2 -2
  134. package/icons/eyeslash/index.d.ts +2 -2
  135. package/icons/filter/index.d.ts +2 -2
  136. package/icons/filterslash/index.d.ts +2 -2
  137. package/icons/infocircle/index.d.ts +2 -2
  138. package/icons/minus/index.d.ts +2 -2
  139. package/icons/pencil/index.d.ts +2 -2
  140. package/icons/plus/index.d.ts +2 -2
  141. package/icons/refresh/index.d.ts +2 -2
  142. package/icons/search/index.d.ts +2 -2
  143. package/icons/searchminus/index.d.ts +2 -2
  144. package/icons/searchplus/index.d.ts +2 -2
  145. package/icons/sortalt/index.d.ts +2 -2
  146. package/icons/sortamountdown/index.d.ts +2 -2
  147. package/icons/sortamountupalt/index.d.ts +2 -2
  148. package/icons/spinner/index.d.ts +2 -2
  149. package/icons/star/index.d.ts +2 -2
  150. package/icons/starfill/index.d.ts +2 -2
  151. package/icons/thlarge/index.d.ts +2 -2
  152. package/icons/times/index.d.ts +2 -2
  153. package/icons/timescircle/index.d.ts +2 -2
  154. package/icons/trash/index.d.ts +2 -2
  155. package/icons/undo/index.d.ts +2 -2
  156. package/icons/upload/index.d.ts +2 -2
  157. package/icons/windowmaximize/index.d.ts +2 -2
  158. package/icons/windowminimize/index.d.ts +2 -2
  159. package/image/Image.d.ts +2 -2
  160. package/inlinemessage/InlineMessage.d.ts +2 -2
  161. package/inplace/Inplace.d.ts +2 -2
  162. package/inputgroup/InputGroup.d.ts +2 -2
  163. package/inputgroupaddon/InputGroupAddon.d.ts +2 -2
  164. package/inputicon/InputIcon.d.ts +2 -2
  165. package/inputmask/InputMask.d.ts +2 -2
  166. package/inputnumber/InputNumber.d.ts +6 -2
  167. package/inputnumber/InputNumber.vue +20 -17
  168. package/inputnumber/inputnumber.cjs.js +23 -20
  169. package/inputnumber/inputnumber.cjs.min.js +1 -1
  170. package/inputnumber/inputnumber.esm.js +23 -20
  171. package/inputnumber/inputnumber.esm.min.js +1 -1
  172. package/inputnumber/inputnumber.js +23 -20
  173. package/inputnumber/inputnumber.min.js +1 -1
  174. package/inputotp/InputOtp.d.ts +2 -2
  175. package/inputotp/InputOtp.vue +1 -1
  176. package/inputotp/inputotp.cjs.js +1 -1
  177. package/inputotp/inputotp.cjs.min.js +1 -1
  178. package/inputotp/inputotp.esm.js +1 -1
  179. package/inputotp/inputotp.esm.min.js +1 -1
  180. package/inputotp/inputotp.js +1 -1
  181. package/inputotp/inputotp.min.js +1 -1
  182. package/inputswitch/InputSwitch.d.ts +2 -2
  183. package/inputtext/InputText.d.ts +2 -2
  184. package/knob/BaseKnob.vue +1 -1
  185. package/knob/Knob.d.ts +3 -3
  186. package/knob/Knob.vue +5 -1
  187. package/knob/knob.cjs.js +6 -2
  188. package/knob/knob.cjs.min.js +1 -1
  189. package/knob/knob.esm.js +6 -2
  190. package/knob/knob.esm.min.js +1 -1
  191. package/knob/knob.js +6 -2
  192. package/knob/knob.min.js +1 -1
  193. package/listbox/Listbox.d.ts +2 -2
  194. package/megamenu/MegaMenu.d.ts +2 -2
  195. package/megamenu/MegaMenu.vue +4 -1
  196. package/megamenu/megamenu.cjs.js +4 -1
  197. package/megamenu/megamenu.cjs.min.js +1 -1
  198. package/megamenu/megamenu.esm.js +4 -1
  199. package/megamenu/megamenu.esm.min.js +1 -1
  200. package/megamenu/megamenu.js +4 -1
  201. package/megamenu/megamenu.min.js +1 -1
  202. package/menu/Menu.d.ts +2 -2
  203. package/menu/Menu.vue +15 -2
  204. package/menu/menu.cjs.js +5 -2
  205. package/menu/menu.cjs.min.js +1 -1
  206. package/menu/menu.esm.js +5 -2
  207. package/menu/menu.esm.min.js +1 -1
  208. package/menu/menu.js +5 -2
  209. package/menu/menu.min.js +1 -1
  210. package/menubar/Menubar.d.ts +2 -2
  211. package/menubar/Menubar.vue +4 -1
  212. package/menubar/menubar.cjs.js +4 -1
  213. package/menubar/menubar.cjs.min.js +1 -1
  214. package/menubar/menubar.esm.js +4 -1
  215. package/menubar/menubar.esm.min.js +1 -1
  216. package/menubar/menubar.js +4 -1
  217. package/menubar/menubar.min.js +1 -1
  218. package/message/Message.d.ts +2 -2
  219. package/metergroup/MeterGroup.d.ts +2 -2
  220. package/multiselect/MultiSelect.d.ts +2 -2
  221. package/multiselect/MultiSelect.vue +6 -3
  222. package/multiselect/multiselect.cjs.js +8 -4
  223. package/multiselect/multiselect.cjs.min.js +1 -1
  224. package/multiselect/multiselect.esm.js +8 -4
  225. package/multiselect/multiselect.esm.min.js +1 -1
  226. package/multiselect/multiselect.js +8 -4
  227. package/multiselect/multiselect.min.js +1 -1
  228. package/orderlist/OrderList.d.ts +2 -2
  229. package/organizationchart/OrganizationChart.d.ts +2 -2
  230. package/overlaypanel/OverlayPanel.d.ts +2 -2
  231. package/package.json +1 -1
  232. package/paginator/Paginator.d.ts +2 -2
  233. package/paginator/Paginator.vue +0 -1
  234. package/paginator/paginator.cjs.js +1 -1
  235. package/paginator/paginator.cjs.min.js +1 -1
  236. package/paginator/paginator.esm.js +1 -1
  237. package/paginator/paginator.esm.min.js +1 -1
  238. package/paginator/paginator.js +1 -1
  239. package/paginator/paginator.min.js +1 -1
  240. package/panel/Panel.d.ts +2 -2
  241. package/panelmenu/PanelMenu.d.ts +2 -2
  242. package/password/Password.d.ts +2 -2
  243. package/picklist/PickList.d.ts +2 -2
  244. package/portal/Portal.d.ts +2 -2
  245. package/progressbar/ProgressBar.d.ts +2 -2
  246. package/progressspinner/ProgressSpinner.d.ts +2 -2
  247. package/radiobutton/RadioButton.d.ts +2 -2
  248. package/rating/Rating.d.ts +2 -2
  249. package/resources/themes/arya-blue/theme.css +1 -0
  250. package/resources/themes/arya-green/theme.css +1 -0
  251. package/resources/themes/arya-orange/theme.css +1 -0
  252. package/resources/themes/arya-purple/theme.css +1 -0
  253. package/resources/themes/aura-dark-amber/theme.css +1 -0
  254. package/resources/themes/aura-dark-blue/theme.css +1 -0
  255. package/resources/themes/aura-dark-cyan/theme.css +1 -0
  256. package/resources/themes/aura-dark-green/theme.css +1 -0
  257. package/resources/themes/aura-dark-indigo/theme.css +1 -0
  258. package/resources/themes/aura-dark-lime/theme.css +1 -0
  259. package/resources/themes/aura-dark-noir/theme.css +1 -0
  260. package/resources/themes/aura-dark-pink/theme.css +1 -0
  261. package/resources/themes/aura-dark-purple/theme.css +1 -0
  262. package/resources/themes/aura-dark-teal/theme.css +1 -0
  263. package/resources/themes/aura-light-amber/theme.css +7 -1
  264. package/resources/themes/aura-light-blue/theme.css +7 -1
  265. package/resources/themes/aura-light-cyan/theme.css +7 -1
  266. package/resources/themes/aura-light-green/theme.css +7 -1
  267. package/resources/themes/aura-light-indigo/theme.css +7 -1
  268. package/resources/themes/aura-light-lime/theme.css +7 -1
  269. package/resources/themes/aura-light-noir/theme.css +7 -1
  270. package/resources/themes/aura-light-pink/theme.css +7 -1
  271. package/resources/themes/aura-light-purple/theme.css +7 -1
  272. package/resources/themes/aura-light-teal/theme.css +7 -1
  273. package/resources/themes/bootstrap4-dark-blue/theme.css +1 -0
  274. package/resources/themes/bootstrap4-dark-purple/theme.css +1 -0
  275. package/resources/themes/bootstrap4-light-blue/theme.css +1 -0
  276. package/resources/themes/bootstrap4-light-purple/theme.css +1 -0
  277. package/resources/themes/fluent-light/theme.css +1 -0
  278. package/resources/themes/lara-dark-amber/theme.css +1 -0
  279. package/resources/themes/lara-dark-blue/theme.css +1 -0
  280. package/resources/themes/lara-dark-cyan/theme.css +1 -0
  281. package/resources/themes/lara-dark-green/theme.css +1 -0
  282. package/resources/themes/lara-dark-indigo/theme.css +1 -0
  283. package/resources/themes/lara-dark-pink/theme.css +1 -0
  284. package/resources/themes/lara-dark-purple/theme.css +1 -0
  285. package/resources/themes/lara-dark-teal/theme.css +1 -0
  286. package/resources/themes/lara-light-amber/theme.css +1 -0
  287. package/resources/themes/lara-light-blue/theme.css +1 -0
  288. package/resources/themes/lara-light-cyan/theme.css +1 -0
  289. package/resources/themes/lara-light-green/theme.css +1 -0
  290. package/resources/themes/lara-light-indigo/theme.css +1 -0
  291. package/resources/themes/lara-light-pink/theme.css +1 -0
  292. package/resources/themes/lara-light-purple/theme.css +1 -0
  293. package/resources/themes/lara-light-teal/theme.css +1 -0
  294. package/resources/themes/luna-amber/theme.css +1 -0
  295. package/resources/themes/luna-blue/theme.css +1 -0
  296. package/resources/themes/luna-green/theme.css +1 -0
  297. package/resources/themes/luna-pink/theme.css +1 -0
  298. package/resources/themes/md-dark-deeppurple/theme.css +1 -0
  299. package/resources/themes/md-dark-indigo/theme.css +1 -0
  300. package/resources/themes/md-light-deeppurple/theme.css +1 -0
  301. package/resources/themes/md-light-indigo/theme.css +1 -0
  302. package/resources/themes/mdc-dark-deeppurple/theme.css +1 -0
  303. package/resources/themes/mdc-dark-indigo/theme.css +1 -0
  304. package/resources/themes/mdc-light-deeppurple/theme.css +1 -0
  305. package/resources/themes/mdc-light-indigo/theme.css +1 -0
  306. package/resources/themes/mira/theme.css +1 -0
  307. package/resources/themes/nano/theme.css +1 -0
  308. package/resources/themes/nova/theme.css +1 -0
  309. package/resources/themes/nova-accent/theme.css +1 -0
  310. package/resources/themes/nova-alt/theme.css +1 -0
  311. package/resources/themes/nova-vue/theme.css +1 -0
  312. package/resources/themes/rhea/theme.css +1 -0
  313. package/resources/themes/saga-blue/theme.css +1 -0
  314. package/resources/themes/saga-green/theme.css +1 -0
  315. package/resources/themes/saga-orange/theme.css +1 -0
  316. package/resources/themes/saga-purple/theme.css +1 -0
  317. package/resources/themes/soho-dark/theme.css +1 -0
  318. package/resources/themes/soho-light/theme.css +1 -0
  319. package/resources/themes/tailwind-light/theme.css +1 -0
  320. package/resources/themes/vela-blue/theme.css +1 -0
  321. package/resources/themes/vela-green/theme.css +1 -0
  322. package/resources/themes/vela-orange/theme.css +1 -0
  323. package/resources/themes/vela-purple/theme.css +1 -0
  324. package/resources/themes/viva-dark/theme.css +1 -0
  325. package/resources/themes/viva-light/theme.css +1 -0
  326. package/row/Row.d.ts +2 -2
  327. package/scrollpanel/ScrollPanel.d.ts +2 -2
  328. package/scrollpanel/ScrollPanel.vue +19 -14
  329. package/scrollpanel/scrollpanel.cjs.js +18 -14
  330. package/scrollpanel/scrollpanel.cjs.min.js +1 -1
  331. package/scrollpanel/scrollpanel.esm.js +18 -14
  332. package/scrollpanel/scrollpanel.esm.min.js +1 -1
  333. package/scrollpanel/scrollpanel.js +18 -14
  334. package/scrollpanel/scrollpanel.min.js +1 -1
  335. package/scrolltop/ScrollTop.d.ts +2 -2
  336. package/selectbutton/SelectButton.d.ts +2 -2
  337. package/sidebar/BaseSidebar.vue +9 -0
  338. package/sidebar/Sidebar.d.ts +2 -2
  339. package/sidebar/sidebar.cjs.js +9 -0
  340. package/sidebar/sidebar.cjs.min.js +1 -1
  341. package/sidebar/sidebar.esm.js +9 -0
  342. package/sidebar/sidebar.esm.min.js +1 -1
  343. package/sidebar/sidebar.js +9 -0
  344. package/sidebar/sidebar.min.js +1 -1
  345. package/skeleton/Skeleton.d.ts +2 -2
  346. package/slider/Slider.d.ts +2 -2
  347. package/slider/Slider.vue +7 -6
  348. package/slider/slider.cjs.js +7 -6
  349. package/slider/slider.cjs.min.js +1 -1
  350. package/slider/slider.esm.js +7 -6
  351. package/slider/slider.esm.min.js +1 -1
  352. package/slider/slider.js +7 -6
  353. package/slider/slider.min.js +1 -1
  354. package/speeddial/SpeedDial.d.ts +2 -2
  355. package/splitbutton/SplitButton.d.ts +2 -2
  356. package/splitter/Splitter.d.ts +2 -2
  357. package/splitterpanel/SplitterPanel.d.ts +2 -2
  358. package/stepper/Stepper.d.ts +2 -2
  359. package/stepper/Stepper.vue +4 -3
  360. package/stepper/stepper.cjs.js +14 -15
  361. package/stepper/stepper.cjs.min.js +1 -1
  362. package/stepper/stepper.esm.js +15 -16
  363. package/stepper/stepper.esm.min.js +1 -1
  364. package/stepper/stepper.js +14 -15
  365. package/stepper/stepper.min.js +1 -1
  366. package/stepperpanel/StepperPanel.d.ts +3 -3
  367. package/steps/Steps.d.ts +2 -2
  368. package/tabmenu/TabMenu.d.ts +2 -2
  369. package/tabpanel/TabPanel.d.ts +2 -2
  370. package/tabview/TabView.d.ts +2 -2
  371. package/tag/Tag.d.ts +2 -2
  372. package/terminal/Terminal.d.ts +2 -2
  373. package/textarea/Textarea.d.ts +2 -2
  374. package/tieredmenu/TieredMenu.d.ts +2 -2
  375. package/tieredmenu/TieredMenu.vue +10 -3
  376. package/tieredmenu/tieredmenu.cjs.js +13 -3
  377. package/tieredmenu/tieredmenu.cjs.min.js +1 -1
  378. package/tieredmenu/tieredmenu.esm.js +13 -3
  379. package/tieredmenu/tieredmenu.esm.min.js +1 -1
  380. package/tieredmenu/tieredmenu.js +13 -3
  381. package/tieredmenu/tieredmenu.min.js +1 -1
  382. package/timeline/Timeline.d.ts +2 -2
  383. package/toast/Toast.d.ts +2 -2
  384. package/toast/Toast.vue +4 -9
  385. package/toast/toast.cjs.js +8 -10
  386. package/toast/toast.cjs.min.js +1 -1
  387. package/toast/toast.esm.js +8 -10
  388. package/toast/toast.esm.min.js +1 -1
  389. package/toast/toast.js +8 -10
  390. package/toast/toast.min.js +1 -1
  391. package/togglebutton/ToggleButton.d.ts +2 -2
  392. package/toolbar/Toolbar.d.ts +2 -2
  393. package/tree/Tree.d.ts +7 -3
  394. package/tree/TreeNode.vue +2 -1
  395. package/tree/tree.cjs.js +6 -4
  396. package/tree/tree.cjs.min.js +1 -1
  397. package/tree/tree.esm.js +6 -4
  398. package/tree/tree.esm.min.js +1 -1
  399. package/tree/tree.js +6 -4
  400. package/tree/tree.min.js +1 -1
  401. package/treeselect/TreeSelect.d.ts +2 -2
  402. package/treetable/TreeTable.d.ts +2 -2
  403. package/treetable/TreeTable.vue +3 -3
  404. package/treetable/treetable.cjs.js +3 -3
  405. package/treetable/treetable.cjs.min.js +1 -1
  406. package/treetable/treetable.esm.js +3 -3
  407. package/treetable/treetable.esm.min.js +1 -1
  408. package/treetable/treetable.js +3 -3
  409. package/treetable/treetable.min.js +1 -1
  410. package/tristatecheckbox/TriStateCheckbox.d.ts +2 -2
  411. package/vetur-attributes.json +3 -3
  412. package/virtualscroller/VirtualScroller.d.ts +2 -2
  413. package/web-types.json +9 -4
@@ -161,56 +161,58 @@ var script = {
161
161
  }
162
162
  },
163
163
  updated: function updated() {
164
- var isCircular = this.isCircular();
165
- var stateChanged = false;
166
- var totalShiftedItems = this.totalShiftedItems;
167
- if (this.autoplayInterval) {
168
- this.stopAutoplay();
169
- }
170
- if (this.d_oldNumScroll !== this.d_numScroll || this.d_oldNumVisible !== this.d_numVisible || this.d_oldValue.length !== this.value.length) {
171
- this.remainingItems = (this.value.length - this.d_numVisible) % this.d_numScroll;
172
- var page = this.d_page;
173
- if (this.totalIndicators !== 0 && page >= this.totalIndicators) {
174
- page = this.totalIndicators - 1;
175
- this.$emit('update:page', page);
176
- this.d_page = page;
177
- stateChanged = true;
178
- }
179
- totalShiftedItems = page * this.d_numScroll * -1;
180
- if (isCircular) {
181
- totalShiftedItems -= this.d_numVisible;
182
- }
183
- if (page === this.totalIndicators - 1 && this.remainingItems > 0) {
184
- totalShiftedItems += -1 * this.remainingItems + this.d_numScroll;
185
- this.isRemainingItemsAdded = true;
186
- } else {
187
- this.isRemainingItemsAdded = false;
188
- }
189
- if (totalShiftedItems !== this.totalShiftedItems) {
190
- this.totalShiftedItems = totalShiftedItems;
191
- stateChanged = true;
164
+ if (!this.empty) {
165
+ var isCircular = this.isCircular();
166
+ var stateChanged = false;
167
+ var totalShiftedItems = this.totalShiftedItems;
168
+ if (this.autoplayInterval) {
169
+ this.stopAutoplay();
192
170
  }
193
- this.d_oldNumScroll = this.d_numScroll;
194
- this.d_oldNumVisible = this.d_numVisible;
195
- this.d_oldValue = this.value;
196
- this.$refs.itemsContainer.style.transform = this.isVertical() ? "translate3d(0, ".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0, 0)");
197
- }
198
- if (isCircular) {
199
- if (this.d_page === 0) {
200
- totalShiftedItems = -1 * this.d_numVisible;
201
- } else if (totalShiftedItems === 0) {
202
- totalShiftedItems = -1 * this.value.length;
203
- if (this.remainingItems > 0) {
171
+ if (this.d_oldNumScroll !== this.d_numScroll || this.d_oldNumVisible !== this.d_numVisible || this.d_oldValue.length !== this.value.length) {
172
+ this.remainingItems = (this.value.length - this.d_numVisible) % this.d_numScroll;
173
+ var page = this.d_page;
174
+ if (this.totalIndicators !== 0 && page >= this.totalIndicators) {
175
+ page = this.totalIndicators - 1;
176
+ this.$emit('update:page', page);
177
+ this.d_page = page;
178
+ stateChanged = true;
179
+ }
180
+ totalShiftedItems = page * this.d_numScroll * -1;
181
+ if (isCircular) {
182
+ totalShiftedItems -= this.d_numVisible;
183
+ }
184
+ if (page === this.totalIndicators - 1 && this.remainingItems > 0) {
185
+ totalShiftedItems += -1 * this.remainingItems + this.d_numScroll;
204
186
  this.isRemainingItemsAdded = true;
187
+ } else {
188
+ this.isRemainingItemsAdded = false;
205
189
  }
190
+ if (totalShiftedItems !== this.totalShiftedItems) {
191
+ this.totalShiftedItems = totalShiftedItems;
192
+ stateChanged = true;
193
+ }
194
+ this.d_oldNumScroll = this.d_numScroll;
195
+ this.d_oldNumVisible = this.d_numVisible;
196
+ this.d_oldValue = this.value;
197
+ this.$refs.itemsContainer.style.transform = this.isVertical() ? "translate3d(0, ".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0, 0)");
206
198
  }
207
- if (totalShiftedItems !== this.totalShiftedItems) {
208
- this.totalShiftedItems = totalShiftedItems;
209
- stateChanged = true;
199
+ if (isCircular) {
200
+ if (this.d_page === 0) {
201
+ totalShiftedItems = -1 * this.d_numVisible;
202
+ } else if (totalShiftedItems === 0) {
203
+ totalShiftedItems = -1 * this.value.length;
204
+ if (this.remainingItems > 0) {
205
+ this.isRemainingItemsAdded = true;
206
+ }
207
+ }
208
+ if (totalShiftedItems !== this.totalShiftedItems) {
209
+ this.totalShiftedItems = totalShiftedItems;
210
+ stateChanged = true;
211
+ }
212
+ }
213
+ if (!stateChanged && this.isAutoplay()) {
214
+ this.startAutoplay();
210
215
  }
211
- }
212
- if (!stateChanged && this.isAutoplay()) {
213
- this.startAutoplay();
214
216
  }
215
217
  },
216
218
  beforeUnmount: function beforeUnmount() {
@@ -338,7 +340,9 @@ var script = {
338
340
  };
339
341
  },
340
342
  onTouchMove: function onTouchMove(e) {
341
- if (e.cancelable) {
343
+ var touchobj = e.changedTouches[0];
344
+ var diff = this.isVertical() ? touchobj.pageY - this.startPos.y : touchobj.pageX - this.startPos.x;
345
+ if (Math.abs(diff) > this.swipeThreshold && e.cancelable) {
342
346
  e.preventDefault();
343
347
  }
344
348
  },
@@ -528,6 +532,13 @@ var script = {
528
532
  },
529
533
  attributeSelector: function attributeSelector() {
530
534
  return utils.UniqueComponentId();
535
+ },
536
+ empty: function empty() {
537
+ return !this.value || this.value.length === 0;
538
+ },
539
+ emptyMessageText: function emptyMessageText() {
540
+ var _this$$primevue$confi;
541
+ return ((_this$$primevue$confi = this.$primevue.config) === null || _this$$primevue$confi === void 0 || (_this$$primevue$confi = _this$$primevue$confi.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.emptyMessage) || '';
531
542
  }
532
543
  },
533
544
  components: {
@@ -562,7 +573,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
562
573
  }, _ctx.ptmi('root')), [_ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
563
574
  key: 0,
564
575
  "class": _ctx.cx('header')
565
- }, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header")], 16)) : vue.createCommentVNode("", true), vue.createElementVNode("div", vue.mergeProps({
576
+ }, _ctx.ptm('header')), [vue.renderSlot(_ctx.$slots, "header")], 16)) : vue.createCommentVNode("", true), !$options.empty ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
577
+ key: 1,
566
578
  "class": [_ctx.cx('content'), _ctx.contentClass]
567
579
  }, _ctx.ptm('content')), [vue.createElementVNode("div", vue.mergeProps({
568
580
  "class": [_ctx.cx('container'), _ctx.containerClass],
@@ -694,8 +706,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
694
706
  return $options.onIndicatorClick($event, i);
695
707
  }
696
708
  }, _ctx.ptm('indicatorButton', $options.getIndicatorPTOptions(i))), null, 16, _hoisted_7)], 16, _hoisted_6);
697
- }), 128))], 16)) : vue.createCommentVNode("", true)], 16), _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
698
- key: 1,
709
+ }), 128))], 16)) : vue.createCommentVNode("", true)], 16)) : vue.renderSlot(_ctx.$slots, "empty", {
710
+ key: 2
711
+ }, function () {
712
+ return [vue.createTextVNode(vue.toDisplayString($options.emptyMessageText), 1)];
713
+ }), _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", vue.mergeProps({
714
+ key: 3,
699
715
  "class": _ctx.cx('footer')
700
716
  }, _ctx.ptm('footer')), [vue.renderSlot(_ctx.$slots, "footer")], 16)) : vue.createCommentVNode("", true)], 16);
701
717
  }
@@ -1 +1 @@
1
- "use strict";var t=require("primevue/icons/chevrondown"),e=require("primevue/icons/chevronleft"),i=require("primevue/icons/chevronright"),n=require("primevue/icons/chevronup"),r=require("primevue/ripple"),o=require("primevue/utils"),a=require("primevue/basecomponent"),s=require("primevue/carousel/style"),l=require("vue");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=c(t),u=c(e),h=c(i),m=c(n),p=c(r);function f(t){return y(t)||b(t)||g(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return I(t)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var S={name:"Carousel",extends:{name:"BaseCarousel",extends:c(a).default,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},style:c(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&o.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var r=this.d_page;r=parseInt(r*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*r*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",r),this.d_page=r}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&o.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.DomHandler.getAttribute(t,"data-p-highlight")})),i=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=f(this.responsiveOptions),n=o.ObjectUtils.localeComparator();i.sort((function(t,e){return o.ObjectUtils.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var r=0;r<i.length;r++){var a=i[r];e+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return o.UniqueComponentId()}},components:{ChevronRightIcon:h.default,ChevronDownIcon:d.default,ChevronLeftIcon:u.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function C(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?C(Object(i),!0).forEach((function(e){x(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):C(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function x(t,e,i){var n;return(e="symbol"==_(n=k(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){if("object"!=_(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=["aria-live"],B=["disabled","aria-label"],P=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],$=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],A=["disabled","aria-label"],D=["data-p-highlight"],E=["tabindex","aria-label","aria-current","onClick"];S.render=function(t,e,i,n,r,o){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":r.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},V(V({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,B)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:o.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:e[3]||(e[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:e[4]||(e[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},t.ptm("itemsContainer")),[o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*r.totalShiftedItems===t.value.length+r.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*r.d_numVisible).length-1===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,P)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":o.firstIndex()>i||o.lastIndex()<i||void 0,"aria-label":o.ariaSlideNumber(i),"aria-roledescription":o.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=i&&o.lastIndex()>=i,"data-p-carousel-item-start":o.firstIndex()===i,"data-p-carousel-item-end":o.lastIndex()===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,$)})),128)),o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},V(V({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0)],16,w),o.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.totalIndicators,(function(e,i){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":r.d_page===i}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:r.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":r.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,E)],16,D)})),128))],16)):l.createCommentVNode("",!0)],16),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},module.exports=S;
1
+ "use strict";var t=require("primevue/icons/chevrondown"),e=require("primevue/icons/chevronleft"),i=require("primevue/icons/chevronright"),n=require("primevue/icons/chevronup"),r=require("primevue/ripple"),o=require("primevue/utils"),a=require("primevue/basecomponent"),s=require("primevue/carousel/style"),l=require("vue");function c(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=c(t),u=c(e),h=c(i),m=c(n),p=c(r);function f(t){return y(t)||b(t)||g(t)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(t,e){if(t){if("string"==typeof t)return I(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?I(t,e):void 0}}function b(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function y(t){if(Array.isArray(t))return I(t)}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var S={name:"Carousel",extends:{name:"BaseCarousel",extends:c(a).default,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},style:c(s).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){if(!this.empty){var t=this.isCircular(),e=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()}},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&o.DomHandler.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var r=this.d_page;r=parseInt(r*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*r*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",r),this.d_page=r}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&o.DomHandler.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){var e=t.changedTouches[0],i=this.isVertical()?e.pageY-this.startPos.y:e.pageX-this.startPos.x;Math.abs(i)>this.swipeThreshold&&t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===o.DomHandler.getAttribute(t,"data-p-highlight")})),i=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=o.DomHandler.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=f(o.DomHandler.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",o.DomHandler.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=f(this.responsiveOptions),n=o.ObjectUtils.localeComparator();i.sort((function(t,e){return o.ObjectUtils.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var r=0;r<i.length;r++){var a=i[r];e+="\n @media screen and (max-width: ".concat(a.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/a.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return o.UniqueComponentId()},empty:function(){return!this.value||0===this.value.length},emptyMessageText:function(){var t;return(null===(t=this.$primevue.config)||void 0===t||null===(t=t.locale)||void 0===t?void 0:t.emptyMessage)||""}},components:{ChevronRightIcon:h.default,ChevronDownIcon:d.default,ChevronLeftIcon:u.default,ChevronUpIcon:m.default},directives:{ripple:p.default}};function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function x(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function C(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?x(Object(i),!0).forEach((function(e){V(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function V(t,e,i){var n;return(e="symbol"==_(n=k(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function k(t,e){if("object"!=_(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=["aria-live"],B=["disabled","aria-label"],P=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],$=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],A=["disabled","aria-label"],D=["data-p-highlight"],E=["tabindex","aria-label","aria-current","onClick"];S.render=function(t,e,i,n,r,o){var a=l.resolveDirective("ripple");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:0,class:t.cx("header")},t.ptm("header")),[l.renderSlot(t.$slots,"header")],16)):l.createCommentVNode("",!0),o.empty?l.renderSlot(t.$slots,"empty",{key:2},(function(){return[l.createTextVNode(l.toDisplayString(o.emptyMessageText),1)]})):(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:1,class:[t.cx("content"),t.contentClass]},t.ptm("content")),[l.createElementVNode("div",l.mergeProps({class:[t.cx("container"),t.containerClass],"aria-live":r.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:0,type:"button",class:t.cx("previousButton"),disabled:o.backwardIsDisabled,"aria-label":o.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return o.navBackward&&o.navBackward.apply(o,arguments)})},C(C({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"previousicon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),l.mergeProps({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,B)),[[a]]):l.createCommentVNode("",!0),l.createElementVNode("div",l.mergeProps({class:t.cx("itemsContent"),style:[{height:o.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return o.onTouchEnd&&o.onTouchEnd.apply(o,arguments)}),onTouchstart:e[3]||(e[3]=function(){return o.onTouchStart&&o.onTouchStart.apply(o,arguments)}),onTouchmove:e[4]||(e[4]=function(){return o.onTouchMove&&o.onTouchMove.apply(o,arguments)})},t.ptm("itemsContent")),[l.createElementVNode("div",l.mergeProps({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return o.onTransitionEnd&&o.onTransitionEnd.apply(o,arguments)})},t.ptm("itemsContainer")),[o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(t.value.slice(-1*r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*r.totalShiftedItems===t.value.length+r.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*r.d_numVisible).length-1===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,P)})),128)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.value,(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":o.firstIndex()>i||o.lastIndex()<i||void 0,"aria-label":o.ariaSlideNumber(i),"aria-roledescription":o.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":o.firstIndex()<=i&&o.lastIndex()>=i,"data-p-carousel-item-start":o.firstIndex()===i,"data-p-carousel-item-end":o.lastIndex()===i}),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16,$)})),128)),o.isCircular()?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(t.value.slice(0,r.d_numVisible),(function(e,i){return l.openBlock(),l.createElementBlock("div",l.mergeProps({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:r.totalShiftedItems,d_numVisible:r.d_numVisible})},t.ptm("itemCloned")),[l.renderSlot(t.$slots,"item",{data:e,index:i})],16)})),128)):l.createCommentVNode("",!0)],16)],16),t.showNavigators?l.withDirectives((l.openBlock(),l.createElementBlock("button",l.mergeProps({key:1,type:"button",class:t.cx("nextButton"),disabled:o.forwardIsDisabled,"aria-label":o.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return o.navForward&&o.navForward.apply(o,arguments)})},C(C({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[l.renderSlot(t.$slots,"nexticon",{},(function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(o.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),l.mergeProps({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,A)),[[a]]):l.createCommentVNode("",!0)],16,w),o.totalIndicators>=0&&t.showIndicators?(l.openBlock(),l.createElementBlock("ul",l.mergeProps({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return o.onIndicatorKeydown&&o.onIndicatorKeydown.apply(o,arguments)})},t.ptm("indicators")),[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.totalIndicators,(function(e,i){return l.openBlock(),l.createElementBlock("li",l.mergeProps({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",o.getIndicatorPTOptions(i)),{"data-p-highlight":r.d_page===i}),[l.createElementVNode("button",l.mergeProps({class:t.cx("indicatorButton"),type:"button",tabindex:r.d_page===i?"0":"-1","aria-label":o.ariaPageLabel(i+1),"aria-current":r.d_page===i?"page":void 0,onClick:function(t){return o.onIndicatorClick(t,i)}},t.ptm("indicatorButton",o.getIndicatorPTOptions(i))),null,16,E)],16,D)})),128))],16)):l.createCommentVNode("",!0)],16)),t.$slots.footer?(l.openBlock(),l.createElementBlock("div",l.mergeProps({key:3,class:t.cx("footer")},t.ptm("footer")),[l.renderSlot(t.$slots,"footer")],16)):l.createCommentVNode("",!0)],16)},module.exports=S;
@@ -6,7 +6,7 @@ import Ripple from 'primevue/ripple';
6
6
  import { DomHandler, ObjectUtils, UniqueComponentId } from 'primevue/utils';
7
7
  import BaseComponent from 'primevue/basecomponent';
8
8
  import CarouselStyle from 'primevue/carousel/style';
9
- import { resolveDirective, openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, withDirectives, createBlock, resolveDynamicComponent, Fragment, renderList } from 'vue';
9
+ import { resolveDirective, openBlock, createElementBlock, mergeProps, renderSlot, createCommentVNode, createElementVNode, withDirectives, createBlock, resolveDynamicComponent, Fragment, renderList, createTextVNode, toDisplayString } from 'vue';
10
10
 
11
11
  var script$1 = {
12
12
  name: 'BaseCarousel',
@@ -149,56 +149,58 @@ var script = {
149
149
  }
150
150
  },
151
151
  updated: function updated() {
152
- var isCircular = this.isCircular();
153
- var stateChanged = false;
154
- var totalShiftedItems = this.totalShiftedItems;
155
- if (this.autoplayInterval) {
156
- this.stopAutoplay();
157
- }
158
- if (this.d_oldNumScroll !== this.d_numScroll || this.d_oldNumVisible !== this.d_numVisible || this.d_oldValue.length !== this.value.length) {
159
- this.remainingItems = (this.value.length - this.d_numVisible) % this.d_numScroll;
160
- var page = this.d_page;
161
- if (this.totalIndicators !== 0 && page >= this.totalIndicators) {
162
- page = this.totalIndicators - 1;
163
- this.$emit('update:page', page);
164
- this.d_page = page;
165
- stateChanged = true;
166
- }
167
- totalShiftedItems = page * this.d_numScroll * -1;
168
- if (isCircular) {
169
- totalShiftedItems -= this.d_numVisible;
170
- }
171
- if (page === this.totalIndicators - 1 && this.remainingItems > 0) {
172
- totalShiftedItems += -1 * this.remainingItems + this.d_numScroll;
173
- this.isRemainingItemsAdded = true;
174
- } else {
175
- this.isRemainingItemsAdded = false;
176
- }
177
- if (totalShiftedItems !== this.totalShiftedItems) {
178
- this.totalShiftedItems = totalShiftedItems;
179
- stateChanged = true;
152
+ if (!this.empty) {
153
+ var isCircular = this.isCircular();
154
+ var stateChanged = false;
155
+ var totalShiftedItems = this.totalShiftedItems;
156
+ if (this.autoplayInterval) {
157
+ this.stopAutoplay();
180
158
  }
181
- this.d_oldNumScroll = this.d_numScroll;
182
- this.d_oldNumVisible = this.d_numVisible;
183
- this.d_oldValue = this.value;
184
- this.$refs.itemsContainer.style.transform = this.isVertical() ? "translate3d(0, ".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0, 0)");
185
- }
186
- if (isCircular) {
187
- if (this.d_page === 0) {
188
- totalShiftedItems = -1 * this.d_numVisible;
189
- } else if (totalShiftedItems === 0) {
190
- totalShiftedItems = -1 * this.value.length;
191
- if (this.remainingItems > 0) {
159
+ if (this.d_oldNumScroll !== this.d_numScroll || this.d_oldNumVisible !== this.d_numVisible || this.d_oldValue.length !== this.value.length) {
160
+ this.remainingItems = (this.value.length - this.d_numVisible) % this.d_numScroll;
161
+ var page = this.d_page;
162
+ if (this.totalIndicators !== 0 && page >= this.totalIndicators) {
163
+ page = this.totalIndicators - 1;
164
+ this.$emit('update:page', page);
165
+ this.d_page = page;
166
+ stateChanged = true;
167
+ }
168
+ totalShiftedItems = page * this.d_numScroll * -1;
169
+ if (isCircular) {
170
+ totalShiftedItems -= this.d_numVisible;
171
+ }
172
+ if (page === this.totalIndicators - 1 && this.remainingItems > 0) {
173
+ totalShiftedItems += -1 * this.remainingItems + this.d_numScroll;
192
174
  this.isRemainingItemsAdded = true;
175
+ } else {
176
+ this.isRemainingItemsAdded = false;
193
177
  }
178
+ if (totalShiftedItems !== this.totalShiftedItems) {
179
+ this.totalShiftedItems = totalShiftedItems;
180
+ stateChanged = true;
181
+ }
182
+ this.d_oldNumScroll = this.d_numScroll;
183
+ this.d_oldNumVisible = this.d_numVisible;
184
+ this.d_oldValue = this.value;
185
+ this.$refs.itemsContainer.style.transform = this.isVertical() ? "translate3d(0, ".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0)") : "translate3d(".concat(totalShiftedItems * (100 / this.d_numVisible), "%, 0, 0)");
194
186
  }
195
- if (totalShiftedItems !== this.totalShiftedItems) {
196
- this.totalShiftedItems = totalShiftedItems;
197
- stateChanged = true;
187
+ if (isCircular) {
188
+ if (this.d_page === 0) {
189
+ totalShiftedItems = -1 * this.d_numVisible;
190
+ } else if (totalShiftedItems === 0) {
191
+ totalShiftedItems = -1 * this.value.length;
192
+ if (this.remainingItems > 0) {
193
+ this.isRemainingItemsAdded = true;
194
+ }
195
+ }
196
+ if (totalShiftedItems !== this.totalShiftedItems) {
197
+ this.totalShiftedItems = totalShiftedItems;
198
+ stateChanged = true;
199
+ }
200
+ }
201
+ if (!stateChanged && this.isAutoplay()) {
202
+ this.startAutoplay();
198
203
  }
199
- }
200
- if (!stateChanged && this.isAutoplay()) {
201
- this.startAutoplay();
202
204
  }
203
205
  },
204
206
  beforeUnmount: function beforeUnmount() {
@@ -326,7 +328,9 @@ var script = {
326
328
  };
327
329
  },
328
330
  onTouchMove: function onTouchMove(e) {
329
- if (e.cancelable) {
331
+ var touchobj = e.changedTouches[0];
332
+ var diff = this.isVertical() ? touchobj.pageY - this.startPos.y : touchobj.pageX - this.startPos.x;
333
+ if (Math.abs(diff) > this.swipeThreshold && e.cancelable) {
330
334
  e.preventDefault();
331
335
  }
332
336
  },
@@ -516,6 +520,13 @@ var script = {
516
520
  },
517
521
  attributeSelector: function attributeSelector() {
518
522
  return UniqueComponentId();
523
+ },
524
+ empty: function empty() {
525
+ return !this.value || this.value.length === 0;
526
+ },
527
+ emptyMessageText: function emptyMessageText() {
528
+ var _this$$primevue$confi;
529
+ return ((_this$$primevue$confi = this.$primevue.config) === null || _this$$primevue$confi === void 0 || (_this$$primevue$confi = _this$$primevue$confi.locale) === null || _this$$primevue$confi === void 0 ? void 0 : _this$$primevue$confi.emptyMessage) || '';
519
530
  }
520
531
  },
521
532
  components: {
@@ -550,7 +561,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
550
561
  }, _ctx.ptmi('root')), [_ctx.$slots.header ? (openBlock(), createElementBlock("div", mergeProps({
551
562
  key: 0,
552
563
  "class": _ctx.cx('header')
553
- }, _ctx.ptm('header')), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), createElementVNode("div", mergeProps({
564
+ }, _ctx.ptm('header')), [renderSlot(_ctx.$slots, "header")], 16)) : createCommentVNode("", true), !$options.empty ? (openBlock(), createElementBlock("div", mergeProps({
565
+ key: 1,
554
566
  "class": [_ctx.cx('content'), _ctx.contentClass]
555
567
  }, _ctx.ptm('content')), [createElementVNode("div", mergeProps({
556
568
  "class": [_ctx.cx('container'), _ctx.containerClass],
@@ -682,8 +694,12 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
682
694
  return $options.onIndicatorClick($event, i);
683
695
  }
684
696
  }, _ctx.ptm('indicatorButton', $options.getIndicatorPTOptions(i))), null, 16, _hoisted_7)], 16, _hoisted_6);
685
- }), 128))], 16)) : createCommentVNode("", true)], 16), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({
686
- key: 1,
697
+ }), 128))], 16)) : createCommentVNode("", true)], 16)) : renderSlot(_ctx.$slots, "empty", {
698
+ key: 2
699
+ }, function () {
700
+ return [createTextVNode(toDisplayString($options.emptyMessageText), 1)];
701
+ }), _ctx.$slots.footer ? (openBlock(), createElementBlock("div", mergeProps({
702
+ key: 3,
687
703
  "class": _ctx.cx('footer')
688
704
  }, _ctx.ptm('footer')), [renderSlot(_ctx.$slots, "footer")], 16)) : createCommentVNode("", true)], 16);
689
705
  }
@@ -1 +1 @@
1
- import t from"primevue/icons/chevrondown";import e from"primevue/icons/chevronleft";import i from"primevue/icons/chevronright";import n from"primevue/icons/chevronup";import a from"primevue/ripple";import{DomHandler as s,ObjectUtils as o,UniqueComponentId as r}from"primevue/utils";import l from"primevue/basecomponent";import c from"primevue/carousel/style";import{resolveDirective as u,openBlock as d,createElementBlock as h,mergeProps as m,renderSlot as p,createCommentVNode as f,createElementVNode as v,withDirectives as b,createBlock as g,resolveDynamicComponent as y,Fragment as I,renderList as _}from"vue";function S(t){return V(t)||C(t)||w(t)||x()}function x(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(t,e){if(t){if("string"==typeof t)return $(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$(t,e):void 0}}function C(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function V(t){if(Array.isArray(t))return $(t)}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var A={name:"Carousel",extends:{name:"BaseCarousel",extends:l,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},style:c,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){var t=this.isCircular(),e=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&s.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var a=this.d_page;a=parseInt(a*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*a*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",a),this.d_page=a}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&s.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===s.getAttribute(t,"data-p-highlight")})),i=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=S(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",s.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=S(this.responsiveOptions),n=o.localeComparator();i.sort((function(t,e){return o.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var a=0;a<i.length;a++){var r=i[a];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r()}},components:{ChevronRightIcon:i,ChevronDownIcon:t,ChevronLeftIcon:e,ChevronUpIcon:n},directives:{ripple:a}};function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function k(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function O(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?k(Object(i),!0).forEach((function(e){T(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function T(t,e,i){var n;return(e="symbol"==P(n=L(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function L(t,e){if("object"!=P(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var B=["aria-live"],D=["disabled","aria-label"],N=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],R=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],E=["disabled","aria-label"],j=["data-p-highlight"],F=["tabindex","aria-label","aria-current","onClick"];A.render=function(t,e,i,n,a,s){var o=u("ripple");return d(),h("div",m({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(d(),h("div",m({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):f("",!0),v("div",m({class:[t.cx("content"),t.contentClass]},t.ptm("content")),[v("div",m({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?b((d(),h("button",m({key:0,type:"button",class:t.cx("previousButton"),disabled:s.backwardIsDisabled,"aria-label":s.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return s.navBackward&&s.navBackward.apply(s,arguments)})},O(O({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"previousicon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),m({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,D)),[[o]]):f("",!0),v("div",m({class:t.cx("itemsContent"),style:[{height:s.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return s.onTouchEnd&&s.onTouchEnd.apply(s,arguments)}),onTouchstart:e[3]||(e[3]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onTouchmove:e[4]||(e[4]=function(){return s.onTouchMove&&s.onTouchMove.apply(s,arguments)})},t.ptm("itemsContent")),[v("div",m({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return s.onTransitionEnd&&s.onTransitionEnd.apply(s,arguments)})},t.ptm("itemsContainer")),[s.isCircular()?(d(!0),h(I,{key:0},_(t.value.slice(-1*a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*a.totalShiftedItems===t.value.length+a.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*a.d_numVisible).length-1===i}),[p(t.$slots,"item",{data:e,index:i})],16,N)})),128)):f("",!0),(d(!0),h(I,null,_(t.value,(function(e,i){return d(),h("div",m({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":s.firstIndex()>i||s.lastIndex()<i||void 0,"aria-label":s.ariaSlideNumber(i),"aria-roledescription":s.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":s.firstIndex()<=i&&s.lastIndex()>=i,"data-p-carousel-item-start":s.firstIndex()===i,"data-p-carousel-item-end":s.lastIndex()===i}),[p(t.$slots,"item",{data:e,index:i})],16,R)})),128)),s.isCircular()?(d(!0),h(I,{key:1},_(t.value.slice(0,a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned")),[p(t.$slots,"item",{data:e,index:i})],16)})),128)):f("",!0)],16)],16),t.showNavigators?b((d(),h("button",m({key:1,type:"button",class:t.cx("nextButton"),disabled:s.forwardIsDisabled,"aria-label":s.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return s.navForward&&s.navForward.apply(s,arguments)})},O(O({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"nexticon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),m({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,E)),[[o]]):f("",!0)],16,B),s.totalIndicators>=0&&t.showIndicators?(d(),h("ul",m({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return s.onIndicatorKeydown&&s.onIndicatorKeydown.apply(s,arguments)})},t.ptm("indicators")),[(d(!0),h(I,null,_(s.totalIndicators,(function(e,i){return d(),h("li",m({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",s.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[v("button",m({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":s.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return s.onIndicatorClick(t,i)}},t.ptm("indicatorButton",s.getIndicatorPTOptions(i))),null,16,F)],16,j)})),128))],16)):f("",!0)],16),t.$slots.footer?(d(),h("div",m({key:1,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):f("",!0)],16)};export{A as default};
1
+ import t from"primevue/icons/chevrondown";import e from"primevue/icons/chevronleft";import i from"primevue/icons/chevronright";import n from"primevue/icons/chevronup";import a from"primevue/ripple";import{DomHandler as s,ObjectUtils as o,UniqueComponentId as r}from"primevue/utils";import l from"primevue/basecomponent";import c from"primevue/carousel/style";import{resolveDirective as u,openBlock as d,createElementBlock as h,mergeProps as m,renderSlot as p,createCommentVNode as f,createElementVNode as v,withDirectives as b,createBlock as g,resolveDynamicComponent as y,Fragment as I,renderList as _,createTextVNode as S,toDisplayString as x}from"vue";function w(t){return A(t)||$(t)||V(t)||C()}function C(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function V(t,e){if(t){if("string"==typeof t)return P(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?P(t,e):void 0}}function $(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function A(t){if(Array.isArray(t))return P(t)}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var k={name:"Carousel",extends:{name:"BaseCarousel",extends:l,props:{value:null,page:{type:Number,default:0},numVisible:{type:Number,default:1},numScroll:{type:Number,default:1},responsiveOptions:Array,orientation:{type:String,default:"horizontal"},verticalViewPortHeight:{type:String,default:"300px"},contentClass:String,containerClass:String,indicatorsContentClass:String,circular:{type:Boolean,default:!1},autoplayInterval:{type:Number,default:0},showNavigators:{type:Boolean,default:!0},showIndicators:{type:Boolean,default:!0},prevButtonProps:{type:null,default:null},nextButtonProps:{type:null,default:null}},style:c,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:page"],isRemainingItemsAdded:!1,data:function(){return{remainingItems:0,d_numVisible:this.numVisible,d_numScroll:this.numScroll,d_oldNumScroll:0,d_oldNumVisible:0,d_oldValue:null,d_page:this.page,totalShiftedItems:this.page*this.numScroll*-1,allowAutoplay:!!this.autoplayInterval,d_circular:this.circular||this.allowAutoplay,swipeThreshold:20}},watch:{page:function(t){t>this.d_page?this.navForward({},t):t<this.d_page&&this.navBackward({},t),this.d_page=t},circular:function(t){this.d_circular=t},numVisible:function(t,e){this.d_numVisible=t,this.d_oldNumVisible=e},numScroll:function(t,e){this.d_oldNumScroll=e,this.d_numScroll=t},value:function(t){this.d_oldValue=t}},mounted:function(){var t=!1;if(this.$el.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners(),this.isCircular()){var e=this.totalShiftedItems;0===this.d_page?e=-1*this.d_numVisible:0===e&&(e=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),e!==this.totalShiftedItems&&(this.totalShiftedItems=e,t=!0)}!t&&this.isAutoplay()&&this.startAutoplay()},updated:function(){if(!this.empty){var t=this.isCircular(),e=!1,i=this.totalShiftedItems;if(this.autoplayInterval&&this.stopAutoplay(),this.d_oldNumScroll!==this.d_numScroll||this.d_oldNumVisible!==this.d_numVisible||this.d_oldValue.length!==this.value.length){this.remainingItems=(this.value.length-this.d_numVisible)%this.d_numScroll;var n=this.d_page;0!==this.totalIndicators&&n>=this.totalIndicators&&(this.$emit("update:page",n=this.totalIndicators-1),this.d_page=n,e=!0),i=n*this.d_numScroll*-1,t&&(i-=this.d_numVisible),n===this.totalIndicators-1&&this.remainingItems>0?(i+=-1*this.remainingItems+this.d_numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0),this.d_oldNumScroll=this.d_numScroll,this.d_oldNumVisible=this.d_numVisible,this.d_oldValue=this.value,this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)")}t&&(0===this.d_page?i=-1*this.d_numVisible:0===i&&(i=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),i!==this.totalShiftedItems&&(this.totalShiftedItems=i,e=!0)),!e&&this.isAutoplay()&&this.startAutoplay()}},beforeUnmount:function(){this.responsiveOptions&&this.unbindDocumentListeners(),this.autoplayInterval&&this.stopAutoplay()},methods:{getIndicatorPTOptions:function(t){return{context:{highlighted:t===this.d_page}}},step:function(t,e){var i=this.totalShiftedItems,n=this.isCircular();null!=e?(i=this.d_numScroll*e*-1,n&&(i-=this.d_numVisible),this.isRemainingItemsAdded=!1):(i+=this.d_numScroll*t,this.isRemainingItemsAdded&&(i+=this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!1),e=Math.abs(Math.floor((n?i+this.d_numVisible:i)/this.d_numScroll)));n&&this.d_page===this.totalIndicators-1&&-1===t?(i=-1*(this.value.length+this.d_numVisible),e=0):n&&0===this.d_page&&1===t?(i=0,e=this.totalIndicators-1):e===this.totalIndicators-1&&this.remainingItems>0&&(i+=-1*this.remainingItems-this.d_numScroll*t,this.isRemainingItemsAdded=!0),this.$refs.itemsContainer&&(!this.isUnstyled&&s.removeClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(i*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.d_numVisible),"%, 0, 0)"),this.$refs.itemsContainer.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i,this.$emit("update:page",e),this.d_page=e},calculatePosition:function(){if(this.$refs.itemsContainer&&this.responsiveOptions){for(var t=window.innerWidth,e={numVisible:this.numVisible,numScroll:this.numScroll},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=t&&(e=n)}if(this.d_numScroll!==e.numScroll){var a=this.d_page;a=parseInt(a*this.d_numScroll/e.numScroll),this.totalShiftedItems=e.numScroll*a*-1,this.isCircular()&&(this.totalShiftedItems-=e.numVisible),this.d_numScroll=e.numScroll,this.$emit("update:page",a),this.d_page=a}this.d_numVisible!==e.numVisible&&(this.d_numVisible=e.numVisible)}},navBackward:function(t,e){(this.d_circular||0!==this.d_page)&&this.step(1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},navForward:function(t,e){(this.d_circular||this.d_page<this.totalIndicators-1)&&this.step(-1,e),this.allowAutoplay=!1,t.cancelable&&t.preventDefault()},onIndicatorClick:function(t,e){var i=this.d_page;e>i?this.navForward(t,e):e<i&&this.navBackward(t,e)},onTransitionEnd:function(){this.$refs.itemsContainer&&(!this.isUnstyled&&s.addClass(this.$refs.itemsContainer,"p-items-hidden"),this.$refs.itemsContainer.style.transition="",0!==this.d_page&&this.d_page!==this.totalIndicators-1||!this.isCircular()||(this.$refs.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0)"):"translate3d(".concat(this.totalShiftedItems*(100/this.d_numVisible),"%, 0, 0)")))},onTouchStart:function(t){var e=t.changedTouches[0];this.startPos={x:e.pageX,y:e.pageY}},onTouchMove:function(t){var e=t.changedTouches[0],i=this.isVertical()?e.pageY-this.startPos.y:e.pageX-this.startPos.x;Math.abs(i)>this.swipeThreshold&&t.cancelable&&t.preventDefault()},onTouchEnd:function(t){var e=t.changedTouches[0];this.isVertical()?this.changePageOnTouch(t,e.pageY-this.startPos.y):this.changePageOnTouch(t,e.pageX-this.startPos.x)},changePageOnTouch:function(t,e){Math.abs(e)>this.swipeThreshold&&(e<0?this.navForward(t):this.navBackward(t))},onIndicatorKeydown:function(t){switch(t.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break;case"Home":this.onHomeKey(),t.preventDefault();break;case"End":this.onEndKey(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"PageUp":case"PageDown":t.preventDefault();break;case"Tab":this.onTabKey()}},onRightKey:function(){var t=w(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,e+1===t.length?t.length-1:e+1)},onLeftKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,t-1<=0?0:t-1)},onHomeKey:function(){var t=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(t,0)},onEndKey:function(){var t=w(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(e,t.length-1)},onTabKey:function(){var t=w(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=t.findIndex((function(t){return!0===s.getAttribute(t,"data-p-highlight")})),i=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]'),n=t.findIndex((function(t){return t===i.parentElement}));t[n].children[0].tabIndex="-1",t[e].children[0].tabIndex="0"},findFocusedIndicatorIndex:function(){var t=w(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]')),e=s.findSingle(this.$refs.indicatorContent,'[data-pc-section="indicator"] > button[tabindex="0"]');return t.findIndex((function(t){return t===e.parentElement}))},changedFocusedIndicator:function(t,e){var i=w(s.find(this.$refs.indicatorContent,'[data-pc-section="indicator"]'));i[t].children[0].tabIndex="-1",i[e].children[0].tabIndex="0",i[e].children[0].focus()},bindDocumentListeners:function(){var t=this;this.documentResizeListener||(this.documentResizeListener=function(e){t.calculatePosition(e)},window.addEventListener("resize",this.documentResizeListener))},unbindDocumentListeners:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)},startAutoplay:function(){var t=this;this.interval=setInterval((function(){t.step(-1,t.d_page===t.totalIndicators-1?0:t.d_page+1)}),this.autoplayInterval)},stopAutoplay:function(){this.interval&&clearInterval(this.interval)},createStyle:function(){var t;this.carouselStyle||(this.carouselStyle=document.createElement("style"),this.carouselStyle.type="text/css",s.setAttribute(this.carouselStyle,"nonce",null===(t=this.$primevue)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce),document.body.appendChild(this.carouselStyle));var e="\n .p-carousel[".concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/this.d_numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.isUnstyled){var i=w(this.responsiveOptions),n=o.localeComparator();i.sort((function(t,e){return o.sort(t.breakpoint,e.breakpoint,-1,n)}));for(var a=0;a<i.length;a++){var r=i[a];e+="\n @media screen and (max-width: ".concat(r.breakpoint,") {\n .p-carousel[").concat(this.attributeSelector,"] .p-carousel-item {\n flex: 1 0 ").concat(100/r.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=e},isVertical:function(){return"vertical"===this.orientation},isCircular:function(){return this.value&&this.d_circular&&this.value.length>=this.d_numVisible},isAutoplay:function(){return this.autoplayInterval&&this.allowAutoplay},firstIndex:function(){return this.isCircular()?-1*(this.totalShiftedItems+this.d_numVisible):-1*this.totalShiftedItems},lastIndex:function(){return this.firstIndex()+this.d_numVisible-1},ariaSlideNumber:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slideNumber.replace(/{slideNumber}/g,t):void 0},ariaPageLabel:function(t){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.pageLabel.replace(/{page}/g,t):void 0}},computed:{totalIndicators:function(){return this.value?Math.max(Math.ceil((this.value.length-this.d_numVisible)/this.d_numScroll)+1,0):0},backwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&0===this.d_page},forwardIsDisabled:function(){return this.value&&(!this.circular||this.value.length<this.d_numVisible)&&(this.d_page===this.totalIndicators-1||0===this.totalIndicators)},ariaSlideLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.slide:void 0},ariaPrevButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.prevPageLabel:void 0},ariaNextButtonLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.nextPageLabel:void 0},attributeSelector:function(){return r()},empty:function(){return!this.value||0===this.value.length},emptyMessageText:function(){var t;return(null===(t=this.$primevue.config)||void 0===t||null===(t=t.locale)||void 0===t?void 0:t.emptyMessage)||""}},components:{ChevronRightIcon:i,ChevronDownIcon:t,ChevronLeftIcon:e,ChevronUpIcon:n},directives:{ripple:a}};function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function O(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function L(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?O(Object(i),!0).forEach((function(e){B(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):O(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function B(t,e,i){var n;return(e="symbol"==T(n=D(e,"string"))?n:String(n))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function D(t,e){if("object"!=T(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var N=["aria-live"],R=["disabled","aria-label"],E=["data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],j=["aria-hidden","aria-label","aria-roledescription","data-p-carousel-item-active","data-p-carousel-item-start","data-p-carousel-item-end"],F=["disabled","aria-label"],K=["data-p-highlight"],M=["tabindex","aria-label","aria-current","onClick"];k.render=function(t,e,i,n,a,s){var o=u("ripple");return d(),h("div",m({class:t.cx("root"),role:"region"},t.ptmi("root")),[t.$slots.header?(d(),h("div",m({key:0,class:t.cx("header")},t.ptm("header")),[p(t.$slots,"header")],16)):f("",!0),s.empty?p(t.$slots,"empty",{key:2},(function(){return[S(x(s.emptyMessageText),1)]})):(d(),h("div",m({key:1,class:[t.cx("content"),t.contentClass]},t.ptm("content")),[v("div",m({class:[t.cx("container"),t.containerClass],"aria-live":a.allowAutoplay?"polite":"off"},t.ptm("container")),[t.showNavigators?b((d(),h("button",m({key:0,type:"button",class:t.cx("previousButton"),disabled:s.backwardIsDisabled,"aria-label":s.ariaPrevButtonLabel,onClick:e[0]||(e[0]=function(){return s.navBackward&&s.navBackward.apply(s,arguments)})},L(L({},t.prevButtonProps),t.ptm("previousButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"previousicon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronUpIcon":"ChevronLeftIcon"),m({class:t.cx("previousButtonIcon")},t.ptm("previousButtonIcon")),null,16,["class"]))]}))],16,R)),[[o]]):f("",!0),v("div",m({class:t.cx("itemsContent"),style:[{height:s.isVertical()?t.verticalViewPortHeight:"auto"}],onTouchend:e[2]||(e[2]=function(){return s.onTouchEnd&&s.onTouchEnd.apply(s,arguments)}),onTouchstart:e[3]||(e[3]=function(){return s.onTouchStart&&s.onTouchStart.apply(s,arguments)}),onTouchmove:e[4]||(e[4]=function(){return s.onTouchMove&&s.onTouchMove.apply(s,arguments)})},t.ptm("itemsContent")),[v("div",m({ref:"itemsContainer",class:t.cx("itemsContainer"),onTransitionend:e[1]||(e[1]=function(){return s.onTransitionEnd&&s.onTransitionEnd.apply(s,arguments)})},t.ptm("itemsContainer")),[s.isCircular()?(d(!0),h(I,{key:0},_(t.value.slice(-1*a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_scloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned"),{"data-p-carousel-item-active":-1*a.totalShiftedItems===t.value.length+a.d_numVisible,"data-p-carousel-item-start":0===i,"data-p-carousel-item-end":t.value.slice(-1*a.d_numVisible).length-1===i}),[p(t.$slots,"item",{data:e,index:i})],16,E)})),128)):f("",!0),(d(!0),h(I,null,_(t.value,(function(e,i){return d(),h("div",m({key:i,class:t.cx("item",{index:i}),role:"group","aria-hidden":s.firstIndex()>i||s.lastIndex()<i||void 0,"aria-label":s.ariaSlideNumber(i),"aria-roledescription":s.ariaSlideLabel},t.ptm("item"),{"data-p-carousel-item-active":s.firstIndex()<=i&&s.lastIndex()>=i,"data-p-carousel-item-start":s.firstIndex()===i,"data-p-carousel-item-end":s.lastIndex()===i}),[p(t.$slots,"item",{data:e,index:i})],16,j)})),128)),s.isCircular()?(d(!0),h(I,{key:1},_(t.value.slice(0,a.d_numVisible),(function(e,i){return d(),h("div",m({key:i+"_fcloned",class:t.cx("itemCloned",{index:i,value:t.value,totalShiftedItems:a.totalShiftedItems,d_numVisible:a.d_numVisible})},t.ptm("itemCloned")),[p(t.$slots,"item",{data:e,index:i})],16)})),128)):f("",!0)],16)],16),t.showNavigators?b((d(),h("button",m({key:1,type:"button",class:t.cx("nextButton"),disabled:s.forwardIsDisabled,"aria-label":s.ariaNextButtonLabel,onClick:e[5]||(e[5]=function(){return s.navForward&&s.navForward.apply(s,arguments)})},L(L({},t.nextButtonProps),t.ptm("nextButton")),{"data-pc-group-section":"navigator"}),[p(t.$slots,"nexticon",{},(function(){return[(d(),g(y(s.isVertical()?"ChevronDownIcon":"ChevronRightIcon"),m({class:t.cx("nextButtonIcon")},t.ptm("nextButtonIcon")),null,16,["class"]))]}))],16,F)),[[o]]):f("",!0)],16,N),s.totalIndicators>=0&&t.showIndicators?(d(),h("ul",m({key:0,ref:"indicatorContent",class:[t.cx("indicators"),t.indicatorsContentClass],onKeydown:e[6]||(e[6]=function(){return s.onIndicatorKeydown&&s.onIndicatorKeydown.apply(s,arguments)})},t.ptm("indicators")),[(d(!0),h(I,null,_(s.totalIndicators,(function(e,i){return d(),h("li",m({key:"p-carousel-indicator-"+i.toString(),class:t.cx("indicator",{index:i})},t.ptm("indicator",s.getIndicatorPTOptions(i)),{"data-p-highlight":a.d_page===i}),[v("button",m({class:t.cx("indicatorButton"),type:"button",tabindex:a.d_page===i?"0":"-1","aria-label":s.ariaPageLabel(i+1),"aria-current":a.d_page===i?"page":void 0,onClick:function(t){return s.onIndicatorClick(t,i)}},t.ptm("indicatorButton",s.getIndicatorPTOptions(i))),null,16,M)],16,K)})),128))],16)):f("",!0)],16)),t.$slots.footer?(d(),h("div",m({key:3,class:t.cx("footer")},t.ptm("footer")),[p(t.$slots,"footer")],16)):f("",!0)],16)};export{k as default};