mx-ui-components-pkg 0.0.717-alpha.121

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 (375) hide show
  1. package/License +21 -0
  2. package/README.md +40 -0
  3. package/dist/abap-D0Neqhq6.js +1404 -0
  4. package/dist/apex-B5LhxkeG.js +332 -0
  5. package/dist/azcli-BrBH0QTU.js +74 -0
  6. package/dist/bat-BfzAov64.js +106 -0
  7. package/dist/bicep-C3bCSWel.js +108 -0
  8. package/dist/cameligo-sFL5plcd.js +180 -0
  9. package/dist/clojure-CfeExRz0.js +767 -0
  10. package/dist/coffee-Xws5K0WL.js +238 -0
  11. package/dist/cpp-CqOUEpxN.js +395 -0
  12. package/dist/csharp-DVLiBOZb.js +332 -0
  13. package/dist/csp-DVFp9bw5.js +59 -0
  14. package/dist/css-DwARn2R6.js +193 -0
  15. package/dist/cssMode-gQuT1ggz.js +1577 -0
  16. package/dist/cypher-uY0Mffat.js +269 -0
  17. package/dist/dart-D27H-mX_.js +287 -0
  18. package/dist/dockerfile-CmV85WZK.js +136 -0
  19. package/dist/ecl--fKn7yzB.js +462 -0
  20. package/dist/elixir-DUhH17ON.js +575 -0
  21. package/dist/flow9-B3Dx2LLe.js +148 -0
  22. package/dist/freemarker2-jL3Z0LEU.js +995 -0
  23. package/dist/fsharp-SyqBfUAR.js +223 -0
  24. package/dist/go-BbMR2tdT.js +224 -0
  25. package/dist/graphql-DDJE6tIl.js +157 -0
  26. package/dist/handlebars-DuQel7zv.js +425 -0
  27. package/dist/hcl-YBvpaUqf.js +189 -0
  28. package/dist/html-B1x_Q1d4.js +314 -0
  29. package/dist/htmlMode-c4xQ8n2E.js +1587 -0
  30. package/dist/htmx.esm-lFhJjLHa.js +2282 -0
  31. package/dist/index-pU7JpcAp.js +362117 -0
  32. package/dist/index.es-DLivPq7o.js +5627 -0
  33. package/dist/index.js +179 -0
  34. package/dist/index.umd.cjs +5918 -0
  35. package/dist/ini-Ct73dBtM.js +77 -0
  36. package/dist/java-C_jlkwoG.js +238 -0
  37. package/dist/javascript-Bp25c6Zh.js +76 -0
  38. package/dist/jsonMode-D9GsVC9K.js +2002 -0
  39. package/dist/julia-D8WE5U1e.js +517 -0
  40. package/dist/kotlin-Zy9aq5yB.js +259 -0
  41. package/dist/less-sZ0iHtE8.js +168 -0
  42. package/dist/lexon-CsdNL29A.js +163 -0
  43. package/dist/liquid-D1vivIqf.js +246 -0
  44. package/dist/lua-C2YJo0zw.js +168 -0
  45. package/dist/m3-CPLP40SG.js +216 -0
  46. package/dist/markdown-B1mf5e0R.js +235 -0
  47. package/dist/mdx-DQaBMjnU.js +171 -0
  48. package/dist/mips-DA33BZX1.js +204 -0
  49. package/dist/msdax-CCYFIQsP.js +381 -0
  50. package/dist/mysql-hjmIjL-D.js +884 -0
  51. package/dist/objective-c-RRCpEmqC.js +189 -0
  52. package/dist/pascal-CeV8XfxB.js +257 -0
  53. package/dist/pascaligo-IEEGVJAJ.js +170 -0
  54. package/dist/perl-B5-QbHq_.js +632 -0
  55. package/dist/pgsql-s6kqEJmi.js +857 -0
  56. package/dist/php-CWWqzOo8.js +506 -0
  57. package/dist/pla-FSvb_YP_.js +143 -0
  58. package/dist/postiats-DQdscQXO.js +913 -0
  59. package/dist/powerquery-CtA5JA1I.js +896 -0
  60. package/dist/powershell-DglEq96N.js +245 -0
  61. package/dist/protobuf-BSepub3e.js +426 -0
  62. package/dist/pug-B1847F4G.js +408 -0
  63. package/dist/purify.es-DHbHSKL1.js +528 -0
  64. package/dist/python-BNIU3jAC.js +307 -0
  65. package/dist/qsharp-D4i0Nqg9.js +307 -0
  66. package/dist/r-cdRigKxa.js +249 -0
  67. package/dist/razor-BmTFWDiN.js +556 -0
  68. package/dist/redis-D9MFxvE8.js +308 -0
  69. package/dist/redshift-CmCnsvL-.js +815 -0
  70. package/dist/restructuredtext-CWy8J51t.js +180 -0
  71. package/dist/ruby-WP-c36m5.js +517 -0
  72. package/dist/rust-Q9FLdYpu.js +349 -0
  73. package/dist/sb-C54-JBGT.js +121 -0
  74. package/dist/scala-CzbFImc5.js +376 -0
  75. package/dist/scheme-BhfDmYN3.js +114 -0
  76. package/dist/scss-CEmiBXpS.js +268 -0
  77. package/dist/shell-Bmc1VhG0.js +227 -0
  78. package/dist/solidity-C9Q2I8Hh.js +1373 -0
  79. package/dist/sophia-jWa1UyKz.js +205 -0
  80. package/dist/sparql-CM7jctbc.js +207 -0
  81. package/dist/sql-WzihTkbg.js +859 -0
  82. package/dist/st-6y7_3aup.js +422 -0
  83. package/dist/style.css +10 -0
  84. package/dist/swift-k-0zxG_D.js +318 -0
  85. package/dist/systemverilog-Pnr5_rIP.js +582 -0
  86. package/dist/tcl-fNPXval8.js +238 -0
  87. package/dist/tsMode-YqbVSHNM.js +895 -0
  88. package/dist/twig-L2MkztkV.js +398 -0
  89. package/dist/types/src/assets/Scripts/TailwindCss.d.ts +1 -0
  90. package/dist/types/src/assets/Scripts/htmxLoader.d.ts +2 -0
  91. package/dist/types/src/assets/data/country-flags.d.ts +17 -0
  92. package/dist/types/src/hooks.d.ts +0 -0
  93. package/dist/types/src/hooks.server.d.ts +0 -0
  94. package/dist/types/src/lib/A/index.d.ts +2 -0
  95. package/dist/types/src/lib/Accordion/Accordion.svelte.d.ts +12 -0
  96. package/dist/types/src/lib/Accordion/AccordionContent.svelte.d.ts +10 -0
  97. package/dist/types/src/lib/Accordion/AccordionHeader.svelte.d.ts +32 -0
  98. package/dist/types/src/lib/Accordion/AccordionItem.svelte.d.ts +8 -0
  99. package/dist/types/src/lib/Accordion/index.d.ts +5 -0
  100. package/dist/types/src/lib/ActionMounter/MobiusActionMounter.d.ts +7 -0
  101. package/dist/types/src/lib/AgentCard/AgentCard.svelte.d.ts +9 -0
  102. package/dist/types/src/lib/Areachart/Areachart.d.ts +14 -0
  103. package/dist/types/src/lib/AudioPlayer/AudioPlayer.d.ts +28 -0
  104. package/dist/types/src/lib/AudioRecorder/AudioRecord.svelte.d.ts +25 -0
  105. package/dist/types/src/lib/AudioRecorder/AudioRecordedTextGroup.d.ts +60 -0
  106. package/dist/types/src/lib/AudioRecorder/CommandPanelCheckboxes.d.ts +10 -0
  107. package/dist/types/src/lib/AudioRecorder/index.d.ts +2 -0
  108. package/dist/types/src/lib/AudioSummary/AudioSummary.d.ts +13 -0
  109. package/dist/types/src/lib/Autocomplete/Autocomplete.d.ts +16 -0
  110. package/dist/types/src/lib/Avatar/Avatar.svelte.d.ts +12 -0
  111. package/dist/types/src/lib/Avatar/index.d.ts +2 -0
  112. package/dist/types/src/lib/Badge/Badge.svelte.d.ts +18 -0
  113. package/dist/types/src/lib/Badge/BadgeGroup.d.ts +23 -0
  114. package/dist/types/src/lib/Badge/index.d.ts +2 -0
  115. package/dist/types/src/lib/Banner/Banner.svelte.d.ts +18 -0
  116. package/dist/types/src/lib/Banner/index.d.ts +2 -0
  117. package/dist/types/src/lib/Barchart/Barchart.d.ts +14 -0
  118. package/dist/types/src/lib/BlockQuote/Blockquote.svelte.d.ts +16 -0
  119. package/dist/types/src/lib/BlockQuote/index.d.ts +2 -0
  120. package/dist/types/src/lib/Calendar/index.d.ts +2 -0
  121. package/dist/types/src/lib/Card/Card-header.svelte.d.ts +10 -0
  122. package/dist/types/src/lib/Card/Card.svelte.d.ts +40 -0
  123. package/dist/types/src/lib/Card/Chats-card.d.ts +10 -0
  124. package/dist/types/src/lib/Card/index.d.ts +2 -0
  125. package/dist/types/src/lib/Card/mobius-methods.d.ts +16 -0
  126. package/dist/types/src/lib/Card/utils.d.ts +54 -0
  127. package/dist/types/src/lib/Carousel/Carousel.svelte.d.ts +22 -0
  128. package/dist/types/src/lib/ChatDialog/ChatDialog.svelte.d.ts +30 -0
  129. package/dist/types/src/lib/ChatDialog/index.d.ts +2 -0
  130. package/dist/types/src/lib/ChatMessage/ChatMessage.svelte.d.ts +77 -0
  131. package/dist/types/src/lib/ChatMessage/index.d.ts +2 -0
  132. package/dist/types/src/lib/Checkbox/index.d.ts +2 -0
  133. package/dist/types/src/lib/ColorPicker/ColorPicker.d.ts +11 -0
  134. package/dist/types/src/lib/Command/Command.d.ts +55 -0
  135. package/dist/types/src/lib/Command/CommandsWrapper.d.ts +26 -0
  136. package/dist/types/src/lib/ComplexAccordion/ComplexAccordion.d.ts +50 -0
  137. package/dist/types/src/lib/ComplexCards/ComplexCards.d.ts +51 -0
  138. package/dist/types/src/lib/ConditionalRenderer/ConditionalRenderer.d.ts +10 -0
  139. package/dist/types/src/lib/ConditionalRenderer/ConditionalRendererDom.d.ts +12 -0
  140. package/dist/types/src/lib/ConnectionFlow/ConnectionFlow.d.ts +44 -0
  141. package/dist/types/src/lib/Counter/APIComponent.svelte.d.ts +19 -0
  142. package/dist/types/src/lib/Counter/BaseComponent.d.ts +149 -0
  143. package/dist/types/src/lib/Counter/Breadcrumb.svelte.d.ts +14 -0
  144. package/dist/types/src/lib/Counter/Button.svelte.d.ts +9 -0
  145. package/dist/types/src/lib/Counter/ChatBot.d.ts +11 -0
  146. package/dist/types/src/lib/Counter/Child.svelte.d.ts +12 -0
  147. package/dist/types/src/lib/Counter/Common.svelte.d.ts +7 -0
  148. package/dist/types/src/lib/Counter/CustomButton.d.ts +13 -0
  149. package/dist/types/src/lib/Counter/CustomCheckbox.svelte.d.ts +28 -0
  150. package/dist/types/src/lib/Counter/CustomForm.svelte.d.ts +8 -0
  151. package/dist/types/src/lib/Counter/CustomInput.svelte.d.ts +9 -0
  152. package/dist/types/src/lib/Counter/CustomInputError.svelte.d.ts +7 -0
  153. package/dist/types/src/lib/Counter/CustomKeyEvents.d.ts +19 -0
  154. package/dist/types/src/lib/Counter/Drawer.svelte.d.ts +20 -0
  155. package/dist/types/src/lib/Counter/DropDown.d.ts +13 -0
  156. package/dist/types/src/lib/Counter/Dropdown.svelte.d.ts +26 -0
  157. package/dist/types/src/lib/Counter/DropdownContainer.d.ts +9 -0
  158. package/dist/types/src/lib/Counter/DropdownInput.d.ts +13 -0
  159. package/dist/types/src/lib/Counter/DropdownInputContainer.d.ts +12 -0
  160. package/dist/types/src/lib/Counter/DropdownItem.svelte.d.ts +22 -0
  161. package/dist/types/src/lib/Counter/DropdownList.d.ts +0 -0
  162. package/dist/types/src/lib/Counter/DropdownMenu.svelte.d.ts +27 -0
  163. package/dist/types/src/lib/Counter/Input.svelte.d.ts +6 -0
  164. package/dist/types/src/lib/Counter/Label.svelte.d.ts +7 -0
  165. package/dist/types/src/lib/Counter/ListGroup.d.ts +11 -0
  166. package/dist/types/src/lib/Counter/ListItem.d.ts +19 -0
  167. package/dist/types/src/lib/Counter/MobiusAppComponent.d.ts +8 -0
  168. package/dist/types/src/lib/Counter/MobiusBreadCrumbItem.svelte.d.ts +14 -0
  169. package/dist/types/src/lib/Counter/MobiusBreadCrumbNav.svelte.d.ts +11 -0
  170. package/dist/types/src/lib/Counter/MobiusContainer.d.ts +27 -0
  171. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/MobiusHTMLElement.d.ts +14 -0
  172. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/actions.d.ts +7 -0
  173. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/component-factory.d.ts +3 -0
  174. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/counter-component.d.ts +6 -0
  175. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/dynamic-signals.d.ts +1 -0
  176. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/message-component.d.ts +6 -0
  177. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/metadata-renderer.d.ts +5 -0
  178. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/store.d.ts +17 -0
  179. package/dist/types/src/lib/Counter/MobiusHtmlBaseElement/text-display-component.d.ts +6 -0
  180. package/dist/types/src/lib/Counter/OverlayPanel.d.ts +17 -0
  181. package/dist/types/src/lib/Counter/Parent.svelte.d.ts +12 -0
  182. package/dist/types/src/lib/Counter/Provider.svelte.d.ts +8 -0
  183. package/dist/types/src/lib/Counter/RangeInput.svelte.d.ts +17 -0
  184. package/dist/types/src/lib/Counter/Router.svelte.d.ts +7 -0
  185. package/dist/types/src/lib/Counter/RouterInit.d.ts +17 -0
  186. package/dist/types/src/lib/Counter/Store.svelte.d.ts +15 -0
  187. package/dist/types/src/lib/Counter/TailwindCss.d.ts +1 -0
  188. package/dist/types/src/lib/Counter/TextAudio.svelte.d.ts +22 -0
  189. package/dist/types/src/lib/Counter/counter-component.svelte.d.ts +13 -0
  190. package/dist/types/src/lib/Counter/store/actions.d.ts +5 -0
  191. package/dist/types/src/lib/Counter/store/signals.d.ts +10 -0
  192. package/dist/types/src/lib/Counter/store/store.d.ts +14 -0
  193. package/dist/types/src/lib/CountryFlagElement/CountryFlagElement.d.ts +22 -0
  194. package/dist/types/src/lib/CountryFlagElement/CountryFlagElement.svelte.d.ts +22 -0
  195. package/dist/types/src/lib/CustomDatePicker/CustomDatePicker.d.ts +89 -0
  196. package/dist/types/src/lib/CustomNode/CustomNode.d.ts +11 -0
  197. package/dist/types/src/lib/CustomOntology/CustomOntologyBase.d.ts +23 -0
  198. package/dist/types/src/lib/CustomProgressNotificationComponent/CustomProgressNotificationComponent.d.ts +22 -0
  199. package/dist/types/src/lib/CustomSearchBox/CustomSeachInputBox.d.ts +17 -0
  200. package/dist/types/src/lib/CustomSearchBox/CustomSearchBox.d.ts +27 -0
  201. package/dist/types/src/lib/CustomWorkflowViewer/CustomWorkflowViewer.d.ts +47 -0
  202. package/dist/types/src/lib/CustomWorkflowViewer/workflow.types.d.ts +80 -0
  203. package/dist/types/src/lib/Datepicker/index.d.ts +2 -0
  204. package/dist/types/src/lib/Div/Div.svelte.d.ts +16 -0
  205. package/dist/types/src/lib/Div/index.d.ts +2 -0
  206. package/dist/types/src/lib/DoughnutChart/Doughnut.d.ts +14 -0
  207. package/dist/types/src/lib/DrawflowEditor/DrawflowEditor.d.ts +32 -0
  208. package/dist/types/src/lib/Dropdown/MobiusDropdown.d.ts +27 -0
  209. package/dist/types/src/lib/DynamicDataElement/DynamicDataElement.svelte.d.ts +16 -0
  210. package/dist/types/src/lib/DynamicForm/dynamicForm.d.ts +10 -0
  211. package/dist/types/src/lib/DynamicForm/index.d.ts +2 -0
  212. package/dist/types/src/lib/EditableDiv/EditableDiv.d.ts +10 -0
  213. package/dist/types/src/lib/FetchInterceptor/MobiusFetchInterceptor.d.ts +8 -0
  214. package/dist/types/src/lib/FileInput/Fileupload.svelte.d.ts +26 -0
  215. package/dist/types/src/lib/FileInput/index.d.ts +2 -0
  216. package/dist/types/src/lib/FileUpload/FileUpload.d.ts +58 -0
  217. package/dist/types/src/lib/FirstComponent/FirstComponent.svelte.d.ts +6 -0
  218. package/dist/types/src/lib/Funnel/Funnel.d.ts +14 -0
  219. package/dist/types/src/lib/GoogleButton/MobiusGoogleOAuth.d.ts +10 -0
  220. package/dist/types/src/lib/Group-Structure/GroupStructure.d.ts +21 -0
  221. package/dist/types/src/lib/H1/H1.svelte.d.ts +4 -0
  222. package/dist/types/src/lib/H1/index.d.ts +2 -0
  223. package/dist/types/src/lib/H2/H2.svelte.d.ts +4 -0
  224. package/dist/types/src/lib/H2/index.d.ts +2 -0
  225. package/dist/types/src/lib/H3/H3.svelte.d.ts +4 -0
  226. package/dist/types/src/lib/H3/index.d.ts +2 -0
  227. package/dist/types/src/lib/H4/index.d.ts +2 -0
  228. package/dist/types/src/lib/H5/index.d.ts +2 -0
  229. package/dist/types/src/lib/H6/index.d.ts +2 -0
  230. package/dist/types/src/lib/Heatmap/Heatmap.d.ts +14 -0
  231. package/dist/types/src/lib/Helpers/Util.d.ts +2 -0
  232. package/dist/types/src/lib/Hr/index.d.ts +2 -0
  233. package/dist/types/src/lib/IconBubble/IconBubble.d.ts +20 -0
  234. package/dist/types/src/lib/Iframe/iframeNew.d.ts +9 -0
  235. package/dist/types/src/lib/Img/Img.svelte.d.ts +7 -0
  236. package/dist/types/src/lib/Input/Input.svelte.d.ts +14 -0
  237. package/dist/types/src/lib/InputBaseComponent/InputBaseComponent.d.ts +59 -0
  238. package/dist/types/src/lib/JSONInputField/jsonInput.d.ts +12 -0
  239. package/dist/types/src/lib/KBD/index.d.ts +2 -0
  240. package/dist/types/src/lib/LayoutCards/LayoutCards.d.ts +6 -0
  241. package/dist/types/src/lib/Leaflet/Leaflet.d.ts +18 -0
  242. package/dist/types/src/lib/Li/index.d.ts +2 -0
  243. package/dist/types/src/lib/LineChart/lineChart.d.ts +26 -0
  244. package/dist/types/src/lib/Link/MobiusLink.d.ts +12 -0
  245. package/dist/types/src/lib/ListGroup/index.d.ts +2 -0
  246. package/dist/types/src/lib/MegaMenu/index.d.ts +2 -0
  247. package/dist/types/src/lib/MobiusAccordion/CustomMobiusAccordianItem.d.ts +11 -0
  248. package/dist/types/src/lib/MobiusAccordion/CustomMobiusAccordionContent.d.ts +13 -0
  249. package/dist/types/src/lib/MobiusAccordion/CustomMobiusAccordionHeader.d.ts +11 -0
  250. package/dist/types/src/lib/MobiusAccordion/CustomMobiusAccordionWrapper.d.ts +9 -0
  251. package/dist/types/src/lib/MobiusButton/Button.d.ts +16 -0
  252. package/dist/types/src/lib/MobiusButtonGroup/ButtonGroup.d.ts +9 -0
  253. package/dist/types/src/lib/MobiusButtonGroup/ButtonGroupButton.d.ts +10 -0
  254. package/dist/types/src/lib/MobiusLoop/MobiusLoop.d.ts +37 -0
  255. package/dist/types/src/lib/Modal/Modal.svelte.d.ts +26 -0
  256. package/dist/types/src/lib/Modal/index.d.ts +2 -0
  257. package/dist/types/src/lib/MultiBarChart/ MultiBarChart.d.ts +14 -0
  258. package/dist/types/src/lib/OrgChart/OrgChart.d.ts +53 -0
  259. package/dist/types/src/lib/P/MobiusP.d.ts +8 -0
  260. package/dist/types/src/lib/Pagination/MobiusPagination.d.ts +29 -0
  261. package/dist/types/src/lib/PieChart/PieChart.d.ts +14 -0
  262. package/dist/types/src/lib/ProgressBar/ProgressBar.svelte.d.ts +75 -0
  263. package/dist/types/src/lib/Radial/RadialChart.d.ts +14 -0
  264. package/dist/types/src/lib/RadialRelationship/RadialRelationship.d.ts +11 -0
  265. package/dist/types/src/lib/RadialRelationship/utils.d.ts +23 -0
  266. package/dist/types/src/lib/Radio/index.d.ts +2 -0
  267. package/dist/types/src/lib/Range/index.d.ts +2 -0
  268. package/dist/types/src/lib/Rating/Rating.svelte.d.ts +15 -0
  269. package/dist/types/src/lib/Rating/index.d.ts +2 -0
  270. package/dist/types/src/lib/RingGaugeChart/RingGaugeChart.d.ts +14 -0
  271. package/dist/types/src/lib/SVG/svg.d.ts +7 -0
  272. package/dist/types/src/lib/ScatterChart/Scatter.d.ts +14 -0
  273. package/dist/types/src/lib/SecondComponent/SecondComponent.svelte.d.ts +6 -0
  274. package/dist/types/src/lib/SocketIoSubscriber/MobiusSocketIoSubscriber.d.ts +5 -0
  275. package/dist/types/src/lib/Span/Span.d.ts +12 -0
  276. package/dist/types/src/lib/Span/index.d.ts +2 -0
  277. package/dist/types/src/lib/SpeechPrompt/SpeechPrompt.d.ts +19 -0
  278. package/dist/types/src/lib/SpeechPrompt/SpeechPromptDynamic.d.ts +66 -0
  279. package/dist/types/src/lib/Split/MobiusSplit.d.ts +8 -0
  280. package/dist/types/src/lib/StackedAreaChart/StackedAreaChart.d.ts +14 -0
  281. package/dist/types/src/lib/StackedBarchart/StackedBarchart.d.ts +14 -0
  282. package/dist/types/src/lib/StackedLineChart/StackedLineChart.d.ts +14 -0
  283. package/dist/types/src/lib/Stepper/Stepper.svelte.d.ts +91 -0
  284. package/dist/types/src/lib/Stepper/index.d.ts +2 -0
  285. package/dist/types/src/lib/StringManipulation/StringManipulation.d.ts +9 -0
  286. package/dist/types/src/lib/Tab/MobiusTab.d.ts +18 -0
  287. package/dist/types/src/lib/Tab/MobiusTabs.d.ts +27 -0
  288. package/dist/types/src/lib/Table/MobiusTable.d.ts +67 -0
  289. package/dist/types/src/lib/Table/Td/MobiusTd.d.ts +17 -0
  290. package/dist/types/src/lib/Table/Th/MobiusTh.d.ts +11 -0
  291. package/dist/types/src/lib/Table/Tr/MobiusTr.d.ts +21 -0
  292. package/dist/types/src/lib/Table/index.d.ts +5 -0
  293. package/dist/types/src/lib/TimeNode/index.d.ts +2 -0
  294. package/dist/types/src/lib/Timeline/index.d.ts +2 -0
  295. package/dist/types/src/lib/TimelineDial/index.d.ts +2 -0
  296. package/dist/types/src/lib/TimerComponent/TimerComponent.svelte.d.ts +13 -0
  297. package/dist/types/src/lib/Toast/Toast.svelte.d.ts +18 -0
  298. package/dist/types/src/lib/Toast/Toaster.d.ts +24 -0
  299. package/dist/types/src/lib/Toast/index.d.ts +2 -0
  300. package/dist/types/src/lib/ToggleSwitch/MobiusBaseToggle.d.ts +11 -0
  301. package/dist/types/src/lib/ToggleSwitch/Toggle.d.ts +6 -0
  302. package/dist/types/src/lib/ToggleSwitch/ToggleCheckBox.d.ts +7 -0
  303. package/dist/types/src/lib/ToggleSwitch/index.d.ts +4 -0
  304. package/dist/types/src/lib/Tooltip/index.d.ts +2 -0
  305. package/dist/types/src/lib/Ul/index.d.ts +2 -0
  306. package/dist/types/src/lib/UsabilityIntelligence/UsabilityIntelligence.svelte.d.ts +32 -0
  307. package/dist/types/src/lib/UsabilityIntelligence/index.d.ts +2 -0
  308. package/dist/types/src/lib/Video/MobiusVideo.d.ts +17 -0
  309. package/dist/types/src/lib/Video/Video.svelte.d.ts +22 -0
  310. package/dist/types/src/lib/Video/index.d.ts +2 -0
  311. package/dist/types/src/lib/WebsocketService/Notification.d.ts +36 -0
  312. package/dist/types/src/lib/WebsocketService/NotificationComponent.d.ts +9 -0
  313. package/dist/types/src/lib/WebsocketService/WebsocketService.d.ts +25 -0
  314. package/dist/types/src/lib/WrapperComponent/WrapperComponent.svelte.d.ts +9 -0
  315. package/dist/types/src/lib/WysiwygEditor/ConvertJsonToDita.d.ts +14 -0
  316. package/dist/types/src/lib/WysiwygEditor/Nodes/CustomLink.d.ts +1 -0
  317. package/dist/types/src/lib/WysiwygEditor/Nodes/FocusIcons.d.ts +2 -0
  318. package/dist/types/src/lib/WysiwygEditor/Nodes/ImageNode.d.ts +3 -0
  319. package/dist/types/src/lib/WysiwygEditor/Nodes/SectionNode.d.ts +3 -0
  320. package/dist/types/src/lib/WysiwygEditor/Nodes/SectionTitleNode.d.ts +3 -0
  321. package/dist/types/src/lib/WysiwygEditor/Nodes/TitleNode.d.ts +3 -0
  322. package/dist/types/src/lib/WysiwygEditor/Nodes/TopicNode.d.ts +3 -0
  323. package/dist/types/src/lib/WysiwygEditor/Nodes/VideoNode.d.ts +3 -0
  324. package/dist/types/src/lib/WysiwygEditor/Nodes/VideoPlaceholderNode.d.ts +3 -0
  325. package/dist/types/src/lib/WysiwygEditor/Nodes/dropdown.d.ts +91 -0
  326. package/dist/types/src/lib/WysiwygEditor/WysiwygEditor.d.ts +148 -0
  327. package/dist/types/src/lib/WysiwygEditor/index.d.ts +2 -0
  328. package/dist/types/src/lib/XmlEditor/FormatHTML.d.ts +1 -0
  329. package/dist/types/src/lib/XmlEditor/FormatJson.d.ts +1 -0
  330. package/dist/types/src/lib/XmlEditor/FormatXML.d.ts +1 -0
  331. package/dist/types/src/lib/XmlEditor/FormatYaml.d.ts +3 -0
  332. package/dist/types/src/lib/XmlEditor/ValidateHTML.d.ts +2 -0
  333. package/dist/types/src/lib/XmlEditor/XmlEditor.d.ts +34 -0
  334. package/dist/types/src/lib/XmlEditor/index.d.ts +2 -0
  335. package/dist/types/src/lib/i18n.d.ts +0 -0
  336. package/dist/types/src/lib/index.d.ts +168 -0
  337. package/dist/types/src/lib/inlang.d.ts +1 -0
  338. package/dist/types/src/lib/mobiusRadio/mobiusRadio.d.ts +6 -0
  339. package/dist/types/src/lib/utils/Base.d.ts +14 -0
  340. package/dist/types/src/lib/utils/BaseDiv.d.ts +9 -0
  341. package/dist/types/src/lib/utils/ExtractAssetDetails.d.ts +5 -0
  342. package/dist/types/src/lib/utils/common.d.ts +148 -0
  343. package/dist/types/src/lib/utils/dita.d.ts +11 -0
  344. package/dist/types/src/lib/utils/fetchTopics.d.ts +6 -0
  345. package/dist/types/src/lib/utils/loader.d.ts +38 -0
  346. package/dist/types/src/lib/utils/macProductMetaData.d.ts +254 -0
  347. package/dist/types/src/lib/utils/xmlToDita.d.ts +1 -0
  348. package/dist/types/src/lib/utils/xslt.d.ts +1 -0
  349. package/dist/types/src/messages/en.d.ts +0 -0
  350. package/dist/types/src/routes/+layout.server.d.ts +14182 -0
  351. package/dist/types/src/routes/+page.server.d.ts +1 -0
  352. package/dist/types/src/routes/api/megamenu/+server.d.ts +1 -0
  353. package/dist/types/src/routes/api/mobius/+server.d.ts +1 -0
  354. package/dist/types/src/routes/api/progressbar/+server.d.ts +1 -0
  355. package/dist/types/src/routes/api/stepper/+server.d.ts +1 -0
  356. package/dist/types/src/routes/htmxLoader.d.ts +3 -0
  357. package/dist/types/src/services/ServiceManager.d.ts +11 -0
  358. package/dist/types/src/services/SocketIOService.d.ts +28 -0
  359. package/dist/types/src/services/ToastService.d.ts +11 -0
  360. package/dist/types/src/services/helpers.d.ts +2 -0
  361. package/dist/types/src/services/service.d.ts +11 -0
  362. package/dist/types/tests/alert.test.d.ts +1 -0
  363. package/dist/types/tests/components.test.d.ts +1 -0
  364. package/dist/types/tests/forms.test.d.ts +1 -0
  365. package/dist/types/tests/home.test.d.ts +1 -0
  366. package/dist/types/tests/other.test.d.ts +1 -0
  367. package/dist/types/tests/typography.test.d.ts +1 -0
  368. package/dist/types/vite.config.d.ts +3 -0
  369. package/dist/typescript-BOMzHmQp.js +349 -0
  370. package/dist/typespec-Cqqo-3Pt.js +123 -0
  371. package/dist/vb-B5YC2xN9.js +378 -0
  372. package/dist/wgsl-B-_uRex7.js +445 -0
  373. package/dist/xml-B0r1kHUg.js +101 -0
  374. package/dist/yaml-BhIhwuQg.js +212 -0
  375. package/package.json +204 -0
@@ -0,0 +1,2282 @@
1
+ (function() {
2
+ const htmx = {
3
+ // Tsc madness here, assigning the functions directly results in an invalid TypeScript output, but reassigning is fine
4
+ /* Event processing */
5
+ /** @type {typeof onLoadHelper} */
6
+ onLoad: null,
7
+ /** @type {typeof processNode} */
8
+ process: null,
9
+ /** @type {typeof addEventListenerImpl} */
10
+ on: null,
11
+ /** @type {typeof removeEventListenerImpl} */
12
+ off: null,
13
+ /** @type {typeof triggerEvent} */
14
+ trigger: null,
15
+ /** @type {typeof ajaxHelper} */
16
+ ajax: null,
17
+ /* DOM querying helpers */
18
+ /** @type {typeof find} */
19
+ find: null,
20
+ /** @type {typeof findAll} */
21
+ findAll: null,
22
+ /** @type {typeof closest} */
23
+ closest: null,
24
+ /**
25
+ * Returns the input values that would resolve for a given element via the htmx value resolution mechanism
26
+ *
27
+ * @see https://htmx.org/api/#values
28
+ *
29
+ * @param {Element} elt the element to resolve values on
30
+ * @param {HttpVerb} type the request type (e.g. **get** or **post**) non-GET's will include the enclosing form of the element. Defaults to **post**
31
+ * @returns {Object}
32
+ */
33
+ values: function(e, t) {
34
+ return getInputValues(e, t || "post").values;
35
+ },
36
+ /* DOM manipulation helpers */
37
+ /** @type {typeof removeElement} */
38
+ remove: null,
39
+ /** @type {typeof addClassToElement} */
40
+ addClass: null,
41
+ /** @type {typeof removeClassFromElement} */
42
+ removeClass: null,
43
+ /** @type {typeof toggleClassOnElement} */
44
+ toggleClass: null,
45
+ /** @type {typeof takeClassForElement} */
46
+ takeClass: null,
47
+ /** @type {typeof swap} */
48
+ swap: null,
49
+ /* Extension entrypoints */
50
+ /** @type {typeof defineExtension} */
51
+ defineExtension: null,
52
+ /** @type {typeof removeExtension} */
53
+ removeExtension: null,
54
+ /* Debugging */
55
+ /** @type {typeof logAll} */
56
+ logAll: null,
57
+ /** @type {typeof logNone} */
58
+ logNone: null,
59
+ /* Debugging */
60
+ /**
61
+ * The logger htmx uses to log with
62
+ *
63
+ * @see https://htmx.org/api/#logger
64
+ */
65
+ logger: null,
66
+ /**
67
+ * A property holding the configuration htmx uses at runtime.
68
+ *
69
+ * Note that using a [meta tag](https://htmx.org/docs/#config) is the preferred mechanism for setting these properties.
70
+ *
71
+ * @see https://htmx.org/api/#config
72
+ */
73
+ config: {
74
+ /**
75
+ * Whether to use history.
76
+ * @type boolean
77
+ * @default true
78
+ */
79
+ historyEnabled: !0,
80
+ /**
81
+ * The number of pages to keep in **sessionStorage** for history support.
82
+ * @type number
83
+ * @default 10
84
+ */
85
+ historyCacheSize: 10,
86
+ /**
87
+ * @type boolean
88
+ * @default false
89
+ */
90
+ refreshOnHistoryMiss: !1,
91
+ /**
92
+ * The default swap style to use if **[hx-swap](https://htmx.org/attributes/hx-swap)** is omitted.
93
+ * @type HtmxSwapStyle
94
+ * @default 'innerHTML'
95
+ */
96
+ defaultSwapStyle: "innerHTML",
97
+ /**
98
+ * The default delay between receiving a response from the server and doing the swap.
99
+ * @type number
100
+ * @default 0
101
+ */
102
+ defaultSwapDelay: 0,
103
+ /**
104
+ * The default delay between completing the content swap and settling attributes.
105
+ * @type number
106
+ * @default 20
107
+ */
108
+ defaultSettleDelay: 20,
109
+ /**
110
+ * If true, htmx will inject a small amount of CSS into the page to make indicators invisible unless the **htmx-indicator** class is present.
111
+ * @type boolean
112
+ * @default true
113
+ */
114
+ includeIndicatorStyles: !0,
115
+ /**
116
+ * The class to place on indicators when a request is in flight.
117
+ * @type string
118
+ * @default 'htmx-indicator'
119
+ */
120
+ indicatorClass: "htmx-indicator",
121
+ /**
122
+ * The class to place on triggering elements when a request is in flight.
123
+ * @type string
124
+ * @default 'htmx-request'
125
+ */
126
+ requestClass: "htmx-request",
127
+ /**
128
+ * The class to temporarily place on elements that htmx has added to the DOM.
129
+ * @type string
130
+ * @default 'htmx-added'
131
+ */
132
+ addedClass: "htmx-added",
133
+ /**
134
+ * The class to place on target elements when htmx is in the settling phase.
135
+ * @type string
136
+ * @default 'htmx-settling'
137
+ */
138
+ settlingClass: "htmx-settling",
139
+ /**
140
+ * The class to place on target elements when htmx is in the swapping phase.
141
+ * @type string
142
+ * @default 'htmx-swapping'
143
+ */
144
+ swappingClass: "htmx-swapping",
145
+ /**
146
+ * Allows the use of eval-like functionality in htmx, to enable **hx-vars**, trigger conditions & script tag evaluation. Can be set to **false** for CSP compatibility.
147
+ * @type boolean
148
+ * @default true
149
+ */
150
+ allowEval: !0,
151
+ /**
152
+ * If set to false, disables the interpretation of script tags.
153
+ * @type boolean
154
+ * @default true
155
+ */
156
+ allowScriptTags: !0,
157
+ /**
158
+ * If set, the nonce will be added to inline scripts.
159
+ * @type string
160
+ * @default ''
161
+ */
162
+ inlineScriptNonce: "",
163
+ /**
164
+ * If set, the nonce will be added to inline styles.
165
+ * @type string
166
+ * @default ''
167
+ */
168
+ inlineStyleNonce: "",
169
+ /**
170
+ * The attributes to settle during the settling phase.
171
+ * @type string[]
172
+ * @default ['class', 'style', 'width', 'height']
173
+ */
174
+ attributesToSettle: ["class", "style", "width", "height"],
175
+ /**
176
+ * Allow cross-site Access-Control requests using credentials such as cookies, authorization headers or TLS client certificates.
177
+ * @type boolean
178
+ * @default false
179
+ */
180
+ withCredentials: !1,
181
+ /**
182
+ * @type number
183
+ * @default 0
184
+ */
185
+ timeout: 0,
186
+ /**
187
+ * The default implementation of **getWebSocketReconnectDelay** for reconnecting after unexpected connection loss by the event code **Abnormal Closure**, **Service Restart** or **Try Again Later**.
188
+ * @type {'full-jitter' | ((retryCount:number) => number)}
189
+ * @default "full-jitter"
190
+ */
191
+ wsReconnectDelay: "full-jitter",
192
+ /**
193
+ * The type of binary data being received over the WebSocket connection
194
+ * @type BinaryType
195
+ * @default 'blob'
196
+ */
197
+ wsBinaryType: "blob",
198
+ /**
199
+ * @type string
200
+ * @default '[hx-disable], [data-hx-disable]'
201
+ */
202
+ disableSelector: "[hx-disable], [data-hx-disable]",
203
+ /**
204
+ * @type {'auto' | 'instant' | 'smooth'}
205
+ * @default 'instant'
206
+ */
207
+ scrollBehavior: "instant",
208
+ /**
209
+ * If the focused element should be scrolled into view.
210
+ * @type boolean
211
+ * @default false
212
+ */
213
+ defaultFocusScroll: !1,
214
+ /**
215
+ * If set to true htmx will include a cache-busting parameter in GET requests to avoid caching partial responses by the browser
216
+ * @type boolean
217
+ * @default false
218
+ */
219
+ getCacheBusterParam: !1,
220
+ /**
221
+ * If set to true, htmx will use the View Transition API when swapping in new content.
222
+ * @type boolean
223
+ * @default false
224
+ */
225
+ globalViewTransitions: !1,
226
+ /**
227
+ * htmx will format requests with these methods by encoding their parameters in the URL, not the request body
228
+ * @type {(HttpVerb)[]}
229
+ * @default ['get', 'delete']
230
+ */
231
+ methodsThatUseUrlParams: ["get", "delete"],
232
+ /**
233
+ * If set to true, disables htmx-based requests to non-origin hosts.
234
+ * @type boolean
235
+ * @default false
236
+ */
237
+ selfRequestsOnly: !0,
238
+ /**
239
+ * If set to true htmx will not update the title of the document when a title tag is found in new content
240
+ * @type boolean
241
+ * @default false
242
+ */
243
+ ignoreTitle: !1,
244
+ /**
245
+ * Whether the target of a boosted element is scrolled into the viewport.
246
+ * @type boolean
247
+ * @default true
248
+ */
249
+ scrollIntoViewOnBoost: !0,
250
+ /**
251
+ * The cache to store evaluated trigger specifications into.
252
+ * You may define a simple object to use a never-clearing cache, or implement your own system using a [proxy object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Proxy)
253
+ * @type {Object|null}
254
+ * @default null
255
+ */
256
+ triggerSpecsCache: null,
257
+ /** @type boolean */
258
+ disableInheritance: !1,
259
+ /** @type HtmxResponseHandlingConfig[] */
260
+ responseHandling: [
261
+ { code: "204", swap: !1 },
262
+ { code: "[23]..", swap: !0 },
263
+ { code: "[45]..", swap: !1, error: !0 }
264
+ ],
265
+ /**
266
+ * Whether to process OOB swaps on elements that are nested within the main response element.
267
+ * @type boolean
268
+ * @default true
269
+ */
270
+ allowNestedOobSwaps: !0,
271
+ /**
272
+ * Whether to treat history cache miss full page reload requests as a "HX-Request" by returning this response header
273
+ * This should always be disabled when using HX-Request header to optionally return partial responses
274
+ * @type boolean
275
+ * @default true
276
+ */
277
+ historyRestoreAsHxRequest: !0
278
+ },
279
+ /** @type {typeof parseInterval} */
280
+ parseInterval: null,
281
+ /**
282
+ * proxy of window.location used for page reload functions
283
+ * @type location
284
+ */
285
+ location,
286
+ /** @type {typeof internalEval} */
287
+ _: null,
288
+ version: "2.0.6"
289
+ };
290
+ htmx.onLoad = onLoadHelper, htmx.process = processNode, htmx.on = addEventListenerImpl, htmx.off = removeEventListenerImpl, htmx.trigger = triggerEvent, htmx.ajax = ajaxHelper, htmx.find = find, htmx.findAll = findAll, htmx.closest = closest, htmx.remove = removeElement, htmx.addClass = addClassToElement, htmx.removeClass = removeClassFromElement, htmx.toggleClass = toggleClassOnElement, htmx.takeClass = takeClassForElement, htmx.swap = swap, htmx.defineExtension = defineExtension, htmx.removeExtension = removeExtension, htmx.logAll = logAll, htmx.logNone = logNone, htmx.parseInterval = parseInterval, htmx._ = internalEval;
291
+ const internalAPI = {
292
+ addTriggerHandler,
293
+ bodyContains,
294
+ canAccessLocalStorage,
295
+ findThisElement,
296
+ filterValues,
297
+ swap,
298
+ hasAttribute,
299
+ getAttributeValue,
300
+ getClosestAttributeValue,
301
+ getClosestMatch,
302
+ getExpressionVars,
303
+ getHeaders,
304
+ getInputValues,
305
+ getInternalData,
306
+ getSwapSpecification,
307
+ getTriggerSpecs,
308
+ getTarget,
309
+ makeFragment,
310
+ mergeObjects,
311
+ makeSettleInfo,
312
+ oobSwap,
313
+ querySelectorExt,
314
+ settleImmediately,
315
+ shouldCancel,
316
+ triggerEvent,
317
+ triggerErrorEvent,
318
+ withExtensions
319
+ }, VERBS = ["get", "post", "put", "delete", "patch"], VERB_SELECTOR = VERBS.map(function(e) {
320
+ return "[hx-" + e + "], [data-hx-" + e + "]";
321
+ }).join(", ");
322
+ function parseInterval(e) {
323
+ if (e == null)
324
+ return;
325
+ let t = NaN;
326
+ return e.slice(-2) == "ms" ? t = parseFloat(e.slice(0, -2)) : e.slice(-1) == "s" ? t = parseFloat(e.slice(0, -1)) * 1e3 : e.slice(-1) == "m" ? t = parseFloat(e.slice(0, -1)) * 1e3 * 60 : t = parseFloat(e), isNaN(t) ? void 0 : t;
327
+ }
328
+ function getRawAttribute(e, t) {
329
+ return e instanceof Element && e.getAttribute(t);
330
+ }
331
+ function hasAttribute(e, t) {
332
+ return !!e.hasAttribute && (e.hasAttribute(t) || e.hasAttribute("data-" + t));
333
+ }
334
+ function getAttributeValue(e, t) {
335
+ return getRawAttribute(e, t) || getRawAttribute(e, "data-" + t);
336
+ }
337
+ function parentElt(e) {
338
+ const t = e.parentElement;
339
+ return !t && e.parentNode instanceof ShadowRoot ? e.parentNode : t;
340
+ }
341
+ function getDocument() {
342
+ return document;
343
+ }
344
+ function getRootNode(e, t) {
345
+ return e.getRootNode ? e.getRootNode({ composed: t }) : getDocument();
346
+ }
347
+ function getClosestMatch(e, t) {
348
+ for (; e && !t(e); )
349
+ e = parentElt(e);
350
+ return e || null;
351
+ }
352
+ function getAttributeValueWithDisinheritance(e, t, n) {
353
+ const r = getAttributeValue(t, n), o = getAttributeValue(t, "hx-disinherit");
354
+ var i = getAttributeValue(t, "hx-inherit");
355
+ if (e !== t) {
356
+ if (htmx.config.disableInheritance)
357
+ return i && (i === "*" || i.split(" ").indexOf(n) >= 0) ? r : null;
358
+ if (o && (o === "*" || o.split(" ").indexOf(n) >= 0))
359
+ return "unset";
360
+ }
361
+ return r;
362
+ }
363
+ function getClosestAttributeValue(e, t) {
364
+ let n = null;
365
+ if (getClosestMatch(e, function(r) {
366
+ return !!(n = getAttributeValueWithDisinheritance(e, asElement(r), t));
367
+ }), n !== "unset")
368
+ return n;
369
+ }
370
+ function matches(e, t) {
371
+ return e instanceof Element && e.matches(t);
372
+ }
373
+ function getStartTag(e) {
374
+ const n = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(e);
375
+ return n ? n[1].toLowerCase() : "";
376
+ }
377
+ function parseHTML(e) {
378
+ return new DOMParser().parseFromString(e, "text/html");
379
+ }
380
+ function takeChildrenFor(e, t) {
381
+ for (; t.childNodes.length > 0; )
382
+ e.append(t.childNodes[0]);
383
+ }
384
+ function duplicateScript(e) {
385
+ const t = getDocument().createElement("script");
386
+ return forEach(e.attributes, function(n) {
387
+ t.setAttribute(n.name, n.value);
388
+ }), t.textContent = e.textContent, t.async = !1, htmx.config.inlineScriptNonce && (t.nonce = htmx.config.inlineScriptNonce), t;
389
+ }
390
+ function isJavaScriptScriptNode(e) {
391
+ return e.matches("script") && (e.type === "text/javascript" || e.type === "module" || e.type === "");
392
+ }
393
+ function normalizeScriptTags(e) {
394
+ Array.from(e.querySelectorAll("script")).forEach(
395
+ /** @param {HTMLScriptElement} script */
396
+ (t) => {
397
+ if (isJavaScriptScriptNode(t)) {
398
+ const n = duplicateScript(t), r = t.parentNode;
399
+ try {
400
+ r.insertBefore(n, t);
401
+ } catch (o) {
402
+ logError(o);
403
+ } finally {
404
+ t.remove();
405
+ }
406
+ }
407
+ }
408
+ );
409
+ }
410
+ function makeFragment(e) {
411
+ const t = e.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i, ""), n = getStartTag(t);
412
+ let r;
413
+ if (n === "html") {
414
+ r = /** @type DocumentFragmentWithTitle */
415
+ new DocumentFragment();
416
+ const i = parseHTML(e);
417
+ takeChildrenFor(r, i.body), r.title = i.title;
418
+ } else if (n === "body") {
419
+ r = /** @type DocumentFragmentWithTitle */
420
+ new DocumentFragment();
421
+ const i = parseHTML(t);
422
+ takeChildrenFor(r, i.body), r.title = i.title;
423
+ } else {
424
+ const i = parseHTML('<body><template class="internal-htmx-wrapper">' + t + "</template></body>");
425
+ r = /** @type DocumentFragmentWithTitle */
426
+ i.querySelector("template").content, r.title = i.title;
427
+ var o = r.querySelector("title");
428
+ o && o.parentNode === r && (o.remove(), r.title = o.innerText);
429
+ }
430
+ return r && (htmx.config.allowScriptTags ? normalizeScriptTags(r) : r.querySelectorAll("script").forEach((i) => i.remove())), r;
431
+ }
432
+ function maybeCall(e) {
433
+ e && e();
434
+ }
435
+ function isType(e, t) {
436
+ return Object.prototype.toString.call(e) === "[object " + t + "]";
437
+ }
438
+ function isFunction(e) {
439
+ return typeof e == "function";
440
+ }
441
+ function isRawObject(e) {
442
+ return isType(e, "Object");
443
+ }
444
+ function getInternalData(e) {
445
+ const t = "htmx-internal-data";
446
+ let n = e[t];
447
+ return n || (n = e[t] = {}), n;
448
+ }
449
+ function toArray(e) {
450
+ const t = [];
451
+ if (e)
452
+ for (let n = 0; n < e.length; n++)
453
+ t.push(e[n]);
454
+ return t;
455
+ }
456
+ function forEach(e, t) {
457
+ if (e)
458
+ for (let n = 0; n < e.length; n++)
459
+ t(e[n]);
460
+ }
461
+ function isScrolledIntoView(e) {
462
+ const t = e.getBoundingClientRect(), n = t.top, r = t.bottom;
463
+ return n < window.innerHeight && r >= 0;
464
+ }
465
+ function bodyContains(e) {
466
+ return e.getRootNode({ composed: !0 }) === document;
467
+ }
468
+ function splitOnWhitespace(e) {
469
+ return e.trim().split(/\s+/);
470
+ }
471
+ function mergeObjects(e, t) {
472
+ for (const n in t)
473
+ t.hasOwnProperty(n) && (e[n] = t[n]);
474
+ return e;
475
+ }
476
+ function parseJSON(e) {
477
+ try {
478
+ return JSON.parse(e);
479
+ } catch (t) {
480
+ return logError(t), null;
481
+ }
482
+ }
483
+ function canAccessLocalStorage() {
484
+ const e = "htmx:sessionStorageTest";
485
+ try {
486
+ return sessionStorage.setItem(e, e), sessionStorage.removeItem(e), !0;
487
+ } catch {
488
+ return !1;
489
+ }
490
+ }
491
+ function normalizePath(e) {
492
+ const t = new URL(e, "http://x");
493
+ return t && (e = t.pathname + t.search), e != "/" && (e = e.replace(/\/+$/, "")), e;
494
+ }
495
+ function internalEval(str) {
496
+ return maybeEval(getDocument().body, function() {
497
+ return eval(str);
498
+ });
499
+ }
500
+ function onLoadHelper(e) {
501
+ return htmx.on(
502
+ "htmx:load",
503
+ /** @param {CustomEvent} evt */
504
+ function(n) {
505
+ e(n.detail.elt);
506
+ }
507
+ );
508
+ }
509
+ function logAll() {
510
+ htmx.logger = function(e, t, n) {
511
+ console && console.log(t, e, n);
512
+ };
513
+ }
514
+ function logNone() {
515
+ htmx.logger = null;
516
+ }
517
+ function find(e, t) {
518
+ return typeof e != "string" ? e.querySelector(t) : find(getDocument(), e);
519
+ }
520
+ function findAll(e, t) {
521
+ return typeof e != "string" ? e.querySelectorAll(t) : findAll(getDocument(), e);
522
+ }
523
+ function getWindow() {
524
+ return window;
525
+ }
526
+ function removeElement(e, t) {
527
+ e = resolveTarget(e), t ? getWindow().setTimeout(function() {
528
+ removeElement(e), e = null;
529
+ }, t) : parentElt(e).removeChild(e);
530
+ }
531
+ function asElement(e) {
532
+ return e instanceof Element ? e : null;
533
+ }
534
+ function asHtmlElement(e) {
535
+ return e instanceof HTMLElement ? e : null;
536
+ }
537
+ function asString(e) {
538
+ return typeof e == "string" ? e : null;
539
+ }
540
+ function asParentNode(e) {
541
+ return e instanceof Element || e instanceof Document || e instanceof DocumentFragment ? e : null;
542
+ }
543
+ function addClassToElement(e, t, n) {
544
+ e = asElement(resolveTarget(e)), e && (n ? getWindow().setTimeout(function() {
545
+ addClassToElement(e, t), e = null;
546
+ }, n) : e.classList && e.classList.add(t));
547
+ }
548
+ function removeClassFromElement(e, t, n) {
549
+ let r = asElement(resolveTarget(e));
550
+ r && (n ? getWindow().setTimeout(function() {
551
+ removeClassFromElement(r, t), r = null;
552
+ }, n) : r.classList && (r.classList.remove(t), r.classList.length === 0 && r.removeAttribute("class")));
553
+ }
554
+ function toggleClassOnElement(e, t) {
555
+ e = resolveTarget(e), e.classList.toggle(t);
556
+ }
557
+ function takeClassForElement(e, t) {
558
+ e = resolveTarget(e), forEach(e.parentElement.children, function(n) {
559
+ removeClassFromElement(n, t);
560
+ }), addClassToElement(asElement(e), t);
561
+ }
562
+ function closest(e, t) {
563
+ return e = asElement(resolveTarget(e)), e ? e.closest(t) : null;
564
+ }
565
+ function startsWith(e, t) {
566
+ return e.substring(0, t.length) === t;
567
+ }
568
+ function endsWith(e, t) {
569
+ return e.substring(e.length - t.length) === t;
570
+ }
571
+ function normalizeSelector(e) {
572
+ const t = e.trim();
573
+ return startsWith(t, "<") && endsWith(t, "/>") ? t.substring(1, t.length - 2) : t;
574
+ }
575
+ function querySelectorAllExt(e, t, n) {
576
+ if (t.indexOf("global ") === 0)
577
+ return querySelectorAllExt(e, t.slice(7), !0);
578
+ e = resolveTarget(e);
579
+ const r = [];
580
+ {
581
+ let s = 0, l = 0;
582
+ for (let a = 0; a < t.length; a++) {
583
+ const u = t[a];
584
+ if (u === "," && s === 0) {
585
+ r.push(t.substring(l, a)), l = a + 1;
586
+ continue;
587
+ }
588
+ u === "<" ? s++ : u === "/" && a < t.length - 1 && t[a + 1] === ">" && s--;
589
+ }
590
+ l < t.length && r.push(t.substring(l));
591
+ }
592
+ const o = [], i = [];
593
+ for (; r.length > 0; ) {
594
+ const s = normalizeSelector(r.shift());
595
+ let l;
596
+ s.indexOf("closest ") === 0 ? l = closest(asElement(e), normalizeSelector(s.slice(8))) : s.indexOf("find ") === 0 ? l = find(asParentNode(e), normalizeSelector(s.slice(5))) : s === "next" || s === "nextElementSibling" ? l = asElement(e).nextElementSibling : s.indexOf("next ") === 0 ? l = scanForwardQuery(e, normalizeSelector(s.slice(5)), !!n) : s === "previous" || s === "previousElementSibling" ? l = asElement(e).previousElementSibling : s.indexOf("previous ") === 0 ? l = scanBackwardsQuery(e, normalizeSelector(s.slice(9)), !!n) : s === "document" ? l = document : s === "window" ? l = window : s === "body" ? l = document.body : s === "root" ? l = getRootNode(e, !!n) : s === "host" ? l = /** @type ShadowRoot */
597
+ e.getRootNode().host : i.push(s), l && o.push(l);
598
+ }
599
+ if (i.length > 0) {
600
+ const s = i.join(","), l = asParentNode(getRootNode(e, !!n));
601
+ o.push(...toArray(l.querySelectorAll(s)));
602
+ }
603
+ return o;
604
+ }
605
+ var scanForwardQuery = function(e, t, n) {
606
+ const r = asParentNode(getRootNode(e, n)).querySelectorAll(t);
607
+ for (let o = 0; o < r.length; o++) {
608
+ const i = r[o];
609
+ if (i.compareDocumentPosition(e) === Node.DOCUMENT_POSITION_PRECEDING)
610
+ return i;
611
+ }
612
+ }, scanBackwardsQuery = function(e, t, n) {
613
+ const r = asParentNode(getRootNode(e, n)).querySelectorAll(t);
614
+ for (let o = r.length - 1; o >= 0; o--) {
615
+ const i = r[o];
616
+ if (i.compareDocumentPosition(e) === Node.DOCUMENT_POSITION_FOLLOWING)
617
+ return i;
618
+ }
619
+ };
620
+ function querySelectorExt(e, t) {
621
+ return typeof e != "string" ? querySelectorAllExt(e, t)[0] : querySelectorAllExt(getDocument().body, e)[0];
622
+ }
623
+ function resolveTarget(e, t) {
624
+ return typeof e == "string" ? find(asParentNode(t) || document, e) : e;
625
+ }
626
+ function processEventArgs(e, t, n, r) {
627
+ return isFunction(t) ? {
628
+ target: getDocument().body,
629
+ event: asString(e),
630
+ listener: t,
631
+ options: n
632
+ } : {
633
+ target: resolveTarget(e),
634
+ event: asString(t),
635
+ listener: n,
636
+ options: r
637
+ };
638
+ }
639
+ function addEventListenerImpl(e, t, n, r) {
640
+ return ready(function() {
641
+ const i = processEventArgs(e, t, n, r);
642
+ i.target.addEventListener(i.event, i.listener, i.options);
643
+ }), isFunction(t) ? t : n;
644
+ }
645
+ function removeEventListenerImpl(e, t, n) {
646
+ return ready(function() {
647
+ const r = processEventArgs(e, t, n);
648
+ r.target.removeEventListener(r.event, r.listener);
649
+ }), isFunction(t) ? t : n;
650
+ }
651
+ const DUMMY_ELT = getDocument().createElement("output");
652
+ function findAttributeTargets(e, t) {
653
+ const n = getClosestAttributeValue(e, t);
654
+ if (n) {
655
+ if (n === "this")
656
+ return [findThisElement(e, t)];
657
+ {
658
+ const r = querySelectorAllExt(e, n);
659
+ if (/(^|,)(\s*)inherit(\s*)($|,)/.test(n)) {
660
+ const i = asElement(getClosestMatch(e, function(s) {
661
+ return s !== e && hasAttribute(asElement(s), t);
662
+ }));
663
+ i && r.push(...findAttributeTargets(i, t));
664
+ }
665
+ return r.length === 0 ? (logError('The selector "' + n + '" on ' + t + " returned no matches!"), [DUMMY_ELT]) : r;
666
+ }
667
+ }
668
+ }
669
+ function findThisElement(e, t) {
670
+ return asElement(getClosestMatch(e, function(n) {
671
+ return getAttributeValue(asElement(n), t) != null;
672
+ }));
673
+ }
674
+ function getTarget(e) {
675
+ const t = getClosestAttributeValue(e, "hx-target");
676
+ return t ? t === "this" ? findThisElement(e, "hx-target") : querySelectorExt(e, t) : getInternalData(e).boosted ? getDocument().body : e;
677
+ }
678
+ function shouldSettleAttribute(e) {
679
+ return htmx.config.attributesToSettle.includes(e);
680
+ }
681
+ function cloneAttributes(e, t) {
682
+ forEach(e.attributes, function(n) {
683
+ !t.hasAttribute(n.name) && shouldSettleAttribute(n.name) && e.removeAttribute(n.name);
684
+ }), forEach(t.attributes, function(n) {
685
+ shouldSettleAttribute(n.name) && e.setAttribute(n.name, n.value);
686
+ });
687
+ }
688
+ function isInlineSwap(e, t) {
689
+ const n = getExtensions(t);
690
+ for (let r = 0; r < n.length; r++) {
691
+ const o = n[r];
692
+ try {
693
+ if (o.isInlineSwap(e))
694
+ return !0;
695
+ } catch (i) {
696
+ logError(i);
697
+ }
698
+ }
699
+ return e === "outerHTML";
700
+ }
701
+ function oobSwap(e, t, n, r) {
702
+ r = r || getDocument();
703
+ let o = "#" + CSS.escape(getRawAttribute(t, "id")), i = "outerHTML";
704
+ e === "true" || (e.indexOf(":") > 0 ? (i = e.substring(0, e.indexOf(":")), o = e.substring(e.indexOf(":") + 1)) : i = e), t.removeAttribute("hx-swap-oob"), t.removeAttribute("data-hx-swap-oob");
705
+ const s = querySelectorAllExt(r, o, !1);
706
+ return s.length ? (forEach(
707
+ s,
708
+ function(l) {
709
+ let a;
710
+ const u = t.cloneNode(!0);
711
+ a = getDocument().createDocumentFragment(), a.appendChild(u), isInlineSwap(i, l) || (a = asParentNode(u));
712
+ const h = { shouldSwap: !0, target: l, fragment: a };
713
+ triggerEvent(l, "htmx:oobBeforeSwap", h) && (l = h.target, h.shouldSwap && (handlePreservedElements(a), swapWithStyle(i, l, l, a, n), restorePreservedElements()), forEach(n.elts, function(c) {
714
+ triggerEvent(c, "htmx:oobAfterSwap", h);
715
+ }));
716
+ }
717
+ ), t.parentNode.removeChild(t)) : (t.parentNode.removeChild(t), triggerErrorEvent(getDocument().body, "htmx:oobErrorNoTarget", { content: t })), e;
718
+ }
719
+ function restorePreservedElements() {
720
+ const e = find("#--htmx-preserve-pantry--");
721
+ if (e) {
722
+ for (const t of [...e.children]) {
723
+ const n = find("#" + t.id);
724
+ n.parentNode.moveBefore(t, n), n.remove();
725
+ }
726
+ e.remove();
727
+ }
728
+ }
729
+ function handlePreservedElements(e) {
730
+ forEach(findAll(e, "[hx-preserve], [data-hx-preserve]"), function(t) {
731
+ const n = getAttributeValue(t, "id"), r = getDocument().getElementById(n);
732
+ if (r != null)
733
+ if (t.moveBefore) {
734
+ let o = find("#--htmx-preserve-pantry--");
735
+ o == null && (getDocument().body.insertAdjacentHTML("afterend", "<div id='--htmx-preserve-pantry--'></div>"), o = find("#--htmx-preserve-pantry--")), o.moveBefore(r, null);
736
+ } else
737
+ t.parentNode.replaceChild(r, t);
738
+ });
739
+ }
740
+ function handleAttributes(e, t, n) {
741
+ forEach(t.querySelectorAll("[id]"), function(r) {
742
+ const o = getRawAttribute(r, "id");
743
+ if (o && o.length > 0) {
744
+ const i = o.replace("'", "\\'"), s = r.tagName.replace(":", "\\:"), l = asParentNode(e), a = l && l.querySelector(s + "[id='" + i + "']");
745
+ if (a && a !== l) {
746
+ const u = r.cloneNode();
747
+ cloneAttributes(r, a), n.tasks.push(function() {
748
+ cloneAttributes(r, u);
749
+ });
750
+ }
751
+ }
752
+ });
753
+ }
754
+ function makeAjaxLoadTask(e) {
755
+ return function() {
756
+ removeClassFromElement(e, htmx.config.addedClass), processNode(asElement(e)), processFocus(asParentNode(e)), triggerEvent(e, "htmx:load");
757
+ };
758
+ }
759
+ function processFocus(e) {
760
+ const t = "[autofocus]", n = asHtmlElement(matches(e, t) ? e : e.querySelector(t));
761
+ n != null && n.focus();
762
+ }
763
+ function insertNodesBefore(e, t, n, r) {
764
+ for (handleAttributes(e, n, r); n.childNodes.length > 0; ) {
765
+ const o = n.firstChild;
766
+ addClassToElement(asElement(o), htmx.config.addedClass), e.insertBefore(o, t), o.nodeType !== Node.TEXT_NODE && o.nodeType !== Node.COMMENT_NODE && r.tasks.push(makeAjaxLoadTask(o));
767
+ }
768
+ }
769
+ function stringHash(e, t) {
770
+ let n = 0;
771
+ for (; n < e.length; )
772
+ t = (t << 5) - t + e.charCodeAt(n++) | 0;
773
+ return t;
774
+ }
775
+ function attributeHash(e) {
776
+ let t = 0;
777
+ for (let n = 0; n < e.attributes.length; n++) {
778
+ const r = e.attributes[n];
779
+ r.value && (t = stringHash(r.name, t), t = stringHash(r.value, t));
780
+ }
781
+ return t;
782
+ }
783
+ function deInitOnHandlers(e) {
784
+ const t = getInternalData(e);
785
+ if (t.onHandlers) {
786
+ for (let n = 0; n < t.onHandlers.length; n++) {
787
+ const r = t.onHandlers[n];
788
+ removeEventListenerImpl(e, r.event, r.listener);
789
+ }
790
+ delete t.onHandlers;
791
+ }
792
+ }
793
+ function deInitNode(e) {
794
+ const t = getInternalData(e);
795
+ t.timeout && clearTimeout(t.timeout), t.listenerInfos && forEach(t.listenerInfos, function(n) {
796
+ n.on && removeEventListenerImpl(n.on, n.trigger, n.listener);
797
+ }), deInitOnHandlers(e), forEach(Object.keys(t), function(n) {
798
+ n !== "firstInitCompleted" && delete t[n];
799
+ });
800
+ }
801
+ function cleanUpElement(e) {
802
+ triggerEvent(e, "htmx:beforeCleanupElement"), deInitNode(e), forEach(e.children, function(t) {
803
+ cleanUpElement(t);
804
+ });
805
+ }
806
+ function swapOuterHTML(e, t, n) {
807
+ if (e.tagName === "BODY")
808
+ return swapInnerHTML(e, t, n);
809
+ let r;
810
+ const o = e.previousSibling, i = parentElt(e);
811
+ if (i) {
812
+ for (insertNodesBefore(i, e, t, n), o == null ? r = i.firstChild : r = o.nextSibling, n.elts = n.elts.filter(function(s) {
813
+ return s !== e;
814
+ }); r && r !== e; )
815
+ r instanceof Element && n.elts.push(r), r = r.nextSibling;
816
+ cleanUpElement(e), e.remove();
817
+ }
818
+ }
819
+ function swapAfterBegin(e, t, n) {
820
+ return insertNodesBefore(e, e.firstChild, t, n);
821
+ }
822
+ function swapBeforeBegin(e, t, n) {
823
+ return insertNodesBefore(parentElt(e), e, t, n);
824
+ }
825
+ function swapBeforeEnd(e, t, n) {
826
+ return insertNodesBefore(e, null, t, n);
827
+ }
828
+ function swapAfterEnd(e, t, n) {
829
+ return insertNodesBefore(parentElt(e), e.nextSibling, t, n);
830
+ }
831
+ function swapDelete(e) {
832
+ cleanUpElement(e);
833
+ const t = parentElt(e);
834
+ if (t)
835
+ return t.removeChild(e);
836
+ }
837
+ function swapInnerHTML(e, t, n) {
838
+ const r = e.firstChild;
839
+ if (insertNodesBefore(e, r, t, n), r) {
840
+ for (; r.nextSibling; )
841
+ cleanUpElement(r.nextSibling), e.removeChild(r.nextSibling);
842
+ cleanUpElement(r), e.removeChild(r);
843
+ }
844
+ }
845
+ function swapWithStyle(e, t, n, r, o) {
846
+ switch (e) {
847
+ case "none":
848
+ return;
849
+ case "outerHTML":
850
+ swapOuterHTML(n, r, o);
851
+ return;
852
+ case "afterbegin":
853
+ swapAfterBegin(n, r, o);
854
+ return;
855
+ case "beforebegin":
856
+ swapBeforeBegin(n, r, o);
857
+ return;
858
+ case "beforeend":
859
+ swapBeforeEnd(n, r, o);
860
+ return;
861
+ case "afterend":
862
+ swapAfterEnd(n, r, o);
863
+ return;
864
+ case "delete":
865
+ swapDelete(n);
866
+ return;
867
+ default:
868
+ var i = getExtensions(t);
869
+ for (let s = 0; s < i.length; s++) {
870
+ const l = i[s];
871
+ try {
872
+ const a = l.handleSwap(e, n, r, o);
873
+ if (a) {
874
+ if (Array.isArray(a))
875
+ for (let u = 0; u < a.length; u++) {
876
+ const h = a[u];
877
+ h.nodeType !== Node.TEXT_NODE && h.nodeType !== Node.COMMENT_NODE && o.tasks.push(makeAjaxLoadTask(h));
878
+ }
879
+ return;
880
+ }
881
+ } catch (a) {
882
+ logError(a);
883
+ }
884
+ }
885
+ e === "innerHTML" ? swapInnerHTML(n, r, o) : swapWithStyle(htmx.config.defaultSwapStyle, t, n, r, o);
886
+ }
887
+ }
888
+ function findAndSwapOobElements(e, t, n) {
889
+ var r = findAll(e, "[hx-swap-oob], [data-hx-swap-oob]");
890
+ return forEach(r, function(o) {
891
+ if (htmx.config.allowNestedOobSwaps || o.parentElement === null) {
892
+ const i = getAttributeValue(o, "hx-swap-oob");
893
+ i != null && oobSwap(i, o, t, n);
894
+ } else
895
+ o.removeAttribute("hx-swap-oob"), o.removeAttribute("data-hx-swap-oob");
896
+ }), r.length > 0;
897
+ }
898
+ function swap(e, t, n, r) {
899
+ r || (r = {});
900
+ let o = null, i = null, s = function() {
901
+ maybeCall(r.beforeSwapCallback), e = resolveTarget(e);
902
+ const u = r.contextElement ? getRootNode(r.contextElement, !1) : getDocument(), h = document.activeElement;
903
+ let c = {};
904
+ c = {
905
+ elt: h,
906
+ // @ts-ignore
907
+ start: h ? h.selectionStart : null,
908
+ // @ts-ignore
909
+ end: h ? h.selectionEnd : null
910
+ };
911
+ const f = makeSettleInfo(e);
912
+ if (n.swapStyle === "textContent")
913
+ e.textContent = t;
914
+ else {
915
+ let d = makeFragment(t);
916
+ if (f.title = r.title || d.title, r.historyRequest && (d = d.querySelector("[hx-history-elt],[data-hx-history-elt]") || d), r.selectOOB) {
917
+ const E = r.selectOOB.split(",");
918
+ for (let m = 0; m < E.length; m++) {
919
+ const C = E[m].split(":", 2);
920
+ let w = C[0].trim();
921
+ w.indexOf("#") === 0 && (w = w.substring(1));
922
+ const x = C[1] || "true", p = d.querySelector("#" + w);
923
+ p && oobSwap(x, p, f, u);
924
+ }
925
+ }
926
+ if (findAndSwapOobElements(d, f, u), forEach(
927
+ findAll(d, "template"),
928
+ /** @param {HTMLTemplateElement} template */
929
+ function(E) {
930
+ E.content && findAndSwapOobElements(E.content, f, u) && E.remove();
931
+ }
932
+ ), r.select) {
933
+ const E = getDocument().createDocumentFragment();
934
+ forEach(d.querySelectorAll(r.select), function(m) {
935
+ E.appendChild(m);
936
+ }), d = E;
937
+ }
938
+ handlePreservedElements(d), swapWithStyle(n.swapStyle, r.contextElement, e, d, f), restorePreservedElements();
939
+ }
940
+ if (c.elt && !bodyContains(c.elt) && getRawAttribute(c.elt, "id")) {
941
+ const d = document.getElementById(getRawAttribute(c.elt, "id")), E = { preventScroll: n.focusScroll !== void 0 ? !n.focusScroll : !htmx.config.defaultFocusScroll };
942
+ if (d) {
943
+ if (c.start && d.setSelectionRange)
944
+ try {
945
+ d.setSelectionRange(c.start, c.end);
946
+ } catch {
947
+ }
948
+ d.focus(E);
949
+ }
950
+ }
951
+ e.classList.remove(htmx.config.swappingClass), forEach(f.elts, function(d) {
952
+ d.classList && d.classList.add(htmx.config.settlingClass), triggerEvent(d, "htmx:afterSwap", r.eventInfo);
953
+ }), maybeCall(r.afterSwapCallback), n.ignoreTitle || handleTitle(f.title);
954
+ const y = function() {
955
+ if (forEach(f.tasks, function(d) {
956
+ d.call();
957
+ }), forEach(f.elts, function(d) {
958
+ d.classList && d.classList.remove(htmx.config.settlingClass), triggerEvent(d, "htmx:afterSettle", r.eventInfo);
959
+ }), r.anchor) {
960
+ const d = asElement(resolveTarget("#" + r.anchor));
961
+ d && d.scrollIntoView({ block: "start", behavior: "auto" });
962
+ }
963
+ updateScrollState(f.elts, n), maybeCall(r.afterSettleCallback), maybeCall(o);
964
+ };
965
+ n.settleDelay > 0 ? getWindow().setTimeout(y, n.settleDelay) : y();
966
+ }, l = htmx.config.globalViewTransitions;
967
+ n.hasOwnProperty("transition") && (l = n.transition);
968
+ const a = r.contextElement || getDocument();
969
+ if (l && triggerEvent(a, "htmx:beforeTransition", r.eventInfo) && typeof Promise < "u" && // @ts-ignore experimental feature atm
970
+ document.startViewTransition) {
971
+ const u = new Promise(function(c, f) {
972
+ o = c, i = f;
973
+ }), h = s;
974
+ s = function() {
975
+ document.startViewTransition(function() {
976
+ return h(), u;
977
+ });
978
+ };
979
+ }
980
+ try {
981
+ n != null && n.swapDelay && n.swapDelay > 0 ? getWindow().setTimeout(s, n.swapDelay) : s();
982
+ } catch (u) {
983
+ throw triggerErrorEvent(a, "htmx:swapError", r.eventInfo), maybeCall(i), u;
984
+ }
985
+ }
986
+ function handleTriggerHeader(e, t, n) {
987
+ const r = e.getResponseHeader(t);
988
+ if (r.indexOf("{") === 0) {
989
+ const o = parseJSON(r);
990
+ for (const i in o)
991
+ if (o.hasOwnProperty(i)) {
992
+ let s = o[i];
993
+ isRawObject(s) ? n = s.target !== void 0 ? s.target : n : s = { value: s }, triggerEvent(n, i, s);
994
+ }
995
+ } else {
996
+ const o = r.split(",");
997
+ for (let i = 0; i < o.length; i++)
998
+ triggerEvent(n, o[i].trim(), []);
999
+ }
1000
+ }
1001
+ const WHITESPACE_OR_COMMA = /[\s,]/, SYMBOL_START = /[_$a-zA-Z]/, SYMBOL_CONT = /[_$a-zA-Z0-9]/, STRINGISH_START = ['"', "'", "/"], NOT_WHITESPACE = /[^\s]/, COMBINED_SELECTOR_START = /[{(]/, COMBINED_SELECTOR_END = /[})]/;
1002
+ function tokenizeString(e) {
1003
+ const t = [];
1004
+ let n = 0;
1005
+ for (; n < e.length; ) {
1006
+ if (SYMBOL_START.exec(e.charAt(n))) {
1007
+ for (var r = n; SYMBOL_CONT.exec(e.charAt(n + 1)); )
1008
+ n++;
1009
+ t.push(e.substring(r, n + 1));
1010
+ } else if (STRINGISH_START.indexOf(e.charAt(n)) !== -1) {
1011
+ const o = e.charAt(n);
1012
+ var r = n;
1013
+ for (n++; n < e.length && e.charAt(n) !== o; )
1014
+ e.charAt(n) === "\\" && n++, n++;
1015
+ t.push(e.substring(r, n + 1));
1016
+ } else {
1017
+ const o = e.charAt(n);
1018
+ t.push(o);
1019
+ }
1020
+ n++;
1021
+ }
1022
+ return t;
1023
+ }
1024
+ function isPossibleRelativeReference(e, t, n) {
1025
+ return SYMBOL_START.exec(e.charAt(0)) && e !== "true" && e !== "false" && e !== "this" && e !== n && t !== ".";
1026
+ }
1027
+ function maybeGenerateConditional(e, t, n) {
1028
+ if (t[0] === "[") {
1029
+ t.shift();
1030
+ let r = 1, o = " return (function(" + n + "){ return (", i = null;
1031
+ for (; t.length > 0; ) {
1032
+ const s = t[0];
1033
+ if (s === "]") {
1034
+ if (r--, r === 0) {
1035
+ i === null && (o = o + "true"), t.shift(), o += ")})";
1036
+ try {
1037
+ const l = maybeEval(
1038
+ e,
1039
+ function() {
1040
+ return Function(o)();
1041
+ },
1042
+ function() {
1043
+ return !0;
1044
+ }
1045
+ );
1046
+ return l.source = o, l;
1047
+ } catch (l) {
1048
+ return triggerErrorEvent(getDocument().body, "htmx:syntax:error", { error: l, source: o }), null;
1049
+ }
1050
+ }
1051
+ } else s === "[" && r++;
1052
+ isPossibleRelativeReference(s, i, n) ? o += "((" + n + "." + s + ") ? (" + n + "." + s + ") : (window." + s + "))" : o = o + s, i = t.shift();
1053
+ }
1054
+ }
1055
+ }
1056
+ function consumeUntil(e, t) {
1057
+ let n = "";
1058
+ for (; e.length > 0 && !t.test(e[0]); )
1059
+ n += e.shift();
1060
+ return n;
1061
+ }
1062
+ function consumeCSSSelector(e) {
1063
+ let t;
1064
+ return e.length > 0 && COMBINED_SELECTOR_START.test(e[0]) ? (e.shift(), t = consumeUntil(e, COMBINED_SELECTOR_END).trim(), e.shift()) : t = consumeUntil(e, WHITESPACE_OR_COMMA), t;
1065
+ }
1066
+ const INPUT_SELECTOR = "input, textarea, select";
1067
+ function parseAndCacheTrigger(e, t, n) {
1068
+ const r = [], o = tokenizeString(t);
1069
+ do {
1070
+ consumeUntil(o, NOT_WHITESPACE);
1071
+ const l = o.length, a = consumeUntil(o, /[,\[\s]/);
1072
+ if (a !== "")
1073
+ if (a === "every") {
1074
+ const u = { trigger: "every" };
1075
+ consumeUntil(o, NOT_WHITESPACE), u.pollInterval = parseInterval(consumeUntil(o, /[,\[\s]/)), consumeUntil(o, NOT_WHITESPACE);
1076
+ var i = maybeGenerateConditional(e, o, "event");
1077
+ i && (u.eventFilter = i), r.push(u);
1078
+ } else {
1079
+ const u = { trigger: a };
1080
+ var i = maybeGenerateConditional(e, o, "event");
1081
+ for (i && (u.eventFilter = i), consumeUntil(o, NOT_WHITESPACE); o.length > 0 && o[0] !== ","; ) {
1082
+ const c = o.shift();
1083
+ if (c === "changed")
1084
+ u.changed = !0;
1085
+ else if (c === "once")
1086
+ u.once = !0;
1087
+ else if (c === "consume")
1088
+ u.consume = !0;
1089
+ else if (c === "delay" && o[0] === ":")
1090
+ o.shift(), u.delay = parseInterval(consumeUntil(o, WHITESPACE_OR_COMMA));
1091
+ else if (c === "from" && o[0] === ":") {
1092
+ if (o.shift(), COMBINED_SELECTOR_START.test(o[0]))
1093
+ var s = consumeCSSSelector(o);
1094
+ else {
1095
+ var s = consumeUntil(o, WHITESPACE_OR_COMMA);
1096
+ if (s === "closest" || s === "find" || s === "next" || s === "previous") {
1097
+ o.shift();
1098
+ const y = consumeCSSSelector(o);
1099
+ y.length > 0 && (s += " " + y);
1100
+ }
1101
+ }
1102
+ u.from = s;
1103
+ } else c === "target" && o[0] === ":" ? (o.shift(), u.target = consumeCSSSelector(o)) : c === "throttle" && o[0] === ":" ? (o.shift(), u.throttle = parseInterval(consumeUntil(o, WHITESPACE_OR_COMMA))) : c === "queue" && o[0] === ":" ? (o.shift(), u.queue = consumeUntil(o, WHITESPACE_OR_COMMA)) : c === "root" && o[0] === ":" ? (o.shift(), u[c] = consumeCSSSelector(o)) : c === "threshold" && o[0] === ":" ? (o.shift(), u[c] = consumeUntil(o, WHITESPACE_OR_COMMA)) : triggerErrorEvent(e, "htmx:syntax:error", { token: o.shift() });
1104
+ consumeUntil(o, NOT_WHITESPACE);
1105
+ }
1106
+ r.push(u);
1107
+ }
1108
+ o.length === l && triggerErrorEvent(e, "htmx:syntax:error", { token: o.shift() }), consumeUntil(o, NOT_WHITESPACE);
1109
+ } while (o[0] === "," && o.shift());
1110
+ return n && (n[t] = r), r;
1111
+ }
1112
+ function getTriggerSpecs(e) {
1113
+ const t = getAttributeValue(e, "hx-trigger");
1114
+ let n = [];
1115
+ if (t) {
1116
+ const r = htmx.config.triggerSpecsCache;
1117
+ n = r && r[t] || parseAndCacheTrigger(e, t, r);
1118
+ }
1119
+ return n.length > 0 ? n : matches(e, "form") ? [{ trigger: "submit" }] : matches(e, 'input[type="button"], input[type="submit"]') ? [{ trigger: "click" }] : matches(e, INPUT_SELECTOR) ? [{ trigger: "change" }] : [{ trigger: "click" }];
1120
+ }
1121
+ function cancelPolling(e) {
1122
+ getInternalData(e).cancelled = !0;
1123
+ }
1124
+ function processPolling(e, t, n) {
1125
+ const r = getInternalData(e);
1126
+ r.timeout = getWindow().setTimeout(function() {
1127
+ bodyContains(e) && r.cancelled !== !0 && (maybeFilterEvent(n, e, makeEvent("hx:poll:trigger", {
1128
+ triggerSpec: n,
1129
+ target: e
1130
+ })) || t(e), processPolling(e, t, n));
1131
+ }, n.pollInterval);
1132
+ }
1133
+ function isLocalLink(e) {
1134
+ return location.hostname === e.hostname && getRawAttribute(e, "href") && getRawAttribute(e, "href").indexOf("#") !== 0;
1135
+ }
1136
+ function eltIsDisabled(e) {
1137
+ return closest(e, htmx.config.disableSelector);
1138
+ }
1139
+ function boostElement(e, t, n) {
1140
+ if (e instanceof HTMLAnchorElement && isLocalLink(e) && (e.target === "" || e.target === "_self") || e.tagName === "FORM" && String(getRawAttribute(e, "method")).toLowerCase() !== "dialog") {
1141
+ t.boosted = !0;
1142
+ let r, o;
1143
+ if (e.tagName === "A")
1144
+ r = /** @type HttpVerb */
1145
+ "get", o = getRawAttribute(e, "href");
1146
+ else {
1147
+ const i = getRawAttribute(e, "method");
1148
+ r = /** @type HttpVerb */
1149
+ i ? i.toLowerCase() : "get", o = getRawAttribute(e, "action"), (o == null || o === "") && (o = location.href), r === "get" && o.includes("?") && (o = o.replace(/\?[^#]+/, ""));
1150
+ }
1151
+ n.forEach(function(i) {
1152
+ addEventListener(e, function(s, l) {
1153
+ const a = asElement(s);
1154
+ if (eltIsDisabled(a)) {
1155
+ cleanUpElement(a);
1156
+ return;
1157
+ }
1158
+ issueAjaxRequest(r, o, a, l);
1159
+ }, t, i, !0);
1160
+ });
1161
+ }
1162
+ }
1163
+ function shouldCancel(e, t) {
1164
+ return !!((e.type === "submit" || e.type === "click") && (t = asElement(e.target) || t, t.tagName === "FORM" || t.form && t.type === "submit" || (t = t.closest("a"), t && t.href && (t.getAttribute("href") === "#" || t.getAttribute("href").indexOf("#") !== 0))));
1165
+ }
1166
+ function ignoreBoostedAnchorCtrlClick(e, t) {
1167
+ return getInternalData(e).boosted && e instanceof HTMLAnchorElement && t.type === "click" && // @ts-ignore this will resolve to undefined for events that don't define those properties, which is fine
1168
+ (t.ctrlKey || t.metaKey);
1169
+ }
1170
+ function maybeFilterEvent(e, t, n) {
1171
+ const r = e.eventFilter;
1172
+ if (r)
1173
+ try {
1174
+ return r.call(t, n) !== !0;
1175
+ } catch (o) {
1176
+ const i = r.source;
1177
+ return triggerErrorEvent(getDocument().body, "htmx:eventFilter:error", { error: o, source: i }), !0;
1178
+ }
1179
+ return !1;
1180
+ }
1181
+ function addEventListener(e, t, n, r, o) {
1182
+ const i = getInternalData(e);
1183
+ let s;
1184
+ r.from ? s = querySelectorAllExt(e, r.from) : s = [e], r.changed && ("lastValue" in i || (i.lastValue = /* @__PURE__ */ new WeakMap()), s.forEach(function(l) {
1185
+ i.lastValue.has(r) || i.lastValue.set(r, /* @__PURE__ */ new WeakMap()), i.lastValue.get(r).set(l, l.value);
1186
+ })), forEach(s, function(l) {
1187
+ const a = function(u) {
1188
+ if (!bodyContains(e)) {
1189
+ l.removeEventListener(r.trigger, a);
1190
+ return;
1191
+ }
1192
+ if (ignoreBoostedAnchorCtrlClick(e, u) || ((o || shouldCancel(u, e)) && u.preventDefault(), maybeFilterEvent(r, e, u)))
1193
+ return;
1194
+ const h = getInternalData(u);
1195
+ if (h.triggerSpec = r, h.handledFor == null && (h.handledFor = []), h.handledFor.indexOf(e) < 0) {
1196
+ if (h.handledFor.push(e), r.consume && u.stopPropagation(), r.target && u.target && !matches(asElement(u.target), r.target))
1197
+ return;
1198
+ if (r.once) {
1199
+ if (i.triggeredOnce)
1200
+ return;
1201
+ i.triggeredOnce = !0;
1202
+ }
1203
+ if (r.changed) {
1204
+ const c = u.target, f = c.value, y = i.lastValue.get(r);
1205
+ if (y.has(c) && y.get(c) === f)
1206
+ return;
1207
+ y.set(c, f);
1208
+ }
1209
+ if (i.delayed && clearTimeout(i.delayed), i.throttle)
1210
+ return;
1211
+ r.throttle > 0 ? i.throttle || (triggerEvent(e, "htmx:trigger"), t(e, u), i.throttle = getWindow().setTimeout(function() {
1212
+ i.throttle = null;
1213
+ }, r.throttle)) : r.delay > 0 ? i.delayed = getWindow().setTimeout(function() {
1214
+ triggerEvent(e, "htmx:trigger"), t(e, u);
1215
+ }, r.delay) : (triggerEvent(e, "htmx:trigger"), t(e, u));
1216
+ }
1217
+ };
1218
+ n.listenerInfos == null && (n.listenerInfos = []), n.listenerInfos.push({
1219
+ trigger: r.trigger,
1220
+ listener: a,
1221
+ on: l
1222
+ }), l.addEventListener(r.trigger, a);
1223
+ });
1224
+ }
1225
+ let windowIsScrolling = !1, scrollHandler = null;
1226
+ function initScrollHandler() {
1227
+ scrollHandler || (scrollHandler = function() {
1228
+ windowIsScrolling = !0;
1229
+ }, window.addEventListener("scroll", scrollHandler), window.addEventListener("resize", scrollHandler), setInterval(function() {
1230
+ windowIsScrolling && (windowIsScrolling = !1, forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"), function(e) {
1231
+ maybeReveal(e);
1232
+ }));
1233
+ }, 200));
1234
+ }
1235
+ function maybeReveal(e) {
1236
+ !hasAttribute(e, "data-hx-revealed") && isScrolledIntoView(e) && (e.setAttribute("data-hx-revealed", "true"), getInternalData(e).initHash ? triggerEvent(e, "revealed") : e.addEventListener("htmx:afterProcessNode", function() {
1237
+ triggerEvent(e, "revealed");
1238
+ }, { once: !0 }));
1239
+ }
1240
+ function loadImmediately(e, t, n, r) {
1241
+ const o = function() {
1242
+ n.loaded || (n.loaded = !0, triggerEvent(e, "htmx:trigger"), t(e));
1243
+ };
1244
+ r > 0 ? getWindow().setTimeout(o, r) : o();
1245
+ }
1246
+ function processVerbs(e, t, n) {
1247
+ let r = !1;
1248
+ return forEach(VERBS, function(o) {
1249
+ if (hasAttribute(e, "hx-" + o)) {
1250
+ const i = getAttributeValue(e, "hx-" + o);
1251
+ r = !0, t.path = i, t.verb = o, n.forEach(function(s) {
1252
+ addTriggerHandler(e, s, t, function(l, a) {
1253
+ const u = asElement(l);
1254
+ if (eltIsDisabled(u)) {
1255
+ cleanUpElement(u);
1256
+ return;
1257
+ }
1258
+ issueAjaxRequest(o, i, u, a);
1259
+ });
1260
+ });
1261
+ }
1262
+ }), r;
1263
+ }
1264
+ function addTriggerHandler(e, t, n, r) {
1265
+ if (t.trigger === "revealed")
1266
+ initScrollHandler(), addEventListener(e, r, n, t), maybeReveal(asElement(e));
1267
+ else if (t.trigger === "intersect") {
1268
+ const o = {};
1269
+ t.root && (o.root = querySelectorExt(e, t.root)), t.threshold && (o.threshold = parseFloat(t.threshold)), new IntersectionObserver(function(s) {
1270
+ for (let l = 0; l < s.length; l++)
1271
+ if (s[l].isIntersecting) {
1272
+ triggerEvent(e, "intersect");
1273
+ break;
1274
+ }
1275
+ }, o).observe(asElement(e)), addEventListener(asElement(e), r, n, t);
1276
+ } else !n.firstInitCompleted && t.trigger === "load" ? maybeFilterEvent(t, e, makeEvent("load", { elt: e })) || loadImmediately(asElement(e), r, n, t.delay) : t.pollInterval > 0 ? (n.polling = !0, processPolling(asElement(e), r, t)) : addEventListener(e, r, n, t);
1277
+ }
1278
+ function shouldProcessHxOn(e) {
1279
+ const t = asElement(e);
1280
+ if (!t)
1281
+ return !1;
1282
+ const n = t.attributes;
1283
+ for (let r = 0; r < n.length; r++) {
1284
+ const o = n[r].name;
1285
+ if (startsWith(o, "hx-on:") || startsWith(o, "data-hx-on:") || startsWith(o, "hx-on-") || startsWith(o, "data-hx-on-"))
1286
+ return !0;
1287
+ }
1288
+ return !1;
1289
+ }
1290
+ const HX_ON_QUERY = new XPathEvaluator().createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');
1291
+ function processHXOnRoot(e, t) {
1292
+ shouldProcessHxOn(e) && t.push(asElement(e));
1293
+ const n = HX_ON_QUERY.evaluate(e);
1294
+ let r = null;
1295
+ for (; r = n.iterateNext(); ) t.push(asElement(r));
1296
+ }
1297
+ function findHxOnWildcardElements(e) {
1298
+ const t = [];
1299
+ if (e instanceof DocumentFragment)
1300
+ for (const n of e.childNodes)
1301
+ processHXOnRoot(n, t);
1302
+ else
1303
+ processHXOnRoot(e, t);
1304
+ return t;
1305
+ }
1306
+ function findElementsToProcess(e) {
1307
+ if (e.querySelectorAll) {
1308
+ const n = ", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]", r = [];
1309
+ for (const i in extensions) {
1310
+ const s = extensions[i];
1311
+ if (s.getSelectors) {
1312
+ var t = s.getSelectors();
1313
+ t && r.push(t);
1314
+ }
1315
+ }
1316
+ return e.querySelectorAll(VERB_SELECTOR + n + ", form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]" + r.flat().map((i) => ", " + i).join(""));
1317
+ } else
1318
+ return [];
1319
+ }
1320
+ function maybeSetLastButtonClicked(e) {
1321
+ const t = getTargetButton(e.target), n = getRelatedFormData(e);
1322
+ n && (n.lastButtonClicked = t);
1323
+ }
1324
+ function maybeUnsetLastButtonClicked(e) {
1325
+ const t = getRelatedFormData(e);
1326
+ t && (t.lastButtonClicked = null);
1327
+ }
1328
+ function getTargetButton(e) {
1329
+ return (
1330
+ /** @type {HTMLButtonElement|HTMLInputElement|null} */
1331
+ closest(asElement(e), "button, input[type='submit']")
1332
+ );
1333
+ }
1334
+ function getRelatedForm(e) {
1335
+ return e.form || closest(e, "form");
1336
+ }
1337
+ function getRelatedFormData(e) {
1338
+ const t = getTargetButton(e.target);
1339
+ if (!t)
1340
+ return;
1341
+ const n = getRelatedForm(t);
1342
+ return getInternalData(n);
1343
+ }
1344
+ function initButtonTracking(e) {
1345
+ e.addEventListener("click", maybeSetLastButtonClicked), e.addEventListener("focusin", maybeSetLastButtonClicked), e.addEventListener("focusout", maybeUnsetLastButtonClicked);
1346
+ }
1347
+ function addHxOnEventHandler(e, t, n) {
1348
+ const r = getInternalData(e);
1349
+ Array.isArray(r.onHandlers) || (r.onHandlers = []);
1350
+ let o;
1351
+ const i = function(s) {
1352
+ maybeEval(e, function() {
1353
+ eltIsDisabled(e) || (o || (o = new Function("event", n)), o.call(e, s));
1354
+ });
1355
+ };
1356
+ e.addEventListener(t, i), r.onHandlers.push({ event: t, listener: i });
1357
+ }
1358
+ function processHxOnWildcard(e) {
1359
+ deInitOnHandlers(e);
1360
+ for (let t = 0; t < e.attributes.length; t++) {
1361
+ const n = e.attributes[t].name, r = e.attributes[t].value;
1362
+ if (startsWith(n, "hx-on") || startsWith(n, "data-hx-on")) {
1363
+ const o = n.indexOf("-on") + 3, i = n.slice(o, o + 1);
1364
+ if (i === "-" || i === ":") {
1365
+ let s = n.slice(o + 1);
1366
+ startsWith(s, ":") ? s = "htmx" + s : startsWith(s, "-") ? s = "htmx:" + s.slice(1) : startsWith(s, "htmx-") && (s = "htmx:" + s.slice(5)), addHxOnEventHandler(e, s, r);
1367
+ }
1368
+ }
1369
+ }
1370
+ }
1371
+ function initNode(e) {
1372
+ triggerEvent(e, "htmx:beforeProcessNode");
1373
+ const t = getInternalData(e), n = getTriggerSpecs(e);
1374
+ processVerbs(e, t, n) || (getClosestAttributeValue(e, "hx-boost") === "true" ? boostElement(e, t, n) : hasAttribute(e, "hx-trigger") && n.forEach(function(o) {
1375
+ addTriggerHandler(e, o, t, function() {
1376
+ });
1377
+ })), (e.tagName === "FORM" || getRawAttribute(e, "type") === "submit" && hasAttribute(e, "form")) && initButtonTracking(e), t.firstInitCompleted = !0, triggerEvent(e, "htmx:afterProcessNode");
1378
+ }
1379
+ function maybeDeInitAndHash(e) {
1380
+ if (!(e instanceof Element))
1381
+ return !1;
1382
+ const t = getInternalData(e), n = attributeHash(e);
1383
+ return t.initHash !== n ? (deInitNode(e), t.initHash = n, !0) : !1;
1384
+ }
1385
+ function processNode(e) {
1386
+ if (e = resolveTarget(e), eltIsDisabled(e)) {
1387
+ cleanUpElement(e);
1388
+ return;
1389
+ }
1390
+ const t = [];
1391
+ maybeDeInitAndHash(e) && t.push(e), forEach(findElementsToProcess(e), function(n) {
1392
+ if (eltIsDisabled(n)) {
1393
+ cleanUpElement(n);
1394
+ return;
1395
+ }
1396
+ maybeDeInitAndHash(n) && t.push(n);
1397
+ }), forEach(findHxOnWildcardElements(e), processHxOnWildcard), forEach(t, initNode);
1398
+ }
1399
+ function kebabEventName(e) {
1400
+ return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1401
+ }
1402
+ function makeEvent(e, t) {
1403
+ return new CustomEvent(e, { bubbles: !0, cancelable: !0, composed: !0, detail: t });
1404
+ }
1405
+ function triggerErrorEvent(e, t, n) {
1406
+ triggerEvent(e, t, mergeObjects({ error: t }, n));
1407
+ }
1408
+ function ignoreEventForLogging(e) {
1409
+ return e === "htmx:afterProcessNode";
1410
+ }
1411
+ function withExtensions(e, t, n) {
1412
+ forEach(getExtensions(e, [], n), function(r) {
1413
+ try {
1414
+ t(r);
1415
+ } catch (o) {
1416
+ logError(o);
1417
+ }
1418
+ });
1419
+ }
1420
+ function logError(e) {
1421
+ console.error(e);
1422
+ }
1423
+ function triggerEvent(e, t, n) {
1424
+ e = resolveTarget(e), n == null && (n = {}), n.elt = e;
1425
+ const r = makeEvent(t, n);
1426
+ htmx.logger && !ignoreEventForLogging(t) && htmx.logger(e, t, n), n.error && (logError(n.error), triggerEvent(e, "htmx:error", { errorInfo: n }));
1427
+ let o = e.dispatchEvent(r);
1428
+ const i = kebabEventName(t);
1429
+ if (o && i !== t) {
1430
+ const s = makeEvent(i, r.detail);
1431
+ o = o && e.dispatchEvent(s);
1432
+ }
1433
+ return withExtensions(asElement(e), function(s) {
1434
+ o = o && s.onEvent(t, r) !== !1 && !r.defaultPrevented;
1435
+ }), o;
1436
+ }
1437
+ let currentPathForHistory = location.pathname + location.search;
1438
+ function setCurrentPathForHistory(e) {
1439
+ currentPathForHistory = e, canAccessLocalStorage() && sessionStorage.setItem("htmx-current-path-for-history", e);
1440
+ }
1441
+ function getHistoryElement() {
1442
+ return getDocument().querySelector("[hx-history-elt],[data-hx-history-elt]") || getDocument().body;
1443
+ }
1444
+ function saveToHistoryCache(e, t) {
1445
+ if (!canAccessLocalStorage())
1446
+ return;
1447
+ const n = cleanInnerHtmlForHistory(t), r = getDocument().title, o = window.scrollY;
1448
+ if (htmx.config.historyCacheSize <= 0) {
1449
+ sessionStorage.removeItem("htmx-history-cache");
1450
+ return;
1451
+ }
1452
+ e = normalizePath(e);
1453
+ const i = parseJSON(sessionStorage.getItem("htmx-history-cache")) || [];
1454
+ for (let l = 0; l < i.length; l++)
1455
+ if (i[l].url === e) {
1456
+ i.splice(l, 1);
1457
+ break;
1458
+ }
1459
+ const s = { url: e, content: n, title: r, scroll: o };
1460
+ for (triggerEvent(getDocument().body, "htmx:historyItemCreated", { item: s, cache: i }), i.push(s); i.length > htmx.config.historyCacheSize; )
1461
+ i.shift();
1462
+ for (; i.length > 0; )
1463
+ try {
1464
+ sessionStorage.setItem("htmx-history-cache", JSON.stringify(i));
1465
+ break;
1466
+ } catch (l) {
1467
+ triggerErrorEvent(getDocument().body, "htmx:historyCacheError", { cause: l, cache: i }), i.shift();
1468
+ }
1469
+ }
1470
+ function getCachedHistory(e) {
1471
+ if (!canAccessLocalStorage())
1472
+ return null;
1473
+ e = normalizePath(e);
1474
+ const t = parseJSON(sessionStorage.getItem("htmx-history-cache")) || [];
1475
+ for (let n = 0; n < t.length; n++)
1476
+ if (t[n].url === e)
1477
+ return t[n];
1478
+ return null;
1479
+ }
1480
+ function cleanInnerHtmlForHistory(e) {
1481
+ const t = htmx.config.requestClass, n = (
1482
+ /** @type Element */
1483
+ e.cloneNode(!0)
1484
+ );
1485
+ return forEach(findAll(n, "." + t), function(r) {
1486
+ removeClassFromElement(r, t);
1487
+ }), forEach(findAll(n, "[data-disabled-by-htmx]"), function(r) {
1488
+ r.removeAttribute("disabled");
1489
+ }), n.innerHTML;
1490
+ }
1491
+ function saveCurrentPageToHistory() {
1492
+ const e = getHistoryElement();
1493
+ let t = currentPathForHistory;
1494
+ canAccessLocalStorage() && (t = sessionStorage.getItem("htmx-current-path-for-history")), t = t || location.pathname + location.search, getDocument().querySelector('[hx-history="false" i],[data-hx-history="false" i]') || (triggerEvent(getDocument().body, "htmx:beforeHistorySave", { path: t, historyElt: e }), saveToHistoryCache(t, e)), htmx.config.historyEnabled && history.replaceState({ htmx: !0 }, getDocument().title, location.href);
1495
+ }
1496
+ function pushUrlIntoHistory(e) {
1497
+ htmx.config.getCacheBusterParam && (e = e.replace(/org\.htmx\.cache-buster=[^&]*&?/, ""), (endsWith(e, "&") || endsWith(e, "?")) && (e = e.slice(0, -1))), htmx.config.historyEnabled && history.pushState({ htmx: !0 }, "", e), setCurrentPathForHistory(e);
1498
+ }
1499
+ function replaceUrlInHistory(e) {
1500
+ htmx.config.historyEnabled && history.replaceState({ htmx: !0 }, "", e), setCurrentPathForHistory(e);
1501
+ }
1502
+ function settleImmediately(e) {
1503
+ forEach(e, function(t) {
1504
+ t.call(void 0);
1505
+ });
1506
+ }
1507
+ function loadHistoryFromServer(e) {
1508
+ const t = new XMLHttpRequest(), n = { swapStyle: "innerHTML", swapDelay: 0, settleDelay: 0 }, r = { path: e, xhr: t, historyElt: getHistoryElement(), swapSpec: n };
1509
+ t.open("GET", e, !0), htmx.config.historyRestoreAsHxRequest && t.setRequestHeader("HX-Request", "true"), t.setRequestHeader("HX-History-Restore-Request", "true"), t.setRequestHeader("HX-Current-URL", location.href), t.onload = function() {
1510
+ this.status >= 200 && this.status < 400 ? (r.response = this.response, triggerEvent(getDocument().body, "htmx:historyCacheMissLoad", r), swap(r.historyElt, r.response, n, {
1511
+ contextElement: r.historyElt,
1512
+ historyRequest: !0
1513
+ }), setCurrentPathForHistory(r.path), triggerEvent(getDocument().body, "htmx:historyRestore", { path: e, cacheMiss: !0, serverResponse: r.response })) : triggerErrorEvent(getDocument().body, "htmx:historyCacheMissLoadError", r);
1514
+ }, triggerEvent(getDocument().body, "htmx:historyCacheMiss", r) && t.send();
1515
+ }
1516
+ function restoreHistory(e) {
1517
+ saveCurrentPageToHistory(), e = e || location.pathname + location.search;
1518
+ const t = getCachedHistory(e);
1519
+ if (t) {
1520
+ const n = { swapStyle: "innerHTML", swapDelay: 0, settleDelay: 0, scroll: t.scroll }, r = { path: e, item: t, historyElt: getHistoryElement(), swapSpec: n };
1521
+ triggerEvent(getDocument().body, "htmx:historyCacheHit", r) && (swap(r.historyElt, t.content, n, {
1522
+ contextElement: r.historyElt,
1523
+ title: t.title
1524
+ }), setCurrentPathForHistory(r.path), triggerEvent(getDocument().body, "htmx:historyRestore", r));
1525
+ } else
1526
+ htmx.config.refreshOnHistoryMiss ? htmx.location.reload(!0) : loadHistoryFromServer(e);
1527
+ }
1528
+ function addRequestIndicatorClasses(e) {
1529
+ let t = (
1530
+ /** @type Element[] */
1531
+ findAttributeTargets(e, "hx-indicator")
1532
+ );
1533
+ return t == null && (t = [e]), forEach(t, function(n) {
1534
+ const r = getInternalData(n);
1535
+ r.requestCount = (r.requestCount || 0) + 1, n.classList.add.call(n.classList, htmx.config.requestClass);
1536
+ }), t;
1537
+ }
1538
+ function disableElements(e) {
1539
+ let t = (
1540
+ /** @type Element[] */
1541
+ findAttributeTargets(e, "hx-disabled-elt")
1542
+ );
1543
+ return t == null && (t = []), forEach(t, function(n) {
1544
+ const r = getInternalData(n);
1545
+ r.requestCount = (r.requestCount || 0) + 1, n.setAttribute("disabled", ""), n.setAttribute("data-disabled-by-htmx", "");
1546
+ }), t;
1547
+ }
1548
+ function removeRequestIndicators(e, t) {
1549
+ forEach(e.concat(t), function(n) {
1550
+ const r = getInternalData(n);
1551
+ r.requestCount = (r.requestCount || 1) - 1;
1552
+ }), forEach(e, function(n) {
1553
+ getInternalData(n).requestCount === 0 && n.classList.remove.call(n.classList, htmx.config.requestClass);
1554
+ }), forEach(t, function(n) {
1555
+ getInternalData(n).requestCount === 0 && (n.removeAttribute("disabled"), n.removeAttribute("data-disabled-by-htmx"));
1556
+ });
1557
+ }
1558
+ function haveSeenNode(e, t) {
1559
+ for (let n = 0; n < e.length; n++)
1560
+ if (e[n].isSameNode(t))
1561
+ return !0;
1562
+ return !1;
1563
+ }
1564
+ function shouldInclude(e) {
1565
+ const t = (
1566
+ /** @type {HTMLInputElement} */
1567
+ e
1568
+ );
1569
+ return t.name === "" || t.name == null || t.disabled || closest(t, "fieldset[disabled]") || t.type === "button" || t.type === "submit" || t.tagName === "image" || t.tagName === "reset" || t.tagName === "file" ? !1 : t.type === "checkbox" || t.type === "radio" ? t.checked : !0;
1570
+ }
1571
+ function addValueToFormData(e, t, n) {
1572
+ e != null && t != null && (Array.isArray(t) ? t.forEach(function(r) {
1573
+ n.append(e, r);
1574
+ }) : n.append(e, t));
1575
+ }
1576
+ function removeValueFromFormData(e, t, n) {
1577
+ if (e != null && t != null) {
1578
+ let r = n.getAll(e);
1579
+ Array.isArray(t) ? r = r.filter((o) => t.indexOf(o) < 0) : r = r.filter((o) => o !== t), n.delete(e), forEach(r, (o) => n.append(e, o));
1580
+ }
1581
+ }
1582
+ function getValueFromInput(e) {
1583
+ return e instanceof HTMLSelectElement && e.multiple ? toArray(e.querySelectorAll("option:checked")).map(function(t) {
1584
+ return (
1585
+ /** @type HTMLOptionElement */
1586
+ t.value
1587
+ );
1588
+ }) : e instanceof HTMLInputElement && e.files ? toArray(e.files) : e.value;
1589
+ }
1590
+ function processInputValue(e, t, n, r, o) {
1591
+ if (!(r == null || haveSeenNode(e, r))) {
1592
+ if (e.push(r), shouldInclude(r)) {
1593
+ const i = getRawAttribute(r, "name");
1594
+ addValueToFormData(i, getValueFromInput(r), t), o && validateElement(r, n);
1595
+ }
1596
+ r instanceof HTMLFormElement && (forEach(r.elements, function(i) {
1597
+ e.indexOf(i) >= 0 ? removeValueFromFormData(i.name, getValueFromInput(i), t) : e.push(i), o && validateElement(i, n);
1598
+ }), new FormData(r).forEach(function(i, s) {
1599
+ i instanceof File && i.name === "" || addValueToFormData(s, i, t);
1600
+ }));
1601
+ }
1602
+ }
1603
+ function validateElement(e, t) {
1604
+ const n = (
1605
+ /** @type {HTMLElement & ElementInternals} */
1606
+ e
1607
+ );
1608
+ n.willValidate && (triggerEvent(n, "htmx:validation:validate"), n.checkValidity() || (t.push({ elt: n, message: n.validationMessage, validity: n.validity }), triggerEvent(n, "htmx:validation:failed", { message: n.validationMessage, validity: n.validity })));
1609
+ }
1610
+ function overrideFormData(e, t) {
1611
+ for (const n of t.keys())
1612
+ e.delete(n);
1613
+ return t.forEach(function(n, r) {
1614
+ e.append(r, n);
1615
+ }), e;
1616
+ }
1617
+ function getInputValues(e, t) {
1618
+ const n = [], r = new FormData(), o = new FormData(), i = [], s = getInternalData(e);
1619
+ s.lastButtonClicked && !bodyContains(s.lastButtonClicked) && (s.lastButtonClicked = null);
1620
+ let l = e instanceof HTMLFormElement && e.noValidate !== !0 || getAttributeValue(e, "hx-validate") === "true";
1621
+ if (s.lastButtonClicked && (l = l && s.lastButtonClicked.formNoValidate !== !0), t !== "get" && processInputValue(n, o, i, getRelatedForm(e), l), processInputValue(n, r, i, e, l), s.lastButtonClicked || e.tagName === "BUTTON" || e.tagName === "INPUT" && getRawAttribute(e, "type") === "submit") {
1622
+ const u = s.lastButtonClicked || /** @type HTMLInputElement|HTMLButtonElement */
1623
+ e, h = getRawAttribute(u, "name");
1624
+ addValueToFormData(h, u.value, o);
1625
+ }
1626
+ const a = findAttributeTargets(e, "hx-include");
1627
+ return forEach(a, function(u) {
1628
+ processInputValue(n, r, i, asElement(u), l), matches(u, "form") || forEach(asParentNode(u).querySelectorAll(INPUT_SELECTOR), function(h) {
1629
+ processInputValue(n, r, i, h, l);
1630
+ });
1631
+ }), overrideFormData(r, o), { errors: i, formData: r, values: formDataProxy(r) };
1632
+ }
1633
+ function appendParam(e, t, n) {
1634
+ e !== "" && (e += "&"), String(n) === "[object Object]" && (n = JSON.stringify(n));
1635
+ const r = encodeURIComponent(n);
1636
+ return e += encodeURIComponent(t) + "=" + r, e;
1637
+ }
1638
+ function urlEncode(e) {
1639
+ e = formDataFromObject(e);
1640
+ let t = "";
1641
+ return e.forEach(function(n, r) {
1642
+ t = appendParam(t, r, n);
1643
+ }), t;
1644
+ }
1645
+ function getHeaders(e, t, n) {
1646
+ const r = {
1647
+ "HX-Request": "true",
1648
+ "HX-Trigger": getRawAttribute(e, "id"),
1649
+ "HX-Trigger-Name": getRawAttribute(e, "name"),
1650
+ "HX-Target": getAttributeValue(t, "id"),
1651
+ "HX-Current-URL": location.href
1652
+ };
1653
+ return getValuesForElement(e, "hx-headers", !1, r), n !== void 0 && (r["HX-Prompt"] = n), getInternalData(e).boosted && (r["HX-Boosted"] = "true"), r;
1654
+ }
1655
+ function filterValues(e, t) {
1656
+ const n = getClosestAttributeValue(t, "hx-params");
1657
+ if (n) {
1658
+ if (n === "none")
1659
+ return new FormData();
1660
+ if (n === "*")
1661
+ return e;
1662
+ if (n.indexOf("not ") === 0)
1663
+ return forEach(n.slice(4).split(","), function(r) {
1664
+ r = r.trim(), e.delete(r);
1665
+ }), e;
1666
+ {
1667
+ const r = new FormData();
1668
+ return forEach(n.split(","), function(o) {
1669
+ o = o.trim(), e.has(o) && e.getAll(o).forEach(function(i) {
1670
+ r.append(o, i);
1671
+ });
1672
+ }), r;
1673
+ }
1674
+ } else
1675
+ return e;
1676
+ }
1677
+ function isAnchorLink(e) {
1678
+ return !!getRawAttribute(e, "href") && getRawAttribute(e, "href").indexOf("#") >= 0;
1679
+ }
1680
+ function getSwapSpecification(e, t) {
1681
+ const n = t || getClosestAttributeValue(e, "hx-swap"), r = {
1682
+ swapStyle: getInternalData(e).boosted ? "innerHTML" : htmx.config.defaultSwapStyle,
1683
+ swapDelay: htmx.config.defaultSwapDelay,
1684
+ settleDelay: htmx.config.defaultSettleDelay
1685
+ };
1686
+ if (htmx.config.scrollIntoViewOnBoost && getInternalData(e).boosted && !isAnchorLink(e) && (r.show = "top"), n) {
1687
+ const s = splitOnWhitespace(n);
1688
+ if (s.length > 0)
1689
+ for (let l = 0; l < s.length; l++) {
1690
+ const a = s[l];
1691
+ if (a.indexOf("swap:") === 0)
1692
+ r.swapDelay = parseInterval(a.slice(5));
1693
+ else if (a.indexOf("settle:") === 0)
1694
+ r.settleDelay = parseInterval(a.slice(7));
1695
+ else if (a.indexOf("transition:") === 0)
1696
+ r.transition = a.slice(11) === "true";
1697
+ else if (a.indexOf("ignoreTitle:") === 0)
1698
+ r.ignoreTitle = a.slice(12) === "true";
1699
+ else if (a.indexOf("scroll:") === 0) {
1700
+ var o = a.slice(7).split(":");
1701
+ const h = o.pop();
1702
+ var i = o.length > 0 ? o.join(":") : null;
1703
+ r.scroll = h, r.scrollTarget = i;
1704
+ } else if (a.indexOf("show:") === 0) {
1705
+ var o = a.slice(5).split(":");
1706
+ const c = o.pop();
1707
+ var i = o.length > 0 ? o.join(":") : null;
1708
+ r.show = c, r.showTarget = i;
1709
+ } else if (a.indexOf("focus-scroll:") === 0) {
1710
+ const u = a.slice(13);
1711
+ r.focusScroll = u == "true";
1712
+ } else l == 0 ? r.swapStyle = a : logError("Unknown modifier in hx-swap: " + a);
1713
+ }
1714
+ }
1715
+ return r;
1716
+ }
1717
+ function usesFormData(e) {
1718
+ return getClosestAttributeValue(e, "hx-encoding") === "multipart/form-data" || matches(e, "form") && getRawAttribute(e, "enctype") === "multipart/form-data";
1719
+ }
1720
+ function encodeParamsForBody(e, t, n) {
1721
+ let r = null;
1722
+ return withExtensions(t, function(o) {
1723
+ r == null && (r = o.encodeParameters(e, n, t));
1724
+ }), r ?? (usesFormData(t) ? overrideFormData(new FormData(), formDataFromObject(n)) : urlEncode(n));
1725
+ }
1726
+ function makeSettleInfo(e) {
1727
+ return { tasks: [], elts: [e] };
1728
+ }
1729
+ function updateScrollState(e, t) {
1730
+ const n = e[0], r = e[e.length - 1];
1731
+ if (t.scroll) {
1732
+ var o = null;
1733
+ t.scrollTarget && (o = asElement(querySelectorExt(n, t.scrollTarget))), t.scroll === "top" && (n || o) && (o = o || n, o.scrollTop = 0), t.scroll === "bottom" && (r || o) && (o = o || r, o.scrollTop = o.scrollHeight), typeof t.scroll == "number" && getWindow().setTimeout(function() {
1734
+ window.scrollTo(
1735
+ 0,
1736
+ /** @type number */
1737
+ t.scroll
1738
+ );
1739
+ }, 0);
1740
+ }
1741
+ if (t.show) {
1742
+ var o = null;
1743
+ if (t.showTarget) {
1744
+ let s = t.showTarget;
1745
+ t.showTarget === "window" && (s = "body"), o = asElement(querySelectorExt(n, s));
1746
+ }
1747
+ t.show === "top" && (n || o) && (o = o || n, o.scrollIntoView({ block: "start", behavior: htmx.config.scrollBehavior })), t.show === "bottom" && (r || o) && (o = o || r, o.scrollIntoView({ block: "end", behavior: htmx.config.scrollBehavior }));
1748
+ }
1749
+ }
1750
+ function getValuesForElement(e, t, n, r, o) {
1751
+ if (r == null && (r = {}), e == null)
1752
+ return r;
1753
+ const i = getAttributeValue(e, t);
1754
+ if (i) {
1755
+ let s = i.trim(), l = n;
1756
+ if (s === "unset")
1757
+ return null;
1758
+ s.indexOf("javascript:") === 0 ? (s = s.slice(11), l = !0) : s.indexOf("js:") === 0 && (s = s.slice(3), l = !0), s.indexOf("{") !== 0 && (s = "{" + s + "}");
1759
+ let a;
1760
+ l ? a = maybeEval(e, function() {
1761
+ return o ? Function("event", "return (" + s + ")").call(e, o) : Function("return (" + s + ")").call(e);
1762
+ }, {}) : a = parseJSON(s);
1763
+ for (const u in a)
1764
+ a.hasOwnProperty(u) && r[u] == null && (r[u] = a[u]);
1765
+ }
1766
+ return getValuesForElement(asElement(parentElt(e)), t, n, r, o);
1767
+ }
1768
+ function maybeEval(e, t, n) {
1769
+ return htmx.config.allowEval ? t() : (triggerErrorEvent(e, "htmx:evalDisallowedError"), n);
1770
+ }
1771
+ function getHXVarsForElement(e, t, n) {
1772
+ return getValuesForElement(e, "hx-vars", !0, n, t);
1773
+ }
1774
+ function getHXValsForElement(e, t, n) {
1775
+ return getValuesForElement(e, "hx-vals", !1, n, t);
1776
+ }
1777
+ function getExpressionVars(e, t) {
1778
+ return mergeObjects(getHXVarsForElement(e, t), getHXValsForElement(e, t));
1779
+ }
1780
+ function safelySetHeaderValue(e, t, n) {
1781
+ if (n !== null)
1782
+ try {
1783
+ e.setRequestHeader(t, n);
1784
+ } catch {
1785
+ e.setRequestHeader(t, encodeURIComponent(n)), e.setRequestHeader(t + "-URI-AutoEncoded", "true");
1786
+ }
1787
+ }
1788
+ function getPathFromResponse(e) {
1789
+ if (e.responseURL)
1790
+ try {
1791
+ const t = new URL(e.responseURL);
1792
+ return t.pathname + t.search;
1793
+ } catch {
1794
+ triggerErrorEvent(getDocument().body, "htmx:badResponseUrl", { url: e.responseURL });
1795
+ }
1796
+ }
1797
+ function hasHeader(e, t) {
1798
+ return t.test(e.getAllResponseHeaders());
1799
+ }
1800
+ function ajaxHelper(e, t, n) {
1801
+ if (e = /** @type HttpVerb */
1802
+ e.toLowerCase(), n) {
1803
+ if (n instanceof Element || typeof n == "string")
1804
+ return issueAjaxRequest(e, t, null, null, {
1805
+ targetOverride: resolveTarget(n) || DUMMY_ELT,
1806
+ returnPromise: !0
1807
+ });
1808
+ {
1809
+ let r = resolveTarget(n.target);
1810
+ return (n.target && !r || n.source && !r && !resolveTarget(n.source)) && (r = DUMMY_ELT), issueAjaxRequest(
1811
+ e,
1812
+ t,
1813
+ resolveTarget(n.source),
1814
+ n.event,
1815
+ {
1816
+ handler: n.handler,
1817
+ headers: n.headers,
1818
+ values: n.values,
1819
+ targetOverride: r,
1820
+ swapOverride: n.swap,
1821
+ select: n.select,
1822
+ returnPromise: !0
1823
+ }
1824
+ );
1825
+ }
1826
+ } else
1827
+ return issueAjaxRequest(e, t, null, null, {
1828
+ returnPromise: !0
1829
+ });
1830
+ }
1831
+ function hierarchyForElt(e) {
1832
+ const t = [];
1833
+ for (; e; )
1834
+ t.push(e), e = e.parentElement;
1835
+ return t;
1836
+ }
1837
+ function verifyPath(e, t, n) {
1838
+ const r = new URL(t, location.protocol !== "about:" ? location.href : window.origin), i = (location.protocol !== "about:" ? location.origin : window.origin) === r.origin;
1839
+ return htmx.config.selfRequestsOnly && !i ? !1 : triggerEvent(e, "htmx:validateUrl", mergeObjects({ url: r, sameHost: i }, n));
1840
+ }
1841
+ function formDataFromObject(e) {
1842
+ if (e instanceof FormData) return e;
1843
+ const t = new FormData();
1844
+ for (const n in e)
1845
+ e.hasOwnProperty(n) && (e[n] && typeof e[n].forEach == "function" ? e[n].forEach(function(r) {
1846
+ t.append(n, r);
1847
+ }) : typeof e[n] == "object" && !(e[n] instanceof Blob) ? t.append(n, JSON.stringify(e[n])) : t.append(n, e[n]));
1848
+ return t;
1849
+ }
1850
+ function formDataArrayProxy(e, t, n) {
1851
+ return new Proxy(n, {
1852
+ get: function(r, o) {
1853
+ return typeof o == "number" ? r[o] : o === "length" ? r.length : o === "push" ? function(i) {
1854
+ r.push(i), e.append(t, i);
1855
+ } : typeof r[o] == "function" ? function() {
1856
+ r[o].apply(r, arguments), e.delete(t), r.forEach(function(i) {
1857
+ e.append(t, i);
1858
+ });
1859
+ } : r[o] && r[o].length === 1 ? r[o][0] : r[o];
1860
+ },
1861
+ set: function(r, o, i) {
1862
+ return r[o] = i, e.delete(t), r.forEach(function(s) {
1863
+ e.append(t, s);
1864
+ }), !0;
1865
+ }
1866
+ });
1867
+ }
1868
+ function formDataProxy(e) {
1869
+ return new Proxy(e, {
1870
+ get: function(t, n) {
1871
+ if (typeof n == "symbol") {
1872
+ const o = Reflect.get(t, n);
1873
+ return typeof o == "function" ? function() {
1874
+ return o.apply(e, arguments);
1875
+ } : o;
1876
+ }
1877
+ if (n === "toJSON")
1878
+ return () => Object.fromEntries(e);
1879
+ if (n in t && typeof t[n] == "function")
1880
+ return function() {
1881
+ return e[n].apply(e, arguments);
1882
+ };
1883
+ const r = e.getAll(n);
1884
+ if (r.length !== 0)
1885
+ return r.length === 1 ? r[0] : formDataArrayProxy(t, n, r);
1886
+ },
1887
+ set: function(t, n, r) {
1888
+ return typeof n != "string" ? !1 : (t.delete(n), r && typeof r.forEach == "function" ? r.forEach(function(o) {
1889
+ t.append(n, o);
1890
+ }) : typeof r == "object" && !(r instanceof Blob) ? t.append(n, JSON.stringify(r)) : t.append(n, r), !0);
1891
+ },
1892
+ deleteProperty: function(t, n) {
1893
+ return typeof n == "string" && t.delete(n), !0;
1894
+ },
1895
+ // Support Object.assign call from proxy
1896
+ ownKeys: function(t) {
1897
+ return Reflect.ownKeys(Object.fromEntries(t));
1898
+ },
1899
+ getOwnPropertyDescriptor: function(t, n) {
1900
+ return Reflect.getOwnPropertyDescriptor(Object.fromEntries(t), n);
1901
+ }
1902
+ });
1903
+ }
1904
+ function issueAjaxRequest(e, t, n, r, o, i) {
1905
+ let s = null, l = null;
1906
+ if (o = o ?? {}, o.returnPromise && typeof Promise < "u")
1907
+ var a = new Promise(function(g, b) {
1908
+ s = g, l = b;
1909
+ });
1910
+ n == null && (n = getDocument().body);
1911
+ const u = o.handler || handleAjaxResponse, h = o.select || null;
1912
+ if (!bodyContains(n))
1913
+ return maybeCall(s), a;
1914
+ const c = o.targetOverride || asElement(getTarget(n));
1915
+ if (c == null || c == DUMMY_ELT)
1916
+ return triggerErrorEvent(n, "htmx:targetError", { target: getClosestAttributeValue(n, "hx-target") }), maybeCall(l), a;
1917
+ let f = getInternalData(n);
1918
+ const y = f.lastButtonClicked;
1919
+ if (y) {
1920
+ const g = getRawAttribute(y, "formaction");
1921
+ g != null && (t = g);
1922
+ const b = getRawAttribute(y, "formmethod");
1923
+ if (b != null)
1924
+ if (VERBS.includes(b.toLowerCase()))
1925
+ e = /** @type HttpVerb */
1926
+ b;
1927
+ else
1928
+ return maybeCall(s), a;
1929
+ }
1930
+ const d = getClosestAttributeValue(n, "hx-confirm");
1931
+ if (i === void 0 && triggerEvent(n, "htmx:confirm", { target: c, elt: n, path: t, verb: e, triggeringEvent: r, etc: o, issueRequest: function(H) {
1932
+ return issueAjaxRequest(e, t, n, r, o, !!H);
1933
+ }, question: d }) === !1)
1934
+ return maybeCall(s), a;
1935
+ let E = n, m = getClosestAttributeValue(n, "hx-sync"), C = null, w = !1;
1936
+ if (m) {
1937
+ const g = m.split(":"), b = g[0].trim();
1938
+ if (b === "this" ? E = findThisElement(n, "hx-sync") : E = asElement(querySelectorExt(n, b)), m = (g[1] || "drop").trim(), f = getInternalData(E), m === "drop" && f.xhr && f.abortable !== !0)
1939
+ return maybeCall(s), a;
1940
+ if (m === "abort") {
1941
+ if (f.xhr)
1942
+ return maybeCall(s), a;
1943
+ w = !0;
1944
+ } else m === "replace" ? triggerEvent(E, "htmx:abort") : m.indexOf("queue") === 0 && (C = (m.split(" ")[1] || "last").trim());
1945
+ }
1946
+ if (f.xhr)
1947
+ if (f.abortable)
1948
+ triggerEvent(E, "htmx:abort");
1949
+ else {
1950
+ if (C == null) {
1951
+ if (r) {
1952
+ const g = getInternalData(r);
1953
+ g && g.triggerSpec && g.triggerSpec.queue && (C = g.triggerSpec.queue);
1954
+ }
1955
+ C == null && (C = "last");
1956
+ }
1957
+ return f.queuedRequests == null && (f.queuedRequests = []), C === "first" && f.queuedRequests.length === 0 ? f.queuedRequests.push(function() {
1958
+ issueAjaxRequest(e, t, n, r, o);
1959
+ }) : C === "all" ? f.queuedRequests.push(function() {
1960
+ issueAjaxRequest(e, t, n, r, o);
1961
+ }) : C === "last" && (f.queuedRequests = [], f.queuedRequests.push(function() {
1962
+ issueAjaxRequest(e, t, n, r, o);
1963
+ })), maybeCall(s), a;
1964
+ }
1965
+ const x = new XMLHttpRequest();
1966
+ f.xhr = x, f.abortable = w;
1967
+ const p = function() {
1968
+ f.xhr = null, f.abortable = !1, f.queuedRequests != null && f.queuedRequests.length > 0 && f.queuedRequests.shift()();
1969
+ }, V = getClosestAttributeValue(n, "hx-prompt");
1970
+ if (V) {
1971
+ var P = prompt(V);
1972
+ if (P === null || !triggerEvent(n, "htmx:prompt", { prompt: P, target: c }))
1973
+ return maybeCall(s), p(), a;
1974
+ }
1975
+ if (d && !i && !confirm(d))
1976
+ return maybeCall(s), p(), a;
1977
+ let T = getHeaders(n, c, P);
1978
+ e !== "get" && !usesFormData(n) && (T["Content-Type"] = "application/x-www-form-urlencoded"), o.headers && (T = mergeObjects(T, o.headers));
1979
+ const M = getInputValues(n, e);
1980
+ let D = M.errors;
1981
+ const B = M.formData;
1982
+ o.values && overrideFormData(B, formDataFromObject(o.values));
1983
+ const _ = formDataFromObject(getExpressionVars(n, r)), F = overrideFormData(B, _);
1984
+ let R = filterValues(F, n);
1985
+ htmx.config.getCacheBusterParam && e === "get" && R.set("org.htmx.cache-buster", getRawAttribute(c, "id") || "true"), (t == null || t === "") && (t = location.href);
1986
+ const q = getValuesForElement(n, "hx-request"), U = getInternalData(n).boosted;
1987
+ let O = htmx.config.methodsThatUseUrlParams.indexOf(e) >= 0;
1988
+ const A = {
1989
+ boosted: U,
1990
+ useUrlParams: O,
1991
+ formData: R,
1992
+ parameters: formDataProxy(R),
1993
+ unfilteredFormData: F,
1994
+ unfilteredParameters: formDataProxy(F),
1995
+ headers: T,
1996
+ elt: n,
1997
+ target: c,
1998
+ verb: e,
1999
+ errors: D,
2000
+ withCredentials: o.credentials || q.credentials || htmx.config.withCredentials,
2001
+ timeout: o.timeout || q.timeout || htmx.config.timeout,
2002
+ path: t,
2003
+ triggeringEvent: r
2004
+ };
2005
+ if (!triggerEvent(n, "htmx:configRequest", A))
2006
+ return maybeCall(s), p(), a;
2007
+ if (t = A.path, e = A.verb, T = A.headers, R = formDataFromObject(A.parameters), D = A.errors, O = A.useUrlParams, D && D.length > 0)
2008
+ return triggerEvent(n, "htmx:validation:halted", A), maybeCall(s), p(), a;
2009
+ const k = t.split("#"), W = k[0], N = k[1];
2010
+ let S = t;
2011
+ if (O && (S = W, !R.keys().next().done && (S.indexOf("?") < 0 ? S += "?" : S += "&", S += urlEncode(R), N && (S += "#" + N))), !verifyPath(n, S, A))
2012
+ return triggerErrorEvent(n, "htmx:invalidPath", A), maybeCall(l), p(), a;
2013
+ if (x.open(e.toUpperCase(), S, !0), x.overrideMimeType("text/html"), x.withCredentials = A.withCredentials, x.timeout = A.timeout, !q.noHeaders) {
2014
+ for (const g in T)
2015
+ if (T.hasOwnProperty(g)) {
2016
+ const b = T[g];
2017
+ safelySetHeaderValue(x, g, b);
2018
+ }
2019
+ }
2020
+ const v = {
2021
+ xhr: x,
2022
+ target: c,
2023
+ requestConfig: A,
2024
+ etc: o,
2025
+ boosted: U,
2026
+ select: h,
2027
+ pathInfo: {
2028
+ requestPath: t,
2029
+ finalRequestPath: S,
2030
+ responsePath: null,
2031
+ anchor: N
2032
+ }
2033
+ };
2034
+ if (x.onload = function() {
2035
+ try {
2036
+ const g = hierarchyForElt(n);
2037
+ if (v.pathInfo.responsePath = getPathFromResponse(x), u(n, v), v.keepIndicators !== !0 && removeRequestIndicators(I, L), triggerEvent(n, "htmx:afterRequest", v), triggerEvent(n, "htmx:afterOnLoad", v), !bodyContains(n)) {
2038
+ let b = null;
2039
+ for (; g.length > 0 && b == null; ) {
2040
+ const H = g.shift();
2041
+ bodyContains(H) && (b = H);
2042
+ }
2043
+ b && (triggerEvent(b, "htmx:afterRequest", v), triggerEvent(b, "htmx:afterOnLoad", v));
2044
+ }
2045
+ maybeCall(s);
2046
+ } catch (g) {
2047
+ throw triggerErrorEvent(n, "htmx:onLoadError", mergeObjects({ error: g }, v)), g;
2048
+ } finally {
2049
+ p();
2050
+ }
2051
+ }, x.onerror = function() {
2052
+ removeRequestIndicators(I, L), triggerErrorEvent(n, "htmx:afterRequest", v), triggerErrorEvent(n, "htmx:sendError", v), maybeCall(l), p();
2053
+ }, x.onabort = function() {
2054
+ removeRequestIndicators(I, L), triggerErrorEvent(n, "htmx:afterRequest", v), triggerErrorEvent(n, "htmx:sendAbort", v), maybeCall(l), p();
2055
+ }, x.ontimeout = function() {
2056
+ removeRequestIndicators(I, L), triggerErrorEvent(n, "htmx:afterRequest", v), triggerErrorEvent(n, "htmx:timeout", v), maybeCall(l), p();
2057
+ }, !triggerEvent(n, "htmx:beforeRequest", v))
2058
+ return maybeCall(s), p(), a;
2059
+ var I = addRequestIndicatorClasses(n), L = disableElements(n);
2060
+ forEach(["loadstart", "loadend", "progress", "abort"], function(g) {
2061
+ forEach([x, x.upload], function(b) {
2062
+ b.addEventListener(g, function(H) {
2063
+ triggerEvent(n, "htmx:xhr:" + g, {
2064
+ lengthComputable: H.lengthComputable,
2065
+ loaded: H.loaded,
2066
+ total: H.total
2067
+ });
2068
+ });
2069
+ });
2070
+ }), triggerEvent(n, "htmx:beforeSend", v);
2071
+ const j = O ? null : encodeParamsForBody(x, n, R);
2072
+ return x.send(j), a;
2073
+ }
2074
+ function determineHistoryUpdates(e, t) {
2075
+ const n = t.xhr;
2076
+ let r = null, o = null;
2077
+ if (hasHeader(n, /HX-Push:/i) ? (r = n.getResponseHeader("HX-Push"), o = "push") : hasHeader(n, /HX-Push-Url:/i) ? (r = n.getResponseHeader("HX-Push-Url"), o = "push") : hasHeader(n, /HX-Replace-Url:/i) && (r = n.getResponseHeader("HX-Replace-Url"), o = "replace"), r)
2078
+ return r === "false" ? {} : {
2079
+ type: o,
2080
+ path: r
2081
+ };
2082
+ const i = t.pathInfo.finalRequestPath, s = t.pathInfo.responsePath, l = getClosestAttributeValue(e, "hx-push-url"), a = getClosestAttributeValue(e, "hx-replace-url"), u = getInternalData(e).boosted;
2083
+ let h = null, c = null;
2084
+ return l ? (h = "push", c = l) : a ? (h = "replace", c = a) : u && (h = "push", c = s || i), c ? c === "false" ? {} : (c === "true" && (c = s || i), t.pathInfo.anchor && c.indexOf("#") === -1 && (c = c + "#" + t.pathInfo.anchor), {
2085
+ type: h,
2086
+ path: c
2087
+ }) : {};
2088
+ }
2089
+ function codeMatches(e, t) {
2090
+ var n = new RegExp(e.code);
2091
+ return n.test(t.toString(10));
2092
+ }
2093
+ function resolveResponseHandling(e) {
2094
+ for (var t = 0; t < htmx.config.responseHandling.length; t++) {
2095
+ var n = htmx.config.responseHandling[t];
2096
+ if (codeMatches(n, e.status))
2097
+ return n;
2098
+ }
2099
+ return {
2100
+ swap: !1
2101
+ };
2102
+ }
2103
+ function handleTitle(e) {
2104
+ if (e) {
2105
+ const t = find("title");
2106
+ t ? t.textContent = e : window.document.title = e;
2107
+ }
2108
+ }
2109
+ function resolveRetarget(e, t) {
2110
+ if (t === "this")
2111
+ return e;
2112
+ const n = asElement(querySelectorExt(e, t));
2113
+ if (n == null)
2114
+ throw triggerErrorEvent(e, "htmx:targetError", { target: t }), new Error(`Invalid re-target ${t}`);
2115
+ return n;
2116
+ }
2117
+ function handleAjaxResponse(e, t) {
2118
+ const n = t.xhr;
2119
+ let r = t.target;
2120
+ const o = t.etc, i = t.select;
2121
+ if (!triggerEvent(e, "htmx:beforeOnLoad", t)) return;
2122
+ if (hasHeader(n, /HX-Trigger:/i) && handleTriggerHeader(n, "HX-Trigger", e), hasHeader(n, /HX-Location:/i)) {
2123
+ saveCurrentPageToHistory();
2124
+ let w = n.getResponseHeader("HX-Location");
2125
+ var s;
2126
+ w.indexOf("{") === 0 && (s = parseJSON(w), w = s.path, delete s.path), ajaxHelper("get", w, s).then(function() {
2127
+ pushUrlIntoHistory(w);
2128
+ });
2129
+ return;
2130
+ }
2131
+ const l = hasHeader(n, /HX-Refresh:/i) && n.getResponseHeader("HX-Refresh") === "true";
2132
+ if (hasHeader(n, /HX-Redirect:/i)) {
2133
+ t.keepIndicators = !0, htmx.location.href = n.getResponseHeader("HX-Redirect"), l && htmx.location.reload();
2134
+ return;
2135
+ }
2136
+ if (l) {
2137
+ t.keepIndicators = !0, htmx.location.reload();
2138
+ return;
2139
+ }
2140
+ const a = determineHistoryUpdates(e, t), u = resolveResponseHandling(n), h = u.swap;
2141
+ let c = !!u.error, f = htmx.config.ignoreTitle || u.ignoreTitle, y = u.select;
2142
+ u.target && (t.target = resolveRetarget(e, u.target));
2143
+ var d = o.swapOverride;
2144
+ d == null && u.swapOverride && (d = u.swapOverride), hasHeader(n, /HX-Retarget:/i) && (t.target = resolveRetarget(e, n.getResponseHeader("HX-Retarget"))), hasHeader(n, /HX-Reswap:/i) && (d = n.getResponseHeader("HX-Reswap"));
2145
+ var E = n.response, m = mergeObjects({
2146
+ shouldSwap: h,
2147
+ serverResponse: E,
2148
+ isError: c,
2149
+ ignoreTitle: f,
2150
+ selectOverride: y,
2151
+ swapOverride: d
2152
+ }, t);
2153
+ if (!(u.event && !triggerEvent(r, u.event, m)) && triggerEvent(r, "htmx:beforeSwap", m)) {
2154
+ if (r = m.target, E = m.serverResponse, c = m.isError, f = m.ignoreTitle, y = m.selectOverride, d = m.swapOverride, t.target = r, t.failed = c, t.successful = !c, m.shouldSwap) {
2155
+ n.status === 286 && cancelPolling(e), withExtensions(e, function(p) {
2156
+ E = p.transformResponse(E, n, e);
2157
+ }), a.type && saveCurrentPageToHistory();
2158
+ var C = getSwapSpecification(e, d);
2159
+ C.hasOwnProperty("ignoreTitle") || (C.ignoreTitle = f), r.classList.add(htmx.config.swappingClass), i && (y = i), hasHeader(n, /HX-Reselect:/i) && (y = n.getResponseHeader("HX-Reselect"));
2160
+ const w = getClosestAttributeValue(e, "hx-select-oob"), x = getClosestAttributeValue(e, "hx-select");
2161
+ swap(r, E, C, {
2162
+ select: y === "unset" ? null : y || x,
2163
+ selectOOB: w,
2164
+ eventInfo: t,
2165
+ anchor: t.pathInfo.anchor,
2166
+ contextElement: e,
2167
+ afterSwapCallback: function() {
2168
+ if (hasHeader(n, /HX-Trigger-After-Swap:/i)) {
2169
+ let p = e;
2170
+ bodyContains(e) || (p = getDocument().body), handleTriggerHeader(n, "HX-Trigger-After-Swap", p);
2171
+ }
2172
+ },
2173
+ afterSettleCallback: function() {
2174
+ if (hasHeader(n, /HX-Trigger-After-Settle:/i)) {
2175
+ let p = e;
2176
+ bodyContains(e) || (p = getDocument().body), handleTriggerHeader(n, "HX-Trigger-After-Settle", p);
2177
+ }
2178
+ },
2179
+ beforeSwapCallback: function() {
2180
+ a.type && (triggerEvent(getDocument().body, "htmx:beforeHistoryUpdate", mergeObjects({ history: a }, t)), a.type === "push" ? (pushUrlIntoHistory(a.path), triggerEvent(getDocument().body, "htmx:pushedIntoHistory", { path: a.path })) : (replaceUrlInHistory(a.path), triggerEvent(getDocument().body, "htmx:replacedInHistory", { path: a.path })));
2181
+ }
2182
+ });
2183
+ }
2184
+ c && triggerErrorEvent(e, "htmx:responseError", mergeObjects({ error: "Response Status Error Code " + n.status + " from " + t.pathInfo.requestPath }, t));
2185
+ }
2186
+ }
2187
+ const extensions = {};
2188
+ function extensionBase() {
2189
+ return {
2190
+ init: function(e) {
2191
+ return null;
2192
+ },
2193
+ getSelectors: function() {
2194
+ return null;
2195
+ },
2196
+ onEvent: function(e, t) {
2197
+ return !0;
2198
+ },
2199
+ transformResponse: function(e, t, n) {
2200
+ return e;
2201
+ },
2202
+ isInlineSwap: function(e) {
2203
+ return !1;
2204
+ },
2205
+ handleSwap: function(e, t, n, r) {
2206
+ return !1;
2207
+ },
2208
+ encodeParameters: function(e, t, n) {
2209
+ return null;
2210
+ }
2211
+ };
2212
+ }
2213
+ function defineExtension(e, t) {
2214
+ t.init && t.init(internalAPI), extensions[e] = mergeObjects(extensionBase(), t);
2215
+ }
2216
+ function removeExtension(e) {
2217
+ delete extensions[e];
2218
+ }
2219
+ function getExtensions(e, t, n) {
2220
+ if (t == null && (t = []), e == null)
2221
+ return t;
2222
+ n == null && (n = []);
2223
+ const r = getAttributeValue(e, "hx-ext");
2224
+ return r && forEach(r.split(","), function(o) {
2225
+ if (o = o.replace(/ /g, ""), o.slice(0, 7) == "ignore:") {
2226
+ n.push(o.slice(7));
2227
+ return;
2228
+ }
2229
+ if (n.indexOf(o) < 0) {
2230
+ const i = extensions[o];
2231
+ i && t.indexOf(i) < 0 && t.push(i);
2232
+ }
2233
+ }), getExtensions(asElement(parentElt(e)), t, n);
2234
+ }
2235
+ var isReady = !1;
2236
+ getDocument().addEventListener("DOMContentLoaded", function() {
2237
+ isReady = !0;
2238
+ });
2239
+ function ready(e) {
2240
+ isReady || getDocument().readyState === "complete" ? e() : getDocument().addEventListener("DOMContentLoaded", e);
2241
+ }
2242
+ function insertIndicatorStyles() {
2243
+ if (htmx.config.includeIndicatorStyles !== !1) {
2244
+ const e = htmx.config.inlineStyleNonce ? ` nonce="${htmx.config.inlineStyleNonce}"` : "";
2245
+ getDocument().head.insertAdjacentHTML(
2246
+ "beforeend",
2247
+ "<style" + e + "> ." + htmx.config.indicatorClass + "{opacity:0} ." + htmx.config.requestClass + " ." + htmx.config.indicatorClass + "{opacity:1; transition: opacity 200ms ease-in;} ." + htmx.config.requestClass + "." + htmx.config.indicatorClass + "{opacity:1; transition: opacity 200ms ease-in;} </style>"
2248
+ );
2249
+ }
2250
+ }
2251
+ function getMetaConfig() {
2252
+ const e = getDocument().querySelector('meta[name="htmx-config"]');
2253
+ return e ? parseJSON(e.content) : null;
2254
+ }
2255
+ function mergeMetaConfig() {
2256
+ const e = getMetaConfig();
2257
+ e && (htmx.config = mergeObjects(htmx.config, e));
2258
+ }
2259
+ return ready(function() {
2260
+ mergeMetaConfig(), insertIndicatorStyles();
2261
+ let e = getDocument().body;
2262
+ processNode(e);
2263
+ const t = getDocument().querySelectorAll(
2264
+ "[hx-trigger='restored'],[data-hx-trigger='restored']"
2265
+ );
2266
+ e.addEventListener("htmx:abort", function(r) {
2267
+ const o = r.target, i = getInternalData(o);
2268
+ i && i.xhr && i.xhr.abort();
2269
+ });
2270
+ const n = window.onpopstate ? window.onpopstate.bind(window) : null;
2271
+ window.onpopstate = function(r) {
2272
+ r.state && r.state.htmx ? (restoreHistory(), forEach(t, function(o) {
2273
+ triggerEvent(o, "htmx:restored", {
2274
+ document: getDocument(),
2275
+ triggerEvent
2276
+ });
2277
+ })) : n && n(r);
2278
+ }, getWindow().setTimeout(function() {
2279
+ triggerEvent(e, "htmx:load", {}), e = null;
2280
+ }, 0);
2281
+ }), htmx;
2282
+ })();