@windrun-huaiin/third-ui 7.6.1 → 10.0.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 (577) hide show
  1. package/dist/_virtual/advancedFormat.js +1 -1
  2. package/dist/_virtual/advancedFormat.mjs +1 -1
  3. package/dist/_virtual/customParseFormat.js +1 -1
  4. package/dist/_virtual/customParseFormat.mjs +1 -1
  5. package/dist/_virtual/dayjs.min.js +1 -1
  6. package/dist/_virtual/dayjs.min.mjs +1 -1
  7. package/dist/_virtual/isoWeek.js +1 -1
  8. package/dist/_virtual/isoWeek.mjs +1 -1
  9. package/dist/clerk/clerk-organization.js +1 -1
  10. package/dist/clerk/clerk-organization.mjs +1 -1
  11. package/dist/clerk/{clerk-page-generator-client.js → clerk-page-context-generator.js} +2 -2
  12. package/dist/clerk/{clerk-page-generator-client.mjs → clerk-page-context-generator.mjs} +2 -2
  13. package/dist/clerk/clerk-page-generator.js +3 -3
  14. package/dist/clerk/clerk-page-generator.mjs +3 -3
  15. package/dist/clerk/clerk-user-client.js +4 -3
  16. package/dist/clerk/clerk-user-client.mjs +4 -3
  17. package/dist/clerk/clerk-user.js +1 -1
  18. package/dist/clerk/clerk-user.mjs +1 -1
  19. package/dist/clerk/fingerprint/fingerprint-client.js +1 -1
  20. package/dist/clerk/fingerprint/fingerprint-client.mjs +1 -1
  21. package/dist/clerk/fingerprint/fingerprint-provider.js +147 -56
  22. package/dist/clerk/fingerprint/fingerprint-provider.mjs +148 -57
  23. package/dist/clerk/fingerprint/fingerprint-server.d.ts +16 -0
  24. package/dist/clerk/fingerprint/fingerprint-server.js +18 -0
  25. package/dist/clerk/fingerprint/fingerprint-server.mjs +18 -1
  26. package/dist/clerk/fingerprint/server.js +1 -0
  27. package/dist/clerk/fingerprint/server.mjs +1 -1
  28. package/dist/clerk/fingerprint/types.d.ts +13 -2
  29. package/dist/clerk/fingerprint/use-fingerprint.js +1 -1
  30. package/dist/clerk/fingerprint/use-fingerprint.mjs +1 -1
  31. package/dist/clerk/index.d.ts +2 -1
  32. package/dist/clerk/index.js +5 -3
  33. package/dist/clerk/index.mjs +2 -1
  34. package/dist/clerk/signin-with-fingerprint-client.js +4 -11
  35. package/dist/clerk/signin-with-fingerprint-client.mjs +4 -11
  36. package/dist/clerk/signup-button-with-fingerprint-client.d.ts +6 -0
  37. package/dist/clerk/signup-button-with-fingerprint-client.js +56 -0
  38. package/dist/clerk/signup-button-with-fingerprint-client.mjs +54 -0
  39. package/dist/clerk/signup-with-fingerprint-client.js +4 -11
  40. package/dist/clerk/signup-with-fingerprint-client.mjs +4 -11
  41. package/dist/fuma/base/custom-header.d.ts +38 -0
  42. package/dist/fuma/base/custom-header.js +163 -0
  43. package/dist/fuma/base/custom-header.mjs +161 -0
  44. package/dist/fuma/base/custom-home-layout.d.ts +68 -0
  45. package/dist/fuma/base/custom-home-layout.js +48 -0
  46. package/dist/fuma/base/custom-home-layout.mjs +46 -0
  47. package/dist/fuma/base/index.d.ts +2 -0
  48. package/dist/fuma/base/index.js +9 -0
  49. package/dist/fuma/base/index.mjs +2 -0
  50. package/dist/fuma/fuma-banner-suit.d.ts +2 -1
  51. package/dist/fuma/fuma-banner-suit.js +9 -3
  52. package/dist/fuma/fuma-banner-suit.mjs +9 -3
  53. package/dist/fuma/fuma-page-genarator.d.ts +4 -1
  54. package/dist/fuma/fuma-page-genarator.js +15 -6
  55. package/dist/fuma/fuma-page-genarator.mjs +15 -6
  56. package/dist/fuma/fuma-translate-util.d.ts +2 -0
  57. package/dist/fuma/fuma-translate-util.js +40 -0
  58. package/dist/fuma/fuma-translate-util.mjs +38 -0
  59. package/dist/fuma/llm-copy-handler.js +9 -8
  60. package/dist/fuma/llm-copy-handler.mjs +9 -8
  61. package/dist/fuma/mdx/banner.d.ts +7 -1
  62. package/dist/fuma/mdx/banner.js +15 -15
  63. package/dist/fuma/mdx/banner.mjs +15 -15
  64. package/dist/fuma/mdx/fuma-github-info.js +1 -1
  65. package/dist/fuma/mdx/fuma-github-info.mjs +1 -1
  66. package/dist/fuma/mdx/gradient-button.js +29 -18
  67. package/dist/fuma/mdx/gradient-button.mjs +29 -18
  68. package/dist/fuma/mdx/image-zoom.js +2 -2
  69. package/dist/fuma/mdx/image-zoom.mjs +2 -2
  70. package/dist/fuma/mdx/mermaid.js +3 -3
  71. package/dist/fuma/mdx/mermaid.mjs +3 -3
  72. package/dist/fuma/mdx/toc-base.js +9 -4
  73. package/dist/fuma/mdx/toc-base.mjs +9 -4
  74. package/dist/fuma/mdx/zia-card.js +3 -3
  75. package/dist/fuma/mdx/zia-card.mjs +3 -3
  76. package/dist/fuma/mdx/zia-file.js +1 -1
  77. package/dist/fuma/mdx/zia-file.mjs +1 -1
  78. package/dist/fuma/server.d.ts +1 -0
  79. package/dist/fuma/server.js +2 -0
  80. package/dist/fuma/server.mjs +1 -0
  81. package/dist/fuma/site-x.js +1 -1
  82. package/dist/fuma/site-x.mjs +1 -1
  83. package/dist/lib/fuma-schema-check-util.d.ts +4 -57
  84. package/dist/lib/fuma-schema-check-util.js +10 -31
  85. package/dist/lib/fuma-schema-check-util.mjs +11 -29
  86. package/dist/lib/server.d.ts +0 -1
  87. package/dist/lib/server.js +0 -5
  88. package/dist/lib/server.mjs +1 -2
  89. package/dist/main/ai-prompt-textarea.js +1 -1
  90. package/dist/main/ai-prompt-textarea.mjs +1 -1
  91. package/dist/main/credit/credit-nav-button.d.ts +21 -0
  92. package/dist/main/credit/credit-nav-button.js +117 -0
  93. package/dist/main/credit/credit-nav-button.mjs +114 -0
  94. package/dist/main/credit/credit-overview-client.d.ts +26 -0
  95. package/dist/main/credit/credit-overview-client.js +269 -0
  96. package/dist/main/credit/credit-overview-client.mjs +267 -0
  97. package/dist/main/credit/credit-overview.d.ts +8 -0
  98. package/dist/main/credit/credit-overview.js +34 -0
  99. package/dist/main/credit/credit-overview.mjs +32 -0
  100. package/dist/main/credit/types.d.ts +68 -0
  101. package/dist/main/cta.js +3 -2
  102. package/dist/main/cta.mjs +3 -2
  103. package/dist/main/faq.js +5 -4
  104. package/dist/main/faq.mjs +5 -4
  105. package/dist/main/features.js +3 -2
  106. package/dist/main/features.mjs +3 -2
  107. package/dist/main/footer.js +2 -2
  108. package/dist/main/footer.mjs +2 -2
  109. package/dist/main/gallery/gallery-desktop-grid.d.ts +6 -0
  110. package/dist/main/gallery/gallery-desktop-grid.js +10 -0
  111. package/dist/main/gallery/gallery-desktop-grid.mjs +8 -0
  112. package/dist/main/gallery/gallery-interactive.d.ts +4 -0
  113. package/dist/main/gallery/gallery-interactive.js +128 -0
  114. package/dist/main/gallery/gallery-interactive.mjs +126 -0
  115. package/dist/main/gallery/gallery-mobile-swiper.d.ts +6 -0
  116. package/dist/main/gallery/gallery-mobile-swiper.js +13 -0
  117. package/dist/main/gallery/gallery-mobile-swiper.mjs +11 -0
  118. package/dist/main/gallery/gallery-server.d.ts +2 -0
  119. package/dist/main/gallery/gallery-server.js +44 -0
  120. package/dist/main/gallery/gallery-server.mjs +42 -0
  121. package/dist/main/gallery/gallery-types.d.ts +19 -0
  122. package/dist/main/gallery-interactive.js +1 -1
  123. package/dist/main/gallery-interactive.mjs +1 -1
  124. package/dist/main/gallery.js +6 -5
  125. package/dist/main/gallery.mjs +6 -5
  126. package/dist/main/go-to-top.js +1 -1
  127. package/dist/main/go-to-top.mjs +1 -1
  128. package/dist/main/index.d.ts +3 -1
  129. package/dist/main/index.js +5 -1
  130. package/dist/main/index.mjs +3 -1
  131. package/dist/main/money-price/customer-portal.d.ts +7 -0
  132. package/dist/main/money-price/customer-portal.js +54 -0
  133. package/dist/main/money-price/customer-portal.mjs +52 -0
  134. package/dist/main/money-price/money-price-button.d.ts +1 -1
  135. package/dist/main/money-price/money-price-button.js +162 -42
  136. package/dist/main/money-price/money-price-button.mjs +162 -42
  137. package/dist/main/money-price/money-price-config-util.d.ts +50 -2
  138. package/dist/main/money-price/money-price-config-util.js +177 -4
  139. package/dist/main/money-price/money-price-config-util.mjs +175 -4
  140. package/dist/main/money-price/money-price-data.d.ts +8 -0
  141. package/dist/main/money-price/money-price-data.js +28 -0
  142. package/dist/main/money-price/money-price-data.mjs +26 -0
  143. package/dist/main/money-price/money-price-interactive.d.ts +1 -1
  144. package/dist/main/money-price/money-price-interactive.js +251 -288
  145. package/dist/main/money-price/money-price-interactive.mjs +253 -290
  146. package/dist/main/money-price/money-price-types.d.ts +69 -20
  147. package/dist/main/money-price/money-price.d.ts +1 -1
  148. package/dist/main/money-price/money-price.js +9 -62
  149. package/dist/main/money-price/money-price.mjs +10 -63
  150. package/dist/main/price-plan.js +6 -6
  151. package/dist/main/price-plan.mjs +6 -6
  152. package/dist/main/section-layout.d.ts +1 -0
  153. package/dist/main/section-layout.js +7 -0
  154. package/dist/main/section-layout.mjs +5 -0
  155. package/dist/main/seo-content.js +3 -2
  156. package/dist/main/seo-content.mjs +3 -2
  157. package/dist/main/server.d.ts +6 -3
  158. package/dist/main/server.js +9 -4
  159. package/dist/main/server.mjs +4 -2
  160. package/dist/main/tips.js +3 -2
  161. package/dist/main/tips.mjs +3 -2
  162. package/dist/main/usage.js +4 -3
  163. package/dist/main/usage.mjs +4 -3
  164. package/dist/main/x-button.js +6 -6
  165. package/dist/main/x-button.mjs +6 -6
  166. package/dist/node_modules/.pnpm/@fingerprintjs_fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.js +1 -1
  167. package/dist/node_modules/.pnpm/@fingerprintjs_fingerprintjs@4.6.2/node_modules/@fingerprintjs/fingerprintjs/dist/fp.esm.mjs +1 -1
  168. package/dist/node_modules/.pnpm/{@iconify_utils@2.3.0 → @iconify_utils@3.0.2}/node_modules/@iconify/utils/lib/customisations/defaults.js +7 -6
  169. package/dist/node_modules/.pnpm/{@iconify_utils@2.3.0 → @iconify_utils@3.0.2}/node_modules/@iconify/utils/lib/customisations/defaults.mjs +7 -6
  170. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/defaults.js +39 -0
  171. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/defaults.mjs +34 -0
  172. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/merge.js +20 -0
  173. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/merge.mjs +18 -0
  174. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/name.js +60 -0
  175. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/name.mjs +57 -0
  176. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/transformations.js +15 -0
  177. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon/transformations.mjs +13 -0
  178. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/get-icon.js +30 -0
  179. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +27 -0
  180. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/tree.js +26 -0
  181. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/icon-set/tree.mjs +24 -0
  182. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/build.js +118 -0
  183. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/build.mjs +115 -0
  184. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/defs.js +36 -0
  185. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/defs.mjs +32 -0
  186. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/html.js +12 -0
  187. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/html.mjs +10 -0
  188. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/id.js +48 -0
  189. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/id.mjs +46 -0
  190. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/size.js +30 -0
  191. package/dist/node_modules/.pnpm/@iconify_utils@3.0.2/node_modules/@iconify/utils/lib/svg/size.mjs +28 -0
  192. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-U656AL7Q.js +9 -0
  193. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-O4VJ6CD3.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-U656AL7Q.mjs} +2 -2
  194. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KMC2YHZD.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-76Q3JFCE.js} +8 -8
  195. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KMC2YHZD.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-76Q3JFCE.mjs} +1 -1
  196. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4KMFLZZN.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FPAJGGOC.js} +1 -1
  197. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4KMFLZZN.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FPAJGGOC.mjs} +1 -1
  198. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-XRWGC2XP.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FWNWRKHM.js} +13 -13
  199. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-XRWGC2XP.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FWNWRKHM.mjs} +1 -1
  200. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T44TD3VJ.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LBM3YZW2.js} +8 -8
  201. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T44TD3VJ.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LBM3YZW2.mjs} +1 -1
  202. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFRQ32O7.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LHMN2FUI.js} +8 -8
  203. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFRQ32O7.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LHMN2FUI.mjs} +1 -1
  204. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-JEIROHC2.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-O7ZBX7Z2.js} +10 -10
  205. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-JEIROHC2.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-O7ZBX7Z2.mjs} +1 -1
  206. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BN7GFLIU.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-S6J4BHB3.js} +8 -8
  207. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BN7GFLIU.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-S6J4BHB3.mjs} +1 -1
  208. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFWHJNB7.js → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T53DSG4Q.js} +10 -10
  209. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WFWHJNB7.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-T53DSG4Q.mjs} +1 -1
  210. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-F6HP7TQM.js +9 -0
  211. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-ZV4HHKMB.mjs → @mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-F6HP7TQM.mjs} +2 -2
  212. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-NVLQJR56.js +9 -0
  213. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-NVLQJR56.mjs +2 -0
  214. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-BFZMPI3H.js +9 -0
  215. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-BFZMPI3H.mjs +2 -0
  216. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-7BOR55EZ.js +9 -0
  217. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-7BOR55EZ.mjs +2 -0
  218. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NHE76QYJ.js +9 -0
  219. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NHE76QYJ.mjs +2 -0
  220. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-KMMF4GRG.js +9 -0
  221. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-KMMF4GRG.mjs +2 -0
  222. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.3/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +129 -0
  223. package/dist/node_modules/.pnpm/{@mermaid-js_parser@0.6.2 → @mermaid-js_parser@0.6.3}/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.mjs +16 -16
  224. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +0 -3
  225. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/cross-count.mjs +0 -3
  226. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/bk.js +24 -4
  227. package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/bk.mjs +24 -4
  228. package/dist/node_modules/.pnpm/{dompurify@3.2.6 → dompurify@3.3.0}/node_modules/dompurify/dist/purify.es.js +59 -25
  229. package/dist/node_modules/.pnpm/{dompurify@3.2.6 → dompurify@3.3.0}/node_modules/dompurify/dist/purify.es.mjs +59 -25
  230. package/dist/node_modules/.pnpm/{katex@0.16.22 → katex@0.16.25}/node_modules/katex/dist/katex.js +26 -34
  231. package/dist/node_modules/.pnpm/{katex@0.16.22 → katex@0.16.25}/node_modules/katex/dist/katex.mjs +26 -34
  232. package/dist/node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.js +84 -0
  233. package/dist/node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.mjs +74 -0
  234. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-SUXI7LT5.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js} +373 -351
  235. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-SUXI7LT5.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.mjs} +320 -298
  236. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-6J76NXCF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.js} +393 -380
  237. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-6J76NXCF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-VD42YOAC.mjs} +162 -149
  238. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-6F6E4RAY.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.js} +126 -125
  239. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-6F6E4RAY.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-YG6GDRKO.mjs} +10 -9
  240. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-353BL4L5.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.js} +2 -2
  241. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-353BL4L5.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-4BX2VUAB.mjs} +1 -1
  242. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BFAMUDN2.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js} +2 -2
  243. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-BFAMUDN2.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.mjs} +1 -1
  244. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-RKKUNAVE.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-6MN3ZHY7.js} +15 -15
  245. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-RKKUNAVE.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-6MN3ZHY7.mjs} +15 -15
  246. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3XYRH5AP.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js} +142 -203
  247. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3XYRH5AP.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs} +27 -85
  248. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.js +81 -0
  249. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs +76 -0
  250. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-UWXLY5YG.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.js} +30 -11
  251. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-UWXLY5YG.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.mjs} +22 -3
  252. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SZ463SBG.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-B4BG7PRW.js} +207 -205
  253. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SZ463SBG.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-B4BG7PRW.mjs} +132 -130
  254. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AC5SNWB5.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js} +2 -2
  255. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AC5SNWB5.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.mjs} +1 -1
  256. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OW32GOEJ.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DI55MBZ5.js} +98 -97
  257. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-OW32GOEJ.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DI55MBZ5.mjs} +10 -9
  258. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-P3VETL53.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.js} +4 -3
  259. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-P3VETL53.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-EXTU4WIE.mjs} +2 -1
  260. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-E2GYISFI.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.js} +2 -2
  261. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-E2GYISFI.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-FMBD7UC4.mjs} +1 -1
  262. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MXNHSMXR.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.js} +17 -9
  263. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MXNHSMXR.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.mjs} +11 -5
  264. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QESNASVV.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js} +51 -50
  265. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QESNASVV.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.mjs} +23 -22
  266. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JW4RIYDF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js} +731 -440
  267. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JW4RIYDF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.mjs} +404 -113
  268. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-L5ZGVLVO.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.js} +139 -139
  269. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-L5ZGVLVO.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-MI3HLSF2.mjs} +5 -5
  270. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-IWUHOULB.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js} +29 -22
  271. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-IWUHOULB.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.mjs} +13 -6
  272. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SKB7J2MH.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.js} +7 -6
  273. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-SKB7J2MH.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.mjs} +2 -1
  274. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-M6DAPIYF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js} +211 -85
  275. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-M6DAPIYF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.mjs} +142 -16
  276. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AACKK3MU.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.js} +2 -2
  277. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-AACKK3MU.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QZHKN3VN.mjs} +1 -1
  278. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55PJQP7W.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.js} +61 -49
  279. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55PJQP7W.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.mjs} +13 -1
  280. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-67H74DCK.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js} +10 -9
  281. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-67H74DCK.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.mjs} +2 -1
  282. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-2ON5EDUG.js +31 -0
  283. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-M3E45YP4.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-2ON5EDUG.mjs} +9 -8
  284. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-WZHVMYZB.js +31 -0
  285. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-YAWTLIQI.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-WZHVMYZB.mjs} +9 -8
  286. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +302 -0
  287. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.mjs +300 -0
  288. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-JOIXM2OF.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.js} +123 -122
  289. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-JOIXM2OF.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/dagre-6UL2VRFP.mjs} +12 -11
  290. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-VMROVX33.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PSM6KHXK.js} +46 -45
  291. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-VMROVX33.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-PSM6KHXK.mjs} +8 -7
  292. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-ZTM2IBQH.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js} +45 -44
  293. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-ZTM2IBQH.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.mjs} +6 -5
  294. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5UYTHUR4.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.js} +68 -57
  295. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5UYTHUR4.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/diagram-S2PKOQOG.mjs} +56 -45
  296. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-3M52JZNH.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-Q2GNP2WA.js} +70 -69
  297. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-3M52JZNH.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-Q2GNP2WA.mjs} +14 -13
  298. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-KYDEHFYC.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-NV44I4VS.js} +97 -93
  299. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-KYDEHFYC.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-NV44I4VS.mjs} +20 -16
  300. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-EK5VF46D.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.js} +134 -125
  301. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-EK5VF46D.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-LVOFAZNH.mjs} +27 -18
  302. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-GW3U2K7C.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-NY62KEGX.js} +116 -115
  303. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-GW3U2K7C.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-NY62KEGX.mjs} +6 -5
  304. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-ER5ION4S.js +42 -0
  305. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-LHK5PUON.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-ER5ION4S.mjs} +5 -4
  306. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-EWQZEKCU.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-XKPGCS4Q.js} +100 -99
  307. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-EWQZEKCU.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-XKPGCS4Q.mjs} +10 -9
  308. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-ZSS6B67P.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-3W4ZIXB7.js} +79 -78
  309. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-ZSS6B67P.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/kanban-definition-3W4ZIXB7.mjs} +12 -11
  310. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-6CBA2TL7.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-VGOIOE7T.js} +277 -379
  311. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-6CBA2TL7.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-VGOIOE7T.mjs} +234 -336
  312. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-NIOCPIFQ.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js} +58 -56
  313. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-NIOCPIFQ.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.mjs} +30 -28
  314. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-2OG54O6I.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-AYHSOK5B.js} +96 -95
  315. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-2OG54O6I.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-AYHSOK5B.mjs} +6 -5
  316. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-QOLK2EJ7.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-UZGBJVZJ.js} +64 -63
  317. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-QOLK2EJ7.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/requirementDiagram-UZGBJVZJ.mjs} +14 -13
  318. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-4UZDY2LN.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.js} +73 -69
  319. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-4UZDY2LN.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-TZEHDZUN.mjs} +17 -13
  320. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-SKLFT4DO.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js} +839 -376
  321. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-SKLFT4DO.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.mjs} +591 -128
  322. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-MI5ZYTHO.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FKZM4ZOC.js} +94 -93
  323. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-MI5ZYTHO.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-FKZM4ZOC.mjs} +12 -11
  324. package/dist/node_modules/.pnpm/mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-4FDKWEC3.js +31 -0
  325. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-5AN5P6BG.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-4FDKWEC3.mjs} +9 -8
  326. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-MYPXXCX6.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js} +93 -92
  327. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-MYPXXCX6.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.mjs} +8 -7
  328. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-H2YORKM3.js → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PRI3JC2R.js} +136 -133
  329. package/dist/node_modules/.pnpm/{mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-H2YORKM3.mjs → mermaid@11.12.1/node_modules/mermaid/dist/chunks/mermaid.core/xychartDiagram-PRI3JC2R.mjs} +43 -40
  330. package/dist/node_modules/.pnpm/{mermaid@11.9.0 → mermaid@11.12.1}/node_modules/mermaid/dist/mermaid.core.js +226 -225
  331. package/dist/node_modules/.pnpm/{mermaid@11.9.0 → mermaid@11.12.1}/node_modules/mermaid/dist/mermaid.core.mjs +43 -42
  332. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.3.0_react-dom@19.1.0_react@19.1.0__react@19.1.0 → react-medium-image-zoom@5.4.0_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/react-medium-image-zoom/dist/index.js +16 -12
  333. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.3.0_react-dom@19.1.0_react@19.1.0__react@19.1.0 → react-medium-image-zoom@5.4.0_react-dom@19.2.0_react@19.2.0__react@19.2.0}/node_modules/react-medium-image-zoom/dist/index.mjs +16 -12
  334. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.js +461 -0
  335. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/modules/pagination.mjs +459 -0
  336. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/classes-to-selector.js +8 -0
  337. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/classes-to-selector.mjs +6 -0
  338. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/create-element-if-not-defined.js +23 -0
  339. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/create-element-if-not-defined.mjs +21 -0
  340. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/ssr-window.esm.js +143 -0
  341. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/ssr-window.esm.mjs +140 -0
  342. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/swiper-core.js +3874 -0
  343. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/swiper-core.mjs +3871 -0
  344. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-on-virtual-data.js +129 -0
  345. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-on-virtual-data.mjs +124 -0
  346. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-swiper.js +226 -0
  347. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/update-swiper.mjs +216 -0
  348. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/utils.js +310 -0
  349. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/shared/utils.mjs +288 -0
  350. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper-react.js +390 -0
  351. package/dist/node_modules/.pnpm/swiper@12.0.3/node_modules/swiper/swiper-react.mjs +387 -0
  352. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js +6 -0
  353. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.mjs +4 -0
  354. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js +15 -0
  355. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.mjs +13 -0
  356. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
  357. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.mjs +28 -0
  358. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +21 -0
  359. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
  360. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.js +52 -0
  361. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/errors.mjs +50 -0
  362. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.js +44 -0
  363. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/iso.mjs +35 -0
  364. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.js +31 -0
  365. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/parse.mjs +18 -0
  366. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.js +492 -0
  367. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/classic/schemas.mjs +439 -0
  368. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.js +434 -0
  369. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/api.mjs +388 -0
  370. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.js +245 -0
  371. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/checks.mjs +232 -0
  372. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.js +68 -0
  373. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/core.mjs +62 -0
  374. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.js +80 -0
  375. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/errors.mjs +75 -0
  376. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.js +101 -0
  377. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/parse.mjs +86 -0
  378. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.js +102 -0
  379. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/regexes.mjs +76 -0
  380. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.js +56 -0
  381. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/registries.mjs +52 -0
  382. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.js +952 -0
  383. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/schemas.mjs +909 -0
  384. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.js +182 -0
  385. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/util.mjs +163 -0
  386. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.js +9 -0
  387. package/dist/node_modules/.pnpm/zod@4.1.12/node_modules/zod/v4/core/versions.mjs +7 -0
  388. package/package.json +27 -21
  389. package/src/clerk/{clerk-page-generator-client.tsx → clerk-page-context-generator.tsx} +2 -2
  390. package/src/clerk/clerk-page-generator.tsx +3 -3
  391. package/src/clerk/clerk-user-client.tsx +7 -12
  392. package/src/clerk/fingerprint/fingerprint-provider.tsx +311 -112
  393. package/src/clerk/fingerprint/fingerprint-server.ts +33 -5
  394. package/src/clerk/fingerprint/types.ts +16 -2
  395. package/src/clerk/fingerprint/use-fingerprint.ts +1 -1
  396. package/src/clerk/index.ts +2 -1
  397. package/src/clerk/signin-with-fingerprint-client.tsx +3 -11
  398. package/src/clerk/signup-button-with-fingerprint-client.tsx +87 -0
  399. package/src/clerk/signup-with-fingerprint-client.tsx +3 -11
  400. package/src/fuma/base/custom-header.tsx +574 -0
  401. package/src/fuma/base/custom-home-layout.tsx +146 -0
  402. package/src/fuma/base/index.ts +2 -0
  403. package/src/fuma/fuma-banner-suit.tsx +22 -5
  404. package/src/fuma/fuma-page-genarator.tsx +29 -9
  405. package/src/fuma/fuma-translate-util.ts +44 -0
  406. package/src/fuma/llm-copy-handler.ts +8 -7
  407. package/src/fuma/mdx/airtical-card.tsx +1 -1
  408. package/src/fuma/mdx/banner.tsx +25 -7
  409. package/src/fuma/mdx/gradient-button.tsx +43 -26
  410. package/src/fuma/mdx/mermaid.tsx +2 -2
  411. package/src/fuma/mdx/toc-base.tsx +9 -4
  412. package/src/fuma/mdx/zia-card.tsx +6 -6
  413. package/src/fuma/server.ts +1 -0
  414. package/src/lib/fuma-schema-check-util.ts +11 -40
  415. package/src/lib/server.ts +0 -1
  416. package/src/main/ai-prompt-textarea.tsx +1 -1
  417. package/src/main/credit/credit-nav-button.tsx +283 -0
  418. package/src/main/credit/credit-overview-client.tsx +552 -0
  419. package/src/main/credit/credit-overview.tsx +53 -0
  420. package/src/main/credit/types.ts +89 -0
  421. package/src/main/cta.tsx +9 -8
  422. package/src/main/faq.tsx +4 -3
  423. package/src/main/features.tsx +3 -3
  424. package/src/main/footer.tsx +1 -1
  425. package/src/main/gallery/gallery-desktop-grid.tsx +41 -0
  426. package/src/main/gallery/gallery-interactive.tsx +153 -0
  427. package/src/main/gallery/gallery-mobile-swiper.tsx +65 -0
  428. package/src/main/gallery/gallery-server.tsx +46 -0
  429. package/src/main/gallery/gallery-types.ts +22 -0
  430. package/src/main/go-to-top.tsx +1 -1
  431. package/src/main/index.ts +5 -3
  432. package/src/main/money-price/customer-portal.ts +63 -0
  433. package/src/main/money-price/money-price-button.tsx +211 -56
  434. package/src/main/money-price/money-price-config-util.ts +222 -5
  435. package/src/main/money-price/money-price-data.ts +49 -0
  436. package/src/main/money-price/money-price-interactive.tsx +479 -356
  437. package/src/main/money-price/money-price-types.ts +76 -22
  438. package/src/main/money-price/money-price.tsx +28 -267
  439. package/src/main/price-plan.tsx +3 -3
  440. package/src/main/section-layout.ts +5 -0
  441. package/src/main/seo-content.tsx +2 -2
  442. package/src/main/server.ts +15 -4
  443. package/src/main/tips.tsx +2 -2
  444. package/src/main/usage.tsx +4 -4
  445. package/src/main/x-button.tsx +13 -13
  446. package/src/styles/fuma.css +38 -13
  447. package/src/styles/third-ui.css +37 -2
  448. package/dist/lib/fuma-search-util.d.ts +0 -2
  449. package/dist/lib/fuma-search-util.js +0 -8
  450. package/dist/lib/fuma-search-util.mjs +0 -6
  451. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.js +0 -29
  452. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/defaults.mjs +0 -24
  453. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.js +0 -22
  454. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/merge.mjs +0 -20
  455. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/name.js +0 -55
  456. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/name.mjs +0 -52
  457. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.js +0 -18
  458. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon/transformations.mjs +0 -16
  459. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.js +0 -29
  460. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/get-icon.mjs +0 -26
  461. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.js +0 -25
  462. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/icon-set/tree.mjs +0 -23
  463. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.js +0 -122
  464. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/build.mjs +0 -119
  465. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.js +0 -34
  466. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/defs.mjs +0 -30
  467. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/html.js +0 -11
  468. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/html.mjs +0 -9
  469. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/id.js +0 -30
  470. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/id.mjs +0 -28
  471. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.js +0 -42
  472. package/dist/node_modules/.pnpm/@iconify_utils@2.3.0/node_modules/@iconify/utils/lib/svg/size.mjs +0 -40
  473. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-O4VJ6CD3.js +0 -9
  474. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-ZV4HHKMB.js +0 -9
  475. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-63CPKGFF.js +0 -9
  476. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-63CPKGFF.mjs +0 -2
  477. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-HUATNLJX.js +0 -9
  478. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-HUATNLJX.mjs +0 -2
  479. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-WTHONI2E.js +0 -9
  480. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-WTHONI2E.mjs +0 -2
  481. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NJJJXTRR.js +0 -9
  482. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-NJJJXTRR.mjs +0 -2
  483. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-75Q7IDZK.js +0 -9
  484. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-75Q7IDZK.mjs +0 -2
  485. package/dist/node_modules/.pnpm/@mermaid-js_parser@0.6.2/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +0 -129
  486. package/dist/node_modules/.pnpm/marked@16.1.2/node_modules/marked/lib/marked.esm.js +0 -83
  487. package/dist/node_modules/.pnpm/marked@16.1.2/node_modules/marked/lib/marked.esm.mjs +0 -73
  488. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-M3E45YP4.js +0 -30
  489. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-YAWTLIQI.js +0 -30
  490. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-LHK5PUON.js +0 -41
  491. package/dist/node_modules/.pnpm/mermaid@11.9.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-5AN5P6BG.js +0 -30
  492. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js +0 -135
  493. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.mjs +0 -132
  494. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js +0 -11
  495. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.mjs +0 -8
  496. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js +0 -8
  497. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.mjs +0 -8
  498. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js +0 -122
  499. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.mjs +0 -111
  500. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js +0 -138
  501. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.mjs +0 -135
  502. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js +0 -113
  503. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.mjs +0 -111
  504. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js +0 -3339
  505. package/dist/node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.mjs +0 -3297
  506. package/src/lib/fuma-search-util.ts +0 -6
  507. package/src/main/gallery-interactive.tsx +0 -171
  508. package/src/main/gallery.tsx +0 -98
  509. /package/dist/clerk/{clerk-page-generator-client.d.ts → clerk-page-context-generator.d.ts} +0 -0
  510. /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.2 → @rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3}/node_modules/tslib/tslib.es6.js +0 -0
  511. /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.2 → @rollup_plugin-typescript@12.1.4_rollup@4.46.2_tslib@2.8.1_typescript@5.9.3}/node_modules/tslib/tslib.es6.mjs +0 -0
  512. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/acyclic.js +0 -0
  513. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/acyclic.mjs +0 -0
  514. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/add-border-segments.js +0 -0
  515. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/add-border-segments.mjs +0 -0
  516. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/coordinate-system.js +0 -0
  517. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/coordinate-system.mjs +0 -0
  518. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/data/list.js +0 -0
  519. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/data/list.mjs +0 -0
  520. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +0 -0
  521. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/greedy-fas.mjs +0 -0
  522. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/layout.js +0 -0
  523. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/layout.mjs +0 -0
  524. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +0 -0
  525. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/nesting-graph.mjs +0 -0
  526. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/normalize.js +0 -0
  527. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/normalize.mjs +0 -0
  528. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js +0 -0
  529. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.mjs +0 -0
  530. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/barycenter.js +0 -0
  531. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/barycenter.mjs +0 -0
  532. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js +0 -0
  533. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.mjs +0 -0
  534. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/index.js +0 -0
  535. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/index.mjs +0 -0
  536. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/init-order.js +0 -0
  537. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/init-order.mjs +0 -0
  538. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +0 -0
  539. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.mjs +0 -0
  540. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +0 -0
  541. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.mjs +0 -0
  542. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort.js +0 -0
  543. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/order/sort.mjs +0 -0
  544. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js +0 -0
  545. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.mjs +0 -0
  546. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/index.js +0 -0
  547. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/position/index.mjs +0 -0
  548. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js +0 -0
  549. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.mjs +0 -0
  550. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/index.js +0 -0
  551. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/index.mjs +0 -0
  552. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +0 -0
  553. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.mjs +0 -0
  554. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/util.js +0 -0
  555. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/rank/util.mjs +0 -0
  556. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/util.js +0 -0
  557. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/dagre/util.mjs +0 -0
  558. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js +0 -0
  559. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/dfs.mjs +0 -0
  560. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js +0 -0
  561. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/postorder.mjs +0 -0
  562. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js +0 -0
  563. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/preorder.mjs +0 -0
  564. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js +0 -0
  565. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/alg/topsort.mjs +0 -0
  566. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/graph.js +0 -0
  567. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/graph.mjs +0 -0
  568. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/json.js +0 -0
  569. /package/dist/node_modules/.pnpm/{dagre-d3-es@7.0.11 → dagre-d3-es@7.0.13}/node_modules/dagre-d3-es/src/graphlib/json.mjs +0 -0
  570. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +0 -0
  571. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/dayjs.min.mjs +0 -0
  572. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/advancedFormat.js +0 -0
  573. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/advancedFormat.mjs +0 -0
  574. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/customParseFormat.js +0 -0
  575. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/customParseFormat.mjs +0 -0
  576. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/isoWeek.js +0 -0
  577. /package/dist/node_modules/.pnpm/{dayjs@1.11.13 → dayjs@1.11.19}/node_modules/dayjs/plugin/isoWeek.mjs +0 -0
@@ -0,0 +1,3871 @@
1
+ import { a as getWindow, g as getDocument } from './ssr-window.esm.mjs';
2
+ import { x as extend, v as showWarning, e as elementChildren, n as nextTick, u as animateCSSModeScroll, l as getTranslate, r as elementNextAll, t as elementPrevAll, b as setCSSProperty, q as elementStyle, i as elementOuterSize, j as elementIndex, c as createElement, y as deleteProps, w as elementIsChildOf, h as now, d as elementParents } from './utils.mjs';
3
+
4
+ let support;
5
+ function calcSupport() {
6
+ const window = getWindow();
7
+ const document = getDocument();
8
+ return {
9
+ smoothScroll: document.documentElement && document.documentElement.style && 'scrollBehavior' in document.documentElement.style,
10
+ touch: !!('ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch)
11
+ };
12
+ }
13
+ function getSupport() {
14
+ if (!support) {
15
+ support = calcSupport();
16
+ }
17
+ return support;
18
+ }
19
+
20
+ let deviceCached;
21
+ function calcDevice({
22
+ userAgent
23
+ } = {}) {
24
+ const support = getSupport();
25
+ const window = getWindow();
26
+ const platform = window.navigator.platform;
27
+ const ua = userAgent || window.navigator.userAgent;
28
+ const device = {
29
+ ios: false,
30
+ android: false
31
+ };
32
+ const screenWidth = window.screen.width;
33
+ const screenHeight = window.screen.height;
34
+ const android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line
35
+ let ipad = ua.match(/(iPad)(?!\1).*OS\s([\d_]+)/);
36
+ const ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/);
37
+ const iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/);
38
+ const windows = platform === 'Win32';
39
+ let macos = platform === 'MacIntel';
40
+
41
+ // iPadOs 13 fix
42
+ const iPadScreens = ['1024x1366', '1366x1024', '834x1194', '1194x834', '834x1112', '1112x834', '768x1024', '1024x768', '820x1180', '1180x820', '810x1080', '1080x810'];
43
+ if (!ipad && macos && support.touch && iPadScreens.indexOf(`${screenWidth}x${screenHeight}`) >= 0) {
44
+ ipad = ua.match(/(Version)\/([\d.]+)/);
45
+ if (!ipad) ipad = [0, 1, '13_0_0'];
46
+ macos = false;
47
+ }
48
+
49
+ // Android
50
+ if (android && !windows) {
51
+ device.os = 'android';
52
+ device.android = true;
53
+ }
54
+ if (ipad || iphone || ipod) {
55
+ device.os = 'ios';
56
+ device.ios = true;
57
+ }
58
+
59
+ // Export object
60
+ return device;
61
+ }
62
+ function getDevice(overrides = {}) {
63
+ if (!deviceCached) {
64
+ deviceCached = calcDevice(overrides);
65
+ }
66
+ return deviceCached;
67
+ }
68
+
69
+ let browser;
70
+ function calcBrowser() {
71
+ const window = getWindow();
72
+ const device = getDevice();
73
+ let needPerspectiveFix = false;
74
+ function isSafari() {
75
+ const ua = window.navigator.userAgent.toLowerCase();
76
+ return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0;
77
+ }
78
+ if (isSafari()) {
79
+ const ua = String(window.navigator.userAgent);
80
+ if (ua.includes('Version/')) {
81
+ const [major, minor] = ua.split('Version/')[1].split(' ')[0].split('.').map(num => Number(num));
82
+ needPerspectiveFix = major < 16 || major === 16 && minor < 2;
83
+ }
84
+ }
85
+ const isWebView = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent);
86
+ const isSafariBrowser = isSafari();
87
+ const need3dFix = isSafariBrowser || isWebView && device.ios;
88
+ return {
89
+ isSafari: needPerspectiveFix || isSafariBrowser,
90
+ needPerspectiveFix,
91
+ need3dFix,
92
+ isWebView
93
+ };
94
+ }
95
+ function getBrowser() {
96
+ if (!browser) {
97
+ browser = calcBrowser();
98
+ }
99
+ return browser;
100
+ }
101
+
102
+ function Resize({
103
+ swiper,
104
+ on,
105
+ emit
106
+ }) {
107
+ const window = getWindow();
108
+ let observer = null;
109
+ let animationFrame = null;
110
+ const resizeHandler = () => {
111
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
112
+ emit('beforeResize');
113
+ emit('resize');
114
+ };
115
+ const createObserver = () => {
116
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
117
+ observer = new ResizeObserver(entries => {
118
+ animationFrame = window.requestAnimationFrame(() => {
119
+ const {
120
+ width,
121
+ height
122
+ } = swiper;
123
+ let newWidth = width;
124
+ let newHeight = height;
125
+ entries.forEach(({
126
+ contentBoxSize,
127
+ contentRect,
128
+ target
129
+ }) => {
130
+ if (target && target !== swiper.el) return;
131
+ newWidth = contentRect ? contentRect.width : (contentBoxSize[0] || contentBoxSize).inlineSize;
132
+ newHeight = contentRect ? contentRect.height : (contentBoxSize[0] || contentBoxSize).blockSize;
133
+ });
134
+ if (newWidth !== width || newHeight !== height) {
135
+ resizeHandler();
136
+ }
137
+ });
138
+ });
139
+ observer.observe(swiper.el);
140
+ };
141
+ const removeObserver = () => {
142
+ if (animationFrame) {
143
+ window.cancelAnimationFrame(animationFrame);
144
+ }
145
+ if (observer && observer.unobserve && swiper.el) {
146
+ observer.unobserve(swiper.el);
147
+ observer = null;
148
+ }
149
+ };
150
+ const orientationChangeHandler = () => {
151
+ if (!swiper || swiper.destroyed || !swiper.initialized) return;
152
+ emit('orientationchange');
153
+ };
154
+ on('init', () => {
155
+ if (swiper.params.resizeObserver && typeof window.ResizeObserver !== 'undefined') {
156
+ createObserver();
157
+ return;
158
+ }
159
+ window.addEventListener('resize', resizeHandler);
160
+ window.addEventListener('orientationchange', orientationChangeHandler);
161
+ });
162
+ on('destroy', () => {
163
+ removeObserver();
164
+ window.removeEventListener('resize', resizeHandler);
165
+ window.removeEventListener('orientationchange', orientationChangeHandler);
166
+ });
167
+ }
168
+
169
+ function Observer({
170
+ swiper,
171
+ extendParams,
172
+ on,
173
+ emit
174
+ }) {
175
+ const observers = [];
176
+ const window = getWindow();
177
+ const attach = (target, options = {}) => {
178
+ const ObserverFunc = window.MutationObserver || window.WebkitMutationObserver;
179
+ const observer = new ObserverFunc(mutations => {
180
+ // The observerUpdate event should only be triggered
181
+ // once despite the number of mutations. Additional
182
+ // triggers are redundant and are very costly
183
+ if (swiper.__preventObserver__) return;
184
+ if (mutations.length === 1) {
185
+ emit('observerUpdate', mutations[0]);
186
+ return;
187
+ }
188
+ const observerUpdate = function observerUpdate() {
189
+ emit('observerUpdate', mutations[0]);
190
+ };
191
+ if (window.requestAnimationFrame) {
192
+ window.requestAnimationFrame(observerUpdate);
193
+ } else {
194
+ window.setTimeout(observerUpdate, 0);
195
+ }
196
+ });
197
+ observer.observe(target, {
198
+ attributes: typeof options.attributes === 'undefined' ? true : options.attributes,
199
+ childList: swiper.isElement || (typeof options.childList === 'undefined' ? true : options).childList,
200
+ characterData: typeof options.characterData === 'undefined' ? true : options.characterData
201
+ });
202
+ observers.push(observer);
203
+ };
204
+ const init = () => {
205
+ if (!swiper.params.observer) return;
206
+ if (swiper.params.observeParents) {
207
+ const containerParents = elementParents(swiper.hostEl);
208
+ for (let i = 0; i < containerParents.length; i += 1) {
209
+ attach(containerParents[i]);
210
+ }
211
+ }
212
+ // Observe container
213
+ attach(swiper.hostEl, {
214
+ childList: swiper.params.observeSlideChildren
215
+ });
216
+
217
+ // Observe wrapper
218
+ attach(swiper.wrapperEl, {
219
+ attributes: false
220
+ });
221
+ };
222
+ const destroy = () => {
223
+ observers.forEach(observer => {
224
+ observer.disconnect();
225
+ });
226
+ observers.splice(0, observers.length);
227
+ };
228
+ extendParams({
229
+ observer: false,
230
+ observeParents: false,
231
+ observeSlideChildren: false
232
+ });
233
+ on('init', init);
234
+ on('destroy', destroy);
235
+ }
236
+
237
+ /* eslint-disable no-underscore-dangle */
238
+
239
+ var eventsEmitter = {
240
+ on(events, handler, priority) {
241
+ const self = this;
242
+ if (!self.eventsListeners || self.destroyed) return self;
243
+ if (typeof handler !== 'function') return self;
244
+ const method = priority ? 'unshift' : 'push';
245
+ events.split(' ').forEach(event => {
246
+ if (!self.eventsListeners[event]) self.eventsListeners[event] = [];
247
+ self.eventsListeners[event][method](handler);
248
+ });
249
+ return self;
250
+ },
251
+ once(events, handler, priority) {
252
+ const self = this;
253
+ if (!self.eventsListeners || self.destroyed) return self;
254
+ if (typeof handler !== 'function') return self;
255
+ function onceHandler(...args) {
256
+ self.off(events, onceHandler);
257
+ if (onceHandler.__emitterProxy) {
258
+ delete onceHandler.__emitterProxy;
259
+ }
260
+ handler.apply(self, args);
261
+ }
262
+ onceHandler.__emitterProxy = handler;
263
+ return self.on(events, onceHandler, priority);
264
+ },
265
+ onAny(handler, priority) {
266
+ const self = this;
267
+ if (!self.eventsListeners || self.destroyed) return self;
268
+ if (typeof handler !== 'function') return self;
269
+ const method = priority ? 'unshift' : 'push';
270
+ if (self.eventsAnyListeners.indexOf(handler) < 0) {
271
+ self.eventsAnyListeners[method](handler);
272
+ }
273
+ return self;
274
+ },
275
+ offAny(handler) {
276
+ const self = this;
277
+ if (!self.eventsListeners || self.destroyed) return self;
278
+ if (!self.eventsAnyListeners) return self;
279
+ const index = self.eventsAnyListeners.indexOf(handler);
280
+ if (index >= 0) {
281
+ self.eventsAnyListeners.splice(index, 1);
282
+ }
283
+ return self;
284
+ },
285
+ off(events, handler) {
286
+ const self = this;
287
+ if (!self.eventsListeners || self.destroyed) return self;
288
+ if (!self.eventsListeners) return self;
289
+ events.split(' ').forEach(event => {
290
+ if (typeof handler === 'undefined') {
291
+ self.eventsListeners[event] = [];
292
+ } else if (self.eventsListeners[event]) {
293
+ self.eventsListeners[event].forEach((eventHandler, index) => {
294
+ if (eventHandler === handler || eventHandler.__emitterProxy && eventHandler.__emitterProxy === handler) {
295
+ self.eventsListeners[event].splice(index, 1);
296
+ }
297
+ });
298
+ }
299
+ });
300
+ return self;
301
+ },
302
+ emit(...args) {
303
+ const self = this;
304
+ if (!self.eventsListeners || self.destroyed) return self;
305
+ if (!self.eventsListeners) return self;
306
+ let events;
307
+ let data;
308
+ let context;
309
+ if (typeof args[0] === 'string' || Array.isArray(args[0])) {
310
+ events = args[0];
311
+ data = args.slice(1, args.length);
312
+ context = self;
313
+ } else {
314
+ events = args[0].events;
315
+ data = args[0].data;
316
+ context = args[0].context || self;
317
+ }
318
+ data.unshift(context);
319
+ const eventsArray = Array.isArray(events) ? events : events.split(' ');
320
+ eventsArray.forEach(event => {
321
+ if (self.eventsAnyListeners && self.eventsAnyListeners.length) {
322
+ self.eventsAnyListeners.forEach(eventHandler => {
323
+ eventHandler.apply(context, [event, ...data]);
324
+ });
325
+ }
326
+ if (self.eventsListeners && self.eventsListeners[event]) {
327
+ self.eventsListeners[event].forEach(eventHandler => {
328
+ eventHandler.apply(context, data);
329
+ });
330
+ }
331
+ });
332
+ return self;
333
+ }
334
+ };
335
+
336
+ function updateSize() {
337
+ const swiper = this;
338
+ let width;
339
+ let height;
340
+ const el = swiper.el;
341
+ if (typeof swiper.params.width !== 'undefined' && swiper.params.width !== null) {
342
+ width = swiper.params.width;
343
+ } else {
344
+ width = el.clientWidth;
345
+ }
346
+ if (typeof swiper.params.height !== 'undefined' && swiper.params.height !== null) {
347
+ height = swiper.params.height;
348
+ } else {
349
+ height = el.clientHeight;
350
+ }
351
+ if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) {
352
+ return;
353
+ }
354
+
355
+ // Subtract paddings
356
+ width = width - parseInt(elementStyle(el, 'padding-left') || 0, 10) - parseInt(elementStyle(el, 'padding-right') || 0, 10);
357
+ height = height - parseInt(elementStyle(el, 'padding-top') || 0, 10) - parseInt(elementStyle(el, 'padding-bottom') || 0, 10);
358
+ if (Number.isNaN(width)) width = 0;
359
+ if (Number.isNaN(height)) height = 0;
360
+ Object.assign(swiper, {
361
+ width,
362
+ height,
363
+ size: swiper.isHorizontal() ? width : height
364
+ });
365
+ }
366
+
367
+ function updateSlides() {
368
+ const swiper = this;
369
+ function getDirectionPropertyValue(node, label) {
370
+ return parseFloat(node.getPropertyValue(swiper.getDirectionLabel(label)) || 0);
371
+ }
372
+ const params = swiper.params;
373
+ const {
374
+ wrapperEl,
375
+ slidesEl,
376
+ rtlTranslate: rtl,
377
+ wrongRTL
378
+ } = swiper;
379
+ const isVirtual = swiper.virtual && params.virtual.enabled;
380
+ const previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length;
381
+ const slides = elementChildren(slidesEl, `.${swiper.params.slideClass}, swiper-slide`);
382
+ const slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length;
383
+ let snapGrid = [];
384
+ const slidesGrid = [];
385
+ const slidesSizesGrid = [];
386
+ let offsetBefore = params.slidesOffsetBefore;
387
+ if (typeof offsetBefore === 'function') {
388
+ offsetBefore = params.slidesOffsetBefore.call(swiper);
389
+ }
390
+ let offsetAfter = params.slidesOffsetAfter;
391
+ if (typeof offsetAfter === 'function') {
392
+ offsetAfter = params.slidesOffsetAfter.call(swiper);
393
+ }
394
+ const previousSnapGridLength = swiper.snapGrid.length;
395
+ const previousSlidesGridLength = swiper.slidesGrid.length;
396
+ const swiperSize = swiper.size - offsetBefore - offsetAfter;
397
+ let spaceBetween = params.spaceBetween;
398
+ let slidePosition = -offsetBefore;
399
+ let prevSlideSize = 0;
400
+ let index = 0;
401
+ if (typeof swiperSize === 'undefined') {
402
+ return;
403
+ }
404
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
405
+ spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize;
406
+ } else if (typeof spaceBetween === 'string') {
407
+ spaceBetween = parseFloat(spaceBetween);
408
+ }
409
+ swiper.virtualSize = -spaceBetween - offsetBefore - offsetAfter;
410
+
411
+ // reset margins
412
+ slides.forEach(slideEl => {
413
+ if (rtl) {
414
+ slideEl.style.marginLeft = '';
415
+ } else {
416
+ slideEl.style.marginRight = '';
417
+ }
418
+ slideEl.style.marginBottom = '';
419
+ slideEl.style.marginTop = '';
420
+ });
421
+
422
+ // reset cssMode offsets
423
+ if (params.centeredSlides && params.cssMode) {
424
+ setCSSProperty(wrapperEl, '--swiper-centered-offset-before', '');
425
+ setCSSProperty(wrapperEl, '--swiper-centered-offset-after', '');
426
+ }
427
+ const gridEnabled = params.grid && params.grid.rows > 1 && swiper.grid;
428
+ if (gridEnabled) {
429
+ swiper.grid.initSlides(slides);
430
+ } else if (swiper.grid) {
431
+ swiper.grid.unsetSlides();
432
+ }
433
+
434
+ // Calc slides
435
+ let slideSize;
436
+ const shouldResetSlideSize = params.slidesPerView === 'auto' && params.breakpoints && Object.keys(params.breakpoints).filter(key => {
437
+ return typeof params.breakpoints[key].slidesPerView !== 'undefined';
438
+ }).length > 0;
439
+ for (let i = 0; i < slidesLength; i += 1) {
440
+ slideSize = 0;
441
+ const slide = slides[i];
442
+ if (slide) {
443
+ if (gridEnabled) {
444
+ swiper.grid.updateSlide(i, slide, slides);
445
+ }
446
+ if (elementStyle(slide, 'display') === 'none') continue; // eslint-disable-line
447
+ }
448
+
449
+ if (isVirtual && params.slidesPerView === 'auto') {
450
+ if (params.virtual.slidesPerViewAutoSlideSize) {
451
+ slideSize = params.virtual.slidesPerViewAutoSlideSize;
452
+ }
453
+ if (slideSize && slide) {
454
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
455
+ slide.style[swiper.getDirectionLabel('width')] = `${slideSize}px`;
456
+ }
457
+ } else if (params.slidesPerView === 'auto') {
458
+ if (shouldResetSlideSize) {
459
+ slide.style[swiper.getDirectionLabel('width')] = ``;
460
+ }
461
+ const slideStyles = getComputedStyle(slide);
462
+ const currentTransform = slide.style.transform;
463
+ const currentWebKitTransform = slide.style.webkitTransform;
464
+ if (currentTransform) {
465
+ slide.style.transform = 'none';
466
+ }
467
+ if (currentWebKitTransform) {
468
+ slide.style.webkitTransform = 'none';
469
+ }
470
+ if (params.roundLengths) {
471
+ slideSize = swiper.isHorizontal() ? elementOuterSize(slide, 'width') : elementOuterSize(slide, 'height');
472
+ } else {
473
+ // eslint-disable-next-line
474
+ const width = getDirectionPropertyValue(slideStyles, 'width');
475
+ const paddingLeft = getDirectionPropertyValue(slideStyles, 'padding-left');
476
+ const paddingRight = getDirectionPropertyValue(slideStyles, 'padding-right');
477
+ const marginLeft = getDirectionPropertyValue(slideStyles, 'margin-left');
478
+ const marginRight = getDirectionPropertyValue(slideStyles, 'margin-right');
479
+ const boxSizing = slideStyles.getPropertyValue('box-sizing');
480
+ if (boxSizing && boxSizing === 'border-box') {
481
+ slideSize = width + marginLeft + marginRight;
482
+ } else {
483
+ const {
484
+ clientWidth,
485
+ offsetWidth
486
+ } = slide;
487
+ slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight + (offsetWidth - clientWidth);
488
+ }
489
+ }
490
+ if (currentTransform) {
491
+ slide.style.transform = currentTransform;
492
+ }
493
+ if (currentWebKitTransform) {
494
+ slide.style.webkitTransform = currentWebKitTransform;
495
+ }
496
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
497
+ } else {
498
+ slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView;
499
+ if (params.roundLengths) slideSize = Math.floor(slideSize);
500
+ if (slide) {
501
+ slide.style[swiper.getDirectionLabel('width')] = `${slideSize}px`;
502
+ }
503
+ }
504
+ if (slide) {
505
+ slide.swiperSlideSize = slideSize;
506
+ }
507
+ slidesSizesGrid.push(slideSize);
508
+ if (params.centeredSlides) {
509
+ slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween;
510
+ if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
511
+ if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween;
512
+ if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0;
513
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
514
+ if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition);
515
+ slidesGrid.push(slidePosition);
516
+ } else {
517
+ if (params.roundLengths) slidePosition = Math.floor(slidePosition);
518
+ if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition);
519
+ slidesGrid.push(slidePosition);
520
+ slidePosition = slidePosition + slideSize + spaceBetween;
521
+ }
522
+ swiper.virtualSize += slideSize + spaceBetween;
523
+ prevSlideSize = slideSize;
524
+ index += 1;
525
+ }
526
+ swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter;
527
+ if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) {
528
+ wrapperEl.style.width = `${swiper.virtualSize + spaceBetween}px`;
529
+ }
530
+ if (params.setWrapperSize) {
531
+ wrapperEl.style[swiper.getDirectionLabel('width')] = `${swiper.virtualSize + spaceBetween}px`;
532
+ }
533
+ if (gridEnabled) {
534
+ swiper.grid.updateWrapperSize(slideSize, snapGrid);
535
+ }
536
+
537
+ // Remove last grid elements depending on width
538
+ if (!params.centeredSlides) {
539
+ const newSlidesGrid = [];
540
+ for (let i = 0; i < snapGrid.length; i += 1) {
541
+ let slidesGridItem = snapGrid[i];
542
+ if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem);
543
+ if (snapGrid[i] <= swiper.virtualSize - swiperSize) {
544
+ newSlidesGrid.push(slidesGridItem);
545
+ }
546
+ }
547
+ snapGrid = newSlidesGrid;
548
+ if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) {
549
+ snapGrid.push(swiper.virtualSize - swiperSize);
550
+ }
551
+ }
552
+ if (isVirtual && params.loop) {
553
+ const size = slidesSizesGrid[0] + spaceBetween;
554
+ if (params.slidesPerGroup > 1) {
555
+ const groups = Math.ceil((swiper.virtual.slidesBefore + swiper.virtual.slidesAfter) / params.slidesPerGroup);
556
+ const groupSize = size * params.slidesPerGroup;
557
+ for (let i = 0; i < groups; i += 1) {
558
+ snapGrid.push(snapGrid[snapGrid.length - 1] + groupSize);
559
+ }
560
+ }
561
+ for (let i = 0; i < swiper.virtual.slidesBefore + swiper.virtual.slidesAfter; i += 1) {
562
+ if (params.slidesPerGroup === 1) {
563
+ snapGrid.push(snapGrid[snapGrid.length - 1] + size);
564
+ }
565
+ slidesGrid.push(slidesGrid[slidesGrid.length - 1] + size);
566
+ swiper.virtualSize += size;
567
+ }
568
+ }
569
+ if (snapGrid.length === 0) snapGrid = [0];
570
+ if (spaceBetween !== 0) {
571
+ const key = swiper.isHorizontal() && rtl ? 'marginLeft' : swiper.getDirectionLabel('marginRight');
572
+ slides.filter((_, slideIndex) => {
573
+ if (!params.cssMode || params.loop) return true;
574
+ if (slideIndex === slides.length - 1) {
575
+ return false;
576
+ }
577
+ return true;
578
+ }).forEach(slideEl => {
579
+ slideEl.style[key] = `${spaceBetween}px`;
580
+ });
581
+ }
582
+ if (params.centeredSlides && params.centeredSlidesBounds) {
583
+ let allSlidesSize = 0;
584
+ slidesSizesGrid.forEach(slideSizeValue => {
585
+ allSlidesSize += slideSizeValue + (spaceBetween || 0);
586
+ });
587
+ allSlidesSize -= spaceBetween;
588
+ const maxSnap = allSlidesSize > swiperSize ? allSlidesSize - swiperSize : 0;
589
+ snapGrid = snapGrid.map(snap => {
590
+ if (snap <= 0) return -offsetBefore;
591
+ if (snap > maxSnap) return maxSnap + offsetAfter;
592
+ return snap;
593
+ });
594
+ }
595
+ if (params.centerInsufficientSlides) {
596
+ let allSlidesSize = 0;
597
+ slidesSizesGrid.forEach(slideSizeValue => {
598
+ allSlidesSize += slideSizeValue + (spaceBetween || 0);
599
+ });
600
+ allSlidesSize -= spaceBetween;
601
+ const offsetSize = (offsetBefore || 0) + (offsetAfter || 0);
602
+ if (allSlidesSize + offsetSize < swiperSize) {
603
+ const allSlidesOffset = (swiperSize - allSlidesSize - offsetSize) / 2;
604
+ snapGrid.forEach((snap, snapIndex) => {
605
+ snapGrid[snapIndex] = snap - allSlidesOffset;
606
+ });
607
+ slidesGrid.forEach((snap, snapIndex) => {
608
+ slidesGrid[snapIndex] = snap + allSlidesOffset;
609
+ });
610
+ }
611
+ }
612
+ Object.assign(swiper, {
613
+ slides,
614
+ snapGrid,
615
+ slidesGrid,
616
+ slidesSizesGrid
617
+ });
618
+ if (params.centeredSlides && params.cssMode && !params.centeredSlidesBounds) {
619
+ setCSSProperty(wrapperEl, '--swiper-centered-offset-before', `${-snapGrid[0]}px`);
620
+ setCSSProperty(wrapperEl, '--swiper-centered-offset-after', `${swiper.size / 2 - slidesSizesGrid[slidesSizesGrid.length - 1] / 2}px`);
621
+ const addToSnapGrid = -swiper.snapGrid[0];
622
+ const addToSlidesGrid = -swiper.slidesGrid[0];
623
+ swiper.snapGrid = swiper.snapGrid.map(v => v + addToSnapGrid);
624
+ swiper.slidesGrid = swiper.slidesGrid.map(v => v + addToSlidesGrid);
625
+ }
626
+ if (slidesLength !== previousSlidesLength) {
627
+ swiper.emit('slidesLengthChange');
628
+ }
629
+ if (snapGrid.length !== previousSnapGridLength) {
630
+ if (swiper.params.watchOverflow) swiper.checkOverflow();
631
+ swiper.emit('snapGridLengthChange');
632
+ }
633
+ if (slidesGrid.length !== previousSlidesGridLength) {
634
+ swiper.emit('slidesGridLengthChange');
635
+ }
636
+ if (params.watchSlidesProgress) {
637
+ swiper.updateSlidesOffset();
638
+ }
639
+ swiper.emit('slidesUpdated');
640
+ if (!isVirtual && !params.cssMode && (params.effect === 'slide' || params.effect === 'fade')) {
641
+ const backFaceHiddenClass = `${params.containerModifierClass}backface-hidden`;
642
+ const hasClassBackfaceClassAdded = swiper.el.classList.contains(backFaceHiddenClass);
643
+ if (slidesLength <= params.maxBackfaceHiddenSlides) {
644
+ if (!hasClassBackfaceClassAdded) swiper.el.classList.add(backFaceHiddenClass);
645
+ } else if (hasClassBackfaceClassAdded) {
646
+ swiper.el.classList.remove(backFaceHiddenClass);
647
+ }
648
+ }
649
+ }
650
+
651
+ function updateAutoHeight(speed) {
652
+ const swiper = this;
653
+ const activeSlides = [];
654
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
655
+ let newHeight = 0;
656
+ let i;
657
+ if (typeof speed === 'number') {
658
+ swiper.setTransition(speed);
659
+ } else if (speed === true) {
660
+ swiper.setTransition(swiper.params.speed);
661
+ }
662
+ const getSlideByIndex = index => {
663
+ if (isVirtual) {
664
+ return swiper.slides[swiper.getSlideIndexByData(index)];
665
+ }
666
+ return swiper.slides[index];
667
+ };
668
+ // Find slides currently in view
669
+ if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) {
670
+ if (swiper.params.centeredSlides) {
671
+ (swiper.visibleSlides || []).forEach(slide => {
672
+ activeSlides.push(slide);
673
+ });
674
+ } else {
675
+ for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) {
676
+ const index = swiper.activeIndex + i;
677
+ if (index > swiper.slides.length && !isVirtual) break;
678
+ activeSlides.push(getSlideByIndex(index));
679
+ }
680
+ }
681
+ } else {
682
+ activeSlides.push(getSlideByIndex(swiper.activeIndex));
683
+ }
684
+
685
+ // Find new height from highest slide in view
686
+ for (i = 0; i < activeSlides.length; i += 1) {
687
+ if (typeof activeSlides[i] !== 'undefined') {
688
+ const height = activeSlides[i].offsetHeight;
689
+ newHeight = height > newHeight ? height : newHeight;
690
+ }
691
+ }
692
+
693
+ // Update Height
694
+ if (newHeight || newHeight === 0) swiper.wrapperEl.style.height = `${newHeight}px`;
695
+ }
696
+
697
+ function updateSlidesOffset() {
698
+ const swiper = this;
699
+ const slides = swiper.slides;
700
+ // eslint-disable-next-line
701
+ const minusOffset = swiper.isElement ? swiper.isHorizontal() ? swiper.wrapperEl.offsetLeft : swiper.wrapperEl.offsetTop : 0;
702
+ for (let i = 0; i < slides.length; i += 1) {
703
+ slides[i].swiperSlideOffset = (swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop) - minusOffset - swiper.cssOverflowAdjustment();
704
+ }
705
+ }
706
+
707
+ const toggleSlideClasses$1 = (slideEl, condition, className) => {
708
+ if (condition && !slideEl.classList.contains(className)) {
709
+ slideEl.classList.add(className);
710
+ } else if (!condition && slideEl.classList.contains(className)) {
711
+ slideEl.classList.remove(className);
712
+ }
713
+ };
714
+ function updateSlidesProgress(translate = this && this.translate || 0) {
715
+ const swiper = this;
716
+ const params = swiper.params;
717
+ const {
718
+ slides,
719
+ rtlTranslate: rtl,
720
+ snapGrid
721
+ } = swiper;
722
+ if (slides.length === 0) return;
723
+ if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset();
724
+ let offsetCenter = -translate;
725
+ if (rtl) offsetCenter = translate;
726
+ swiper.visibleSlidesIndexes = [];
727
+ swiper.visibleSlides = [];
728
+ let spaceBetween = params.spaceBetween;
729
+ if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) {
730
+ spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiper.size;
731
+ } else if (typeof spaceBetween === 'string') {
732
+ spaceBetween = parseFloat(spaceBetween);
733
+ }
734
+ for (let i = 0; i < slides.length; i += 1) {
735
+ const slide = slides[i];
736
+ let slideOffset = slide.swiperSlideOffset;
737
+ if (params.cssMode && params.centeredSlides) {
738
+ slideOffset -= slides[0].swiperSlideOffset;
739
+ }
740
+ const slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);
741
+ const originalSlideProgress = (offsetCenter - snapGrid[0] + (params.centeredSlides ? swiper.minTranslate() : 0) - slideOffset) / (slide.swiperSlideSize + spaceBetween);
742
+ const slideBefore = -(offsetCenter - slideOffset);
743
+ const slideAfter = slideBefore + swiper.slidesSizesGrid[i];
744
+ const isFullyVisible = slideBefore >= 0 && slideBefore <= swiper.size - swiper.slidesSizesGrid[i];
745
+ const isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size;
746
+ if (isVisible) {
747
+ swiper.visibleSlides.push(slide);
748
+ swiper.visibleSlidesIndexes.push(i);
749
+ }
750
+ toggleSlideClasses$1(slide, isVisible, params.slideVisibleClass);
751
+ toggleSlideClasses$1(slide, isFullyVisible, params.slideFullyVisibleClass);
752
+ slide.progress = rtl ? -slideProgress : slideProgress;
753
+ slide.originalProgress = rtl ? -originalSlideProgress : originalSlideProgress;
754
+ }
755
+ }
756
+
757
+ function updateProgress(translate) {
758
+ const swiper = this;
759
+ if (typeof translate === 'undefined') {
760
+ const multiplier = swiper.rtlTranslate ? -1 : 1;
761
+ // eslint-disable-next-line
762
+ translate = swiper && swiper.translate && swiper.translate * multiplier || 0;
763
+ }
764
+ const params = swiper.params;
765
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
766
+ let {
767
+ progress,
768
+ isBeginning,
769
+ isEnd,
770
+ progressLoop
771
+ } = swiper;
772
+ const wasBeginning = isBeginning;
773
+ const wasEnd = isEnd;
774
+ if (translatesDiff === 0) {
775
+ progress = 0;
776
+ isBeginning = true;
777
+ isEnd = true;
778
+ } else {
779
+ progress = (translate - swiper.minTranslate()) / translatesDiff;
780
+ const isBeginningRounded = Math.abs(translate - swiper.minTranslate()) < 1;
781
+ const isEndRounded = Math.abs(translate - swiper.maxTranslate()) < 1;
782
+ isBeginning = isBeginningRounded || progress <= 0;
783
+ isEnd = isEndRounded || progress >= 1;
784
+ if (isBeginningRounded) progress = 0;
785
+ if (isEndRounded) progress = 1;
786
+ }
787
+ if (params.loop) {
788
+ const firstSlideIndex = swiper.getSlideIndexByData(0);
789
+ const lastSlideIndex = swiper.getSlideIndexByData(swiper.slides.length - 1);
790
+ const firstSlideTranslate = swiper.slidesGrid[firstSlideIndex];
791
+ const lastSlideTranslate = swiper.slidesGrid[lastSlideIndex];
792
+ const translateMax = swiper.slidesGrid[swiper.slidesGrid.length - 1];
793
+ const translateAbs = Math.abs(translate);
794
+ if (translateAbs >= firstSlideTranslate) {
795
+ progressLoop = (translateAbs - firstSlideTranslate) / translateMax;
796
+ } else {
797
+ progressLoop = (translateAbs + translateMax - lastSlideTranslate) / translateMax;
798
+ }
799
+ if (progressLoop > 1) progressLoop -= 1;
800
+ }
801
+ Object.assign(swiper, {
802
+ progress,
803
+ progressLoop,
804
+ isBeginning,
805
+ isEnd
806
+ });
807
+ if (params.watchSlidesProgress || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate);
808
+ if (isBeginning && !wasBeginning) {
809
+ swiper.emit('reachBeginning toEdge');
810
+ }
811
+ if (isEnd && !wasEnd) {
812
+ swiper.emit('reachEnd toEdge');
813
+ }
814
+ if (wasBeginning && !isBeginning || wasEnd && !isEnd) {
815
+ swiper.emit('fromEdge');
816
+ }
817
+ swiper.emit('progress', progress);
818
+ }
819
+
820
+ const toggleSlideClasses = (slideEl, condition, className) => {
821
+ if (condition && !slideEl.classList.contains(className)) {
822
+ slideEl.classList.add(className);
823
+ } else if (!condition && slideEl.classList.contains(className)) {
824
+ slideEl.classList.remove(className);
825
+ }
826
+ };
827
+ function updateSlidesClasses() {
828
+ const swiper = this;
829
+ const {
830
+ slides,
831
+ params,
832
+ slidesEl,
833
+ activeIndex
834
+ } = swiper;
835
+ const isVirtual = swiper.virtual && params.virtual.enabled;
836
+ const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
837
+ const getFilteredSlide = selector => {
838
+ return elementChildren(slidesEl, `.${params.slideClass}${selector}, swiper-slide${selector}`)[0];
839
+ };
840
+ let activeSlide;
841
+ let prevSlide;
842
+ let nextSlide;
843
+ if (isVirtual) {
844
+ if (params.loop) {
845
+ let slideIndex = activeIndex - swiper.virtual.slidesBefore;
846
+ if (slideIndex < 0) slideIndex = swiper.virtual.slides.length + slideIndex;
847
+ if (slideIndex >= swiper.virtual.slides.length) slideIndex -= swiper.virtual.slides.length;
848
+ activeSlide = getFilteredSlide(`[data-swiper-slide-index="${slideIndex}"]`);
849
+ } else {
850
+ activeSlide = getFilteredSlide(`[data-swiper-slide-index="${activeIndex}"]`);
851
+ }
852
+ } else {
853
+ if (gridEnabled) {
854
+ activeSlide = slides.find(slideEl => slideEl.column === activeIndex);
855
+ nextSlide = slides.find(slideEl => slideEl.column === activeIndex + 1);
856
+ prevSlide = slides.find(slideEl => slideEl.column === activeIndex - 1);
857
+ } else {
858
+ activeSlide = slides[activeIndex];
859
+ }
860
+ }
861
+ if (activeSlide) {
862
+ if (!gridEnabled) {
863
+ // Next Slide
864
+ nextSlide = elementNextAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
865
+ if (params.loop && !nextSlide) {
866
+ nextSlide = slides[0];
867
+ }
868
+
869
+ // Prev Slide
870
+ prevSlide = elementPrevAll(activeSlide, `.${params.slideClass}, swiper-slide`)[0];
871
+ if (params.loop && !prevSlide === 0) {
872
+ prevSlide = slides[slides.length - 1];
873
+ }
874
+ }
875
+ }
876
+ slides.forEach(slideEl => {
877
+ toggleSlideClasses(slideEl, slideEl === activeSlide, params.slideActiveClass);
878
+ toggleSlideClasses(slideEl, slideEl === nextSlide, params.slideNextClass);
879
+ toggleSlideClasses(slideEl, slideEl === prevSlide, params.slidePrevClass);
880
+ });
881
+ swiper.emitSlidesClasses();
882
+ }
883
+
884
+ const processLazyPreloader = (swiper, imageEl) => {
885
+ if (!swiper || swiper.destroyed || !swiper.params) return;
886
+ const slideSelector = () => swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`;
887
+ const slideEl = imageEl.closest(slideSelector());
888
+ if (slideEl) {
889
+ let lazyEl = slideEl.querySelector(`.${swiper.params.lazyPreloaderClass}`);
890
+ if (!lazyEl && swiper.isElement) {
891
+ if (slideEl.shadowRoot) {
892
+ lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
893
+ } else {
894
+ // init later
895
+ requestAnimationFrame(() => {
896
+ if (slideEl.shadowRoot) {
897
+ lazyEl = slideEl.shadowRoot.querySelector(`.${swiper.params.lazyPreloaderClass}`);
898
+ if (lazyEl) lazyEl.remove();
899
+ }
900
+ });
901
+ }
902
+ }
903
+ if (lazyEl) lazyEl.remove();
904
+ }
905
+ };
906
+ const unlazy = (swiper, index) => {
907
+ if (!swiper.slides[index]) return;
908
+ const imageEl = swiper.slides[index].querySelector('[loading="lazy"]');
909
+ if (imageEl) imageEl.removeAttribute('loading');
910
+ };
911
+ const preload = swiper => {
912
+ if (!swiper || swiper.destroyed || !swiper.params) return;
913
+ let amount = swiper.params.lazyPreloadPrevNext;
914
+ const len = swiper.slides.length;
915
+ if (!len || !amount || amount < 0) return;
916
+ amount = Math.min(amount, len);
917
+ const slidesPerView = swiper.params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(swiper.params.slidesPerView);
918
+ const activeIndex = swiper.activeIndex;
919
+ if (swiper.params.grid && swiper.params.grid.rows > 1) {
920
+ const activeColumn = activeIndex;
921
+ const preloadColumns = [activeColumn - amount];
922
+ preloadColumns.push(...Array.from({
923
+ length: amount
924
+ }).map((_, i) => {
925
+ return activeColumn + slidesPerView + i;
926
+ }));
927
+ swiper.slides.forEach((slideEl, i) => {
928
+ if (preloadColumns.includes(slideEl.column)) unlazy(swiper, i);
929
+ });
930
+ return;
931
+ }
932
+ const slideIndexLastInView = activeIndex + slidesPerView - 1;
933
+ if (swiper.params.rewind || swiper.params.loop) {
934
+ for (let i = activeIndex - amount; i <= slideIndexLastInView + amount; i += 1) {
935
+ const realIndex = (i % len + len) % len;
936
+ if (realIndex < activeIndex || realIndex > slideIndexLastInView) unlazy(swiper, realIndex);
937
+ }
938
+ } else {
939
+ for (let i = Math.max(activeIndex - amount, 0); i <= Math.min(slideIndexLastInView + amount, len - 1); i += 1) {
940
+ if (i !== activeIndex && (i > slideIndexLastInView || i < activeIndex)) {
941
+ unlazy(swiper, i);
942
+ }
943
+ }
944
+ }
945
+ };
946
+
947
+ function getActiveIndexByTranslate(swiper) {
948
+ const {
949
+ slidesGrid,
950
+ params
951
+ } = swiper;
952
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
953
+ let activeIndex;
954
+ for (let i = 0; i < slidesGrid.length; i += 1) {
955
+ if (typeof slidesGrid[i + 1] !== 'undefined') {
956
+ if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) {
957
+ activeIndex = i;
958
+ } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) {
959
+ activeIndex = i + 1;
960
+ }
961
+ } else if (translate >= slidesGrid[i]) {
962
+ activeIndex = i;
963
+ }
964
+ }
965
+ // Normalize slideIndex
966
+ if (params.normalizeSlideIndex) {
967
+ if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0;
968
+ }
969
+ return activeIndex;
970
+ }
971
+ function updateActiveIndex(newActiveIndex) {
972
+ const swiper = this;
973
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
974
+ const {
975
+ snapGrid,
976
+ params,
977
+ activeIndex: previousIndex,
978
+ realIndex: previousRealIndex,
979
+ snapIndex: previousSnapIndex
980
+ } = swiper;
981
+ let activeIndex = newActiveIndex;
982
+ let snapIndex;
983
+ const getVirtualRealIndex = aIndex => {
984
+ let realIndex = aIndex - swiper.virtual.slidesBefore;
985
+ if (realIndex < 0) {
986
+ realIndex = swiper.virtual.slides.length + realIndex;
987
+ }
988
+ if (realIndex >= swiper.virtual.slides.length) {
989
+ realIndex -= swiper.virtual.slides.length;
990
+ }
991
+ return realIndex;
992
+ };
993
+ if (typeof activeIndex === 'undefined') {
994
+ activeIndex = getActiveIndexByTranslate(swiper);
995
+ }
996
+ if (snapGrid.indexOf(translate) >= 0) {
997
+ snapIndex = snapGrid.indexOf(translate);
998
+ } else {
999
+ const skip = Math.min(params.slidesPerGroupSkip, activeIndex);
1000
+ snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup);
1001
+ }
1002
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1003
+ if (activeIndex === previousIndex && !swiper.params.loop) {
1004
+ if (snapIndex !== previousSnapIndex) {
1005
+ swiper.snapIndex = snapIndex;
1006
+ swiper.emit('snapIndexChange');
1007
+ }
1008
+ return;
1009
+ }
1010
+ if (activeIndex === previousIndex && swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
1011
+ swiper.realIndex = getVirtualRealIndex(activeIndex);
1012
+ return;
1013
+ }
1014
+ const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
1015
+
1016
+ // Get real index
1017
+ let realIndex;
1018
+ if (swiper.virtual && params.virtual.enabled && params.loop) {
1019
+ realIndex = getVirtualRealIndex(activeIndex);
1020
+ } else if (gridEnabled) {
1021
+ const firstSlideInColumn = swiper.slides.find(slideEl => slideEl.column === activeIndex);
1022
+ let activeSlideIndex = parseInt(firstSlideInColumn.getAttribute('data-swiper-slide-index'), 10);
1023
+ if (Number.isNaN(activeSlideIndex)) {
1024
+ activeSlideIndex = Math.max(swiper.slides.indexOf(firstSlideInColumn), 0);
1025
+ }
1026
+ realIndex = Math.floor(activeSlideIndex / params.grid.rows);
1027
+ } else if (swiper.slides[activeIndex]) {
1028
+ const slideIndex = swiper.slides[activeIndex].getAttribute('data-swiper-slide-index');
1029
+ if (slideIndex) {
1030
+ realIndex = parseInt(slideIndex, 10);
1031
+ } else {
1032
+ realIndex = activeIndex;
1033
+ }
1034
+ } else {
1035
+ realIndex = activeIndex;
1036
+ }
1037
+ Object.assign(swiper, {
1038
+ previousSnapIndex,
1039
+ snapIndex,
1040
+ previousRealIndex,
1041
+ realIndex,
1042
+ previousIndex,
1043
+ activeIndex
1044
+ });
1045
+ if (swiper.initialized) {
1046
+ preload(swiper);
1047
+ }
1048
+ swiper.emit('activeIndexChange');
1049
+ swiper.emit('snapIndexChange');
1050
+ if (swiper.initialized || swiper.params.runCallbacksOnInit) {
1051
+ if (previousRealIndex !== realIndex) {
1052
+ swiper.emit('realIndexChange');
1053
+ }
1054
+ swiper.emit('slideChange');
1055
+ }
1056
+ }
1057
+
1058
+ function updateClickedSlide(el, path) {
1059
+ const swiper = this;
1060
+ const params = swiper.params;
1061
+ let slide = el.closest(`.${params.slideClass}, swiper-slide`);
1062
+ if (!slide && swiper.isElement && path && path.length > 1 && path.includes(el)) {
1063
+ [...path.slice(path.indexOf(el) + 1, path.length)].forEach(pathEl => {
1064
+ if (!slide && pathEl.matches && pathEl.matches(`.${params.slideClass}, swiper-slide`)) {
1065
+ slide = pathEl;
1066
+ }
1067
+ });
1068
+ }
1069
+ let slideFound = false;
1070
+ let slideIndex;
1071
+ if (slide) {
1072
+ for (let i = 0; i < swiper.slides.length; i += 1) {
1073
+ if (swiper.slides[i] === slide) {
1074
+ slideFound = true;
1075
+ slideIndex = i;
1076
+ break;
1077
+ }
1078
+ }
1079
+ }
1080
+ if (slide && slideFound) {
1081
+ swiper.clickedSlide = slide;
1082
+ if (swiper.virtual && swiper.params.virtual.enabled) {
1083
+ swiper.clickedIndex = parseInt(slide.getAttribute('data-swiper-slide-index'), 10);
1084
+ } else {
1085
+ swiper.clickedIndex = slideIndex;
1086
+ }
1087
+ } else {
1088
+ swiper.clickedSlide = undefined;
1089
+ swiper.clickedIndex = undefined;
1090
+ return;
1091
+ }
1092
+ if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) {
1093
+ swiper.slideToClickedSlide();
1094
+ }
1095
+ }
1096
+
1097
+ var update = {
1098
+ updateSize,
1099
+ updateSlides,
1100
+ updateAutoHeight,
1101
+ updateSlidesOffset,
1102
+ updateSlidesProgress,
1103
+ updateProgress,
1104
+ updateSlidesClasses,
1105
+ updateActiveIndex,
1106
+ updateClickedSlide
1107
+ };
1108
+
1109
+ function getSwiperTranslate(axis = this.isHorizontal() ? 'x' : 'y') {
1110
+ const swiper = this;
1111
+ const {
1112
+ params,
1113
+ rtlTranslate: rtl,
1114
+ translate,
1115
+ wrapperEl
1116
+ } = swiper;
1117
+ if (params.virtualTranslate) {
1118
+ return rtl ? -translate : translate;
1119
+ }
1120
+ if (params.cssMode) {
1121
+ return translate;
1122
+ }
1123
+ let currentTranslate = getTranslate(wrapperEl, axis);
1124
+ currentTranslate += swiper.cssOverflowAdjustment();
1125
+ if (rtl) currentTranslate = -currentTranslate;
1126
+ return currentTranslate || 0;
1127
+ }
1128
+
1129
+ function setTranslate(translate, byController) {
1130
+ const swiper = this;
1131
+ const {
1132
+ rtlTranslate: rtl,
1133
+ params,
1134
+ wrapperEl,
1135
+ progress
1136
+ } = swiper;
1137
+ let x = 0;
1138
+ let y = 0;
1139
+ const z = 0;
1140
+ if (swiper.isHorizontal()) {
1141
+ x = rtl ? -translate : translate;
1142
+ } else {
1143
+ y = translate;
1144
+ }
1145
+ if (params.roundLengths) {
1146
+ x = Math.floor(x);
1147
+ y = Math.floor(y);
1148
+ }
1149
+ swiper.previousTranslate = swiper.translate;
1150
+ swiper.translate = swiper.isHorizontal() ? x : y;
1151
+ if (params.cssMode) {
1152
+ wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y;
1153
+ } else if (!params.virtualTranslate) {
1154
+ if (swiper.isHorizontal()) {
1155
+ x -= swiper.cssOverflowAdjustment();
1156
+ } else {
1157
+ y -= swiper.cssOverflowAdjustment();
1158
+ }
1159
+ wrapperEl.style.transform = `translate3d(${x}px, ${y}px, ${z}px)`;
1160
+ }
1161
+
1162
+ // Check if we need to update progress
1163
+ let newProgress;
1164
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
1165
+ if (translatesDiff === 0) {
1166
+ newProgress = 0;
1167
+ } else {
1168
+ newProgress = (translate - swiper.minTranslate()) / translatesDiff;
1169
+ }
1170
+ if (newProgress !== progress) {
1171
+ swiper.updateProgress(translate);
1172
+ }
1173
+ swiper.emit('setTranslate', swiper.translate, byController);
1174
+ }
1175
+
1176
+ function minTranslate() {
1177
+ return -this.snapGrid[0];
1178
+ }
1179
+
1180
+ function maxTranslate() {
1181
+ return -this.snapGrid[this.snapGrid.length - 1];
1182
+ }
1183
+
1184
+ function translateTo(translate = 0, speed = this.params.speed, runCallbacks = true, translateBounds = true, internal) {
1185
+ const swiper = this;
1186
+ const {
1187
+ params,
1188
+ wrapperEl
1189
+ } = swiper;
1190
+ if (swiper.animating && params.preventInteractionOnTransition) {
1191
+ return false;
1192
+ }
1193
+ const minTranslate = swiper.minTranslate();
1194
+ const maxTranslate = swiper.maxTranslate();
1195
+ let newTranslate;
1196
+ if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate;
1197
+
1198
+ // Update progress
1199
+ swiper.updateProgress(newTranslate);
1200
+ if (params.cssMode) {
1201
+ const isH = swiper.isHorizontal();
1202
+ if (speed === 0) {
1203
+ wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate;
1204
+ } else {
1205
+ if (!swiper.support.smoothScroll) {
1206
+ animateCSSModeScroll({
1207
+ swiper,
1208
+ targetPosition: -newTranslate,
1209
+ side: isH ? 'left' : 'top'
1210
+ });
1211
+ return true;
1212
+ }
1213
+ wrapperEl.scrollTo({
1214
+ [isH ? 'left' : 'top']: -newTranslate,
1215
+ behavior: 'smooth'
1216
+ });
1217
+ }
1218
+ return true;
1219
+ }
1220
+ if (speed === 0) {
1221
+ swiper.setTransition(0);
1222
+ swiper.setTranslate(newTranslate);
1223
+ if (runCallbacks) {
1224
+ swiper.emit('beforeTransitionStart', speed, internal);
1225
+ swiper.emit('transitionEnd');
1226
+ }
1227
+ } else {
1228
+ swiper.setTransition(speed);
1229
+ swiper.setTranslate(newTranslate);
1230
+ if (runCallbacks) {
1231
+ swiper.emit('beforeTransitionStart', speed, internal);
1232
+ swiper.emit('transitionStart');
1233
+ }
1234
+ if (!swiper.animating) {
1235
+ swiper.animating = true;
1236
+ if (!swiper.onTranslateToWrapperTransitionEnd) {
1237
+ swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) {
1238
+ if (!swiper || swiper.destroyed) return;
1239
+ if (e.target !== this) return;
1240
+ swiper.wrapperEl.removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
1241
+ swiper.onTranslateToWrapperTransitionEnd = null;
1242
+ delete swiper.onTranslateToWrapperTransitionEnd;
1243
+ swiper.animating = false;
1244
+ if (runCallbacks) {
1245
+ swiper.emit('transitionEnd');
1246
+ }
1247
+ };
1248
+ }
1249
+ swiper.wrapperEl.addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd);
1250
+ }
1251
+ }
1252
+ return true;
1253
+ }
1254
+
1255
+ var translate = {
1256
+ getTranslate: getSwiperTranslate,
1257
+ setTranslate,
1258
+ minTranslate,
1259
+ maxTranslate,
1260
+ translateTo
1261
+ };
1262
+
1263
+ function setTransition(duration, byController) {
1264
+ const swiper = this;
1265
+ if (!swiper.params.cssMode) {
1266
+ swiper.wrapperEl.style.transitionDuration = `${duration}ms`;
1267
+ swiper.wrapperEl.style.transitionDelay = duration === 0 ? `0ms` : '';
1268
+ }
1269
+ swiper.emit('setTransition', duration, byController);
1270
+ }
1271
+
1272
+ function transitionEmit({
1273
+ swiper,
1274
+ runCallbacks,
1275
+ direction,
1276
+ step
1277
+ }) {
1278
+ const {
1279
+ activeIndex,
1280
+ previousIndex
1281
+ } = swiper;
1282
+ let dir = direction;
1283
+ if (!dir) {
1284
+ if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset';
1285
+ }
1286
+ swiper.emit(`transition${step}`);
1287
+ if (runCallbacks && dir === 'reset') {
1288
+ swiper.emit(`slideResetTransition${step}`);
1289
+ } else if (runCallbacks && activeIndex !== previousIndex) {
1290
+ swiper.emit(`slideChangeTransition${step}`);
1291
+ if (dir === 'next') {
1292
+ swiper.emit(`slideNextTransition${step}`);
1293
+ } else {
1294
+ swiper.emit(`slidePrevTransition${step}`);
1295
+ }
1296
+ }
1297
+ }
1298
+
1299
+ function transitionStart(runCallbacks = true, direction) {
1300
+ const swiper = this;
1301
+ const {
1302
+ params
1303
+ } = swiper;
1304
+ if (params.cssMode) return;
1305
+ if (params.autoHeight) {
1306
+ swiper.updateAutoHeight();
1307
+ }
1308
+ transitionEmit({
1309
+ swiper,
1310
+ runCallbacks,
1311
+ direction,
1312
+ step: 'Start'
1313
+ });
1314
+ }
1315
+
1316
+ function transitionEnd(runCallbacks = true, direction) {
1317
+ const swiper = this;
1318
+ const {
1319
+ params
1320
+ } = swiper;
1321
+ swiper.animating = false;
1322
+ if (params.cssMode) return;
1323
+ swiper.setTransition(0);
1324
+ transitionEmit({
1325
+ swiper,
1326
+ runCallbacks,
1327
+ direction,
1328
+ step: 'End'
1329
+ });
1330
+ }
1331
+
1332
+ var transition = {
1333
+ setTransition,
1334
+ transitionStart,
1335
+ transitionEnd
1336
+ };
1337
+
1338
+ function slideTo(index = 0, speed, runCallbacks = true, internal, initial) {
1339
+ if (typeof index === 'string') {
1340
+ index = parseInt(index, 10);
1341
+ }
1342
+ const swiper = this;
1343
+ let slideIndex = index;
1344
+ if (slideIndex < 0) slideIndex = 0;
1345
+ const {
1346
+ params,
1347
+ snapGrid,
1348
+ slidesGrid,
1349
+ previousIndex,
1350
+ activeIndex,
1351
+ rtlTranslate: rtl,
1352
+ wrapperEl,
1353
+ enabled
1354
+ } = swiper;
1355
+ if (!enabled && !internal && !initial || swiper.destroyed || swiper.animating && params.preventInteractionOnTransition) {
1356
+ return false;
1357
+ }
1358
+ if (typeof speed === 'undefined') {
1359
+ speed = swiper.params.speed;
1360
+ }
1361
+ const skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex);
1362
+ let snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup);
1363
+ if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1;
1364
+ const translate = -snapGrid[snapIndex];
1365
+ // Normalize slideIndex
1366
+ if (params.normalizeSlideIndex) {
1367
+ for (let i = 0; i < slidesGrid.length; i += 1) {
1368
+ const normalizedTranslate = -Math.floor(translate * 100);
1369
+ const normalizedGrid = Math.floor(slidesGrid[i] * 100);
1370
+ const normalizedGridNext = Math.floor(slidesGrid[i + 1] * 100);
1371
+ if (typeof slidesGrid[i + 1] !== 'undefined') {
1372
+ if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext - (normalizedGridNext - normalizedGrid) / 2) {
1373
+ slideIndex = i;
1374
+ } else if (normalizedTranslate >= normalizedGrid && normalizedTranslate < normalizedGridNext) {
1375
+ slideIndex = i + 1;
1376
+ }
1377
+ } else if (normalizedTranslate >= normalizedGrid) {
1378
+ slideIndex = i;
1379
+ }
1380
+ }
1381
+ }
1382
+ // Directions locks
1383
+ if (swiper.initialized && slideIndex !== activeIndex) {
1384
+ if (!swiper.allowSlideNext && (rtl ? translate > swiper.translate && translate > swiper.minTranslate() : translate < swiper.translate && translate < swiper.minTranslate())) {
1385
+ return false;
1386
+ }
1387
+ if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) {
1388
+ if ((activeIndex || 0) !== slideIndex) {
1389
+ return false;
1390
+ }
1391
+ }
1392
+ }
1393
+ if (slideIndex !== (previousIndex || 0) && runCallbacks) {
1394
+ swiper.emit('beforeSlideChangeStart');
1395
+ }
1396
+
1397
+ // Update progress
1398
+ swiper.updateProgress(translate);
1399
+ let direction;
1400
+ if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset';
1401
+
1402
+ // initial virtual
1403
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
1404
+ const isInitialVirtual = isVirtual && initial;
1405
+ // Update Index
1406
+ if (!isInitialVirtual && (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate)) {
1407
+ swiper.updateActiveIndex(slideIndex);
1408
+ // Update Height
1409
+ if (params.autoHeight) {
1410
+ swiper.updateAutoHeight();
1411
+ }
1412
+ swiper.updateSlidesClasses();
1413
+ if (params.effect !== 'slide') {
1414
+ swiper.setTranslate(translate);
1415
+ }
1416
+ if (direction !== 'reset') {
1417
+ swiper.transitionStart(runCallbacks, direction);
1418
+ swiper.transitionEnd(runCallbacks, direction);
1419
+ }
1420
+ return false;
1421
+ }
1422
+ if (params.cssMode) {
1423
+ const isH = swiper.isHorizontal();
1424
+ const t = rtl ? translate : -translate;
1425
+ if (speed === 0) {
1426
+ if (isVirtual) {
1427
+ swiper.wrapperEl.style.scrollSnapType = 'none';
1428
+ swiper._immediateVirtual = true;
1429
+ }
1430
+ if (isVirtual && !swiper._cssModeVirtualInitialSet && swiper.params.initialSlide > 0) {
1431
+ swiper._cssModeVirtualInitialSet = true;
1432
+ requestAnimationFrame(() => {
1433
+ wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;
1434
+ });
1435
+ } else {
1436
+ wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t;
1437
+ }
1438
+ if (isVirtual) {
1439
+ requestAnimationFrame(() => {
1440
+ swiper.wrapperEl.style.scrollSnapType = '';
1441
+ swiper._immediateVirtual = false;
1442
+ });
1443
+ }
1444
+ } else {
1445
+ if (!swiper.support.smoothScroll) {
1446
+ animateCSSModeScroll({
1447
+ swiper,
1448
+ targetPosition: t,
1449
+ side: isH ? 'left' : 'top'
1450
+ });
1451
+ return true;
1452
+ }
1453
+ wrapperEl.scrollTo({
1454
+ [isH ? 'left' : 'top']: t,
1455
+ behavior: 'smooth'
1456
+ });
1457
+ }
1458
+ return true;
1459
+ }
1460
+ const browser = getBrowser();
1461
+ const isSafari = browser.isSafari;
1462
+ if (isVirtual && !initial && isSafari && swiper.isElement) {
1463
+ swiper.virtual.update(false, false, slideIndex);
1464
+ }
1465
+ swiper.setTransition(speed);
1466
+ swiper.setTranslate(translate);
1467
+ swiper.updateActiveIndex(slideIndex);
1468
+ swiper.updateSlidesClasses();
1469
+ swiper.emit('beforeTransitionStart', speed, internal);
1470
+ swiper.transitionStart(runCallbacks, direction);
1471
+ if (speed === 0) {
1472
+ swiper.transitionEnd(runCallbacks, direction);
1473
+ } else if (!swiper.animating) {
1474
+ swiper.animating = true;
1475
+ if (!swiper.onSlideToWrapperTransitionEnd) {
1476
+ swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) {
1477
+ if (!swiper || swiper.destroyed) return;
1478
+ if (e.target !== this) return;
1479
+ swiper.wrapperEl.removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1480
+ swiper.onSlideToWrapperTransitionEnd = null;
1481
+ delete swiper.onSlideToWrapperTransitionEnd;
1482
+ swiper.transitionEnd(runCallbacks, direction);
1483
+ };
1484
+ }
1485
+ swiper.wrapperEl.addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd);
1486
+ }
1487
+ return true;
1488
+ }
1489
+
1490
+ function slideToLoop(index = 0, speed, runCallbacks = true, internal) {
1491
+ if (typeof index === 'string') {
1492
+ const indexAsNumber = parseInt(index, 10);
1493
+ index = indexAsNumber;
1494
+ }
1495
+ const swiper = this;
1496
+ if (swiper.destroyed) return;
1497
+ if (typeof speed === 'undefined') {
1498
+ speed = swiper.params.speed;
1499
+ }
1500
+ const gridEnabled = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
1501
+ let newIndex = index;
1502
+ if (swiper.params.loop) {
1503
+ if (swiper.virtual && swiper.params.virtual.enabled) {
1504
+ // eslint-disable-next-line
1505
+ newIndex = newIndex + swiper.virtual.slidesBefore;
1506
+ } else {
1507
+ let targetSlideIndex;
1508
+ if (gridEnabled) {
1509
+ const slideIndex = newIndex * swiper.params.grid.rows;
1510
+ targetSlideIndex = swiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex).column;
1511
+ } else {
1512
+ targetSlideIndex = swiper.getSlideIndexByData(newIndex);
1513
+ }
1514
+ const cols = gridEnabled ? Math.ceil(swiper.slides.length / swiper.params.grid.rows) : swiper.slides.length;
1515
+ const {
1516
+ centeredSlides,
1517
+ slidesOffsetBefore,
1518
+ slidesOffsetAfter
1519
+ } = swiper.params;
1520
+ const bothDirections = centeredSlides || !!slidesOffsetBefore || !!slidesOffsetAfter;
1521
+ let slidesPerView = swiper.params.slidesPerView;
1522
+ if (slidesPerView === 'auto') {
1523
+ slidesPerView = swiper.slidesPerViewDynamic();
1524
+ } else {
1525
+ slidesPerView = Math.ceil(parseFloat(swiper.params.slidesPerView, 10));
1526
+ if (bothDirections && slidesPerView % 2 === 0) {
1527
+ slidesPerView = slidesPerView + 1;
1528
+ }
1529
+ }
1530
+ let needLoopFix = cols - targetSlideIndex < slidesPerView;
1531
+ if (bothDirections) {
1532
+ needLoopFix = needLoopFix || targetSlideIndex < Math.ceil(slidesPerView / 2);
1533
+ }
1534
+ if (internal && bothDirections && swiper.params.slidesPerView !== 'auto' && !gridEnabled) {
1535
+ needLoopFix = false;
1536
+ }
1537
+ if (needLoopFix) {
1538
+ const direction = bothDirections ? targetSlideIndex < swiper.activeIndex ? 'prev' : 'next' : targetSlideIndex - swiper.activeIndex - 1 < swiper.params.slidesPerView ? 'next' : 'prev';
1539
+ swiper.loopFix({
1540
+ direction,
1541
+ slideTo: true,
1542
+ activeSlideIndex: direction === 'next' ? targetSlideIndex + 1 : targetSlideIndex - cols + 1,
1543
+ slideRealIndex: direction === 'next' ? swiper.realIndex : undefined
1544
+ });
1545
+ }
1546
+ if (gridEnabled) {
1547
+ const slideIndex = newIndex * swiper.params.grid.rows;
1548
+ newIndex = swiper.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === slideIndex).column;
1549
+ } else {
1550
+ newIndex = swiper.getSlideIndexByData(newIndex);
1551
+ }
1552
+ }
1553
+ }
1554
+ requestAnimationFrame(() => {
1555
+ swiper.slideTo(newIndex, speed, runCallbacks, internal);
1556
+ });
1557
+ return swiper;
1558
+ }
1559
+
1560
+ /* eslint no-unused-vars: "off" */
1561
+ function slideNext(speed, runCallbacks = true, internal) {
1562
+ const swiper = this;
1563
+ const {
1564
+ enabled,
1565
+ params,
1566
+ animating
1567
+ } = swiper;
1568
+ if (!enabled || swiper.destroyed) return swiper;
1569
+ if (typeof speed === 'undefined') {
1570
+ speed = swiper.params.speed;
1571
+ }
1572
+ let perGroup = params.slidesPerGroup;
1573
+ if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
1574
+ perGroup = Math.max(swiper.slidesPerViewDynamic('current', true), 1);
1575
+ }
1576
+ const increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : perGroup;
1577
+ const isVirtual = swiper.virtual && params.virtual.enabled;
1578
+ if (params.loop) {
1579
+ if (animating && !isVirtual && params.loopPreventsSliding) return false;
1580
+ swiper.loopFix({
1581
+ direction: 'next'
1582
+ });
1583
+ // eslint-disable-next-line
1584
+ swiper._clientLeft = swiper.wrapperEl.clientLeft;
1585
+ if (swiper.activeIndex === swiper.slides.length - 1 && params.cssMode) {
1586
+ requestAnimationFrame(() => {
1587
+ swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
1588
+ });
1589
+ return true;
1590
+ }
1591
+ }
1592
+ if (params.rewind && swiper.isEnd) {
1593
+ return swiper.slideTo(0, speed, runCallbacks, internal);
1594
+ }
1595
+ return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal);
1596
+ }
1597
+
1598
+ /* eslint no-unused-vars: "off" */
1599
+ function slidePrev(speed, runCallbacks = true, internal) {
1600
+ const swiper = this;
1601
+ const {
1602
+ params,
1603
+ snapGrid,
1604
+ slidesGrid,
1605
+ rtlTranslate,
1606
+ enabled,
1607
+ animating
1608
+ } = swiper;
1609
+ if (!enabled || swiper.destroyed) return swiper;
1610
+ if (typeof speed === 'undefined') {
1611
+ speed = swiper.params.speed;
1612
+ }
1613
+ const isVirtual = swiper.virtual && params.virtual.enabled;
1614
+ if (params.loop) {
1615
+ if (animating && !isVirtual && params.loopPreventsSliding) return false;
1616
+ swiper.loopFix({
1617
+ direction: 'prev'
1618
+ });
1619
+ // eslint-disable-next-line
1620
+ swiper._clientLeft = swiper.wrapperEl.clientLeft;
1621
+ }
1622
+ const translate = rtlTranslate ? swiper.translate : -swiper.translate;
1623
+ function normalize(val) {
1624
+ if (val < 0) return -Math.floor(Math.abs(val));
1625
+ return Math.floor(val);
1626
+ }
1627
+ const normalizedTranslate = normalize(translate);
1628
+ const normalizedSnapGrid = snapGrid.map(val => normalize(val));
1629
+ const isFreeMode = params.freeMode && params.freeMode.enabled;
1630
+ let prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1];
1631
+ if (typeof prevSnap === 'undefined' && (params.cssMode || isFreeMode)) {
1632
+ let prevSnapIndex;
1633
+ snapGrid.forEach((snap, snapIndex) => {
1634
+ if (normalizedTranslate >= snap) {
1635
+ // prevSnap = snap;
1636
+ prevSnapIndex = snapIndex;
1637
+ }
1638
+ });
1639
+ if (typeof prevSnapIndex !== 'undefined') {
1640
+ prevSnap = isFreeMode ? snapGrid[prevSnapIndex] : snapGrid[prevSnapIndex > 0 ? prevSnapIndex - 1 : prevSnapIndex];
1641
+ }
1642
+ }
1643
+ let prevIndex = 0;
1644
+ if (typeof prevSnap !== 'undefined') {
1645
+ prevIndex = slidesGrid.indexOf(prevSnap);
1646
+ if (prevIndex < 0) prevIndex = swiper.activeIndex - 1;
1647
+ if (params.slidesPerView === 'auto' && params.slidesPerGroup === 1 && params.slidesPerGroupAuto) {
1648
+ prevIndex = prevIndex - swiper.slidesPerViewDynamic('previous', true) + 1;
1649
+ prevIndex = Math.max(prevIndex, 0);
1650
+ }
1651
+ }
1652
+ if (params.rewind && swiper.isBeginning) {
1653
+ const lastIndex = swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
1654
+ return swiper.slideTo(lastIndex, speed, runCallbacks, internal);
1655
+ } else if (params.loop && swiper.activeIndex === 0 && params.cssMode) {
1656
+ requestAnimationFrame(() => {
1657
+ swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1658
+ });
1659
+ return true;
1660
+ }
1661
+ return swiper.slideTo(prevIndex, speed, runCallbacks, internal);
1662
+ }
1663
+
1664
+ /* eslint no-unused-vars: "off" */
1665
+ function slideReset(speed, runCallbacks = true, internal) {
1666
+ const swiper = this;
1667
+ if (swiper.destroyed) return;
1668
+ if (typeof speed === 'undefined') {
1669
+ speed = swiper.params.speed;
1670
+ }
1671
+ return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal);
1672
+ }
1673
+
1674
+ /* eslint no-unused-vars: "off" */
1675
+ function slideToClosest(speed, runCallbacks = true, internal, threshold = 0.5) {
1676
+ const swiper = this;
1677
+ if (swiper.destroyed) return;
1678
+ if (typeof speed === 'undefined') {
1679
+ speed = swiper.params.speed;
1680
+ }
1681
+ let index = swiper.activeIndex;
1682
+ const skip = Math.min(swiper.params.slidesPerGroupSkip, index);
1683
+ const snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup);
1684
+ const translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate;
1685
+ if (translate >= swiper.snapGrid[snapIndex]) {
1686
+ // The current translate is on or after the current snap index, so the choice
1687
+ // is between the current index and the one after it.
1688
+ const currentSnap = swiper.snapGrid[snapIndex];
1689
+ const nextSnap = swiper.snapGrid[snapIndex + 1];
1690
+ if (translate - currentSnap > (nextSnap - currentSnap) * threshold) {
1691
+ index += swiper.params.slidesPerGroup;
1692
+ }
1693
+ } else {
1694
+ // The current translate is before the current snap index, so the choice
1695
+ // is between the current index and the one before it.
1696
+ const prevSnap = swiper.snapGrid[snapIndex - 1];
1697
+ const currentSnap = swiper.snapGrid[snapIndex];
1698
+ if (translate - prevSnap <= (currentSnap - prevSnap) * threshold) {
1699
+ index -= swiper.params.slidesPerGroup;
1700
+ }
1701
+ }
1702
+ index = Math.max(index, 0);
1703
+ index = Math.min(index, swiper.slidesGrid.length - 1);
1704
+ return swiper.slideTo(index, speed, runCallbacks, internal);
1705
+ }
1706
+
1707
+ function slideToClickedSlide() {
1708
+ const swiper = this;
1709
+ if (swiper.destroyed) return;
1710
+ const {
1711
+ params,
1712
+ slidesEl
1713
+ } = swiper;
1714
+ const slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView;
1715
+ let slideToIndex = swiper.getSlideIndexWhenGrid(swiper.clickedIndex);
1716
+ let realIndex;
1717
+ const slideSelector = swiper.isElement ? `swiper-slide` : `.${params.slideClass}`;
1718
+ const isGrid = swiper.grid && swiper.params.grid && swiper.params.grid.rows > 1;
1719
+ if (params.loop) {
1720
+ if (swiper.animating) return;
1721
+ realIndex = parseInt(swiper.clickedSlide.getAttribute('data-swiper-slide-index'), 10);
1722
+ if (params.centeredSlides) {
1723
+ swiper.slideToLoop(realIndex);
1724
+ } else if (slideToIndex > (isGrid ? (swiper.slides.length - slidesPerView) / 2 - (swiper.params.grid.rows - 1) : swiper.slides.length - slidesPerView)) {
1725
+ swiper.loopFix();
1726
+ slideToIndex = swiper.getSlideIndex(elementChildren(slidesEl, `${slideSelector}[data-swiper-slide-index="${realIndex}"]`)[0]);
1727
+ nextTick(() => {
1728
+ swiper.slideTo(slideToIndex);
1729
+ });
1730
+ } else {
1731
+ swiper.slideTo(slideToIndex);
1732
+ }
1733
+ } else {
1734
+ swiper.slideTo(slideToIndex);
1735
+ }
1736
+ }
1737
+
1738
+ var slide = {
1739
+ slideTo,
1740
+ slideToLoop,
1741
+ slideNext,
1742
+ slidePrev,
1743
+ slideReset,
1744
+ slideToClosest,
1745
+ slideToClickedSlide
1746
+ };
1747
+
1748
+ function loopCreate(slideRealIndex, initial) {
1749
+ const swiper = this;
1750
+ const {
1751
+ params,
1752
+ slidesEl
1753
+ } = swiper;
1754
+ if (!params.loop || swiper.virtual && swiper.params.virtual.enabled) return;
1755
+ const initSlides = () => {
1756
+ const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
1757
+ slides.forEach((el, index) => {
1758
+ el.setAttribute('data-swiper-slide-index', index);
1759
+ });
1760
+ };
1761
+ const clearBlankSlides = () => {
1762
+ const slides = elementChildren(slidesEl, `.${params.slideBlankClass}`);
1763
+ slides.forEach(el => {
1764
+ el.remove();
1765
+ });
1766
+ if (slides.length > 0) {
1767
+ swiper.recalcSlides();
1768
+ swiper.updateSlides();
1769
+ }
1770
+ };
1771
+ const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
1772
+ if (params.loopAddBlankSlides && (params.slidesPerGroup > 1 || gridEnabled)) {
1773
+ clearBlankSlides();
1774
+ }
1775
+ const slidesPerGroup = params.slidesPerGroup * (gridEnabled ? params.grid.rows : 1);
1776
+ const shouldFillGroup = swiper.slides.length % slidesPerGroup !== 0;
1777
+ const shouldFillGrid = gridEnabled && swiper.slides.length % params.grid.rows !== 0;
1778
+ const addBlankSlides = amountOfSlides => {
1779
+ for (let i = 0; i < amountOfSlides; i += 1) {
1780
+ const slideEl = swiper.isElement ? createElement('swiper-slide', [params.slideBlankClass]) : createElement('div', [params.slideClass, params.slideBlankClass]);
1781
+ swiper.slidesEl.append(slideEl);
1782
+ }
1783
+ };
1784
+ if (shouldFillGroup) {
1785
+ if (params.loopAddBlankSlides) {
1786
+ const slidesToAdd = slidesPerGroup - swiper.slides.length % slidesPerGroup;
1787
+ addBlankSlides(slidesToAdd);
1788
+ swiper.recalcSlides();
1789
+ swiper.updateSlides();
1790
+ } else {
1791
+ showWarning('Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');
1792
+ }
1793
+ initSlides();
1794
+ } else if (shouldFillGrid) {
1795
+ if (params.loopAddBlankSlides) {
1796
+ const slidesToAdd = params.grid.rows - swiper.slides.length % params.grid.rows;
1797
+ addBlankSlides(slidesToAdd);
1798
+ swiper.recalcSlides();
1799
+ swiper.updateSlides();
1800
+ } else {
1801
+ showWarning('Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)');
1802
+ }
1803
+ initSlides();
1804
+ } else {
1805
+ initSlides();
1806
+ }
1807
+ const bothDirections = params.centeredSlides || !!params.slidesOffsetBefore || !!params.slidesOffsetAfter;
1808
+ swiper.loopFix({
1809
+ slideRealIndex,
1810
+ direction: bothDirections ? undefined : 'next',
1811
+ initial
1812
+ });
1813
+ }
1814
+
1815
+ function loopFix({
1816
+ slideRealIndex,
1817
+ slideTo = true,
1818
+ direction,
1819
+ setTranslate,
1820
+ activeSlideIndex,
1821
+ initial,
1822
+ byController,
1823
+ byMousewheel
1824
+ } = {}) {
1825
+ const swiper = this;
1826
+ if (!swiper.params.loop) return;
1827
+ swiper.emit('beforeLoopFix');
1828
+ const {
1829
+ slides,
1830
+ allowSlidePrev,
1831
+ allowSlideNext,
1832
+ slidesEl,
1833
+ params
1834
+ } = swiper;
1835
+ const {
1836
+ centeredSlides,
1837
+ slidesOffsetBefore,
1838
+ slidesOffsetAfter,
1839
+ initialSlide
1840
+ } = params;
1841
+ const bothDirections = centeredSlides || !!slidesOffsetBefore || !!slidesOffsetAfter;
1842
+ swiper.allowSlidePrev = true;
1843
+ swiper.allowSlideNext = true;
1844
+ if (swiper.virtual && params.virtual.enabled) {
1845
+ if (slideTo) {
1846
+ if (!bothDirections && swiper.snapIndex === 0) {
1847
+ swiper.slideTo(swiper.virtual.slides.length, 0, false, true);
1848
+ } else if (bothDirections && swiper.snapIndex < params.slidesPerView) {
1849
+ swiper.slideTo(swiper.virtual.slides.length + swiper.snapIndex, 0, false, true);
1850
+ } else if (swiper.snapIndex === swiper.snapGrid.length - 1) {
1851
+ swiper.slideTo(swiper.virtual.slidesBefore, 0, false, true);
1852
+ }
1853
+ }
1854
+ swiper.allowSlidePrev = allowSlidePrev;
1855
+ swiper.allowSlideNext = allowSlideNext;
1856
+ swiper.emit('loopFix');
1857
+ return;
1858
+ }
1859
+ let slidesPerView = params.slidesPerView;
1860
+ if (slidesPerView === 'auto') {
1861
+ slidesPerView = swiper.slidesPerViewDynamic();
1862
+ } else {
1863
+ slidesPerView = Math.ceil(parseFloat(params.slidesPerView, 10));
1864
+ if (bothDirections && slidesPerView % 2 === 0) {
1865
+ slidesPerView = slidesPerView + 1;
1866
+ }
1867
+ }
1868
+ const slidesPerGroup = params.slidesPerGroupAuto ? slidesPerView : params.slidesPerGroup;
1869
+ let loopedSlides = bothDirections ? Math.max(slidesPerGroup, Math.ceil(slidesPerView / 2)) : slidesPerGroup;
1870
+ if (loopedSlides % slidesPerGroup !== 0) {
1871
+ loopedSlides += slidesPerGroup - loopedSlides % slidesPerGroup;
1872
+ }
1873
+ loopedSlides += params.loopAdditionalSlides;
1874
+ swiper.loopedSlides = loopedSlides;
1875
+ const gridEnabled = swiper.grid && params.grid && params.grid.rows > 1;
1876
+ if (slides.length < slidesPerView + loopedSlides || swiper.params.effect === 'cards' && slides.length < slidesPerView + loopedSlides * 2) {
1877
+ showWarning('Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters');
1878
+ } else if (gridEnabled && params.grid.fill === 'row') {
1879
+ showWarning('Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`');
1880
+ }
1881
+ const prependSlidesIndexes = [];
1882
+ const appendSlidesIndexes = [];
1883
+ const cols = gridEnabled ? Math.ceil(slides.length / params.grid.rows) : slides.length;
1884
+ const isInitialOverflow = initial && cols - initialSlide < slidesPerView && !bothDirections;
1885
+ let activeIndex = isInitialOverflow ? initialSlide : swiper.activeIndex;
1886
+ if (typeof activeSlideIndex === 'undefined') {
1887
+ activeSlideIndex = swiper.getSlideIndex(slides.find(el => el.classList.contains(params.slideActiveClass)));
1888
+ } else {
1889
+ activeIndex = activeSlideIndex;
1890
+ }
1891
+ const isNext = direction === 'next' || !direction;
1892
+ const isPrev = direction === 'prev' || !direction;
1893
+ let slidesPrepended = 0;
1894
+ let slidesAppended = 0;
1895
+ const activeColIndex = gridEnabled ? slides[activeSlideIndex].column : activeSlideIndex;
1896
+ const activeColIndexWithShift = activeColIndex + (bothDirections && typeof setTranslate === 'undefined' ? -slidesPerView / 2 + 0.5 : 0);
1897
+ // prepend last slides before start
1898
+ if (activeColIndexWithShift < loopedSlides) {
1899
+ slidesPrepended = Math.max(loopedSlides - activeColIndexWithShift, slidesPerGroup);
1900
+ for (let i = 0; i < loopedSlides - activeColIndexWithShift; i += 1) {
1901
+ const index = i - Math.floor(i / cols) * cols;
1902
+ if (gridEnabled) {
1903
+ const colIndexToPrepend = cols - index - 1;
1904
+ for (let i = slides.length - 1; i >= 0; i -= 1) {
1905
+ if (slides[i].column === colIndexToPrepend) prependSlidesIndexes.push(i);
1906
+ }
1907
+ // slides.forEach((slide, slideIndex) => {
1908
+ // if (slide.column === colIndexToPrepend) prependSlidesIndexes.push(slideIndex);
1909
+ // });
1910
+ } else {
1911
+ prependSlidesIndexes.push(cols - index - 1);
1912
+ }
1913
+ }
1914
+ } else if (activeColIndexWithShift + slidesPerView > cols - loopedSlides) {
1915
+ slidesAppended = Math.max(activeColIndexWithShift - (cols - loopedSlides * 2), slidesPerGroup);
1916
+ if (isInitialOverflow) {
1917
+ slidesAppended = Math.max(slidesAppended, slidesPerView - cols + initialSlide + 1);
1918
+ }
1919
+ for (let i = 0; i < slidesAppended; i += 1) {
1920
+ const index = i - Math.floor(i / cols) * cols;
1921
+ if (gridEnabled) {
1922
+ slides.forEach((slide, slideIndex) => {
1923
+ if (slide.column === index) appendSlidesIndexes.push(slideIndex);
1924
+ });
1925
+ } else {
1926
+ appendSlidesIndexes.push(index);
1927
+ }
1928
+ }
1929
+ }
1930
+ swiper.__preventObserver__ = true;
1931
+ requestAnimationFrame(() => {
1932
+ swiper.__preventObserver__ = false;
1933
+ });
1934
+ if (swiper.params.effect === 'cards' && slides.length < slidesPerView + loopedSlides * 2) {
1935
+ if (appendSlidesIndexes.includes(activeSlideIndex)) {
1936
+ appendSlidesIndexes.splice(appendSlidesIndexes.indexOf(activeSlideIndex), 1);
1937
+ }
1938
+ if (prependSlidesIndexes.includes(activeSlideIndex)) {
1939
+ prependSlidesIndexes.splice(prependSlidesIndexes.indexOf(activeSlideIndex), 1);
1940
+ }
1941
+ }
1942
+ if (isPrev) {
1943
+ prependSlidesIndexes.forEach(index => {
1944
+ slides[index].swiperLoopMoveDOM = true;
1945
+ slidesEl.prepend(slides[index]);
1946
+ slides[index].swiperLoopMoveDOM = false;
1947
+ });
1948
+ }
1949
+ if (isNext) {
1950
+ appendSlidesIndexes.forEach(index => {
1951
+ slides[index].swiperLoopMoveDOM = true;
1952
+ slidesEl.append(slides[index]);
1953
+ slides[index].swiperLoopMoveDOM = false;
1954
+ });
1955
+ }
1956
+ swiper.recalcSlides();
1957
+ if (params.slidesPerView === 'auto') {
1958
+ swiper.updateSlides();
1959
+ } else if (gridEnabled && (prependSlidesIndexes.length > 0 && isPrev || appendSlidesIndexes.length > 0 && isNext)) {
1960
+ swiper.slides.forEach((slide, slideIndex) => {
1961
+ swiper.grid.updateSlide(slideIndex, slide, swiper.slides);
1962
+ });
1963
+ }
1964
+ if (params.watchSlidesProgress) {
1965
+ swiper.updateSlidesOffset();
1966
+ }
1967
+ if (slideTo) {
1968
+ if (prependSlidesIndexes.length > 0 && isPrev) {
1969
+ if (typeof slideRealIndex === 'undefined') {
1970
+ const currentSlideTranslate = swiper.slidesGrid[activeIndex];
1971
+ const newSlideTranslate = swiper.slidesGrid[activeIndex + slidesPrepended];
1972
+ const diff = newSlideTranslate - currentSlideTranslate;
1973
+ if (byMousewheel) {
1974
+ swiper.setTranslate(swiper.translate - diff);
1975
+ } else {
1976
+ swiper.slideTo(activeIndex + Math.ceil(slidesPrepended), 0, false, true);
1977
+ if (setTranslate) {
1978
+ swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
1979
+ swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;
1980
+ }
1981
+ }
1982
+ } else {
1983
+ if (setTranslate) {
1984
+ const shift = gridEnabled ? prependSlidesIndexes.length / params.grid.rows : prependSlidesIndexes.length;
1985
+ swiper.slideTo(swiper.activeIndex + shift, 0, false, true);
1986
+ swiper.touchEventsData.currentTranslate = swiper.translate;
1987
+ }
1988
+ }
1989
+ } else if (appendSlidesIndexes.length > 0 && isNext) {
1990
+ if (typeof slideRealIndex === 'undefined') {
1991
+ const currentSlideTranslate = swiper.slidesGrid[activeIndex];
1992
+ const newSlideTranslate = swiper.slidesGrid[activeIndex - slidesAppended];
1993
+ const diff = newSlideTranslate - currentSlideTranslate;
1994
+ if (byMousewheel) {
1995
+ swiper.setTranslate(swiper.translate - diff);
1996
+ } else {
1997
+ swiper.slideTo(activeIndex - slidesAppended, 0, false, true);
1998
+ if (setTranslate) {
1999
+ swiper.touchEventsData.startTranslate = swiper.touchEventsData.startTranslate - diff;
2000
+ swiper.touchEventsData.currentTranslate = swiper.touchEventsData.currentTranslate - diff;
2001
+ }
2002
+ }
2003
+ } else {
2004
+ const shift = gridEnabled ? appendSlidesIndexes.length / params.grid.rows : appendSlidesIndexes.length;
2005
+ swiper.slideTo(swiper.activeIndex - shift, 0, false, true);
2006
+ }
2007
+ }
2008
+ }
2009
+ swiper.allowSlidePrev = allowSlidePrev;
2010
+ swiper.allowSlideNext = allowSlideNext;
2011
+ if (swiper.controller && swiper.controller.control && !byController) {
2012
+ const loopParams = {
2013
+ slideRealIndex,
2014
+ direction,
2015
+ setTranslate,
2016
+ activeSlideIndex,
2017
+ byController: true
2018
+ };
2019
+ if (Array.isArray(swiper.controller.control)) {
2020
+ swiper.controller.control.forEach(c => {
2021
+ if (!c.destroyed && c.params.loop) c.loopFix({
2022
+ ...loopParams,
2023
+ slideTo: c.params.slidesPerView === params.slidesPerView ? slideTo : false
2024
+ });
2025
+ });
2026
+ } else if (swiper.controller.control instanceof swiper.constructor && swiper.controller.control.params.loop) {
2027
+ swiper.controller.control.loopFix({
2028
+ ...loopParams,
2029
+ slideTo: swiper.controller.control.params.slidesPerView === params.slidesPerView ? slideTo : false
2030
+ });
2031
+ }
2032
+ }
2033
+ swiper.emit('loopFix');
2034
+ }
2035
+
2036
+ function loopDestroy() {
2037
+ const swiper = this;
2038
+ const {
2039
+ params,
2040
+ slidesEl
2041
+ } = swiper;
2042
+ if (!params.loop || !slidesEl || swiper.virtual && swiper.params.virtual.enabled) return;
2043
+ swiper.recalcSlides();
2044
+ const newSlidesOrder = [];
2045
+ swiper.slides.forEach(slideEl => {
2046
+ const index = typeof slideEl.swiperSlideIndex === 'undefined' ? slideEl.getAttribute('data-swiper-slide-index') * 1 : slideEl.swiperSlideIndex;
2047
+ newSlidesOrder[index] = slideEl;
2048
+ });
2049
+ swiper.slides.forEach(slideEl => {
2050
+ slideEl.removeAttribute('data-swiper-slide-index');
2051
+ });
2052
+ newSlidesOrder.forEach(slideEl => {
2053
+ slidesEl.append(slideEl);
2054
+ });
2055
+ swiper.recalcSlides();
2056
+ swiper.slideTo(swiper.realIndex, 0);
2057
+ }
2058
+
2059
+ var loop = {
2060
+ loopCreate,
2061
+ loopFix,
2062
+ loopDestroy
2063
+ };
2064
+
2065
+ function setGrabCursor(moving) {
2066
+ const swiper = this;
2067
+ if (!swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return;
2068
+ const el = swiper.params.touchEventsTarget === 'container' ? swiper.el : swiper.wrapperEl;
2069
+ if (swiper.isElement) {
2070
+ swiper.__preventObserver__ = true;
2071
+ }
2072
+ el.style.cursor = 'move';
2073
+ el.style.cursor = moving ? 'grabbing' : 'grab';
2074
+ if (swiper.isElement) {
2075
+ requestAnimationFrame(() => {
2076
+ swiper.__preventObserver__ = false;
2077
+ });
2078
+ }
2079
+ }
2080
+
2081
+ function unsetGrabCursor() {
2082
+ const swiper = this;
2083
+ if (swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) {
2084
+ return;
2085
+ }
2086
+ if (swiper.isElement) {
2087
+ swiper.__preventObserver__ = true;
2088
+ }
2089
+ swiper[swiper.params.touchEventsTarget === 'container' ? 'el' : 'wrapperEl'].style.cursor = '';
2090
+ if (swiper.isElement) {
2091
+ requestAnimationFrame(() => {
2092
+ swiper.__preventObserver__ = false;
2093
+ });
2094
+ }
2095
+ }
2096
+
2097
+ var grabCursor = {
2098
+ setGrabCursor,
2099
+ unsetGrabCursor
2100
+ };
2101
+
2102
+ // Modified from https://stackoverflow.com/questions/54520554/custom-element-getrootnode-closest-function-crossing-multiple-parent-shadowd
2103
+ function closestElement(selector, base = this) {
2104
+ function __closestFrom(el) {
2105
+ if (!el || el === getDocument() || el === getWindow()) return null;
2106
+ if (el.assignedSlot) el = el.assignedSlot;
2107
+ const found = el.closest(selector);
2108
+ if (!found && !el.getRootNode) {
2109
+ return null;
2110
+ }
2111
+ return found || __closestFrom(el.getRootNode().host);
2112
+ }
2113
+ return __closestFrom(base);
2114
+ }
2115
+ function preventEdgeSwipe(swiper, event, startX) {
2116
+ const window = getWindow();
2117
+ const {
2118
+ params
2119
+ } = swiper;
2120
+ const edgeSwipeDetection = params.edgeSwipeDetection;
2121
+ const edgeSwipeThreshold = params.edgeSwipeThreshold;
2122
+ if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= window.innerWidth - edgeSwipeThreshold)) {
2123
+ if (edgeSwipeDetection === 'prevent') {
2124
+ event.preventDefault();
2125
+ return true;
2126
+ }
2127
+ return false;
2128
+ }
2129
+ return true;
2130
+ }
2131
+ function onTouchStart(event) {
2132
+ const swiper = this;
2133
+ const document = getDocument();
2134
+ let e = event;
2135
+ if (e.originalEvent) e = e.originalEvent;
2136
+ const data = swiper.touchEventsData;
2137
+ if (e.type === 'pointerdown') {
2138
+ if (data.pointerId !== null && data.pointerId !== e.pointerId) {
2139
+ return;
2140
+ }
2141
+ data.pointerId = e.pointerId;
2142
+ } else if (e.type === 'touchstart' && e.targetTouches.length === 1) {
2143
+ data.touchId = e.targetTouches[0].identifier;
2144
+ }
2145
+ if (e.type === 'touchstart') {
2146
+ // don't proceed touch event
2147
+ preventEdgeSwipe(swiper, e, e.targetTouches[0].pageX);
2148
+ return;
2149
+ }
2150
+ const {
2151
+ params,
2152
+ touches,
2153
+ enabled
2154
+ } = swiper;
2155
+ if (!enabled) return;
2156
+ if (!params.simulateTouch && e.pointerType === 'mouse') return;
2157
+ if (swiper.animating && params.preventInteractionOnTransition) {
2158
+ return;
2159
+ }
2160
+ if (!swiper.animating && params.cssMode && params.loop) {
2161
+ swiper.loopFix();
2162
+ }
2163
+ let targetEl = e.target;
2164
+ if (params.touchEventsTarget === 'wrapper') {
2165
+ if (!elementIsChildOf(targetEl, swiper.wrapperEl)) return;
2166
+ }
2167
+ if ('which' in e && e.which === 3) return;
2168
+ if ('button' in e && e.button > 0) return;
2169
+ if (data.isTouched && data.isMoved) return;
2170
+
2171
+ // change target el for shadow root component
2172
+ const swipingClassHasValue = !!params.noSwipingClass && params.noSwipingClass !== '';
2173
+ // eslint-disable-next-line
2174
+ const eventPath = e.composedPath ? e.composedPath() : e.path;
2175
+ if (swipingClassHasValue && e.target && e.target.shadowRoot && eventPath) {
2176
+ targetEl = eventPath[0];
2177
+ }
2178
+ const noSwipingSelector = params.noSwipingSelector ? params.noSwipingSelector : `.${params.noSwipingClass}`;
2179
+ const isTargetShadow = !!(e.target && e.target.shadowRoot);
2180
+
2181
+ // use closestElement for shadow root element to get the actual closest for nested shadow root element
2182
+ if (params.noSwiping && (isTargetShadow ? closestElement(noSwipingSelector, targetEl) : targetEl.closest(noSwipingSelector))) {
2183
+ swiper.allowClick = true;
2184
+ return;
2185
+ }
2186
+ if (params.swipeHandler) {
2187
+ if (!targetEl.closest(params.swipeHandler)) return;
2188
+ }
2189
+ touches.currentX = e.pageX;
2190
+ touches.currentY = e.pageY;
2191
+ const startX = touches.currentX;
2192
+ const startY = touches.currentY;
2193
+
2194
+ // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore
2195
+
2196
+ if (!preventEdgeSwipe(swiper, e, startX)) {
2197
+ return;
2198
+ }
2199
+ Object.assign(data, {
2200
+ isTouched: true,
2201
+ isMoved: false,
2202
+ allowTouchCallbacks: true,
2203
+ isScrolling: undefined,
2204
+ startMoving: undefined
2205
+ });
2206
+ touches.startX = startX;
2207
+ touches.startY = startY;
2208
+ data.touchStartTime = now();
2209
+ swiper.allowClick = true;
2210
+ swiper.updateSize();
2211
+ swiper.swipeDirection = undefined;
2212
+ if (params.threshold > 0) data.allowThresholdMove = false;
2213
+ let preventDefault = true;
2214
+ if (targetEl.matches(data.focusableElements)) {
2215
+ preventDefault = false;
2216
+ if (targetEl.nodeName === 'SELECT') {
2217
+ data.isTouched = false;
2218
+ }
2219
+ }
2220
+ if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== targetEl && (e.pointerType === 'mouse' || e.pointerType !== 'mouse' && !targetEl.matches(data.focusableElements))) {
2221
+ document.activeElement.blur();
2222
+ }
2223
+ const shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault;
2224
+ if ((params.touchStartForcePreventDefault || shouldPreventDefault) && !targetEl.isContentEditable) {
2225
+ e.preventDefault();
2226
+ }
2227
+ if (params.freeMode && params.freeMode.enabled && swiper.freeMode && swiper.animating && !params.cssMode) {
2228
+ swiper.freeMode.onTouchStart();
2229
+ }
2230
+ swiper.emit('touchStart', e);
2231
+ }
2232
+
2233
+ function onTouchMove(event) {
2234
+ const document = getDocument();
2235
+ const swiper = this;
2236
+ const data = swiper.touchEventsData;
2237
+ const {
2238
+ params,
2239
+ touches,
2240
+ rtlTranslate: rtl,
2241
+ enabled
2242
+ } = swiper;
2243
+ if (!enabled) return;
2244
+ if (!params.simulateTouch && event.pointerType === 'mouse') return;
2245
+ let e = event;
2246
+ if (e.originalEvent) e = e.originalEvent;
2247
+ if (e.type === 'pointermove') {
2248
+ if (data.touchId !== null) return; // return from pointer if we use touch
2249
+ const id = e.pointerId;
2250
+ if (id !== data.pointerId) return;
2251
+ }
2252
+ let targetTouch;
2253
+ if (e.type === 'touchmove') {
2254
+ targetTouch = [...e.changedTouches].find(t => t.identifier === data.touchId);
2255
+ if (!targetTouch || targetTouch.identifier !== data.touchId) return;
2256
+ } else {
2257
+ targetTouch = e;
2258
+ }
2259
+ if (!data.isTouched) {
2260
+ if (data.startMoving && data.isScrolling) {
2261
+ swiper.emit('touchMoveOpposite', e);
2262
+ }
2263
+ return;
2264
+ }
2265
+ const pageX = targetTouch.pageX;
2266
+ const pageY = targetTouch.pageY;
2267
+ if (e.preventedByNestedSwiper) {
2268
+ touches.startX = pageX;
2269
+ touches.startY = pageY;
2270
+ return;
2271
+ }
2272
+ if (!swiper.allowTouchMove) {
2273
+ if (!e.target.matches(data.focusableElements)) {
2274
+ swiper.allowClick = false;
2275
+ }
2276
+ if (data.isTouched) {
2277
+ Object.assign(touches, {
2278
+ startX: pageX,
2279
+ startY: pageY,
2280
+ currentX: pageX,
2281
+ currentY: pageY
2282
+ });
2283
+ data.touchStartTime = now();
2284
+ }
2285
+ return;
2286
+ }
2287
+ if (params.touchReleaseOnEdges && !params.loop) {
2288
+ if (swiper.isVertical()) {
2289
+ // Vertical
2290
+ if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) {
2291
+ data.isTouched = false;
2292
+ data.isMoved = false;
2293
+ return;
2294
+ }
2295
+ } else if (rtl && (pageX > touches.startX && -swiper.translate <= swiper.maxTranslate() || pageX < touches.startX && -swiper.translate >= swiper.minTranslate())) {
2296
+ return;
2297
+ } else if (!rtl && (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate())) {
2298
+ return;
2299
+ }
2300
+ }
2301
+ if (document.activeElement && document.activeElement.matches(data.focusableElements) && document.activeElement !== e.target && e.pointerType !== 'mouse') {
2302
+ document.activeElement.blur();
2303
+ }
2304
+ if (document.activeElement) {
2305
+ if (e.target === document.activeElement && e.target.matches(data.focusableElements)) {
2306
+ data.isMoved = true;
2307
+ swiper.allowClick = false;
2308
+ return;
2309
+ }
2310
+ }
2311
+ if (data.allowTouchCallbacks) {
2312
+ swiper.emit('touchMove', e);
2313
+ }
2314
+ touches.previousX = touches.currentX;
2315
+ touches.previousY = touches.currentY;
2316
+ touches.currentX = pageX;
2317
+ touches.currentY = pageY;
2318
+ const diffX = touches.currentX - touches.startX;
2319
+ const diffY = touches.currentY - touches.startY;
2320
+ if (swiper.params.threshold && Math.sqrt(diffX ** 2 + diffY ** 2) < swiper.params.threshold) return;
2321
+ if (typeof data.isScrolling === 'undefined') {
2322
+ let touchAngle;
2323
+ if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) {
2324
+ data.isScrolling = false;
2325
+ } else {
2326
+ // eslint-disable-next-line
2327
+ if (diffX * diffX + diffY * diffY >= 25) {
2328
+ touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI;
2329
+ data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle;
2330
+ }
2331
+ }
2332
+ }
2333
+ if (data.isScrolling) {
2334
+ swiper.emit('touchMoveOpposite', e);
2335
+ }
2336
+ if (typeof data.startMoving === 'undefined') {
2337
+ if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) {
2338
+ data.startMoving = true;
2339
+ }
2340
+ }
2341
+ if (data.isScrolling || e.type === 'touchmove' && data.preventTouchMoveFromPointerMove) {
2342
+ data.isTouched = false;
2343
+ return;
2344
+ }
2345
+ if (!data.startMoving) {
2346
+ return;
2347
+ }
2348
+ swiper.allowClick = false;
2349
+ if (!params.cssMode && e.cancelable) {
2350
+ e.preventDefault();
2351
+ }
2352
+ if (params.touchMoveStopPropagation && !params.nested) {
2353
+ e.stopPropagation();
2354
+ }
2355
+ let diff = swiper.isHorizontal() ? diffX : diffY;
2356
+ let touchesDiff = swiper.isHorizontal() ? touches.currentX - touches.previousX : touches.currentY - touches.previousY;
2357
+ if (params.oneWayMovement) {
2358
+ diff = Math.abs(diff) * (rtl ? 1 : -1);
2359
+ touchesDiff = Math.abs(touchesDiff) * (rtl ? 1 : -1);
2360
+ }
2361
+ touches.diff = diff;
2362
+ diff *= params.touchRatio;
2363
+ if (rtl) {
2364
+ diff = -diff;
2365
+ touchesDiff = -touchesDiff;
2366
+ }
2367
+ const prevTouchesDirection = swiper.touchesDirection;
2368
+ swiper.swipeDirection = diff > 0 ? 'prev' : 'next';
2369
+ swiper.touchesDirection = touchesDiff > 0 ? 'prev' : 'next';
2370
+ const isLoop = swiper.params.loop && !params.cssMode;
2371
+ const allowLoopFix = swiper.touchesDirection === 'next' && swiper.allowSlideNext || swiper.touchesDirection === 'prev' && swiper.allowSlidePrev;
2372
+ if (!data.isMoved) {
2373
+ if (isLoop && allowLoopFix) {
2374
+ swiper.loopFix({
2375
+ direction: swiper.swipeDirection
2376
+ });
2377
+ }
2378
+ data.startTranslate = swiper.getTranslate();
2379
+ swiper.setTransition(0);
2380
+ if (swiper.animating) {
2381
+ const evt = new window.CustomEvent('transitionend', {
2382
+ bubbles: true,
2383
+ cancelable: true,
2384
+ detail: {
2385
+ bySwiperTouchMove: true
2386
+ }
2387
+ });
2388
+ swiper.wrapperEl.dispatchEvent(evt);
2389
+ }
2390
+ data.allowMomentumBounce = false;
2391
+ // Grab Cursor
2392
+ if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2393
+ swiper.setGrabCursor(true);
2394
+ }
2395
+ swiper.emit('sliderFirstMove', e);
2396
+ }
2397
+ new Date().getTime();
2398
+ if (params._loopSwapReset !== false && data.isMoved && data.allowThresholdMove && prevTouchesDirection !== swiper.touchesDirection && isLoop && allowLoopFix && Math.abs(diff) >= 1) {
2399
+ Object.assign(touches, {
2400
+ startX: pageX,
2401
+ startY: pageY,
2402
+ currentX: pageX,
2403
+ currentY: pageY,
2404
+ startTranslate: data.currentTranslate
2405
+ });
2406
+ data.loopSwapReset = true;
2407
+ data.startTranslate = data.currentTranslate;
2408
+ return;
2409
+ }
2410
+ swiper.emit('sliderMove', e);
2411
+ data.isMoved = true;
2412
+ data.currentTranslate = diff + data.startTranslate;
2413
+ let disableParentSwiper = true;
2414
+ let resistanceRatio = params.resistanceRatio;
2415
+ if (params.touchReleaseOnEdges) {
2416
+ resistanceRatio = 0;
2417
+ }
2418
+ if (diff > 0) {
2419
+ if (isLoop && allowLoopFix && true && data.allowThresholdMove && data.currentTranslate > (params.centeredSlides ? swiper.minTranslate() - swiper.slidesSizesGrid[swiper.activeIndex + 1] - (params.slidesPerView !== 'auto' && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.activeIndex + 1] + swiper.params.spaceBetween : 0) - swiper.params.spaceBetween : swiper.minTranslate())) {
2420
+ swiper.loopFix({
2421
+ direction: 'prev',
2422
+ setTranslate: true,
2423
+ activeSlideIndex: 0
2424
+ });
2425
+ }
2426
+ if (data.currentTranslate > swiper.minTranslate()) {
2427
+ disableParentSwiper = false;
2428
+ if (params.resistance) {
2429
+ data.currentTranslate = swiper.minTranslate() - 1 + (-swiper.minTranslate() + data.startTranslate + diff) ** resistanceRatio;
2430
+ }
2431
+ }
2432
+ } else if (diff < 0) {
2433
+ if (isLoop && allowLoopFix && true && data.allowThresholdMove && data.currentTranslate < (params.centeredSlides ? swiper.maxTranslate() + swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween + (params.slidesPerView !== 'auto' && swiper.slides.length - params.slidesPerView >= 2 ? swiper.slidesSizesGrid[swiper.slidesSizesGrid.length - 1] + swiper.params.spaceBetween : 0) : swiper.maxTranslate())) {
2434
+ swiper.loopFix({
2435
+ direction: 'next',
2436
+ setTranslate: true,
2437
+ activeSlideIndex: swiper.slides.length - (params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : Math.ceil(parseFloat(params.slidesPerView, 10)))
2438
+ });
2439
+ }
2440
+ if (data.currentTranslate < swiper.maxTranslate()) {
2441
+ disableParentSwiper = false;
2442
+ if (params.resistance) {
2443
+ data.currentTranslate = swiper.maxTranslate() + 1 - (swiper.maxTranslate() - data.startTranslate - diff) ** resistanceRatio;
2444
+ }
2445
+ }
2446
+ }
2447
+ if (disableParentSwiper) {
2448
+ e.preventedByNestedSwiper = true;
2449
+ }
2450
+
2451
+ // Directions locks
2452
+ if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) {
2453
+ data.currentTranslate = data.startTranslate;
2454
+ }
2455
+ if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) {
2456
+ data.currentTranslate = data.startTranslate;
2457
+ }
2458
+ if (!swiper.allowSlidePrev && !swiper.allowSlideNext) {
2459
+ data.currentTranslate = data.startTranslate;
2460
+ }
2461
+
2462
+ // Threshold
2463
+ if (params.threshold > 0) {
2464
+ if (Math.abs(diff) > params.threshold || data.allowThresholdMove) {
2465
+ if (!data.allowThresholdMove) {
2466
+ data.allowThresholdMove = true;
2467
+ touches.startX = touches.currentX;
2468
+ touches.startY = touches.currentY;
2469
+ data.currentTranslate = data.startTranslate;
2470
+ touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY;
2471
+ return;
2472
+ }
2473
+ } else {
2474
+ data.currentTranslate = data.startTranslate;
2475
+ return;
2476
+ }
2477
+ }
2478
+ if (!params.followFinger || params.cssMode) return;
2479
+
2480
+ // Update active index in free mode
2481
+ if (params.freeMode && params.freeMode.enabled && swiper.freeMode || params.watchSlidesProgress) {
2482
+ swiper.updateActiveIndex();
2483
+ swiper.updateSlidesClasses();
2484
+ }
2485
+ if (params.freeMode && params.freeMode.enabled && swiper.freeMode) {
2486
+ swiper.freeMode.onTouchMove();
2487
+ }
2488
+ // Update progress
2489
+ swiper.updateProgress(data.currentTranslate);
2490
+ // Update translate
2491
+ swiper.setTranslate(data.currentTranslate);
2492
+ }
2493
+
2494
+ function onTouchEnd(event) {
2495
+ const swiper = this;
2496
+ const data = swiper.touchEventsData;
2497
+ let e = event;
2498
+ if (e.originalEvent) e = e.originalEvent;
2499
+ let targetTouch;
2500
+ const isTouchEvent = e.type === 'touchend' || e.type === 'touchcancel';
2501
+ if (!isTouchEvent) {
2502
+ if (data.touchId !== null) return; // return from pointer if we use touch
2503
+ if (e.pointerId !== data.pointerId) return;
2504
+ targetTouch = e;
2505
+ } else {
2506
+ targetTouch = [...e.changedTouches].find(t => t.identifier === data.touchId);
2507
+ if (!targetTouch || targetTouch.identifier !== data.touchId) return;
2508
+ }
2509
+ if (['pointercancel', 'pointerout', 'pointerleave', 'contextmenu'].includes(e.type)) {
2510
+ const proceed = ['pointercancel', 'contextmenu'].includes(e.type) && (swiper.browser.isSafari || swiper.browser.isWebView);
2511
+ if (!proceed) {
2512
+ return;
2513
+ }
2514
+ }
2515
+ data.pointerId = null;
2516
+ data.touchId = null;
2517
+ const {
2518
+ params,
2519
+ touches,
2520
+ rtlTranslate: rtl,
2521
+ slidesGrid,
2522
+ enabled
2523
+ } = swiper;
2524
+ if (!enabled) return;
2525
+ if (!params.simulateTouch && e.pointerType === 'mouse') return;
2526
+ if (data.allowTouchCallbacks) {
2527
+ swiper.emit('touchEnd', e);
2528
+ }
2529
+ data.allowTouchCallbacks = false;
2530
+ if (!data.isTouched) {
2531
+ if (data.isMoved && params.grabCursor) {
2532
+ swiper.setGrabCursor(false);
2533
+ }
2534
+ data.isMoved = false;
2535
+ data.startMoving = false;
2536
+ return;
2537
+ }
2538
+
2539
+ // Return Grab Cursor
2540
+ if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) {
2541
+ swiper.setGrabCursor(false);
2542
+ }
2543
+
2544
+ // Time diff
2545
+ const touchEndTime = now();
2546
+ const timeDiff = touchEndTime - data.touchStartTime;
2547
+
2548
+ // Tap, doubleTap, Click
2549
+ if (swiper.allowClick) {
2550
+ const pathTree = e.path || e.composedPath && e.composedPath();
2551
+ swiper.updateClickedSlide(pathTree && pathTree[0] || e.target, pathTree);
2552
+ swiper.emit('tap click', e);
2553
+ if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) {
2554
+ swiper.emit('doubleTap doubleClick', e);
2555
+ }
2556
+ }
2557
+ data.lastClickTime = now();
2558
+ nextTick(() => {
2559
+ if (!swiper.destroyed) swiper.allowClick = true;
2560
+ });
2561
+ if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 && !data.loopSwapReset || data.currentTranslate === data.startTranslate && !data.loopSwapReset) {
2562
+ data.isTouched = false;
2563
+ data.isMoved = false;
2564
+ data.startMoving = false;
2565
+ return;
2566
+ }
2567
+ data.isTouched = false;
2568
+ data.isMoved = false;
2569
+ data.startMoving = false;
2570
+ let currentPos;
2571
+ if (params.followFinger) {
2572
+ currentPos = rtl ? swiper.translate : -swiper.translate;
2573
+ } else {
2574
+ currentPos = -data.currentTranslate;
2575
+ }
2576
+ if (params.cssMode) {
2577
+ return;
2578
+ }
2579
+ if (params.freeMode && params.freeMode.enabled) {
2580
+ swiper.freeMode.onTouchEnd({
2581
+ currentPos
2582
+ });
2583
+ return;
2584
+ }
2585
+
2586
+ // Find current slide
2587
+ const swipeToLast = currentPos >= -swiper.maxTranslate() && !swiper.params.loop;
2588
+ let stopIndex = 0;
2589
+ let groupSize = swiper.slidesSizesGrid[0];
2590
+ for (let i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) {
2591
+ const increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
2592
+ if (typeof slidesGrid[i + increment] !== 'undefined') {
2593
+ if (swipeToLast || currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + increment]) {
2594
+ stopIndex = i;
2595
+ groupSize = slidesGrid[i + increment] - slidesGrid[i];
2596
+ }
2597
+ } else if (swipeToLast || currentPos >= slidesGrid[i]) {
2598
+ stopIndex = i;
2599
+ groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2];
2600
+ }
2601
+ }
2602
+ let rewindFirstIndex = null;
2603
+ let rewindLastIndex = null;
2604
+ if (params.rewind) {
2605
+ if (swiper.isBeginning) {
2606
+ rewindLastIndex = params.virtual && params.virtual.enabled && swiper.virtual ? swiper.virtual.slides.length - 1 : swiper.slides.length - 1;
2607
+ } else if (swiper.isEnd) {
2608
+ rewindFirstIndex = 0;
2609
+ }
2610
+ }
2611
+ // Find current slide size
2612
+ const ratio = (currentPos - slidesGrid[stopIndex]) / groupSize;
2613
+ const increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup;
2614
+ if (timeDiff > params.longSwipesMs) {
2615
+ // Long touches
2616
+ if (!params.longSwipes) {
2617
+ swiper.slideTo(swiper.activeIndex);
2618
+ return;
2619
+ }
2620
+ if (swiper.swipeDirection === 'next') {
2621
+ if (ratio >= params.longSwipesRatio) swiper.slideTo(params.rewind && swiper.isEnd ? rewindFirstIndex : stopIndex + increment);else swiper.slideTo(stopIndex);
2622
+ }
2623
+ if (swiper.swipeDirection === 'prev') {
2624
+ if (ratio > 1 - params.longSwipesRatio) {
2625
+ swiper.slideTo(stopIndex + increment);
2626
+ } else if (rewindLastIndex !== null && ratio < 0 && Math.abs(ratio) > params.longSwipesRatio) {
2627
+ swiper.slideTo(rewindLastIndex);
2628
+ } else {
2629
+ swiper.slideTo(stopIndex);
2630
+ }
2631
+ }
2632
+ } else {
2633
+ // Short swipes
2634
+ if (!params.shortSwipes) {
2635
+ swiper.slideTo(swiper.activeIndex);
2636
+ return;
2637
+ }
2638
+ const isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl);
2639
+ if (!isNavButtonTarget) {
2640
+ if (swiper.swipeDirection === 'next') {
2641
+ swiper.slideTo(rewindFirstIndex !== null ? rewindFirstIndex : stopIndex + increment);
2642
+ }
2643
+ if (swiper.swipeDirection === 'prev') {
2644
+ swiper.slideTo(rewindLastIndex !== null ? rewindLastIndex : stopIndex);
2645
+ }
2646
+ } else if (e.target === swiper.navigation.nextEl) {
2647
+ swiper.slideTo(stopIndex + increment);
2648
+ } else {
2649
+ swiper.slideTo(stopIndex);
2650
+ }
2651
+ }
2652
+ }
2653
+
2654
+ function onResize() {
2655
+ const swiper = this;
2656
+ const {
2657
+ params,
2658
+ el
2659
+ } = swiper;
2660
+ if (el && el.offsetWidth === 0) return;
2661
+
2662
+ // Breakpoints
2663
+ if (params.breakpoints) {
2664
+ swiper.setBreakpoint();
2665
+ }
2666
+
2667
+ // Save locks
2668
+ const {
2669
+ allowSlideNext,
2670
+ allowSlidePrev,
2671
+ snapGrid
2672
+ } = swiper;
2673
+ const isVirtual = swiper.virtual && swiper.params.virtual.enabled;
2674
+
2675
+ // Disable locks on resize
2676
+ swiper.allowSlideNext = true;
2677
+ swiper.allowSlidePrev = true;
2678
+ swiper.updateSize();
2679
+ swiper.updateSlides();
2680
+ swiper.updateSlidesClasses();
2681
+ const isVirtualLoop = isVirtual && params.loop;
2682
+ if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides && !isVirtualLoop) {
2683
+ swiper.slideTo(swiper.slides.length - 1, 0, false, true);
2684
+ } else {
2685
+ if (swiper.params.loop && !isVirtual) {
2686
+ swiper.slideToLoop(swiper.realIndex, 0, false, true);
2687
+ } else {
2688
+ swiper.slideTo(swiper.activeIndex, 0, false, true);
2689
+ }
2690
+ }
2691
+ if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
2692
+ clearTimeout(swiper.autoplay.resizeTimeout);
2693
+ swiper.autoplay.resizeTimeout = setTimeout(() => {
2694
+ if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) {
2695
+ swiper.autoplay.resume();
2696
+ }
2697
+ }, 500);
2698
+ }
2699
+ // Return locks after resize
2700
+ swiper.allowSlidePrev = allowSlidePrev;
2701
+ swiper.allowSlideNext = allowSlideNext;
2702
+ if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) {
2703
+ swiper.checkOverflow();
2704
+ }
2705
+ }
2706
+
2707
+ function onClick(e) {
2708
+ const swiper = this;
2709
+ if (!swiper.enabled) return;
2710
+ if (!swiper.allowClick) {
2711
+ if (swiper.params.preventClicks) e.preventDefault();
2712
+ if (swiper.params.preventClicksPropagation && swiper.animating) {
2713
+ e.stopPropagation();
2714
+ e.stopImmediatePropagation();
2715
+ }
2716
+ }
2717
+ }
2718
+
2719
+ function onScroll() {
2720
+ const swiper = this;
2721
+ const {
2722
+ wrapperEl,
2723
+ rtlTranslate,
2724
+ enabled
2725
+ } = swiper;
2726
+ if (!enabled) return;
2727
+ swiper.previousTranslate = swiper.translate;
2728
+ if (swiper.isHorizontal()) {
2729
+ swiper.translate = -wrapperEl.scrollLeft;
2730
+ } else {
2731
+ swiper.translate = -wrapperEl.scrollTop;
2732
+ }
2733
+ // eslint-disable-next-line
2734
+ if (swiper.translate === 0) swiper.translate = 0;
2735
+ swiper.updateActiveIndex();
2736
+ swiper.updateSlidesClasses();
2737
+ let newProgress;
2738
+ const translatesDiff = swiper.maxTranslate() - swiper.minTranslate();
2739
+ if (translatesDiff === 0) {
2740
+ newProgress = 0;
2741
+ } else {
2742
+ newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff;
2743
+ }
2744
+ if (newProgress !== swiper.progress) {
2745
+ swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate);
2746
+ }
2747
+ swiper.emit('setTranslate', swiper.translate, false);
2748
+ }
2749
+
2750
+ function onLoad(e) {
2751
+ const swiper = this;
2752
+ processLazyPreloader(swiper, e.target);
2753
+ if (swiper.params.cssMode || swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight) {
2754
+ return;
2755
+ }
2756
+ swiper.update();
2757
+ }
2758
+
2759
+ function onDocumentTouchStart() {
2760
+ const swiper = this;
2761
+ if (swiper.documentTouchHandlerProceeded) return;
2762
+ swiper.documentTouchHandlerProceeded = true;
2763
+ if (swiper.params.touchReleaseOnEdges) {
2764
+ swiper.el.style.touchAction = 'auto';
2765
+ }
2766
+ }
2767
+
2768
+ const events = (swiper, method) => {
2769
+ const document = getDocument();
2770
+ const {
2771
+ params,
2772
+ el,
2773
+ wrapperEl,
2774
+ device
2775
+ } = swiper;
2776
+ const capture = !!params.nested;
2777
+ const domMethod = method === 'on' ? 'addEventListener' : 'removeEventListener';
2778
+ const swiperMethod = method;
2779
+ if (!el || typeof el === 'string') return;
2780
+
2781
+ // Touch Events
2782
+ document[domMethod]('touchstart', swiper.onDocumentTouchStart, {
2783
+ passive: false,
2784
+ capture
2785
+ });
2786
+ el[domMethod]('touchstart', swiper.onTouchStart, {
2787
+ passive: false
2788
+ });
2789
+ el[domMethod]('pointerdown', swiper.onTouchStart, {
2790
+ passive: false
2791
+ });
2792
+ document[domMethod]('touchmove', swiper.onTouchMove, {
2793
+ passive: false,
2794
+ capture
2795
+ });
2796
+ document[domMethod]('pointermove', swiper.onTouchMove, {
2797
+ passive: false,
2798
+ capture
2799
+ });
2800
+ document[domMethod]('touchend', swiper.onTouchEnd, {
2801
+ passive: true
2802
+ });
2803
+ document[domMethod]('pointerup', swiper.onTouchEnd, {
2804
+ passive: true
2805
+ });
2806
+ document[domMethod]('pointercancel', swiper.onTouchEnd, {
2807
+ passive: true
2808
+ });
2809
+ document[domMethod]('touchcancel', swiper.onTouchEnd, {
2810
+ passive: true
2811
+ });
2812
+ document[domMethod]('pointerout', swiper.onTouchEnd, {
2813
+ passive: true
2814
+ });
2815
+ document[domMethod]('pointerleave', swiper.onTouchEnd, {
2816
+ passive: true
2817
+ });
2818
+ document[domMethod]('contextmenu', swiper.onTouchEnd, {
2819
+ passive: true
2820
+ });
2821
+
2822
+ // Prevent Links Clicks
2823
+ if (params.preventClicks || params.preventClicksPropagation) {
2824
+ el[domMethod]('click', swiper.onClick, true);
2825
+ }
2826
+ if (params.cssMode) {
2827
+ wrapperEl[domMethod]('scroll', swiper.onScroll);
2828
+ }
2829
+
2830
+ // Resize handler
2831
+ if (params.updateOnWindowResize) {
2832
+ swiper[swiperMethod](device.ios || device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true);
2833
+ } else {
2834
+ swiper[swiperMethod]('observerUpdate', onResize, true);
2835
+ }
2836
+
2837
+ // Images loader
2838
+ el[domMethod]('load', swiper.onLoad, {
2839
+ capture: true
2840
+ });
2841
+ };
2842
+ function attachEvents() {
2843
+ const swiper = this;
2844
+ const {
2845
+ params
2846
+ } = swiper;
2847
+ swiper.onTouchStart = onTouchStart.bind(swiper);
2848
+ swiper.onTouchMove = onTouchMove.bind(swiper);
2849
+ swiper.onTouchEnd = onTouchEnd.bind(swiper);
2850
+ swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper);
2851
+ if (params.cssMode) {
2852
+ swiper.onScroll = onScroll.bind(swiper);
2853
+ }
2854
+ swiper.onClick = onClick.bind(swiper);
2855
+ swiper.onLoad = onLoad.bind(swiper);
2856
+ events(swiper, 'on');
2857
+ }
2858
+ function detachEvents() {
2859
+ const swiper = this;
2860
+ events(swiper, 'off');
2861
+ }
2862
+ var events$1 = {
2863
+ attachEvents,
2864
+ detachEvents
2865
+ };
2866
+
2867
+ const isGridEnabled = (swiper, params) => {
2868
+ return swiper.grid && params.grid && params.grid.rows > 1;
2869
+ };
2870
+ function setBreakpoint() {
2871
+ const swiper = this;
2872
+ const {
2873
+ realIndex,
2874
+ initialized,
2875
+ params,
2876
+ el
2877
+ } = swiper;
2878
+ const breakpoints = params.breakpoints;
2879
+ if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return;
2880
+ const document = getDocument();
2881
+
2882
+ // Get breakpoint for window/container width and update parameters
2883
+ const breakpointsBase = params.breakpointsBase === 'window' || !params.breakpointsBase ? params.breakpointsBase : 'container';
2884
+ const breakpointContainer = ['window', 'container'].includes(params.breakpointsBase) || !params.breakpointsBase ? swiper.el : document.querySelector(params.breakpointsBase);
2885
+ const breakpoint = swiper.getBreakpoint(breakpoints, breakpointsBase, breakpointContainer);
2886
+ if (!breakpoint || swiper.currentBreakpoint === breakpoint) return;
2887
+ const breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined;
2888
+ const breakpointParams = breakpointOnlyParams || swiper.originalParams;
2889
+ const wasMultiRow = isGridEnabled(swiper, params);
2890
+ const isMultiRow = isGridEnabled(swiper, breakpointParams);
2891
+ const wasGrabCursor = swiper.params.grabCursor;
2892
+ const isGrabCursor = breakpointParams.grabCursor;
2893
+ const wasEnabled = params.enabled;
2894
+ if (wasMultiRow && !isMultiRow) {
2895
+ el.classList.remove(`${params.containerModifierClass}grid`, `${params.containerModifierClass}grid-column`);
2896
+ swiper.emitContainerClasses();
2897
+ } else if (!wasMultiRow && isMultiRow) {
2898
+ el.classList.add(`${params.containerModifierClass}grid`);
2899
+ if (breakpointParams.grid.fill && breakpointParams.grid.fill === 'column' || !breakpointParams.grid.fill && params.grid.fill === 'column') {
2900
+ el.classList.add(`${params.containerModifierClass}grid-column`);
2901
+ }
2902
+ swiper.emitContainerClasses();
2903
+ }
2904
+ if (wasGrabCursor && !isGrabCursor) {
2905
+ swiper.unsetGrabCursor();
2906
+ } else if (!wasGrabCursor && isGrabCursor) {
2907
+ swiper.setGrabCursor();
2908
+ }
2909
+
2910
+ // Toggle navigation, pagination, scrollbar
2911
+ ['navigation', 'pagination', 'scrollbar'].forEach(prop => {
2912
+ if (typeof breakpointParams[prop] === 'undefined') return;
2913
+ const wasModuleEnabled = params[prop] && params[prop].enabled;
2914
+ const isModuleEnabled = breakpointParams[prop] && breakpointParams[prop].enabled;
2915
+ if (wasModuleEnabled && !isModuleEnabled) {
2916
+ swiper[prop].disable();
2917
+ }
2918
+ if (!wasModuleEnabled && isModuleEnabled) {
2919
+ swiper[prop].enable();
2920
+ }
2921
+ });
2922
+ const directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction;
2923
+ const needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged);
2924
+ const wasLoop = params.loop;
2925
+ if (directionChanged && initialized) {
2926
+ swiper.changeDirection();
2927
+ }
2928
+ extend(swiper.params, breakpointParams);
2929
+ const isEnabled = swiper.params.enabled;
2930
+ const hasLoop = swiper.params.loop;
2931
+ Object.assign(swiper, {
2932
+ allowTouchMove: swiper.params.allowTouchMove,
2933
+ allowSlideNext: swiper.params.allowSlideNext,
2934
+ allowSlidePrev: swiper.params.allowSlidePrev
2935
+ });
2936
+ if (wasEnabled && !isEnabled) {
2937
+ swiper.disable();
2938
+ } else if (!wasEnabled && isEnabled) {
2939
+ swiper.enable();
2940
+ }
2941
+ swiper.currentBreakpoint = breakpoint;
2942
+ swiper.emit('_beforeBreakpoint', breakpointParams);
2943
+ if (initialized) {
2944
+ if (needsReLoop) {
2945
+ swiper.loopDestroy();
2946
+ swiper.loopCreate(realIndex);
2947
+ swiper.updateSlides();
2948
+ } else if (!wasLoop && hasLoop) {
2949
+ swiper.loopCreate(realIndex);
2950
+ swiper.updateSlides();
2951
+ } else if (wasLoop && !hasLoop) {
2952
+ swiper.loopDestroy();
2953
+ }
2954
+ }
2955
+ swiper.emit('breakpoint', breakpointParams);
2956
+ }
2957
+
2958
+ function getBreakpoint(breakpoints, base = 'window', containerEl) {
2959
+ if (!breakpoints || base === 'container' && !containerEl) return undefined;
2960
+ let breakpoint = false;
2961
+ const window = getWindow();
2962
+ const currentHeight = base === 'window' ? window.innerHeight : containerEl.clientHeight;
2963
+ const points = Object.keys(breakpoints).map(point => {
2964
+ if (typeof point === 'string' && point.indexOf('@') === 0) {
2965
+ const minRatio = parseFloat(point.substr(1));
2966
+ const value = currentHeight * minRatio;
2967
+ return {
2968
+ value,
2969
+ point
2970
+ };
2971
+ }
2972
+ return {
2973
+ value: point,
2974
+ point
2975
+ };
2976
+ });
2977
+ points.sort((a, b) => parseInt(a.value, 10) - parseInt(b.value, 10));
2978
+ for (let i = 0; i < points.length; i += 1) {
2979
+ const {
2980
+ point,
2981
+ value
2982
+ } = points[i];
2983
+ if (base === 'window') {
2984
+ if (window.matchMedia(`(min-width: ${value}px)`).matches) {
2985
+ breakpoint = point;
2986
+ }
2987
+ } else if (value <= containerEl.clientWidth) {
2988
+ breakpoint = point;
2989
+ }
2990
+ }
2991
+ return breakpoint || 'max';
2992
+ }
2993
+
2994
+ var breakpoints = {
2995
+ setBreakpoint,
2996
+ getBreakpoint
2997
+ };
2998
+
2999
+ function prepareClasses(entries, prefix) {
3000
+ const resultClasses = [];
3001
+ entries.forEach(item => {
3002
+ if (typeof item === 'object') {
3003
+ Object.keys(item).forEach(classNames => {
3004
+ if (item[classNames]) {
3005
+ resultClasses.push(prefix + classNames);
3006
+ }
3007
+ });
3008
+ } else if (typeof item === 'string') {
3009
+ resultClasses.push(prefix + item);
3010
+ }
3011
+ });
3012
+ return resultClasses;
3013
+ }
3014
+ function addClasses() {
3015
+ const swiper = this;
3016
+ const {
3017
+ classNames,
3018
+ params,
3019
+ rtl,
3020
+ el,
3021
+ device
3022
+ } = swiper;
3023
+ // prettier-ignore
3024
+ const suffixes = prepareClasses(['initialized', params.direction, {
3025
+ 'free-mode': swiper.params.freeMode && params.freeMode.enabled
3026
+ }, {
3027
+ 'autoheight': params.autoHeight
3028
+ }, {
3029
+ 'rtl': rtl
3030
+ }, {
3031
+ 'grid': params.grid && params.grid.rows > 1
3032
+ }, {
3033
+ 'grid-column': params.grid && params.grid.rows > 1 && params.grid.fill === 'column'
3034
+ }, {
3035
+ 'android': device.android
3036
+ }, {
3037
+ 'ios': device.ios
3038
+ }, {
3039
+ 'css-mode': params.cssMode
3040
+ }, {
3041
+ 'centered': params.cssMode && params.centeredSlides
3042
+ }, {
3043
+ 'watch-progress': params.watchSlidesProgress
3044
+ }], params.containerModifierClass);
3045
+ classNames.push(...suffixes);
3046
+ el.classList.add(...classNames);
3047
+ swiper.emitContainerClasses();
3048
+ }
3049
+
3050
+ function removeClasses() {
3051
+ const swiper = this;
3052
+ const {
3053
+ el,
3054
+ classNames
3055
+ } = swiper;
3056
+ if (!el || typeof el === 'string') return;
3057
+ el.classList.remove(...classNames);
3058
+ swiper.emitContainerClasses();
3059
+ }
3060
+
3061
+ var classes = {
3062
+ addClasses,
3063
+ removeClasses
3064
+ };
3065
+
3066
+ function checkOverflow() {
3067
+ const swiper = this;
3068
+ const {
3069
+ isLocked: wasLocked,
3070
+ params
3071
+ } = swiper;
3072
+ const {
3073
+ slidesOffsetBefore
3074
+ } = params;
3075
+ if (slidesOffsetBefore) {
3076
+ const lastSlideIndex = swiper.slides.length - 1;
3077
+ const lastSlideRightEdge = swiper.slidesGrid[lastSlideIndex] + swiper.slidesSizesGrid[lastSlideIndex] + slidesOffsetBefore * 2;
3078
+ swiper.isLocked = swiper.size > lastSlideRightEdge;
3079
+ } else {
3080
+ swiper.isLocked = swiper.snapGrid.length === 1;
3081
+ }
3082
+ if (params.allowSlideNext === true) {
3083
+ swiper.allowSlideNext = !swiper.isLocked;
3084
+ }
3085
+ if (params.allowSlidePrev === true) {
3086
+ swiper.allowSlidePrev = !swiper.isLocked;
3087
+ }
3088
+ if (wasLocked && wasLocked !== swiper.isLocked) {
3089
+ swiper.isEnd = false;
3090
+ }
3091
+ if (wasLocked !== swiper.isLocked) {
3092
+ swiper.emit(swiper.isLocked ? 'lock' : 'unlock');
3093
+ }
3094
+ }
3095
+ var checkOverflow$1 = {
3096
+ checkOverflow
3097
+ };
3098
+
3099
+ var defaults = {
3100
+ init: true,
3101
+ direction: 'horizontal',
3102
+ oneWayMovement: false,
3103
+ swiperElementNodeName: 'SWIPER-CONTAINER',
3104
+ touchEventsTarget: 'wrapper',
3105
+ initialSlide: 0,
3106
+ speed: 300,
3107
+ cssMode: false,
3108
+ updateOnWindowResize: true,
3109
+ resizeObserver: true,
3110
+ nested: false,
3111
+ createElements: false,
3112
+ eventsPrefix: 'swiper',
3113
+ enabled: true,
3114
+ focusableElements: 'input, select, option, textarea, button, video, label',
3115
+ // Overrides
3116
+ width: null,
3117
+ height: null,
3118
+ //
3119
+ preventInteractionOnTransition: false,
3120
+ // ssr
3121
+ userAgent: null,
3122
+ url: null,
3123
+ // To support iOS's swipe-to-go-back gesture (when being used in-app).
3124
+ edgeSwipeDetection: false,
3125
+ edgeSwipeThreshold: 20,
3126
+ // Autoheight
3127
+ autoHeight: false,
3128
+ // Set wrapper width
3129
+ setWrapperSize: false,
3130
+ // Virtual Translate
3131
+ virtualTranslate: false,
3132
+ // Effects
3133
+ effect: 'slide',
3134
+ // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
3135
+
3136
+ // Breakpoints
3137
+ breakpoints: undefined,
3138
+ breakpointsBase: 'window',
3139
+ // Slides grid
3140
+ spaceBetween: 0,
3141
+ slidesPerView: 1,
3142
+ slidesPerGroup: 1,
3143
+ slidesPerGroupSkip: 0,
3144
+ slidesPerGroupAuto: false,
3145
+ centeredSlides: false,
3146
+ centeredSlidesBounds: false,
3147
+ slidesOffsetBefore: 0,
3148
+ // in px
3149
+ slidesOffsetAfter: 0,
3150
+ // in px
3151
+ normalizeSlideIndex: true,
3152
+ centerInsufficientSlides: false,
3153
+ // Disable swiper and hide navigation when container not overflow
3154
+ watchOverflow: true,
3155
+ // Round length
3156
+ roundLengths: false,
3157
+ // Touches
3158
+ touchRatio: 1,
3159
+ touchAngle: 45,
3160
+ simulateTouch: true,
3161
+ shortSwipes: true,
3162
+ longSwipes: true,
3163
+ longSwipesRatio: 0.5,
3164
+ longSwipesMs: 300,
3165
+ followFinger: true,
3166
+ allowTouchMove: true,
3167
+ threshold: 5,
3168
+ touchMoveStopPropagation: false,
3169
+ touchStartPreventDefault: true,
3170
+ touchStartForcePreventDefault: false,
3171
+ touchReleaseOnEdges: false,
3172
+ // Unique Navigation Elements
3173
+ uniqueNavElements: true,
3174
+ // Resistance
3175
+ resistance: true,
3176
+ resistanceRatio: 0.85,
3177
+ // Progress
3178
+ watchSlidesProgress: false,
3179
+ // Cursor
3180
+ grabCursor: false,
3181
+ // Clicks
3182
+ preventClicks: true,
3183
+ preventClicksPropagation: true,
3184
+ slideToClickedSlide: false,
3185
+ // loop
3186
+ loop: false,
3187
+ loopAddBlankSlides: true,
3188
+ loopAdditionalSlides: 0,
3189
+ loopPreventsSliding: true,
3190
+ // rewind
3191
+ rewind: false,
3192
+ // Swiping/no swiping
3193
+ allowSlidePrev: true,
3194
+ allowSlideNext: true,
3195
+ swipeHandler: null,
3196
+ // '.swipe-handler',
3197
+ noSwiping: true,
3198
+ noSwipingClass: 'swiper-no-swiping',
3199
+ noSwipingSelector: null,
3200
+ // Passive Listeners
3201
+ passiveListeners: true,
3202
+ maxBackfaceHiddenSlides: 10,
3203
+ // NS
3204
+ containerModifierClass: 'swiper-',
3205
+ // NEW
3206
+ slideClass: 'swiper-slide',
3207
+ slideBlankClass: 'swiper-slide-blank',
3208
+ slideActiveClass: 'swiper-slide-active',
3209
+ slideVisibleClass: 'swiper-slide-visible',
3210
+ slideFullyVisibleClass: 'swiper-slide-fully-visible',
3211
+ slideNextClass: 'swiper-slide-next',
3212
+ slidePrevClass: 'swiper-slide-prev',
3213
+ wrapperClass: 'swiper-wrapper',
3214
+ lazyPreloaderClass: 'swiper-lazy-preloader',
3215
+ lazyPreloadPrevNext: 0,
3216
+ // Callbacks
3217
+ runCallbacksOnInit: true,
3218
+ // Internals
3219
+ _emitClasses: false
3220
+ };
3221
+
3222
+ function moduleExtendParams(params, allModulesParams) {
3223
+ return function extendParams(obj = {}) {
3224
+ const moduleParamName = Object.keys(obj)[0];
3225
+ const moduleParams = obj[moduleParamName];
3226
+ if (typeof moduleParams !== 'object' || moduleParams === null) {
3227
+ extend(allModulesParams, obj);
3228
+ return;
3229
+ }
3230
+ if (params[moduleParamName] === true) {
3231
+ params[moduleParamName] = {
3232
+ enabled: true
3233
+ };
3234
+ }
3235
+ if (moduleParamName === 'navigation' && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].prevEl && !params[moduleParamName].nextEl) {
3236
+ params[moduleParamName].auto = true;
3237
+ }
3238
+ if (['pagination', 'scrollbar'].indexOf(moduleParamName) >= 0 && params[moduleParamName] && params[moduleParamName].enabled && !params[moduleParamName].el) {
3239
+ params[moduleParamName].auto = true;
3240
+ }
3241
+ if (!(moduleParamName in params && 'enabled' in moduleParams)) {
3242
+ extend(allModulesParams, obj);
3243
+ return;
3244
+ }
3245
+ if (typeof params[moduleParamName] === 'object' && !('enabled' in params[moduleParamName])) {
3246
+ params[moduleParamName].enabled = true;
3247
+ }
3248
+ if (!params[moduleParamName]) params[moduleParamName] = {
3249
+ enabled: false
3250
+ };
3251
+ extend(allModulesParams, obj);
3252
+ };
3253
+ }
3254
+
3255
+ /* eslint no-param-reassign: "off" */
3256
+ const prototypes = {
3257
+ eventsEmitter,
3258
+ update,
3259
+ translate,
3260
+ transition,
3261
+ slide,
3262
+ loop,
3263
+ grabCursor,
3264
+ events: events$1,
3265
+ breakpoints,
3266
+ checkOverflow: checkOverflow$1,
3267
+ classes
3268
+ };
3269
+ const extendedDefaults = {};
3270
+ class Swiper {
3271
+ constructor(...args) {
3272
+ let el;
3273
+ let params;
3274
+ if (args.length === 1 && args[0].constructor && Object.prototype.toString.call(args[0]).slice(8, -1) === 'Object') {
3275
+ params = args[0];
3276
+ } else {
3277
+ [el, params] = args;
3278
+ }
3279
+ if (!params) params = {};
3280
+ params = extend({}, params);
3281
+ if (el && !params.el) params.el = el;
3282
+ const document = getDocument();
3283
+ if (params.el && typeof params.el === 'string' && document.querySelectorAll(params.el).length > 1) {
3284
+ const swipers = [];
3285
+ document.querySelectorAll(params.el).forEach(containerEl => {
3286
+ const newParams = extend({}, params, {
3287
+ el: containerEl
3288
+ });
3289
+ swipers.push(new Swiper(newParams));
3290
+ });
3291
+ // eslint-disable-next-line no-constructor-return
3292
+ return swipers;
3293
+ }
3294
+
3295
+ // Swiper Instance
3296
+ const swiper = this;
3297
+ swiper.__swiper__ = true;
3298
+ swiper.support = getSupport();
3299
+ swiper.device = getDevice({
3300
+ userAgent: params.userAgent
3301
+ });
3302
+ swiper.browser = getBrowser();
3303
+ swiper.eventsListeners = {};
3304
+ swiper.eventsAnyListeners = [];
3305
+ swiper.modules = [...swiper.__modules__];
3306
+ if (params.modules && Array.isArray(params.modules)) {
3307
+ swiper.modules.push(...params.modules);
3308
+ }
3309
+ const allModulesParams = {};
3310
+ swiper.modules.forEach(mod => {
3311
+ mod({
3312
+ params,
3313
+ swiper,
3314
+ extendParams: moduleExtendParams(params, allModulesParams),
3315
+ on: swiper.on.bind(swiper),
3316
+ once: swiper.once.bind(swiper),
3317
+ off: swiper.off.bind(swiper),
3318
+ emit: swiper.emit.bind(swiper)
3319
+ });
3320
+ });
3321
+
3322
+ // Extend defaults with modules params
3323
+ const swiperParams = extend({}, defaults, allModulesParams);
3324
+
3325
+ // Extend defaults with passed params
3326
+ swiper.params = extend({}, swiperParams, extendedDefaults, params);
3327
+ swiper.originalParams = extend({}, swiper.params);
3328
+ swiper.passedParams = extend({}, params);
3329
+
3330
+ // add event listeners
3331
+ if (swiper.params && swiper.params.on) {
3332
+ Object.keys(swiper.params.on).forEach(eventName => {
3333
+ swiper.on(eventName, swiper.params.on[eventName]);
3334
+ });
3335
+ }
3336
+ if (swiper.params && swiper.params.onAny) {
3337
+ swiper.onAny(swiper.params.onAny);
3338
+ }
3339
+
3340
+ // Extend Swiper
3341
+ Object.assign(swiper, {
3342
+ enabled: swiper.params.enabled,
3343
+ el,
3344
+ // Classes
3345
+ classNames: [],
3346
+ // Slides
3347
+ slides: [],
3348
+ slidesGrid: [],
3349
+ snapGrid: [],
3350
+ slidesSizesGrid: [],
3351
+ // isDirection
3352
+ isHorizontal() {
3353
+ return swiper.params.direction === 'horizontal';
3354
+ },
3355
+ isVertical() {
3356
+ return swiper.params.direction === 'vertical';
3357
+ },
3358
+ // Indexes
3359
+ activeIndex: 0,
3360
+ realIndex: 0,
3361
+ //
3362
+ isBeginning: true,
3363
+ isEnd: false,
3364
+ // Props
3365
+ translate: 0,
3366
+ previousTranslate: 0,
3367
+ progress: 0,
3368
+ velocity: 0,
3369
+ animating: false,
3370
+ cssOverflowAdjustment() {
3371
+ // Returns 0 unless `translate` is > 2**23
3372
+ // Should be subtracted from css values to prevent overflow
3373
+ return Math.trunc(this.translate / 2 ** 23) * 2 ** 23;
3374
+ },
3375
+ // Locks
3376
+ allowSlideNext: swiper.params.allowSlideNext,
3377
+ allowSlidePrev: swiper.params.allowSlidePrev,
3378
+ // Touch Events
3379
+ touchEventsData: {
3380
+ isTouched: undefined,
3381
+ isMoved: undefined,
3382
+ allowTouchCallbacks: undefined,
3383
+ touchStartTime: undefined,
3384
+ isScrolling: undefined,
3385
+ currentTranslate: undefined,
3386
+ startTranslate: undefined,
3387
+ allowThresholdMove: undefined,
3388
+ // Form elements to match
3389
+ focusableElements: swiper.params.focusableElements,
3390
+ // Last click time
3391
+ lastClickTime: 0,
3392
+ clickTimeout: undefined,
3393
+ // Velocities
3394
+ velocities: [],
3395
+ allowMomentumBounce: undefined,
3396
+ startMoving: undefined,
3397
+ pointerId: null,
3398
+ touchId: null
3399
+ },
3400
+ // Clicks
3401
+ allowClick: true,
3402
+ // Touches
3403
+ allowTouchMove: swiper.params.allowTouchMove,
3404
+ touches: {
3405
+ startX: 0,
3406
+ startY: 0,
3407
+ currentX: 0,
3408
+ currentY: 0,
3409
+ diff: 0
3410
+ },
3411
+ // Images
3412
+ imagesToLoad: [],
3413
+ imagesLoaded: 0
3414
+ });
3415
+ swiper.emit('_swiper');
3416
+
3417
+ // Init
3418
+ if (swiper.params.init) {
3419
+ swiper.init();
3420
+ }
3421
+
3422
+ // Return app instance
3423
+ // eslint-disable-next-line no-constructor-return
3424
+ return swiper;
3425
+ }
3426
+ getDirectionLabel(property) {
3427
+ if (this.isHorizontal()) {
3428
+ return property;
3429
+ }
3430
+ // prettier-ignore
3431
+ return {
3432
+ 'width': 'height',
3433
+ 'margin-top': 'margin-left',
3434
+ 'margin-bottom ': 'margin-right',
3435
+ 'margin-left': 'margin-top',
3436
+ 'margin-right': 'margin-bottom',
3437
+ 'padding-left': 'padding-top',
3438
+ 'padding-right': 'padding-bottom',
3439
+ 'marginRight': 'marginBottom'
3440
+ }[property];
3441
+ }
3442
+ getSlideIndex(slideEl) {
3443
+ const {
3444
+ slidesEl,
3445
+ params
3446
+ } = this;
3447
+ const slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
3448
+ const firstSlideIndex = elementIndex(slides[0]);
3449
+ return elementIndex(slideEl) - firstSlideIndex;
3450
+ }
3451
+ getSlideIndexByData(index) {
3452
+ return this.getSlideIndex(this.slides.find(slideEl => slideEl.getAttribute('data-swiper-slide-index') * 1 === index));
3453
+ }
3454
+ getSlideIndexWhenGrid(index) {
3455
+ if (this.grid && this.params.grid && this.params.grid.rows > 1) {
3456
+ if (this.params.grid.fill === 'column') {
3457
+ index = Math.floor(index / this.params.grid.rows);
3458
+ } else if (this.params.grid.fill === 'row') {
3459
+ index = index % Math.ceil(this.slides.length / this.params.grid.rows);
3460
+ }
3461
+ }
3462
+ return index;
3463
+ }
3464
+ recalcSlides() {
3465
+ const swiper = this;
3466
+ const {
3467
+ slidesEl,
3468
+ params
3469
+ } = swiper;
3470
+ swiper.slides = elementChildren(slidesEl, `.${params.slideClass}, swiper-slide`);
3471
+ }
3472
+ enable() {
3473
+ const swiper = this;
3474
+ if (swiper.enabled) return;
3475
+ swiper.enabled = true;
3476
+ if (swiper.params.grabCursor) {
3477
+ swiper.setGrabCursor();
3478
+ }
3479
+ swiper.emit('enable');
3480
+ }
3481
+ disable() {
3482
+ const swiper = this;
3483
+ if (!swiper.enabled) return;
3484
+ swiper.enabled = false;
3485
+ if (swiper.params.grabCursor) {
3486
+ swiper.unsetGrabCursor();
3487
+ }
3488
+ swiper.emit('disable');
3489
+ }
3490
+ setProgress(progress, speed) {
3491
+ const swiper = this;
3492
+ progress = Math.min(Math.max(progress, 0), 1);
3493
+ const min = swiper.minTranslate();
3494
+ const max = swiper.maxTranslate();
3495
+ const current = (max - min) * progress + min;
3496
+ swiper.translateTo(current, typeof speed === 'undefined' ? 0 : speed);
3497
+ swiper.updateActiveIndex();
3498
+ swiper.updateSlidesClasses();
3499
+ }
3500
+ emitContainerClasses() {
3501
+ const swiper = this;
3502
+ if (!swiper.params._emitClasses || !swiper.el) return;
3503
+ const cls = swiper.el.className.split(' ').filter(className => {
3504
+ return className.indexOf('swiper') === 0 || className.indexOf(swiper.params.containerModifierClass) === 0;
3505
+ });
3506
+ swiper.emit('_containerClasses', cls.join(' '));
3507
+ }
3508
+ getSlideClasses(slideEl) {
3509
+ const swiper = this;
3510
+ if (swiper.destroyed) return '';
3511
+ return slideEl.className.split(' ').filter(className => {
3512
+ return className.indexOf('swiper-slide') === 0 || className.indexOf(swiper.params.slideClass) === 0;
3513
+ }).join(' ');
3514
+ }
3515
+ emitSlidesClasses() {
3516
+ const swiper = this;
3517
+ if (!swiper.params._emitClasses || !swiper.el) return;
3518
+ const updates = [];
3519
+ swiper.slides.forEach(slideEl => {
3520
+ const classNames = swiper.getSlideClasses(slideEl);
3521
+ updates.push({
3522
+ slideEl,
3523
+ classNames
3524
+ });
3525
+ swiper.emit('_slideClass', slideEl, classNames);
3526
+ });
3527
+ swiper.emit('_slideClasses', updates);
3528
+ }
3529
+ slidesPerViewDynamic(view = 'current', exact = false) {
3530
+ const swiper = this;
3531
+ const {
3532
+ params,
3533
+ slides,
3534
+ slidesGrid,
3535
+ slidesSizesGrid,
3536
+ size: swiperSize,
3537
+ activeIndex
3538
+ } = swiper;
3539
+ let spv = 1;
3540
+ if (typeof params.slidesPerView === 'number') return params.slidesPerView;
3541
+ if (params.centeredSlides) {
3542
+ let slideSize = slides[activeIndex] ? Math.ceil(slides[activeIndex].swiperSlideSize) : 0;
3543
+ let breakLoop;
3544
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
3545
+ if (slides[i] && !breakLoop) {
3546
+ slideSize += Math.ceil(slides[i].swiperSlideSize);
3547
+ spv += 1;
3548
+ if (slideSize > swiperSize) breakLoop = true;
3549
+ }
3550
+ }
3551
+ for (let i = activeIndex - 1; i >= 0; i -= 1) {
3552
+ if (slides[i] && !breakLoop) {
3553
+ slideSize += slides[i].swiperSlideSize;
3554
+ spv += 1;
3555
+ if (slideSize > swiperSize) breakLoop = true;
3556
+ }
3557
+ }
3558
+ } else {
3559
+ // eslint-disable-next-line
3560
+ if (view === 'current') {
3561
+ for (let i = activeIndex + 1; i < slides.length; i += 1) {
3562
+ const slideInView = exact ? slidesGrid[i] + slidesSizesGrid[i] - slidesGrid[activeIndex] < swiperSize : slidesGrid[i] - slidesGrid[activeIndex] < swiperSize;
3563
+ if (slideInView) {
3564
+ spv += 1;
3565
+ }
3566
+ }
3567
+ } else {
3568
+ // previous
3569
+ for (let i = activeIndex - 1; i >= 0; i -= 1) {
3570
+ const slideInView = slidesGrid[activeIndex] - slidesGrid[i] < swiperSize;
3571
+ if (slideInView) {
3572
+ spv += 1;
3573
+ }
3574
+ }
3575
+ }
3576
+ }
3577
+ return spv;
3578
+ }
3579
+ update() {
3580
+ const swiper = this;
3581
+ if (!swiper || swiper.destroyed) return;
3582
+ const {
3583
+ snapGrid,
3584
+ params
3585
+ } = swiper;
3586
+ // Breakpoints
3587
+ if (params.breakpoints) {
3588
+ swiper.setBreakpoint();
3589
+ }
3590
+ [...swiper.el.querySelectorAll('[loading="lazy"]')].forEach(imageEl => {
3591
+ if (imageEl.complete) {
3592
+ processLazyPreloader(swiper, imageEl);
3593
+ }
3594
+ });
3595
+ swiper.updateSize();
3596
+ swiper.updateSlides();
3597
+ swiper.updateProgress();
3598
+ swiper.updateSlidesClasses();
3599
+ function setTranslate() {
3600
+ const translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate;
3601
+ const newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate());
3602
+ swiper.setTranslate(newTranslate);
3603
+ swiper.updateActiveIndex();
3604
+ swiper.updateSlidesClasses();
3605
+ }
3606
+ let translated;
3607
+ if (params.freeMode && params.freeMode.enabled && !params.cssMode) {
3608
+ setTranslate();
3609
+ if (params.autoHeight) {
3610
+ swiper.updateAutoHeight();
3611
+ }
3612
+ } else {
3613
+ if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !params.centeredSlides) {
3614
+ const slides = swiper.virtual && params.virtual.enabled ? swiper.virtual.slides : swiper.slides;
3615
+ translated = swiper.slideTo(slides.length - 1, 0, false, true);
3616
+ } else {
3617
+ translated = swiper.slideTo(swiper.activeIndex, 0, false, true);
3618
+ }
3619
+ if (!translated) {
3620
+ setTranslate();
3621
+ }
3622
+ }
3623
+ if (params.watchOverflow && snapGrid !== swiper.snapGrid) {
3624
+ swiper.checkOverflow();
3625
+ }
3626
+ swiper.emit('update');
3627
+ }
3628
+ changeDirection(newDirection, needUpdate = true) {
3629
+ const swiper = this;
3630
+ const currentDirection = swiper.params.direction;
3631
+ if (!newDirection) {
3632
+ // eslint-disable-next-line
3633
+ newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal';
3634
+ }
3635
+ if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') {
3636
+ return swiper;
3637
+ }
3638
+ swiper.el.classList.remove(`${swiper.params.containerModifierClass}${currentDirection}`);
3639
+ swiper.el.classList.add(`${swiper.params.containerModifierClass}${newDirection}`);
3640
+ swiper.emitContainerClasses();
3641
+ swiper.params.direction = newDirection;
3642
+ swiper.slides.forEach(slideEl => {
3643
+ if (newDirection === 'vertical') {
3644
+ slideEl.style.width = '';
3645
+ } else {
3646
+ slideEl.style.height = '';
3647
+ }
3648
+ });
3649
+ swiper.emit('changeDirection');
3650
+ if (needUpdate) swiper.update();
3651
+ return swiper;
3652
+ }
3653
+ changeLanguageDirection(direction) {
3654
+ const swiper = this;
3655
+ if (swiper.rtl && direction === 'rtl' || !swiper.rtl && direction === 'ltr') return;
3656
+ swiper.rtl = direction === 'rtl';
3657
+ swiper.rtlTranslate = swiper.params.direction === 'horizontal' && swiper.rtl;
3658
+ if (swiper.rtl) {
3659
+ swiper.el.classList.add(`${swiper.params.containerModifierClass}rtl`);
3660
+ swiper.el.dir = 'rtl';
3661
+ } else {
3662
+ swiper.el.classList.remove(`${swiper.params.containerModifierClass}rtl`);
3663
+ swiper.el.dir = 'ltr';
3664
+ }
3665
+ swiper.update();
3666
+ }
3667
+ mount(element) {
3668
+ const swiper = this;
3669
+ if (swiper.mounted) return true;
3670
+
3671
+ // Find el
3672
+ let el = element || swiper.params.el;
3673
+ if (typeof el === 'string') {
3674
+ el = document.querySelector(el);
3675
+ }
3676
+ if (!el) {
3677
+ return false;
3678
+ }
3679
+ el.swiper = swiper;
3680
+ if (el.parentNode && el.parentNode.host && el.parentNode.host.nodeName === swiper.params.swiperElementNodeName.toUpperCase()) {
3681
+ swiper.isElement = true;
3682
+ }
3683
+ const getWrapperSelector = () => {
3684
+ return `.${(swiper.params.wrapperClass || '').trim().split(' ').join('.')}`;
3685
+ };
3686
+ const getWrapper = () => {
3687
+ if (el && el.shadowRoot && el.shadowRoot.querySelector) {
3688
+ const res = el.shadowRoot.querySelector(getWrapperSelector());
3689
+ // Children needs to return slot items
3690
+ return res;
3691
+ }
3692
+ return elementChildren(el, getWrapperSelector())[0];
3693
+ };
3694
+ // Find Wrapper
3695
+ let wrapperEl = getWrapper();
3696
+ if (!wrapperEl && swiper.params.createElements) {
3697
+ wrapperEl = createElement('div', swiper.params.wrapperClass);
3698
+ el.append(wrapperEl);
3699
+ elementChildren(el, `.${swiper.params.slideClass}`).forEach(slideEl => {
3700
+ wrapperEl.append(slideEl);
3701
+ });
3702
+ }
3703
+ Object.assign(swiper, {
3704
+ el,
3705
+ wrapperEl,
3706
+ slidesEl: swiper.isElement && !el.parentNode.host.slideSlots ? el.parentNode.host : wrapperEl,
3707
+ hostEl: swiper.isElement ? el.parentNode.host : el,
3708
+ mounted: true,
3709
+ // RTL
3710
+ rtl: el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl',
3711
+ rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || elementStyle(el, 'direction') === 'rtl'),
3712
+ wrongRTL: elementStyle(wrapperEl, 'display') === '-webkit-box'
3713
+ });
3714
+ return true;
3715
+ }
3716
+ init(el) {
3717
+ const swiper = this;
3718
+ if (swiper.initialized) return swiper;
3719
+ const mounted = swiper.mount(el);
3720
+ if (mounted === false) return swiper;
3721
+ swiper.emit('beforeInit');
3722
+
3723
+ // Set breakpoint
3724
+ if (swiper.params.breakpoints) {
3725
+ swiper.setBreakpoint();
3726
+ }
3727
+
3728
+ // Add Classes
3729
+ swiper.addClasses();
3730
+
3731
+ // Update size
3732
+ swiper.updateSize();
3733
+
3734
+ // Update slides
3735
+ swiper.updateSlides();
3736
+ if (swiper.params.watchOverflow) {
3737
+ swiper.checkOverflow();
3738
+ }
3739
+
3740
+ // Set Grab Cursor
3741
+ if (swiper.params.grabCursor && swiper.enabled) {
3742
+ swiper.setGrabCursor();
3743
+ }
3744
+
3745
+ // Slide To Initial Slide
3746
+ if (swiper.params.loop && swiper.virtual && swiper.params.virtual.enabled) {
3747
+ swiper.slideTo(swiper.params.initialSlide + swiper.virtual.slidesBefore, 0, swiper.params.runCallbacksOnInit, false, true);
3748
+ } else {
3749
+ swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit, false, true);
3750
+ }
3751
+
3752
+ // Create loop
3753
+ if (swiper.params.loop) {
3754
+ swiper.loopCreate(undefined, true);
3755
+ }
3756
+
3757
+ // Attach events
3758
+ swiper.attachEvents();
3759
+ const lazyElements = [...swiper.el.querySelectorAll('[loading="lazy"]')];
3760
+ if (swiper.isElement) {
3761
+ lazyElements.push(...swiper.hostEl.querySelectorAll('[loading="lazy"]'));
3762
+ }
3763
+ lazyElements.forEach(imageEl => {
3764
+ if (imageEl.complete) {
3765
+ processLazyPreloader(swiper, imageEl);
3766
+ } else {
3767
+ imageEl.addEventListener('load', e => {
3768
+ processLazyPreloader(swiper, e.target);
3769
+ });
3770
+ }
3771
+ });
3772
+ preload(swiper);
3773
+
3774
+ // Init Flag
3775
+ swiper.initialized = true;
3776
+ preload(swiper);
3777
+
3778
+ // Emit
3779
+ swiper.emit('init');
3780
+ swiper.emit('afterInit');
3781
+ return swiper;
3782
+ }
3783
+ destroy(deleteInstance = true, cleanStyles = true) {
3784
+ const swiper = this;
3785
+ const {
3786
+ params,
3787
+ el,
3788
+ wrapperEl,
3789
+ slides
3790
+ } = swiper;
3791
+ if (typeof swiper.params === 'undefined' || swiper.destroyed) {
3792
+ return null;
3793
+ }
3794
+ swiper.emit('beforeDestroy');
3795
+
3796
+ // Init Flag
3797
+ swiper.initialized = false;
3798
+
3799
+ // Detach events
3800
+ swiper.detachEvents();
3801
+
3802
+ // Destroy loop
3803
+ if (params.loop) {
3804
+ swiper.loopDestroy();
3805
+ }
3806
+
3807
+ // Cleanup styles
3808
+ if (cleanStyles) {
3809
+ swiper.removeClasses();
3810
+ if (el && typeof el !== 'string') {
3811
+ el.removeAttribute('style');
3812
+ }
3813
+ if (wrapperEl) {
3814
+ wrapperEl.removeAttribute('style');
3815
+ }
3816
+ if (slides && slides.length) {
3817
+ slides.forEach(slideEl => {
3818
+ slideEl.classList.remove(params.slideVisibleClass, params.slideFullyVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass);
3819
+ slideEl.removeAttribute('style');
3820
+ slideEl.removeAttribute('data-swiper-slide-index');
3821
+ });
3822
+ }
3823
+ }
3824
+ swiper.emit('destroy');
3825
+
3826
+ // Detach emitter events
3827
+ Object.keys(swiper.eventsListeners).forEach(eventName => {
3828
+ swiper.off(eventName);
3829
+ });
3830
+ if (deleteInstance !== false) {
3831
+ if (swiper.el && typeof swiper.el !== 'string') {
3832
+ swiper.el.swiper = null;
3833
+ }
3834
+ deleteProps(swiper);
3835
+ }
3836
+ swiper.destroyed = true;
3837
+ return null;
3838
+ }
3839
+ static extendDefaults(newDefaults) {
3840
+ extend(extendedDefaults, newDefaults);
3841
+ }
3842
+ static get extendedDefaults() {
3843
+ return extendedDefaults;
3844
+ }
3845
+ static get defaults() {
3846
+ return defaults;
3847
+ }
3848
+ static installModule(mod) {
3849
+ if (!Swiper.prototype.__modules__) Swiper.prototype.__modules__ = [];
3850
+ const modules = Swiper.prototype.__modules__;
3851
+ if (typeof mod === 'function' && modules.indexOf(mod) < 0) {
3852
+ modules.push(mod);
3853
+ }
3854
+ }
3855
+ static use(module) {
3856
+ if (Array.isArray(module)) {
3857
+ module.forEach(m => Swiper.installModule(m));
3858
+ return Swiper;
3859
+ }
3860
+ Swiper.installModule(module);
3861
+ return Swiper;
3862
+ }
3863
+ }
3864
+ Object.keys(prototypes).forEach(prototypeGroup => {
3865
+ Object.keys(prototypes[prototypeGroup]).forEach(protoMethod => {
3866
+ Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod];
3867
+ });
3868
+ });
3869
+ Swiper.use([Resize, Observer]);
3870
+
3871
+ export { Swiper as S, defaults as d };