@epic-web/workshop-app 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2191) hide show
  1. package/README.md +10 -0
  2. package/bin/epicshop.js +84 -0
  3. package/build/client/app-default.css +39 -0
  4. package/build/client/assets/_-ByTWgb53.js +2 -0
  5. package/build/client/assets/_-ByTWgb53.js.map +1 -0
  6. package/build/client/assets/_-l0sNRNKZ.js +2 -0
  7. package/build/client/assets/_-l0sNRNKZ.js.map +1 -0
  8. package/build/client/assets/_exerciseNumber-B_VU-pG1.js +2 -0
  9. package/build/client/assets/_exerciseNumber-B_VU-pG1.js.map +1 -0
  10. package/build/client/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js +2 -0
  11. package/build/client/assets/_exerciseNumber_._stepNumber-D1wwEMQx.js.map +1 -0
  12. package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js +2 -0
  13. package/build/client/assets/_exerciseNumber_._stepNumber.index-l0sNRNKZ.js.map +1 -0
  14. package/build/client/assets/_exerciseNumber_.finished-DldgXnJy.js +2 -0
  15. package/build/client/assets/_exerciseNumber_.finished-DldgXnJy.js.map +1 -0
  16. package/build/client/assets/_layout--icRfEZS.js +2 -0
  17. package/build/client/assets/_layout--icRfEZS.js.map +1 -0
  18. package/build/client/assets/_layout-BaPtC79F.js +2 -0
  19. package/build/client/assets/_layout-BaPtC79F.js.map +1 -0
  20. package/build/client/assets/_layout-Bj9PyQQD.js +2 -0
  21. package/build/client/assets/_layout-Bj9PyQQD.js.map +1 -0
  22. package/build/client/assets/_layout-CIgVeko6.js +2 -0
  23. package/build/client/assets/_layout-CIgVeko6.js.map +1 -0
  24. package/build/client/assets/account-Bk4o4AzZ.js +2 -0
  25. package/build/client/assets/account-Bk4o4AzZ.js.map +1 -0
  26. package/build/client/assets/api._-l0sNRNKZ.js +2 -0
  27. package/build/client/assets/api._-l0sNRNKZ.js.map +1 -0
  28. package/build/client/assets/app-B0HiIPBO.css +1 -0
  29. package/build/client/assets/app._id-l0sNRNKZ.js +2 -0
  30. package/build/client/assets/app._id-l0sNRNKZ.js.map +1 -0
  31. package/build/client/assets/app._id._-l0sNRNKZ.js +2 -0
  32. package/build/client/assets/app._id._-l0sNRNKZ.js.map +1 -0
  33. package/build/client/assets/app._id.api._-l0sNRNKZ.js +2 -0
  34. package/build/client/assets/app._id.api._-l0sNRNKZ.js.map +1 -0
  35. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js +2 -0
  36. package/build/client/assets/app._id.epic_ws_.js_-l0sNRNKZ.js.map +1 -0
  37. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js +2 -0
  38. package/build/client/assets/app._id.test._testName-l0sNRNKZ.js.map +1 -0
  39. package/build/client/assets/apps-DP2rzg_V.js +2 -0
  40. package/build/client/assets/apps-DP2rzg_V.js.map +1 -0
  41. package/build/client/assets/apps-l0sNRNKZ.js +2 -0
  42. package/build/client/assets/apps-l0sNRNKZ.js.map +1 -0
  43. package/build/client/assets/button-DnQOyJAN.js +2 -0
  44. package/build/client/assets/button-DnQOyJAN.js.map +1 -0
  45. package/build/client/assets/client-hints-BHTHvBjk.js +24 -0
  46. package/build/client/assets/client-hints-BHTHvBjk.js.map +1 -0
  47. package/build/client/assets/clsx-B-dksMZM.js +2 -0
  48. package/build/client/assets/clsx-B-dksMZM.js.map +1 -0
  49. package/build/client/assets/components-Dj3sm47B.js +100 -0
  50. package/build/client/assets/components-Dj3sm47B.js.map +1 -0
  51. package/build/client/assets/diff-Blb5EPiO.js +2 -0
  52. package/build/client/assets/diff-Blb5EPiO.js.map +1 -0
  53. package/build/client/assets/diff-MSYB00VZ.js +42 -0
  54. package/build/client/assets/diff-MSYB00VZ.js.map +1 -0
  55. package/build/client/assets/discord-CK7yz4w6.js +2 -0
  56. package/build/client/assets/discord-CK7yz4w6.js.map +1 -0
  57. package/build/client/assets/discord-CsluX01E.js +2 -0
  58. package/build/client/assets/discord-CsluX01E.js.map +1 -0
  59. package/build/client/assets/discord.callback-l0sNRNKZ.js +2 -0
  60. package/build/client/assets/discord.callback-l0sNRNKZ.js.map +1 -0
  61. package/build/client/assets/entry.client-DBBrAxtJ.js +73 -0
  62. package/build/client/assets/entry.client-DBBrAxtJ.js.map +1 -0
  63. package/build/client/assets/epic-video-BwJwnV_j.js +2992 -0
  64. package/build/client/assets/epic-video-BwJwnV_j.js.map +1 -0
  65. package/build/client/assets/epic-video-DUnRvy1A.css +1 -0
  66. package/build/client/assets/error-boundary-Bg54_knF.js +2 -0
  67. package/build/client/assets/error-boundary-Bg54_knF.js.map +1 -0
  68. package/build/client/assets/exercises-l0sNRNKZ.js +2 -0
  69. package/build/client/assets/exercises-l0sNRNKZ.js.map +1 -0
  70. package/build/client/assets/finished-CGll5TOI.js +2 -0
  71. package/build/client/assets/finished-CGll5TOI.js.map +1 -0
  72. package/build/client/assets/index-B8k-Gd1G.js +2 -0
  73. package/build/client/assets/index-B8k-Gd1G.js.map +1 -0
  74. package/build/client/assets/index-BL4aE6WC.js +8 -0
  75. package/build/client/assets/index-BL4aE6WC.js.map +1 -0
  76. package/build/client/assets/index-BfoHqrT5.js +2 -0
  77. package/build/client/assets/index-BfoHqrT5.js.map +1 -0
  78. package/build/client/assets/index-D1WEsmVZ.js +36 -0
  79. package/build/client/assets/index-D1WEsmVZ.js.map +1 -0
  80. package/build/client/assets/index-DP2rzg_V.js +2 -0
  81. package/build/client/assets/index-DP2rzg_V.js.map +1 -0
  82. package/build/client/assets/index-DqBktlAI.js +2 -0
  83. package/build/client/assets/index-DqBktlAI.js.map +1 -0
  84. package/build/client/assets/index-K6Dvbx-E.js +2 -0
  85. package/build/client/assets/index-K6Dvbx-E.js.map +1 -0
  86. package/build/client/assets/index-l0sNRNKZ.js +2 -0
  87. package/build/client/assets/index-l0sNRNKZ.js.map +1 -0
  88. package/build/client/assets/index-zG3_j9lj.js +2 -0
  89. package/build/client/assets/index-zG3_j9lj.js.map +1 -0
  90. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js +2 -0
  91. package/build/client/assets/kcd_ws_.js_-l0sNRNKZ.js.map +1 -0
  92. package/build/client/assets/launch-editor-l0sNRNKZ.js +2 -0
  93. package/build/client/assets/launch-editor-l0sNRNKZ.js.map +1 -0
  94. package/build/client/assets/loading-CaagEELb.js +2 -0
  95. package/build/client/assets/loading-CaagEELb.js.map +1 -0
  96. package/build/client/assets/login-2BiFV7_R.js +2 -0
  97. package/build/client/assets/login-2BiFV7_R.js.map +1 -0
  98. package/build/client/assets/login-sse-l0sNRNKZ.js +2 -0
  99. package/build/client/assets/login-sse-l0sNRNKZ.js.map +1 -0
  100. package/build/client/assets/manifest-92896199.js +1 -0
  101. package/build/client/assets/mdx-DdywIxB6.js +2 -0
  102. package/build/client/assets/mdx-DdywIxB6.js.map +1 -0
  103. package/build/client/assets/misc-CXGQ7VS9.js +2 -0
  104. package/build/client/assets/misc-CXGQ7VS9.js.map +1 -0
  105. package/build/client/assets/nav-chevrons-D8c9lJW6.js +2 -0
  106. package/build/client/assets/nav-chevrons-D8c9lJW6.js.map +1 -0
  107. package/build/client/assets/onboarding-eFvyCmxD.js +2 -0
  108. package/build/client/assets/onboarding-eFvyCmxD.js.map +1 -0
  109. package/build/client/assets/presence-u-05JV3Z.js +28 -0
  110. package/build/client/assets/presence-u-05JV3Z.js.map +1 -0
  111. package/build/client/assets/processes-l0sNRNKZ.js +2 -0
  112. package/build/client/assets/processes-l0sNRNKZ.js.map +1 -0
  113. package/build/client/assets/progress-CBZt2pmu.js +2 -0
  114. package/build/client/assets/progress-CBZt2pmu.js.map +1 -0
  115. package/build/client/assets/progress-bar-DX6yYES2.js +2 -0
  116. package/build/client/assets/progress-bar-DX6yYES2.js.map +1 -0
  117. package/build/client/assets/progress-l0sNRNKZ.js +2 -0
  118. package/build/client/assets/progress-l0sNRNKZ.js.map +1 -0
  119. package/build/client/assets/root-BLcghf_N.js +68 -0
  120. package/build/client/assets/root-BLcghf_N.js.map +1 -0
  121. package/build/client/assets/set-playground-l0sNRNKZ.js +2 -0
  122. package/build/client/assets/set-playground-l0sNRNKZ.js.map +1 -0
  123. package/build/client/assets/start-l0sNRNKZ.js +2 -0
  124. package/build/client/assets/start-l0sNRNKZ.js.map +1 -0
  125. package/build/client/assets/support-QTdmLyE7.js +2 -0
  126. package/build/client/assets/support-QTdmLyE7.js.map +1 -0
  127. package/build/client/assets/tailwind-BStGdHyu.css +1 -0
  128. package/build/client/assets/test-l0sNRNKZ.js +2 -0
  129. package/build/client/assets/test-l0sNRNKZ.js.map +1 -0
  130. package/build/client/assets/test._testName-l0sNRNKZ.js +2 -0
  131. package/build/client/assets/test._testName-l0sNRNKZ.js.map +1 -0
  132. package/build/client/assets/tooltip-CVFWPOu0.js +2 -0
  133. package/build/client/assets/tooltip-CVFWPOu0.js.map +1 -0
  134. package/build/client/assets/update-mdx-cache-l0sNRNKZ.js +2 -0
  135. package/build/client/assets/update-mdx-cache-l0sNRNKZ.js.map +1 -0
  136. package/build/client/assets/use-event-source-DXlRuRq2.js +2 -0
  137. package/build/client/assets/use-event-source-DXlRuRq2.js.map +1 -0
  138. package/build/client/assets/user-DiGtbaa7.js +2 -0
  139. package/build/client/assets/user-DiGtbaa7.js.map +1 -0
  140. package/build/client/favicon.ico +0 -0
  141. package/build/client/favicon.png +0 -0
  142. package/build/client/favicon.svg +13 -0
  143. package/build/client/fonts/neogrotesk/0b8b755c-fee2-4661-9c8b-c5d1fbea901b.woff2 +0 -0
  144. package/build/client/fonts/neogrotesk/146d9d20-3e53-4e5d-beb2-1209bba5ac61.woff2 +0 -0
  145. package/build/client/fonts/neogrotesk/1798ef2b-5ee0-4f39-8b2c-ae3e36f07cd1.woff2 +0 -0
  146. package/build/client/fonts/neogrotesk/1eb2cb40-6822-4654-856c-8cbe652366b6.woff +0 -0
  147. package/build/client/fonts/neogrotesk/3b64793c-0bdb-4e4f-bf0e-cdf2e974d5f2.woff +0 -0
  148. package/build/client/fonts/neogrotesk/3bb44ed4-cf17-469c-8d0d-5946d10fdad1.woff +0 -0
  149. package/build/client/fonts/neogrotesk/4bd29470-1701-41fe-94b6-4a147512160c.woff +0 -0
  150. package/build/client/fonts/neogrotesk/5cdbf070-a094-44c8-b8f1-17a00a19c959.woff2 +0 -0
  151. package/build/client/fonts/neogrotesk/6d439be9-37df-4912-ac09-388ce938fa46.woff2 +0 -0
  152. package/build/client/fonts/neogrotesk/7fc2971f-a9c2-4e09-bd24-bfd4ee6e97b3.woff +0 -0
  153. package/build/client/fonts/neogrotesk/861b65ee-56bd-4057-9af4-3b2903af231e.woff +0 -0
  154. package/build/client/fonts/neogrotesk/8cf836d9-a49e-4387-bcbd-4800766e5d24.woff +0 -0
  155. package/build/client/fonts/neogrotesk/8d61128d-534c-4793-9668-b98bcc2e5969.woff2 +0 -0
  156. package/build/client/fonts/neogrotesk/98423f75-c341-4161-8b92-7cd5c05081e5.woff +0 -0
  157. package/build/client/fonts/neogrotesk/a1456726-ad0d-4f5e-9d8f-ce92e8ce375d.woff2 +0 -0
  158. package/build/client/fonts/neogrotesk/af81e7d2-0bb1-4aa0-bc76-adb78338c568.woff +0 -0
  159. package/build/client/fonts/neogrotesk/d1302ad5-ceee-47cb-a0fa-2da6bd0d4d54.woff2 +0 -0
  160. package/build/client/fonts/neogrotesk/e7e15c31-aad1-4384-abd3-0671ccd03251.woff +0 -0
  161. package/build/client/fonts/neogrotesk/ec6cb127-161b-469c-9816-69489032a234.woff2 +0 -0
  162. package/build/client/fonts/neogrotesk/f480430c-6c50-4ae3-9abb-e92c484f84d6.woff2 +0 -0
  163. package/build/client/icons.svg +529 -0
  164. package/build/client/neogrotesk-font.css +100 -0
  165. package/build/server/index.js +12875 -0
  166. package/build/server/index.js.map +1 -0
  167. package/dist/server/index.js +176 -0
  168. package/node_modules/@babel/runtime/LICENSE +22 -0
  169. package/node_modules/@babel/runtime/README.md +19 -0
  170. package/node_modules/@babel/runtime/helpers/AsyncGenerator.js +64 -0
  171. package/node_modules/@babel/runtime/helpers/AwaitValue.js +4 -0
  172. package/node_modules/@babel/runtime/helpers/OverloadYield.js +4 -0
  173. package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +24 -0
  174. package/node_modules/@babel/runtime/helpers/applyDecs.js +236 -0
  175. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +184 -0
  176. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +191 -0
  177. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +222 -0
  178. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +133 -0
  179. package/node_modules/@babel/runtime/helpers/applyDecs2311.js +124 -0
  180. package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +6 -0
  181. package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +4 -0
  182. package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +5 -0
  183. package/node_modules/@babel/runtime/helpers/assertClassBrand.js +5 -0
  184. package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +7 -0
  185. package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +24 -0
  186. package/node_modules/@babel/runtime/helpers/asyncIterator.js +45 -0
  187. package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +31 -0
  188. package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +5 -0
  189. package/node_modules/@babel/runtime/helpers/callSuper.js +7 -0
  190. package/node_modules/@babel/runtime/helpers/checkInRHS.js +6 -0
  191. package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +6 -0
  192. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +18 -0
  193. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +7 -0
  194. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +11 -0
  195. package/node_modules/@babel/runtime/helpers/classCallCheck.js +6 -0
  196. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +5 -0
  197. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +6 -0
  198. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +5 -0
  199. package/node_modules/@babel/runtime/helpers/classNameTDZError.js +4 -0
  200. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +7 -0
  201. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +7 -0
  202. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +5 -0
  203. package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +6 -0
  204. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +7 -0
  205. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +5 -0
  206. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +8 -0
  207. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +5 -0
  208. package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +5 -0
  209. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +6 -0
  210. package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +6 -0
  211. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +4 -0
  212. package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +5 -0
  213. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +9 -0
  214. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +9 -0
  215. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +10 -0
  216. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +6 -0
  217. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +4 -0
  218. package/node_modules/@babel/runtime/helpers/construct.js +10 -0
  219. package/node_modules/@babel/runtime/helpers/createClass.js +19 -0
  220. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +53 -0
  221. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +20 -0
  222. package/node_modules/@babel/runtime/helpers/createSuper.js +18 -0
  223. package/node_modules/@babel/runtime/helpers/decorate.js +343 -0
  224. package/node_modules/@babel/runtime/helpers/defaults.js +12 -0
  225. package/node_modules/@babel/runtime/helpers/defineAccessor.js +8 -0
  226. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +20 -0
  227. package/node_modules/@babel/runtime/helpers/defineProperty.js +16 -0
  228. package/node_modules/@babel/runtime/helpers/dispose.js +28 -0
  229. package/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +63 -0
  230. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +3 -0
  231. package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +3 -0
  232. package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +23 -0
  233. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +235 -0
  234. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +183 -0
  235. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +190 -0
  236. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +221 -0
  237. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +132 -0
  238. package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +123 -0
  239. package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +5 -0
  240. package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +3 -0
  241. package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +4 -0
  242. package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +4 -0
  243. package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +6 -0
  244. package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +23 -0
  245. package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +44 -0
  246. package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +30 -0
  247. package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +4 -0
  248. package/node_modules/@babel/runtime/helpers/esm/callSuper.js +6 -0
  249. package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +5 -0
  250. package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +5 -0
  251. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +17 -0
  252. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +6 -0
  253. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +10 -0
  254. package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +5 -0
  255. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +4 -0
  256. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +5 -0
  257. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +4 -0
  258. package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +3 -0
  259. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +6 -0
  260. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +6 -0
  261. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +4 -0
  262. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  263. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +6 -0
  264. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +4 -0
  265. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +7 -0
  266. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +4 -0
  267. package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +4 -0
  268. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +5 -0
  269. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  270. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +3 -0
  271. package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +4 -0
  272. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +8 -0
  273. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +8 -0
  274. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +9 -0
  275. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  276. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +3 -0
  277. package/node_modules/@babel/runtime/helpers/esm/construct.js +9 -0
  278. package/node_modules/@babel/runtime/helpers/esm/createClass.js +18 -0
  279. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +52 -0
  280. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
  281. package/node_modules/@babel/runtime/helpers/esm/createSuper.js +17 -0
  282. package/node_modules/@babel/runtime/helpers/esm/decorate.js +342 -0
  283. package/node_modules/@babel/runtime/helpers/esm/defaults.js +11 -0
  284. package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +7 -0
  285. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +19 -0
  286. package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +15 -0
  287. package/node_modules/@babel/runtime/helpers/esm/dispose.js +27 -0
  288. package/node_modules/@babel/runtime/helpers/esm/extends.js +14 -0
  289. package/node_modules/@babel/runtime/helpers/esm/get.js +17 -0
  290. package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +6 -0
  291. package/node_modules/@babel/runtime/helpers/esm/identity.js +3 -0
  292. package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +26 -0
  293. package/node_modules/@babel/runtime/helpers/esm/inherits.js +17 -0
  294. package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +6 -0
  295. package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +9 -0
  296. package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +3 -0
  297. package/node_modules/@babel/runtime/helpers/esm/instanceof.js +7 -0
  298. package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +5 -0
  299. package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +26 -0
  300. package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +7 -0
  301. package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +8 -0
  302. package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +3 -0
  303. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +27 -0
  304. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +9 -0
  305. package/node_modules/@babel/runtime/helpers/esm/jsx.js +21 -0
  306. package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +8 -0
  307. package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +5 -0
  308. package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +3 -0
  309. package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +3 -0
  310. package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +3 -0
  311. package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +3 -0
  312. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +16 -0
  313. package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +22 -0
  314. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +16 -0
  315. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  316. package/node_modules/@babel/runtime/helpers/esm/package.json +3 -0
  317. package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +10 -0
  318. package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +3 -0
  319. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +303 -0
  320. package/node_modules/@babel/runtime/helpers/esm/set.js +40 -0
  321. package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +11 -0
  322. package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +7 -0
  323. package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +7 -0
  324. package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +7 -0
  325. package/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +7 -0
  326. package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +8 -0
  327. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +10 -0
  328. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +7 -0
  329. package/node_modules/@babel/runtime/helpers/esm/tdz.js +3 -0
  330. package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +5 -0
  331. package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +1 -0
  332. package/node_modules/@babel/runtime/helpers/esm/toArray.js +7 -0
  333. package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +7 -0
  334. package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +11 -0
  335. package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +6 -0
  336. package/node_modules/@babel/runtime/helpers/esm/toSetter.js +9 -0
  337. package/node_modules/@babel/runtime/helpers/esm/typeof.js +9 -0
  338. package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +9 -0
  339. package/node_modules/@babel/runtime/helpers/esm/using.js +11 -0
  340. package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +43 -0
  341. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +6 -0
  342. package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +30 -0
  343. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +50 -0
  344. package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +3 -0
  345. package/node_modules/@babel/runtime/helpers/extends.js +15 -0
  346. package/node_modules/@babel/runtime/helpers/get.js +18 -0
  347. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +7 -0
  348. package/node_modules/@babel/runtime/helpers/identity.js +4 -0
  349. package/node_modules/@babel/runtime/helpers/importDeferProxy.js +27 -0
  350. package/node_modules/@babel/runtime/helpers/inherits.js +18 -0
  351. package/node_modules/@babel/runtime/helpers/inheritsLoose.js +7 -0
  352. package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +10 -0
  353. package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +4 -0
  354. package/node_modules/@babel/runtime/helpers/instanceof.js +8 -0
  355. package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +6 -0
  356. package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +27 -0
  357. package/node_modules/@babel/runtime/helpers/isNativeFunction.js +8 -0
  358. package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +9 -0
  359. package/node_modules/@babel/runtime/helpers/iterableToArray.js +4 -0
  360. package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +28 -0
  361. package/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +10 -0
  362. package/node_modules/@babel/runtime/helpers/jsx.js +22 -0
  363. package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +9 -0
  364. package/node_modules/@babel/runtime/helpers/newArrowCheck.js +6 -0
  365. package/node_modules/@babel/runtime/helpers/nonIterableRest.js +4 -0
  366. package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +4 -0
  367. package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +4 -0
  368. package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +4 -0
  369. package/node_modules/@babel/runtime/helpers/objectSpread.js +17 -0
  370. package/node_modules/@babel/runtime/helpers/objectSpread2.js +23 -0
  371. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +17 -0
  372. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +13 -0
  373. package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +11 -0
  374. package/node_modules/@babel/runtime/helpers/readOnlyError.js +4 -0
  375. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +304 -0
  376. package/node_modules/@babel/runtime/helpers/set.js +41 -0
  377. package/node_modules/@babel/runtime/helpers/setFunctionName.js +12 -0
  378. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +8 -0
  379. package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +8 -0
  380. package/node_modules/@babel/runtime/helpers/slicedToArray.js +8 -0
  381. package/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +8 -0
  382. package/node_modules/@babel/runtime/helpers/superPropBase.js +9 -0
  383. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +11 -0
  384. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +8 -0
  385. package/node_modules/@babel/runtime/helpers/tdz.js +4 -0
  386. package/node_modules/@babel/runtime/helpers/temporalRef.js +6 -0
  387. package/node_modules/@babel/runtime/helpers/temporalUndefined.js +2 -0
  388. package/node_modules/@babel/runtime/helpers/toArray.js +8 -0
  389. package/node_modules/@babel/runtime/helpers/toConsumableArray.js +8 -0
  390. package/node_modules/@babel/runtime/helpers/toPrimitive.js +12 -0
  391. package/node_modules/@babel/runtime/helpers/toPropertyKey.js +7 -0
  392. package/node_modules/@babel/runtime/helpers/toSetter.js +10 -0
  393. package/node_modules/@babel/runtime/helpers/typeof.js +10 -0
  394. package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +10 -0
  395. package/node_modules/@babel/runtime/helpers/using.js +12 -0
  396. package/node_modules/@babel/runtime/helpers/usingCtx.js +44 -0
  397. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +7 -0
  398. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +31 -0
  399. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +51 -0
  400. package/node_modules/@babel/runtime/helpers/writeOnlyError.js +4 -0
  401. package/node_modules/@babel/runtime/package.json +1065 -0
  402. package/node_modules/@babel/runtime/regenerator/index.js +15 -0
  403. package/node_modules/@conform-to/dom/LICENSE +21 -0
  404. package/node_modules/@conform-to/dom/README +37 -0
  405. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.js +58 -0
  406. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.mjs +51 -0
  407. package/node_modules/@conform-to/dom/dom.d.ts +43 -0
  408. package/node_modules/@conform-to/dom/dom.js +104 -0
  409. package/node_modules/@conform-to/dom/dom.mjs +95 -0
  410. package/node_modules/@conform-to/dom/form.d.ts +147 -0
  411. package/node_modules/@conform-to/dom/form.js +578 -0
  412. package/node_modules/@conform-to/dom/form.mjs +574 -0
  413. package/node_modules/@conform-to/dom/formdata.d.ts +61 -0
  414. package/node_modules/@conform-to/dom/formdata.js +234 -0
  415. package/node_modules/@conform-to/dom/formdata.mjs +220 -0
  416. package/node_modules/@conform-to/dom/index.d.ts +4 -0
  417. package/node_modules/@conform-to/dom/index.js +20 -0
  418. package/node_modules/@conform-to/dom/index.mjs +4 -0
  419. package/node_modules/@conform-to/dom/package.json +42 -0
  420. package/node_modules/@conform-to/dom/submission.d.ts +135 -0
  421. package/node_modules/@conform-to/dom/submission.js +303 -0
  422. package/node_modules/@conform-to/dom/submission.mjs +286 -0
  423. package/node_modules/@conform-to/dom/util.d.ts +3 -0
  424. package/node_modules/@conform-to/dom/util.js +19 -0
  425. package/node_modules/@conform-to/dom/util.mjs +13 -0
  426. package/node_modules/@conform-to/react/LICENSE +21 -0
  427. package/node_modules/@conform-to/react/README +37 -0
  428. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.js +87 -0
  429. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.mjs +78 -0
  430. package/node_modules/@conform-to/react/context.d.ts +72 -0
  431. package/node_modules/@conform-to/react/context.js +258 -0
  432. package/node_modules/@conform-to/react/context.mjs +243 -0
  433. package/node_modules/@conform-to/react/helpers.d.ts +208 -0
  434. package/node_modules/@conform-to/react/helpers.js +222 -0
  435. package/node_modules/@conform-to/react/helpers.mjs +211 -0
  436. package/node_modules/@conform-to/react/hooks.d.ts +34 -0
  437. package/node_modules/@conform-to/react/hooks.js +88 -0
  438. package/node_modules/@conform-to/react/hooks.mjs +79 -0
  439. package/node_modules/@conform-to/react/index.d.ts +5 -0
  440. package/node_modules/@conform-to/react/index.js +30 -0
  441. package/node_modules/@conform-to/react/index.mjs +5 -0
  442. package/node_modules/@conform-to/react/integrations.d.ts +45 -0
  443. package/node_modules/@conform-to/react/integrations.js +285 -0
  444. package/node_modules/@conform-to/react/integrations.mjs +271 -0
  445. package/node_modules/@conform-to/react/package.json +53 -0
  446. package/node_modules/@conform-to/zod/LICENSE +21 -0
  447. package/node_modules/@conform-to/zod/README +37 -0
  448. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.js +58 -0
  449. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.mjs +51 -0
  450. package/node_modules/@conform-to/zod/coercion.d.ts +26 -0
  451. package/node_modules/@conform-to/zod/coercion.js +169 -0
  452. package/node_modules/@conform-to/zod/coercion.mjs +162 -0
  453. package/node_modules/@conform-to/zod/constraint.d.ts +3 -0
  454. package/node_modules/@conform-to/zod/constraint.js +100 -0
  455. package/node_modules/@conform-to/zod/constraint.mjs +96 -0
  456. package/node_modules/@conform-to/zod/index.d.ts +2 -0
  457. package/node_modules/@conform-to/zod/index.js +12 -0
  458. package/node_modules/@conform-to/zod/index.mjs +2 -0
  459. package/node_modules/@conform-to/zod/package.json +46 -0
  460. package/node_modules/@conform-to/zod/parse.d.ts +28 -0
  461. package/node_modules/@conform-to/zod/parse.js +64 -0
  462. package/node_modules/@conform-to/zod/parse.mjs +59 -0
  463. package/node_modules/@epic-web/client-hints/README.md +221 -0
  464. package/node_modules/@epic-web/client-hints/dist/color-scheme.d.ts +12 -0
  465. package/node_modules/@epic-web/client-hints/dist/color-scheme.js +25 -0
  466. package/node_modules/@epic-web/client-hints/dist/index.d.ts +6 -0
  467. package/node_modules/@epic-web/client-hints/dist/index.js +67 -0
  468. package/node_modules/@epic-web/client-hints/dist/reduced-motion.d.ts +12 -0
  469. package/node_modules/@epic-web/client-hints/dist/reduced-motion.js +25 -0
  470. package/node_modules/@epic-web/client-hints/dist/time-zone.d.ts +5 -0
  471. package/node_modules/@epic-web/client-hints/dist/time-zone.js +5 -0
  472. package/node_modules/@epic-web/client-hints/dist/utils.d.ts +9 -0
  473. package/node_modules/@epic-web/client-hints/dist/utils.js +1 -0
  474. package/node_modules/@epic-web/client-hints/package.json +71 -0
  475. package/node_modules/@epic-web/restore-scroll/README.md +103 -0
  476. package/node_modules/@epic-web/restore-scroll/dist/index.d.ts +4 -0
  477. package/node_modules/@epic-web/restore-scroll/dist/index.js +77 -0
  478. package/node_modules/@epic-web/restore-scroll/package.json +64 -0
  479. package/node_modules/@floating-ui/core/LICENSE +20 -0
  480. package/node_modules/@floating-ui/core/README.md +4 -0
  481. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
  482. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1141 -0
  483. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +521 -0
  484. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +521 -0
  485. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1022 -0
  486. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1022 -0
  487. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1160 -0
  488. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
  489. package/node_modules/@floating-ui/core/package.json +62 -0
  490. package/node_modules/@floating-ui/dom/LICENSE +20 -0
  491. package/node_modules/@floating-ui/dom/README.md +4 -0
  492. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
  493. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +816 -0
  494. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +315 -0
  495. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +315 -0
  496. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +679 -0
  497. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +679 -0
  498. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +840 -0
  499. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
  500. package/node_modules/@floating-ui/dom/package.json +70 -0
  501. package/node_modules/@floating-ui/react-dom/LICENSE +20 -0
  502. package/node_modules/@floating-ui/react-dom/README.md +3 -0
  503. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.mts +258 -0
  504. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.ts +258 -0
  505. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +273 -0
  506. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +273 -0
  507. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.js +348 -0
  508. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.min.js +1 -0
  509. package/node_modules/@floating-ui/react-dom/package.json +76 -0
  510. package/node_modules/@floating-ui/utils/LICENSE +20 -0
  511. package/node_modules/@floating-ui/utils/README.md +4 -0
  512. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.browser.min.mjs +1 -0
  513. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.browser.mjs +129 -0
  514. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +98 -0
  515. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +98 -0
  516. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.browser.min.mjs +1 -0
  517. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.browser.mjs +128 -0
  518. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +43 -0
  519. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +43 -0
  520. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +128 -0
  521. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +128 -0
  522. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +153 -0
  523. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
  524. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +129 -0
  525. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +129 -0
  526. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +160 -0
  527. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
  528. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +43 -0
  529. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +128 -0
  530. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +153 -0
  531. package/node_modules/@floating-ui/utils/dom/package.json +6 -0
  532. package/node_modules/@floating-ui/utils/package.json +69 -0
  533. package/node_modules/@radix-ui/number/README.md +13 -0
  534. package/node_modules/@radix-ui/number/dist/index.d.mts +3 -0
  535. package/node_modules/@radix-ui/number/dist/index.d.ts +3 -0
  536. package/node_modules/@radix-ui/number/dist/index.d.ts.map +1 -0
  537. package/node_modules/@radix-ui/number/dist/index.js +13 -0
  538. package/node_modules/@radix-ui/number/dist/index.js.map +1 -0
  539. package/node_modules/@radix-ui/number/dist/index.mjs +9 -0
  540. package/node_modules/@radix-ui/number/dist/index.mjs.map +1 -0
  541. package/node_modules/@radix-ui/number/package.json +41 -0
  542. package/node_modules/@radix-ui/primitive/README.md +13 -0
  543. package/node_modules/@radix-ui/primitive/dist/index.d.mts +5 -0
  544. package/node_modules/@radix-ui/primitive/dist/index.d.ts +5 -0
  545. package/node_modules/@radix-ui/primitive/dist/index.d.ts.map +1 -0
  546. package/node_modules/@radix-ui/primitive/dist/index.js +16 -0
  547. package/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
  548. package/node_modules/@radix-ui/primitive/dist/index.mjs +12 -0
  549. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +1 -0
  550. package/node_modules/@radix-ui/primitive/package.json +41 -0
  551. package/node_modules/@radix-ui/react-accordion/README.md +13 -0
  552. package/node_modules/@radix-ui/react-accordion/dist/index.d.mts +113 -0
  553. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts +113 -0
  554. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts.map +1 -0
  555. package/node_modules/@radix-ui/react-accordion/dist/index.js +342 -0
  556. package/node_modules/@radix-ui/react-accordion/dist/index.js.map +1 -0
  557. package/node_modules/@radix-ui/react-accordion/dist/index.mjs +325 -0
  558. package/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +1 -0
  559. package/node_modules/@radix-ui/react-accordion/package.json +64 -0
  560. package/node_modules/@radix-ui/react-arrow/README.md +13 -0
  561. package/node_modules/@radix-ui/react-arrow/dist/index.d.mts +10 -0
  562. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts +10 -0
  563. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts.map +1 -0
  564. package/node_modules/@radix-ui/react-arrow/dist/index.js +40 -0
  565. package/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
  566. package/node_modules/@radix-ui/react-arrow/dist/index.mjs +32 -0
  567. package/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +1 -0
  568. package/node_modules/@radix-ui/react-arrow/package.json +56 -0
  569. package/node_modules/@radix-ui/react-collapsible/README.md +13 -0
  570. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +32 -0
  571. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +32 -0
  572. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts.map +1 -0
  573. package/node_modules/@radix-ui/react-collapsible/dist/index.js +177 -0
  574. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +1 -0
  575. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +164 -0
  576. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +1 -0
  577. package/node_modules/@radix-ui/react-collapsible/package.json +63 -0
  578. package/node_modules/@radix-ui/react-collection/README.md +13 -0
  579. package/node_modules/@radix-ui/react-collection/dist/index.d.mts +22 -0
  580. package/node_modules/@radix-ui/react-collection/dist/index.d.ts +22 -0
  581. package/node_modules/@radix-ui/react-collection/dist/index.d.ts.map +1 -0
  582. package/node_modules/@radix-ui/react-collection/dist/index.js +117 -0
  583. package/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
  584. package/node_modules/@radix-ui/react-collection/dist/index.mjs +110 -0
  585. package/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -0
  586. package/node_modules/@radix-ui/react-collection/package.json +59 -0
  587. package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
  588. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +14 -0
  589. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +14 -0
  590. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts.map +1 -0
  591. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +36 -0
  592. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
  593. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +31 -0
  594. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +1 -0
  595. package/node_modules/@radix-ui/react-compose-refs/package.json +50 -0
  596. package/node_modules/@radix-ui/react-context/README.md +13 -0
  597. package/node_modules/@radix-ui/react-context/dist/index.d.mts +26 -0
  598. package/node_modules/@radix-ui/react-context/dist/index.d.ts +26 -0
  599. package/node_modules/@radix-ui/react-context/dist/index.d.ts.map +1 -0
  600. package/node_modules/@radix-ui/react-context/dist/index.js +133 -0
  601. package/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
  602. package/node_modules/@radix-ui/react-context/dist/index.mjs +128 -0
  603. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  604. package/node_modules/@radix-ui/react-context/package.json +50 -0
  605. package/node_modules/@radix-ui/react-direction/README.md +13 -0
  606. package/node_modules/@radix-ui/react-direction/dist/index.d.mts +11 -0
  607. package/node_modules/@radix-ui/react-direction/dist/index.d.ts +11 -0
  608. package/node_modules/@radix-ui/react-direction/dist/index.d.ts.map +1 -0
  609. package/node_modules/@radix-ui/react-direction/dist/index.js +29 -0
  610. package/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
  611. package/node_modules/@radix-ui/react-direction/dist/index.mjs +23 -0
  612. package/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -0
  613. package/node_modules/@radix-ui/react-direction/package.json +50 -0
  614. package/node_modules/@radix-ui/react-dismissable-layer/README.md +13 -0
  615. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +51 -0
  616. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +51 -0
  617. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts.map +1 -0
  618. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +293 -0
  619. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
  620. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +283 -0
  621. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
  622. package/node_modules/@radix-ui/react-dismissable-layer/package.json +63 -0
  623. package/node_modules/@radix-ui/react-focus-guards/README.md +13 -0
  624. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +9 -0
  625. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +9 -0
  626. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts.map +1 -0
  627. package/node_modules/@radix-ui/react-focus-guards/dist/index.js +45 -0
  628. package/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
  629. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +39 -0
  630. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
  631. package/node_modules/@radix-ui/react-focus-guards/package.json +50 -0
  632. package/node_modules/@radix-ui/react-focus-scope/README.md +13 -0
  633. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +32 -0
  634. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +32 -0
  635. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts.map +1 -0
  636. package/node_modules/@radix-ui/react-focus-scope/dist/index.js +300 -0
  637. package/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
  638. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +292 -0
  639. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +1 -0
  640. package/node_modules/@radix-ui/react-focus-scope/package.json +58 -0
  641. package/node_modules/@radix-ui/react-id/README.md +13 -0
  642. package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
  643. package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
  644. package/node_modules/@radix-ui/react-id/dist/index.d.ts.map +1 -0
  645. package/node_modules/@radix-ui/react-id/dist/index.js +28 -0
  646. package/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
  647. package/node_modules/@radix-ui/react-id/dist/index.mjs +24 -0
  648. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +1 -0
  649. package/node_modules/@radix-ui/react-id/package.json +51 -0
  650. package/node_modules/@radix-ui/react-popover/README.md +13 -0
  651. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +84 -0
  652. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +84 -0
  653. package/node_modules/@radix-ui/react-popover/dist/index.d.ts.map +1 -0
  654. package/node_modules/@radix-ui/react-popover/dist/index.js +342 -0
  655. package/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -0
  656. package/node_modules/@radix-ui/react-popover/dist/index.mjs +321 -0
  657. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +1 -0
  658. package/node_modules/@radix-ui/react-popover/package.json +70 -0
  659. package/node_modules/@radix-ui/react-popper/README.md +13 -0
  660. package/node_modules/@radix-ui/react-popper/dist/index.d.mts +45 -0
  661. package/node_modules/@radix-ui/react-popper/dist/index.d.ts +45 -0
  662. package/node_modules/@radix-ui/react-popper/dist/index.d.ts.map +1 -0
  663. package/node_modules/@radix-ui/react-popper/dist/index.js +341 -0
  664. package/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
  665. package/node_modules/@radix-ui/react-popper/dist/index.mjs +324 -0
  666. package/node_modules/@radix-ui/react-popper/dist/index.mjs.map +1 -0
  667. package/node_modules/@radix-ui/react-popper/package.json +65 -0
  668. package/node_modules/@radix-ui/react-portal/README.md +13 -0
  669. package/node_modules/@radix-ui/react-portal/dist/index.d.mts +14 -0
  670. package/node_modules/@radix-ui/react-portal/dist/index.d.ts +14 -0
  671. package/node_modules/@radix-ui/react-portal/dist/index.d.ts.map +1 -0
  672. package/node_modules/@radix-ui/react-portal/dist/index.js +37 -0
  673. package/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
  674. package/node_modules/@radix-ui/react-portal/dist/index.mjs +29 -0
  675. package/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
  676. package/node_modules/@radix-ui/react-portal/package.json +56 -0
  677. package/node_modules/@radix-ui/react-presence/README.md +13 -0
  678. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +10 -0
  679. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +10 -0
  680. package/node_modules/@radix-ui/react-presence/dist/index.d.ts.map +1 -0
  681. package/node_modules/@radix-ui/react-presence/dist/index.js +143 -0
  682. package/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
  683. package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
  684. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  685. package/node_modules/@radix-ui/react-presence/package.json +57 -0
  686. package/node_modules/@radix-ui/react-primitive/README.md +13 -0
  687. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +53 -0
  688. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +53 -0
  689. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts.map +1 -0
  690. package/node_modules/@radix-ui/react-primitive/dist/index.js +105 -0
  691. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
  692. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +96 -0
  693. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -0
  694. package/node_modules/@radix-ui/react-primitive/package.json +59 -0
  695. package/node_modules/@radix-ui/react-roving-focus/README.md +13 -0
  696. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts +43 -0
  697. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts +43 -0
  698. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts.map +1 -0
  699. package/node_modules/@radix-ui/react-roving-focus/dist/index.js +268 -0
  700. package/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
  701. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +257 -0
  702. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -0
  703. package/node_modules/@radix-ui/react-roving-focus/package.json +64 -0
  704. package/node_modules/@radix-ui/react-select/README.md +13 -0
  705. package/node_modules/@radix-ui/react-select/dist/index.d.mts +132 -0
  706. package/node_modules/@radix-ui/react-select/dist/index.d.ts +132 -0
  707. package/node_modules/@radix-ui/react-select/dist/index.d.ts.map +1 -0
  708. package/node_modules/@radix-ui/react-select/dist/index.js +1310 -0
  709. package/node_modules/@radix-ui/react-select/dist/index.js.map +1 -0
  710. package/node_modules/@radix-ui/react-select/dist/index.mjs +1271 -0
  711. package/node_modules/@radix-ui/react-select/dist/index.mjs.map +1 -0
  712. package/node_modules/@radix-ui/react-select/package.json +76 -0
  713. package/node_modules/@radix-ui/react-slot/README.md +13 -0
  714. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +11 -0
  715. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +11 -0
  716. package/node_modules/@radix-ui/react-slot/dist/index.d.ts.map +1 -0
  717. package/node_modules/@radix-ui/react-slot/dist/index.js +98 -0
  718. package/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
  719. package/node_modules/@radix-ui/react-slot/dist/index.mjs +89 -0
  720. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -0
  721. package/node_modules/@radix-ui/react-slot/package.json +51 -0
  722. package/node_modules/@radix-ui/react-tabs/README.md +13 -0
  723. package/node_modules/@radix-ui/react-tabs/dist/index.d.mts +55 -0
  724. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts +55 -0
  725. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts.map +1 -0
  726. package/node_modules/@radix-ui/react-tabs/dist/index.js +198 -0
  727. package/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
  728. package/node_modules/@radix-ui/react-tabs/dist/index.mjs +183 -0
  729. package/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
  730. package/node_modules/@radix-ui/react-tabs/package.json +63 -0
  731. package/node_modules/@radix-ui/react-toast/README.md +13 -0
  732. package/node_modules/@radix-ui/react-toast/dist/index.d.mts +119 -0
  733. package/node_modules/@radix-ui/react-toast/dist/index.d.ts +119 -0
  734. package/node_modules/@radix-ui/react-toast/dist/index.d.ts.map +1 -0
  735. package/node_modules/@radix-ui/react-toast/dist/index.js +751 -0
  736. package/node_modules/@radix-ui/react-toast/dist/index.js.map +1 -0
  737. package/node_modules/@radix-ui/react-toast/dist/index.mjs +730 -0
  738. package/node_modules/@radix-ui/react-toast/dist/index.mjs.map +1 -0
  739. package/node_modules/@radix-ui/react-toast/package.json +67 -0
  740. package/node_modules/@radix-ui/react-use-callback-ref/README.md +13 -0
  741. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts +7 -0
  742. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts +7 -0
  743. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts.map +1 -0
  744. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +27 -0
  745. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
  746. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +23 -0
  747. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +1 -0
  748. package/node_modules/@radix-ui/react-use-callback-ref/package.json +50 -0
  749. package/node_modules/@radix-ui/react-use-controllable-state/README.md +13 -0
  750. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +9 -0
  751. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +9 -0
  752. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts.map +1 -0
  753. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -0
  754. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
  755. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +53 -0
  756. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -0
  757. package/node_modules/@radix-ui/react-use-controllable-state/package.json +51 -0
  758. package/node_modules/@radix-ui/react-use-escape-keydown/README.md +13 -0
  759. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts +6 -0
  760. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts +6 -0
  761. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts.map +1 -0
  762. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +31 -0
  763. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
  764. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +27 -0
  765. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +1 -0
  766. package/node_modules/@radix-ui/react-use-escape-keydown/package.json +51 -0
  767. package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
  768. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +11 -0
  769. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +11 -0
  770. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts.map +1 -0
  771. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +20 -0
  772. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
  773. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +16 -0
  774. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +1 -0
  775. package/node_modules/@radix-ui/react-use-layout-effect/package.json +50 -0
  776. package/node_modules/@radix-ui/react-use-previous/README.md +13 -0
  777. package/node_modules/@radix-ui/react-use-previous/dist/index.d.mts +3 -0
  778. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts +3 -0
  779. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts.map +1 -0
  780. package/node_modules/@radix-ui/react-use-previous/dist/index.js +30 -0
  781. package/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
  782. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs +26 -0
  783. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +1 -0
  784. package/node_modules/@radix-ui/react-use-previous/package.json +50 -0
  785. package/node_modules/@radix-ui/react-use-rect/README.md +13 -0
  786. package/node_modules/@radix-ui/react-use-rect/dist/index.d.mts +8 -0
  787. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts +8 -0
  788. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts.map +1 -0
  789. package/node_modules/@radix-ui/react-use-rect/dist/index.js +34 -0
  790. package/node_modules/@radix-ui/react-use-rect/dist/index.js.map +1 -0
  791. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs +30 -0
  792. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map +1 -0
  793. package/node_modules/@radix-ui/react-use-rect/package.json +51 -0
  794. package/node_modules/@radix-ui/react-use-size/README.md +13 -0
  795. package/node_modules/@radix-ui/react-use-size/dist/index.d.mts +6 -0
  796. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts +6 -0
  797. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts.map +1 -0
  798. package/node_modules/@radix-ui/react-use-size/dist/index.js +61 -0
  799. package/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
  800. package/node_modules/@radix-ui/react-use-size/dist/index.mjs +57 -0
  801. package/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +1 -0
  802. package/node_modules/@radix-ui/react-use-size/package.json +54 -0
  803. package/node_modules/@radix-ui/react-visually-hidden/README.md +13 -0
  804. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts +10 -0
  805. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts +10 -0
  806. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts.map +1 -0
  807. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js +47 -0
  808. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
  809. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +39 -0
  810. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -0
  811. package/node_modules/@radix-ui/react-visually-hidden/package.json +56 -0
  812. package/node_modules/@radix-ui/rect/README.md +13 -0
  813. package/node_modules/@radix-ui/rect/dist/index.d.mts +16 -0
  814. package/node_modules/@radix-ui/rect/dist/index.d.ts +16 -0
  815. package/node_modules/@radix-ui/rect/dist/index.d.ts.map +1 -0
  816. package/node_modules/@radix-ui/rect/dist/index.js +70 -0
  817. package/node_modules/@radix-ui/rect/dist/index.js.map +1 -0
  818. package/node_modules/@radix-ui/rect/dist/index.mjs +66 -0
  819. package/node_modules/@radix-ui/rect/dist/index.mjs.map +1 -0
  820. package/node_modules/@radix-ui/rect/package.json +41 -0
  821. package/node_modules/@remix-run/react/CHANGELOG.md +907 -0
  822. package/node_modules/@remix-run/react/LICENSE.md +22 -0
  823. package/node_modules/@remix-run/react/README.md +13 -0
  824. package/node_modules/@remix-run/react/dist/_virtual/_rollupPluginBabelHelpers.js +30 -0
  825. package/node_modules/@remix-run/react/dist/browser.d.ts +35 -0
  826. package/node_modules/@remix-run/react/dist/browser.js +221 -0
  827. package/node_modules/@remix-run/react/dist/components.d.ts +128 -0
  828. package/node_modules/@remix-run/react/dist/components.js +874 -0
  829. package/node_modules/@remix-run/react/dist/data.d.ts +14 -0
  830. package/node_modules/@remix-run/react/dist/data.js +275 -0
  831. package/node_modules/@remix-run/react/dist/entry.d.ts +38 -0
  832. package/node_modules/@remix-run/react/dist/errorBoundaries.d.ts +33 -0
  833. package/node_modules/@remix-run/react/dist/errorBoundaries.js +165 -0
  834. package/node_modules/@remix-run/react/dist/errors.d.ts +2 -0
  835. package/node_modules/@remix-run/react/dist/errors.js +53 -0
  836. package/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js +26 -0
  837. package/node_modules/@remix-run/react/dist/esm/browser.js +261 -0
  838. package/node_modules/@remix-run/react/dist/esm/components.js +841 -0
  839. package/node_modules/@remix-run/react/dist/esm/data.js +263 -0
  840. package/node_modules/@remix-run/react/dist/esm/errorBoundaries.js +139 -0
  841. package/node_modules/@remix-run/react/dist/esm/errors.js +49 -0
  842. package/node_modules/@remix-run/react/dist/esm/fallback.js +35 -0
  843. package/node_modules/@remix-run/react/dist/esm/index.js +16 -0
  844. package/node_modules/@remix-run/react/dist/esm/invariant.js +17 -0
  845. package/node_modules/@remix-run/react/dist/esm/links.js +258 -0
  846. package/node_modules/@remix-run/react/dist/esm/markup.js +34 -0
  847. package/node_modules/@remix-run/react/dist/esm/routeModules.js +89 -0
  848. package/node_modules/@remix-run/react/dist/esm/routes.js +407 -0
  849. package/node_modules/@remix-run/react/dist/esm/scroll-restoration.js +84 -0
  850. package/node_modules/@remix-run/react/dist/esm/server.js +84 -0
  851. package/node_modules/@remix-run/react/dist/fallback.d.ts +2 -0
  852. package/node_modules/@remix-run/react/dist/fallback.js +59 -0
  853. package/node_modules/@remix-run/react/dist/index.d.ts +14 -0
  854. package/node_modules/@remix-run/react/dist/index.js +224 -0
  855. package/node_modules/@remix-run/react/dist/invariant.d.ts +2 -0
  856. package/node_modules/@remix-run/react/dist/invariant.js +19 -0
  857. package/node_modules/@remix-run/react/dist/links.d.ts +128 -0
  858. package/node_modules/@remix-run/react/dist/links.js +268 -0
  859. package/node_modules/@remix-run/react/dist/markup.d.ts +5 -0
  860. package/node_modules/@remix-run/react/dist/markup.js +39 -0
  861. package/node_modules/@remix-run/react/dist/routeModules.d.ts +132 -0
  862. package/node_modules/@remix-run/react/dist/routeModules.js +111 -0
  863. package/node_modules/@remix-run/react/dist/routes.d.ts +32 -0
  864. package/node_modules/@remix-run/react/dist/routes.js +434 -0
  865. package/node_modules/@remix-run/react/dist/scroll-restoration.d.ts +12 -0
  866. package/node_modules/@remix-run/react/dist/scroll-restoration.js +108 -0
  867. package/node_modules/@remix-run/react/dist/server.d.ts +13 -0
  868. package/node_modules/@remix-run/react/dist/server.js +108 -0
  869. package/node_modules/@remix-run/react/dist/tsconfig.tsbuildinfo +1 -0
  870. package/node_modules/@remix-run/react/dist/warnings.d.ts +1 -0
  871. package/node_modules/@remix-run/react/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  872. package/node_modules/@remix-run/react/node_modules/@remix-run/router/LICENSE.md +23 -0
  873. package/node_modules/@remix-run/react/node_modules/@remix-run/router/README.md +135 -0
  874. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  875. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  876. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  877. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  878. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  879. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.js +4327 -0
  880. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.js.map +1 -0
  881. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  882. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  883. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  884. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  885. package/node_modules/@remix-run/react/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  886. package/node_modules/@remix-run/react/node_modules/@remix-run/router/history.ts +746 -0
  887. package/node_modules/@remix-run/react/node_modules/@remix-run/router/index.ts +96 -0
  888. package/node_modules/@remix-run/react/node_modules/@remix-run/router/package.json +33 -0
  889. package/node_modules/@remix-run/react/node_modules/@remix-run/router/router.ts +4915 -0
  890. package/node_modules/@remix-run/react/node_modules/@remix-run/router/utils.ts +1598 -0
  891. package/node_modules/@remix-run/react/package.json +52 -0
  892. package/node_modules/@remix-run/server-runtime/CHANGELOG.md +957 -0
  893. package/node_modules/@remix-run/server-runtime/LICENSE.md +22 -0
  894. package/node_modules/@remix-run/server-runtime/README.md +26 -0
  895. package/node_modules/@remix-run/server-runtime/dist/build.d.ts +38 -0
  896. package/node_modules/@remix-run/server-runtime/dist/cookies.d.ts +69 -0
  897. package/node_modules/@remix-run/server-runtime/dist/cookies.js +173 -0
  898. package/node_modules/@remix-run/server-runtime/dist/crypto.d.ts +2 -0
  899. package/node_modules/@remix-run/server-runtime/dist/data.d.ts +28 -0
  900. package/node_modules/@remix-run/server-runtime/dist/data.js +114 -0
  901. package/node_modules/@remix-run/server-runtime/dist/dev.d.ts +10 -0
  902. package/node_modules/@remix-run/server-runtime/dist/dev.js +53 -0
  903. package/node_modules/@remix-run/server-runtime/dist/entry.d.ts +30 -0
  904. package/node_modules/@remix-run/server-runtime/dist/entry.js +22 -0
  905. package/node_modules/@remix-run/server-runtime/dist/errors.d.ts +51 -0
  906. package/node_modules/@remix-run/server-runtime/dist/errors.js +122 -0
  907. package/node_modules/@remix-run/server-runtime/dist/esm/cookies.js +168 -0
  908. package/node_modules/@remix-run/server-runtime/dist/esm/data.js +109 -0
  909. package/node_modules/@remix-run/server-runtime/dist/esm/dev.js +46 -0
  910. package/node_modules/@remix-run/server-runtime/dist/esm/entry.js +18 -0
  911. package/node_modules/@remix-run/server-runtime/dist/esm/errors.js +115 -0
  912. package/node_modules/@remix-run/server-runtime/dist/esm/formData.js +55 -0
  913. package/node_modules/@remix-run/server-runtime/dist/esm/headers.js +90 -0
  914. package/node_modules/@remix-run/server-runtime/dist/esm/index.js +20 -0
  915. package/node_modules/@remix-run/server-runtime/dist/esm/invariant.js +18 -0
  916. package/node_modules/@remix-run/server-runtime/dist/esm/markup.js +29 -0
  917. package/node_modules/@remix-run/server-runtime/dist/esm/mode.js +24 -0
  918. package/node_modules/@remix-run/server-runtime/dist/esm/responses.js +123 -0
  919. package/node_modules/@remix-run/server-runtime/dist/esm/routeMatching.js +23 -0
  920. package/node_modules/@remix-run/server-runtime/dist/esm/routes.js +77 -0
  921. package/node_modules/@remix-run/server-runtime/dist/esm/server.js +343 -0
  922. package/node_modules/@remix-run/server-runtime/dist/esm/serverHandoff.js +20 -0
  923. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js +51 -0
  924. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js +61 -0
  925. package/node_modules/@remix-run/server-runtime/dist/esm/sessions.js +145 -0
  926. package/node_modules/@remix-run/server-runtime/dist/esm/upload/errors.js +19 -0
  927. package/node_modules/@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js +50 -0
  928. package/node_modules/@remix-run/server-runtime/dist/esm/warnings.js +19 -0
  929. package/node_modules/@remix-run/server-runtime/dist/formData.d.ts +15 -0
  930. package/node_modules/@remix-run/server-runtime/dist/formData.js +60 -0
  931. package/node_modules/@remix-run/server-runtime/dist/headers.d.ts +3 -0
  932. package/node_modules/@remix-run/server-runtime/dist/headers.js +94 -0
  933. package/node_modules/@remix-run/server-runtime/dist/index.d.ts +12 -0
  934. package/node_modules/@remix-run/server-runtime/dist/index.js +46 -0
  935. package/node_modules/@remix-run/server-runtime/dist/interface.d.ts +6 -0
  936. package/node_modules/@remix-run/server-runtime/dist/invariant.d.ts +2 -0
  937. package/node_modules/@remix-run/server-runtime/dist/invariant.js +22 -0
  938. package/node_modules/@remix-run/server-runtime/dist/jsonify.d.ts +33 -0
  939. package/node_modules/@remix-run/server-runtime/dist/links.d.ts +104 -0
  940. package/node_modules/@remix-run/server-runtime/dist/markup.d.ts +1 -0
  941. package/node_modules/@remix-run/server-runtime/dist/markup.js +33 -0
  942. package/node_modules/@remix-run/server-runtime/dist/mode.d.ts +9 -0
  943. package/node_modules/@remix-run/server-runtime/dist/mode.js +29 -0
  944. package/node_modules/@remix-run/server-runtime/dist/reexport.d.ts +14 -0
  945. package/node_modules/@remix-run/server-runtime/dist/responses.d.ts +47 -0
  946. package/node_modules/@remix-run/server-runtime/dist/responses.js +135 -0
  947. package/node_modules/@remix-run/server-runtime/dist/routeMatching.d.ts +8 -0
  948. package/node_modules/@remix-run/server-runtime/dist/routeMatching.js +27 -0
  949. package/node_modules/@remix-run/server-runtime/dist/routeModules.d.ts +211 -0
  950. package/node_modules/@remix-run/server-runtime/dist/routes.d.ts +31 -0
  951. package/node_modules/@remix-run/server-runtime/dist/routes.js +82 -0
  952. package/node_modules/@remix-run/server-runtime/dist/serialize.d.ts +25 -0
  953. package/node_modules/@remix-run/server-runtime/dist/server.d.ts +5 -0
  954. package/node_modules/@remix-run/server-runtime/dist/server.js +347 -0
  955. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.d.ts +12 -0
  956. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.js +24 -0
  957. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.d.ts +23 -0
  958. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js +55 -0
  959. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.d.ts +20 -0
  960. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.js +65 -0
  961. package/node_modules/@remix-run/server-runtime/dist/sessions.d.ts +143 -0
  962. package/node_modules/@remix-run/server-runtime/dist/sessions.js +152 -0
  963. package/node_modules/@remix-run/server-runtime/dist/tsconfig.tsbuildinfo +1 -0
  964. package/node_modules/@remix-run/server-runtime/dist/typecheck.d.ts +4 -0
  965. package/node_modules/@remix-run/server-runtime/dist/upload/errors.d.ts +5 -0
  966. package/node_modules/@remix-run/server-runtime/dist/upload/errors.js +23 -0
  967. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.d.ts +21 -0
  968. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.js +54 -0
  969. package/node_modules/@remix-run/server-runtime/dist/warnings.d.ts +1 -0
  970. package/node_modules/@remix-run/server-runtime/dist/warnings.js +23 -0
  971. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  972. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/LICENSE.md +23 -0
  973. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/README.md +135 -0
  974. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  975. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  976. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  977. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  978. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  979. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.js +4327 -0
  980. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.js.map +1 -0
  981. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  982. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  983. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  984. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  985. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  986. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/history.ts +746 -0
  987. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/index.ts +96 -0
  988. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/package.json +33 -0
  989. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/router.ts +4915 -0
  990. package/node_modules/@remix-run/server-runtime/node_modules/@remix-run/router/utils.ts +1598 -0
  991. package/node_modules/@remix-run/server-runtime/package.json +47 -0
  992. package/node_modules/@types/cookie/LICENSE +21 -0
  993. package/node_modules/@types/cookie/README.md +15 -0
  994. package/node_modules/@types/cookie/index.d.ts +154 -0
  995. package/node_modules/@types/cookie/package.json +30 -0
  996. package/node_modules/@web3-storage/multipart-parser/README.md +37 -0
  997. package/node_modules/@web3-storage/multipart-parser/cjs/src/index.js +218 -0
  998. package/node_modules/@web3-storage/multipart-parser/cjs/src/search.js +269 -0
  999. package/node_modules/@web3-storage/multipart-parser/cjs/src/utils.js +37 -0
  1000. package/node_modules/@web3-storage/multipart-parser/esm/package.json +4 -0
  1001. package/node_modules/@web3-storage/multipart-parser/esm/src/index.js +219 -0
  1002. package/node_modules/@web3-storage/multipart-parser/esm/src/search.js +269 -0
  1003. package/node_modules/@web3-storage/multipart-parser/esm/src/utils.js +28 -0
  1004. package/node_modules/@web3-storage/multipart-parser/index.js +1 -0
  1005. package/node_modules/@web3-storage/multipart-parser/package.json +44 -0
  1006. package/node_modules/@web3-storage/multipart-parser/src/index.js +257 -0
  1007. package/node_modules/@web3-storage/multipart-parser/src/search.js +329 -0
  1008. package/node_modules/@web3-storage/multipart-parser/src/utils.js +43 -0
  1009. package/node_modules/@web3-storage/multipart-parser/test/test.spec.js +65 -0
  1010. package/node_modules/@web3-storage/multipart-parser/tsconfig.json +41 -0
  1011. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts +15 -0
  1012. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts.map +1 -0
  1013. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts +36 -0
  1014. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts.map +1 -0
  1015. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts +18 -0
  1016. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts.map +1 -0
  1017. package/node_modules/aria-hidden/LICENSE +21 -0
  1018. package/node_modules/aria-hidden/README.md +99 -0
  1019. package/node_modules/aria-hidden/dist/es2015/index.d.ts +29 -0
  1020. package/node_modules/aria-hidden/dist/es2015/index.js +166 -0
  1021. package/node_modules/aria-hidden/dist/es2019/index.d.ts +29 -0
  1022. package/node_modules/aria-hidden/dist/es2019/index.js +155 -0
  1023. package/node_modules/aria-hidden/dist/es5/index.d.ts +29 -0
  1024. package/node_modules/aria-hidden/dist/es5/index.js +173 -0
  1025. package/node_modules/aria-hidden/package.json +70 -0
  1026. package/node_modules/assertion-error/LICENSE +21 -0
  1027. package/node_modules/assertion-error/README.md +68 -0
  1028. package/node_modules/assertion-error/index.d.ts +27 -0
  1029. package/node_modules/assertion-error/index.js +60 -0
  1030. package/node_modules/assertion-error/package.json +32 -0
  1031. package/node_modules/chai/CODEOWNERS +1 -0
  1032. package/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
  1033. package/node_modules/chai/CONTRIBUTING.md +218 -0
  1034. package/node_modules/chai/History.md +1059 -0
  1035. package/node_modules/chai/LICENSE +21 -0
  1036. package/node_modules/chai/README.md +154 -0
  1037. package/node_modules/chai/ReleaseNotes.md +737 -0
  1038. package/node_modules/chai/chai.js +3992 -0
  1039. package/node_modules/chai/index.js +1 -0
  1040. package/node_modules/chai/lib/chai/assertion.js +164 -0
  1041. package/node_modules/chai/lib/chai/config.js +120 -0
  1042. package/node_modules/chai/lib/chai/core/assertions.js +3937 -0
  1043. package/node_modules/chai/lib/chai/interface/assert.js +3003 -0
  1044. package/node_modules/chai/lib/chai/interface/expect.js +50 -0
  1045. package/node_modules/chai/lib/chai/interface/should.js +211 -0
  1046. package/node_modules/chai/lib/chai/utils/addChainableMethod.js +148 -0
  1047. package/node_modules/chai/lib/chai/utils/addLengthGuard.js +60 -0
  1048. package/node_modules/chai/lib/chai/utils/addMethod.js +68 -0
  1049. package/node_modules/chai/lib/chai/utils/addProperty.js +72 -0
  1050. package/node_modules/chai/lib/chai/utils/compareByInspect.js +27 -0
  1051. package/node_modules/chai/lib/chai/utils/expectTypes.js +51 -0
  1052. package/node_modules/chai/lib/chai/utils/flag.js +33 -0
  1053. package/node_modules/chai/lib/chai/utils/getActual.js +20 -0
  1054. package/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
  1055. package/node_modules/chai/lib/chai/utils/getMessage.js +46 -0
  1056. package/node_modules/chai/lib/chai/utils/getOperator.js +54 -0
  1057. package/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +25 -0
  1058. package/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +27 -0
  1059. package/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
  1060. package/node_modules/chai/lib/chai/utils/index.js +91 -0
  1061. package/node_modules/chai/lib/chai/utils/inspect.js +30 -0
  1062. package/node_modules/chai/lib/chai/utils/isNaN.js +26 -0
  1063. package/node_modules/chai/lib/chai/utils/isProxyEnabled.js +24 -0
  1064. package/node_modules/chai/lib/chai/utils/objDisplay.js +47 -0
  1065. package/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +69 -0
  1066. package/node_modules/chai/lib/chai/utils/overwriteMethod.js +92 -0
  1067. package/node_modules/chai/lib/chai/utils/overwriteProperty.js +92 -0
  1068. package/node_modules/chai/lib/chai/utils/proxify.js +147 -0
  1069. package/node_modules/chai/lib/chai/utils/test.js +24 -0
  1070. package/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
  1071. package/node_modules/chai/lib/chai/utils/type-detect.js +16 -0
  1072. package/node_modules/chai/lib/chai.js +65 -0
  1073. package/node_modules/chai/package.json +58 -0
  1074. package/node_modules/chai/register-assert.cjs +3 -0
  1075. package/node_modules/chai/register-assert.js +3 -0
  1076. package/node_modules/chai/register-expect.cjs +3 -0
  1077. package/node_modules/chai/register-expect.js +3 -0
  1078. package/node_modules/chai/register-should.cjs +3 -0
  1079. package/node_modules/chai/register-should.js +3 -0
  1080. package/node_modules/chai/web-test-runner.config.js +17 -0
  1081. package/node_modules/chai-dom/.eslintrc +22 -0
  1082. package/node_modules/chai-dom/.travis.yml +15 -0
  1083. package/node_modules/chai-dom/LICENSE +24 -0
  1084. package/node_modules/chai-dom/README.md +267 -0
  1085. package/node_modules/chai-dom/bower.json +31 -0
  1086. package/node_modules/chai-dom/chai-dom.js +429 -0
  1087. package/node_modules/chai-dom/package.json +44 -0
  1088. package/node_modules/chai-dom/test/.eslintrc +12 -0
  1089. package/node_modules/chai-dom/test/index.html +27 -0
  1090. package/node_modules/chai-dom/test/tests.js +1124 -0
  1091. package/node_modules/chai-dom/testem.js +31 -0
  1092. package/node_modules/check-error/LICENSE +19 -0
  1093. package/node_modules/check-error/README.md +204 -0
  1094. package/node_modules/check-error/index.js +125 -0
  1095. package/node_modules/check-error/package.json +79 -0
  1096. package/node_modules/clsx/clsx.d.mts +6 -0
  1097. package/node_modules/clsx/clsx.d.ts +10 -0
  1098. package/node_modules/clsx/dist/clsx.js +1 -0
  1099. package/node_modules/clsx/dist/clsx.min.js +1 -0
  1100. package/node_modules/clsx/dist/clsx.mjs +1 -0
  1101. package/node_modules/clsx/dist/lite.js +1 -0
  1102. package/node_modules/clsx/dist/lite.mjs +1 -0
  1103. package/node_modules/clsx/license +9 -0
  1104. package/node_modules/clsx/package.json +60 -0
  1105. package/node_modules/clsx/readme.md +154 -0
  1106. package/node_modules/cookie/HISTORY.md +147 -0
  1107. package/node_modules/cookie/LICENSE +24 -0
  1108. package/node_modules/cookie/README.md +317 -0
  1109. package/node_modules/cookie/SECURITY.md +25 -0
  1110. package/node_modules/cookie/index.js +274 -0
  1111. package/node_modules/cookie/package.json +44 -0
  1112. package/node_modules/deep-eql/LICENSE +19 -0
  1113. package/node_modules/deep-eql/README.md +93 -0
  1114. package/node_modules/deep-eql/index.js +508 -0
  1115. package/node_modules/deep-eql/package.json +73 -0
  1116. package/node_modules/detect-node-es/LICENSE +21 -0
  1117. package/node_modules/detect-node-es/Readme.md +39 -0
  1118. package/node_modules/detect-node-es/es5/browser.js +2 -0
  1119. package/node_modules/detect-node-es/es5/node.d.ts +4 -0
  1120. package/node_modules/detect-node-es/es5/node.js +2 -0
  1121. package/node_modules/detect-node-es/esm/browser.js +2 -0
  1122. package/node_modules/detect-node-es/esm/node.js +2 -0
  1123. package/node_modules/detect-node-es/package.json +29 -0
  1124. package/node_modules/framer-motion/LICENSE.md +21 -0
  1125. package/node_modules/framer-motion/README.md +105 -0
  1126. package/node_modules/framer-motion/dist/cjs/dom-entry.js +53 -0
  1127. package/node_modules/framer-motion/dist/cjs/index-legacy-94465f57.js +5926 -0
  1128. package/node_modules/framer-motion/dist/cjs/index.js +6391 -0
  1129. package/node_modules/framer-motion/dist/dom-entry.d.ts +951 -0
  1130. package/node_modules/framer-motion/dist/dom.js +1 -0
  1131. package/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +81 -0
  1132. package/node_modules/framer-motion/dist/es/animation/animate.mjs +83 -0
  1133. package/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +295 -0
  1134. package/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +84 -0
  1135. package/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +378 -0
  1136. package/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +17 -0
  1137. package/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +33 -0
  1138. package/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs +31 -0
  1139. package/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs +23 -0
  1140. package/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +12 -0
  1141. package/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs +87 -0
  1142. package/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs +51 -0
  1143. package/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs +89 -0
  1144. package/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs +131 -0
  1145. package/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +17 -0
  1146. package/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs +9 -0
  1147. package/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs +80 -0
  1148. package/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs +17 -0
  1149. package/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +62 -0
  1150. package/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs +41 -0
  1151. package/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs +109 -0
  1152. package/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs +11 -0
  1153. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +80 -0
  1154. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +66 -0
  1155. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs +29 -0
  1156. package/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +6 -0
  1157. package/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +62 -0
  1158. package/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs +80 -0
  1159. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +3 -0
  1160. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs +3 -0
  1161. package/node_modules/framer-motion/dist/es/animation/sequence/create.mjs +227 -0
  1162. package/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +21 -0
  1163. package/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs +31 -0
  1164. package/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs +14 -0
  1165. package/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs +32 -0
  1166. package/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs +40 -0
  1167. package/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs +30 -0
  1168. package/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +7 -0
  1169. package/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +5 -0
  1170. package/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +5 -0
  1171. package/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs +15 -0
  1172. package/node_modules/framer-motion/dist/es/animation/utils/stagger.mjs +26 -0
  1173. package/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs +13 -0
  1174. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs +75 -0
  1175. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs +56 -0
  1176. package/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs +169 -0
  1177. package/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +66 -0
  1178. package/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs +14 -0
  1179. package/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs +31 -0
  1180. package/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs +67 -0
  1181. package/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs +43 -0
  1182. package/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs +53 -0
  1183. package/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs +33 -0
  1184. package/node_modules/framer-motion/dist/es/components/Reorder/index.mjs +9 -0
  1185. package/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +24 -0
  1186. package/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs +10 -0
  1187. package/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs +5 -0
  1188. package/node_modules/framer-motion/dist/es/context/LazyContext.mjs +5 -0
  1189. package/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs +12 -0
  1190. package/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs +13 -0
  1191. package/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs +5 -0
  1192. package/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs +17 -0
  1193. package/node_modules/framer-motion/dist/es/context/PresenceContext.mjs +8 -0
  1194. package/node_modules/framer-motion/dist/es/context/ReorderContext.mjs +5 -0
  1195. package/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +8 -0
  1196. package/node_modules/framer-motion/dist/es/debug/record.mjs +7 -0
  1197. package/node_modules/framer-motion/dist/es/dom-entry.mjs +25 -0
  1198. package/node_modules/framer-motion/dist/es/easing/anticipate.mjs +5 -0
  1199. package/node_modules/framer-motion/dist/es/easing/back.mjs +9 -0
  1200. package/node_modules/framer-motion/dist/es/easing/circ.mjs +8 -0
  1201. package/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs +51 -0
  1202. package/node_modules/framer-motion/dist/es/easing/ease.mjs +7 -0
  1203. package/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs +5 -0
  1204. package/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs +5 -0
  1205. package/node_modules/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +18 -0
  1206. package/node_modules/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +8 -0
  1207. package/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +3 -0
  1208. package/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs +5 -0
  1209. package/node_modules/framer-motion/dist/es/easing/utils/map.mjs +37 -0
  1210. package/node_modules/framer-motion/dist/es/events/add-dom-event.mjs +6 -0
  1211. package/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs +8 -0
  1212. package/node_modules/framer-motion/dist/es/events/event-info.mjs +15 -0
  1213. package/node_modules/framer-motion/dist/es/events/use-dom-event.mjs +34 -0
  1214. package/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs +18 -0
  1215. package/node_modules/framer-motion/dist/es/frameloop/batcher.mjs +65 -0
  1216. package/node_modules/framer-motion/dist/es/frameloop/frame.mjs +6 -0
  1217. package/node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs +20 -0
  1218. package/node_modules/framer-motion/dist/es/frameloop/microtask.mjs +5 -0
  1219. package/node_modules/framer-motion/dist/es/frameloop/render-step.mjs +104 -0
  1220. package/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs +31 -0
  1221. package/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +478 -0
  1222. package/node_modules/framer-motion/dist/es/gestures/drag/index.mjs +27 -0
  1223. package/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs +88 -0
  1224. package/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +129 -0
  1225. package/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs +53 -0
  1226. package/node_modules/framer-motion/dist/es/gestures/focus.mjs +41 -0
  1227. package/node_modules/framer-motion/dist/es/gestures/hover.mjs +31 -0
  1228. package/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs +156 -0
  1229. package/node_modules/framer-motion/dist/es/gestures/pan/index.mjs +48 -0
  1230. package/node_modules/framer-motion/dist/es/gestures/press.mjs +116 -0
  1231. package/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs +20 -0
  1232. package/node_modules/framer-motion/dist/es/index.mjs +101 -0
  1233. package/node_modules/framer-motion/dist/es/motion/features/Feature.mjs +9 -0
  1234. package/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs +31 -0
  1235. package/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +38 -0
  1236. package/node_modules/framer-motion/dist/es/motion/features/animations.mjs +13 -0
  1237. package/node_modules/framer-motion/dist/es/motion/features/definitions.mjs +28 -0
  1238. package/node_modules/framer-motion/dist/es/motion/features/drag.mjs +17 -0
  1239. package/node_modules/framer-motion/dist/es/motion/features/gestures.mjs +21 -0
  1240. package/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +132 -0
  1241. package/node_modules/framer-motion/dist/es/motion/features/layout.mjs +11 -0
  1242. package/node_modules/framer-motion/dist/es/motion/features/load-features.mjs +12 -0
  1243. package/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs +72 -0
  1244. package/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs +49 -0
  1245. package/node_modules/framer-motion/dist/es/motion/index.mjs +79 -0
  1246. package/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +11 -0
  1247. package/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs +12 -0
  1248. package/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs +3 -0
  1249. package/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs +17 -0
  1250. package/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +33 -0
  1251. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +75 -0
  1252. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs +81 -0
  1253. package/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs +57 -0
  1254. package/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs +93 -0
  1255. package/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs +33 -0
  1256. package/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs +20 -0
  1257. package/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs +122 -0
  1258. package/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs +41 -0
  1259. package/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs +54 -0
  1260. package/node_modules/framer-motion/dist/es/projection/geometry/models.mjs +17 -0
  1261. package/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs +25 -0
  1262. package/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +13 -0
  1263. package/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +27 -0
  1264. package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +1519 -0
  1265. package/node_modules/framer-motion/dist/es/projection/node/group.mjs +24 -0
  1266. package/node_modules/framer-motion/dist/es/projection/node/state.mjs +19 -0
  1267. package/node_modules/framer-motion/dist/es/projection/shared/stack.mjs +112 -0
  1268. package/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +41 -0
  1269. package/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +35 -0
  1270. package/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs +6 -0
  1271. package/node_modules/framer-motion/dist/es/projection/styles/transform.mjs +49 -0
  1272. package/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs +14 -0
  1273. package/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs +14 -0
  1274. package/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs +5 -0
  1275. package/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs +26 -0
  1276. package/node_modules/framer-motion/dist/es/projection/utils/measure.mjs +17 -0
  1277. package/node_modules/framer-motion/dist/es/render/VisualElement.mjs +534 -0
  1278. package/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +121 -0
  1279. package/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +26 -0
  1280. package/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs +15 -0
  1281. package/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs +14 -0
  1282. package/node_modules/framer-motion/dist/es/render/dom/features-max.mjs +14 -0
  1283. package/node_modules/framer-motion/dist/es/render/dom/motion-minimal.mjs +9 -0
  1284. package/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs +47 -0
  1285. package/node_modules/framer-motion/dist/es/render/dom/motion.mjs +42 -0
  1286. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-element.mjs +64 -0
  1287. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-window.mjs +30 -0
  1288. package/node_modules/framer-motion/dist/es/render/dom/resize/index.mjs +8 -0
  1289. package/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs +36 -0
  1290. package/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs +56 -0
  1291. package/node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs +18 -0
  1292. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +45 -0
  1293. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +59 -0
  1294. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +45 -0
  1295. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +35 -0
  1296. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +20 -0
  1297. package/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +48 -0
  1298. package/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs +5 -0
  1299. package/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs +84 -0
  1300. package/node_modules/framer-motion/dist/es/render/dom/use-render.mjs +33 -0
  1301. package/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +6 -0
  1302. package/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs +19 -0
  1303. package/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +42 -0
  1304. package/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs +57 -0
  1305. package/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +13 -0
  1306. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +30 -0
  1307. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +5 -0
  1308. package/node_modules/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +28 -0
  1309. package/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +65 -0
  1310. package/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +15 -0
  1311. package/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs +30 -0
  1312. package/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +15 -0
  1313. package/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs +15 -0
  1314. package/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +10 -0
  1315. package/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs +74 -0
  1316. package/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs +6 -0
  1317. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +9 -0
  1318. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs +8 -0
  1319. package/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs +43 -0
  1320. package/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +59 -0
  1321. package/node_modules/framer-motion/dist/es/render/html/config-motion.mjs +12 -0
  1322. package/node_modules/framer-motion/dist/es/render/html/use-props.mjs +57 -0
  1323. package/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs +74 -0
  1324. package/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs +45 -0
  1325. package/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs +8 -0
  1326. package/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +27 -0
  1327. package/node_modules/framer-motion/dist/es/render/html/utils/render.mjs +9 -0
  1328. package/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +19 -0
  1329. package/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs +28 -0
  1330. package/node_modules/framer-motion/dist/es/render/store.mjs +3 -0
  1331. package/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +47 -0
  1332. package/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs +40 -0
  1333. package/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs +33 -0
  1334. package/node_modules/framer-motion/dist/es/render/svg/use-props.mjs +24 -0
  1335. package/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +52 -0
  1336. package/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +30 -0
  1337. package/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +8 -0
  1338. package/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +3 -0
  1339. package/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs +32 -0
  1340. package/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs +12 -0
  1341. package/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +18 -0
  1342. package/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +18 -0
  1343. package/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +157 -0
  1344. package/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs +320 -0
  1345. package/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs +3 -0
  1346. package/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs +24 -0
  1347. package/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +13 -0
  1348. package/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs +8 -0
  1349. package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +67 -0
  1350. package/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +24 -0
  1351. package/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs +26 -0
  1352. package/node_modules/framer-motion/dist/es/render/utils/setters.mjs +27 -0
  1353. package/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs +12 -0
  1354. package/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs +6 -0
  1355. package/node_modules/framer-motion/dist/es/utils/array.mjs +21 -0
  1356. package/node_modules/framer-motion/dist/es/utils/clamp.mjs +9 -0
  1357. package/node_modules/framer-motion/dist/es/utils/delay.mjs +20 -0
  1358. package/node_modules/framer-motion/dist/es/utils/distance.mjs +9 -0
  1359. package/node_modules/framer-motion/dist/es/utils/errors.mjs +18 -0
  1360. package/node_modules/framer-motion/dist/es/utils/get-context-window.mjs +6 -0
  1361. package/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs +42 -0
  1362. package/node_modules/framer-motion/dist/es/utils/interpolate.mjs +75 -0
  1363. package/node_modules/framer-motion/dist/es/utils/is-browser.mjs +3 -0
  1364. package/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs +6 -0
  1365. package/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs +7 -0
  1366. package/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs +6 -0
  1367. package/node_modules/framer-motion/dist/es/utils/memo.mjs +10 -0
  1368. package/node_modules/framer-motion/dist/es/utils/mix/color.mjs +41 -0
  1369. package/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +89 -0
  1370. package/node_modules/framer-motion/dist/es/utils/mix/index.mjs +14 -0
  1371. package/node_modules/framer-motion/dist/es/utils/mix/number.mjs +26 -0
  1372. package/node_modules/framer-motion/dist/es/utils/noop.mjs +3 -0
  1373. package/node_modules/framer-motion/dist/es/utils/offsets/default.mjs +9 -0
  1374. package/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs +12 -0
  1375. package/node_modules/framer-motion/dist/es/utils/offsets/time.mjs +5 -0
  1376. package/node_modules/framer-motion/dist/es/utils/pipe.mjs +11 -0
  1377. package/node_modules/framer-motion/dist/es/utils/progress.mjs +18 -0
  1378. package/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs +19 -0
  1379. package/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs +5 -0
  1380. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +19 -0
  1381. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs +47 -0
  1382. package/node_modules/framer-motion/dist/es/utils/resolve-value.mjs +11 -0
  1383. package/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs +14 -0
  1384. package/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs +40 -0
  1385. package/node_modules/framer-motion/dist/es/utils/time-conversion.mjs +10 -0
  1386. package/node_modules/framer-motion/dist/es/utils/transform.mjs +21 -0
  1387. package/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs +21 -0
  1388. package/node_modules/framer-motion/dist/es/utils/use-constant.mjs +18 -0
  1389. package/node_modules/framer-motion/dist/es/utils/use-cycle.mjs +47 -0
  1390. package/node_modules/framer-motion/dist/es/utils/use-force-update.mjs +19 -0
  1391. package/node_modules/framer-motion/dist/es/utils/use-in-view.mjs +23 -0
  1392. package/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs +5 -0
  1393. package/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs +41 -0
  1394. package/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs +15 -0
  1395. package/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +6 -0
  1396. package/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs +13 -0
  1397. package/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs +7 -0
  1398. package/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs +11 -0
  1399. package/node_modules/framer-motion/dist/es/utils/warn-once.mjs +11 -0
  1400. package/node_modules/framer-motion/dist/es/utils/wrap.mjs +6 -0
  1401. package/node_modules/framer-motion/dist/es/value/index.mjs +317 -0
  1402. package/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs +14 -0
  1403. package/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs +14 -0
  1404. package/node_modules/framer-motion/dist/es/value/types/color/hex.mjs +40 -0
  1405. package/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs +22 -0
  1406. package/node_modules/framer-motion/dist/es/value/types/color/index.mjs +28 -0
  1407. package/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +25 -0
  1408. package/node_modules/framer-motion/dist/es/value/types/color/utils.mjs +23 -0
  1409. package/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs +30 -0
  1410. package/node_modules/framer-motion/dist/es/value/types/complex/index.mjs +90 -0
  1411. package/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs +17 -0
  1412. package/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs +19 -0
  1413. package/node_modules/framer-motion/dist/es/value/types/utils.mjs +15 -0
  1414. package/node_modules/framer-motion/dist/es/value/use-combine-values.mjs +37 -0
  1415. package/node_modules/framer-motion/dist/es/value/use-computed.mjs +19 -0
  1416. package/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs +52 -0
  1417. package/node_modules/framer-motion/dist/es/value/use-motion-template.mjs +45 -0
  1418. package/node_modules/framer-motion/dist/es/value/use-motion-value.mjs +38 -0
  1419. package/node_modules/framer-motion/dist/es/value/use-scroll.mjs +39 -0
  1420. package/node_modules/framer-motion/dist/es/value/use-spring.mjs +73 -0
  1421. package/node_modules/framer-motion/dist/es/value/use-time.mjs +10 -0
  1422. package/node_modules/framer-motion/dist/es/value/use-transform.mjs +29 -0
  1423. package/node_modules/framer-motion/dist/es/value/use-velocity.mjs +35 -0
  1424. package/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs +50 -0
  1425. package/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs +7 -0
  1426. package/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs +3 -0
  1427. package/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +16 -0
  1428. package/node_modules/framer-motion/dist/framer-motion.dev.js +12195 -0
  1429. package/node_modules/framer-motion/dist/framer-motion.js +1 -0
  1430. package/node_modules/framer-motion/dist/index.d.ts +5242 -0
  1431. package/node_modules/framer-motion/dist/projection.dev.js +6433 -0
  1432. package/node_modules/framer-motion/dist/three-entry.d.ts +2977 -0
  1433. package/node_modules/framer-motion/dom/README.md +1 -0
  1434. package/node_modules/framer-motion/dom/package.json +6 -0
  1435. package/node_modules/framer-motion/package.json +122 -0
  1436. package/node_modules/get-func-name/LICENSE +19 -0
  1437. package/node_modules/get-func-name/README.md +123 -0
  1438. package/node_modules/get-func-name/get-func-name.js +1 -0
  1439. package/node_modules/get-func-name/index.js +52 -0
  1440. package/node_modules/get-func-name/package.json +85 -0
  1441. package/node_modules/get-nonce/LICENSE +21 -0
  1442. package/node_modules/get-nonce/README.md +54 -0
  1443. package/node_modules/get-nonce/dist/es2015/index.d.ts +2 -0
  1444. package/node_modules/get-nonce/dist/es2015/index.js +13 -0
  1445. package/node_modules/get-nonce/dist/es5/index.d.ts +2 -0
  1446. package/node_modules/get-nonce/dist/es5/index.js +15 -0
  1447. package/node_modules/get-nonce/package.json +68 -0
  1448. package/node_modules/invariant/LICENSE +21 -0
  1449. package/node_modules/invariant/README.md +37 -0
  1450. package/node_modules/invariant/browser.js +49 -0
  1451. package/node_modules/invariant/invariant.js +51 -0
  1452. package/node_modules/invariant/invariant.js.flow +7 -0
  1453. package/node_modules/invariant/package.json +35 -0
  1454. package/node_modules/js-tokens/LICENSE +21 -0
  1455. package/node_modules/js-tokens/README.md +240 -0
  1456. package/node_modules/js-tokens/index.js +23 -0
  1457. package/node_modules/js-tokens/package.json +30 -0
  1458. package/node_modules/loose-envify/LICENSE +21 -0
  1459. package/node_modules/loose-envify/README.md +45 -0
  1460. package/node_modules/loose-envify/cli.js +16 -0
  1461. package/node_modules/loose-envify/custom.js +4 -0
  1462. package/node_modules/loose-envify/index.js +3 -0
  1463. package/node_modules/loose-envify/loose-envify.js +36 -0
  1464. package/node_modules/loose-envify/package.json +36 -0
  1465. package/node_modules/loose-envify/replace.js +65 -0
  1466. package/node_modules/loupe/LICENSE +9 -0
  1467. package/node_modules/loupe/README.md +63 -0
  1468. package/node_modules/loupe/lib/arguments.d.ts +3 -0
  1469. package/node_modules/loupe/lib/arguments.d.ts.map +1 -0
  1470. package/node_modules/loupe/lib/arguments.js +7 -0
  1471. package/node_modules/loupe/lib/array.d.ts +3 -0
  1472. package/node_modules/loupe/lib/array.d.ts.map +1 -0
  1473. package/node_modules/loupe/lib/array.js +16 -0
  1474. package/node_modules/loupe/lib/bigint.d.ts +3 -0
  1475. package/node_modules/loupe/lib/bigint.d.ts.map +1 -0
  1476. package/node_modules/loupe/lib/bigint.js +7 -0
  1477. package/node_modules/loupe/lib/class.d.ts +5 -0
  1478. package/node_modules/loupe/lib/class.d.ts.map +1 -0
  1479. package/node_modules/loupe/lib/class.js +15 -0
  1480. package/node_modules/loupe/lib/date.d.ts +3 -0
  1481. package/node_modules/loupe/lib/date.d.ts.map +1 -0
  1482. package/node_modules/loupe/lib/date.js +11 -0
  1483. package/node_modules/loupe/lib/error.d.ts +3 -0
  1484. package/node_modules/loupe/lib/error.d.ts.map +1 -0
  1485. package/node_modules/loupe/lib/error.js +29 -0
  1486. package/node_modules/loupe/lib/function.d.ts +7 -0
  1487. package/node_modules/loupe/lib/function.d.ts.map +1 -0
  1488. package/node_modules/loupe/lib/function.js +9 -0
  1489. package/node_modules/loupe/lib/helpers.d.ts +7 -0
  1490. package/node_modules/loupe/lib/helpers.d.ts.map +1 -0
  1491. package/node_modules/loupe/lib/helpers.js +152 -0
  1492. package/node_modules/loupe/lib/html.d.ts +5 -0
  1493. package/node_modules/loupe/lib/html.d.ts.map +1 -0
  1494. package/node_modules/loupe/lib/html.js +34 -0
  1495. package/node_modules/loupe/lib/index.d.ts +7 -0
  1496. package/node_modules/loupe/lib/index.d.ts.map +1 -0
  1497. package/node_modules/loupe/lib/index.js +161 -0
  1498. package/node_modules/loupe/lib/map.d.ts +3 -0
  1499. package/node_modules/loupe/lib/map.d.ts.map +1 -0
  1500. package/node_modules/loupe/lib/map.js +24 -0
  1501. package/node_modules/loupe/lib/number.d.ts +3 -0
  1502. package/node_modules/loupe/lib/number.d.ts.map +1 -0
  1503. package/node_modules/loupe/lib/number.js +17 -0
  1504. package/node_modules/loupe/lib/object.d.ts +3 -0
  1505. package/node_modules/loupe/lib/object.d.ts.map +1 -0
  1506. package/node_modules/loupe/lib/object.js +22 -0
  1507. package/node_modules/loupe/lib/promise.d.ts +5 -0
  1508. package/node_modules/loupe/lib/promise.d.ts.map +1 -0
  1509. package/node_modules/loupe/lib/promise.js +18 -0
  1510. package/node_modules/loupe/lib/regexp.d.ts +3 -0
  1511. package/node_modules/loupe/lib/regexp.d.ts.map +1 -0
  1512. package/node_modules/loupe/lib/regexp.js +7 -0
  1513. package/node_modules/loupe/lib/set.d.ts +3 -0
  1514. package/node_modules/loupe/lib/set.d.ts.map +1 -0
  1515. package/node_modules/loupe/lib/set.js +15 -0
  1516. package/node_modules/loupe/lib/string.d.ts +3 -0
  1517. package/node_modules/loupe/lib/string.d.ts.map +1 -0
  1518. package/node_modules/loupe/lib/string.js +24 -0
  1519. package/node_modules/loupe/lib/symbol.d.ts +2 -0
  1520. package/node_modules/loupe/lib/symbol.d.ts.map +1 -0
  1521. package/node_modules/loupe/lib/symbol.js +6 -0
  1522. package/node_modules/loupe/lib/typedarray.d.ts +5 -0
  1523. package/node_modules/loupe/lib/typedarray.d.ts.map +1 -0
  1524. package/node_modules/loupe/lib/typedarray.js +38 -0
  1525. package/node_modules/loupe/lib/types.d.ts +15 -0
  1526. package/node_modules/loupe/lib/types.d.ts.map +1 -0
  1527. package/node_modules/loupe/lib/types.js +1 -0
  1528. package/node_modules/loupe/loupe.js +637 -0
  1529. package/node_modules/loupe/package.json +126 -0
  1530. package/node_modules/pathval/LICENSE +16 -0
  1531. package/node_modules/pathval/README.md +147 -0
  1532. package/node_modules/pathval/index.js +292 -0
  1533. package/node_modules/pathval/package.json +73 -0
  1534. package/node_modules/pathval/pathval.js +1 -0
  1535. package/node_modules/react-remove-scroll/LICENSE +21 -0
  1536. package/node_modules/react-remove-scroll/README.md +152 -0
  1537. package/node_modules/react-remove-scroll/UI/UI.d.ts +1 -0
  1538. package/node_modules/react-remove-scroll/UI/package.json +8 -0
  1539. package/node_modules/react-remove-scroll/dist/es2015/Combination.d.ts +3 -0
  1540. package/node_modules/react-remove-scroll/dist/es2015/Combination.js +7 -0
  1541. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.d.ts +5 -0
  1542. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
  1543. package/node_modules/react-remove-scroll/dist/es2015/UI.d.ts +7 -0
  1544. package/node_modules/react-remove-scroll/dist/es2015/UI.js +36 -0
  1545. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.d.ts +3 -0
  1546. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +19 -0
  1547. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.d.ts +3 -0
  1548. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +96 -0
  1549. package/node_modules/react-remove-scroll/dist/es2015/index.d.ts +2 -0
  1550. package/node_modules/react-remove-scroll/dist/es2015/index.js +2 -0
  1551. package/node_modules/react-remove-scroll/dist/es2015/medium.d.ts +2 -0
  1552. package/node_modules/react-remove-scroll/dist/es2015/medium.js +2 -0
  1553. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.d.ts +8 -0
  1554. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.js +33 -0
  1555. package/node_modules/react-remove-scroll/dist/es2015/sidecar.d.ts +2 -0
  1556. package/node_modules/react-remove-scroll/dist/es2015/sidecar.js +4 -0
  1557. package/node_modules/react-remove-scroll/dist/es2015/types.d.ts +90 -0
  1558. package/node_modules/react-remove-scroll/dist/es2015/types.js +1 -0
  1559. package/node_modules/react-remove-scroll/dist/es2019/Combination.d.ts +3 -0
  1560. package/node_modules/react-remove-scroll/dist/es2019/Combination.js +6 -0
  1561. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.d.ts +5 -0
  1562. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.js +144 -0
  1563. package/node_modules/react-remove-scroll/dist/es2019/UI.d.ts +7 -0
  1564. package/node_modules/react-remove-scroll/dist/es2019/UI.js +41 -0
  1565. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.d.ts +3 -0
  1566. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.js +19 -0
  1567. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.d.ts +3 -0
  1568. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.js +84 -0
  1569. package/node_modules/react-remove-scroll/dist/es2019/index.d.ts +2 -0
  1570. package/node_modules/react-remove-scroll/dist/es2019/index.js +2 -0
  1571. package/node_modules/react-remove-scroll/dist/es2019/medium.d.ts +2 -0
  1572. package/node_modules/react-remove-scroll/dist/es2019/medium.js +2 -0
  1573. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.d.ts +8 -0
  1574. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.js +33 -0
  1575. package/node_modules/react-remove-scroll/dist/es2019/sidecar.d.ts +2 -0
  1576. package/node_modules/react-remove-scroll/dist/es2019/sidecar.js +4 -0
  1577. package/node_modules/react-remove-scroll/dist/es2019/types.d.ts +90 -0
  1578. package/node_modules/react-remove-scroll/dist/es2019/types.js +1 -0
  1579. package/node_modules/react-remove-scroll/dist/es5/Combination.d.ts +3 -0
  1580. package/node_modules/react-remove-scroll/dist/es5/Combination.js +9 -0
  1581. package/node_modules/react-remove-scroll/dist/es5/SideEffect.d.ts +5 -0
  1582. package/node_modules/react-remove-scroll/dist/es5/SideEffect.js +152 -0
  1583. package/node_modules/react-remove-scroll/dist/es5/UI.d.ts +7 -0
  1584. package/node_modules/react-remove-scroll/dist/es5/UI.js +39 -0
  1585. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.d.ts +3 -0
  1586. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.js +22 -0
  1587. package/node_modules/react-remove-scroll/dist/es5/handleScroll.d.ts +3 -0
  1588. package/node_modules/react-remove-scroll/dist/es5/handleScroll.js +101 -0
  1589. package/node_modules/react-remove-scroll/dist/es5/index.d.ts +2 -0
  1590. package/node_modules/react-remove-scroll/dist/es5/index.js +6 -0
  1591. package/node_modules/react-remove-scroll/dist/es5/medium.d.ts +2 -0
  1592. package/node_modules/react-remove-scroll/dist/es5/medium.js +5 -0
  1593. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.d.ts +8 -0
  1594. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.js +37 -0
  1595. package/node_modules/react-remove-scroll/dist/es5/sidecar.d.ts +2 -0
  1596. package/node_modules/react-remove-scroll/dist/es5/sidecar.js +6 -0
  1597. package/node_modules/react-remove-scroll/dist/es5/types.d.ts +90 -0
  1598. package/node_modules/react-remove-scroll/dist/es5/types.js +2 -0
  1599. package/node_modules/react-remove-scroll/package.json +96 -0
  1600. package/node_modules/react-remove-scroll/sidecar/package.json +7 -0
  1601. package/node_modules/react-remove-scroll/sidecar/sidecar.d.ts +5 -0
  1602. package/node_modules/react-remove-scroll-bar/README.md +52 -0
  1603. package/node_modules/react-remove-scroll-bar/constants/package.json +8 -0
  1604. package/node_modules/react-remove-scroll-bar/dist/es2015/component.d.ts +13 -0
  1605. package/node_modules/react-remove-scroll-bar/dist/es2015/component.js +53 -0
  1606. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.d.ts +8 -0
  1607. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
  1608. package/node_modules/react-remove-scroll-bar/dist/es2015/index.d.ts +4 -0
  1609. package/node_modules/react-remove-scroll-bar/dist/es2015/index.js +4 -0
  1610. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.d.ts +14 -0
  1611. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +29 -0
  1612. package/node_modules/react-remove-scroll-bar/dist/es2019/component.d.ts +13 -0
  1613. package/node_modules/react-remove-scroll-bar/dist/es2019/component.js +85 -0
  1614. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.d.ts +8 -0
  1615. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.js +8 -0
  1616. package/node_modules/react-remove-scroll-bar/dist/es2019/index.d.ts +4 -0
  1617. package/node_modules/react-remove-scroll-bar/dist/es2019/index.js +4 -0
  1618. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.d.ts +14 -0
  1619. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.js +28 -0
  1620. package/node_modules/react-remove-scroll-bar/dist/es5/component.d.ts +13 -0
  1621. package/node_modules/react-remove-scroll-bar/dist/es5/component.js +59 -0
  1622. package/node_modules/react-remove-scroll-bar/dist/es5/constants.d.ts +8 -0
  1623. package/node_modules/react-remove-scroll-bar/dist/es5/constants.js +11 -0
  1624. package/node_modules/react-remove-scroll-bar/dist/es5/index.d.ts +4 -0
  1625. package/node_modules/react-remove-scroll-bar/dist/es5/index.js +12 -0
  1626. package/node_modules/react-remove-scroll-bar/dist/es5/utils.d.ts +14 -0
  1627. package/node_modules/react-remove-scroll-bar/dist/es5/utils.js +33 -0
  1628. package/node_modules/react-remove-scroll-bar/package.json +85 -0
  1629. package/node_modules/react-router/CHANGELOG.md +688 -0
  1630. package/node_modules/react-router/LICENSE.md +23 -0
  1631. package/node_modules/react-router/README.md +16 -0
  1632. package/node_modules/react-router/dist/index.d.ts +25 -0
  1633. package/node_modules/react-router/dist/index.js +1454 -0
  1634. package/node_modules/react-router/dist/index.js.map +1 -0
  1635. package/node_modules/react-router/dist/lib/components.d.ts +157 -0
  1636. package/node_modules/react-router/dist/lib/context.d.ts +102 -0
  1637. package/node_modules/react-router/dist/lib/hooks.d.ts +181 -0
  1638. package/node_modules/react-router/dist/main.js +19 -0
  1639. package/node_modules/react-router/dist/react-router.development.js +1350 -0
  1640. package/node_modules/react-router/dist/react-router.development.js.map +1 -0
  1641. package/node_modules/react-router/dist/react-router.production.min.js +12 -0
  1642. package/node_modules/react-router/dist/react-router.production.min.js.map +1 -0
  1643. package/node_modules/react-router/dist/umd/react-router.development.js +1572 -0
  1644. package/node_modules/react-router/dist/umd/react-router.development.js.map +1 -0
  1645. package/node_modules/react-router/dist/umd/react-router.production.min.js +12 -0
  1646. package/node_modules/react-router/dist/umd/react-router.production.min.js.map +1 -0
  1647. package/node_modules/react-router/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  1648. package/node_modules/react-router/node_modules/@remix-run/router/LICENSE.md +23 -0
  1649. package/node_modules/react-router/node_modules/@remix-run/router/README.md +135 -0
  1650. package/node_modules/react-router/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  1651. package/node_modules/react-router/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  1652. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  1653. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  1654. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  1655. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.js +4327 -0
  1656. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.js.map +1 -0
  1657. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  1658. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  1659. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  1660. package/node_modules/react-router/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  1661. package/node_modules/react-router/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  1662. package/node_modules/react-router/node_modules/@remix-run/router/history.ts +746 -0
  1663. package/node_modules/react-router/node_modules/@remix-run/router/index.ts +96 -0
  1664. package/node_modules/react-router/node_modules/@remix-run/router/package.json +33 -0
  1665. package/node_modules/react-router/node_modules/@remix-run/router/router.ts +4915 -0
  1666. package/node_modules/react-router/node_modules/@remix-run/router/utils.ts +1598 -0
  1667. package/node_modules/react-router/package.json +43 -0
  1668. package/node_modules/react-router-dom/CHANGELOG.md +825 -0
  1669. package/node_modules/react-router-dom/LICENSE.md +23 -0
  1670. package/node_modules/react-router-dom/README.md +5 -0
  1671. package/node_modules/react-router-dom/dist/dom.d.ts +104 -0
  1672. package/node_modules/react-router-dom/dist/index.d.ts +317 -0
  1673. package/node_modules/react-router-dom/dist/index.js +1442 -0
  1674. package/node_modules/react-router-dom/dist/index.js.map +1 -0
  1675. package/node_modules/react-router-dom/dist/main.js +19 -0
  1676. package/node_modules/react-router-dom/dist/react-router-dom.development.js +1483 -0
  1677. package/node_modules/react-router-dom/dist/react-router-dom.development.js.map +1 -0
  1678. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js +12 -0
  1679. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js.map +1 -0
  1680. package/node_modules/react-router-dom/dist/server.d.ts +31 -0
  1681. package/node_modules/react-router-dom/dist/server.js +318 -0
  1682. package/node_modules/react-router-dom/dist/server.mjs +293 -0
  1683. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js +1779 -0
  1684. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js.map +1 -0
  1685. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js +12 -0
  1686. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js.map +1 -0
  1687. package/node_modules/react-router-dom/node_modules/@remix-run/router/CHANGELOG.md +716 -0
  1688. package/node_modules/react-router-dom/node_modules/@remix-run/router/LICENSE.md +23 -0
  1689. package/node_modules/react-router-dom/node_modules/@remix-run/router/README.md +135 -0
  1690. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/history.d.ts +250 -0
  1691. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/index.d.ts +9 -0
  1692. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.cjs.js +4870 -0
  1693. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -0
  1694. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.d.ts +508 -0
  1695. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.js +4327 -0
  1696. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.js.map +1 -0
  1697. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.js +4876 -0
  1698. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.js.map +1 -0
  1699. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.min.js +12 -0
  1700. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -0
  1701. package/node_modules/react-router-dom/node_modules/@remix-run/router/dist/utils.d.ts +502 -0
  1702. package/node_modules/react-router-dom/node_modules/@remix-run/router/history.ts +746 -0
  1703. package/node_modules/react-router-dom/node_modules/@remix-run/router/index.ts +96 -0
  1704. package/node_modules/react-router-dom/node_modules/@remix-run/router/package.json +33 -0
  1705. package/node_modules/react-router-dom/node_modules/@remix-run/router/router.ts +4915 -0
  1706. package/node_modules/react-router-dom/node_modules/@remix-run/router/utils.ts +1598 -0
  1707. package/node_modules/react-router-dom/package.json +49 -0
  1708. package/node_modules/react-router-dom/server.d.ts +31 -0
  1709. package/node_modules/react-router-dom/server.js +318 -0
  1710. package/node_modules/react-router-dom/server.mjs +293 -0
  1711. package/node_modules/react-style-singleton/README.md +41 -0
  1712. package/node_modules/react-style-singleton/dist/es2015/component.d.ts +21 -0
  1713. package/node_modules/react-style-singleton/dist/es2015/component.js +16 -0
  1714. package/node_modules/react-style-singleton/dist/es2015/hook.d.ts +23 -0
  1715. package/node_modules/react-style-singleton/dist/es2015/hook.js +22 -0
  1716. package/node_modules/react-style-singleton/dist/es2015/index.d.ts +3 -0
  1717. package/node_modules/react-style-singleton/dist/es2015/index.js +3 -0
  1718. package/node_modules/react-style-singleton/dist/es2015/singleton.d.ts +4 -0
  1719. package/node_modules/react-style-singleton/dist/es2015/singleton.js +48 -0
  1720. package/node_modules/react-style-singleton/dist/es2019/component.d.ts +21 -0
  1721. package/node_modules/react-style-singleton/dist/es2019/component.js +15 -0
  1722. package/node_modules/react-style-singleton/dist/es2019/hook.d.ts +23 -0
  1723. package/node_modules/react-style-singleton/dist/es2019/hook.js +22 -0
  1724. package/node_modules/react-style-singleton/dist/es2019/index.d.ts +3 -0
  1725. package/node_modules/react-style-singleton/dist/es2019/index.js +3 -0
  1726. package/node_modules/react-style-singleton/dist/es2019/singleton.d.ts +4 -0
  1727. package/node_modules/react-style-singleton/dist/es2019/singleton.js +48 -0
  1728. package/node_modules/react-style-singleton/dist/es5/component.d.ts +21 -0
  1729. package/node_modules/react-style-singleton/dist/es5/component.js +20 -0
  1730. package/node_modules/react-style-singleton/dist/es5/hook.d.ts +23 -0
  1731. package/node_modules/react-style-singleton/dist/es5/hook.js +27 -0
  1732. package/node_modules/react-style-singleton/dist/es5/index.d.ts +3 -0
  1733. package/node_modules/react-style-singleton/dist/es5/index.js +9 -0
  1734. package/node_modules/react-style-singleton/dist/es5/singleton.d.ts +4 -0
  1735. package/node_modules/react-style-singleton/dist/es5/singleton.js +52 -0
  1736. package/node_modules/react-style-singleton/dist/index.js +1 -0
  1737. package/node_modules/react-style-singleton/package.json +87 -0
  1738. package/node_modules/regenerator-runtime/LICENSE +21 -0
  1739. package/node_modules/regenerator-runtime/README.md +31 -0
  1740. package/node_modules/regenerator-runtime/package.json +19 -0
  1741. package/node_modules/regenerator-runtime/path.js +11 -0
  1742. package/node_modules/regenerator-runtime/runtime.js +761 -0
  1743. package/node_modules/remix-utils/.eslintrc.cjs +54 -0
  1744. package/node_modules/remix-utils/LICENSE +21 -0
  1745. package/node_modules/remix-utils/README.md +2141 -0
  1746. package/node_modules/remix-utils/build/client/cache-assets.d.ts +22 -0
  1747. package/node_modules/remix-utils/build/client/cache-assets.js +66 -0
  1748. package/node_modules/remix-utils/build/common/promise.d.ts +87 -0
  1749. package/node_modules/remix-utils/build/common/promise.js +112 -0
  1750. package/node_modules/remix-utils/build/common/timers.d.ts +27 -0
  1751. package/node_modules/remix-utils/build/common/timers.js +47 -0
  1752. package/node_modules/remix-utils/build/react/authenticity-token.d.ts +50 -0
  1753. package/node_modules/remix-utils/build/react/authenticity-token.js +54 -0
  1754. package/node_modules/remix-utils/build/react/client-only.d.ts +27 -0
  1755. package/node_modules/remix-utils/build/react/client-only.js +20 -0
  1756. package/node_modules/remix-utils/build/react/existing-search-params.d.ts +34 -0
  1757. package/node_modules/remix-utils/build/react/existing-search-params.js +32 -0
  1758. package/node_modules/remix-utils/build/react/external-scripts.d.ts +91 -0
  1759. package/node_modules/remix-utils/build/react/external-scripts.js +106 -0
  1760. package/node_modules/remix-utils/build/react/fetcher-type.d.ts +31 -0
  1761. package/node_modules/remix-utils/build/react/fetcher-type.js +53 -0
  1762. package/node_modules/remix-utils/build/react/handle-conventions.d.ts +10 -0
  1763. package/node_modules/remix-utils/build/react/handle-conventions.js +1 -0
  1764. package/node_modules/remix-utils/build/react/honeypot.d.ts +11 -0
  1765. package/node_modules/remix-utils/build/react/honeypot.js +16 -0
  1766. package/node_modules/remix-utils/build/react/server-only.d.ts +25 -0
  1767. package/node_modules/remix-utils/build/react/server-only.js +18 -0
  1768. package/node_modules/remix-utils/build/react/use-debounce-fetcher.d.ts +28 -0
  1769. package/node_modules/remix-utils/build/react/use-debounce-fetcher.js +27 -0
  1770. package/node_modules/remix-utils/build/react/use-debounce-submit.d.ts +7 -0
  1771. package/node_modules/remix-utils/build/react/use-debounce-submit.js +41 -0
  1772. package/node_modules/remix-utils/build/react/use-delegated-anchors.d.ts +6 -0
  1773. package/node_modules/remix-utils/build/react/use-delegated-anchors.js +69 -0
  1774. package/node_modules/remix-utils/build/react/use-event-source.d.ts +17 -0
  1775. package/node_modules/remix-utils/build/react/use-event-source.js +37 -0
  1776. package/node_modules/remix-utils/build/react/use-global-navigation-state.d.ts +33 -0
  1777. package/node_modules/remix-utils/build/react/use-global-navigation-state.js +67 -0
  1778. package/node_modules/remix-utils/build/react/use-hydrated.d.ts +18 -0
  1779. package/node_modules/remix-utils/build/react/use-hydrated.js +24 -0
  1780. package/node_modules/remix-utils/build/react/use-locales.d.ts +24 -0
  1781. package/node_modules/remix-utils/build/react/use-locales.js +56 -0
  1782. package/node_modules/remix-utils/build/react/use-should-hydrate.d.ts +21 -0
  1783. package/node_modules/remix-utils/build/react/use-should-hydrate.js +44 -0
  1784. package/node_modules/remix-utils/build/server/cors.d.ts +101 -0
  1785. package/node_modules/remix-utils/build/server/cors.js +179 -0
  1786. package/node_modules/remix-utils/build/server/csrf.d.ts +75 -0
  1787. package/node_modules/remix-utils/build/server/csrf.js +106 -0
  1788. package/node_modules/remix-utils/build/server/event-stream.d.ts +27 -0
  1789. package/node_modules/remix-utils/build/server/event-stream.js +44 -0
  1790. package/node_modules/remix-utils/build/server/get-client-ip-address.d.ts +29 -0
  1791. package/node_modules/remix-utils/build/server/get-client-ip-address.js +51 -0
  1792. package/node_modules/remix-utils/build/server/get-client-locales.d.ts +18 -0
  1793. package/node_modules/remix-utils/build/server/get-client-locales.js +18 -0
  1794. package/node_modules/remix-utils/build/server/get-headers.d.ts +6 -0
  1795. package/node_modules/remix-utils/build/server/get-headers.js +11 -0
  1796. package/node_modules/remix-utils/build/server/honeypot.d.ts +32 -0
  1797. package/node_modules/remix-utils/build/server/honeypot.js +96 -0
  1798. package/node_modules/remix-utils/build/server/is-prefetch.d.ts +16 -0
  1799. package/node_modules/remix-utils/build/server/is-prefetch.js +11 -0
  1800. package/node_modules/remix-utils/build/server/json-hash.d.ts +6 -0
  1801. package/node_modules/remix-utils/build/server/json-hash.js +16 -0
  1802. package/node_modules/remix-utils/build/server/named-action.d.ts +19 -0
  1803. package/node_modules/remix-utils/build/server/named-action.js +62 -0
  1804. package/node_modules/remix-utils/build/server/parse-accept-header.d.ts +12 -0
  1805. package/node_modules/remix-utils/build/server/parse-accept-header.js +17 -0
  1806. package/node_modules/remix-utils/build/server/preload-route-assets.d.ts +80 -0
  1807. package/node_modules/remix-utils/build/server/preload-route-assets.js +120 -0
  1808. package/node_modules/remix-utils/build/server/redirect-back.d.ts +17 -0
  1809. package/node_modules/remix-utils/build/server/redirect-back.js +29 -0
  1810. package/node_modules/remix-utils/build/server/respond-to.d.ts +40 -0
  1811. package/node_modules/remix-utils/build/server/respond-to.js +22 -0
  1812. package/node_modules/remix-utils/build/server/responses.d.ts +100 -0
  1813. package/node_modules/remix-utils/build/server/responses.js +167 -0
  1814. package/node_modules/remix-utils/build/server/rolling-cookie.d.ts +4 -0
  1815. package/node_modules/remix-utils/build/server/rolling-cookie.js +9 -0
  1816. package/node_modules/remix-utils/build/server/safe-redirect.d.ts +10 -0
  1817. package/node_modules/remix-utils/build/server/safe-redirect.js +22 -0
  1818. package/node_modules/remix-utils/build/server/sec-fetch.d.ts +43 -0
  1819. package/node_modules/remix-utils/build/server/sec-fetch.js +67 -0
  1820. package/node_modules/remix-utils/build/server/typed-cookie.d.ts +17 -0
  1821. package/node_modules/remix-utils/build/server/typed-cookie.js +58 -0
  1822. package/node_modules/remix-utils/build/server/typed-session.d.ts +59 -0
  1823. package/node_modules/remix-utils/build/server/typed-session.js +88 -0
  1824. package/node_modules/remix-utils/package.json +182 -0
  1825. package/node_modules/remix-utils/scripts/check-pkg-exports.ts +61 -0
  1826. package/node_modules/set-cookie-parser/LICENSE +21 -0
  1827. package/node_modules/set-cookie-parser/README.md +199 -0
  1828. package/node_modules/set-cookie-parser/lib/set-cookie.js +226 -0
  1829. package/node_modules/set-cookie-parser/package.json +43 -0
  1830. package/node_modules/source-map/LICENSE +28 -0
  1831. package/node_modules/source-map/README.md +822 -0
  1832. package/node_modules/source-map/dist/source-map.js +1 -0
  1833. package/node_modules/source-map/lib/array-set.js +100 -0
  1834. package/node_modules/source-map/lib/base64-vlq.js +111 -0
  1835. package/node_modules/source-map/lib/base64.js +18 -0
  1836. package/node_modules/source-map/lib/binary-search.js +107 -0
  1837. package/node_modules/source-map/lib/mapping-list.js +80 -0
  1838. package/node_modules/source-map/lib/mappings.wasm +0 -0
  1839. package/node_modules/source-map/lib/read-wasm.js +49 -0
  1840. package/node_modules/source-map/lib/source-map-consumer.js +1237 -0
  1841. package/node_modules/source-map/lib/source-map-generator.js +413 -0
  1842. package/node_modules/source-map/lib/source-node.js +404 -0
  1843. package/node_modules/source-map/lib/util.js +546 -0
  1844. package/node_modules/source-map/lib/wasm.js +107 -0
  1845. package/node_modules/source-map/package.json +91 -0
  1846. package/node_modules/source-map/source-map.d.ts +369 -0
  1847. package/node_modules/source-map/source-map.js +8 -0
  1848. package/node_modules/tailwind-merge/LICENSE.md +21 -0
  1849. package/node_modules/tailwind-merge/README.md +38 -0
  1850. package/node_modules/tailwind-merge/dist/bundle-cjs.js +2595 -0
  1851. package/node_modules/tailwind-merge/dist/bundle-cjs.js.map +1 -0
  1852. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs +2583 -0
  1853. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs.map +1 -0
  1854. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js +2645 -0
  1855. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js.map +1 -0
  1856. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs +2633 -0
  1857. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs.map +1 -0
  1858. package/node_modules/tailwind-merge/dist/types.d.ts +2143 -0
  1859. package/node_modules/tailwind-merge/package.json +95 -0
  1860. package/node_modules/tailwind-merge/src/index.ts +14 -0
  1861. package/node_modules/tailwind-merge/src/lib/class-utils.ts +215 -0
  1862. package/node_modules/tailwind-merge/src/lib/config-utils.ts +14 -0
  1863. package/node_modules/tailwind-merge/src/lib/create-tailwind-merge.ts +50 -0
  1864. package/node_modules/tailwind-merge/src/lib/default-config.ts +1866 -0
  1865. package/node_modules/tailwind-merge/src/lib/extend-tailwind-merge.ts +26 -0
  1866. package/node_modules/tailwind-merge/src/lib/from-theme.ts +13 -0
  1867. package/node_modules/tailwind-merge/src/lib/lru-cache.ts +52 -0
  1868. package/node_modules/tailwind-merge/src/lib/merge-classlist.ts +99 -0
  1869. package/node_modules/tailwind-merge/src/lib/merge-configs.ts +72 -0
  1870. package/node_modules/tailwind-merge/src/lib/modifier-utils.ts +95 -0
  1871. package/node_modules/tailwind-merge/src/lib/tw-join.ts +50 -0
  1872. package/node_modules/tailwind-merge/src/lib/tw-merge.ts +4 -0
  1873. package/node_modules/tailwind-merge/src/lib/types.ts +412 -0
  1874. package/node_modules/tailwind-merge/src/lib/validators.ts +104 -0
  1875. package/node_modules/tslib/CopyrightNotice.txt +15 -0
  1876. package/node_modules/tslib/LICENSE.txt +12 -0
  1877. package/node_modules/tslib/README.md +164 -0
  1878. package/node_modules/tslib/SECURITY.md +41 -0
  1879. package/node_modules/tslib/modules/index.d.ts +37 -0
  1880. package/node_modules/tslib/modules/index.js +68 -0
  1881. package/node_modules/tslib/modules/package.json +3 -0
  1882. package/node_modules/tslib/package.json +47 -0
  1883. package/node_modules/tslib/tslib.d.ts +453 -0
  1884. package/node_modules/tslib/tslib.es6.html +1 -0
  1885. package/node_modules/tslib/tslib.es6.js +370 -0
  1886. package/node_modules/tslib/tslib.es6.mjs +370 -0
  1887. package/node_modules/tslib/tslib.html +1 -0
  1888. package/node_modules/tslib/tslib.js +421 -0
  1889. package/node_modules/type-fest/index.d.ts +153 -0
  1890. package/node_modules/type-fest/package.json +71 -0
  1891. package/node_modules/type-fest/readme.md +971 -0
  1892. package/node_modules/type-fest/source/array-indices.d.ts +23 -0
  1893. package/node_modules/type-fest/source/array-slice.d.ts +106 -0
  1894. package/node_modules/type-fest/source/array-splice.d.ts +97 -0
  1895. package/node_modules/type-fest/source/array-values.d.ts +22 -0
  1896. package/node_modules/type-fest/source/async-return-type.d.ts +23 -0
  1897. package/node_modules/type-fest/source/asyncify.d.ts +32 -0
  1898. package/node_modules/type-fest/source/basic.d.ts +68 -0
  1899. package/node_modules/type-fest/source/camel-case.d.ts +80 -0
  1900. package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +54 -0
  1901. package/node_modules/type-fest/source/camel-cased-properties.d.ts +36 -0
  1902. package/node_modules/type-fest/source/conditional-except.d.ts +45 -0
  1903. package/node_modules/type-fest/source/conditional-keys.d.ts +45 -0
  1904. package/node_modules/type-fest/source/conditional-pick-deep.d.ts +104 -0
  1905. package/node_modules/type-fest/source/conditional-pick.d.ts +44 -0
  1906. package/node_modules/type-fest/source/conditional-simplify.d.ts +32 -0
  1907. package/node_modules/type-fest/source/delimiter-case.d.ts +99 -0
  1908. package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +82 -0
  1909. package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +37 -0
  1910. package/node_modules/type-fest/source/distributed-omit.d.ts +89 -0
  1911. package/node_modules/type-fest/source/distributed-pick.d.ts +85 -0
  1912. package/node_modules/type-fest/source/empty-object.d.ts +46 -0
  1913. package/node_modules/type-fest/source/enforce-optional.d.ts +47 -0
  1914. package/node_modules/type-fest/source/entries.d.ts +62 -0
  1915. package/node_modules/type-fest/source/entry.d.ts +65 -0
  1916. package/node_modules/type-fest/source/exact.d.ts +63 -0
  1917. package/node_modules/type-fest/source/except.d.ts +80 -0
  1918. package/node_modules/type-fest/source/fixed-length-array.d.ts +43 -0
  1919. package/node_modules/type-fest/source/get.d.ts +191 -0
  1920. package/node_modules/type-fest/source/global-this.d.ts +21 -0
  1921. package/node_modules/type-fest/source/greater-than-or-equal.d.ts +22 -0
  1922. package/node_modules/type-fest/source/greater-than.d.ts +49 -0
  1923. package/node_modules/type-fest/source/has-optional-keys.d.ts +21 -0
  1924. package/node_modules/type-fest/source/has-readonly-keys.d.ts +21 -0
  1925. package/node_modules/type-fest/source/has-required-keys.d.ts +59 -0
  1926. package/node_modules/type-fest/source/has-writable-keys.d.ts +21 -0
  1927. package/node_modules/type-fest/source/if-any.d.ts +24 -0
  1928. package/node_modules/type-fest/source/if-empty-object.d.ts +26 -0
  1929. package/node_modules/type-fest/source/if-never.d.ts +24 -0
  1930. package/node_modules/type-fest/source/if-unknown.d.ts +24 -0
  1931. package/node_modules/type-fest/source/includes.d.ts +22 -0
  1932. package/node_modules/type-fest/source/int-range.d.ts +53 -0
  1933. package/node_modules/type-fest/source/internal.d.ts +824 -0
  1934. package/node_modules/type-fest/source/invariant-of.d.ts +78 -0
  1935. package/node_modules/type-fest/source/is-any.d.ts +29 -0
  1936. package/node_modules/type-fest/source/is-equal.d.ts +31 -0
  1937. package/node_modules/type-fest/source/is-literal.d.ts +256 -0
  1938. package/node_modules/type-fest/source/is-never.d.ts +49 -0
  1939. package/node_modules/type-fest/source/is-unknown.d.ts +52 -0
  1940. package/node_modules/type-fest/source/iterable-element.d.ts +54 -0
  1941. package/node_modules/type-fest/source/join.d.ts +68 -0
  1942. package/node_modules/type-fest/source/jsonifiable.d.ts +37 -0
  1943. package/node_modules/type-fest/source/jsonify.d.ts +121 -0
  1944. package/node_modules/type-fest/source/kebab-case.d.ts +38 -0
  1945. package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +47 -0
  1946. package/node_modules/type-fest/source/kebab-cased-properties.d.ts +30 -0
  1947. package/node_modules/type-fest/source/keys-of-union.d.ts +40 -0
  1948. package/node_modules/type-fest/source/last-array-element.d.ts +38 -0
  1949. package/node_modules/type-fest/source/less-than-or-equal.d.ts +22 -0
  1950. package/node_modules/type-fest/source/less-than.d.ts +22 -0
  1951. package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +36 -0
  1952. package/node_modules/type-fest/source/literal-to-primitive.d.ts +36 -0
  1953. package/node_modules/type-fest/source/literal-union.d.ts +35 -0
  1954. package/node_modules/type-fest/source/merge-deep.d.ts +487 -0
  1955. package/node_modules/type-fest/source/merge-exclusive.d.ts +41 -0
  1956. package/node_modules/type-fest/source/merge.d.ts +48 -0
  1957. package/node_modules/type-fest/source/multidimensional-array.d.ts +44 -0
  1958. package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +48 -0
  1959. package/node_modules/type-fest/source/non-empty-object.d.ts +35 -0
  1960. package/node_modules/type-fest/source/numeric.d.ts +187 -0
  1961. package/node_modules/type-fest/source/observable-like.d.ts +63 -0
  1962. package/node_modules/type-fest/source/omit-deep.d.ts +140 -0
  1963. package/node_modules/type-fest/source/omit-index-signature.d.ts +107 -0
  1964. package/node_modules/type-fest/source/opaque.d.ts +250 -0
  1965. package/node_modules/type-fest/source/optional-keys-of.d.ts +38 -0
  1966. package/node_modules/type-fest/source/override-properties.d.ts +36 -0
  1967. package/node_modules/type-fest/source/package-json.d.ts +676 -0
  1968. package/node_modules/type-fest/source/partial-deep.d.ts +109 -0
  1969. package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +71 -0
  1970. package/node_modules/type-fest/source/pascal-case.d.ts +38 -0
  1971. package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +55 -0
  1972. package/node_modules/type-fest/source/pascal-cased-properties.d.ts +35 -0
  1973. package/node_modules/type-fest/source/paths.d.ts +79 -0
  1974. package/node_modules/type-fest/source/pick-deep.d.ts +149 -0
  1975. package/node_modules/type-fest/source/pick-index-signature.d.ts +102 -0
  1976. package/node_modules/type-fest/source/primitive.d.ts +13 -0
  1977. package/node_modules/type-fest/source/promisable.d.ts +25 -0
  1978. package/node_modules/type-fest/source/readonly-deep.d.ts +81 -0
  1979. package/node_modules/type-fest/source/readonly-keys-of.d.ts +29 -0
  1980. package/node_modules/type-fest/source/readonly-tuple.d.ts +41 -0
  1981. package/node_modules/type-fest/source/replace.d.ts +67 -0
  1982. package/node_modules/type-fest/source/require-all-or-none.d.ts +42 -0
  1983. package/node_modules/type-fest/source/require-at-least-one.d.ts +34 -0
  1984. package/node_modules/type-fest/source/require-exactly-one.d.ts +34 -0
  1985. package/node_modules/type-fest/source/require-one-or-none.d.ts +37 -0
  1986. package/node_modules/type-fest/source/required-deep.d.ts +78 -0
  1987. package/node_modules/type-fest/source/required-keys-of.d.ts +29 -0
  1988. package/node_modules/type-fest/source/schema.d.ts +71 -0
  1989. package/node_modules/type-fest/source/screaming-snake-case.d.ts +33 -0
  1990. package/node_modules/type-fest/source/set-field-type.d.ts +37 -0
  1991. package/node_modules/type-fest/source/set-non-nullable.d.ts +39 -0
  1992. package/node_modules/type-fest/source/set-optional.d.ts +35 -0
  1993. package/node_modules/type-fest/source/set-parameter-type.d.ts +117 -0
  1994. package/node_modules/type-fest/source/set-readonly.d.ts +38 -0
  1995. package/node_modules/type-fest/source/set-required.d.ts +40 -0
  1996. package/node_modules/type-fest/source/set-return-type.d.ts +29 -0
  1997. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +168 -0
  1998. package/node_modules/type-fest/source/simplify.d.ts +58 -0
  1999. package/node_modules/type-fest/source/single-key-object.d.ts +29 -0
  2000. package/node_modules/type-fest/source/snake-case.d.ts +38 -0
  2001. package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +47 -0
  2002. package/node_modules/type-fest/source/snake-cased-properties.d.ts +30 -0
  2003. package/node_modules/type-fest/source/split-words.d.ts +57 -0
  2004. package/node_modules/type-fest/source/split.d.ts +29 -0
  2005. package/node_modules/type-fest/source/spread.d.ts +85 -0
  2006. package/node_modules/type-fest/source/string-key-of.d.ts +25 -0
  2007. package/node_modules/type-fest/source/string-slice.d.ts +37 -0
  2008. package/node_modules/type-fest/source/stringified.d.ts +23 -0
  2009. package/node_modules/type-fest/source/subtract.d.ts +68 -0
  2010. package/node_modules/type-fest/source/sum.d.ts +68 -0
  2011. package/node_modules/type-fest/source/tagged-union.d.ts +51 -0
  2012. package/node_modules/type-fest/source/trim.d.ts +27 -0
  2013. package/node_modules/type-fest/source/tsconfig-json.d.ts +1180 -0
  2014. package/node_modules/type-fest/source/tuple-to-union.d.ts +51 -0
  2015. package/node_modules/type-fest/source/typed-array.d.ts +17 -0
  2016. package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +81 -0
  2017. package/node_modules/type-fest/source/union-to-intersection.d.ts +61 -0
  2018. package/node_modules/type-fest/source/unknown-array.d.ts +25 -0
  2019. package/node_modules/type-fest/source/unknown-record.d.ts +31 -0
  2020. package/node_modules/type-fest/source/value-of.d.ts +42 -0
  2021. package/node_modules/type-fest/source/writable-deep.d.ts +83 -0
  2022. package/node_modules/type-fest/source/writable-keys-of.d.ts +30 -0
  2023. package/node_modules/type-fest/source/writable.d.ts +68 -0
  2024. package/node_modules/use-callback-ref/LICENSE +21 -0
  2025. package/node_modules/use-callback-ref/README.md +170 -0
  2026. package/node_modules/use-callback-ref/dist/es2015/assignRef.d.ts +15 -0
  2027. package/node_modules/use-callback-ref/dist/es2015/assignRef.js +22 -0
  2028. package/node_modules/use-callback-ref/dist/es2015/createRef.d.ts +10 -0
  2029. package/node_modules/use-callback-ref/dist/es2015/createRef.js +23 -0
  2030. package/node_modules/use-callback-ref/dist/es2015/index.d.ts +8 -0
  2031. package/node_modules/use-callback-ref/dist/es2015/index.js +12 -0
  2032. package/node_modules/use-callback-ref/dist/es2015/mergeRef.d.ts +16 -0
  2033. package/node_modules/use-callback-ref/dist/es2015/mergeRef.js +18 -0
  2034. package/node_modules/use-callback-ref/dist/es2015/refToCallback.d.ts +24 -0
  2035. package/node_modules/use-callback-ref/dist/es2015/refToCallback.js +48 -0
  2036. package/node_modules/use-callback-ref/dist/es2015/transformRef.d.ts +11 -0
  2037. package/node_modules/use-callback-ref/dist/es2015/transformRef.js +14 -0
  2038. package/node_modules/use-callback-ref/dist/es2015/types.d.ts +5 -0
  2039. package/node_modules/use-callback-ref/dist/es2015/types.js +1 -0
  2040. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.d.ts +17 -0
  2041. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +45 -0
  2042. package/node_modules/use-callback-ref/dist/es2015/useRef.d.ts +16 -0
  2043. package/node_modules/use-callback-ref/dist/es2015/useRef.js +39 -0
  2044. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.d.ts +15 -0
  2045. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.js +18 -0
  2046. package/node_modules/use-callback-ref/dist/es2019/assignRef.d.ts +15 -0
  2047. package/node_modules/use-callback-ref/dist/es2019/assignRef.js +22 -0
  2048. package/node_modules/use-callback-ref/dist/es2019/createRef.d.ts +10 -0
  2049. package/node_modules/use-callback-ref/dist/es2019/createRef.js +23 -0
  2050. package/node_modules/use-callback-ref/dist/es2019/index.d.ts +8 -0
  2051. package/node_modules/use-callback-ref/dist/es2019/index.js +12 -0
  2052. package/node_modules/use-callback-ref/dist/es2019/mergeRef.d.ts +16 -0
  2053. package/node_modules/use-callback-ref/dist/es2019/mergeRef.js +18 -0
  2054. package/node_modules/use-callback-ref/dist/es2019/refToCallback.d.ts +24 -0
  2055. package/node_modules/use-callback-ref/dist/es2019/refToCallback.js +48 -0
  2056. package/node_modules/use-callback-ref/dist/es2019/transformRef.d.ts +11 -0
  2057. package/node_modules/use-callback-ref/dist/es2019/transformRef.js +14 -0
  2058. package/node_modules/use-callback-ref/dist/es2019/types.d.ts +5 -0
  2059. package/node_modules/use-callback-ref/dist/es2019/types.js +1 -0
  2060. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.d.ts +17 -0
  2061. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.js +43 -0
  2062. package/node_modules/use-callback-ref/dist/es2019/useRef.d.ts +16 -0
  2063. package/node_modules/use-callback-ref/dist/es2019/useRef.js +39 -0
  2064. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.d.ts +15 -0
  2065. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.js +18 -0
  2066. package/node_modules/use-callback-ref/dist/es5/assignRef.d.ts +15 -0
  2067. package/node_modules/use-callback-ref/dist/es5/assignRef.js +26 -0
  2068. package/node_modules/use-callback-ref/dist/es5/createRef.d.ts +10 -0
  2069. package/node_modules/use-callback-ref/dist/es5/createRef.js +27 -0
  2070. package/node_modules/use-callback-ref/dist/es5/index.d.ts +8 -0
  2071. package/node_modules/use-callback-ref/dist/es5/index.js +24 -0
  2072. package/node_modules/use-callback-ref/dist/es5/mergeRef.d.ts +16 -0
  2073. package/node_modules/use-callback-ref/dist/es5/mergeRef.js +22 -0
  2074. package/node_modules/use-callback-ref/dist/es5/refToCallback.d.ts +24 -0
  2075. package/node_modules/use-callback-ref/dist/es5/refToCallback.js +53 -0
  2076. package/node_modules/use-callback-ref/dist/es5/transformRef.d.ts +11 -0
  2077. package/node_modules/use-callback-ref/dist/es5/transformRef.js +18 -0
  2078. package/node_modules/use-callback-ref/dist/es5/types.d.ts +5 -0
  2079. package/node_modules/use-callback-ref/dist/es5/types.js +2 -0
  2080. package/node_modules/use-callback-ref/dist/es5/useMergeRef.d.ts +17 -0
  2081. package/node_modules/use-callback-ref/dist/es5/useMergeRef.js +50 -0
  2082. package/node_modules/use-callback-ref/dist/es5/useRef.d.ts +16 -0
  2083. package/node_modules/use-callback-ref/dist/es5/useRef.js +43 -0
  2084. package/node_modules/use-callback-ref/dist/es5/useTransformRef.d.ts +15 -0
  2085. package/node_modules/use-callback-ref/dist/es5/useTransformRef.js +22 -0
  2086. package/node_modules/use-callback-ref/package.json +84 -0
  2087. package/node_modules/use-sidecar/LICENSE +21 -0
  2088. package/node_modules/use-sidecar/README.md +349 -0
  2089. package/node_modules/use-sidecar/dist/es2015/config.d.ts +5 -0
  2090. package/node_modules/use-sidecar/dist/es2015/config.js +6 -0
  2091. package/node_modules/use-sidecar/dist/es2015/env.d.ts +4 -0
  2092. package/node_modules/use-sidecar/dist/es2015/env.js +5 -0
  2093. package/node_modules/use-sidecar/dist/es2015/exports.d.ts +3 -0
  2094. package/node_modules/use-sidecar/dist/es2015/exports.js +18 -0
  2095. package/node_modules/use-sidecar/dist/es2015/hoc.d.ts +3 -0
  2096. package/node_modules/use-sidecar/dist/es2015/hoc.js +15 -0
  2097. package/node_modules/use-sidecar/dist/es2015/hook.d.ts +2 -0
  2098. package/node_modules/use-sidecar/dist/es2015/hook.js +41 -0
  2099. package/node_modules/use-sidecar/dist/es2015/index.d.ts +7 -0
  2100. package/node_modules/use-sidecar/dist/es2015/index.js +6 -0
  2101. package/node_modules/use-sidecar/dist/es2015/medium.d.ts +3 -0
  2102. package/node_modules/use-sidecar/dist/es2015/medium.js +78 -0
  2103. package/node_modules/use-sidecar/dist/es2015/renderProp.d.ts +8 -0
  2104. package/node_modules/use-sidecar/dist/es2015/renderProp.js +35 -0
  2105. package/node_modules/use-sidecar/dist/es2015/types.d.ts +47 -0
  2106. package/node_modules/use-sidecar/dist/es2015/types.js +1 -0
  2107. package/node_modules/use-sidecar/dist/es2019/config.d.ts +5 -0
  2108. package/node_modules/use-sidecar/dist/es2019/config.js +6 -0
  2109. package/node_modules/use-sidecar/dist/es2019/env.d.ts +4 -0
  2110. package/node_modules/use-sidecar/dist/es2019/env.js +5 -0
  2111. package/node_modules/use-sidecar/dist/es2019/exports.d.ts +3 -0
  2112. package/node_modules/use-sidecar/dist/es2019/exports.js +16 -0
  2113. package/node_modules/use-sidecar/dist/es2019/hoc.d.ts +3 -0
  2114. package/node_modules/use-sidecar/dist/es2019/hoc.js +14 -0
  2115. package/node_modules/use-sidecar/dist/es2019/hook.d.ts +2 -0
  2116. package/node_modules/use-sidecar/dist/es2019/hook.js +41 -0
  2117. package/node_modules/use-sidecar/dist/es2019/index.d.ts +7 -0
  2118. package/node_modules/use-sidecar/dist/es2019/index.js +6 -0
  2119. package/node_modules/use-sidecar/dist/es2019/medium.d.ts +3 -0
  2120. package/node_modules/use-sidecar/dist/es2019/medium.js +78 -0
  2121. package/node_modules/use-sidecar/dist/es2019/renderProp.d.ts +8 -0
  2122. package/node_modules/use-sidecar/dist/es2019/renderProp.js +28 -0
  2123. package/node_modules/use-sidecar/dist/es2019/types.d.ts +47 -0
  2124. package/node_modules/use-sidecar/dist/es2019/types.js +1 -0
  2125. package/node_modules/use-sidecar/dist/es5/config.d.ts +5 -0
  2126. package/node_modules/use-sidecar/dist/es5/config.js +10 -0
  2127. package/node_modules/use-sidecar/dist/es5/env.d.ts +4 -0
  2128. package/node_modules/use-sidecar/dist/es5/env.js +8 -0
  2129. package/node_modules/use-sidecar/dist/es5/exports.d.ts +3 -0
  2130. package/node_modules/use-sidecar/dist/es5/exports.js +22 -0
  2131. package/node_modules/use-sidecar/dist/es5/hoc.d.ts +3 -0
  2132. package/node_modules/use-sidecar/dist/es5/hoc.js +19 -0
  2133. package/node_modules/use-sidecar/dist/es5/hook.d.ts +2 -0
  2134. package/node_modules/use-sidecar/dist/es5/hook.js +45 -0
  2135. package/node_modules/use-sidecar/dist/es5/index.d.ts +7 -0
  2136. package/node_modules/use-sidecar/dist/es5/index.js +16 -0
  2137. package/node_modules/use-sidecar/dist/es5/medium.d.ts +3 -0
  2138. package/node_modules/use-sidecar/dist/es5/medium.js +83 -0
  2139. package/node_modules/use-sidecar/dist/es5/renderProp.d.ts +8 -0
  2140. package/node_modules/use-sidecar/dist/es5/renderProp.js +39 -0
  2141. package/node_modules/use-sidecar/dist/es5/types.d.ts +47 -0
  2142. package/node_modules/use-sidecar/dist/es5/types.js +2 -0
  2143. package/node_modules/use-sidecar/package.json +89 -0
  2144. package/node_modules/zod/LICENSE +21 -0
  2145. package/node_modules/zod/README.md +2834 -0
  2146. package/node_modules/zod/index.d.ts +2 -0
  2147. package/node_modules/zod/lib/ZodError.d.ts +163 -0
  2148. package/node_modules/zod/lib/ZodError.js +132 -0
  2149. package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  2150. package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  2151. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  2152. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  2153. package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  2154. package/node_modules/zod/lib/benchmarks/index.js +46 -0
  2155. package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  2156. package/node_modules/zod/lib/benchmarks/object.js +70 -0
  2157. package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  2158. package/node_modules/zod/lib/benchmarks/primitives.js +136 -0
  2159. package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  2160. package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  2161. package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  2162. package/node_modules/zod/lib/benchmarks/string.js +55 -0
  2163. package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  2164. package/node_modules/zod/lib/benchmarks/union.js +79 -0
  2165. package/node_modules/zod/lib/errors.d.ts +5 -0
  2166. package/node_modules/zod/lib/errors.js +17 -0
  2167. package/node_modules/zod/lib/external.d.ts +6 -0
  2168. package/node_modules/zod/lib/external.js +18 -0
  2169. package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  2170. package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  2171. package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  2172. package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  2173. package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  2174. package/node_modules/zod/lib/helpers/parseUtil.js +115 -0
  2175. package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  2176. package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  2177. package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  2178. package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  2179. package/node_modules/zod/lib/helpers/util.d.ts +68 -0
  2180. package/node_modules/zod/lib/helpers/util.js +142 -0
  2181. package/node_modules/zod/lib/index.d.ts +4 -0
  2182. package/node_modules/zod/lib/index.js +29 -0
  2183. package/node_modules/zod/lib/index.mjs +4017 -0
  2184. package/node_modules/zod/lib/index.umd.js +4131 -0
  2185. package/node_modules/zod/lib/locales/en.d.ts +3 -0
  2186. package/node_modules/zod/lib/locales/en.js +129 -0
  2187. package/node_modules/zod/lib/types.d.ts +1057 -0
  2188. package/node_modules/zod/lib/types.js +3495 -0
  2189. package/node_modules/zod/package.json +119 -0
  2190. package/package.json +191 -0
  2191. package/start.js +52 -0
@@ -0,0 +1,4870 @@
1
+ /**
2
+ * @remix-run/router v1.15.3
3
+ *
4
+ * Copyright (c) Remix Software Inc.
5
+ *
6
+ * This source code is licensed under the MIT license found in the
7
+ * LICENSE.md file in the root directory of this source tree.
8
+ *
9
+ * @license MIT
10
+ */
11
+ 'use strict';
12
+
13
+ Object.defineProperty(exports, '__esModule', { value: true });
14
+
15
+ function _extends() {
16
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
17
+ for (var i = 1; i < arguments.length; i++) {
18
+ var source = arguments[i];
19
+ for (var key in source) {
20
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
21
+ target[key] = source[key];
22
+ }
23
+ }
24
+ }
25
+ return target;
26
+ };
27
+ return _extends.apply(this, arguments);
28
+ }
29
+
30
+ ////////////////////////////////////////////////////////////////////////////////
31
+ //#region Types and Constants
32
+ ////////////////////////////////////////////////////////////////////////////////
33
+
34
+ /**
35
+ * Actions represent the type of change to a location value.
36
+ */
37
+ let Action = /*#__PURE__*/function (Action) {
38
+ Action["Pop"] = "POP";
39
+ Action["Push"] = "PUSH";
40
+ Action["Replace"] = "REPLACE";
41
+ return Action;
42
+ }({});
43
+
44
+ /**
45
+ * The pathname, search, and hash values of a URL.
46
+ */
47
+
48
+ // TODO: (v7) Change the Location generic default from `any` to `unknown` and
49
+ // remove Remix `useLocation` wrapper.
50
+ /**
51
+ * An entry in a history stack. A location contains information about the
52
+ * URL path, as well as possibly some arbitrary state and a key.
53
+ */
54
+ /**
55
+ * A change to the current location.
56
+ */
57
+ /**
58
+ * A function that receives notifications about location changes.
59
+ */
60
+ /**
61
+ * Describes a location that is the destination of some navigation, either via
62
+ * `history.push` or `history.replace`. This may be either a URL or the pieces
63
+ * of a URL path.
64
+ */
65
+ /**
66
+ * A history is an interface to the navigation stack. The history serves as the
67
+ * source of truth for the current location, as well as provides a set of
68
+ * methods that may be used to change it.
69
+ *
70
+ * It is similar to the DOM's `window.history` object, but with a smaller, more
71
+ * focused API.
72
+ */
73
+ const PopStateEventType = "popstate";
74
+ //#endregion
75
+
76
+ ////////////////////////////////////////////////////////////////////////////////
77
+ //#region Memory History
78
+ ////////////////////////////////////////////////////////////////////////////////
79
+
80
+ /**
81
+ * A user-supplied object that describes a location. Used when providing
82
+ * entries to `createMemoryHistory` via its `initialEntries` option.
83
+ */
84
+ /**
85
+ * A memory history stores locations in memory. This is useful in stateful
86
+ * environments where there is no web browser, such as node tests or React
87
+ * Native.
88
+ */
89
+ /**
90
+ * Memory history stores the current location in memory. It is designed for use
91
+ * in stateful non-browser environments like tests and React Native.
92
+ */
93
+ function createMemoryHistory(options) {
94
+ if (options === void 0) {
95
+ options = {};
96
+ }
97
+ let {
98
+ initialEntries = ["/"],
99
+ initialIndex,
100
+ v5Compat = false
101
+ } = options;
102
+ let entries; // Declare so we can access from createMemoryLocation
103
+ entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));
104
+ let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);
105
+ let action = Action.Pop;
106
+ let listener = null;
107
+ function clampIndex(n) {
108
+ return Math.min(Math.max(n, 0), entries.length - 1);
109
+ }
110
+ function getCurrentLocation() {
111
+ return entries[index];
112
+ }
113
+ function createMemoryLocation(to, state, key) {
114
+ if (state === void 0) {
115
+ state = null;
116
+ }
117
+ let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);
118
+ warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));
119
+ return location;
120
+ }
121
+ function createHref(to) {
122
+ return typeof to === "string" ? to : createPath(to);
123
+ }
124
+ let history = {
125
+ get index() {
126
+ return index;
127
+ },
128
+ get action() {
129
+ return action;
130
+ },
131
+ get location() {
132
+ return getCurrentLocation();
133
+ },
134
+ createHref,
135
+ createURL(to) {
136
+ return new URL(createHref(to), "http://localhost");
137
+ },
138
+ encodeLocation(to) {
139
+ let path = typeof to === "string" ? parsePath(to) : to;
140
+ return {
141
+ pathname: path.pathname || "",
142
+ search: path.search || "",
143
+ hash: path.hash || ""
144
+ };
145
+ },
146
+ push(to, state) {
147
+ action = Action.Push;
148
+ let nextLocation = createMemoryLocation(to, state);
149
+ index += 1;
150
+ entries.splice(index, entries.length, nextLocation);
151
+ if (v5Compat && listener) {
152
+ listener({
153
+ action,
154
+ location: nextLocation,
155
+ delta: 1
156
+ });
157
+ }
158
+ },
159
+ replace(to, state) {
160
+ action = Action.Replace;
161
+ let nextLocation = createMemoryLocation(to, state);
162
+ entries[index] = nextLocation;
163
+ if (v5Compat && listener) {
164
+ listener({
165
+ action,
166
+ location: nextLocation,
167
+ delta: 0
168
+ });
169
+ }
170
+ },
171
+ go(delta) {
172
+ action = Action.Pop;
173
+ let nextIndex = clampIndex(index + delta);
174
+ let nextLocation = entries[nextIndex];
175
+ index = nextIndex;
176
+ if (listener) {
177
+ listener({
178
+ action,
179
+ location: nextLocation,
180
+ delta
181
+ });
182
+ }
183
+ },
184
+ listen(fn) {
185
+ listener = fn;
186
+ return () => {
187
+ listener = null;
188
+ };
189
+ }
190
+ };
191
+ return history;
192
+ }
193
+ //#endregion
194
+
195
+ ////////////////////////////////////////////////////////////////////////////////
196
+ //#region Browser History
197
+ ////////////////////////////////////////////////////////////////////////////////
198
+
199
+ /**
200
+ * A browser history stores the current location in regular URLs in a web
201
+ * browser environment. This is the standard for most web apps and provides the
202
+ * cleanest URLs the browser's address bar.
203
+ *
204
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#browserhistory
205
+ */
206
+ /**
207
+ * Browser history stores the location in regular URLs. This is the standard for
208
+ * most web apps, but it requires some configuration on the server to ensure you
209
+ * serve the same app at multiple URLs.
210
+ *
211
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
212
+ */
213
+ function createBrowserHistory(options) {
214
+ if (options === void 0) {
215
+ options = {};
216
+ }
217
+ function createBrowserLocation(window, globalHistory) {
218
+ let {
219
+ pathname,
220
+ search,
221
+ hash
222
+ } = window.location;
223
+ return createLocation("", {
224
+ pathname,
225
+ search,
226
+ hash
227
+ },
228
+ // state defaults to `null` because `window.history.state` does
229
+ globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
230
+ }
231
+ function createBrowserHref(window, to) {
232
+ return typeof to === "string" ? to : createPath(to);
233
+ }
234
+ return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
235
+ }
236
+ //#endregion
237
+
238
+ ////////////////////////////////////////////////////////////////////////////////
239
+ //#region Hash History
240
+ ////////////////////////////////////////////////////////////////////////////////
241
+
242
+ /**
243
+ * A hash history stores the current location in the fragment identifier portion
244
+ * of the URL in a web browser environment.
245
+ *
246
+ * This is ideal for apps that do not control the server for some reason
247
+ * (because the fragment identifier is never sent to the server), including some
248
+ * shared hosting environments that do not provide fine-grained controls over
249
+ * which pages are served at which URLs.
250
+ *
251
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#hashhistory
252
+ */
253
+ /**
254
+ * Hash history stores the location in window.location.hash. This makes it ideal
255
+ * for situations where you don't want to send the location to the server for
256
+ * some reason, either because you do cannot configure it or the URL space is
257
+ * reserved for something else.
258
+ *
259
+ * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
260
+ */
261
+ function createHashHistory(options) {
262
+ if (options === void 0) {
263
+ options = {};
264
+ }
265
+ function createHashLocation(window, globalHistory) {
266
+ let {
267
+ pathname = "/",
268
+ search = "",
269
+ hash = ""
270
+ } = parsePath(window.location.hash.substr(1));
271
+
272
+ // Hash URL should always have a leading / just like window.location.pathname
273
+ // does, so if an app ends up at a route like /#something then we add a
274
+ // leading slash so all of our path-matching behaves the same as if it would
275
+ // in a browser router. This is particularly important when there exists a
276
+ // root splat route (<Route path="*">) since that matches internally against
277
+ // "/*" and we'd expect /#something to 404 in a hash router app.
278
+ if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
279
+ pathname = "/" + pathname;
280
+ }
281
+ return createLocation("", {
282
+ pathname,
283
+ search,
284
+ hash
285
+ },
286
+ // state defaults to `null` because `window.history.state` does
287
+ globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
288
+ }
289
+ function createHashHref(window, to) {
290
+ let base = window.document.querySelector("base");
291
+ let href = "";
292
+ if (base && base.getAttribute("href")) {
293
+ let url = window.location.href;
294
+ let hashIndex = url.indexOf("#");
295
+ href = hashIndex === -1 ? url : url.slice(0, hashIndex);
296
+ }
297
+ return href + "#" + (typeof to === "string" ? to : createPath(to));
298
+ }
299
+ function validateHashLocation(location, to) {
300
+ warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");
301
+ }
302
+ return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);
303
+ }
304
+ //#endregion
305
+
306
+ ////////////////////////////////////////////////////////////////////////////////
307
+ //#region UTILS
308
+ ////////////////////////////////////////////////////////////////////////////////
309
+
310
+ /**
311
+ * @private
312
+ */
313
+ function invariant(value, message) {
314
+ if (value === false || value === null || typeof value === "undefined") {
315
+ throw new Error(message);
316
+ }
317
+ }
318
+ function warning(cond, message) {
319
+ if (!cond) {
320
+ // eslint-disable-next-line no-console
321
+ if (typeof console !== "undefined") console.warn(message);
322
+ try {
323
+ // Welcome to debugging history!
324
+ //
325
+ // This error is thrown as a convenience, so you can more easily
326
+ // find the source for a warning that appears in the console by
327
+ // enabling "pause on exceptions" in your JavaScript debugger.
328
+ throw new Error(message);
329
+ // eslint-disable-next-line no-empty
330
+ } catch (e) {}
331
+ }
332
+ }
333
+ function createKey() {
334
+ return Math.random().toString(36).substr(2, 8);
335
+ }
336
+
337
+ /**
338
+ * For browser-based histories, we combine the state and key into an object
339
+ */
340
+ function getHistoryState(location, index) {
341
+ return {
342
+ usr: location.state,
343
+ key: location.key,
344
+ idx: index
345
+ };
346
+ }
347
+
348
+ /**
349
+ * Creates a Location object with a unique key from the given Path
350
+ */
351
+ function createLocation(current, to, state, key) {
352
+ if (state === void 0) {
353
+ state = null;
354
+ }
355
+ let location = _extends({
356
+ pathname: typeof current === "string" ? current : current.pathname,
357
+ search: "",
358
+ hash: ""
359
+ }, typeof to === "string" ? parsePath(to) : to, {
360
+ state,
361
+ // TODO: This could be cleaned up. push/replace should probably just take
362
+ // full Locations now and avoid the need to run through this flow at all
363
+ // But that's a pretty big refactor to the current test suite so going to
364
+ // keep as is for the time being and just let any incoming keys take precedence
365
+ key: to && to.key || key || createKey()
366
+ });
367
+ return location;
368
+ }
369
+
370
+ /**
371
+ * Creates a string URL path from the given pathname, search, and hash components.
372
+ */
373
+ function createPath(_ref) {
374
+ let {
375
+ pathname = "/",
376
+ search = "",
377
+ hash = ""
378
+ } = _ref;
379
+ if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
380
+ if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
381
+ return pathname;
382
+ }
383
+
384
+ /**
385
+ * Parses a string URL path into its separate pathname, search, and hash components.
386
+ */
387
+ function parsePath(path) {
388
+ let parsedPath = {};
389
+ if (path) {
390
+ let hashIndex = path.indexOf("#");
391
+ if (hashIndex >= 0) {
392
+ parsedPath.hash = path.substr(hashIndex);
393
+ path = path.substr(0, hashIndex);
394
+ }
395
+ let searchIndex = path.indexOf("?");
396
+ if (searchIndex >= 0) {
397
+ parsedPath.search = path.substr(searchIndex);
398
+ path = path.substr(0, searchIndex);
399
+ }
400
+ if (path) {
401
+ parsedPath.pathname = path;
402
+ }
403
+ }
404
+ return parsedPath;
405
+ }
406
+ function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
407
+ if (options === void 0) {
408
+ options = {};
409
+ }
410
+ let {
411
+ window = document.defaultView,
412
+ v5Compat = false
413
+ } = options;
414
+ let globalHistory = window.history;
415
+ let action = Action.Pop;
416
+ let listener = null;
417
+ let index = getIndex();
418
+ // Index should only be null when we initialize. If not, it's because the
419
+ // user called history.pushState or history.replaceState directly, in which
420
+ // case we should log a warning as it will result in bugs.
421
+ if (index == null) {
422
+ index = 0;
423
+ globalHistory.replaceState(_extends({}, globalHistory.state, {
424
+ idx: index
425
+ }), "");
426
+ }
427
+ function getIndex() {
428
+ let state = globalHistory.state || {
429
+ idx: null
430
+ };
431
+ return state.idx;
432
+ }
433
+ function handlePop() {
434
+ action = Action.Pop;
435
+ let nextIndex = getIndex();
436
+ let delta = nextIndex == null ? null : nextIndex - index;
437
+ index = nextIndex;
438
+ if (listener) {
439
+ listener({
440
+ action,
441
+ location: history.location,
442
+ delta
443
+ });
444
+ }
445
+ }
446
+ function push(to, state) {
447
+ action = Action.Push;
448
+ let location = createLocation(history.location, to, state);
449
+ if (validateLocation) validateLocation(location, to);
450
+ index = getIndex() + 1;
451
+ let historyState = getHistoryState(location, index);
452
+ let url = history.createHref(location);
453
+
454
+ // try...catch because iOS limits us to 100 pushState calls :/
455
+ try {
456
+ globalHistory.pushState(historyState, "", url);
457
+ } catch (error) {
458
+ // If the exception is because `state` can't be serialized, let that throw
459
+ // outwards just like a replace call would so the dev knows the cause
460
+ // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
461
+ // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
462
+ if (error instanceof DOMException && error.name === "DataCloneError") {
463
+ throw error;
464
+ }
465
+ // They are going to lose state here, but there is no real
466
+ // way to warn them about it since the page will refresh...
467
+ window.location.assign(url);
468
+ }
469
+ if (v5Compat && listener) {
470
+ listener({
471
+ action,
472
+ location: history.location,
473
+ delta: 1
474
+ });
475
+ }
476
+ }
477
+ function replace(to, state) {
478
+ action = Action.Replace;
479
+ let location = createLocation(history.location, to, state);
480
+ if (validateLocation) validateLocation(location, to);
481
+ index = getIndex();
482
+ let historyState = getHistoryState(location, index);
483
+ let url = history.createHref(location);
484
+ globalHistory.replaceState(historyState, "", url);
485
+ if (v5Compat && listener) {
486
+ listener({
487
+ action,
488
+ location: history.location,
489
+ delta: 0
490
+ });
491
+ }
492
+ }
493
+ function createURL(to) {
494
+ // window.location.origin is "null" (the literal string value) in Firefox
495
+ // under certain conditions, notably when serving from a local HTML file
496
+ // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
497
+ let base = window.location.origin !== "null" ? window.location.origin : window.location.href;
498
+ let href = typeof to === "string" ? to : createPath(to);
499
+ // Treating this as a full URL will strip any trailing spaces so we need to
500
+ // pre-encode them since they might be part of a matching splat param from
501
+ // an ancestor route
502
+ href = href.replace(/ $/, "%20");
503
+ invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);
504
+ return new URL(href, base);
505
+ }
506
+ let history = {
507
+ get action() {
508
+ return action;
509
+ },
510
+ get location() {
511
+ return getLocation(window, globalHistory);
512
+ },
513
+ listen(fn) {
514
+ if (listener) {
515
+ throw new Error("A history only accepts one active listener");
516
+ }
517
+ window.addEventListener(PopStateEventType, handlePop);
518
+ listener = fn;
519
+ return () => {
520
+ window.removeEventListener(PopStateEventType, handlePop);
521
+ listener = null;
522
+ };
523
+ },
524
+ createHref(to) {
525
+ return createHref(window, to);
526
+ },
527
+ createURL,
528
+ encodeLocation(to) {
529
+ // Encode a Location the same way window.location would
530
+ let url = createURL(to);
531
+ return {
532
+ pathname: url.pathname,
533
+ search: url.search,
534
+ hash: url.hash
535
+ };
536
+ },
537
+ push,
538
+ replace,
539
+ go(n) {
540
+ return globalHistory.go(n);
541
+ }
542
+ };
543
+ return history;
544
+ }
545
+
546
+ //#endregion
547
+
548
+ /**
549
+ * Map of routeId -> data returned from a loader/action/error
550
+ */
551
+
552
+ let ResultType = /*#__PURE__*/function (ResultType) {
553
+ ResultType["data"] = "data";
554
+ ResultType["deferred"] = "deferred";
555
+ ResultType["redirect"] = "redirect";
556
+ ResultType["error"] = "error";
557
+ return ResultType;
558
+ }({});
559
+
560
+ /**
561
+ * Successful result from a loader or action
562
+ */
563
+
564
+ /**
565
+ * Successful defer() result from a loader or action
566
+ */
567
+
568
+ /**
569
+ * Redirect result from a loader or action
570
+ */
571
+
572
+ /**
573
+ * Unsuccessful result from a loader or action
574
+ */
575
+
576
+ /**
577
+ * Result from a loader or action - potentially successful or unsuccessful
578
+ */
579
+
580
+ /**
581
+ * Users can specify either lowercase or uppercase form methods on `<Form>`,
582
+ * useSubmit(), `<fetcher.Form>`, etc.
583
+ */
584
+
585
+ /**
586
+ * Active navigation/fetcher form methods are exposed in lowercase on the
587
+ * RouterState
588
+ */
589
+
590
+ /**
591
+ * In v7, active navigation/fetcher form methods are exposed in uppercase on the
592
+ * RouterState. This is to align with the normalization done via fetch().
593
+ */
594
+
595
+ // Thanks https://github.com/sindresorhus/type-fest!
596
+
597
+ /**
598
+ * @private
599
+ * Internal interface to pass around for action submissions, not intended for
600
+ * external consumption
601
+ */
602
+
603
+ /**
604
+ * @private
605
+ * Arguments passed to route loader/action functions. Same for now but we keep
606
+ * this as a private implementation detail in case they diverge in the future.
607
+ */
608
+
609
+ // TODO: (v7) Change the defaults from any to unknown in and remove Remix wrappers:
610
+ // ActionFunction, ActionFunctionArgs, LoaderFunction, LoaderFunctionArgs
611
+ // Also, make them a type alias instead of an interface
612
+ /**
613
+ * Arguments passed to loader functions
614
+ */
615
+ /**
616
+ * Arguments passed to action functions
617
+ */
618
+ /**
619
+ * Loaders and actions can return anything except `undefined` (`null` is a
620
+ * valid return value if there is no data to return). Responses are preferred
621
+ * and will ease any future migration to Remix
622
+ */
623
+ /**
624
+ * Route loader function signature
625
+ */
626
+ /**
627
+ * Route action function signature
628
+ */
629
+ /**
630
+ * Arguments passed to shouldRevalidate function
631
+ */
632
+ /**
633
+ * Route shouldRevalidate function signature. This runs after any submission
634
+ * (navigation or fetcher), so we flatten the navigation/fetcher submission
635
+ * onto the arguments. It shouldn't matter whether it came from a navigation
636
+ * or a fetcher, what really matters is the URLs and the formData since loaders
637
+ * have to re-run based on the data models that were potentially mutated.
638
+ */
639
+ /**
640
+ * Function provided by the framework-aware layers to set `hasErrorBoundary`
641
+ * from the framework-aware `errorElement` prop
642
+ *
643
+ * @deprecated Use `mapRouteProperties` instead
644
+ */
645
+ /**
646
+ * Function provided by the framework-aware layers to set any framework-specific
647
+ * properties from framework-agnostic properties
648
+ */
649
+ /**
650
+ * Keys we cannot change from within a lazy() function. We spread all other keys
651
+ * onto the route. Either they're meaningful to the router, or they'll get
652
+ * ignored.
653
+ */
654
+ const immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
655
+
656
+ /**
657
+ * lazy() function to load a route definition, which can add non-matching
658
+ * related properties to a route
659
+ */
660
+
661
+ /**
662
+ * Base RouteObject with common props shared by all types of routes
663
+ */
664
+
665
+ /**
666
+ * Index routes must not have children
667
+ */
668
+
669
+ /**
670
+ * Non-index routes may have children, but cannot have index
671
+ */
672
+
673
+ /**
674
+ * A route object represents a logical route, with (optionally) its child
675
+ * routes organized in a tree-like structure.
676
+ */
677
+
678
+ /**
679
+ * A data route object, which is just a RouteObject with a required unique ID
680
+ */
681
+
682
+ // Recursive helper for finding path parameters in the absence of wildcards
683
+
684
+ /**
685
+ * Examples:
686
+ * "/a/b/*" -> "*"
687
+ * ":a" -> "a"
688
+ * "/a/:b" -> "b"
689
+ * "/a/blahblahblah:b" -> "b"
690
+ * "/:a/:b" -> "a" | "b"
691
+ * "/:a/b/:c/*" -> "a" | "c" | "*"
692
+ */
693
+
694
+ // Attempt to parse the given string segment. If it fails, then just return the
695
+ // plain string type as a default fallback. Otherwise, return the union of the
696
+ // parsed string literals that were referenced as dynamic segments in the route.
697
+ /**
698
+ * The parameters that were parsed from the URL path.
699
+ */
700
+ /**
701
+ * A RouteMatch contains info about how a route matched a URL.
702
+ */
703
+ function isIndexRoute(route) {
704
+ return route.index === true;
705
+ }
706
+
707
+ // Walk the route tree generating unique IDs where necessary, so we are working
708
+ // solely with AgnosticDataRouteObject's within the Router
709
+ function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {
710
+ if (parentPath === void 0) {
711
+ parentPath = [];
712
+ }
713
+ if (manifest === void 0) {
714
+ manifest = {};
715
+ }
716
+ return routes.map((route, index) => {
717
+ let treePath = [...parentPath, index];
718
+ let id = typeof route.id === "string" ? route.id : treePath.join("-");
719
+ invariant(route.index !== true || !route.children, "Cannot specify children on an index route");
720
+ invariant(!manifest[id], "Found a route id collision on id \"" + id + "\". Route " + "id's must be globally unique within Data Router usages");
721
+ if (isIndexRoute(route)) {
722
+ let indexRoute = _extends({}, route, mapRouteProperties(route), {
723
+ id
724
+ });
725
+ manifest[id] = indexRoute;
726
+ return indexRoute;
727
+ } else {
728
+ let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {
729
+ id,
730
+ children: undefined
731
+ });
732
+ manifest[id] = pathOrLayoutRoute;
733
+ if (route.children) {
734
+ pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);
735
+ }
736
+ return pathOrLayoutRoute;
737
+ }
738
+ });
739
+ }
740
+
741
+ /**
742
+ * Matches the given routes to a location and returns the match data.
743
+ *
744
+ * @see https://reactrouter.com/utils/match-routes
745
+ */
746
+ function matchRoutes(routes, locationArg, basename) {
747
+ if (basename === void 0) {
748
+ basename = "/";
749
+ }
750
+ let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
751
+ let pathname = stripBasename(location.pathname || "/", basename);
752
+ if (pathname == null) {
753
+ return null;
754
+ }
755
+ let branches = flattenRoutes(routes);
756
+ rankRouteBranches(branches);
757
+ let matches = null;
758
+ for (let i = 0; matches == null && i < branches.length; ++i) {
759
+ // Incoming pathnames are generally encoded from either window.location
760
+ // or from router.navigate, but we want to match against the unencoded
761
+ // paths in the route definitions. Memory router locations won't be
762
+ // encoded here but there also shouldn't be anything to decode so this
763
+ // should be a safe operation. This avoids needing matchRoutes to be
764
+ // history-aware.
765
+ let decoded = decodePath(pathname);
766
+ matches = matchRouteBranch(branches[i], decoded);
767
+ }
768
+ return matches;
769
+ }
770
+ function convertRouteMatchToUiMatch(match, loaderData) {
771
+ let {
772
+ route,
773
+ pathname,
774
+ params
775
+ } = match;
776
+ return {
777
+ id: route.id,
778
+ pathname,
779
+ params,
780
+ data: loaderData[route.id],
781
+ handle: route.handle
782
+ };
783
+ }
784
+ function flattenRoutes(routes, branches, parentsMeta, parentPath) {
785
+ if (branches === void 0) {
786
+ branches = [];
787
+ }
788
+ if (parentsMeta === void 0) {
789
+ parentsMeta = [];
790
+ }
791
+ if (parentPath === void 0) {
792
+ parentPath = "";
793
+ }
794
+ let flattenRoute = (route, index, relativePath) => {
795
+ let meta = {
796
+ relativePath: relativePath === undefined ? route.path || "" : relativePath,
797
+ caseSensitive: route.caseSensitive === true,
798
+ childrenIndex: index,
799
+ route
800
+ };
801
+ if (meta.relativePath.startsWith("/")) {
802
+ invariant(meta.relativePath.startsWith(parentPath), "Absolute route path \"" + meta.relativePath + "\" nested under path " + ("\"" + parentPath + "\" is not valid. An absolute child route path ") + "must start with the combined path of all its parent routes.");
803
+ meta.relativePath = meta.relativePath.slice(parentPath.length);
804
+ }
805
+ let path = joinPaths([parentPath, meta.relativePath]);
806
+ let routesMeta = parentsMeta.concat(meta);
807
+
808
+ // Add the children before adding this route to the array, so we traverse the
809
+ // route tree depth-first and child routes appear before their parents in
810
+ // the "flattened" version.
811
+ if (route.children && route.children.length > 0) {
812
+ invariant(
813
+ // Our types know better, but runtime JS may not!
814
+ // @ts-expect-error
815
+ route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \"" + path + "\"."));
816
+ flattenRoutes(route.children, branches, routesMeta, path);
817
+ }
818
+
819
+ // Routes without a path shouldn't ever match by themselves unless they are
820
+ // index routes, so don't add them to the list of possible branches.
821
+ if (route.path == null && !route.index) {
822
+ return;
823
+ }
824
+ branches.push({
825
+ path,
826
+ score: computeScore(path, route.index),
827
+ routesMeta
828
+ });
829
+ };
830
+ routes.forEach((route, index) => {
831
+ var _route$path;
832
+ // coarse-grain check for optional params
833
+ if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {
834
+ flattenRoute(route, index);
835
+ } else {
836
+ for (let exploded of explodeOptionalSegments(route.path)) {
837
+ flattenRoute(route, index, exploded);
838
+ }
839
+ }
840
+ });
841
+ return branches;
842
+ }
843
+
844
+ /**
845
+ * Computes all combinations of optional path segments for a given path,
846
+ * excluding combinations that are ambiguous and of lower priority.
847
+ *
848
+ * For example, `/one/:two?/three/:four?/:five?` explodes to:
849
+ * - `/one/three`
850
+ * - `/one/:two/three`
851
+ * - `/one/three/:four`
852
+ * - `/one/three/:five`
853
+ * - `/one/:two/three/:four`
854
+ * - `/one/:two/three/:five`
855
+ * - `/one/three/:four/:five`
856
+ * - `/one/:two/three/:four/:five`
857
+ */
858
+ function explodeOptionalSegments(path) {
859
+ let segments = path.split("/");
860
+ if (segments.length === 0) return [];
861
+ let [first, ...rest] = segments;
862
+
863
+ // Optional path segments are denoted by a trailing `?`
864
+ let isOptional = first.endsWith("?");
865
+ // Compute the corresponding required segment: `foo?` -> `foo`
866
+ let required = first.replace(/\?$/, "");
867
+ if (rest.length === 0) {
868
+ // Intepret empty string as omitting an optional segment
869
+ // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
870
+ return isOptional ? [required, ""] : [required];
871
+ }
872
+ let restExploded = explodeOptionalSegments(rest.join("/"));
873
+ let result = [];
874
+
875
+ // All child paths with the prefix. Do this for all children before the
876
+ // optional version for all children, so we get consistent ordering where the
877
+ // parent optional aspect is preferred as required. Otherwise, we can get
878
+ // child sections interspersed where deeper optional segments are higher than
879
+ // parent optional segments, where for example, /:two would explode _earlier_
880
+ // then /:one. By always including the parent as required _for all children_
881
+ // first, we avoid this issue
882
+ result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));
883
+
884
+ // Then, if this is an optional value, add all child versions without
885
+ if (isOptional) {
886
+ result.push(...restExploded);
887
+ }
888
+
889
+ // for absolute paths, ensure `/` instead of empty segment
890
+ return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded);
891
+ }
892
+ function rankRouteBranches(branches) {
893
+ branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first
894
+ : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));
895
+ }
896
+ const paramRe = /^:[\w-]+$/;
897
+ const dynamicSegmentValue = 3;
898
+ const indexRouteValue = 2;
899
+ const emptySegmentValue = 1;
900
+ const staticSegmentValue = 10;
901
+ const splatPenalty = -2;
902
+ const isSplat = s => s === "*";
903
+ function computeScore(path, index) {
904
+ let segments = path.split("/");
905
+ let initialScore = segments.length;
906
+ if (segments.some(isSplat)) {
907
+ initialScore += splatPenalty;
908
+ }
909
+ if (index) {
910
+ initialScore += indexRouteValue;
911
+ }
912
+ return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
913
+ }
914
+ function compareIndexes(a, b) {
915
+ let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
916
+ return siblings ?
917
+ // If two routes are siblings, we should try to match the earlier sibling
918
+ // first. This allows people to have fine-grained control over the matching
919
+ // behavior by simply putting routes with identical paths in the order they
920
+ // want them tried.
921
+ a[a.length - 1] - b[b.length - 1] :
922
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
923
+ // so they sort equally.
924
+ 0;
925
+ }
926
+ function matchRouteBranch(branch, pathname) {
927
+ let {
928
+ routesMeta
929
+ } = branch;
930
+ let matchedParams = {};
931
+ let matchedPathname = "/";
932
+ let matches = [];
933
+ for (let i = 0; i < routesMeta.length; ++i) {
934
+ let meta = routesMeta[i];
935
+ let end = i === routesMeta.length - 1;
936
+ let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
937
+ let match = matchPath({
938
+ path: meta.relativePath,
939
+ caseSensitive: meta.caseSensitive,
940
+ end
941
+ }, remainingPathname);
942
+ if (!match) return null;
943
+ Object.assign(matchedParams, match.params);
944
+ let route = meta.route;
945
+ matches.push({
946
+ // TODO: Can this as be avoided?
947
+ params: matchedParams,
948
+ pathname: joinPaths([matchedPathname, match.pathname]),
949
+ pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
950
+ route
951
+ });
952
+ if (match.pathnameBase !== "/") {
953
+ matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
954
+ }
955
+ }
956
+ return matches;
957
+ }
958
+
959
+ /**
960
+ * Returns a path with params interpolated.
961
+ *
962
+ * @see https://reactrouter.com/utils/generate-path
963
+ */
964
+ function generatePath(originalPath, params) {
965
+ if (params === void 0) {
966
+ params = {};
967
+ }
968
+ let path = originalPath;
969
+ if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) {
970
+ warning(false, "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
971
+ path = path.replace(/\*$/, "/*");
972
+ }
973
+
974
+ // ensure `/` is added at the beginning if the path is absolute
975
+ const prefix = path.startsWith("/") ? "/" : "";
976
+ const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p);
977
+ const segments = path.split(/\/+/).map((segment, index, array) => {
978
+ const isLastSegment = index === array.length - 1;
979
+
980
+ // only apply the splat if it's the last segment
981
+ if (isLastSegment && segment === "*") {
982
+ const star = "*";
983
+ // Apply the splat
984
+ return stringify(params[star]);
985
+ }
986
+ const keyMatch = segment.match(/^:([\w-]+)(\??)$/);
987
+ if (keyMatch) {
988
+ const [, key, optional] = keyMatch;
989
+ let param = params[key];
990
+ invariant(optional === "?" || param != null, "Missing \":" + key + "\" param");
991
+ return stringify(param);
992
+ }
993
+
994
+ // Remove any optional markers from optional static segments
995
+ return segment.replace(/\?$/g, "");
996
+ })
997
+ // Remove empty segments
998
+ .filter(segment => !!segment);
999
+ return prefix + segments.join("/");
1000
+ }
1001
+
1002
+ /**
1003
+ * A PathPattern is used to match on some portion of a URL pathname.
1004
+ */
1005
+
1006
+ /**
1007
+ * A PathMatch contains info about how a PathPattern matched on a URL pathname.
1008
+ */
1009
+
1010
+ /**
1011
+ * Performs pattern matching on a URL pathname and returns information about
1012
+ * the match.
1013
+ *
1014
+ * @see https://reactrouter.com/utils/match-path
1015
+ */
1016
+ function matchPath(pattern, pathname) {
1017
+ if (typeof pattern === "string") {
1018
+ pattern = {
1019
+ path: pattern,
1020
+ caseSensitive: false,
1021
+ end: true
1022
+ };
1023
+ }
1024
+ let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
1025
+ let match = pathname.match(matcher);
1026
+ if (!match) return null;
1027
+ let matchedPathname = match[0];
1028
+ let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
1029
+ let captureGroups = match.slice(1);
1030
+ let params = compiledParams.reduce((memo, _ref, index) => {
1031
+ let {
1032
+ paramName,
1033
+ isOptional
1034
+ } = _ref;
1035
+ // We need to compute the pathnameBase here using the raw splat value
1036
+ // instead of using params["*"] later because it will be decoded then
1037
+ if (paramName === "*") {
1038
+ let splatValue = captureGroups[index] || "";
1039
+ pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
1040
+ }
1041
+ const value = captureGroups[index];
1042
+ if (isOptional && !value) {
1043
+ memo[paramName] = undefined;
1044
+ } else {
1045
+ memo[paramName] = (value || "").replace(/%2F/g, "/");
1046
+ }
1047
+ return memo;
1048
+ }, {});
1049
+ return {
1050
+ params,
1051
+ pathname: matchedPathname,
1052
+ pathnameBase,
1053
+ pattern
1054
+ };
1055
+ }
1056
+ function compilePath(path, caseSensitive, end) {
1057
+ if (caseSensitive === void 0) {
1058
+ caseSensitive = false;
1059
+ }
1060
+ if (end === void 0) {
1061
+ end = true;
1062
+ }
1063
+ warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
1064
+ let params = [];
1065
+ let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
1066
+ .replace(/^\/*/, "/") // Make sure it has a leading /
1067
+ .replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
1068
+ .replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
1069
+ params.push({
1070
+ paramName,
1071
+ isOptional: isOptional != null
1072
+ });
1073
+ return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
1074
+ });
1075
+ if (path.endsWith("*")) {
1076
+ params.push({
1077
+ paramName: "*"
1078
+ });
1079
+ regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
1080
+ : "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
1081
+ } else if (end) {
1082
+ // When matching to the end, ignore trailing slashes
1083
+ regexpSource += "\\/*$";
1084
+ } else if (path !== "" && path !== "/") {
1085
+ // If our path is non-empty and contains anything beyond an initial slash,
1086
+ // then we have _some_ form of path in our regex, so we should expect to
1087
+ // match only if we find the end of this path segment. Look for an optional
1088
+ // non-captured trailing slash (to match a portion of the URL) or the end
1089
+ // of the path (if we've matched to the end). We used to do this with a
1090
+ // word boundary but that gives false positives on routes like
1091
+ // /user-preferences since `-` counts as a word boundary.
1092
+ regexpSource += "(?:(?=\\/|$))";
1093
+ } else ;
1094
+ let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
1095
+ return [matcher, params];
1096
+ }
1097
+ function decodePath(value) {
1098
+ try {
1099
+ return value.split("/").map(v => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
1100
+ } catch (error) {
1101
+ warning(false, "The URL path \"" + value + "\" could not be decoded because it is is a " + "malformed URL segment. This is probably due to a bad percent " + ("encoding (" + error + ")."));
1102
+ return value;
1103
+ }
1104
+ }
1105
+
1106
+ /**
1107
+ * @private
1108
+ */
1109
+ function stripBasename(pathname, basename) {
1110
+ if (basename === "/") return pathname;
1111
+ if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
1112
+ return null;
1113
+ }
1114
+
1115
+ // We want to leave trailing slash behavior in the user's control, so if they
1116
+ // specify a basename with a trailing slash, we should support it
1117
+ let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
1118
+ let nextChar = pathname.charAt(startIndex);
1119
+ if (nextChar && nextChar !== "/") {
1120
+ // pathname does not start with basename/
1121
+ return null;
1122
+ }
1123
+ return pathname.slice(startIndex) || "/";
1124
+ }
1125
+
1126
+ /**
1127
+ * Returns a resolved path object relative to the given pathname.
1128
+ *
1129
+ * @see https://reactrouter.com/utils/resolve-path
1130
+ */
1131
+ function resolvePath(to, fromPathname) {
1132
+ if (fromPathname === void 0) {
1133
+ fromPathname = "/";
1134
+ }
1135
+ let {
1136
+ pathname: toPathname,
1137
+ search = "",
1138
+ hash = ""
1139
+ } = typeof to === "string" ? parsePath(to) : to;
1140
+ let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
1141
+ return {
1142
+ pathname,
1143
+ search: normalizeSearch(search),
1144
+ hash: normalizeHash(hash)
1145
+ };
1146
+ }
1147
+ function resolvePathname(relativePath, fromPathname) {
1148
+ let segments = fromPathname.replace(/\/+$/, "").split("/");
1149
+ let relativeSegments = relativePath.split("/");
1150
+ relativeSegments.forEach(segment => {
1151
+ if (segment === "..") {
1152
+ // Keep the root "" segment so the pathname starts at /
1153
+ if (segments.length > 1) segments.pop();
1154
+ } else if (segment !== ".") {
1155
+ segments.push(segment);
1156
+ }
1157
+ });
1158
+ return segments.length > 1 ? segments.join("/") : "/";
1159
+ }
1160
+ function getInvalidPathError(char, field, dest, path) {
1161
+ return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\"...\"> and the router will parse it for you.";
1162
+ }
1163
+
1164
+ /**
1165
+ * @private
1166
+ *
1167
+ * When processing relative navigation we want to ignore ancestor routes that
1168
+ * do not contribute to the path, such that index/pathless layout routes don't
1169
+ * interfere.
1170
+ *
1171
+ * For example, when moving a route element into an index route and/or a
1172
+ * pathless layout route, relative link behavior contained within should stay
1173
+ * the same. Both of the following examples should link back to the root:
1174
+ *
1175
+ * <Route path="/">
1176
+ * <Route path="accounts" element={<Link to=".."}>
1177
+ * </Route>
1178
+ *
1179
+ * <Route path="/">
1180
+ * <Route path="accounts">
1181
+ * <Route element={<AccountsLayout />}> // <-- Does not contribute
1182
+ * <Route index element={<Link to=".."} /> // <-- Does not contribute
1183
+ * </Route
1184
+ * </Route>
1185
+ * </Route>
1186
+ */
1187
+ function getPathContributingMatches(matches) {
1188
+ return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
1189
+ }
1190
+
1191
+ // Return the array of pathnames for the current route matches - used to
1192
+ // generate the routePathnames input for resolveTo()
1193
+ function getResolveToMatches(matches, v7_relativeSplatPath) {
1194
+ let pathMatches = getPathContributingMatches(matches);
1195
+
1196
+ // When v7_relativeSplatPath is enabled, use the full pathname for the leaf
1197
+ // match so we include splat values for "." links. See:
1198
+ // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
1199
+ if (v7_relativeSplatPath) {
1200
+ return pathMatches.map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
1201
+ }
1202
+ return pathMatches.map(match => match.pathnameBase);
1203
+ }
1204
+
1205
+ /**
1206
+ * @private
1207
+ */
1208
+ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
1209
+ if (isPathRelative === void 0) {
1210
+ isPathRelative = false;
1211
+ }
1212
+ let to;
1213
+ if (typeof toArg === "string") {
1214
+ to = parsePath(toArg);
1215
+ } else {
1216
+ to = _extends({}, toArg);
1217
+ invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
1218
+ invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
1219
+ invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
1220
+ }
1221
+ let isEmptyPath = toArg === "" || to.pathname === "";
1222
+ let toPathname = isEmptyPath ? "/" : to.pathname;
1223
+ let from;
1224
+
1225
+ // Routing is relative to the current pathname if explicitly requested.
1226
+ //
1227
+ // If a pathname is explicitly provided in `to`, it should be relative to the
1228
+ // route context. This is explained in `Note on `<Link to>` values` in our
1229
+ // migration guide from v5 as a means of disambiguation between `to` values
1230
+ // that begin with `/` and those that do not. However, this is problematic for
1231
+ // `to` values that do not provide a pathname. `to` can simply be a search or
1232
+ // hash string, in which case we should assume that the navigation is relative
1233
+ // to the current location's pathname and *not* the route pathname.
1234
+ if (toPathname == null) {
1235
+ from = locationPathname;
1236
+ } else {
1237
+ let routePathnameIndex = routePathnames.length - 1;
1238
+
1239
+ // With relative="route" (the default), each leading .. segment means
1240
+ // "go up one route" instead of "go up one URL segment". This is a key
1241
+ // difference from how <a href> works and a major reason we call this a
1242
+ // "to" value instead of a "href".
1243
+ if (!isPathRelative && toPathname.startsWith("..")) {
1244
+ let toSegments = toPathname.split("/");
1245
+ while (toSegments[0] === "..") {
1246
+ toSegments.shift();
1247
+ routePathnameIndex -= 1;
1248
+ }
1249
+ to.pathname = toSegments.join("/");
1250
+ }
1251
+ from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
1252
+ }
1253
+ let path = resolvePath(to, from);
1254
+
1255
+ // Ensure the pathname has a trailing slash if the original "to" had one
1256
+ let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
1257
+ // Or if this was a link to the current path which has a trailing slash
1258
+ let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
1259
+ if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
1260
+ path.pathname += "/";
1261
+ }
1262
+ return path;
1263
+ }
1264
+
1265
+ /**
1266
+ * @private
1267
+ */
1268
+ function getToPathname(to) {
1269
+ // Empty strings should be treated the same as / paths
1270
+ return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname;
1271
+ }
1272
+
1273
+ /**
1274
+ * @private
1275
+ */
1276
+ const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
1277
+
1278
+ /**
1279
+ * @private
1280
+ */
1281
+ const normalizePathname = pathname => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
1282
+
1283
+ /**
1284
+ * @private
1285
+ */
1286
+ const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
1287
+
1288
+ /**
1289
+ * @private
1290
+ */
1291
+ const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
1292
+ /**
1293
+ * This is a shortcut for creating `application/json` responses. Converts `data`
1294
+ * to JSON and sets the `Content-Type` header.
1295
+ */
1296
+ const json = function json(data, init) {
1297
+ if (init === void 0) {
1298
+ init = {};
1299
+ }
1300
+ let responseInit = typeof init === "number" ? {
1301
+ status: init
1302
+ } : init;
1303
+ let headers = new Headers(responseInit.headers);
1304
+ if (!headers.has("Content-Type")) {
1305
+ headers.set("Content-Type", "application/json; charset=utf-8");
1306
+ }
1307
+ return new Response(JSON.stringify(data), _extends({}, responseInit, {
1308
+ headers
1309
+ }));
1310
+ };
1311
+ class AbortedDeferredError extends Error {}
1312
+ class DeferredData {
1313
+ constructor(data, responseInit) {
1314
+ this.pendingKeysSet = new Set();
1315
+ this.subscribers = new Set();
1316
+ this.deferredKeys = [];
1317
+ invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects");
1318
+
1319
+ // Set up an AbortController + Promise we can race against to exit early
1320
+ // cancellation
1321
+ let reject;
1322
+ this.abortPromise = new Promise((_, r) => reject = r);
1323
+ this.controller = new AbortController();
1324
+ let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted"));
1325
+ this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort);
1326
+ this.controller.signal.addEventListener("abort", onAbort);
1327
+ this.data = Object.entries(data).reduce((acc, _ref2) => {
1328
+ let [key, value] = _ref2;
1329
+ return Object.assign(acc, {
1330
+ [key]: this.trackPromise(key, value)
1331
+ });
1332
+ }, {});
1333
+ if (this.done) {
1334
+ // All incoming values were resolved
1335
+ this.unlistenAbortSignal();
1336
+ }
1337
+ this.init = responseInit;
1338
+ }
1339
+ trackPromise(key, value) {
1340
+ if (!(value instanceof Promise)) {
1341
+ return value;
1342
+ }
1343
+ this.deferredKeys.push(key);
1344
+ this.pendingKeysSet.add(key);
1345
+
1346
+ // We store a little wrapper promise that will be extended with
1347
+ // _data/_error props upon resolve/reject
1348
+ let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));
1349
+
1350
+ // Register rejection listeners to avoid uncaught promise rejections on
1351
+ // errors or aborted deferred values
1352
+ promise.catch(() => {});
1353
+ Object.defineProperty(promise, "_tracked", {
1354
+ get: () => true
1355
+ });
1356
+ return promise;
1357
+ }
1358
+ onSettle(promise, key, error, data) {
1359
+ if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {
1360
+ this.unlistenAbortSignal();
1361
+ Object.defineProperty(promise, "_error", {
1362
+ get: () => error
1363
+ });
1364
+ return Promise.reject(error);
1365
+ }
1366
+ this.pendingKeysSet.delete(key);
1367
+ if (this.done) {
1368
+ // Nothing left to abort!
1369
+ this.unlistenAbortSignal();
1370
+ }
1371
+
1372
+ // If the promise was resolved/rejected with undefined, we'll throw an error as you
1373
+ // should always resolve with a value or null
1374
+ if (error === undefined && data === undefined) {
1375
+ let undefinedError = new Error("Deferred data for key \"" + key + "\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`.");
1376
+ Object.defineProperty(promise, "_error", {
1377
+ get: () => undefinedError
1378
+ });
1379
+ this.emit(false, key);
1380
+ return Promise.reject(undefinedError);
1381
+ }
1382
+ if (data === undefined) {
1383
+ Object.defineProperty(promise, "_error", {
1384
+ get: () => error
1385
+ });
1386
+ this.emit(false, key);
1387
+ return Promise.reject(error);
1388
+ }
1389
+ Object.defineProperty(promise, "_data", {
1390
+ get: () => data
1391
+ });
1392
+ this.emit(false, key);
1393
+ return data;
1394
+ }
1395
+ emit(aborted, settledKey) {
1396
+ this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));
1397
+ }
1398
+ subscribe(fn) {
1399
+ this.subscribers.add(fn);
1400
+ return () => this.subscribers.delete(fn);
1401
+ }
1402
+ cancel() {
1403
+ this.controller.abort();
1404
+ this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));
1405
+ this.emit(true);
1406
+ }
1407
+ async resolveData(signal) {
1408
+ let aborted = false;
1409
+ if (!this.done) {
1410
+ let onAbort = () => this.cancel();
1411
+ signal.addEventListener("abort", onAbort);
1412
+ aborted = await new Promise(resolve => {
1413
+ this.subscribe(aborted => {
1414
+ signal.removeEventListener("abort", onAbort);
1415
+ if (aborted || this.done) {
1416
+ resolve(aborted);
1417
+ }
1418
+ });
1419
+ });
1420
+ }
1421
+ return aborted;
1422
+ }
1423
+ get done() {
1424
+ return this.pendingKeysSet.size === 0;
1425
+ }
1426
+ get unwrappedData() {
1427
+ invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds");
1428
+ return Object.entries(this.data).reduce((acc, _ref3) => {
1429
+ let [key, value] = _ref3;
1430
+ return Object.assign(acc, {
1431
+ [key]: unwrapTrackedPromise(value)
1432
+ });
1433
+ }, {});
1434
+ }
1435
+ get pendingKeys() {
1436
+ return Array.from(this.pendingKeysSet);
1437
+ }
1438
+ }
1439
+ function isTrackedPromise(value) {
1440
+ return value instanceof Promise && value._tracked === true;
1441
+ }
1442
+ function unwrapTrackedPromise(value) {
1443
+ if (!isTrackedPromise(value)) {
1444
+ return value;
1445
+ }
1446
+ if (value._error) {
1447
+ throw value._error;
1448
+ }
1449
+ return value._data;
1450
+ }
1451
+ const defer = function defer(data, init) {
1452
+ if (init === void 0) {
1453
+ init = {};
1454
+ }
1455
+ let responseInit = typeof init === "number" ? {
1456
+ status: init
1457
+ } : init;
1458
+ return new DeferredData(data, responseInit);
1459
+ };
1460
+ /**
1461
+ * A redirect response. Sets the status code and the `Location` header.
1462
+ * Defaults to "302 Found".
1463
+ */
1464
+ const redirect = function redirect(url, init) {
1465
+ if (init === void 0) {
1466
+ init = 302;
1467
+ }
1468
+ let responseInit = init;
1469
+ if (typeof responseInit === "number") {
1470
+ responseInit = {
1471
+ status: responseInit
1472
+ };
1473
+ } else if (typeof responseInit.status === "undefined") {
1474
+ responseInit.status = 302;
1475
+ }
1476
+ let headers = new Headers(responseInit.headers);
1477
+ headers.set("Location", url);
1478
+ return new Response(null, _extends({}, responseInit, {
1479
+ headers
1480
+ }));
1481
+ };
1482
+
1483
+ /**
1484
+ * A redirect response that will force a document reload to the new location.
1485
+ * Sets the status code and the `Location` header.
1486
+ * Defaults to "302 Found".
1487
+ */
1488
+ const redirectDocument = (url, init) => {
1489
+ let response = redirect(url, init);
1490
+ response.headers.set("X-Remix-Reload-Document", "true");
1491
+ return response;
1492
+ };
1493
+ /**
1494
+ * @private
1495
+ * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
1496
+ *
1497
+ * We don't export the class for public use since it's an implementation
1498
+ * detail, but we export the interface above so folks can build their own
1499
+ * abstractions around instances via isRouteErrorResponse()
1500
+ */
1501
+ class ErrorResponseImpl {
1502
+ constructor(status, statusText, data, internal) {
1503
+ if (internal === void 0) {
1504
+ internal = false;
1505
+ }
1506
+ this.status = status;
1507
+ this.statusText = statusText || "";
1508
+ this.internal = internal;
1509
+ if (data instanceof Error) {
1510
+ this.data = data.toString();
1511
+ this.error = data;
1512
+ } else {
1513
+ this.data = data;
1514
+ }
1515
+ }
1516
+ }
1517
+
1518
+ /**
1519
+ * Check if the given error is an ErrorResponse generated from a 4xx/5xx
1520
+ * Response thrown from an action/loader
1521
+ */
1522
+ function isRouteErrorResponse(error) {
1523
+ return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
1524
+ }
1525
+
1526
+ ////////////////////////////////////////////////////////////////////////////////
1527
+ //#region Types and Constants
1528
+ ////////////////////////////////////////////////////////////////////////////////
1529
+
1530
+ /**
1531
+ * A Router instance manages all navigation and data loading/mutations
1532
+ */
1533
+ /**
1534
+ * State maintained internally by the router. During a navigation, all states
1535
+ * reflect the the "old" location unless otherwise noted.
1536
+ */
1537
+ /**
1538
+ * Data that can be passed into hydrate a Router from SSR
1539
+ */
1540
+ /**
1541
+ * Future flags to toggle new feature behavior
1542
+ */
1543
+ /**
1544
+ * Initialization options for createRouter
1545
+ */
1546
+ /**
1547
+ * State returned from a server-side query() call
1548
+ */
1549
+ /**
1550
+ * A StaticHandler instance manages a singular SSR navigation/fetch event
1551
+ */
1552
+ /**
1553
+ * Subscriber function signature for changes to router state
1554
+ */
1555
+ /**
1556
+ * Function signature for determining the key to be used in scroll restoration
1557
+ * for a given location
1558
+ */
1559
+ /**
1560
+ * Function signature for determining the current scroll position
1561
+ */
1562
+ // Allowed for any navigation or fetch
1563
+ // Only allowed for navigations
1564
+ // Only allowed for submission navigations
1565
+ /**
1566
+ * Options for a navigate() call for a normal (non-submission) navigation
1567
+ */
1568
+ /**
1569
+ * Options for a navigate() call for a submission navigation
1570
+ */
1571
+ /**
1572
+ * Options to pass to navigate() for a navigation
1573
+ */
1574
+ /**
1575
+ * Options for a fetch() load
1576
+ */
1577
+ /**
1578
+ * Options for a fetch() submission
1579
+ */
1580
+ /**
1581
+ * Options to pass to fetch()
1582
+ */
1583
+ /**
1584
+ * Potential states for state.navigation
1585
+ */
1586
+ /**
1587
+ * Potential states for fetchers
1588
+ */
1589
+ /**
1590
+ * Cached info for active fetcher.load() instances so they can participate
1591
+ * in revalidation
1592
+ */
1593
+ /**
1594
+ * Identified fetcher.load() calls that need to be revalidated
1595
+ */
1596
+ /**
1597
+ * Wrapper object to allow us to throw any response out from callLoaderOrAction
1598
+ * for queryRouter while preserving whether or not it was thrown or returned
1599
+ * from the loader/action
1600
+ */
1601
+ const validMutationMethodsArr = ["post", "put", "patch", "delete"];
1602
+ const validMutationMethods = new Set(validMutationMethodsArr);
1603
+ const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
1604
+ const validRequestMethods = new Set(validRequestMethodsArr);
1605
+ const redirectStatusCodes = new Set([301, 302, 303, 307, 308]);
1606
+ const redirectPreserveMethodStatusCodes = new Set([307, 308]);
1607
+ const IDLE_NAVIGATION = {
1608
+ state: "idle",
1609
+ location: undefined,
1610
+ formMethod: undefined,
1611
+ formAction: undefined,
1612
+ formEncType: undefined,
1613
+ formData: undefined,
1614
+ json: undefined,
1615
+ text: undefined
1616
+ };
1617
+ const IDLE_FETCHER = {
1618
+ state: "idle",
1619
+ data: undefined,
1620
+ formMethod: undefined,
1621
+ formAction: undefined,
1622
+ formEncType: undefined,
1623
+ formData: undefined,
1624
+ json: undefined,
1625
+ text: undefined
1626
+ };
1627
+ const IDLE_BLOCKER = {
1628
+ state: "unblocked",
1629
+ proceed: undefined,
1630
+ reset: undefined,
1631
+ location: undefined
1632
+ };
1633
+ const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1634
+ const defaultMapRouteProperties = route => ({
1635
+ hasErrorBoundary: Boolean(route.hasErrorBoundary)
1636
+ });
1637
+ const TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
1638
+
1639
+ //#endregion
1640
+
1641
+ ////////////////////////////////////////////////////////////////////////////////
1642
+ //#region createRouter
1643
+ ////////////////////////////////////////////////////////////////////////////////
1644
+
1645
+ /**
1646
+ * Create a router and listen to history POP navigations
1647
+ */
1648
+ function createRouter(init) {
1649
+ const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined;
1650
+ const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined";
1651
+ const isServer = !isBrowser;
1652
+ invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");
1653
+ let mapRouteProperties;
1654
+ if (init.mapRouteProperties) {
1655
+ mapRouteProperties = init.mapRouteProperties;
1656
+ } else if (init.detectErrorBoundary) {
1657
+ // If they are still using the deprecated version, wrap it with the new API
1658
+ let detectErrorBoundary = init.detectErrorBoundary;
1659
+ mapRouteProperties = route => ({
1660
+ hasErrorBoundary: detectErrorBoundary(route)
1661
+ });
1662
+ } else {
1663
+ mapRouteProperties = defaultMapRouteProperties;
1664
+ }
1665
+
1666
+ // Routes keyed by ID
1667
+ let manifest = {};
1668
+ // Routes in tree format for matching
1669
+ let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);
1670
+ let inFlightDataRoutes;
1671
+ let basename = init.basename || "/";
1672
+ // Config driven behavior flags
1673
+ let future = _extends({
1674
+ v7_fetcherPersist: false,
1675
+ v7_normalizeFormMethod: false,
1676
+ v7_partialHydration: false,
1677
+ v7_prependBasename: false,
1678
+ v7_relativeSplatPath: false
1679
+ }, init.future);
1680
+ // Cleanup function for history
1681
+ let unlistenHistory = null;
1682
+ // Externally-provided functions to call on all state changes
1683
+ let subscribers = new Set();
1684
+ // Externally-provided object to hold scroll restoration locations during routing
1685
+ let savedScrollPositions = null;
1686
+ // Externally-provided function to get scroll restoration keys
1687
+ let getScrollRestorationKey = null;
1688
+ // Externally-provided function to get current scroll position
1689
+ let getScrollPosition = null;
1690
+ // One-time flag to control the initial hydration scroll restoration. Because
1691
+ // we don't get the saved positions from <ScrollRestoration /> until _after_
1692
+ // the initial render, we need to manually trigger a separate updateState to
1693
+ // send along the restoreScrollPosition
1694
+ // Set to true if we have `hydrationData` since we assume we were SSR'd and that
1695
+ // SSR did the initial scroll restoration.
1696
+ let initialScrollRestored = init.hydrationData != null;
1697
+ let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);
1698
+ let initialErrors = null;
1699
+ if (initialMatches == null) {
1700
+ // If we do not match a user-provided-route, fall back to the root
1701
+ // to allow the error boundary to take over
1702
+ let error = getInternalRouterError(404, {
1703
+ pathname: init.history.location.pathname
1704
+ });
1705
+ let {
1706
+ matches,
1707
+ route
1708
+ } = getShortCircuitMatches(dataRoutes);
1709
+ initialMatches = matches;
1710
+ initialErrors = {
1711
+ [route.id]: error
1712
+ };
1713
+ }
1714
+ let initialized;
1715
+ let hasLazyRoutes = initialMatches.some(m => m.route.lazy);
1716
+ let hasLoaders = initialMatches.some(m => m.route.loader);
1717
+ if (hasLazyRoutes) {
1718
+ // All initialMatches need to be loaded before we're ready. If we have lazy
1719
+ // functions around still then we'll need to run them in initialize()
1720
+ initialized = false;
1721
+ } else if (!hasLoaders) {
1722
+ // If we've got no loaders to run, then we're good to go
1723
+ initialized = true;
1724
+ } else if (future.v7_partialHydration) {
1725
+ // If partial hydration is enabled, we're initialized so long as we were
1726
+ // provided with hydrationData for every route with a loader, and no loaders
1727
+ // were marked for explicit hydration
1728
+ let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;
1729
+ let errors = init.hydrationData ? init.hydrationData.errors : null;
1730
+ let isRouteInitialized = m => {
1731
+ // No loader, nothing to initialize
1732
+ if (!m.route.loader) return true;
1733
+ // Explicitly opting-in to running on hydration
1734
+ if (m.route.loader.hydrate === true) return false;
1735
+ // Otherwise, initialized if hydrated with data or an error
1736
+ return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;
1737
+ };
1738
+
1739
+ // If errors exist, don't consider routes below the boundary
1740
+ if (errors) {
1741
+ let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);
1742
+ initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);
1743
+ } else {
1744
+ initialized = initialMatches.every(isRouteInitialized);
1745
+ }
1746
+ } else {
1747
+ // Without partial hydration - we're initialized if we were provided any
1748
+ // hydrationData - which is expected to be complete
1749
+ initialized = init.hydrationData != null;
1750
+ }
1751
+ let router;
1752
+ let state = {
1753
+ historyAction: init.history.action,
1754
+ location: init.history.location,
1755
+ matches: initialMatches,
1756
+ initialized,
1757
+ navigation: IDLE_NAVIGATION,
1758
+ // Don't restore on initial updateState() if we were SSR'd
1759
+ restoreScrollPosition: init.hydrationData != null ? false : null,
1760
+ preventScrollReset: false,
1761
+ revalidation: "idle",
1762
+ loaderData: init.hydrationData && init.hydrationData.loaderData || {},
1763
+ actionData: init.hydrationData && init.hydrationData.actionData || null,
1764
+ errors: init.hydrationData && init.hydrationData.errors || initialErrors,
1765
+ fetchers: new Map(),
1766
+ blockers: new Map()
1767
+ };
1768
+
1769
+ // -- Stateful internal variables to manage navigations --
1770
+ // Current navigation in progress (to be committed in completeNavigation)
1771
+ let pendingAction = Action.Pop;
1772
+
1773
+ // Should the current navigation prevent the scroll reset if scroll cannot
1774
+ // be restored?
1775
+ let pendingPreventScrollReset = false;
1776
+
1777
+ // AbortController for the active navigation
1778
+ let pendingNavigationController;
1779
+
1780
+ // Should the current navigation enable document.startViewTransition?
1781
+ let pendingViewTransitionEnabled = false;
1782
+
1783
+ // Store applied view transitions so we can apply them on POP
1784
+ let appliedViewTransitions = new Map();
1785
+
1786
+ // Cleanup function for persisting applied transitions to sessionStorage
1787
+ let removePageHideEventListener = null;
1788
+
1789
+ // We use this to avoid touching history in completeNavigation if a
1790
+ // revalidation is entirely uninterrupted
1791
+ let isUninterruptedRevalidation = false;
1792
+
1793
+ // Use this internal flag to force revalidation of all loaders:
1794
+ // - submissions (completed or interrupted)
1795
+ // - useRevalidator()
1796
+ // - X-Remix-Revalidate (from redirect)
1797
+ let isRevalidationRequired = false;
1798
+
1799
+ // Use this internal array to capture routes that require revalidation due
1800
+ // to a cancelled deferred on action submission
1801
+ let cancelledDeferredRoutes = [];
1802
+
1803
+ // Use this internal array to capture fetcher loads that were cancelled by an
1804
+ // action navigation and require revalidation
1805
+ let cancelledFetcherLoads = [];
1806
+
1807
+ // AbortControllers for any in-flight fetchers
1808
+ let fetchControllers = new Map();
1809
+
1810
+ // Track loads based on the order in which they started
1811
+ let incrementingLoadId = 0;
1812
+
1813
+ // Track the outstanding pending navigation data load to be compared against
1814
+ // the globally incrementing load when a fetcher load lands after a completed
1815
+ // navigation
1816
+ let pendingNavigationLoadId = -1;
1817
+
1818
+ // Fetchers that triggered data reloads as a result of their actions
1819
+ let fetchReloadIds = new Map();
1820
+
1821
+ // Fetchers that triggered redirect navigations
1822
+ let fetchRedirectIds = new Set();
1823
+
1824
+ // Most recent href/match for fetcher.load calls for fetchers
1825
+ let fetchLoadMatches = new Map();
1826
+
1827
+ // Ref-count mounted fetchers so we know when it's ok to clean them up
1828
+ let activeFetchers = new Map();
1829
+
1830
+ // Fetchers that have requested a delete when using v7_fetcherPersist,
1831
+ // they'll be officially removed after they return to idle
1832
+ let deletedFetchers = new Set();
1833
+
1834
+ // Store DeferredData instances for active route matches. When a
1835
+ // route loader returns defer() we stick one in here. Then, when a nested
1836
+ // promise resolves we update loaderData. If a new navigation starts we
1837
+ // cancel active deferreds for eliminated routes.
1838
+ let activeDeferreds = new Map();
1839
+
1840
+ // Store blocker functions in a separate Map outside of router state since
1841
+ // we don't need to update UI state if they change
1842
+ let blockerFunctions = new Map();
1843
+
1844
+ // Flag to ignore the next history update, so we can revert the URL change on
1845
+ // a POP navigation that was blocked by the user without touching router state
1846
+ let ignoreNextHistoryUpdate = false;
1847
+
1848
+ // Initialize the router, all side effects should be kicked off from here.
1849
+ // Implemented as a Fluent API for ease of:
1850
+ // let router = createRouter(init).initialize();
1851
+ function initialize() {
1852
+ // If history informs us of a POP navigation, start the navigation but do not update
1853
+ // state. We'll update our own state once the navigation completes
1854
+ unlistenHistory = init.history.listen(_ref => {
1855
+ let {
1856
+ action: historyAction,
1857
+ location,
1858
+ delta
1859
+ } = _ref;
1860
+ // Ignore this event if it was just us resetting the URL from a
1861
+ // blocked POP navigation
1862
+ if (ignoreNextHistoryUpdate) {
1863
+ ignoreNextHistoryUpdate = false;
1864
+ return;
1865
+ }
1866
+ warning(blockerFunctions.size === 0 || delta != null, "You are trying to use a blocker on a POP navigation to a location " + "that was not created by @remix-run/router. This will fail silently in " + "production. This can happen if you are navigating outside the router " + "via `window.history.pushState`/`window.location.hash` instead of using " + "router navigation APIs. This can also happen if you are using " + "createHashRouter and the user manually changes the URL.");
1867
+ let blockerKey = shouldBlockNavigation({
1868
+ currentLocation: state.location,
1869
+ nextLocation: location,
1870
+ historyAction
1871
+ });
1872
+ if (blockerKey && delta != null) {
1873
+ // Restore the URL to match the current UI, but don't update router state
1874
+ ignoreNextHistoryUpdate = true;
1875
+ init.history.go(delta * -1);
1876
+
1877
+ // Put the blocker into a blocked state
1878
+ updateBlocker(blockerKey, {
1879
+ state: "blocked",
1880
+ location,
1881
+ proceed() {
1882
+ updateBlocker(blockerKey, {
1883
+ state: "proceeding",
1884
+ proceed: undefined,
1885
+ reset: undefined,
1886
+ location
1887
+ });
1888
+ // Re-do the same POP navigation we just blocked
1889
+ init.history.go(delta);
1890
+ },
1891
+ reset() {
1892
+ let blockers = new Map(state.blockers);
1893
+ blockers.set(blockerKey, IDLE_BLOCKER);
1894
+ updateState({
1895
+ blockers
1896
+ });
1897
+ }
1898
+ });
1899
+ return;
1900
+ }
1901
+ return startNavigation(historyAction, location);
1902
+ });
1903
+ if (isBrowser) {
1904
+ // FIXME: This feels gross. How can we cleanup the lines between
1905
+ // scrollRestoration/appliedTransitions persistance?
1906
+ restoreAppliedTransitions(routerWindow, appliedViewTransitions);
1907
+ let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);
1908
+ routerWindow.addEventListener("pagehide", _saveAppliedTransitions);
1909
+ removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);
1910
+ }
1911
+
1912
+ // Kick off initial data load if needed. Use Pop to avoid modifying history
1913
+ // Note we don't do any handling of lazy here. For SPA's it'll get handled
1914
+ // in the normal navigation flow. For SSR it's expected that lazy modules are
1915
+ // resolved prior to router creation since we can't go into a fallbackElement
1916
+ // UI for SSR'd apps
1917
+ if (!state.initialized) {
1918
+ startNavigation(Action.Pop, state.location, {
1919
+ initialHydration: true
1920
+ });
1921
+ }
1922
+ return router;
1923
+ }
1924
+
1925
+ // Clean up a router and it's side effects
1926
+ function dispose() {
1927
+ if (unlistenHistory) {
1928
+ unlistenHistory();
1929
+ }
1930
+ if (removePageHideEventListener) {
1931
+ removePageHideEventListener();
1932
+ }
1933
+ subscribers.clear();
1934
+ pendingNavigationController && pendingNavigationController.abort();
1935
+ state.fetchers.forEach((_, key) => deleteFetcher(key));
1936
+ state.blockers.forEach((_, key) => deleteBlocker(key));
1937
+ }
1938
+
1939
+ // Subscribe to state updates for the router
1940
+ function subscribe(fn) {
1941
+ subscribers.add(fn);
1942
+ return () => subscribers.delete(fn);
1943
+ }
1944
+
1945
+ // Update our state and notify the calling context of the change
1946
+ function updateState(newState, opts) {
1947
+ if (opts === void 0) {
1948
+ opts = {};
1949
+ }
1950
+ state = _extends({}, state, newState);
1951
+
1952
+ // Prep fetcher cleanup so we can tell the UI which fetcher data entries
1953
+ // can be removed
1954
+ let completedFetchers = [];
1955
+ let deletedFetchersKeys = [];
1956
+ if (future.v7_fetcherPersist) {
1957
+ state.fetchers.forEach((fetcher, key) => {
1958
+ if (fetcher.state === "idle") {
1959
+ if (deletedFetchers.has(key)) {
1960
+ // Unmounted from the UI and can be totally removed
1961
+ deletedFetchersKeys.push(key);
1962
+ } else {
1963
+ // Returned to idle but still mounted in the UI, so semi-remains for
1964
+ // revalidations and such
1965
+ completedFetchers.push(key);
1966
+ }
1967
+ }
1968
+ });
1969
+ }
1970
+
1971
+ // Iterate over a local copy so that if flushSync is used and we end up
1972
+ // removing and adding a new subscriber due to the useCallback dependencies,
1973
+ // we don't get ourselves into a loop calling the new subscriber immediately
1974
+ [...subscribers].forEach(subscriber => subscriber(state, {
1975
+ deletedFetchers: deletedFetchersKeys,
1976
+ unstable_viewTransitionOpts: opts.viewTransitionOpts,
1977
+ unstable_flushSync: opts.flushSync === true
1978
+ }));
1979
+
1980
+ // Remove idle fetchers from state since we only care about in-flight fetchers.
1981
+ if (future.v7_fetcherPersist) {
1982
+ completedFetchers.forEach(key => state.fetchers.delete(key));
1983
+ deletedFetchersKeys.forEach(key => deleteFetcher(key));
1984
+ }
1985
+ }
1986
+
1987
+ // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION
1988
+ // and setting state.[historyAction/location/matches] to the new route.
1989
+ // - Location is a required param
1990
+ // - Navigation will always be set to IDLE_NAVIGATION
1991
+ // - Can pass any other state in newState
1992
+ function completeNavigation(location, newState, _temp) {
1993
+ var _location$state, _location$state2;
1994
+ let {
1995
+ flushSync
1996
+ } = _temp === void 0 ? {} : _temp;
1997
+ // Deduce if we're in a loading/actionReload state:
1998
+ // - We have committed actionData in the store
1999
+ // - The current navigation was a mutation submission
2000
+ // - We're past the submitting state and into the loading state
2001
+ // - The location being loaded is not the result of a redirect
2002
+ let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_location$state = location.state) == null ? void 0 : _location$state._isRedirect) !== true;
2003
+ let actionData;
2004
+ if (newState.actionData) {
2005
+ if (Object.keys(newState.actionData).length > 0) {
2006
+ actionData = newState.actionData;
2007
+ } else {
2008
+ // Empty actionData -> clear prior actionData due to an action error
2009
+ actionData = null;
2010
+ }
2011
+ } else if (isActionReload) {
2012
+ // Keep the current data if we're wrapping up the action reload
2013
+ actionData = state.actionData;
2014
+ } else {
2015
+ // Clear actionData on any other completed navigations
2016
+ actionData = null;
2017
+ }
2018
+
2019
+ // Always preserve any existing loaderData from re-used routes
2020
+ let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;
2021
+
2022
+ // On a successful navigation we can assume we got through all blockers
2023
+ // so we can start fresh
2024
+ let blockers = state.blockers;
2025
+ if (blockers.size > 0) {
2026
+ blockers = new Map(blockers);
2027
+ blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
2028
+ }
2029
+
2030
+ // Always respect the user flag. Otherwise don't reset on mutation
2031
+ // submission navigations unless they redirect
2032
+ let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;
2033
+ if (inFlightDataRoutes) {
2034
+ dataRoutes = inFlightDataRoutes;
2035
+ inFlightDataRoutes = undefined;
2036
+ }
2037
+ if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {
2038
+ init.history.push(location, location.state);
2039
+ } else if (pendingAction === Action.Replace) {
2040
+ init.history.replace(location, location.state);
2041
+ }
2042
+ let viewTransitionOpts;
2043
+
2044
+ // On POP, enable transitions if they were enabled on the original navigation
2045
+ if (pendingAction === Action.Pop) {
2046
+ // Forward takes precedence so they behave like the original navigation
2047
+ let priorPaths = appliedViewTransitions.get(state.location.pathname);
2048
+ if (priorPaths && priorPaths.has(location.pathname)) {
2049
+ viewTransitionOpts = {
2050
+ currentLocation: state.location,
2051
+ nextLocation: location
2052
+ };
2053
+ } else if (appliedViewTransitions.has(location.pathname)) {
2054
+ // If we don't have a previous forward nav, assume we're popping back to
2055
+ // the new location and enable if that location previously enabled
2056
+ viewTransitionOpts = {
2057
+ currentLocation: location,
2058
+ nextLocation: state.location
2059
+ };
2060
+ }
2061
+ } else if (pendingViewTransitionEnabled) {
2062
+ // Store the applied transition on PUSH/REPLACE
2063
+ let toPaths = appliedViewTransitions.get(state.location.pathname);
2064
+ if (toPaths) {
2065
+ toPaths.add(location.pathname);
2066
+ } else {
2067
+ toPaths = new Set([location.pathname]);
2068
+ appliedViewTransitions.set(state.location.pathname, toPaths);
2069
+ }
2070
+ viewTransitionOpts = {
2071
+ currentLocation: state.location,
2072
+ nextLocation: location
2073
+ };
2074
+ }
2075
+ updateState(_extends({}, newState, {
2076
+ // matches, errors, fetchers go through as-is
2077
+ actionData,
2078
+ loaderData,
2079
+ historyAction: pendingAction,
2080
+ location,
2081
+ initialized: true,
2082
+ navigation: IDLE_NAVIGATION,
2083
+ revalidation: "idle",
2084
+ restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),
2085
+ preventScrollReset,
2086
+ blockers
2087
+ }), {
2088
+ viewTransitionOpts,
2089
+ flushSync: flushSync === true
2090
+ });
2091
+
2092
+ // Reset stateful navigation vars
2093
+ pendingAction = Action.Pop;
2094
+ pendingPreventScrollReset = false;
2095
+ pendingViewTransitionEnabled = false;
2096
+ isUninterruptedRevalidation = false;
2097
+ isRevalidationRequired = false;
2098
+ cancelledDeferredRoutes = [];
2099
+ cancelledFetcherLoads = [];
2100
+ }
2101
+
2102
+ // Trigger a navigation event, which can either be a numerical POP or a PUSH
2103
+ // replace with an optional submission
2104
+ async function navigate(to, opts) {
2105
+ if (typeof to === "number") {
2106
+ init.history.go(to);
2107
+ return;
2108
+ }
2109
+ let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, to, future.v7_relativeSplatPath, opts == null ? void 0 : opts.fromRouteId, opts == null ? void 0 : opts.relative);
2110
+ let {
2111
+ path,
2112
+ submission,
2113
+ error
2114
+ } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);
2115
+ let currentLocation = state.location;
2116
+ let nextLocation = createLocation(state.location, path, opts && opts.state);
2117
+
2118
+ // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded
2119
+ // URL from window.location, so we need to encode it here so the behavior
2120
+ // remains the same as POP and non-data-router usages. new URL() does all
2121
+ // the same encoding we'd get from a history.pushState/window.location read
2122
+ // without having to touch history
2123
+ nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));
2124
+ let userReplace = opts && opts.replace != null ? opts.replace : undefined;
2125
+ let historyAction = Action.Push;
2126
+ if (userReplace === true) {
2127
+ historyAction = Action.Replace;
2128
+ } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {
2129
+ // By default on submissions to the current location we REPLACE so that
2130
+ // users don't have to double-click the back button to get to the prior
2131
+ // location. If the user redirects to a different location from the
2132
+ // action/loader this will be ignored and the redirect will be a PUSH
2133
+ historyAction = Action.Replace;
2134
+ }
2135
+ let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined;
2136
+ let flushSync = (opts && opts.unstable_flushSync) === true;
2137
+ let blockerKey = shouldBlockNavigation({
2138
+ currentLocation,
2139
+ nextLocation,
2140
+ historyAction
2141
+ });
2142
+ if (blockerKey) {
2143
+ // Put the blocker into a blocked state
2144
+ updateBlocker(blockerKey, {
2145
+ state: "blocked",
2146
+ location: nextLocation,
2147
+ proceed() {
2148
+ updateBlocker(blockerKey, {
2149
+ state: "proceeding",
2150
+ proceed: undefined,
2151
+ reset: undefined,
2152
+ location: nextLocation
2153
+ });
2154
+ // Send the same navigation through
2155
+ navigate(to, opts);
2156
+ },
2157
+ reset() {
2158
+ let blockers = new Map(state.blockers);
2159
+ blockers.set(blockerKey, IDLE_BLOCKER);
2160
+ updateState({
2161
+ blockers
2162
+ });
2163
+ }
2164
+ });
2165
+ return;
2166
+ }
2167
+ return await startNavigation(historyAction, nextLocation, {
2168
+ submission,
2169
+ // Send through the formData serialization error if we have one so we can
2170
+ // render at the right error boundary after we match routes
2171
+ pendingError: error,
2172
+ preventScrollReset,
2173
+ replace: opts && opts.replace,
2174
+ enableViewTransition: opts && opts.unstable_viewTransition,
2175
+ flushSync
2176
+ });
2177
+ }
2178
+
2179
+ // Revalidate all current loaders. If a navigation is in progress or if this
2180
+ // is interrupted by a navigation, allow this to "succeed" by calling all
2181
+ // loaders during the next loader round
2182
+ function revalidate() {
2183
+ interruptActiveLoads();
2184
+ updateState({
2185
+ revalidation: "loading"
2186
+ });
2187
+
2188
+ // If we're currently submitting an action, we don't need to start a new
2189
+ // navigation, we'll just let the follow up loader execution call all loaders
2190
+ if (state.navigation.state === "submitting") {
2191
+ return;
2192
+ }
2193
+
2194
+ // If we're currently in an idle state, start a new navigation for the current
2195
+ // action/location and mark it as uninterrupted, which will skip the history
2196
+ // update in completeNavigation
2197
+ if (state.navigation.state === "idle") {
2198
+ startNavigation(state.historyAction, state.location, {
2199
+ startUninterruptedRevalidation: true
2200
+ });
2201
+ return;
2202
+ }
2203
+
2204
+ // Otherwise, if we're currently in a loading state, just start a new
2205
+ // navigation to the navigation.location but do not trigger an uninterrupted
2206
+ // revalidation so that history correctly updates once the navigation completes
2207
+ startNavigation(pendingAction || state.historyAction, state.navigation.location, {
2208
+ overrideNavigation: state.navigation
2209
+ });
2210
+ }
2211
+
2212
+ // Start a navigation to the given action/location. Can optionally provide a
2213
+ // overrideNavigation which will override the normalLoad in the case of a redirect
2214
+ // navigation
2215
+ async function startNavigation(historyAction, location, opts) {
2216
+ // Abort any in-progress navigations and start a new one. Unset any ongoing
2217
+ // uninterrupted revalidations unless told otherwise, since we want this
2218
+ // new navigation to update history normally
2219
+ pendingNavigationController && pendingNavigationController.abort();
2220
+ pendingNavigationController = null;
2221
+ pendingAction = historyAction;
2222
+ isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;
2223
+
2224
+ // Save the current scroll position every time we start a new navigation,
2225
+ // and track whether we should reset scroll on completion
2226
+ saveScrollPosition(state.location, state.matches);
2227
+ pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2228
+ pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
2229
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2230
+ let loadingNavigation = opts && opts.overrideNavigation;
2231
+ let matches = matchRoutes(routesToUse, location, basename);
2232
+ let flushSync = (opts && opts.flushSync) === true;
2233
+
2234
+ // Short circuit with a 404 on the root error boundary if we match nothing
2235
+ if (!matches) {
2236
+ let error = getInternalRouterError(404, {
2237
+ pathname: location.pathname
2238
+ });
2239
+ let {
2240
+ matches: notFoundMatches,
2241
+ route
2242
+ } = getShortCircuitMatches(routesToUse);
2243
+ // Cancel all pending deferred on 404s since we don't keep any routes
2244
+ cancelActiveDeferreds();
2245
+ completeNavigation(location, {
2246
+ matches: notFoundMatches,
2247
+ loaderData: {},
2248
+ errors: {
2249
+ [route.id]: error
2250
+ }
2251
+ }, {
2252
+ flushSync
2253
+ });
2254
+ return;
2255
+ }
2256
+
2257
+ // Short circuit if it's only a hash change and not a revalidation or
2258
+ // mutation submission.
2259
+ //
2260
+ // Ignore on initial page loads because since the initial load will always
2261
+ // be "same hash". For example, on /page#hash and submit a <Form method="post">
2262
+ // which will default to a navigation to /page
2263
+ if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
2264
+ completeNavigation(location, {
2265
+ matches
2266
+ }, {
2267
+ flushSync
2268
+ });
2269
+ return;
2270
+ }
2271
+
2272
+ // Create a controller/Request for this navigation
2273
+ pendingNavigationController = new AbortController();
2274
+ let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);
2275
+ let pendingActionData;
2276
+ let pendingError;
2277
+ if (opts && opts.pendingError) {
2278
+ // If we have a pendingError, it means the user attempted a GET submission
2279
+ // with binary FormData so assign here and skip to handleLoaders. That
2280
+ // way we handle calling loaders above the boundary etc. It's not really
2281
+ // different from an actionError in that sense.
2282
+ pendingError = {
2283
+ [findNearestBoundary(matches).route.id]: opts.pendingError
2284
+ };
2285
+ } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {
2286
+ // Call action if we received an action submission
2287
+ let actionOutput = await handleAction(request, location, opts.submission, matches, {
2288
+ replace: opts.replace,
2289
+ flushSync
2290
+ });
2291
+ if (actionOutput.shortCircuited) {
2292
+ return;
2293
+ }
2294
+ pendingActionData = actionOutput.pendingActionData;
2295
+ pendingError = actionOutput.pendingActionError;
2296
+ loadingNavigation = getLoadingNavigation(location, opts.submission);
2297
+ flushSync = false;
2298
+
2299
+ // Create a GET request for the loaders
2300
+ request = new Request(request.url, {
2301
+ signal: request.signal
2302
+ });
2303
+ }
2304
+
2305
+ // Call loaders
2306
+ let {
2307
+ shortCircuited,
2308
+ loaderData,
2309
+ errors
2310
+ } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionData, pendingError);
2311
+ if (shortCircuited) {
2312
+ return;
2313
+ }
2314
+
2315
+ // Clean up now that the action/loaders have completed. Don't clean up if
2316
+ // we short circuited because pendingNavigationController will have already
2317
+ // been assigned to a new controller for the next navigation
2318
+ pendingNavigationController = null;
2319
+ completeNavigation(location, _extends({
2320
+ matches
2321
+ }, pendingActionData ? {
2322
+ actionData: pendingActionData
2323
+ } : {}, {
2324
+ loaderData,
2325
+ errors
2326
+ }));
2327
+ }
2328
+
2329
+ // Call the action matched by the leaf route for this navigation and handle
2330
+ // redirects/errors
2331
+ async function handleAction(request, location, submission, matches, opts) {
2332
+ if (opts === void 0) {
2333
+ opts = {};
2334
+ }
2335
+ interruptActiveLoads();
2336
+
2337
+ // Put us in a submitting state
2338
+ let navigation = getSubmittingNavigation(location, submission);
2339
+ updateState({
2340
+ navigation
2341
+ }, {
2342
+ flushSync: opts.flushSync === true
2343
+ });
2344
+
2345
+ // Call our action and get the result
2346
+ let result;
2347
+ let actionMatch = getTargetMatch(matches, location);
2348
+ if (!actionMatch.route.action && !actionMatch.route.lazy) {
2349
+ result = {
2350
+ type: ResultType.error,
2351
+ error: getInternalRouterError(405, {
2352
+ method: request.method,
2353
+ pathname: location.pathname,
2354
+ routeId: actionMatch.route.id
2355
+ })
2356
+ };
2357
+ } else {
2358
+ result = await callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2359
+ if (request.signal.aborted) {
2360
+ return {
2361
+ shortCircuited: true
2362
+ };
2363
+ }
2364
+ }
2365
+ if (isRedirectResult(result)) {
2366
+ let replace;
2367
+ if (opts && opts.replace != null) {
2368
+ replace = opts.replace;
2369
+ } else {
2370
+ // If the user didn't explicity indicate replace behavior, replace if
2371
+ // we redirected to the exact same location we're currently at to avoid
2372
+ // double back-buttons
2373
+ replace = result.location === state.location.pathname + state.location.search;
2374
+ }
2375
+ await startRedirectNavigation(state, result, {
2376
+ submission,
2377
+ replace
2378
+ });
2379
+ return {
2380
+ shortCircuited: true
2381
+ };
2382
+ }
2383
+ if (isErrorResult(result)) {
2384
+ // Store off the pending error - we use it to determine which loaders
2385
+ // to call and will commit it when we complete the navigation
2386
+ let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
2387
+
2388
+ // By default, all submissions are REPLACE navigations, but if the
2389
+ // action threw an error that'll be rendered in an errorElement, we fall
2390
+ // back to PUSH so that the user can use the back button to get back to
2391
+ // the pre-submission form location to try again
2392
+ if ((opts && opts.replace) !== true) {
2393
+ pendingAction = Action.Push;
2394
+ }
2395
+ return {
2396
+ // Send back an empty object we can use to clear out any prior actionData
2397
+ pendingActionData: {},
2398
+ pendingActionError: {
2399
+ [boundaryMatch.route.id]: result.error
2400
+ }
2401
+ };
2402
+ }
2403
+ if (isDeferredResult(result)) {
2404
+ throw getInternalRouterError(400, {
2405
+ type: "defer-action"
2406
+ });
2407
+ }
2408
+ return {
2409
+ pendingActionData: {
2410
+ [actionMatch.route.id]: result.data
2411
+ }
2412
+ };
2413
+ }
2414
+
2415
+ // Call all applicable loaders for the given matches, handling redirects,
2416
+ // errors, etc.
2417
+ async function handleLoaders(request, location, matches, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionData, pendingError) {
2418
+ // Figure out the right navigation we want to use for data loading
2419
+ let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);
2420
+
2421
+ // If this was a redirect from an action we don't have a "submission" but
2422
+ // we have it on the loading navigation so use that if available
2423
+ let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);
2424
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2425
+ let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError);
2426
+
2427
+ // Cancel pending deferreds for no-longer-matched routes or routes we're
2428
+ // about to reload. Note that if this is an action reload we would have
2429
+ // already cancelled all pending deferreds so this would be a no-op
2430
+ cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));
2431
+ pendingNavigationLoadId = ++incrementingLoadId;
2432
+
2433
+ // Short circuit if we have no loaders to run
2434
+ if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {
2435
+ let updatedFetchers = markFetchRedirectsDone();
2436
+ completeNavigation(location, _extends({
2437
+ matches,
2438
+ loaderData: {},
2439
+ // Commit pending error if we're short circuiting
2440
+ errors: pendingError || null
2441
+ }, pendingActionData ? {
2442
+ actionData: pendingActionData
2443
+ } : {}, updatedFetchers ? {
2444
+ fetchers: new Map(state.fetchers)
2445
+ } : {}), {
2446
+ flushSync
2447
+ });
2448
+ return {
2449
+ shortCircuited: true
2450
+ };
2451
+ }
2452
+
2453
+ // If this is an uninterrupted revalidation, we remain in our current idle
2454
+ // state. If not, we need to switch to our loading state and load data,
2455
+ // preserving any new action data or existing action data (in the case of
2456
+ // a revalidation interrupting an actionReload)
2457
+ // If we have partialHydration enabled, then don't update the state for the
2458
+ // initial data load since it's not a "navigation"
2459
+ if (!isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration)) {
2460
+ revalidatingFetchers.forEach(rf => {
2461
+ let fetcher = state.fetchers.get(rf.key);
2462
+ let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);
2463
+ state.fetchers.set(rf.key, revalidatingFetcher);
2464
+ });
2465
+ let actionData = pendingActionData || state.actionData;
2466
+ updateState(_extends({
2467
+ navigation: loadingNavigation
2468
+ }, actionData ? Object.keys(actionData).length === 0 ? {
2469
+ actionData: null
2470
+ } : {
2471
+ actionData
2472
+ } : {}, revalidatingFetchers.length > 0 ? {
2473
+ fetchers: new Map(state.fetchers)
2474
+ } : {}), {
2475
+ flushSync
2476
+ });
2477
+ }
2478
+ revalidatingFetchers.forEach(rf => {
2479
+ if (fetchControllers.has(rf.key)) {
2480
+ abortFetcher(rf.key);
2481
+ }
2482
+ if (rf.controller) {
2483
+ // Fetchers use an independent AbortController so that aborting a fetcher
2484
+ // (via deleteFetcher) does not abort the triggering navigation that
2485
+ // triggered the revalidation
2486
+ fetchControllers.set(rf.key, rf.controller);
2487
+ }
2488
+ });
2489
+
2490
+ // Proxy navigation abort through to revalidation fetchers
2491
+ let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));
2492
+ if (pendingNavigationController) {
2493
+ pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2494
+ }
2495
+ let {
2496
+ results,
2497
+ loaderResults,
2498
+ fetcherResults
2499
+ } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);
2500
+ if (request.signal.aborted) {
2501
+ return {
2502
+ shortCircuited: true
2503
+ };
2504
+ }
2505
+
2506
+ // Clean up _after_ loaders have completed. Don't clean up if we short
2507
+ // circuited because fetchControllers would have been aborted and
2508
+ // reassigned to new controllers for the next navigation
2509
+ if (pendingNavigationController) {
2510
+ pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2511
+ }
2512
+ revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));
2513
+
2514
+ // If any loaders returned a redirect Response, start a new REPLACE navigation
2515
+ let redirect = findRedirect(results);
2516
+ if (redirect) {
2517
+ if (redirect.idx >= matchesToLoad.length) {
2518
+ // If this redirect came from a fetcher make sure we mark it in
2519
+ // fetchRedirectIds so it doesn't get revalidated on the next set of
2520
+ // loader executions
2521
+ let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2522
+ fetchRedirectIds.add(fetcherKey);
2523
+ }
2524
+ await startRedirectNavigation(state, redirect.result, {
2525
+ replace
2526
+ });
2527
+ return {
2528
+ shortCircuited: true
2529
+ };
2530
+ }
2531
+
2532
+ // Process and commit output from loaders
2533
+ let {
2534
+ loaderData,
2535
+ errors
2536
+ } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds);
2537
+
2538
+ // Wire up subscribers to update loaderData as promises settle
2539
+ activeDeferreds.forEach((deferredData, routeId) => {
2540
+ deferredData.subscribe(aborted => {
2541
+ // Note: No need to updateState here since the TrackedPromise on
2542
+ // loaderData is stable across resolve/reject
2543
+ // Remove this instance if we were aborted or if promises have settled
2544
+ if (aborted || deferredData.done) {
2545
+ activeDeferreds.delete(routeId);
2546
+ }
2547
+ });
2548
+ });
2549
+
2550
+ // During partial hydration, preserve SSR errors for routes that don't re-run
2551
+ if (future.v7_partialHydration && initialHydration && state.errors) {
2552
+ Object.entries(state.errors).filter(_ref2 => {
2553
+ let [id] = _ref2;
2554
+ return !matchesToLoad.some(m => m.route.id === id);
2555
+ }).forEach(_ref3 => {
2556
+ let [routeId, error] = _ref3;
2557
+ errors = Object.assign(errors || {}, {
2558
+ [routeId]: error
2559
+ });
2560
+ });
2561
+ }
2562
+ let updatedFetchers = markFetchRedirectsDone();
2563
+ let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);
2564
+ let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
2565
+ return _extends({
2566
+ loaderData,
2567
+ errors
2568
+ }, shouldUpdateFetchers ? {
2569
+ fetchers: new Map(state.fetchers)
2570
+ } : {});
2571
+ }
2572
+
2573
+ // Trigger a fetcher load/submit for the given fetcher key
2574
+ function fetch(key, routeId, href, opts) {
2575
+ if (isServer) {
2576
+ throw new Error("router.fetch() was called during the server render, but it shouldn't be. " + "You are likely calling a useFetcher() method in the body of your component. " + "Try moving it to a useEffect or a callback.");
2577
+ }
2578
+ if (fetchControllers.has(key)) abortFetcher(key);
2579
+ let flushSync = (opts && opts.unstable_flushSync) === true;
2580
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2581
+ let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);
2582
+ let matches = matchRoutes(routesToUse, normalizedPath, basename);
2583
+ if (!matches) {
2584
+ setFetcherError(key, routeId, getInternalRouterError(404, {
2585
+ pathname: normalizedPath
2586
+ }), {
2587
+ flushSync
2588
+ });
2589
+ return;
2590
+ }
2591
+ let {
2592
+ path,
2593
+ submission,
2594
+ error
2595
+ } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);
2596
+ if (error) {
2597
+ setFetcherError(key, routeId, error, {
2598
+ flushSync
2599
+ });
2600
+ return;
2601
+ }
2602
+ let match = getTargetMatch(matches, path);
2603
+ pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2604
+ if (submission && isMutationMethod(submission.formMethod)) {
2605
+ handleFetcherAction(key, routeId, path, match, matches, flushSync, submission);
2606
+ return;
2607
+ }
2608
+
2609
+ // Store off the match so we can call it's shouldRevalidate on subsequent
2610
+ // revalidations
2611
+ fetchLoadMatches.set(key, {
2612
+ routeId,
2613
+ path
2614
+ });
2615
+ handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission);
2616
+ }
2617
+
2618
+ // Call the action for the matched fetcher.submit(), and then handle redirects,
2619
+ // errors, and revalidation
2620
+ async function handleFetcherAction(key, routeId, path, match, requestMatches, flushSync, submission) {
2621
+ interruptActiveLoads();
2622
+ fetchLoadMatches.delete(key);
2623
+ if (!match.route.action && !match.route.lazy) {
2624
+ let error = getInternalRouterError(405, {
2625
+ method: submission.formMethod,
2626
+ pathname: path,
2627
+ routeId: routeId
2628
+ });
2629
+ setFetcherError(key, routeId, error, {
2630
+ flushSync
2631
+ });
2632
+ return;
2633
+ }
2634
+
2635
+ // Put this fetcher into it's submitting state
2636
+ let existingFetcher = state.fetchers.get(key);
2637
+ updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {
2638
+ flushSync
2639
+ });
2640
+
2641
+ // Call the action for the fetcher
2642
+ let abortController = new AbortController();
2643
+ let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);
2644
+ fetchControllers.set(key, abortController);
2645
+ let originatingLoadId = incrementingLoadId;
2646
+ let actionResult = await callLoaderOrAction("action", fetchRequest, match, requestMatches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2647
+ if (fetchRequest.signal.aborted) {
2648
+ // We can delete this so long as we weren't aborted by our own fetcher
2649
+ // re-submit which would have put _new_ controller is in fetchControllers
2650
+ if (fetchControllers.get(key) === abortController) {
2651
+ fetchControllers.delete(key);
2652
+ }
2653
+ return;
2654
+ }
2655
+
2656
+ // When using v7_fetcherPersist, we don't want errors bubbling up to the UI
2657
+ // or redirects processed for unmounted fetchers so we just revert them to
2658
+ // idle
2659
+ if (future.v7_fetcherPersist && deletedFetchers.has(key)) {
2660
+ if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {
2661
+ updateFetcherState(key, getDoneFetcher(undefined));
2662
+ return;
2663
+ }
2664
+ // Let SuccessResult's fall through for revalidation
2665
+ } else {
2666
+ if (isRedirectResult(actionResult)) {
2667
+ fetchControllers.delete(key);
2668
+ if (pendingNavigationLoadId > originatingLoadId) {
2669
+ // A new navigation was kicked off after our action started, so that
2670
+ // should take precedence over this redirect navigation. We already
2671
+ // set isRevalidationRequired so all loaders for the new route should
2672
+ // fire unless opted out via shouldRevalidate
2673
+ updateFetcherState(key, getDoneFetcher(undefined));
2674
+ return;
2675
+ } else {
2676
+ fetchRedirectIds.add(key);
2677
+ updateFetcherState(key, getLoadingFetcher(submission));
2678
+ return startRedirectNavigation(state, actionResult, {
2679
+ fetcherSubmission: submission
2680
+ });
2681
+ }
2682
+ }
2683
+
2684
+ // Process any non-redirect errors thrown
2685
+ if (isErrorResult(actionResult)) {
2686
+ setFetcherError(key, routeId, actionResult.error);
2687
+ return;
2688
+ }
2689
+ }
2690
+ if (isDeferredResult(actionResult)) {
2691
+ throw getInternalRouterError(400, {
2692
+ type: "defer-action"
2693
+ });
2694
+ }
2695
+
2696
+ // Start the data load for current matches, or the next location if we're
2697
+ // in the middle of a navigation
2698
+ let nextLocation = state.navigation.location || state.location;
2699
+ let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);
2700
+ let routesToUse = inFlightDataRoutes || dataRoutes;
2701
+ let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;
2702
+ invariant(matches, "Didn't find any matches after fetcher action");
2703
+ let loadId = ++incrementingLoadId;
2704
+ fetchReloadIds.set(key, loadId);
2705
+ let loadFetcher = getLoadingFetcher(submission, actionResult.data);
2706
+ state.fetchers.set(key, loadFetcher);
2707
+ let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, {
2708
+ [match.route.id]: actionResult.data
2709
+ }, undefined // No need to send through errors since we short circuit above
2710
+ );
2711
+
2712
+ // Put all revalidating fetchers into the loading state, except for the
2713
+ // current fetcher which we want to keep in it's current loading state which
2714
+ // contains it's action submission info + action data
2715
+ revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {
2716
+ let staleKey = rf.key;
2717
+ let existingFetcher = state.fetchers.get(staleKey);
2718
+ let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);
2719
+ state.fetchers.set(staleKey, revalidatingFetcher);
2720
+ if (fetchControllers.has(staleKey)) {
2721
+ abortFetcher(staleKey);
2722
+ }
2723
+ if (rf.controller) {
2724
+ fetchControllers.set(staleKey, rf.controller);
2725
+ }
2726
+ });
2727
+ updateState({
2728
+ fetchers: new Map(state.fetchers)
2729
+ });
2730
+ let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));
2731
+ abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2732
+ let {
2733
+ results,
2734
+ loaderResults,
2735
+ fetcherResults
2736
+ } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);
2737
+ if (abortController.signal.aborted) {
2738
+ return;
2739
+ }
2740
+ abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2741
+ fetchReloadIds.delete(key);
2742
+ fetchControllers.delete(key);
2743
+ revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));
2744
+ let redirect = findRedirect(results);
2745
+ if (redirect) {
2746
+ if (redirect.idx >= matchesToLoad.length) {
2747
+ // If this redirect came from a fetcher make sure we mark it in
2748
+ // fetchRedirectIds so it doesn't get revalidated on the next set of
2749
+ // loader executions
2750
+ let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2751
+ fetchRedirectIds.add(fetcherKey);
2752
+ }
2753
+ return startRedirectNavigation(state, redirect.result);
2754
+ }
2755
+
2756
+ // Process and commit output from loaders
2757
+ let {
2758
+ loaderData,
2759
+ errors
2760
+ } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);
2761
+
2762
+ // Since we let revalidations complete even if the submitting fetcher was
2763
+ // deleted, only put it back to idle if it hasn't been deleted
2764
+ if (state.fetchers.has(key)) {
2765
+ let doneFetcher = getDoneFetcher(actionResult.data);
2766
+ state.fetchers.set(key, doneFetcher);
2767
+ }
2768
+ abortStaleFetchLoads(loadId);
2769
+
2770
+ // If we are currently in a navigation loading state and this fetcher is
2771
+ // more recent than the navigation, we want the newer data so abort the
2772
+ // navigation and complete it with the fetcher data
2773
+ if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) {
2774
+ invariant(pendingAction, "Expected pending action");
2775
+ pendingNavigationController && pendingNavigationController.abort();
2776
+ completeNavigation(state.navigation.location, {
2777
+ matches,
2778
+ loaderData,
2779
+ errors,
2780
+ fetchers: new Map(state.fetchers)
2781
+ });
2782
+ } else {
2783
+ // otherwise just update with the fetcher data, preserving any existing
2784
+ // loaderData for loaders that did not need to reload. We have to
2785
+ // manually merge here since we aren't going through completeNavigation
2786
+ updateState({
2787
+ errors,
2788
+ loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),
2789
+ fetchers: new Map(state.fetchers)
2790
+ });
2791
+ isRevalidationRequired = false;
2792
+ }
2793
+ }
2794
+
2795
+ // Call the matched loader for fetcher.load(), handling redirects, errors, etc.
2796
+ async function handleFetcherLoader(key, routeId, path, match, matches, flushSync, submission) {
2797
+ let existingFetcher = state.fetchers.get(key);
2798
+ updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {
2799
+ flushSync
2800
+ });
2801
+
2802
+ // Call the loader for this fetcher route match
2803
+ let abortController = new AbortController();
2804
+ let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);
2805
+ fetchControllers.set(key, abortController);
2806
+ let originatingLoadId = incrementingLoadId;
2807
+ let result = await callLoaderOrAction("loader", fetchRequest, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2808
+
2809
+ // Deferred isn't supported for fetcher loads, await everything and treat it
2810
+ // as a normal load. resolveDeferredData will return undefined if this
2811
+ // fetcher gets aborted, so we just leave result untouched and short circuit
2812
+ // below if that happens
2813
+ if (isDeferredResult(result)) {
2814
+ result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;
2815
+ }
2816
+
2817
+ // We can delete this so long as we weren't aborted by our our own fetcher
2818
+ // re-load which would have put _new_ controller is in fetchControllers
2819
+ if (fetchControllers.get(key) === abortController) {
2820
+ fetchControllers.delete(key);
2821
+ }
2822
+ if (fetchRequest.signal.aborted) {
2823
+ return;
2824
+ }
2825
+
2826
+ // We don't want errors bubbling up or redirects followed for unmounted
2827
+ // fetchers, so short circuit here if it was removed from the UI
2828
+ if (deletedFetchers.has(key)) {
2829
+ updateFetcherState(key, getDoneFetcher(undefined));
2830
+ return;
2831
+ }
2832
+
2833
+ // If the loader threw a redirect Response, start a new REPLACE navigation
2834
+ if (isRedirectResult(result)) {
2835
+ if (pendingNavigationLoadId > originatingLoadId) {
2836
+ // A new navigation was kicked off after our loader started, so that
2837
+ // should take precedence over this redirect navigation
2838
+ updateFetcherState(key, getDoneFetcher(undefined));
2839
+ return;
2840
+ } else {
2841
+ fetchRedirectIds.add(key);
2842
+ await startRedirectNavigation(state, result);
2843
+ return;
2844
+ }
2845
+ }
2846
+
2847
+ // Process any non-redirect errors thrown
2848
+ if (isErrorResult(result)) {
2849
+ setFetcherError(key, routeId, result.error);
2850
+ return;
2851
+ }
2852
+ invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");
2853
+
2854
+ // Put the fetcher back into an idle state
2855
+ updateFetcherState(key, getDoneFetcher(result.data));
2856
+ }
2857
+
2858
+ /**
2859
+ * Utility function to handle redirects returned from an action or loader.
2860
+ * Normally, a redirect "replaces" the navigation that triggered it. So, for
2861
+ * example:
2862
+ *
2863
+ * - user is on /a
2864
+ * - user clicks a link to /b
2865
+ * - loader for /b redirects to /c
2866
+ *
2867
+ * In a non-JS app the browser would track the in-flight navigation to /b and
2868
+ * then replace it with /c when it encountered the redirect response. In
2869
+ * the end it would only ever update the URL bar with /c.
2870
+ *
2871
+ * In client-side routing using pushState/replaceState, we aim to emulate
2872
+ * this behavior and we also do not update history until the end of the
2873
+ * navigation (including processed redirects). This means that we never
2874
+ * actually touch history until we've processed redirects, so we just use
2875
+ * the history action from the original navigation (PUSH or REPLACE).
2876
+ */
2877
+ async function startRedirectNavigation(state, redirect, _temp2) {
2878
+ let {
2879
+ submission,
2880
+ fetcherSubmission,
2881
+ replace
2882
+ } = _temp2 === void 0 ? {} : _temp2;
2883
+ if (redirect.revalidate) {
2884
+ isRevalidationRequired = true;
2885
+ }
2886
+ let redirectLocation = createLocation(state.location, redirect.location, {
2887
+ _isRedirect: true
2888
+ });
2889
+ invariant(redirectLocation, "Expected a location on the redirect navigation");
2890
+ if (isBrowser) {
2891
+ let isDocumentReload = false;
2892
+ if (redirect.reloadDocument) {
2893
+ // Hard reload if the response contained X-Remix-Reload-Document
2894
+ isDocumentReload = true;
2895
+ } else if (ABSOLUTE_URL_REGEX.test(redirect.location)) {
2896
+ const url = init.history.createURL(redirect.location);
2897
+ isDocumentReload =
2898
+ // Hard reload if it's an absolute URL to a new origin
2899
+ url.origin !== routerWindow.location.origin ||
2900
+ // Hard reload if it's an absolute URL that does not match our basename
2901
+ stripBasename(url.pathname, basename) == null;
2902
+ }
2903
+ if (isDocumentReload) {
2904
+ if (replace) {
2905
+ routerWindow.location.replace(redirect.location);
2906
+ } else {
2907
+ routerWindow.location.assign(redirect.location);
2908
+ }
2909
+ return;
2910
+ }
2911
+ }
2912
+
2913
+ // There's no need to abort on redirects, since we don't detect the
2914
+ // redirect until the action/loaders have settled
2915
+ pendingNavigationController = null;
2916
+ let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;
2917
+
2918
+ // Use the incoming submission if provided, fallback on the active one in
2919
+ // state.navigation
2920
+ let {
2921
+ formMethod,
2922
+ formAction,
2923
+ formEncType
2924
+ } = state.navigation;
2925
+ if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {
2926
+ submission = getSubmissionFromNavigation(state.navigation);
2927
+ }
2928
+
2929
+ // If this was a 307/308 submission we want to preserve the HTTP method and
2930
+ // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the
2931
+ // redirected location
2932
+ let activeSubmission = submission || fetcherSubmission;
2933
+ if (redirectPreserveMethodStatusCodes.has(redirect.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {
2934
+ await startNavigation(redirectHistoryAction, redirectLocation, {
2935
+ submission: _extends({}, activeSubmission, {
2936
+ formAction: redirect.location
2937
+ }),
2938
+ // Preserve this flag across redirects
2939
+ preventScrollReset: pendingPreventScrollReset
2940
+ });
2941
+ } else {
2942
+ // If we have a navigation submission, we will preserve it through the
2943
+ // redirect navigation
2944
+ let overrideNavigation = getLoadingNavigation(redirectLocation, submission);
2945
+ await startNavigation(redirectHistoryAction, redirectLocation, {
2946
+ overrideNavigation,
2947
+ // Send fetcher submissions through for shouldRevalidate
2948
+ fetcherSubmission,
2949
+ // Preserve this flag across redirects
2950
+ preventScrollReset: pendingPreventScrollReset
2951
+ });
2952
+ }
2953
+ }
2954
+ async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {
2955
+ // Call all navigation loaders and revalidating fetcher loaders in parallel,
2956
+ // then slice off the results into separate arrays so we can handle them
2957
+ // accordingly
2958
+ let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath)), ...fetchersToLoad.map(f => {
2959
+ if (f.matches && f.match && f.controller) {
2960
+ return callLoaderOrAction("loader", createClientSideRequest(init.history, f.path, f.controller.signal), f.match, f.matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath);
2961
+ } else {
2962
+ let error = {
2963
+ type: ResultType.error,
2964
+ error: getInternalRouterError(404, {
2965
+ pathname: f.path
2966
+ })
2967
+ };
2968
+ return error;
2969
+ }
2970
+ })]);
2971
+ let loaderResults = results.slice(0, matchesToLoad.length);
2972
+ let fetcherResults = results.slice(matchesToLoad.length);
2973
+ await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, loaderResults.map(() => request.signal), false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(f => f.match), fetcherResults, fetchersToLoad.map(f => f.controller ? f.controller.signal : null), true)]);
2974
+ return {
2975
+ results,
2976
+ loaderResults,
2977
+ fetcherResults
2978
+ };
2979
+ }
2980
+ function interruptActiveLoads() {
2981
+ // Every interruption triggers a revalidation
2982
+ isRevalidationRequired = true;
2983
+
2984
+ // Cancel pending route-level deferreds and mark cancelled routes for
2985
+ // revalidation
2986
+ cancelledDeferredRoutes.push(...cancelActiveDeferreds());
2987
+
2988
+ // Abort in-flight fetcher loads
2989
+ fetchLoadMatches.forEach((_, key) => {
2990
+ if (fetchControllers.has(key)) {
2991
+ cancelledFetcherLoads.push(key);
2992
+ abortFetcher(key);
2993
+ }
2994
+ });
2995
+ }
2996
+ function updateFetcherState(key, fetcher, opts) {
2997
+ if (opts === void 0) {
2998
+ opts = {};
2999
+ }
3000
+ state.fetchers.set(key, fetcher);
3001
+ updateState({
3002
+ fetchers: new Map(state.fetchers)
3003
+ }, {
3004
+ flushSync: (opts && opts.flushSync) === true
3005
+ });
3006
+ }
3007
+ function setFetcherError(key, routeId, error, opts) {
3008
+ if (opts === void 0) {
3009
+ opts = {};
3010
+ }
3011
+ let boundaryMatch = findNearestBoundary(state.matches, routeId);
3012
+ deleteFetcher(key);
3013
+ updateState({
3014
+ errors: {
3015
+ [boundaryMatch.route.id]: error
3016
+ },
3017
+ fetchers: new Map(state.fetchers)
3018
+ }, {
3019
+ flushSync: (opts && opts.flushSync) === true
3020
+ });
3021
+ }
3022
+ function getFetcher(key) {
3023
+ if (future.v7_fetcherPersist) {
3024
+ activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);
3025
+ // If this fetcher was previously marked for deletion, unmark it since we
3026
+ // have a new instance
3027
+ if (deletedFetchers.has(key)) {
3028
+ deletedFetchers.delete(key);
3029
+ }
3030
+ }
3031
+ return state.fetchers.get(key) || IDLE_FETCHER;
3032
+ }
3033
+ function deleteFetcher(key) {
3034
+ let fetcher = state.fetchers.get(key);
3035
+ // Don't abort the controller if this is a deletion of a fetcher.submit()
3036
+ // in it's loading phase since - we don't want to abort the corresponding
3037
+ // revalidation and want them to complete and land
3038
+ if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) {
3039
+ abortFetcher(key);
3040
+ }
3041
+ fetchLoadMatches.delete(key);
3042
+ fetchReloadIds.delete(key);
3043
+ fetchRedirectIds.delete(key);
3044
+ deletedFetchers.delete(key);
3045
+ state.fetchers.delete(key);
3046
+ }
3047
+ function deleteFetcherAndUpdateState(key) {
3048
+ if (future.v7_fetcherPersist) {
3049
+ let count = (activeFetchers.get(key) || 0) - 1;
3050
+ if (count <= 0) {
3051
+ activeFetchers.delete(key);
3052
+ deletedFetchers.add(key);
3053
+ } else {
3054
+ activeFetchers.set(key, count);
3055
+ }
3056
+ } else {
3057
+ deleteFetcher(key);
3058
+ }
3059
+ updateState({
3060
+ fetchers: new Map(state.fetchers)
3061
+ });
3062
+ }
3063
+ function abortFetcher(key) {
3064
+ let controller = fetchControllers.get(key);
3065
+ invariant(controller, "Expected fetch controller: " + key);
3066
+ controller.abort();
3067
+ fetchControllers.delete(key);
3068
+ }
3069
+ function markFetchersDone(keys) {
3070
+ for (let key of keys) {
3071
+ let fetcher = getFetcher(key);
3072
+ let doneFetcher = getDoneFetcher(fetcher.data);
3073
+ state.fetchers.set(key, doneFetcher);
3074
+ }
3075
+ }
3076
+ function markFetchRedirectsDone() {
3077
+ let doneKeys = [];
3078
+ let updatedFetchers = false;
3079
+ for (let key of fetchRedirectIds) {
3080
+ let fetcher = state.fetchers.get(key);
3081
+ invariant(fetcher, "Expected fetcher: " + key);
3082
+ if (fetcher.state === "loading") {
3083
+ fetchRedirectIds.delete(key);
3084
+ doneKeys.push(key);
3085
+ updatedFetchers = true;
3086
+ }
3087
+ }
3088
+ markFetchersDone(doneKeys);
3089
+ return updatedFetchers;
3090
+ }
3091
+ function abortStaleFetchLoads(landedId) {
3092
+ let yeetedKeys = [];
3093
+ for (let [key, id] of fetchReloadIds) {
3094
+ if (id < landedId) {
3095
+ let fetcher = state.fetchers.get(key);
3096
+ invariant(fetcher, "Expected fetcher: " + key);
3097
+ if (fetcher.state === "loading") {
3098
+ abortFetcher(key);
3099
+ fetchReloadIds.delete(key);
3100
+ yeetedKeys.push(key);
3101
+ }
3102
+ }
3103
+ }
3104
+ markFetchersDone(yeetedKeys);
3105
+ return yeetedKeys.length > 0;
3106
+ }
3107
+ function getBlocker(key, fn) {
3108
+ let blocker = state.blockers.get(key) || IDLE_BLOCKER;
3109
+ if (blockerFunctions.get(key) !== fn) {
3110
+ blockerFunctions.set(key, fn);
3111
+ }
3112
+ return blocker;
3113
+ }
3114
+ function deleteBlocker(key) {
3115
+ state.blockers.delete(key);
3116
+ blockerFunctions.delete(key);
3117
+ }
3118
+
3119
+ // Utility function to update blockers, ensuring valid state transitions
3120
+ function updateBlocker(key, newBlocker) {
3121
+ let blocker = state.blockers.get(key) || IDLE_BLOCKER;
3122
+
3123
+ // Poor mans state machine :)
3124
+ // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM
3125
+ invariant(blocker.state === "unblocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "blocked" || blocker.state === "blocked" && newBlocker.state === "proceeding" || blocker.state === "blocked" && newBlocker.state === "unblocked" || blocker.state === "proceeding" && newBlocker.state === "unblocked", "Invalid blocker state transition: " + blocker.state + " -> " + newBlocker.state);
3126
+ let blockers = new Map(state.blockers);
3127
+ blockers.set(key, newBlocker);
3128
+ updateState({
3129
+ blockers
3130
+ });
3131
+ }
3132
+ function shouldBlockNavigation(_ref4) {
3133
+ let {
3134
+ currentLocation,
3135
+ nextLocation,
3136
+ historyAction
3137
+ } = _ref4;
3138
+ if (blockerFunctions.size === 0) {
3139
+ return;
3140
+ }
3141
+
3142
+ // We ony support a single active blocker at the moment since we don't have
3143
+ // any compelling use cases for multi-blocker yet
3144
+ if (blockerFunctions.size > 1) {
3145
+ warning(false, "A router only supports one blocker at a time");
3146
+ }
3147
+ let entries = Array.from(blockerFunctions.entries());
3148
+ let [blockerKey, blockerFunction] = entries[entries.length - 1];
3149
+ let blocker = state.blockers.get(blockerKey);
3150
+ if (blocker && blocker.state === "proceeding") {
3151
+ // If the blocker is currently proceeding, we don't need to re-check
3152
+ // it and can let this navigation continue
3153
+ return;
3154
+ }
3155
+
3156
+ // At this point, we know we're unblocked/blocked so we need to check the
3157
+ // user-provided blocker function
3158
+ if (blockerFunction({
3159
+ currentLocation,
3160
+ nextLocation,
3161
+ historyAction
3162
+ })) {
3163
+ return blockerKey;
3164
+ }
3165
+ }
3166
+ function cancelActiveDeferreds(predicate) {
3167
+ let cancelledRouteIds = [];
3168
+ activeDeferreds.forEach((dfd, routeId) => {
3169
+ if (!predicate || predicate(routeId)) {
3170
+ // Cancel the deferred - but do not remove from activeDeferreds here -
3171
+ // we rely on the subscribers to do that so our tests can assert proper
3172
+ // cleanup via _internalActiveDeferreds
3173
+ dfd.cancel();
3174
+ cancelledRouteIds.push(routeId);
3175
+ activeDeferreds.delete(routeId);
3176
+ }
3177
+ });
3178
+ return cancelledRouteIds;
3179
+ }
3180
+
3181
+ // Opt in to capturing and reporting scroll positions during navigations,
3182
+ // used by the <ScrollRestoration> component
3183
+ function enableScrollRestoration(positions, getPosition, getKey) {
3184
+ savedScrollPositions = positions;
3185
+ getScrollPosition = getPosition;
3186
+ getScrollRestorationKey = getKey || null;
3187
+
3188
+ // Perform initial hydration scroll restoration, since we miss the boat on
3189
+ // the initial updateState() because we've not yet rendered <ScrollRestoration/>
3190
+ // and therefore have no savedScrollPositions available
3191
+ if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {
3192
+ initialScrollRestored = true;
3193
+ let y = getSavedScrollPosition(state.location, state.matches);
3194
+ if (y != null) {
3195
+ updateState({
3196
+ restoreScrollPosition: y
3197
+ });
3198
+ }
3199
+ }
3200
+ return () => {
3201
+ savedScrollPositions = null;
3202
+ getScrollPosition = null;
3203
+ getScrollRestorationKey = null;
3204
+ };
3205
+ }
3206
+ function getScrollKey(location, matches) {
3207
+ if (getScrollRestorationKey) {
3208
+ let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));
3209
+ return key || location.key;
3210
+ }
3211
+ return location.key;
3212
+ }
3213
+ function saveScrollPosition(location, matches) {
3214
+ if (savedScrollPositions && getScrollPosition) {
3215
+ let key = getScrollKey(location, matches);
3216
+ savedScrollPositions[key] = getScrollPosition();
3217
+ }
3218
+ }
3219
+ function getSavedScrollPosition(location, matches) {
3220
+ if (savedScrollPositions) {
3221
+ let key = getScrollKey(location, matches);
3222
+ let y = savedScrollPositions[key];
3223
+ if (typeof y === "number") {
3224
+ return y;
3225
+ }
3226
+ }
3227
+ return null;
3228
+ }
3229
+ function _internalSetRoutes(newRoutes) {
3230
+ manifest = {};
3231
+ inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);
3232
+ }
3233
+ router = {
3234
+ get basename() {
3235
+ return basename;
3236
+ },
3237
+ get future() {
3238
+ return future;
3239
+ },
3240
+ get state() {
3241
+ return state;
3242
+ },
3243
+ get routes() {
3244
+ return dataRoutes;
3245
+ },
3246
+ get window() {
3247
+ return routerWindow;
3248
+ },
3249
+ initialize,
3250
+ subscribe,
3251
+ enableScrollRestoration,
3252
+ navigate,
3253
+ fetch,
3254
+ revalidate,
3255
+ // Passthrough to history-aware createHref used by useHref so we get proper
3256
+ // hash-aware URLs in DOM paths
3257
+ createHref: to => init.history.createHref(to),
3258
+ encodeLocation: to => init.history.encodeLocation(to),
3259
+ getFetcher,
3260
+ deleteFetcher: deleteFetcherAndUpdateState,
3261
+ dispose,
3262
+ getBlocker,
3263
+ deleteBlocker,
3264
+ _internalFetchControllers: fetchControllers,
3265
+ _internalActiveDeferreds: activeDeferreds,
3266
+ // TODO: Remove setRoutes, it's temporary to avoid dealing with
3267
+ // updating the tree while validating the update algorithm.
3268
+ _internalSetRoutes
3269
+ };
3270
+ return router;
3271
+ }
3272
+ //#endregion
3273
+
3274
+ ////////////////////////////////////////////////////////////////////////////////
3275
+ //#region createStaticHandler
3276
+ ////////////////////////////////////////////////////////////////////////////////
3277
+
3278
+ const UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
3279
+
3280
+ /**
3281
+ * Future flags to toggle new feature behavior
3282
+ */
3283
+
3284
+ function createStaticHandler(routes, opts) {
3285
+ invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler");
3286
+ let manifest = {};
3287
+ let basename = (opts ? opts.basename : null) || "/";
3288
+ let mapRouteProperties;
3289
+ if (opts != null && opts.mapRouteProperties) {
3290
+ mapRouteProperties = opts.mapRouteProperties;
3291
+ } else if (opts != null && opts.detectErrorBoundary) {
3292
+ // If they are still using the deprecated version, wrap it with the new API
3293
+ let detectErrorBoundary = opts.detectErrorBoundary;
3294
+ mapRouteProperties = route => ({
3295
+ hasErrorBoundary: detectErrorBoundary(route)
3296
+ });
3297
+ } else {
3298
+ mapRouteProperties = defaultMapRouteProperties;
3299
+ }
3300
+ // Config driven behavior flags
3301
+ let future = _extends({
3302
+ v7_relativeSplatPath: false,
3303
+ v7_throwAbortReason: false
3304
+ }, opts ? opts.future : null);
3305
+ let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);
3306
+
3307
+ /**
3308
+ * The query() method is intended for document requests, in which we want to
3309
+ * call an optional action and potentially multiple loaders for all nested
3310
+ * routes. It returns a StaticHandlerContext object, which is very similar
3311
+ * to the router state (location, loaderData, actionData, errors, etc.) and
3312
+ * also adds SSR-specific information such as the statusCode and headers
3313
+ * from action/loaders Responses.
3314
+ *
3315
+ * It _should_ never throw and should report all errors through the
3316
+ * returned context.errors object, properly associating errors to their error
3317
+ * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be
3318
+ * used to emulate React error boundaries during SSr by performing a second
3319
+ * pass only down to the boundaryId.
3320
+ *
3321
+ * The one exception where we do not return a StaticHandlerContext is when a
3322
+ * redirect response is returned or thrown from any action/loader. We
3323
+ * propagate that out and return the raw Response so the HTTP server can
3324
+ * return it directly.
3325
+ */
3326
+ async function query(request, _temp3) {
3327
+ let {
3328
+ requestContext
3329
+ } = _temp3 === void 0 ? {} : _temp3;
3330
+ let url = new URL(request.url);
3331
+ let method = request.method;
3332
+ let location = createLocation("", createPath(url), null, "default");
3333
+ let matches = matchRoutes(dataRoutes, location, basename);
3334
+
3335
+ // SSR supports HEAD requests while SPA doesn't
3336
+ if (!isValidMethod(method) && method !== "HEAD") {
3337
+ let error = getInternalRouterError(405, {
3338
+ method
3339
+ });
3340
+ let {
3341
+ matches: methodNotAllowedMatches,
3342
+ route
3343
+ } = getShortCircuitMatches(dataRoutes);
3344
+ return {
3345
+ basename,
3346
+ location,
3347
+ matches: methodNotAllowedMatches,
3348
+ loaderData: {},
3349
+ actionData: null,
3350
+ errors: {
3351
+ [route.id]: error
3352
+ },
3353
+ statusCode: error.status,
3354
+ loaderHeaders: {},
3355
+ actionHeaders: {},
3356
+ activeDeferreds: null
3357
+ };
3358
+ } else if (!matches) {
3359
+ let error = getInternalRouterError(404, {
3360
+ pathname: location.pathname
3361
+ });
3362
+ let {
3363
+ matches: notFoundMatches,
3364
+ route
3365
+ } = getShortCircuitMatches(dataRoutes);
3366
+ return {
3367
+ basename,
3368
+ location,
3369
+ matches: notFoundMatches,
3370
+ loaderData: {},
3371
+ actionData: null,
3372
+ errors: {
3373
+ [route.id]: error
3374
+ },
3375
+ statusCode: error.status,
3376
+ loaderHeaders: {},
3377
+ actionHeaders: {},
3378
+ activeDeferreds: null
3379
+ };
3380
+ }
3381
+ let result = await queryImpl(request, location, matches, requestContext);
3382
+ if (isResponse(result)) {
3383
+ return result;
3384
+ }
3385
+
3386
+ // When returning StaticHandlerContext, we patch back in the location here
3387
+ // since we need it for React Context. But this helps keep our submit and
3388
+ // loadRouteData operating on a Request instead of a Location
3389
+ return _extends({
3390
+ location,
3391
+ basename
3392
+ }, result);
3393
+ }
3394
+
3395
+ /**
3396
+ * The queryRoute() method is intended for targeted route requests, either
3397
+ * for fetch ?_data requests or resource route requests. In this case, we
3398
+ * are only ever calling a single action or loader, and we are returning the
3399
+ * returned value directly. In most cases, this will be a Response returned
3400
+ * from the action/loader, but it may be a primitive or other value as well -
3401
+ * and in such cases the calling context should handle that accordingly.
3402
+ *
3403
+ * We do respect the throw/return differentiation, so if an action/loader
3404
+ * throws, then this method will throw the value. This is important so we
3405
+ * can do proper boundary identification in Remix where a thrown Response
3406
+ * must go to the Catch Boundary but a returned Response is happy-path.
3407
+ *
3408
+ * One thing to note is that any Router-initiated Errors that make sense
3409
+ * to associate with a status code will be thrown as an ErrorResponse
3410
+ * instance which include the raw Error, such that the calling context can
3411
+ * serialize the error as they see fit while including the proper response
3412
+ * code. Examples here are 404 and 405 errors that occur prior to reaching
3413
+ * any user-defined loaders.
3414
+ */
3415
+ async function queryRoute(request, _temp4) {
3416
+ let {
3417
+ routeId,
3418
+ requestContext
3419
+ } = _temp4 === void 0 ? {} : _temp4;
3420
+ let url = new URL(request.url);
3421
+ let method = request.method;
3422
+ let location = createLocation("", createPath(url), null, "default");
3423
+ let matches = matchRoutes(dataRoutes, location, basename);
3424
+
3425
+ // SSR supports HEAD requests while SPA doesn't
3426
+ if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
3427
+ throw getInternalRouterError(405, {
3428
+ method
3429
+ });
3430
+ } else if (!matches) {
3431
+ throw getInternalRouterError(404, {
3432
+ pathname: location.pathname
3433
+ });
3434
+ }
3435
+ let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);
3436
+ if (routeId && !match) {
3437
+ throw getInternalRouterError(403, {
3438
+ pathname: location.pathname,
3439
+ routeId
3440
+ });
3441
+ } else if (!match) {
3442
+ // This should never hit I don't think?
3443
+ throw getInternalRouterError(404, {
3444
+ pathname: location.pathname
3445
+ });
3446
+ }
3447
+ let result = await queryImpl(request, location, matches, requestContext, match);
3448
+ if (isResponse(result)) {
3449
+ return result;
3450
+ }
3451
+ let error = result.errors ? Object.values(result.errors)[0] : undefined;
3452
+ if (error !== undefined) {
3453
+ // If we got back result.errors, that means the loader/action threw
3454
+ // _something_ that wasn't a Response, but it's not guaranteed/required
3455
+ // to be an `instanceof Error` either, so we have to use throw here to
3456
+ // preserve the "error" state outside of queryImpl.
3457
+ throw error;
3458
+ }
3459
+
3460
+ // Pick off the right state value to return
3461
+ if (result.actionData) {
3462
+ return Object.values(result.actionData)[0];
3463
+ }
3464
+ if (result.loaderData) {
3465
+ var _result$activeDeferre;
3466
+ let data = Object.values(result.loaderData)[0];
3467
+ if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {
3468
+ data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];
3469
+ }
3470
+ return data;
3471
+ }
3472
+ return undefined;
3473
+ }
3474
+ async function queryImpl(request, location, matches, requestContext, routeMatch) {
3475
+ invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal");
3476
+ try {
3477
+ if (isMutationMethod(request.method.toLowerCase())) {
3478
+ let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, routeMatch != null);
3479
+ return result;
3480
+ }
3481
+ let result = await loadRouteData(request, matches, requestContext, routeMatch);
3482
+ return isResponse(result) ? result : _extends({}, result, {
3483
+ actionData: null,
3484
+ actionHeaders: {}
3485
+ });
3486
+ } catch (e) {
3487
+ // If the user threw/returned a Response in callLoaderOrAction, we throw
3488
+ // it to bail out and then return or throw here based on whether the user
3489
+ // returned or threw
3490
+ if (isQueryRouteResponse(e)) {
3491
+ if (e.type === ResultType.error) {
3492
+ throw e.response;
3493
+ }
3494
+ return e.response;
3495
+ }
3496
+ // Redirects are always returned since they don't propagate to catch
3497
+ // boundaries
3498
+ if (isRedirectResponse(e)) {
3499
+ return e;
3500
+ }
3501
+ throw e;
3502
+ }
3503
+ }
3504
+ async function submit(request, matches, actionMatch, requestContext, isRouteRequest) {
3505
+ let result;
3506
+ if (!actionMatch.route.action && !actionMatch.route.lazy) {
3507
+ let error = getInternalRouterError(405, {
3508
+ method: request.method,
3509
+ pathname: new URL(request.url).pathname,
3510
+ routeId: actionMatch.route.id
3511
+ });
3512
+ if (isRouteRequest) {
3513
+ throw error;
3514
+ }
3515
+ result = {
3516
+ type: ResultType.error,
3517
+ error
3518
+ };
3519
+ } else {
3520
+ result = await callLoaderOrAction("action", request, actionMatch, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {
3521
+ isStaticRequest: true,
3522
+ isRouteRequest,
3523
+ requestContext
3524
+ });
3525
+ if (request.signal.aborted) {
3526
+ throwStaticHandlerAbortedError(request, isRouteRequest, future);
3527
+ }
3528
+ }
3529
+ if (isRedirectResult(result)) {
3530
+ // Uhhhh - this should never happen, we should always throw these from
3531
+ // callLoaderOrAction, but the type narrowing here keeps TS happy and we
3532
+ // can get back on the "throw all redirect responses" train here should
3533
+ // this ever happen :/
3534
+ throw new Response(null, {
3535
+ status: result.status,
3536
+ headers: {
3537
+ Location: result.location
3538
+ }
3539
+ });
3540
+ }
3541
+ if (isDeferredResult(result)) {
3542
+ let error = getInternalRouterError(400, {
3543
+ type: "defer-action"
3544
+ });
3545
+ if (isRouteRequest) {
3546
+ throw error;
3547
+ }
3548
+ result = {
3549
+ type: ResultType.error,
3550
+ error
3551
+ };
3552
+ }
3553
+ if (isRouteRequest) {
3554
+ // Note: This should only be non-Response values if we get here, since
3555
+ // isRouteRequest should throw any Response received in callLoaderOrAction
3556
+ if (isErrorResult(result)) {
3557
+ throw result.error;
3558
+ }
3559
+ return {
3560
+ matches: [actionMatch],
3561
+ loaderData: {},
3562
+ actionData: {
3563
+ [actionMatch.route.id]: result.data
3564
+ },
3565
+ errors: null,
3566
+ // Note: statusCode + headers are unused here since queryRoute will
3567
+ // return the raw Response or value
3568
+ statusCode: 200,
3569
+ loaderHeaders: {},
3570
+ actionHeaders: {},
3571
+ activeDeferreds: null
3572
+ };
3573
+ }
3574
+ if (isErrorResult(result)) {
3575
+ // Store off the pending error - we use it to determine which loaders
3576
+ // to call and will commit it when we complete the navigation
3577
+ let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
3578
+ let context = await loadRouteData(request, matches, requestContext, undefined, {
3579
+ [boundaryMatch.route.id]: result.error
3580
+ });
3581
+
3582
+ // action status codes take precedence over loader status codes
3583
+ return _extends({}, context, {
3584
+ statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,
3585
+ actionData: null,
3586
+ actionHeaders: _extends({}, result.headers ? {
3587
+ [actionMatch.route.id]: result.headers
3588
+ } : {})
3589
+ });
3590
+ }
3591
+
3592
+ // Create a GET request for the loaders
3593
+ let loaderRequest = new Request(request.url, {
3594
+ headers: request.headers,
3595
+ redirect: request.redirect,
3596
+ signal: request.signal
3597
+ });
3598
+ let context = await loadRouteData(loaderRequest, matches, requestContext);
3599
+ return _extends({}, context, result.statusCode ? {
3600
+ statusCode: result.statusCode
3601
+ } : {}, {
3602
+ actionData: {
3603
+ [actionMatch.route.id]: result.data
3604
+ },
3605
+ actionHeaders: _extends({}, result.headers ? {
3606
+ [actionMatch.route.id]: result.headers
3607
+ } : {})
3608
+ });
3609
+ }
3610
+ async function loadRouteData(request, matches, requestContext, routeMatch, pendingActionError) {
3611
+ let isRouteRequest = routeMatch != null;
3612
+
3613
+ // Short circuit if we have no loaders to run (queryRoute())
3614
+ if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {
3615
+ throw getInternalRouterError(400, {
3616
+ method: request.method,
3617
+ pathname: new URL(request.url).pathname,
3618
+ routeId: routeMatch == null ? void 0 : routeMatch.route.id
3619
+ });
3620
+ }
3621
+ let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);
3622
+ let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);
3623
+
3624
+ // Short circuit if we have no loaders to run (query())
3625
+ if (matchesToLoad.length === 0) {
3626
+ return {
3627
+ matches,
3628
+ // Add a null for all matched routes for proper revalidation on the client
3629
+ loaderData: matches.reduce((acc, m) => Object.assign(acc, {
3630
+ [m.route.id]: null
3631
+ }), {}),
3632
+ errors: pendingActionError || null,
3633
+ statusCode: 200,
3634
+ loaderHeaders: {},
3635
+ activeDeferreds: null
3636
+ };
3637
+ }
3638
+ let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction("loader", request, match, matches, manifest, mapRouteProperties, basename, future.v7_relativeSplatPath, {
3639
+ isStaticRequest: true,
3640
+ isRouteRequest,
3641
+ requestContext
3642
+ }))]);
3643
+ if (request.signal.aborted) {
3644
+ throwStaticHandlerAbortedError(request, isRouteRequest, future);
3645
+ }
3646
+
3647
+ // Process and commit output from loaders
3648
+ let activeDeferreds = new Map();
3649
+ let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError, activeDeferreds);
3650
+
3651
+ // Add a null for any non-loader matches for proper revalidation on the client
3652
+ let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));
3653
+ matches.forEach(match => {
3654
+ if (!executedLoaders.has(match.route.id)) {
3655
+ context.loaderData[match.route.id] = null;
3656
+ }
3657
+ });
3658
+ return _extends({}, context, {
3659
+ matches,
3660
+ activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null
3661
+ });
3662
+ }
3663
+ return {
3664
+ dataRoutes,
3665
+ query,
3666
+ queryRoute
3667
+ };
3668
+ }
3669
+
3670
+ //#endregion
3671
+
3672
+ ////////////////////////////////////////////////////////////////////////////////
3673
+ //#region Helpers
3674
+ ////////////////////////////////////////////////////////////////////////////////
3675
+
3676
+ /**
3677
+ * Given an existing StaticHandlerContext and an error thrown at render time,
3678
+ * provide an updated StaticHandlerContext suitable for a second SSR render
3679
+ */
3680
+ function getStaticContextFromError(routes, context, error) {
3681
+ let newContext = _extends({}, context, {
3682
+ statusCode: isRouteErrorResponse(error) ? error.status : 500,
3683
+ errors: {
3684
+ [context._deepestRenderedBoundaryId || routes[0].id]: error
3685
+ }
3686
+ });
3687
+ return newContext;
3688
+ }
3689
+ function throwStaticHandlerAbortedError(request, isRouteRequest, future) {
3690
+ if (future.v7_throwAbortReason && request.signal.reason !== undefined) {
3691
+ throw request.signal.reason;
3692
+ }
3693
+ let method = isRouteRequest ? "queryRoute" : "query";
3694
+ throw new Error(method + "() call aborted: " + request.method + " " + request.url);
3695
+ }
3696
+ function isSubmissionNavigation(opts) {
3697
+ return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined);
3698
+ }
3699
+ function normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {
3700
+ let contextualMatches;
3701
+ let activeRouteMatch;
3702
+ if (fromRouteId) {
3703
+ // Grab matches up to the calling route so our route-relative logic is
3704
+ // relative to the correct source route
3705
+ contextualMatches = [];
3706
+ for (let match of matches) {
3707
+ contextualMatches.push(match);
3708
+ if (match.route.id === fromRouteId) {
3709
+ activeRouteMatch = match;
3710
+ break;
3711
+ }
3712
+ }
3713
+ } else {
3714
+ contextualMatches = matches;
3715
+ activeRouteMatch = matches[matches.length - 1];
3716
+ }
3717
+
3718
+ // Resolve the relative path
3719
+ let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3720
+
3721
+ // When `to` is not specified we inherit search/hash from the current
3722
+ // location, unlike when to="." and we just inherit the path.
3723
+ // See https://github.com/remix-run/remix/issues/927
3724
+ if (to == null) {
3725
+ path.search = location.search;
3726
+ path.hash = location.hash;
3727
+ }
3728
+
3729
+ // Add an ?index param for matched index routes if we don't already have one
3730
+ if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {
3731
+ path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
3732
+ }
3733
+
3734
+ // If we're operating within a basename, prepend it to the pathname. If
3735
+ // this is a root navigation, then just use the raw basename which allows
3736
+ // the basename to have full control over the presence of a trailing slash
3737
+ // on root actions
3738
+ if (prependBasename && basename !== "/") {
3739
+ path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
3740
+ }
3741
+ return createPath(path);
3742
+ }
3743
+
3744
+ // Normalize navigation options by converting formMethod=GET formData objects to
3745
+ // URLSearchParams so they behave identically to links with query params
3746
+ function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {
3747
+ // Return location verbatim on non-submission navigations
3748
+ if (!opts || !isSubmissionNavigation(opts)) {
3749
+ return {
3750
+ path
3751
+ };
3752
+ }
3753
+ if (opts.formMethod && !isValidMethod(opts.formMethod)) {
3754
+ return {
3755
+ path,
3756
+ error: getInternalRouterError(405, {
3757
+ method: opts.formMethod
3758
+ })
3759
+ };
3760
+ }
3761
+ let getInvalidBodyError = () => ({
3762
+ path,
3763
+ error: getInternalRouterError(400, {
3764
+ type: "invalid-body"
3765
+ })
3766
+ });
3767
+
3768
+ // Create a Submission on non-GET navigations
3769
+ let rawFormMethod = opts.formMethod || "get";
3770
+ let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();
3771
+ let formAction = stripHashFromPath(path);
3772
+ if (opts.body !== undefined) {
3773
+ if (opts.formEncType === "text/plain") {
3774
+ // text only support POST/PUT/PATCH/DELETE submissions
3775
+ if (!isMutationMethod(formMethod)) {
3776
+ return getInvalidBodyError();
3777
+ }
3778
+ let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?
3779
+ // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
3780
+ Array.from(opts.body.entries()).reduce((acc, _ref5) => {
3781
+ let [name, value] = _ref5;
3782
+ return "" + acc + name + "=" + value + "\n";
3783
+ }, "") : String(opts.body);
3784
+ return {
3785
+ path,
3786
+ submission: {
3787
+ formMethod,
3788
+ formAction,
3789
+ formEncType: opts.formEncType,
3790
+ formData: undefined,
3791
+ json: undefined,
3792
+ text
3793
+ }
3794
+ };
3795
+ } else if (opts.formEncType === "application/json") {
3796
+ // json only supports POST/PUT/PATCH/DELETE submissions
3797
+ if (!isMutationMethod(formMethod)) {
3798
+ return getInvalidBodyError();
3799
+ }
3800
+ try {
3801
+ let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body;
3802
+ return {
3803
+ path,
3804
+ submission: {
3805
+ formMethod,
3806
+ formAction,
3807
+ formEncType: opts.formEncType,
3808
+ formData: undefined,
3809
+ json,
3810
+ text: undefined
3811
+ }
3812
+ };
3813
+ } catch (e) {
3814
+ return getInvalidBodyError();
3815
+ }
3816
+ }
3817
+ }
3818
+ invariant(typeof FormData === "function", "FormData is not available in this environment");
3819
+ let searchParams;
3820
+ let formData;
3821
+ if (opts.formData) {
3822
+ searchParams = convertFormDataToSearchParams(opts.formData);
3823
+ formData = opts.formData;
3824
+ } else if (opts.body instanceof FormData) {
3825
+ searchParams = convertFormDataToSearchParams(opts.body);
3826
+ formData = opts.body;
3827
+ } else if (opts.body instanceof URLSearchParams) {
3828
+ searchParams = opts.body;
3829
+ formData = convertSearchParamsToFormData(searchParams);
3830
+ } else if (opts.body == null) {
3831
+ searchParams = new URLSearchParams();
3832
+ formData = new FormData();
3833
+ } else {
3834
+ try {
3835
+ searchParams = new URLSearchParams(opts.body);
3836
+ formData = convertSearchParamsToFormData(searchParams);
3837
+ } catch (e) {
3838
+ return getInvalidBodyError();
3839
+ }
3840
+ }
3841
+ let submission = {
3842
+ formMethod,
3843
+ formAction,
3844
+ formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",
3845
+ formData,
3846
+ json: undefined,
3847
+ text: undefined
3848
+ };
3849
+ if (isMutationMethod(submission.formMethod)) {
3850
+ return {
3851
+ path,
3852
+ submission
3853
+ };
3854
+ }
3855
+
3856
+ // Flatten submission onto URLSearchParams for GET submissions
3857
+ let parsedPath = parsePath(path);
3858
+ // On GET navigation submissions we can drop the ?index param from the
3859
+ // resulting location since all loaders will run. But fetcher GET submissions
3860
+ // only run a single loader so we need to preserve any incoming ?index params
3861
+ if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {
3862
+ searchParams.append("index", "");
3863
+ }
3864
+ parsedPath.search = "?" + searchParams;
3865
+ return {
3866
+ path: createPath(parsedPath),
3867
+ submission
3868
+ };
3869
+ }
3870
+
3871
+ // Filter out all routes below any caught error as they aren't going to
3872
+ // render so we don't need to load them
3873
+ function getLoaderMatchesUntilBoundary(matches, boundaryId) {
3874
+ let boundaryMatches = matches;
3875
+ if (boundaryId) {
3876
+ let index = matches.findIndex(m => m.route.id === boundaryId);
3877
+ if (index >= 0) {
3878
+ boundaryMatches = matches.slice(0, index);
3879
+ }
3880
+ }
3881
+ return boundaryMatches;
3882
+ }
3883
+ function getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionData, pendingError) {
3884
+ let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : undefined;
3885
+ let currentUrl = history.createURL(state.location);
3886
+ let nextUrl = history.createURL(location);
3887
+
3888
+ // Pick navigation matches that are net-new or qualify for revalidation
3889
+ let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;
3890
+ let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);
3891
+ let navigationMatches = boundaryMatches.filter((match, index) => {
3892
+ let {
3893
+ route
3894
+ } = match;
3895
+ if (route.lazy) {
3896
+ // We haven't loaded this route yet so we don't know if it's got a loader!
3897
+ return true;
3898
+ }
3899
+ if (route.loader == null) {
3900
+ return false;
3901
+ }
3902
+ if (isInitialLoad) {
3903
+ if (route.loader.hydrate) {
3904
+ return true;
3905
+ }
3906
+ return state.loaderData[route.id] === undefined && (
3907
+ // Don't re-run if the loader ran and threw an error
3908
+ !state.errors || state.errors[route.id] === undefined);
3909
+ }
3910
+
3911
+ // Always call the loader on new route instances and pending defer cancellations
3912
+ if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {
3913
+ return true;
3914
+ }
3915
+
3916
+ // This is the default implementation for when we revalidate. If the route
3917
+ // provides it's own implementation, then we give them full control but
3918
+ // provide this value so they can leverage it if needed after they check
3919
+ // their own specific use cases
3920
+ let currentRouteMatch = state.matches[index];
3921
+ let nextRouteMatch = match;
3922
+ return shouldRevalidateLoader(match, _extends({
3923
+ currentUrl,
3924
+ currentParams: currentRouteMatch.params,
3925
+ nextUrl,
3926
+ nextParams: nextRouteMatch.params
3927
+ }, submission, {
3928
+ actionResult,
3929
+ defaultShouldRevalidate:
3930
+ // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
3931
+ isRevalidationRequired ||
3932
+ // Clicked the same link, resubmitted a GET form
3933
+ currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||
3934
+ // Search params affect all loaders
3935
+ currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)
3936
+ }));
3937
+ });
3938
+
3939
+ // Pick fetcher.loads that need to be revalidated
3940
+ let revalidatingFetchers = [];
3941
+ fetchLoadMatches.forEach((f, key) => {
3942
+ // Don't revalidate:
3943
+ // - on initial load (shouldn't be any fetchers then anyway)
3944
+ // - if fetcher won't be present in the subsequent render
3945
+ // - no longer matches the URL (v7_fetcherPersist=false)
3946
+ // - was unmounted but persisted due to v7_fetcherPersist=true
3947
+ if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {
3948
+ return;
3949
+ }
3950
+ let fetcherMatches = matchRoutes(routesToUse, f.path, basename);
3951
+
3952
+ // If the fetcher path no longer matches, push it in with null matches so
3953
+ // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is
3954
+ // currently only a use-case for Remix HMR where the route tree can change
3955
+ // at runtime and remove a route previously loaded via a fetcher
3956
+ if (!fetcherMatches) {
3957
+ revalidatingFetchers.push({
3958
+ key,
3959
+ routeId: f.routeId,
3960
+ path: f.path,
3961
+ matches: null,
3962
+ match: null,
3963
+ controller: null
3964
+ });
3965
+ return;
3966
+ }
3967
+
3968
+ // Revalidating fetchers are decoupled from the route matches since they
3969
+ // load from a static href. They revalidate based on explicit revalidation
3970
+ // (submission, useRevalidator, or X-Remix-Revalidate)
3971
+ let fetcher = state.fetchers.get(key);
3972
+ let fetcherMatch = getTargetMatch(fetcherMatches, f.path);
3973
+ let shouldRevalidate = false;
3974
+ if (fetchRedirectIds.has(key)) {
3975
+ // Never trigger a revalidation of an actively redirecting fetcher
3976
+ shouldRevalidate = false;
3977
+ } else if (cancelledFetcherLoads.includes(key)) {
3978
+ // Always revalidate if the fetcher was cancelled
3979
+ shouldRevalidate = true;
3980
+ } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) {
3981
+ // If the fetcher hasn't ever completed loading yet, then this isn't a
3982
+ // revalidation, it would just be a brand new load if an explicit
3983
+ // revalidation is required
3984
+ shouldRevalidate = isRevalidationRequired;
3985
+ } else {
3986
+ // Otherwise fall back on any user-defined shouldRevalidate, defaulting
3987
+ // to explicit revalidations only
3988
+ shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({
3989
+ currentUrl,
3990
+ currentParams: state.matches[state.matches.length - 1].params,
3991
+ nextUrl,
3992
+ nextParams: matches[matches.length - 1].params
3993
+ }, submission, {
3994
+ actionResult,
3995
+ defaultShouldRevalidate: isRevalidationRequired
3996
+ }));
3997
+ }
3998
+ if (shouldRevalidate) {
3999
+ revalidatingFetchers.push({
4000
+ key,
4001
+ routeId: f.routeId,
4002
+ path: f.path,
4003
+ matches: fetcherMatches,
4004
+ match: fetcherMatch,
4005
+ controller: new AbortController()
4006
+ });
4007
+ }
4008
+ });
4009
+ return [navigationMatches, revalidatingFetchers];
4010
+ }
4011
+ function isNewLoader(currentLoaderData, currentMatch, match) {
4012
+ let isNew =
4013
+ // [a] -> [a, b]
4014
+ !currentMatch ||
4015
+ // [a, b] -> [a, c]
4016
+ match.route.id !== currentMatch.route.id;
4017
+
4018
+ // Handle the case that we don't have data for a re-used route, potentially
4019
+ // from a prior error or from a cancelled pending deferred
4020
+ let isMissingData = currentLoaderData[match.route.id] === undefined;
4021
+
4022
+ // Always load if this is a net-new route or we don't yet have data
4023
+ return isNew || isMissingData;
4024
+ }
4025
+ function isNewRouteInstance(currentMatch, match) {
4026
+ let currentPath = currentMatch.route.path;
4027
+ return (
4028
+ // param change for this match, /users/123 -> /users/456
4029
+ currentMatch.pathname !== match.pathname ||
4030
+ // splat param changed, which is not present in match.path
4031
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
4032
+ currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]
4033
+ );
4034
+ }
4035
+ function shouldRevalidateLoader(loaderMatch, arg) {
4036
+ if (loaderMatch.route.shouldRevalidate) {
4037
+ let routeChoice = loaderMatch.route.shouldRevalidate(arg);
4038
+ if (typeof routeChoice === "boolean") {
4039
+ return routeChoice;
4040
+ }
4041
+ }
4042
+ return arg.defaultShouldRevalidate;
4043
+ }
4044
+
4045
+ /**
4046
+ * Execute route.lazy() methods to lazily load route modules (loader, action,
4047
+ * shouldRevalidate) and update the routeManifest in place which shares objects
4048
+ * with dataRoutes so those get updated as well.
4049
+ */
4050
+ async function loadLazyRouteModule(route, mapRouteProperties, manifest) {
4051
+ if (!route.lazy) {
4052
+ return;
4053
+ }
4054
+ let lazyRoute = await route.lazy();
4055
+
4056
+ // If the lazy route function was executed and removed by another parallel
4057
+ // call then we can return - first lazy() to finish wins because the return
4058
+ // value of lazy is expected to be static
4059
+ if (!route.lazy) {
4060
+ return;
4061
+ }
4062
+ let routeToUpdate = manifest[route.id];
4063
+ invariant(routeToUpdate, "No route found in manifest");
4064
+
4065
+ // Update the route in place. This should be safe because there's no way
4066
+ // we could yet be sitting on this route as we can't get there without
4067
+ // resolving lazy() first.
4068
+ //
4069
+ // This is different than the HMR "update" use-case where we may actively be
4070
+ // on the route being updated. The main concern boils down to "does this
4071
+ // mutation affect any ongoing navigations or any current state.matches
4072
+ // values?". If not, it should be safe to update in place.
4073
+ let routeUpdates = {};
4074
+ for (let lazyRouteProperty in lazyRoute) {
4075
+ let staticRouteValue = routeToUpdate[lazyRouteProperty];
4076
+ let isPropertyStaticallyDefined = staticRouteValue !== undefined &&
4077
+ // This property isn't static since it should always be updated based
4078
+ // on the route updates
4079
+ lazyRouteProperty !== "hasErrorBoundary";
4080
+ warning(!isPropertyStaticallyDefined, "Route \"" + routeToUpdate.id + "\" has a static property \"" + lazyRouteProperty + "\" " + "defined but its lazy function is also returning a value for this property. " + ("The lazy route property \"" + lazyRouteProperty + "\" will be ignored."));
4081
+ if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {
4082
+ routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
4083
+ }
4084
+ }
4085
+
4086
+ // Mutate the route with the provided updates. Do this first so we pass
4087
+ // the updated version to mapRouteProperties
4088
+ Object.assign(routeToUpdate, routeUpdates);
4089
+
4090
+ // Mutate the `hasErrorBoundary` property on the route based on the route
4091
+ // updates and remove the `lazy` function so we don't resolve the lazy
4092
+ // route again.
4093
+ Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {
4094
+ lazy: undefined
4095
+ }));
4096
+ }
4097
+ async function callLoaderOrAction(type, request, match, matches, manifest, mapRouteProperties, basename, v7_relativeSplatPath, opts) {
4098
+ if (opts === void 0) {
4099
+ opts = {};
4100
+ }
4101
+ let resultType;
4102
+ let result;
4103
+ let onReject;
4104
+ let runHandler = handler => {
4105
+ // Setup a promise we can race against so that abort signals short circuit
4106
+ let reject;
4107
+ let abortPromise = new Promise((_, r) => reject = r);
4108
+ onReject = () => reject();
4109
+ request.signal.addEventListener("abort", onReject);
4110
+ return Promise.race([handler({
4111
+ request,
4112
+ params: match.params,
4113
+ context: opts.requestContext
4114
+ }), abortPromise]);
4115
+ };
4116
+ try {
4117
+ let handler = match.route[type];
4118
+ if (match.route.lazy) {
4119
+ if (handler) {
4120
+ // Run statically defined handler in parallel with lazy()
4121
+ let handlerError;
4122
+ let values = await Promise.all([
4123
+ // If the handler throws, don't let it immediately bubble out,
4124
+ // since we need to let the lazy() execution finish so we know if this
4125
+ // route has a boundary that can handle the error
4126
+ runHandler(handler).catch(e => {
4127
+ handlerError = e;
4128
+ }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);
4129
+ if (handlerError) {
4130
+ throw handlerError;
4131
+ }
4132
+ result = values[0];
4133
+ } else {
4134
+ // Load lazy route module, then run any returned handler
4135
+ await loadLazyRouteModule(match.route, mapRouteProperties, manifest);
4136
+ handler = match.route[type];
4137
+ if (handler) {
4138
+ // Handler still run even if we got interrupted to maintain consistency
4139
+ // with un-abortable behavior of handler execution on non-lazy or
4140
+ // previously-lazy-loaded routes
4141
+ result = await runHandler(handler);
4142
+ } else if (type === "action") {
4143
+ let url = new URL(request.url);
4144
+ let pathname = url.pathname + url.search;
4145
+ throw getInternalRouterError(405, {
4146
+ method: request.method,
4147
+ pathname,
4148
+ routeId: match.route.id
4149
+ });
4150
+ } else {
4151
+ // lazy() route has no loader to run. Short circuit here so we don't
4152
+ // hit the invariant below that errors on returning undefined.
4153
+ return {
4154
+ type: ResultType.data,
4155
+ data: undefined
4156
+ };
4157
+ }
4158
+ }
4159
+ } else if (!handler) {
4160
+ let url = new URL(request.url);
4161
+ let pathname = url.pathname + url.search;
4162
+ throw getInternalRouterError(404, {
4163
+ pathname
4164
+ });
4165
+ } else {
4166
+ result = await runHandler(handler);
4167
+ }
4168
+ invariant(result !== undefined, "You defined " + (type === "action" ? "an action" : "a loader") + " for route " + ("\"" + match.route.id + "\" but didn't return anything from your `" + type + "` ") + "function. Please return a value or `null`.");
4169
+ } catch (e) {
4170
+ resultType = ResultType.error;
4171
+ result = e;
4172
+ } finally {
4173
+ if (onReject) {
4174
+ request.signal.removeEventListener("abort", onReject);
4175
+ }
4176
+ }
4177
+ if (isResponse(result)) {
4178
+ let status = result.status;
4179
+
4180
+ // Process redirects
4181
+ if (redirectStatusCodes.has(status)) {
4182
+ let location = result.headers.get("Location");
4183
+ invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header");
4184
+
4185
+ // Support relative routing in internal redirects
4186
+ if (!ABSOLUTE_URL_REGEX.test(location)) {
4187
+ location = normalizeTo(new URL(request.url), matches.slice(0, matches.indexOf(match) + 1), basename, true, location, v7_relativeSplatPath);
4188
+ } else if (!opts.isStaticRequest) {
4189
+ // Strip off the protocol+origin for same-origin + same-basename absolute
4190
+ // redirects. If this is a static request, we can let it go back to the
4191
+ // browser as-is
4192
+ let currentUrl = new URL(request.url);
4193
+ let url = location.startsWith("//") ? new URL(currentUrl.protocol + location) : new URL(location);
4194
+ let isSameBasename = stripBasename(url.pathname, basename) != null;
4195
+ if (url.origin === currentUrl.origin && isSameBasename) {
4196
+ location = url.pathname + url.search + url.hash;
4197
+ }
4198
+ }
4199
+
4200
+ // Don't process redirects in the router during static requests requests.
4201
+ // Instead, throw the Response and let the server handle it with an HTTP
4202
+ // redirect. We also update the Location header in place in this flow so
4203
+ // basename and relative routing is taken into account
4204
+ if (opts.isStaticRequest) {
4205
+ result.headers.set("Location", location);
4206
+ throw result;
4207
+ }
4208
+ return {
4209
+ type: ResultType.redirect,
4210
+ status,
4211
+ location,
4212
+ revalidate: result.headers.get("X-Remix-Revalidate") !== null,
4213
+ reloadDocument: result.headers.get("X-Remix-Reload-Document") !== null
4214
+ };
4215
+ }
4216
+
4217
+ // For SSR single-route requests, we want to hand Responses back directly
4218
+ // without unwrapping. We do this with the QueryRouteResponse wrapper
4219
+ // interface so we can know whether it was returned or thrown
4220
+ if (opts.isRouteRequest) {
4221
+ let queryRouteResponse = {
4222
+ type: resultType === ResultType.error ? ResultType.error : ResultType.data,
4223
+ response: result
4224
+ };
4225
+ throw queryRouteResponse;
4226
+ }
4227
+ let data;
4228
+ try {
4229
+ let contentType = result.headers.get("Content-Type");
4230
+ // Check between word boundaries instead of startsWith() due to the last
4231
+ // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type
4232
+ if (contentType && /\bapplication\/json\b/.test(contentType)) {
4233
+ if (result.body == null) {
4234
+ data = null;
4235
+ } else {
4236
+ data = await result.json();
4237
+ }
4238
+ } else {
4239
+ data = await result.text();
4240
+ }
4241
+ } catch (e) {
4242
+ return {
4243
+ type: ResultType.error,
4244
+ error: e
4245
+ };
4246
+ }
4247
+ if (resultType === ResultType.error) {
4248
+ return {
4249
+ type: resultType,
4250
+ error: new ErrorResponseImpl(status, result.statusText, data),
4251
+ headers: result.headers
4252
+ };
4253
+ }
4254
+ return {
4255
+ type: ResultType.data,
4256
+ data,
4257
+ statusCode: result.status,
4258
+ headers: result.headers
4259
+ };
4260
+ }
4261
+ if (resultType === ResultType.error) {
4262
+ return {
4263
+ type: resultType,
4264
+ error: result
4265
+ };
4266
+ }
4267
+ if (isDeferredData(result)) {
4268
+ var _result$init, _result$init2;
4269
+ return {
4270
+ type: ResultType.deferred,
4271
+ deferredData: result,
4272
+ statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,
4273
+ headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)
4274
+ };
4275
+ }
4276
+ return {
4277
+ type: ResultType.data,
4278
+ data: result
4279
+ };
4280
+ }
4281
+
4282
+ // Utility method for creating the Request instances for loaders/actions during
4283
+ // client-side navigations and fetches. During SSR we will always have a
4284
+ // Request instance from the static handler (query/queryRoute)
4285
+ function createClientSideRequest(history, location, signal, submission) {
4286
+ let url = history.createURL(stripHashFromPath(location)).toString();
4287
+ let init = {
4288
+ signal
4289
+ };
4290
+ if (submission && isMutationMethod(submission.formMethod)) {
4291
+ let {
4292
+ formMethod,
4293
+ formEncType
4294
+ } = submission;
4295
+ // Didn't think we needed this but it turns out unlike other methods, patch
4296
+ // won't be properly normalized to uppercase and results in a 405 error.
4297
+ // See: https://fetch.spec.whatwg.org/#concept-method
4298
+ init.method = formMethod.toUpperCase();
4299
+ if (formEncType === "application/json") {
4300
+ init.headers = new Headers({
4301
+ "Content-Type": formEncType
4302
+ });
4303
+ init.body = JSON.stringify(submission.json);
4304
+ } else if (formEncType === "text/plain") {
4305
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4306
+ init.body = submission.text;
4307
+ } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) {
4308
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4309
+ init.body = convertFormDataToSearchParams(submission.formData);
4310
+ } else {
4311
+ // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4312
+ init.body = submission.formData;
4313
+ }
4314
+ }
4315
+ return new Request(url, init);
4316
+ }
4317
+ function convertFormDataToSearchParams(formData) {
4318
+ let searchParams = new URLSearchParams();
4319
+ for (let [key, value] of formData.entries()) {
4320
+ // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
4321
+ searchParams.append(key, typeof value === "string" ? value : value.name);
4322
+ }
4323
+ return searchParams;
4324
+ }
4325
+ function convertSearchParamsToFormData(searchParams) {
4326
+ let formData = new FormData();
4327
+ for (let [key, value] of searchParams.entries()) {
4328
+ formData.append(key, value);
4329
+ }
4330
+ return formData;
4331
+ }
4332
+ function processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {
4333
+ // Fill in loaderData/errors from our loaders
4334
+ let loaderData = {};
4335
+ let errors = null;
4336
+ let statusCode;
4337
+ let foundError = false;
4338
+ let loaderHeaders = {};
4339
+
4340
+ // Process loader results into state.loaderData/state.errors
4341
+ results.forEach((result, index) => {
4342
+ let id = matchesToLoad[index].route.id;
4343
+ invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData");
4344
+ if (isErrorResult(result)) {
4345
+ // Look upwards from the matched route for the closest ancestor
4346
+ // error boundary, defaulting to the root match
4347
+ let boundaryMatch = findNearestBoundary(matches, id);
4348
+ let error = result.error;
4349
+ // If we have a pending action error, we report it at the highest-route
4350
+ // that throws a loader error, and then clear it out to indicate that
4351
+ // it was consumed
4352
+ if (pendingError) {
4353
+ error = Object.values(pendingError)[0];
4354
+ pendingError = undefined;
4355
+ }
4356
+ errors = errors || {};
4357
+
4358
+ // Prefer higher error values if lower errors bubble to the same boundary
4359
+ if (errors[boundaryMatch.route.id] == null) {
4360
+ errors[boundaryMatch.route.id] = error;
4361
+ }
4362
+
4363
+ // Clear our any prior loaderData for the throwing route
4364
+ loaderData[id] = undefined;
4365
+
4366
+ // Once we find our first (highest) error, we set the status code and
4367
+ // prevent deeper status codes from overriding
4368
+ if (!foundError) {
4369
+ foundError = true;
4370
+ statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;
4371
+ }
4372
+ if (result.headers) {
4373
+ loaderHeaders[id] = result.headers;
4374
+ }
4375
+ } else {
4376
+ if (isDeferredResult(result)) {
4377
+ activeDeferreds.set(id, result.deferredData);
4378
+ loaderData[id] = result.deferredData.data;
4379
+ } else {
4380
+ loaderData[id] = result.data;
4381
+ }
4382
+
4383
+ // Error status codes always override success status codes, but if all
4384
+ // loaders are successful we take the deepest status code.
4385
+ if (result.statusCode != null && result.statusCode !== 200 && !foundError) {
4386
+ statusCode = result.statusCode;
4387
+ }
4388
+ if (result.headers) {
4389
+ loaderHeaders[id] = result.headers;
4390
+ }
4391
+ }
4392
+ });
4393
+
4394
+ // If we didn't consume the pending action error (i.e., all loaders
4395
+ // resolved), then consume it here. Also clear out any loaderData for the
4396
+ // throwing route
4397
+ if (pendingError) {
4398
+ errors = pendingError;
4399
+ loaderData[Object.keys(pendingError)[0]] = undefined;
4400
+ }
4401
+ return {
4402
+ loaderData,
4403
+ errors,
4404
+ statusCode: statusCode || 200,
4405
+ loaderHeaders
4406
+ };
4407
+ }
4408
+ function processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {
4409
+ let {
4410
+ loaderData,
4411
+ errors
4412
+ } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds);
4413
+
4414
+ // Process results from our revalidating fetchers
4415
+ for (let index = 0; index < revalidatingFetchers.length; index++) {
4416
+ let {
4417
+ key,
4418
+ match,
4419
+ controller
4420
+ } = revalidatingFetchers[index];
4421
+ invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result");
4422
+ let result = fetcherResults[index];
4423
+
4424
+ // Process fetcher non-redirect errors
4425
+ if (controller && controller.signal.aborted) {
4426
+ // Nothing to do for aborted fetchers
4427
+ continue;
4428
+ } else if (isErrorResult(result)) {
4429
+ let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
4430
+ if (!(errors && errors[boundaryMatch.route.id])) {
4431
+ errors = _extends({}, errors, {
4432
+ [boundaryMatch.route.id]: result.error
4433
+ });
4434
+ }
4435
+ state.fetchers.delete(key);
4436
+ } else if (isRedirectResult(result)) {
4437
+ // Should never get here, redirects should get processed above, but we
4438
+ // keep this to type narrow to a success result in the else
4439
+ invariant(false, "Unhandled fetcher revalidation redirect");
4440
+ } else if (isDeferredResult(result)) {
4441
+ // Should never get here, deferred data should be awaited for fetchers
4442
+ // in resolveDeferredResults
4443
+ invariant(false, "Unhandled fetcher deferred data");
4444
+ } else {
4445
+ let doneFetcher = getDoneFetcher(result.data);
4446
+ state.fetchers.set(key, doneFetcher);
4447
+ }
4448
+ }
4449
+ return {
4450
+ loaderData,
4451
+ errors
4452
+ };
4453
+ }
4454
+ function mergeLoaderData(loaderData, newLoaderData, matches, errors) {
4455
+ let mergedLoaderData = _extends({}, newLoaderData);
4456
+ for (let match of matches) {
4457
+ let id = match.route.id;
4458
+ if (newLoaderData.hasOwnProperty(id)) {
4459
+ if (newLoaderData[id] !== undefined) {
4460
+ mergedLoaderData[id] = newLoaderData[id];
4461
+ }
4462
+ } else if (loaderData[id] !== undefined && match.route.loader) {
4463
+ // Preserve existing keys not included in newLoaderData and where a loader
4464
+ // wasn't removed by HMR
4465
+ mergedLoaderData[id] = loaderData[id];
4466
+ }
4467
+ if (errors && errors.hasOwnProperty(id)) {
4468
+ // Don't keep any loader data below the boundary
4469
+ break;
4470
+ }
4471
+ }
4472
+ return mergedLoaderData;
4473
+ }
4474
+
4475
+ // Find the nearest error boundary, looking upwards from the leaf route (or the
4476
+ // route specified by routeId) for the closest ancestor error boundary,
4477
+ // defaulting to the root match
4478
+ function findNearestBoundary(matches, routeId) {
4479
+ let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];
4480
+ return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];
4481
+ }
4482
+ function getShortCircuitMatches(routes) {
4483
+ // Prefer a root layout route if present, otherwise shim in a route object
4484
+ let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || {
4485
+ id: "__shim-error-route__"
4486
+ };
4487
+ return {
4488
+ matches: [{
4489
+ params: {},
4490
+ pathname: "",
4491
+ pathnameBase: "",
4492
+ route
4493
+ }],
4494
+ route
4495
+ };
4496
+ }
4497
+ function getInternalRouterError(status, _temp5) {
4498
+ let {
4499
+ pathname,
4500
+ routeId,
4501
+ method,
4502
+ type
4503
+ } = _temp5 === void 0 ? {} : _temp5;
4504
+ let statusText = "Unknown Server Error";
4505
+ let errorMessage = "Unknown @remix-run/router error";
4506
+ if (status === 400) {
4507
+ statusText = "Bad Request";
4508
+ if (method && pathname && routeId) {
4509
+ errorMessage = "You made a " + method + " request to \"" + pathname + "\" but " + ("did not provide a `loader` for route \"" + routeId + "\", ") + "so there is no way to handle the request.";
4510
+ } else if (type === "defer-action") {
4511
+ errorMessage = "defer() is not supported in actions";
4512
+ } else if (type === "invalid-body") {
4513
+ errorMessage = "Unable to encode submission body";
4514
+ }
4515
+ } else if (status === 403) {
4516
+ statusText = "Forbidden";
4517
+ errorMessage = "Route \"" + routeId + "\" does not match URL \"" + pathname + "\"";
4518
+ } else if (status === 404) {
4519
+ statusText = "Not Found";
4520
+ errorMessage = "No route matches URL \"" + pathname + "\"";
4521
+ } else if (status === 405) {
4522
+ statusText = "Method Not Allowed";
4523
+ if (method && pathname && routeId) {
4524
+ errorMessage = "You made a " + method.toUpperCase() + " request to \"" + pathname + "\" but " + ("did not provide an `action` for route \"" + routeId + "\", ") + "so there is no way to handle the request.";
4525
+ } else if (method) {
4526
+ errorMessage = "Invalid request method \"" + method.toUpperCase() + "\"";
4527
+ }
4528
+ }
4529
+ return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);
4530
+ }
4531
+
4532
+ // Find any returned redirect errors, starting from the lowest match
4533
+ function findRedirect(results) {
4534
+ for (let i = results.length - 1; i >= 0; i--) {
4535
+ let result = results[i];
4536
+ if (isRedirectResult(result)) {
4537
+ return {
4538
+ result,
4539
+ idx: i
4540
+ };
4541
+ }
4542
+ }
4543
+ }
4544
+ function stripHashFromPath(path) {
4545
+ let parsedPath = typeof path === "string" ? parsePath(path) : path;
4546
+ return createPath(_extends({}, parsedPath, {
4547
+ hash: ""
4548
+ }));
4549
+ }
4550
+ function isHashChangeOnly(a, b) {
4551
+ if (a.pathname !== b.pathname || a.search !== b.search) {
4552
+ return false;
4553
+ }
4554
+ if (a.hash === "") {
4555
+ // /page -> /page#hash
4556
+ return b.hash !== "";
4557
+ } else if (a.hash === b.hash) {
4558
+ // /page#hash -> /page#hash
4559
+ return true;
4560
+ } else if (b.hash !== "") {
4561
+ // /page#hash -> /page#other
4562
+ return true;
4563
+ }
4564
+
4565
+ // If the hash is removed the browser will re-perform a request to the server
4566
+ // /page#hash -> /page
4567
+ return false;
4568
+ }
4569
+ function isDeferredResult(result) {
4570
+ return result.type === ResultType.deferred;
4571
+ }
4572
+ function isErrorResult(result) {
4573
+ return result.type === ResultType.error;
4574
+ }
4575
+ function isRedirectResult(result) {
4576
+ return (result && result.type) === ResultType.redirect;
4577
+ }
4578
+ function isDeferredData(value) {
4579
+ let deferred = value;
4580
+ return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";
4581
+ }
4582
+ function isResponse(value) {
4583
+ return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";
4584
+ }
4585
+ function isRedirectResponse(result) {
4586
+ if (!isResponse(result)) {
4587
+ return false;
4588
+ }
4589
+ let status = result.status;
4590
+ let location = result.headers.get("Location");
4591
+ return status >= 300 && status <= 399 && location != null;
4592
+ }
4593
+ function isQueryRouteResponse(obj) {
4594
+ return obj && isResponse(obj.response) && (obj.type === ResultType.data || obj.type === ResultType.error);
4595
+ }
4596
+ function isValidMethod(method) {
4597
+ return validRequestMethods.has(method.toLowerCase());
4598
+ }
4599
+ function isMutationMethod(method) {
4600
+ return validMutationMethods.has(method.toLowerCase());
4601
+ }
4602
+ async function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {
4603
+ for (let index = 0; index < results.length; index++) {
4604
+ let result = results[index];
4605
+ let match = matchesToLoad[index];
4606
+ // If we don't have a match, then we can have a deferred result to do
4607
+ // anything with. This is for revalidating fetchers where the route was
4608
+ // removed during HMR
4609
+ if (!match) {
4610
+ continue;
4611
+ }
4612
+ let currentMatch = currentMatches.find(m => m.route.id === match.route.id);
4613
+ let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;
4614
+ if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {
4615
+ // Note: we do not have to touch activeDeferreds here since we race them
4616
+ // against the signal in resolveDeferredData and they'll get aborted
4617
+ // there if needed
4618
+ let signal = signals[index];
4619
+ invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result");
4620
+ await resolveDeferredData(result, signal, isFetcher).then(result => {
4621
+ if (result) {
4622
+ results[index] = result || results[index];
4623
+ }
4624
+ });
4625
+ }
4626
+ }
4627
+ }
4628
+ async function resolveDeferredData(result, signal, unwrap) {
4629
+ if (unwrap === void 0) {
4630
+ unwrap = false;
4631
+ }
4632
+ let aborted = await result.deferredData.resolveData(signal);
4633
+ if (aborted) {
4634
+ return;
4635
+ }
4636
+ if (unwrap) {
4637
+ try {
4638
+ return {
4639
+ type: ResultType.data,
4640
+ data: result.deferredData.unwrappedData
4641
+ };
4642
+ } catch (e) {
4643
+ // Handle any TrackedPromise._error values encountered while unwrapping
4644
+ return {
4645
+ type: ResultType.error,
4646
+ error: e
4647
+ };
4648
+ }
4649
+ }
4650
+ return {
4651
+ type: ResultType.data,
4652
+ data: result.deferredData.data
4653
+ };
4654
+ }
4655
+ function hasNakedIndexQuery(search) {
4656
+ return new URLSearchParams(search).getAll("index").some(v => v === "");
4657
+ }
4658
+ function getTargetMatch(matches, location) {
4659
+ let search = typeof location === "string" ? parsePath(location).search : location.search;
4660
+ if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) {
4661
+ // Return the leaf index route when index is present
4662
+ return matches[matches.length - 1];
4663
+ }
4664
+ // Otherwise grab the deepest "path contributing" match (ignoring index and
4665
+ // pathless layout routes)
4666
+ let pathMatches = getPathContributingMatches(matches);
4667
+ return pathMatches[pathMatches.length - 1];
4668
+ }
4669
+ function getSubmissionFromNavigation(navigation) {
4670
+ let {
4671
+ formMethod,
4672
+ formAction,
4673
+ formEncType,
4674
+ text,
4675
+ formData,
4676
+ json
4677
+ } = navigation;
4678
+ if (!formMethod || !formAction || !formEncType) {
4679
+ return;
4680
+ }
4681
+ if (text != null) {
4682
+ return {
4683
+ formMethod,
4684
+ formAction,
4685
+ formEncType,
4686
+ formData: undefined,
4687
+ json: undefined,
4688
+ text
4689
+ };
4690
+ } else if (formData != null) {
4691
+ return {
4692
+ formMethod,
4693
+ formAction,
4694
+ formEncType,
4695
+ formData,
4696
+ json: undefined,
4697
+ text: undefined
4698
+ };
4699
+ } else if (json !== undefined) {
4700
+ return {
4701
+ formMethod,
4702
+ formAction,
4703
+ formEncType,
4704
+ formData: undefined,
4705
+ json,
4706
+ text: undefined
4707
+ };
4708
+ }
4709
+ }
4710
+ function getLoadingNavigation(location, submission) {
4711
+ if (submission) {
4712
+ let navigation = {
4713
+ state: "loading",
4714
+ location,
4715
+ formMethod: submission.formMethod,
4716
+ formAction: submission.formAction,
4717
+ formEncType: submission.formEncType,
4718
+ formData: submission.formData,
4719
+ json: submission.json,
4720
+ text: submission.text
4721
+ };
4722
+ return navigation;
4723
+ } else {
4724
+ let navigation = {
4725
+ state: "loading",
4726
+ location,
4727
+ formMethod: undefined,
4728
+ formAction: undefined,
4729
+ formEncType: undefined,
4730
+ formData: undefined,
4731
+ json: undefined,
4732
+ text: undefined
4733
+ };
4734
+ return navigation;
4735
+ }
4736
+ }
4737
+ function getSubmittingNavigation(location, submission) {
4738
+ let navigation = {
4739
+ state: "submitting",
4740
+ location,
4741
+ formMethod: submission.formMethod,
4742
+ formAction: submission.formAction,
4743
+ formEncType: submission.formEncType,
4744
+ formData: submission.formData,
4745
+ json: submission.json,
4746
+ text: submission.text
4747
+ };
4748
+ return navigation;
4749
+ }
4750
+ function getLoadingFetcher(submission, data) {
4751
+ if (submission) {
4752
+ let fetcher = {
4753
+ state: "loading",
4754
+ formMethod: submission.formMethod,
4755
+ formAction: submission.formAction,
4756
+ formEncType: submission.formEncType,
4757
+ formData: submission.formData,
4758
+ json: submission.json,
4759
+ text: submission.text,
4760
+ data
4761
+ };
4762
+ return fetcher;
4763
+ } else {
4764
+ let fetcher = {
4765
+ state: "loading",
4766
+ formMethod: undefined,
4767
+ formAction: undefined,
4768
+ formEncType: undefined,
4769
+ formData: undefined,
4770
+ json: undefined,
4771
+ text: undefined,
4772
+ data
4773
+ };
4774
+ return fetcher;
4775
+ }
4776
+ }
4777
+ function getSubmittingFetcher(submission, existingFetcher) {
4778
+ let fetcher = {
4779
+ state: "submitting",
4780
+ formMethod: submission.formMethod,
4781
+ formAction: submission.formAction,
4782
+ formEncType: submission.formEncType,
4783
+ formData: submission.formData,
4784
+ json: submission.json,
4785
+ text: submission.text,
4786
+ data: existingFetcher ? existingFetcher.data : undefined
4787
+ };
4788
+ return fetcher;
4789
+ }
4790
+ function getDoneFetcher(data) {
4791
+ let fetcher = {
4792
+ state: "idle",
4793
+ formMethod: undefined,
4794
+ formAction: undefined,
4795
+ formEncType: undefined,
4796
+ formData: undefined,
4797
+ json: undefined,
4798
+ text: undefined,
4799
+ data
4800
+ };
4801
+ return fetcher;
4802
+ }
4803
+ function restoreAppliedTransitions(_window, transitions) {
4804
+ try {
4805
+ let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);
4806
+ if (sessionPositions) {
4807
+ let json = JSON.parse(sessionPositions);
4808
+ for (let [k, v] of Object.entries(json || {})) {
4809
+ if (v && Array.isArray(v)) {
4810
+ transitions.set(k, new Set(v || []));
4811
+ }
4812
+ }
4813
+ }
4814
+ } catch (e) {
4815
+ // no-op, use default empty object
4816
+ }
4817
+ }
4818
+ function persistAppliedTransitions(_window, transitions) {
4819
+ if (transitions.size > 0) {
4820
+ let json = {};
4821
+ for (let [k, v] of transitions) {
4822
+ json[k] = [...v];
4823
+ }
4824
+ try {
4825
+ _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));
4826
+ } catch (error) {
4827
+ warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ").");
4828
+ }
4829
+ }
4830
+ }
4831
+
4832
+ //#endregion
4833
+
4834
+ exports.AbortedDeferredError = AbortedDeferredError;
4835
+ exports.Action = Action;
4836
+ exports.IDLE_BLOCKER = IDLE_BLOCKER;
4837
+ exports.IDLE_FETCHER = IDLE_FETCHER;
4838
+ exports.IDLE_NAVIGATION = IDLE_NAVIGATION;
4839
+ exports.UNSAFE_DEFERRED_SYMBOL = UNSAFE_DEFERRED_SYMBOL;
4840
+ exports.UNSAFE_DeferredData = DeferredData;
4841
+ exports.UNSAFE_ErrorResponseImpl = ErrorResponseImpl;
4842
+ exports.UNSAFE_convertRouteMatchToUiMatch = convertRouteMatchToUiMatch;
4843
+ exports.UNSAFE_convertRoutesToDataRoutes = convertRoutesToDataRoutes;
4844
+ exports.UNSAFE_getResolveToMatches = getResolveToMatches;
4845
+ exports.UNSAFE_invariant = invariant;
4846
+ exports.UNSAFE_warning = warning;
4847
+ exports.createBrowserHistory = createBrowserHistory;
4848
+ exports.createHashHistory = createHashHistory;
4849
+ exports.createMemoryHistory = createMemoryHistory;
4850
+ exports.createPath = createPath;
4851
+ exports.createRouter = createRouter;
4852
+ exports.createStaticHandler = createStaticHandler;
4853
+ exports.defer = defer;
4854
+ exports.generatePath = generatePath;
4855
+ exports.getStaticContextFromError = getStaticContextFromError;
4856
+ exports.getToPathname = getToPathname;
4857
+ exports.isDeferredData = isDeferredData;
4858
+ exports.isRouteErrorResponse = isRouteErrorResponse;
4859
+ exports.joinPaths = joinPaths;
4860
+ exports.json = json;
4861
+ exports.matchPath = matchPath;
4862
+ exports.matchRoutes = matchRoutes;
4863
+ exports.normalizePathname = normalizePathname;
4864
+ exports.parsePath = parsePath;
4865
+ exports.redirect = redirect;
4866
+ exports.redirectDocument = redirectDocument;
4867
+ exports.resolvePath = resolvePath;
4868
+ exports.resolveTo = resolveTo;
4869
+ exports.stripBasename = stripBasename;
4870
+ //# sourceMappingURL=router.cjs.js.map