@epic-web/workshop-app 5.0.3 → 5.1.1

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 (1978) hide show
  1. package/build/client/assets/app.epic_ws_.js_-l0sNRNKZ.js +2 -0
  2. package/build/client/assets/app.epic_ws_.js_-l0sNRNKZ.js.map +1 -0
  3. package/build/client/assets/manifest-b22910a7.js +1 -0
  4. package/build/server/index.js +265 -2484
  5. package/build/server/index.js.map +1 -1
  6. package/package.json +3 -25
  7. package/build/client/assets/manifest-d7c89645.js +0 -1
  8. package/node_modules/@babel/runtime/LICENSE +0 -22
  9. package/node_modules/@babel/runtime/README.md +0 -19
  10. package/node_modules/@babel/runtime/helpers/AwaitValue.js +0 -4
  11. package/node_modules/@babel/runtime/helpers/OverloadYield.js +0 -4
  12. package/node_modules/@babel/runtime/helpers/applyDecoratedDescriptor.js +0 -9
  13. package/node_modules/@babel/runtime/helpers/applyDecs.js +0 -236
  14. package/node_modules/@babel/runtime/helpers/applyDecs2203.js +0 -184
  15. package/node_modules/@babel/runtime/helpers/applyDecs2203R.js +0 -191
  16. package/node_modules/@babel/runtime/helpers/applyDecs2301.js +0 -222
  17. package/node_modules/@babel/runtime/helpers/applyDecs2305.js +0 -133
  18. package/node_modules/@babel/runtime/helpers/applyDecs2311.js +0 -124
  19. package/node_modules/@babel/runtime/helpers/arrayLikeToArray.js +0 -6
  20. package/node_modules/@babel/runtime/helpers/arrayWithHoles.js +0 -4
  21. package/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js +0 -5
  22. package/node_modules/@babel/runtime/helpers/assertClassBrand.js +0 -5
  23. package/node_modules/@babel/runtime/helpers/assertThisInitialized.js +0 -5
  24. package/node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js +0 -24
  25. package/node_modules/@babel/runtime/helpers/asyncIterator.js +0 -45
  26. package/node_modules/@babel/runtime/helpers/asyncToGenerator.js +0 -26
  27. package/node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js +0 -5
  28. package/node_modules/@babel/runtime/helpers/callSuper.js +0 -7
  29. package/node_modules/@babel/runtime/helpers/checkInRHS.js +0 -6
  30. package/node_modules/@babel/runtime/helpers/checkPrivateRedeclaration.js +0 -4
  31. package/node_modules/@babel/runtime/helpers/classApplyDescriptorDestructureSet.js +0 -10
  32. package/node_modules/@babel/runtime/helpers/classApplyDescriptorGet.js +0 -4
  33. package/node_modules/@babel/runtime/helpers/classApplyDescriptorSet.js +0 -7
  34. package/node_modules/@babel/runtime/helpers/classCallCheck.js +0 -4
  35. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticAccess.js +0 -5
  36. package/node_modules/@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +0 -4
  37. package/node_modules/@babel/runtime/helpers/classExtractFieldDescriptor.js +0 -5
  38. package/node_modules/@babel/runtime/helpers/classNameTDZError.js +0 -4
  39. package/node_modules/@babel/runtime/helpers/classPrivateFieldDestructureSet.js +0 -7
  40. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet.js +0 -7
  41. package/node_modules/@babel/runtime/helpers/classPrivateFieldGet2.js +0 -5
  42. package/node_modules/@babel/runtime/helpers/classPrivateFieldInitSpec.js +0 -5
  43. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseBase.js +0 -5
  44. package/node_modules/@babel/runtime/helpers/classPrivateFieldLooseKey.js +0 -5
  45. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet.js +0 -7
  46. package/node_modules/@babel/runtime/helpers/classPrivateFieldSet2.js +0 -5
  47. package/node_modules/@babel/runtime/helpers/classPrivateGetter.js +0 -5
  48. package/node_modules/@babel/runtime/helpers/classPrivateMethodGet.js +0 -5
  49. package/node_modules/@babel/runtime/helpers/classPrivateMethodInitSpec.js +0 -5
  50. package/node_modules/@babel/runtime/helpers/classPrivateMethodSet.js +0 -4
  51. package/node_modules/@babel/runtime/helpers/classPrivateSetter.js +0 -5
  52. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldDestructureSet.js +0 -7
  53. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecGet.js +0 -7
  54. package/node_modules/@babel/runtime/helpers/classStaticPrivateFieldSpecSet.js +0 -7
  55. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodGet.js +0 -5
  56. package/node_modules/@babel/runtime/helpers/classStaticPrivateMethodSet.js +0 -4
  57. package/node_modules/@babel/runtime/helpers/construct.js +0 -10
  58. package/node_modules/@babel/runtime/helpers/createClass.js +0 -13
  59. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js +0 -50
  60. package/node_modules/@babel/runtime/helpers/createForOfIteratorHelperLoose.js +0 -19
  61. package/node_modules/@babel/runtime/helpers/createSuper.js +0 -16
  62. package/node_modules/@babel/runtime/helpers/decorate.js +0 -250
  63. package/node_modules/@babel/runtime/helpers/defaults.js +0 -9
  64. package/node_modules/@babel/runtime/helpers/defineAccessor.js +0 -8
  65. package/node_modules/@babel/runtime/helpers/defineEnumerableProperties.js +0 -12
  66. package/node_modules/@babel/runtime/helpers/defineProperty.js +0 -10
  67. package/node_modules/@babel/runtime/helpers/dispose.js +0 -28
  68. package/node_modules/@babel/runtime/helpers/esm/AwaitValue.js +0 -4
  69. package/node_modules/@babel/runtime/helpers/esm/OverloadYield.js +0 -4
  70. package/node_modules/@babel/runtime/helpers/esm/applyDecoratedDescriptor.js +0 -9
  71. package/node_modules/@babel/runtime/helpers/esm/applyDecs.js +0 -236
  72. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203.js +0 -184
  73. package/node_modules/@babel/runtime/helpers/esm/applyDecs2203R.js +0 -191
  74. package/node_modules/@babel/runtime/helpers/esm/applyDecs2301.js +0 -222
  75. package/node_modules/@babel/runtime/helpers/esm/applyDecs2305.js +0 -133
  76. package/node_modules/@babel/runtime/helpers/esm/applyDecs2311.js +0 -124
  77. package/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +0 -6
  78. package/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +0 -4
  79. package/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +0 -5
  80. package/node_modules/@babel/runtime/helpers/esm/assertClassBrand.js +0 -5
  81. package/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -5
  82. package/node_modules/@babel/runtime/helpers/esm/asyncGeneratorDelegate.js +0 -24
  83. package/node_modules/@babel/runtime/helpers/esm/asyncIterator.js +0 -45
  84. package/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +0 -26
  85. package/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js +0 -5
  86. package/node_modules/@babel/runtime/helpers/esm/callSuper.js +0 -7
  87. package/node_modules/@babel/runtime/helpers/esm/checkInRHS.js +0 -6
  88. package/node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js +0 -4
  89. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorDestructureSet.js +0 -10
  90. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js +0 -4
  91. package/node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js +0 -7
  92. package/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +0 -4
  93. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticAccess.js +0 -5
  94. package/node_modules/@babel/runtime/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +0 -4
  95. package/node_modules/@babel/runtime/helpers/esm/classExtractFieldDescriptor.js +0 -5
  96. package/node_modules/@babel/runtime/helpers/esm/classNameTDZError.js +0 -4
  97. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldDestructureSet.js +0 -7
  98. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js +0 -7
  99. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js +0 -5
  100. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js +0 -5
  101. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseBase.js +0 -5
  102. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldLooseKey.js +0 -5
  103. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js +0 -7
  104. package/node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js +0 -5
  105. package/node_modules/@babel/runtime/helpers/esm/classPrivateGetter.js +0 -5
  106. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodGet.js +0 -5
  107. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodInitSpec.js +0 -5
  108. package/node_modules/@babel/runtime/helpers/esm/classPrivateMethodSet.js +0 -4
  109. package/node_modules/@babel/runtime/helpers/esm/classPrivateSetter.js +0 -5
  110. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldDestructureSet.js +0 -7
  111. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecGet.js +0 -7
  112. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateFieldSpecSet.js +0 -7
  113. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodGet.js +0 -5
  114. package/node_modules/@babel/runtime/helpers/esm/classStaticPrivateMethodSet.js +0 -4
  115. package/node_modules/@babel/runtime/helpers/esm/construct.js +0 -10
  116. package/node_modules/@babel/runtime/helpers/esm/createClass.js +0 -13
  117. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js +0 -50
  118. package/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js +0 -19
  119. package/node_modules/@babel/runtime/helpers/esm/createSuper.js +0 -16
  120. package/node_modules/@babel/runtime/helpers/esm/decorate.js +0 -250
  121. package/node_modules/@babel/runtime/helpers/esm/defaults.js +0 -9
  122. package/node_modules/@babel/runtime/helpers/esm/defineAccessor.js +0 -8
  123. package/node_modules/@babel/runtime/helpers/esm/defineEnumerableProperties.js +0 -12
  124. package/node_modules/@babel/runtime/helpers/esm/defineProperty.js +0 -10
  125. package/node_modules/@babel/runtime/helpers/esm/dispose.js +0 -28
  126. package/node_modules/@babel/runtime/helpers/esm/extends.js +0 -10
  127. package/node_modules/@babel/runtime/helpers/esm/get.js +0 -11
  128. package/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -6
  129. package/node_modules/@babel/runtime/helpers/esm/identity.js +0 -4
  130. package/node_modules/@babel/runtime/helpers/esm/importDeferProxy.js +0 -27
  131. package/node_modules/@babel/runtime/helpers/esm/inherits.js +0 -14
  132. package/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -5
  133. package/node_modules/@babel/runtime/helpers/esm/initializerDefineProperty.js +0 -9
  134. package/node_modules/@babel/runtime/helpers/esm/initializerWarningHelper.js +0 -4
  135. package/node_modules/@babel/runtime/helpers/esm/instanceof.js +0 -4
  136. package/node_modules/@babel/runtime/helpers/esm/interopRequireDefault.js +0 -6
  137. package/node_modules/@babel/runtime/helpers/esm/interopRequireWildcard.js +0 -27
  138. package/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -8
  139. package/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -9
  140. package/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +0 -4
  141. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +0 -28
  142. package/node_modules/@babel/runtime/helpers/esm/jsx.js +0 -22
  143. package/node_modules/@babel/runtime/helpers/esm/maybeArrayLike.js +0 -9
  144. package/node_modules/@babel/runtime/helpers/esm/newArrowCheck.js +0 -4
  145. package/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +0 -4
  146. package/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +0 -4
  147. package/node_modules/@babel/runtime/helpers/esm/nullishReceiverError.js +0 -4
  148. package/node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js +0 -4
  149. package/node_modules/@babel/runtime/helpers/esm/objectSpread.js +0 -14
  150. package/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +0 -23
  151. package/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +0 -13
  152. package/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -10
  153. package/node_modules/@babel/runtime/helpers/esm/package.json +0 -3
  154. package/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js +0 -8
  155. package/node_modules/@babel/runtime/helpers/esm/readOnlyError.js +0 -4
  156. package/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js +0 -304
  157. package/node_modules/@babel/runtime/helpers/esm/set.js +0 -22
  158. package/node_modules/@babel/runtime/helpers/esm/setFunctionName.js +0 -12
  159. package/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -6
  160. package/node_modules/@babel/runtime/helpers/esm/skipFirstGeneratorNext.js +0 -7
  161. package/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +0 -8
  162. package/node_modules/@babel/runtime/helpers/esm/superPropBase.js +0 -6
  163. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js +0 -8
  164. package/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js +0 -4
  165. package/node_modules/@babel/runtime/helpers/esm/tdz.js +0 -4
  166. package/node_modules/@babel/runtime/helpers/esm/temporalRef.js +0 -6
  167. package/node_modules/@babel/runtime/helpers/esm/temporalUndefined.js +0 -2
  168. package/node_modules/@babel/runtime/helpers/esm/toArray.js +0 -8
  169. package/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +0 -8
  170. package/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +0 -12
  171. package/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +0 -7
  172. package/node_modules/@babel/runtime/helpers/esm/toSetter.js +0 -10
  173. package/node_modules/@babel/runtime/helpers/esm/typeof.js +0 -10
  174. package/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +0 -9
  175. package/node_modules/@babel/runtime/helpers/esm/using.js +0 -12
  176. package/node_modules/@babel/runtime/helpers/esm/usingCtx.js +0 -47
  177. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +0 -69
  178. package/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -27
  179. package/node_modules/@babel/runtime/helpers/esm/wrapRegExp.js +0 -51
  180. package/node_modules/@babel/runtime/helpers/esm/writeOnlyError.js +0 -4
  181. package/node_modules/@babel/runtime/helpers/extends.js +0 -10
  182. package/node_modules/@babel/runtime/helpers/get.js +0 -11
  183. package/node_modules/@babel/runtime/helpers/getPrototypeOf.js +0 -6
  184. package/node_modules/@babel/runtime/helpers/identity.js +0 -4
  185. package/node_modules/@babel/runtime/helpers/importDeferProxy.js +0 -27
  186. package/node_modules/@babel/runtime/helpers/inherits.js +0 -14
  187. package/node_modules/@babel/runtime/helpers/inheritsLoose.js +0 -5
  188. package/node_modules/@babel/runtime/helpers/initializerDefineProperty.js +0 -9
  189. package/node_modules/@babel/runtime/helpers/initializerWarningHelper.js +0 -4
  190. package/node_modules/@babel/runtime/helpers/instanceof.js +0 -4
  191. package/node_modules/@babel/runtime/helpers/interopRequireDefault.js +0 -6
  192. package/node_modules/@babel/runtime/helpers/interopRequireWildcard.js +0 -27
  193. package/node_modules/@babel/runtime/helpers/isNativeFunction.js +0 -8
  194. package/node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js +0 -9
  195. package/node_modules/@babel/runtime/helpers/iterableToArray.js +0 -4
  196. package/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js +0 -28
  197. package/node_modules/@babel/runtime/helpers/jsx.js +0 -22
  198. package/node_modules/@babel/runtime/helpers/maybeArrayLike.js +0 -9
  199. package/node_modules/@babel/runtime/helpers/newArrowCheck.js +0 -4
  200. package/node_modules/@babel/runtime/helpers/nonIterableRest.js +0 -4
  201. package/node_modules/@babel/runtime/helpers/nonIterableSpread.js +0 -4
  202. package/node_modules/@babel/runtime/helpers/nullishReceiverError.js +0 -4
  203. package/node_modules/@babel/runtime/helpers/objectDestructuringEmpty.js +0 -4
  204. package/node_modules/@babel/runtime/helpers/objectSpread.js +0 -14
  205. package/node_modules/@babel/runtime/helpers/objectSpread2.js +0 -23
  206. package/node_modules/@babel/runtime/helpers/objectWithoutProperties.js +0 -13
  207. package/node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js +0 -10
  208. package/node_modules/@babel/runtime/helpers/possibleConstructorReturn.js +0 -8
  209. package/node_modules/@babel/runtime/helpers/readOnlyError.js +0 -4
  210. package/node_modules/@babel/runtime/helpers/regeneratorRuntime.js +0 -304
  211. package/node_modules/@babel/runtime/helpers/set.js +0 -22
  212. package/node_modules/@babel/runtime/helpers/setFunctionName.js +0 -12
  213. package/node_modules/@babel/runtime/helpers/setPrototypeOf.js +0 -6
  214. package/node_modules/@babel/runtime/helpers/skipFirstGeneratorNext.js +0 -7
  215. package/node_modules/@babel/runtime/helpers/slicedToArray.js +0 -8
  216. package/node_modules/@babel/runtime/helpers/superPropBase.js +0 -6
  217. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteral.js +0 -8
  218. package/node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js +0 -4
  219. package/node_modules/@babel/runtime/helpers/tdz.js +0 -4
  220. package/node_modules/@babel/runtime/helpers/temporalRef.js +0 -6
  221. package/node_modules/@babel/runtime/helpers/temporalUndefined.js +0 -2
  222. package/node_modules/@babel/runtime/helpers/toArray.js +0 -8
  223. package/node_modules/@babel/runtime/helpers/toConsumableArray.js +0 -8
  224. package/node_modules/@babel/runtime/helpers/toPrimitive.js +0 -12
  225. package/node_modules/@babel/runtime/helpers/toPropertyKey.js +0 -7
  226. package/node_modules/@babel/runtime/helpers/toSetter.js +0 -10
  227. package/node_modules/@babel/runtime/helpers/typeof.js +0 -10
  228. package/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js +0 -9
  229. package/node_modules/@babel/runtime/helpers/using.js +0 -12
  230. package/node_modules/@babel/runtime/helpers/usingCtx.js +0 -47
  231. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +0 -69
  232. package/node_modules/@babel/runtime/helpers/wrapNativeSuper.js +0 -27
  233. package/node_modules/@babel/runtime/helpers/wrapRegExp.js +0 -51
  234. package/node_modules/@babel/runtime/helpers/writeOnlyError.js +0 -4
  235. package/node_modules/@babel/runtime/package.json +0 -1038
  236. package/node_modules/@babel/runtime/regenerator/index.js +0 -15
  237. package/node_modules/@conform-to/dom/LICENSE +0 -21
  238. package/node_modules/@conform-to/dom/README +0 -37
  239. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.js +0 -58
  240. package/node_modules/@conform-to/dom/_virtual/_rollupPluginBabelHelpers.mjs +0 -51
  241. package/node_modules/@conform-to/dom/dom.d.ts +0 -55
  242. package/node_modules/@conform-to/dom/dom.js +0 -104
  243. package/node_modules/@conform-to/dom/dom.mjs +0 -95
  244. package/node_modules/@conform-to/dom/form.d.ts +0 -246
  245. package/node_modules/@conform-to/dom/form.js +0 -582
  246. package/node_modules/@conform-to/dom/form.mjs +0 -578
  247. package/node_modules/@conform-to/dom/formdata.d.ts +0 -61
  248. package/node_modules/@conform-to/dom/formdata.js +0 -214
  249. package/node_modules/@conform-to/dom/formdata.mjs +0 -200
  250. package/node_modules/@conform-to/dom/index.d.ts +0 -26
  251. package/node_modules/@conform-to/dom/index.js +0 -20
  252. package/node_modules/@conform-to/dom/index.mjs +0 -4
  253. package/node_modules/@conform-to/dom/intent.d.ts +0 -114
  254. package/node_modules/@conform-to/dom/intent.js +0 -136
  255. package/node_modules/@conform-to/dom/intent.mjs +0 -126
  256. package/node_modules/@conform-to/dom/package.json +0 -59
  257. package/node_modules/@conform-to/dom/parse.d.ts +0 -50
  258. package/node_modules/@conform-to/dom/parse.js +0 -43
  259. package/node_modules/@conform-to/dom/parse.mjs +0 -37
  260. package/node_modules/@conform-to/dom/submission.d.ts +0 -135
  261. package/node_modules/@conform-to/dom/submission.js +0 -305
  262. package/node_modules/@conform-to/dom/submission.mjs +0 -288
  263. package/node_modules/@conform-to/dom/types.d.ts +0 -23
  264. package/node_modules/@conform-to/dom/util.d.ts +0 -6
  265. package/node_modules/@conform-to/dom/util.js +0 -19
  266. package/node_modules/@conform-to/dom/util.mjs +0 -13
  267. package/node_modules/@conform-to/react/LICENSE +0 -21
  268. package/node_modules/@conform-to/react/README +0 -37
  269. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.js +0 -87
  270. package/node_modules/@conform-to/react/_virtual/_rollupPluginBabelHelpers.mjs +0 -78
  271. package/node_modules/@conform-to/react/context.d.ts +0 -200
  272. package/node_modules/@conform-to/react/context.js +0 -256
  273. package/node_modules/@conform-to/react/context.mjs +0 -241
  274. package/node_modules/@conform-to/react/experimental.d.ts +0 -0
  275. package/node_modules/@conform-to/react/helpers.d.ts +0 -208
  276. package/node_modules/@conform-to/react/helpers.js +0 -222
  277. package/node_modules/@conform-to/react/helpers.mjs +0 -211
  278. package/node_modules/@conform-to/react/hooks.d.ts +0 -63
  279. package/node_modules/@conform-to/react/hooks.js +0 -88
  280. package/node_modules/@conform-to/react/hooks.mjs +0 -79
  281. package/node_modules/@conform-to/react/index.d.ts +0 -29
  282. package/node_modules/@conform-to/react/index.js +0 -30
  283. package/node_modules/@conform-to/react/index.mjs +0 -5
  284. package/node_modules/@conform-to/react/integrations.d.ts +0 -45
  285. package/node_modules/@conform-to/react/integrations.js +0 -298
  286. package/node_modules/@conform-to/react/integrations.mjs +0 -284
  287. package/node_modules/@conform-to/react/package.json +0 -69
  288. package/node_modules/@conform-to/zod/LICENSE +0 -21
  289. package/node_modules/@conform-to/zod/README +0 -37
  290. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.js +0 -58
  291. package/node_modules/@conform-to/zod/_virtual/_rollupPluginBabelHelpers.mjs +0 -51
  292. package/node_modules/@conform-to/zod/coercion.d.ts +0 -37
  293. package/node_modules/@conform-to/zod/coercion.js +0 -171
  294. package/node_modules/@conform-to/zod/coercion.mjs +0 -164
  295. package/node_modules/@conform-to/zod/constraint.d.ts +0 -5
  296. package/node_modules/@conform-to/zod/constraint.js +0 -103
  297. package/node_modules/@conform-to/zod/constraint.mjs +0 -99
  298. package/node_modules/@conform-to/zod/index.d.ts +0 -2
  299. package/node_modules/@conform-to/zod/index.js +0 -12
  300. package/node_modules/@conform-to/zod/index.mjs +0 -2
  301. package/node_modules/@conform-to/zod/package.json +0 -61
  302. package/node_modules/@conform-to/zod/parse.d.ts +0 -46
  303. package/node_modules/@conform-to/zod/parse.js +0 -64
  304. package/node_modules/@conform-to/zod/parse.mjs +0 -59
  305. package/node_modules/@epic-web/client-hints/README.md +0 -221
  306. package/node_modules/@epic-web/client-hints/dist/color-scheme.d.ts +0 -12
  307. package/node_modules/@epic-web/client-hints/dist/color-scheme.js +0 -25
  308. package/node_modules/@epic-web/client-hints/dist/index.d.ts +0 -6
  309. package/node_modules/@epic-web/client-hints/dist/index.js +0 -79
  310. package/node_modules/@epic-web/client-hints/dist/reduced-motion.d.ts +0 -12
  311. package/node_modules/@epic-web/client-hints/dist/reduced-motion.js +0 -25
  312. package/node_modules/@epic-web/client-hints/dist/time-zone.d.ts +0 -5
  313. package/node_modules/@epic-web/client-hints/dist/time-zone.js +0 -5
  314. package/node_modules/@epic-web/client-hints/dist/utils.d.ts +0 -9
  315. package/node_modules/@epic-web/client-hints/dist/utils.js +0 -1
  316. package/node_modules/@epic-web/client-hints/package.json +0 -71
  317. package/node_modules/@epic-web/restore-scroll/README.md +0 -108
  318. package/node_modules/@epic-web/restore-scroll/dist/index.d.ts +0 -7
  319. package/node_modules/@epic-web/restore-scroll/dist/index.js +0 -85
  320. package/node_modules/@epic-web/restore-scroll/package.json +0 -64
  321. package/node_modules/@floating-ui/core/LICENSE +0 -20
  322. package/node_modules/@floating-ui/core/README.md +0 -4
  323. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +0 -1
  324. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +0 -1164
  325. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +0 -521
  326. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +0 -521
  327. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +0 -1036
  328. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -1036
  329. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +0 -1183
  330. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +0 -1
  331. package/node_modules/@floating-ui/core/package.json +0 -63
  332. package/node_modules/@floating-ui/dom/LICENSE +0 -20
  333. package/node_modules/@floating-ui/dom/README.md +0 -4
  334. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +0 -1
  335. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +0 -853
  336. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +0 -356
  337. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +0 -356
  338. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +0 -704
  339. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -704
  340. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +0 -872
  341. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +0 -1
  342. package/node_modules/@floating-ui/dom/package.json +0 -71
  343. package/node_modules/@floating-ui/react-dom/LICENSE +0 -20
  344. package/node_modules/@floating-ui/react-dom/README.md +0 -3
  345. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.mts +0 -307
  346. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.ts +0 -307
  347. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +0 -363
  348. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +0 -363
  349. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.js +0 -414
  350. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.min.js +0 -1
  351. package/node_modules/@floating-ui/react-dom/package.json +0 -77
  352. package/node_modules/@floating-ui/utils/LICENSE +0 -20
  353. package/node_modules/@floating-ui/utils/README.md +0 -4
  354. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +0 -103
  355. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +0 -103
  356. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +0 -45
  357. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +0 -45
  358. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +0 -139
  359. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -139
  360. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +0 -165
  361. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +0 -1
  362. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +0 -138
  363. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -138
  364. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +0 -169
  365. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +0 -1
  366. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +0 -45
  367. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +0 -139
  368. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +0 -165
  369. package/node_modules/@floating-ui/utils/dom/package.json +0 -6
  370. package/node_modules/@floating-ui/utils/package.json +0 -70
  371. package/node_modules/@radix-ui/number/README.md +0 -13
  372. package/node_modules/@radix-ui/number/dist/index.d.mts +0 -3
  373. package/node_modules/@radix-ui/number/dist/index.d.ts +0 -3
  374. package/node_modules/@radix-ui/number/dist/index.js +0 -31
  375. package/node_modules/@radix-ui/number/dist/index.js.map +0 -7
  376. package/node_modules/@radix-ui/number/dist/index.mjs +0 -8
  377. package/node_modules/@radix-ui/number/dist/index.mjs.map +0 -7
  378. package/node_modules/@radix-ui/number/package.json +0 -38
  379. package/node_modules/@radix-ui/primitive/README.md +0 -13
  380. package/node_modules/@radix-ui/primitive/dist/index.d.mts +0 -5
  381. package/node_modules/@radix-ui/primitive/dist/index.d.ts +0 -5
  382. package/node_modules/@radix-ui/primitive/dist/index.js +0 -36
  383. package/node_modules/@radix-ui/primitive/dist/index.js.map +0 -7
  384. package/node_modules/@radix-ui/primitive/dist/index.mjs +0 -13
  385. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +0 -7
  386. package/node_modules/@radix-ui/primitive/package.json +0 -38
  387. package/node_modules/@radix-ui/react-accordion/README.md +0 -13
  388. package/node_modules/@radix-ui/react-accordion/dist/index.d.mts +0 -125
  389. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts +0 -125
  390. package/node_modules/@radix-ui/react-accordion/dist/index.js +0 -350
  391. package/node_modules/@radix-ui/react-accordion/dist/index.js.map +0 -7
  392. package/node_modules/@radix-ui/react-accordion/dist/index.mjs +0 -318
  393. package/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +0 -7
  394. package/node_modules/@radix-ui/react-accordion/package.json +0 -63
  395. package/node_modules/@radix-ui/react-arrow/README.md +0 -13
  396. package/node_modules/@radix-ui/react-arrow/dist/index.d.mts +0 -10
  397. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts +0 -10
  398. package/node_modules/@radix-ui/react-arrow/dist/index.js +0 -60
  399. package/node_modules/@radix-ui/react-arrow/dist/index.js.map +0 -7
  400. package/node_modules/@radix-ui/react-arrow/dist/index.mjs +0 -27
  401. package/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +0 -7
  402. package/node_modules/@radix-ui/react-arrow/package.json +0 -55
  403. package/node_modules/@radix-ui/react-collapsible/README.md +0 -13
  404. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +0 -43
  405. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +0 -43
  406. package/node_modules/@radix-ui/react-collapsible/dist/index.js +0 -186
  407. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +0 -7
  408. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +0 -154
  409. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +0 -7
  410. package/node_modules/@radix-ui/react-collapsible/package.json +0 -62
  411. package/node_modules/@radix-ui/react-collection/README.md +0 -13
  412. package/node_modules/@radix-ui/react-collection/dist/index.d.mts +0 -34
  413. package/node_modules/@radix-ui/react-collection/dist/index.d.ts +0 -34
  414. package/node_modules/@radix-ui/react-collection/dist/index.js +0 -104
  415. package/node_modules/@radix-ui/react-collection/dist/index.js.map +0 -7
  416. package/node_modules/@radix-ui/react-collection/dist/index.mjs +0 -72
  417. package/node_modules/@radix-ui/react-collection/dist/index.mjs.map +0 -7
  418. package/node_modules/@radix-ui/react-collection/package.json +0 -58
  419. package/node_modules/@radix-ui/react-compose-refs/README.md +0 -13
  420. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +0 -15
  421. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +0 -15
  422. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -53
  423. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +0 -7
  424. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +0 -20
  425. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +0 -7
  426. package/node_modules/@radix-ui/react-compose-refs/package.json +0 -47
  427. package/node_modules/@radix-ui/react-context/README.md +0 -13
  428. package/node_modules/@radix-ui/react-context/dist/index.d.mts +0 -28
  429. package/node_modules/@radix-ui/react-context/dist/index.d.ts +0 -28
  430. package/node_modules/@radix-ui/react-context/dist/index.js +0 -114
  431. package/node_modules/@radix-ui/react-context/dist/index.js.map +0 -7
  432. package/node_modules/@radix-ui/react-context/dist/index.mjs +0 -81
  433. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +0 -7
  434. package/node_modules/@radix-ui/react-context/package.json +0 -47
  435. package/node_modules/@radix-ui/react-direction/README.md +0 -13
  436. package/node_modules/@radix-ui/react-direction/dist/index.d.mts +0 -12
  437. package/node_modules/@radix-ui/react-direction/dist/index.d.ts +0 -12
  438. package/node_modules/@radix-ui/react-direction/dist/index.js +0 -52
  439. package/node_modules/@radix-ui/react-direction/dist/index.js.map +0 -7
  440. package/node_modules/@radix-ui/react-direction/dist/index.mjs +0 -19
  441. package/node_modules/@radix-ui/react-direction/dist/index.mjs.map +0 -7
  442. package/node_modules/@radix-ui/react-direction/package.json +0 -47
  443. package/node_modules/@radix-ui/react-dismissable-layer/README.md +0 -13
  444. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +0 -51
  445. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +0 -51
  446. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -253
  447. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +0 -7
  448. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +0 -221
  449. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +0 -7
  450. package/node_modules/@radix-ui/react-dismissable-layer/package.json +0 -62
  451. package/node_modules/@radix-ui/react-focus-guards/README.md +0 -13
  452. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +0 -9
  453. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +0 -9
  454. package/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -69
  455. package/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +0 -7
  456. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +0 -37
  457. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +0 -7
  458. package/node_modules/@radix-ui/react-focus-guards/package.json +0 -47
  459. package/node_modules/@radix-ui/react-focus-scope/README.md +0 -13
  460. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +0 -32
  461. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +0 -32
  462. package/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -246
  463. package/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +0 -7
  464. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +0 -214
  465. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +0 -7
  466. package/node_modules/@radix-ui/react-focus-scope/package.json +0 -57
  467. package/node_modules/@radix-ui/react-id/README.md +0 -13
  468. package/node_modules/@radix-ui/react-id/dist/index.d.mts +0 -3
  469. package/node_modules/@radix-ui/react-id/dist/index.d.ts +0 -3
  470. package/node_modules/@radix-ui/react-id/dist/index.js +0 -49
  471. package/node_modules/@radix-ui/react-id/dist/index.js.map +0 -7
  472. package/node_modules/@radix-ui/react-id/dist/index.mjs +0 -16
  473. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +0 -7
  474. package/node_modules/@radix-ui/react-id/package.json +0 -50
  475. package/node_modules/@radix-ui/react-popover/README.md +0 -13
  476. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +0 -95
  477. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +0 -95
  478. package/node_modules/@radix-ui/react-popover/dist/index.js +0 -350
  479. package/node_modules/@radix-ui/react-popover/dist/index.js.map +0 -7
  480. package/node_modules/@radix-ui/react-popover/dist/index.mjs +0 -318
  481. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +0 -7
  482. package/node_modules/@radix-ui/react-popover/package.json +0 -69
  483. package/node_modules/@radix-ui/react-popper/README.md +0 -13
  484. package/node_modules/@radix-ui/react-popper/dist/index.d.mts +0 -56
  485. package/node_modules/@radix-ui/react-popper/dist/index.d.ts +0 -56
  486. package/node_modules/@radix-ui/react-popper/dist/index.js +0 -325
  487. package/node_modules/@radix-ui/react-popper/dist/index.js.map +0 -7
  488. package/node_modules/@radix-ui/react-popper/dist/index.mjs +0 -303
  489. package/node_modules/@radix-ui/react-popper/dist/index.mjs.map +0 -7
  490. package/node_modules/@radix-ui/react-popper/package.json +0 -64
  491. package/node_modules/@radix-ui/react-portal/README.md +0 -13
  492. package/node_modules/@radix-ui/react-portal/dist/index.d.mts +0 -14
  493. package/node_modules/@radix-ui/react-portal/dist/index.d.ts +0 -14
  494. package/node_modules/@radix-ui/react-portal/dist/index.js +0 -55
  495. package/node_modules/@radix-ui/react-portal/dist/index.js.map +0 -7
  496. package/node_modules/@radix-ui/react-portal/dist/index.mjs +0 -23
  497. package/node_modules/@radix-ui/react-portal/dist/index.mjs.map +0 -7
  498. package/node_modules/@radix-ui/react-portal/package.json +0 -56
  499. package/node_modules/@radix-ui/react-presence/README.md +0 -13
  500. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +0 -11
  501. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +0 -11
  502. package/node_modules/@radix-ui/react-presence/dist/index.js +0 -158
  503. package/node_modules/@radix-ui/react-presence/dist/index.js.map +0 -7
  504. package/node_modules/@radix-ui/react-presence/dist/index.mjs +0 -126
  505. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +0 -7
  506. package/node_modules/@radix-ui/react-presence/package.json +0 -56
  507. package/node_modules/@radix-ui/react-primitive/README.md +0 -13
  508. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +0 -52
  509. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +0 -52
  510. package/node_modules/@radix-ui/react-primitive/dist/index.js +0 -78
  511. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +0 -7
  512. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +0 -45
  513. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +0 -7
  514. package/node_modules/@radix-ui/react-primitive/package.json +0 -58
  515. package/node_modules/@radix-ui/react-roving-focus/README.md +0 -13
  516. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts +0 -55
  517. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts +0 -55
  518. package/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -260
  519. package/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +0 -7
  520. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +0 -228
  521. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +0 -7
  522. package/node_modules/@radix-ui/react-roving-focus/package.json +0 -63
  523. package/node_modules/@radix-ui/react-select/README.md +0 -13
  524. package/node_modules/@radix-ui/react-select/dist/index.d.mts +0 -144
  525. package/node_modules/@radix-ui/react-select/dist/index.d.ts +0 -144
  526. package/node_modules/@radix-ui/react-select/dist/index.js +0 -1182
  527. package/node_modules/@radix-ui/react-select/dist/index.js.map +0 -7
  528. package/node_modules/@radix-ui/react-select/dist/index.mjs +0 -1150
  529. package/node_modules/@radix-ui/react-select/dist/index.mjs.map +0 -7
  530. package/node_modules/@radix-ui/react-select/package.json +0 -75
  531. package/node_modules/@radix-ui/react-slot/README.md +0 -13
  532. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +0 -13
  533. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +0 -13
  534. package/node_modules/@radix-ui/react-slot/dist/index.js +0 -118
  535. package/node_modules/@radix-ui/react-slot/dist/index.js.map +0 -7
  536. package/node_modules/@radix-ui/react-slot/dist/index.mjs +0 -85
  537. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +0 -7
  538. package/node_modules/@radix-ui/react-slot/package.json +0 -50
  539. package/node_modules/@radix-ui/react-tabs/README.md +0 -13
  540. package/node_modules/@radix-ui/react-tabs/dist/index.d.mts +0 -66
  541. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts +0 -66
  542. package/node_modules/@radix-ui/react-tabs/dist/index.js +0 -231
  543. package/node_modules/@radix-ui/react-tabs/dist/index.js.map +0 -7
  544. package/node_modules/@radix-ui/react-tabs/dist/index.mjs +0 -199
  545. package/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +0 -7
  546. package/node_modules/@radix-ui/react-tabs/package.json +0 -62
  547. package/node_modules/@radix-ui/react-toast/README.md +0 -13
  548. package/node_modules/@radix-ui/react-toast/dist/index.d.mts +0 -130
  549. package/node_modules/@radix-ui/react-toast/dist/index.d.ts +0 -130
  550. package/node_modules/@radix-ui/react-toast/dist/index.js +0 -681
  551. package/node_modules/@radix-ui/react-toast/dist/index.js.map +0 -7
  552. package/node_modules/@radix-ui/react-toast/dist/index.mjs +0 -649
  553. package/node_modules/@radix-ui/react-toast/dist/index.mjs.map +0 -7
  554. package/node_modules/@radix-ui/react-toast/package.json +0 -66
  555. package/node_modules/@radix-ui/react-use-callback-ref/README.md +0 -13
  556. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts +0 -7
  557. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts +0 -7
  558. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -46
  559. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +0 -7
  560. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +0 -13
  561. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +0 -7
  562. package/node_modules/@radix-ui/react-use-callback-ref/package.json +0 -47
  563. package/node_modules/@radix-ui/react-use-controllable-state/README.md +0 -13
  564. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +0 -10
  565. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +0 -10
  566. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -80
  567. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +0 -7
  568. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +0 -47
  569. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +0 -7
  570. package/node_modules/@radix-ui/react-use-controllable-state/package.json +0 -50
  571. package/node_modules/@radix-ui/react-use-escape-keydown/README.md +0 -13
  572. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts +0 -6
  573. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts +0 -6
  574. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -52
  575. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +0 -7
  576. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +0 -19
  577. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +0 -7
  578. package/node_modules/@radix-ui/react-use-escape-keydown/package.json +0 -50
  579. package/node_modules/@radix-ui/react-use-layout-effect/README.md +0 -13
  580. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +0 -12
  581. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +0 -12
  582. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -41
  583. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +0 -7
  584. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +0 -8
  585. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +0 -7
  586. package/node_modules/@radix-ui/react-use-layout-effect/package.json +0 -47
  587. package/node_modules/@radix-ui/react-use-previous/README.md +0 -13
  588. package/node_modules/@radix-ui/react-use-previous/dist/index.d.mts +0 -3
  589. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts +0 -3
  590. package/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -49
  591. package/node_modules/@radix-ui/react-use-previous/dist/index.js.map +0 -7
  592. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs +0 -16
  593. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +0 -7
  594. package/node_modules/@radix-ui/react-use-previous/package.json +0 -47
  595. package/node_modules/@radix-ui/react-use-rect/README.md +0 -13
  596. package/node_modules/@radix-ui/react-use-rect/dist/index.d.mts +0 -9
  597. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts +0 -9
  598. package/node_modules/@radix-ui/react-use-rect/dist/index.js +0 -54
  599. package/node_modules/@radix-ui/react-use-rect/dist/index.js.map +0 -7
  600. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs +0 -21
  601. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map +0 -7
  602. package/node_modules/@radix-ui/react-use-rect/package.json +0 -50
  603. package/node_modules/@radix-ui/react-use-size/README.md +0 -13
  604. package/node_modules/@radix-ui/react-use-size/dist/index.d.mts +0 -6
  605. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts +0 -6
  606. package/node_modules/@radix-ui/react-use-size/dist/index.js +0 -74
  607. package/node_modules/@radix-ui/react-use-size/dist/index.js.map +0 -7
  608. package/node_modules/@radix-ui/react-use-size/dist/index.mjs +0 -41
  609. package/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +0 -7
  610. package/node_modules/@radix-ui/react-use-size/package.json +0 -53
  611. package/node_modules/@radix-ui/react-visually-hidden/README.md +0 -13
  612. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts +0 -10
  613. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts +0 -10
  614. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -70
  615. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +0 -7
  616. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +0 -37
  617. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +0 -7
  618. package/node_modules/@radix-ui/react-visually-hidden/package.json +0 -55
  619. package/node_modules/@radix-ui/rect/README.md +0 -13
  620. package/node_modules/@radix-ui/rect/dist/index.d.mts +0 -16
  621. package/node_modules/@radix-ui/rect/dist/index.d.ts +0 -16
  622. package/node_modules/@radix-ui/rect/dist/index.js +0 -73
  623. package/node_modules/@radix-ui/rect/dist/index.js.map +0 -7
  624. package/node_modules/@radix-ui/rect/dist/index.mjs +0 -50
  625. package/node_modules/@radix-ui/rect/dist/index.mjs.map +0 -7
  626. package/node_modules/@radix-ui/rect/package.json +0 -38
  627. package/node_modules/@remix-run/react/CHANGELOG.md +0 -964
  628. package/node_modules/@remix-run/react/LICENSE.md +0 -22
  629. package/node_modules/@remix-run/react/README.md +0 -13
  630. package/node_modules/@remix-run/react/dist/_virtual/_rollupPluginBabelHelpers.js +0 -30
  631. package/node_modules/@remix-run/react/dist/browser.d.ts +0 -37
  632. package/node_modules/@remix-run/react/dist/browser.js +0 -268
  633. package/node_modules/@remix-run/react/dist/components.d.ts +0 -137
  634. package/node_modules/@remix-run/react/dist/components.js +0 -911
  635. package/node_modules/@remix-run/react/dist/data.d.ts +0 -15
  636. package/node_modules/@remix-run/react/dist/data.js +0 -280
  637. package/node_modules/@remix-run/react/dist/entry.d.ts +0 -51
  638. package/node_modules/@remix-run/react/dist/errorBoundaries.d.ts +0 -36
  639. package/node_modules/@remix-run/react/dist/errorBoundaries.js +0 -186
  640. package/node_modules/@remix-run/react/dist/errors.d.ts +0 -2
  641. package/node_modules/@remix-run/react/dist/errors.js +0 -53
  642. package/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js +0 -26
  643. package/node_modules/@remix-run/react/dist/esm/browser.js +0 -308
  644. package/node_modules/@remix-run/react/dist/esm/components.js +0 -878
  645. package/node_modules/@remix-run/react/dist/esm/data.js +0 -267
  646. package/node_modules/@remix-run/react/dist/esm/errorBoundaries.js +0 -160
  647. package/node_modules/@remix-run/react/dist/esm/errors.js +0 -49
  648. package/node_modules/@remix-run/react/dist/esm/fallback.js +0 -35
  649. package/node_modules/@remix-run/react/dist/esm/fog-of-war.js +0 -226
  650. package/node_modules/@remix-run/react/dist/esm/index.js +0 -17
  651. package/node_modules/@remix-run/react/dist/esm/invariant.js +0 -17
  652. package/node_modules/@remix-run/react/dist/esm/links.js +0 -258
  653. package/node_modules/@remix-run/react/dist/esm/markup.js +0 -34
  654. package/node_modules/@remix-run/react/dist/esm/routeModules.js +0 -89
  655. package/node_modules/@remix-run/react/dist/esm/routes.js +0 -411
  656. package/node_modules/@remix-run/react/dist/esm/scroll-restoration.js +0 -84
  657. package/node_modules/@remix-run/react/dist/esm/server.js +0 -93
  658. package/node_modules/@remix-run/react/dist/esm/single-fetch.js +0 -309
  659. package/node_modules/@remix-run/react/dist/fallback.d.ts +0 -2
  660. package/node_modules/@remix-run/react/dist/fallback.js +0 -59
  661. package/node_modules/@remix-run/react/dist/fog-of-war.d.ts +0 -37
  662. package/node_modules/@remix-run/react/dist/fog-of-war.js +0 -254
  663. package/node_modules/@remix-run/react/dist/index.d.ts +0 -16
  664. package/node_modules/@remix-run/react/dist/index.js +0 -227
  665. package/node_modules/@remix-run/react/dist/invariant.d.ts +0 -2
  666. package/node_modules/@remix-run/react/dist/invariant.js +0 -19
  667. package/node_modules/@remix-run/react/dist/links.d.ts +0 -128
  668. package/node_modules/@remix-run/react/dist/links.js +0 -268
  669. package/node_modules/@remix-run/react/dist/markup.d.ts +0 -5
  670. package/node_modules/@remix-run/react/dist/markup.js +0 -39
  671. package/node_modules/@remix-run/react/dist/routeModules.d.ts +0 -132
  672. package/node_modules/@remix-run/react/dist/routeModules.js +0 -111
  673. package/node_modules/@remix-run/react/dist/routes.d.ts +0 -32
  674. package/node_modules/@remix-run/react/dist/routes.js +0 -438
  675. package/node_modules/@remix-run/react/dist/scroll-restoration.d.ts +0 -12
  676. package/node_modules/@remix-run/react/dist/scroll-restoration.js +0 -108
  677. package/node_modules/@remix-run/react/dist/server.d.ts +0 -14
  678. package/node_modules/@remix-run/react/dist/server.js +0 -117
  679. package/node_modules/@remix-run/react/dist/single-fetch.d.ts +0 -34
  680. package/node_modules/@remix-run/react/dist/single-fetch.js +0 -339
  681. package/node_modules/@remix-run/react/dist/warnings.d.ts +0 -1
  682. package/node_modules/@remix-run/react/future/single-fetch.d.ts +0 -73
  683. package/node_modules/@remix-run/react/package.json +0 -59
  684. package/node_modules/@remix-run/router/CHANGELOG.md +0 -747
  685. package/node_modules/@remix-run/router/LICENSE.md +0 -23
  686. package/node_modules/@remix-run/router/README.md +0 -135
  687. package/node_modules/@remix-run/router/dist/history.d.ts +0 -250
  688. package/node_modules/@remix-run/router/dist/index.d.ts +0 -9
  689. package/node_modules/@remix-run/router/dist/router.cjs.js +0 -5407
  690. package/node_modules/@remix-run/router/dist/router.cjs.js.map +0 -1
  691. package/node_modules/@remix-run/router/dist/router.d.ts +0 -523
  692. package/node_modules/@remix-run/router/dist/router.js +0 -4856
  693. package/node_modules/@remix-run/router/dist/router.js.map +0 -1
  694. package/node_modules/@remix-run/router/dist/router.umd.js +0 -5413
  695. package/node_modules/@remix-run/router/dist/router.umd.js.map +0 -1
  696. package/node_modules/@remix-run/router/dist/router.umd.min.js +0 -12
  697. package/node_modules/@remix-run/router/dist/router.umd.min.js.map +0 -1
  698. package/node_modules/@remix-run/router/dist/utils.d.ts +0 -528
  699. package/node_modules/@remix-run/router/history.ts +0 -746
  700. package/node_modules/@remix-run/router/index.ts +0 -101
  701. package/node_modules/@remix-run/router/package.json +0 -33
  702. package/node_modules/@remix-run/router/router.ts +0 -5760
  703. package/node_modules/@remix-run/router/utils.ts +0 -1673
  704. package/node_modules/@remix-run/server-runtime/CHANGELOG.md +0 -1023
  705. package/node_modules/@remix-run/server-runtime/LICENSE.md +0 -22
  706. package/node_modules/@remix-run/server-runtime/README.md +0 -26
  707. package/node_modules/@remix-run/server-runtime/dist/build.d.ts +0 -39
  708. package/node_modules/@remix-run/server-runtime/dist/cookies.d.ts +0 -69
  709. package/node_modules/@remix-run/server-runtime/dist/cookies.js +0 -173
  710. package/node_modules/@remix-run/server-runtime/dist/crypto.d.ts +0 -2
  711. package/node_modules/@remix-run/server-runtime/dist/data.d.ts +0 -33
  712. package/node_modules/@remix-run/server-runtime/dist/data.js +0 -138
  713. package/node_modules/@remix-run/server-runtime/dist/deprecations.d.ts +0 -1
  714. package/node_modules/@remix-run/server-runtime/dist/deprecations.js +0 -19
  715. package/node_modules/@remix-run/server-runtime/dist/dev.d.ts +0 -10
  716. package/node_modules/@remix-run/server-runtime/dist/dev.js +0 -53
  717. package/node_modules/@remix-run/server-runtime/dist/entry.d.ts +0 -43
  718. package/node_modules/@remix-run/server-runtime/dist/entry.js +0 -22
  719. package/node_modules/@remix-run/server-runtime/dist/errors.d.ts +0 -51
  720. package/node_modules/@remix-run/server-runtime/dist/errors.js +0 -122
  721. package/node_modules/@remix-run/server-runtime/dist/esm/cookies.js +0 -168
  722. package/node_modules/@remix-run/server-runtime/dist/esm/data.js +0 -133
  723. package/node_modules/@remix-run/server-runtime/dist/esm/deprecations.js +0 -15
  724. package/node_modules/@remix-run/server-runtime/dist/esm/dev.js +0 -46
  725. package/node_modules/@remix-run/server-runtime/dist/esm/entry.js +0 -18
  726. package/node_modules/@remix-run/server-runtime/dist/esm/errors.js +0 -115
  727. package/node_modules/@remix-run/server-runtime/dist/esm/formData.js +0 -55
  728. package/node_modules/@remix-run/server-runtime/dist/esm/headers.js +0 -90
  729. package/node_modules/@remix-run/server-runtime/dist/esm/index.js +0 -21
  730. package/node_modules/@remix-run/server-runtime/dist/esm/invariant.js +0 -18
  731. package/node_modules/@remix-run/server-runtime/dist/esm/markup.js +0 -29
  732. package/node_modules/@remix-run/server-runtime/dist/esm/mode.js +0 -24
  733. package/node_modules/@remix-run/server-runtime/dist/esm/responses.js +0 -123
  734. package/node_modules/@remix-run/server-runtime/dist/esm/routeMatching.js +0 -23
  735. package/node_modules/@remix-run/server-runtime/dist/esm/routes.js +0 -81
  736. package/node_modules/@remix-run/server-runtime/dist/esm/server.js +0 -524
  737. package/node_modules/@remix-run/server-runtime/dist/esm/serverHandoff.js +0 -20
  738. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js +0 -51
  739. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js +0 -61
  740. package/node_modules/@remix-run/server-runtime/dist/esm/sessions.js +0 -145
  741. package/node_modules/@remix-run/server-runtime/dist/esm/single-fetch.js +0 -450
  742. package/node_modules/@remix-run/server-runtime/dist/esm/upload/errors.js +0 -19
  743. package/node_modules/@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js +0 -50
  744. package/node_modules/@remix-run/server-runtime/dist/esm/warnings.js +0 -19
  745. package/node_modules/@remix-run/server-runtime/dist/formData.d.ts +0 -15
  746. package/node_modules/@remix-run/server-runtime/dist/formData.js +0 -60
  747. package/node_modules/@remix-run/server-runtime/dist/headers.d.ts +0 -3
  748. package/node_modules/@remix-run/server-runtime/dist/headers.js +0 -94
  749. package/node_modules/@remix-run/server-runtime/dist/index.d.ts +0 -14
  750. package/node_modules/@remix-run/server-runtime/dist/index.js +0 -50
  751. package/node_modules/@remix-run/server-runtime/dist/interface.d.ts +0 -6
  752. package/node_modules/@remix-run/server-runtime/dist/invariant.d.ts +0 -2
  753. package/node_modules/@remix-run/server-runtime/dist/invariant.js +0 -22
  754. package/node_modules/@remix-run/server-runtime/dist/jsonify.d.ts +0 -33
  755. package/node_modules/@remix-run/server-runtime/dist/links.d.ts +0 -104
  756. package/node_modules/@remix-run/server-runtime/dist/markup.d.ts +0 -1
  757. package/node_modules/@remix-run/server-runtime/dist/markup.js +0 -33
  758. package/node_modules/@remix-run/server-runtime/dist/mode.d.ts +0 -9
  759. package/node_modules/@remix-run/server-runtime/dist/mode.js +0 -29
  760. package/node_modules/@remix-run/server-runtime/dist/reexport.d.ts +0 -14
  761. package/node_modules/@remix-run/server-runtime/dist/responses.d.ts +0 -47
  762. package/node_modules/@remix-run/server-runtime/dist/responses.js +0 -135
  763. package/node_modules/@remix-run/server-runtime/dist/routeMatching.d.ts +0 -8
  764. package/node_modules/@remix-run/server-runtime/dist/routeMatching.js +0 -27
  765. package/node_modules/@remix-run/server-runtime/dist/routeModules.d.ts +0 -214
  766. package/node_modules/@remix-run/server-runtime/dist/routes.d.ts +0 -31
  767. package/node_modules/@remix-run/server-runtime/dist/routes.js +0 -86
  768. package/node_modules/@remix-run/server-runtime/dist/serialize.d.ts +0 -25
  769. package/node_modules/@remix-run/server-runtime/dist/server.d.ts +0 -5
  770. package/node_modules/@remix-run/server-runtime/dist/server.js +0 -528
  771. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.d.ts +0 -12
  772. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.js +0 -24
  773. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.d.ts +0 -23
  774. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js +0 -55
  775. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.d.ts +0 -20
  776. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.js +0 -65
  777. package/node_modules/@remix-run/server-runtime/dist/sessions.d.ts +0 -143
  778. package/node_modules/@remix-run/server-runtime/dist/sessions.js +0 -152
  779. package/node_modules/@remix-run/server-runtime/dist/single-fetch.d.ts +0 -90
  780. package/node_modules/@remix-run/server-runtime/dist/single-fetch.js +0 -468
  781. package/node_modules/@remix-run/server-runtime/dist/typecheck.d.ts +0 -4
  782. package/node_modules/@remix-run/server-runtime/dist/upload/errors.d.ts +0 -5
  783. package/node_modules/@remix-run/server-runtime/dist/upload/errors.js +0 -23
  784. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.d.ts +0 -21
  785. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.js +0 -54
  786. package/node_modules/@remix-run/server-runtime/dist/warnings.d.ts +0 -1
  787. package/node_modules/@remix-run/server-runtime/dist/warnings.js +0 -23
  788. package/node_modules/@remix-run/server-runtime/package.json +0 -51
  789. package/node_modules/@types/cookie/LICENSE +0 -21
  790. package/node_modules/@types/cookie/README.md +0 -15
  791. package/node_modules/@types/cookie/index.d.ts +0 -154
  792. package/node_modules/@types/cookie/package.json +0 -30
  793. package/node_modules/@web3-storage/multipart-parser/README.md +0 -37
  794. package/node_modules/@web3-storage/multipart-parser/cjs/src/index.js +0 -218
  795. package/node_modules/@web3-storage/multipart-parser/cjs/src/search.js +0 -269
  796. package/node_modules/@web3-storage/multipart-parser/cjs/src/utils.js +0 -37
  797. package/node_modules/@web3-storage/multipart-parser/esm/package.json +0 -4
  798. package/node_modules/@web3-storage/multipart-parser/esm/src/index.js +0 -219
  799. package/node_modules/@web3-storage/multipart-parser/esm/src/search.js +0 -269
  800. package/node_modules/@web3-storage/multipart-parser/esm/src/utils.js +0 -28
  801. package/node_modules/@web3-storage/multipart-parser/index.js +0 -1
  802. package/node_modules/@web3-storage/multipart-parser/package.json +0 -44
  803. package/node_modules/@web3-storage/multipart-parser/src/index.js +0 -257
  804. package/node_modules/@web3-storage/multipart-parser/src/search.js +0 -329
  805. package/node_modules/@web3-storage/multipart-parser/src/utils.js +0 -43
  806. package/node_modules/@web3-storage/multipart-parser/test/test.spec.js +0 -65
  807. package/node_modules/@web3-storage/multipart-parser/tsconfig.json +0 -41
  808. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts +0 -15
  809. package/node_modules/@web3-storage/multipart-parser/types/index.d.ts.map +0 -1
  810. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts +0 -36
  811. package/node_modules/@web3-storage/multipart-parser/types/search.d.ts.map +0 -1
  812. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts +0 -18
  813. package/node_modules/@web3-storage/multipart-parser/types/utils.d.ts.map +0 -1
  814. package/node_modules/aria-hidden/LICENSE +0 -21
  815. package/node_modules/aria-hidden/README.md +0 -99
  816. package/node_modules/aria-hidden/dist/es2015/index.d.ts +0 -29
  817. package/node_modules/aria-hidden/dist/es2015/index.js +0 -166
  818. package/node_modules/aria-hidden/dist/es2019/index.d.ts +0 -29
  819. package/node_modules/aria-hidden/dist/es2019/index.js +0 -155
  820. package/node_modules/aria-hidden/dist/es5/index.d.ts +0 -29
  821. package/node_modules/aria-hidden/dist/es5/index.js +0 -173
  822. package/node_modules/aria-hidden/package.json +0 -70
  823. package/node_modules/assertion-error/LICENSE +0 -21
  824. package/node_modules/assertion-error/README.md +0 -68
  825. package/node_modules/assertion-error/index.d.ts +0 -27
  826. package/node_modules/assertion-error/index.js +0 -60
  827. package/node_modules/assertion-error/package.json +0 -32
  828. package/node_modules/chai/CODEOWNERS +0 -1
  829. package/node_modules/chai/CODE_OF_CONDUCT.md +0 -58
  830. package/node_modules/chai/CONTRIBUTING.md +0 -218
  831. package/node_modules/chai/History.md +0 -1059
  832. package/node_modules/chai/LICENSE +0 -21
  833. package/node_modules/chai/README.md +0 -154
  834. package/node_modules/chai/ReleaseNotes.md +0 -737
  835. package/node_modules/chai/chai.js +0 -4018
  836. package/node_modules/chai/eslint.config.js +0 -12
  837. package/node_modules/chai/index.js +0 -1
  838. package/node_modules/chai/lib/chai/assertion.js +0 -164
  839. package/node_modules/chai/lib/chai/config.js +0 -114
  840. package/node_modules/chai/lib/chai/core/assertions.js +0 -3933
  841. package/node_modules/chai/lib/chai/interface/assert.js +0 -3012
  842. package/node_modules/chai/lib/chai/interface/expect.js +0 -55
  843. package/node_modules/chai/lib/chai/interface/should.js +0 -221
  844. package/node_modules/chai/lib/chai/utils/addChainableMethod.js +0 -147
  845. package/node_modules/chai/lib/chai/utils/addLengthGuard.js +0 -60
  846. package/node_modules/chai/lib/chai/utils/addMethod.js +0 -67
  847. package/node_modules/chai/lib/chai/utils/addProperty.js +0 -71
  848. package/node_modules/chai/lib/chai/utils/compareByInspect.js +0 -26
  849. package/node_modules/chai/lib/chai/utils/expectTypes.js +0 -50
  850. package/node_modules/chai/lib/chai/utils/flag.js +0 -33
  851. package/node_modules/chai/lib/chai/utils/getActual.js +0 -20
  852. package/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +0 -25
  853. package/node_modules/chai/lib/chai/utils/getMessage.js +0 -46
  854. package/node_modules/chai/lib/chai/utils/getOperator.js +0 -58
  855. package/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +0 -24
  856. package/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +0 -26
  857. package/node_modules/chai/lib/chai/utils/getProperties.js +0 -38
  858. package/node_modules/chai/lib/chai/utils/index.js +0 -107
  859. package/node_modules/chai/lib/chai/utils/inspect.js +0 -31
  860. package/node_modules/chai/lib/chai/utils/isNaN.js +0 -26
  861. package/node_modules/chai/lib/chai/utils/isProxyEnabled.js +0 -24
  862. package/node_modules/chai/lib/chai/utils/objDisplay.js +0 -46
  863. package/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +0 -68
  864. package/node_modules/chai/lib/chai/utils/overwriteMethod.js +0 -91
  865. package/node_modules/chai/lib/chai/utils/overwriteProperty.js +0 -90
  866. package/node_modules/chai/lib/chai/utils/proxify.js +0 -147
  867. package/node_modules/chai/lib/chai/utils/test.js +0 -24
  868. package/node_modules/chai/lib/chai/utils/transferFlags.js +0 -43
  869. package/node_modules/chai/lib/chai/utils/type-detect.js +0 -20
  870. package/node_modules/chai/lib/chai.js +0 -65
  871. package/node_modules/chai/package.json +0 -61
  872. package/node_modules/chai/register-assert.cjs +0 -3
  873. package/node_modules/chai/register-assert.js +0 -3
  874. package/node_modules/chai/register-expect.cjs +0 -3
  875. package/node_modules/chai/register-expect.js +0 -3
  876. package/node_modules/chai/register-should.cjs +0 -3
  877. package/node_modules/chai/register-should.js +0 -3
  878. package/node_modules/chai/web-test-runner.config.js +0 -20
  879. package/node_modules/chai-dom/.eslintrc +0 -22
  880. package/node_modules/chai-dom/.travis.yml +0 -15
  881. package/node_modules/chai-dom/LICENSE +0 -24
  882. package/node_modules/chai-dom/README.md +0 -267
  883. package/node_modules/chai-dom/bower.json +0 -31
  884. package/node_modules/chai-dom/chai-dom.js +0 -429
  885. package/node_modules/chai-dom/package.json +0 -44
  886. package/node_modules/chai-dom/test/.eslintrc +0 -12
  887. package/node_modules/chai-dom/test/index.html +0 -27
  888. package/node_modules/chai-dom/test/tests.js +0 -1124
  889. package/node_modules/chai-dom/testem.js +0 -31
  890. package/node_modules/check-error/LICENSE +0 -19
  891. package/node_modules/check-error/README.md +0 -144
  892. package/node_modules/check-error/index.js +0 -135
  893. package/node_modules/check-error/package.json +0 -66
  894. package/node_modules/clsx/clsx.d.mts +0 -6
  895. package/node_modules/clsx/clsx.d.ts +0 -10
  896. package/node_modules/clsx/dist/clsx.js +0 -1
  897. package/node_modules/clsx/dist/clsx.min.js +0 -1
  898. package/node_modules/clsx/dist/clsx.mjs +0 -1
  899. package/node_modules/clsx/dist/lite.js +0 -1
  900. package/node_modules/clsx/dist/lite.mjs +0 -1
  901. package/node_modules/clsx/license +0 -9
  902. package/node_modules/clsx/package.json +0 -60
  903. package/node_modules/clsx/readme.md +0 -154
  904. package/node_modules/cookie/HISTORY.md +0 -147
  905. package/node_modules/cookie/LICENSE +0 -24
  906. package/node_modules/cookie/README.md +0 -317
  907. package/node_modules/cookie/SECURITY.md +0 -25
  908. package/node_modules/cookie/index.js +0 -274
  909. package/node_modules/cookie/package.json +0 -44
  910. package/node_modules/deep-eql/LICENSE +0 -19
  911. package/node_modules/deep-eql/README.md +0 -93
  912. package/node_modules/deep-eql/index.js +0 -513
  913. package/node_modules/deep-eql/package.json +0 -73
  914. package/node_modules/detect-node-es/LICENSE +0 -21
  915. package/node_modules/detect-node-es/Readme.md +0 -39
  916. package/node_modules/detect-node-es/es5/browser.js +0 -2
  917. package/node_modules/detect-node-es/es5/node.d.ts +0 -4
  918. package/node_modules/detect-node-es/es5/node.js +0 -2
  919. package/node_modules/detect-node-es/esm/browser.js +0 -2
  920. package/node_modules/detect-node-es/esm/node.js +0 -2
  921. package/node_modules/detect-node-es/package.json +0 -29
  922. package/node_modules/framer-motion/LICENSE.md +0 -21
  923. package/node_modules/framer-motion/README.md +0 -105
  924. package/node_modules/framer-motion/dist/cjs/dom-entry-GDJJhIpT.js +0 -5959
  925. package/node_modules/framer-motion/dist/cjs/dom-entry.js +0 -53
  926. package/node_modules/framer-motion/dist/cjs/index.js +0 -6566
  927. package/node_modules/framer-motion/dist/dom-entry.d.ts +0 -964
  928. package/node_modules/framer-motion/dist/dom.js +0 -1
  929. package/node_modules/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +0 -80
  930. package/node_modules/framer-motion/dist/es/animation/animate.mjs +0 -83
  931. package/node_modules/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +0 -295
  932. package/node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +0 -84
  933. package/node_modules/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +0 -382
  934. package/node_modules/framer-motion/dist/es/animation/animators/drivers/driver-frameloop.mjs +0 -17
  935. package/node_modules/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +0 -40
  936. package/node_modules/framer-motion/dist/es/animation/animators/waapi/easing.mjs +0 -40
  937. package/node_modules/framer-motion/dist/es/animation/animators/waapi/index.mjs +0 -23
  938. package/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +0 -12
  939. package/node_modules/framer-motion/dist/es/animation/generators/inertia.mjs +0 -87
  940. package/node_modules/framer-motion/dist/es/animation/generators/keyframes.mjs +0 -51
  941. package/node_modules/framer-motion/dist/es/animation/generators/spring/find.mjs +0 -89
  942. package/node_modules/framer-motion/dist/es/animation/generators/spring/index.mjs +0 -131
  943. package/node_modules/framer-motion/dist/es/animation/generators/utils/calc-duration.mjs +0 -17
  944. package/node_modules/framer-motion/dist/es/animation/generators/utils/velocity.mjs +0 -9
  945. package/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs +0 -80
  946. package/node_modules/framer-motion/dist/es/animation/hooks/use-animate.mjs +0 -17
  947. package/node_modules/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +0 -62
  948. package/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs +0 -41
  949. package/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs +0 -112
  950. package/node_modules/framer-motion/dist/es/animation/interfaces/single-value.mjs +0 -11
  951. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +0 -80
  952. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs +0 -66
  953. package/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs +0 -29
  954. package/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs +0 -6
  955. package/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs +0 -7
  956. package/node_modules/framer-motion/dist/es/animation/optimized-appear/handoff.mjs +0 -83
  957. package/node_modules/framer-motion/dist/es/animation/optimized-appear/start.mjs +0 -80
  958. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +0 -3
  959. package/node_modules/framer-motion/dist/es/animation/optimized-appear/store.mjs +0 -3
  960. package/node_modules/framer-motion/dist/es/animation/sequence/create.mjs +0 -230
  961. package/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-time.mjs +0 -21
  962. package/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs +0 -31
  963. package/node_modules/framer-motion/dist/es/animation/sequence/utils/sort.mjs +0 -14
  964. package/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.mjs +0 -32
  965. package/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs +0 -40
  966. package/node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs +0 -30
  967. package/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs +0 -7
  968. package/node_modules/framer-motion/dist/es/animation/utils/is-dom-keyframes.mjs +0 -5
  969. package/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs +0 -5
  970. package/node_modules/framer-motion/dist/es/animation/utils/is-none.mjs +0 -15
  971. package/node_modules/framer-motion/dist/es/animation/utils/stagger.mjs +0 -26
  972. package/node_modules/framer-motion/dist/es/animation/utils/transitions.mjs +0 -15
  973. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs +0 -76
  974. package/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs +0 -57
  975. package/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs +0 -169
  976. package/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +0 -66
  977. package/node_modules/framer-motion/dist/es/components/AnimateSharedLayout.mjs +0 -15
  978. package/node_modules/framer-motion/dist/es/components/LayoutGroup/index.mjs +0 -31
  979. package/node_modules/framer-motion/dist/es/components/LazyMotion/index.mjs +0 -67
  980. package/node_modules/framer-motion/dist/es/components/MotionConfig/index.mjs +0 -43
  981. package/node_modules/framer-motion/dist/es/components/Reorder/Group.mjs +0 -52
  982. package/node_modules/framer-motion/dist/es/components/Reorder/Item.mjs +0 -33
  983. package/node_modules/framer-motion/dist/es/components/Reorder/index.mjs +0 -9
  984. package/node_modules/framer-motion/dist/es/components/Reorder/utils/check-reorder.mjs +0 -24
  985. package/node_modules/framer-motion/dist/es/context/DeprecatedLayoutGroupContext.mjs +0 -10
  986. package/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs +0 -5
  987. package/node_modules/framer-motion/dist/es/context/LazyContext.mjs +0 -5
  988. package/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs +0 -12
  989. package/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs +0 -13
  990. package/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs +0 -5
  991. package/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs +0 -17
  992. package/node_modules/framer-motion/dist/es/context/PresenceContext.mjs +0 -8
  993. package/node_modules/framer-motion/dist/es/context/ReorderContext.mjs +0 -5
  994. package/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs +0 -8
  995. package/node_modules/framer-motion/dist/es/debug/record.mjs +0 -7
  996. package/node_modules/framer-motion/dist/es/dom-entry.mjs +0 -25
  997. package/node_modules/framer-motion/dist/es/easing/anticipate.mjs +0 -5
  998. package/node_modules/framer-motion/dist/es/easing/back.mjs +0 -9
  999. package/node_modules/framer-motion/dist/es/easing/circ.mjs +0 -8
  1000. package/node_modules/framer-motion/dist/es/easing/cubic-bezier.mjs +0 -51
  1001. package/node_modules/framer-motion/dist/es/easing/ease.mjs +0 -7
  1002. package/node_modules/framer-motion/dist/es/easing/modifiers/mirror.mjs +0 -5
  1003. package/node_modules/framer-motion/dist/es/easing/modifiers/reverse.mjs +0 -5
  1004. package/node_modules/framer-motion/dist/es/easing/utils/create-generator-easing.mjs +0 -18
  1005. package/node_modules/framer-motion/dist/es/easing/utils/get-easing-for-segment.mjs +0 -8
  1006. package/node_modules/framer-motion/dist/es/easing/utils/is-bezier-definition.mjs +0 -3
  1007. package/node_modules/framer-motion/dist/es/easing/utils/is-easing-array.mjs +0 -5
  1008. package/node_modules/framer-motion/dist/es/easing/utils/map.mjs +0 -37
  1009. package/node_modules/framer-motion/dist/es/events/add-dom-event.mjs +0 -6
  1010. package/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs +0 -8
  1011. package/node_modules/framer-motion/dist/es/events/event-info.mjs +0 -15
  1012. package/node_modules/framer-motion/dist/es/events/use-dom-event.mjs +0 -34
  1013. package/node_modules/framer-motion/dist/es/events/utils/is-primary-pointer.mjs +0 -18
  1014. package/node_modules/framer-motion/dist/es/frameloop/batcher.mjs +0 -65
  1015. package/node_modules/framer-motion/dist/es/frameloop/frame.mjs +0 -6
  1016. package/node_modules/framer-motion/dist/es/frameloop/index-legacy.mjs +0 -20
  1017. package/node_modules/framer-motion/dist/es/frameloop/microtask.mjs +0 -5
  1018. package/node_modules/framer-motion/dist/es/frameloop/render-step.mjs +0 -104
  1019. package/node_modules/framer-motion/dist/es/frameloop/sync-time.mjs +0 -31
  1020. package/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +0 -484
  1021. package/node_modules/framer-motion/dist/es/gestures/drag/index.mjs +0 -27
  1022. package/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs +0 -88
  1023. package/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +0 -129
  1024. package/node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs +0 -53
  1025. package/node_modules/framer-motion/dist/es/gestures/focus.mjs +0 -41
  1026. package/node_modules/framer-motion/dist/es/gestures/hover.mjs +0 -33
  1027. package/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs +0 -156
  1028. package/node_modules/framer-motion/dist/es/gestures/pan/index.mjs +0 -50
  1029. package/node_modules/framer-motion/dist/es/gestures/press.mjs +0 -130
  1030. package/node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs +0 -20
  1031. package/node_modules/framer-motion/dist/es/index.mjs +0 -101
  1032. package/node_modules/framer-motion/dist/es/motion/features/Feature.mjs +0 -9
  1033. package/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs +0 -31
  1034. package/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +0 -41
  1035. package/node_modules/framer-motion/dist/es/motion/features/animations.mjs +0 -13
  1036. package/node_modules/framer-motion/dist/es/motion/features/definitions.mjs +0 -28
  1037. package/node_modules/framer-motion/dist/es/motion/features/drag.mjs +0 -17
  1038. package/node_modules/framer-motion/dist/es/motion/features/gestures.mjs +0 -21
  1039. package/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs +0 -133
  1040. package/node_modules/framer-motion/dist/es/motion/features/layout.mjs +0 -11
  1041. package/node_modules/framer-motion/dist/es/motion/features/load-features.mjs +0 -12
  1042. package/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs +0 -72
  1043. package/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs +0 -49
  1044. package/node_modules/framer-motion/dist/es/motion/index.mjs +0 -97
  1045. package/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +0 -11
  1046. package/node_modules/framer-motion/dist/es/motion/utils/is-motion-component.mjs +0 -12
  1047. package/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs +0 -3
  1048. package/node_modules/framer-motion/dist/es/motion/utils/unwrap-motion-component.mjs +0 -17
  1049. package/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +0 -36
  1050. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +0 -127
  1051. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs +0 -81
  1052. package/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs +0 -57
  1053. package/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs +0 -93
  1054. package/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs +0 -33
  1055. package/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs +0 -20
  1056. package/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs +0 -122
  1057. package/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs +0 -41
  1058. package/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs +0 -54
  1059. package/node_modules/framer-motion/dist/es/projection/geometry/models.mjs +0 -17
  1060. package/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs +0 -25
  1061. package/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs +0 -13
  1062. package/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs +0 -27
  1063. package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +0 -1562
  1064. package/node_modules/framer-motion/dist/es/projection/node/group.mjs +0 -24
  1065. package/node_modules/framer-motion/dist/es/projection/node/state.mjs +0 -19
  1066. package/node_modules/framer-motion/dist/es/projection/shared/stack.mjs +0 -112
  1067. package/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs +0 -41
  1068. package/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs +0 -35
  1069. package/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs +0 -6
  1070. package/node_modules/framer-motion/dist/es/projection/styles/transform.mjs +0 -49
  1071. package/node_modules/framer-motion/dist/es/projection/use-instant-layout-transition.mjs +0 -14
  1072. package/node_modules/framer-motion/dist/es/projection/use-reset-projection.mjs +0 -14
  1073. package/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs +0 -5
  1074. package/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs +0 -26
  1075. package/node_modules/framer-motion/dist/es/projection/utils/measure.mjs +0 -17
  1076. package/node_modules/framer-motion/dist/es/projection-entry.mjs +0 -11
  1077. package/node_modules/framer-motion/dist/es/render/VisualElement.mjs +0 -496
  1078. package/node_modules/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +0 -130
  1079. package/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +0 -28
  1080. package/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs +0 -15
  1081. package/node_modules/framer-motion/dist/es/render/dom/features-animation.mjs +0 -14
  1082. package/node_modules/framer-motion/dist/es/render/dom/features-max.mjs +0 -14
  1083. package/node_modules/framer-motion/dist/es/render/dom/motion-minimal.mjs +0 -9
  1084. package/node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs +0 -47
  1085. package/node_modules/framer-motion/dist/es/render/dom/motion.mjs +0 -42
  1086. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-element.mjs +0 -64
  1087. package/node_modules/framer-motion/dist/es/render/dom/resize/handle-window.mjs +0 -30
  1088. package/node_modules/framer-motion/dist/es/render/dom/resize/index.mjs +0 -8
  1089. package/node_modules/framer-motion/dist/es/render/dom/scroll/index.mjs +0 -36
  1090. package/node_modules/framer-motion/dist/es/render/dom/scroll/info.mjs +0 -56
  1091. package/node_modules/framer-motion/dist/es/render/dom/scroll/observe.mjs +0 -18
  1092. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs +0 -45
  1093. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +0 -59
  1094. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs +0 -45
  1095. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs +0 -35
  1096. package/node_modules/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs +0 -20
  1097. package/node_modules/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs +0 -48
  1098. package/node_modules/framer-motion/dist/es/render/dom/scroll/supports.mjs +0 -5
  1099. package/node_modules/framer-motion/dist/es/render/dom/scroll/track.mjs +0 -84
  1100. package/node_modules/framer-motion/dist/es/render/dom/use-render.mjs +0 -33
  1101. package/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs +0 -6
  1102. package/node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs +0 -19
  1103. package/node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +0 -42
  1104. package/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs +0 -59
  1105. package/node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs +0 -13
  1106. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs +0 -30
  1107. package/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs +0 -5
  1108. package/node_modules/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +0 -28
  1109. package/node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +0 -65
  1110. package/node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs +0 -15
  1111. package/node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs +0 -30
  1112. package/node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs +0 -15
  1113. package/node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs +0 -15
  1114. package/node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs +0 -10
  1115. package/node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs +0 -74
  1116. package/node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs +0 -6
  1117. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs +0 -9
  1118. package/node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs +0 -8
  1119. package/node_modules/framer-motion/dist/es/render/dom/viewport/index.mjs +0 -43
  1120. package/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +0 -59
  1121. package/node_modules/framer-motion/dist/es/render/html/config-motion.mjs +0 -12
  1122. package/node_modules/framer-motion/dist/es/render/html/use-props.mjs +0 -57
  1123. package/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs +0 -74
  1124. package/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs +0 -45
  1125. package/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs +0 -8
  1126. package/node_modules/framer-motion/dist/es/render/html/utils/make-none-animatable.mjs +0 -30
  1127. package/node_modules/framer-motion/dist/es/render/html/utils/render.mjs +0 -9
  1128. package/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs +0 -20
  1129. package/node_modules/framer-motion/dist/es/render/html/utils/transform.mjs +0 -28
  1130. package/node_modules/framer-motion/dist/es/render/store.mjs +0 -3
  1131. package/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +0 -47
  1132. package/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs +0 -40
  1133. package/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs +0 -33
  1134. package/node_modules/framer-motion/dist/es/render/svg/use-props.mjs +0 -24
  1135. package/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +0 -52
  1136. package/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs +0 -30
  1137. package/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs +0 -8
  1138. package/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs +0 -3
  1139. package/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs +0 -32
  1140. package/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs +0 -12
  1141. package/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +0 -19
  1142. package/node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs +0 -18
  1143. package/node_modules/framer-motion/dist/es/render/utils/KeyframesResolver.mjs +0 -164
  1144. package/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs +0 -328
  1145. package/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs +0 -3
  1146. package/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs +0 -24
  1147. package/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs +0 -13
  1148. package/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs +0 -8
  1149. package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +0 -67
  1150. package/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs +0 -8
  1151. package/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs +0 -36
  1152. package/node_modules/framer-motion/dist/es/render/utils/setters.mjs +0 -27
  1153. package/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs +0 -12
  1154. package/node_modules/framer-motion/dist/es/utils/GlobalConfig.mjs +0 -6
  1155. package/node_modules/framer-motion/dist/es/utils/array.mjs +0 -21
  1156. package/node_modules/framer-motion/dist/es/utils/clamp.mjs +0 -9
  1157. package/node_modules/framer-motion/dist/es/utils/delay.mjs +0 -20
  1158. package/node_modules/framer-motion/dist/es/utils/distance.mjs +0 -9
  1159. package/node_modules/framer-motion/dist/es/utils/errors.mjs +0 -18
  1160. package/node_modules/framer-motion/dist/es/utils/get-context-window.mjs +0 -6
  1161. package/node_modules/framer-motion/dist/es/utils/hsla-to-rgba.mjs +0 -42
  1162. package/node_modules/framer-motion/dist/es/utils/interpolate.mjs +0 -75
  1163. package/node_modules/framer-motion/dist/es/utils/is-browser.mjs +0 -3
  1164. package/node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs +0 -6
  1165. package/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs +0 -7
  1166. package/node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs +0 -6
  1167. package/node_modules/framer-motion/dist/es/utils/memo.mjs +0 -10
  1168. package/node_modules/framer-motion/dist/es/utils/mix/color.mjs +0 -47
  1169. package/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +0 -94
  1170. package/node_modules/framer-motion/dist/es/utils/mix/immediate.mjs +0 -5
  1171. package/node_modules/framer-motion/dist/es/utils/mix/index.mjs +0 -14
  1172. package/node_modules/framer-motion/dist/es/utils/mix/number.mjs +0 -26
  1173. package/node_modules/framer-motion/dist/es/utils/mix/visibility.mjs +0 -16
  1174. package/node_modules/framer-motion/dist/es/utils/noop.mjs +0 -3
  1175. package/node_modules/framer-motion/dist/es/utils/offsets/default.mjs +0 -9
  1176. package/node_modules/framer-motion/dist/es/utils/offsets/fill.mjs +0 -12
  1177. package/node_modules/framer-motion/dist/es/utils/offsets/time.mjs +0 -5
  1178. package/node_modules/framer-motion/dist/es/utils/pipe.mjs +0 -11
  1179. package/node_modules/framer-motion/dist/es/utils/progress.mjs +0 -18
  1180. package/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs +0 -19
  1181. package/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs +0 -5
  1182. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +0 -19
  1183. package/node_modules/framer-motion/dist/es/utils/reduced-motion/use-reduced-motion.mjs +0 -47
  1184. package/node_modules/framer-motion/dist/es/utils/resolve-value.mjs +0 -11
  1185. package/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs +0 -14
  1186. package/node_modules/framer-motion/dist/es/utils/subscription-manager.mjs +0 -40
  1187. package/node_modules/framer-motion/dist/es/utils/time-conversion.mjs +0 -10
  1188. package/node_modules/framer-motion/dist/es/utils/transform.mjs +0 -21
  1189. package/node_modules/framer-motion/dist/es/utils/use-animation-frame.mjs +0 -21
  1190. package/node_modules/framer-motion/dist/es/utils/use-constant.mjs +0 -18
  1191. package/node_modules/framer-motion/dist/es/utils/use-cycle.mjs +0 -47
  1192. package/node_modules/framer-motion/dist/es/utils/use-force-update.mjs +0 -19
  1193. package/node_modules/framer-motion/dist/es/utils/use-in-view.mjs +0 -23
  1194. package/node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs +0 -5
  1195. package/node_modules/framer-motion/dist/es/utils/use-instant-transition.mjs +0 -41
  1196. package/node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs +0 -15
  1197. package/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs +0 -6
  1198. package/node_modules/framer-motion/dist/es/utils/use-motion-value-event.mjs +0 -13
  1199. package/node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs +0 -7
  1200. package/node_modules/framer-motion/dist/es/utils/velocity-per-second.mjs +0 -11
  1201. package/node_modules/framer-motion/dist/es/utils/warn-once.mjs +0 -11
  1202. package/node_modules/framer-motion/dist/es/utils/wrap.mjs +0 -6
  1203. package/node_modules/framer-motion/dist/es/value/index.mjs +0 -319
  1204. package/node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.mjs +0 -14
  1205. package/node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.mjs +0 -14
  1206. package/node_modules/framer-motion/dist/es/value/types/color/hex.mjs +0 -40
  1207. package/node_modules/framer-motion/dist/es/value/types/color/hsla.mjs +0 -22
  1208. package/node_modules/framer-motion/dist/es/value/types/color/index.mjs +0 -28
  1209. package/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +0 -25
  1210. package/node_modules/framer-motion/dist/es/value/types/color/utils.mjs +0 -23
  1211. package/node_modules/framer-motion/dist/es/value/types/complex/filter.mjs +0 -30
  1212. package/node_modules/framer-motion/dist/es/value/types/complex/index.mjs +0 -90
  1213. package/node_modules/framer-motion/dist/es/value/types/numbers/index.mjs +0 -17
  1214. package/node_modules/framer-motion/dist/es/value/types/numbers/units.mjs +0 -19
  1215. package/node_modules/framer-motion/dist/es/value/types/utils.mjs +0 -15
  1216. package/node_modules/framer-motion/dist/es/value/use-combine-values.mjs +0 -37
  1217. package/node_modules/framer-motion/dist/es/value/use-computed.mjs +0 -19
  1218. package/node_modules/framer-motion/dist/es/value/use-inverted-scale.mjs +0 -52
  1219. package/node_modules/framer-motion/dist/es/value/use-motion-template.mjs +0 -45
  1220. package/node_modules/framer-motion/dist/es/value/use-motion-value.mjs +0 -38
  1221. package/node_modules/framer-motion/dist/es/value/use-scroll.mjs +0 -39
  1222. package/node_modules/framer-motion/dist/es/value/use-spring.mjs +0 -80
  1223. package/node_modules/framer-motion/dist/es/value/use-time.mjs +0 -10
  1224. package/node_modules/framer-motion/dist/es/value/use-transform.mjs +0 -29
  1225. package/node_modules/framer-motion/dist/es/value/use-velocity.mjs +0 -35
  1226. package/node_modules/framer-motion/dist/es/value/use-will-change/index.mjs +0 -50
  1227. package/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs +0 -7
  1228. package/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs +0 -3
  1229. package/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs +0 -16
  1230. package/node_modules/framer-motion/dist/framer-motion.dev.js +0 -12433
  1231. package/node_modules/framer-motion/dist/framer-motion.js +0 -1
  1232. package/node_modules/framer-motion/dist/index.d.ts +0 -5278
  1233. package/node_modules/framer-motion/dist/three-entry.d.ts +0 -2954
  1234. package/node_modules/framer-motion/dom/README.md +0 -1
  1235. package/node_modules/framer-motion/dom/package.json +0 -6
  1236. package/node_modules/framer-motion/package.json +0 -108
  1237. package/node_modules/get-func-name/LICENSE +0 -19
  1238. package/node_modules/get-func-name/README.md +0 -123
  1239. package/node_modules/get-func-name/get-func-name.js +0 -1
  1240. package/node_modules/get-func-name/index.js +0 -52
  1241. package/node_modules/get-func-name/package.json +0 -85
  1242. package/node_modules/get-nonce/LICENSE +0 -21
  1243. package/node_modules/get-nonce/README.md +0 -54
  1244. package/node_modules/get-nonce/dist/es2015/index.d.ts +0 -2
  1245. package/node_modules/get-nonce/dist/es2015/index.js +0 -13
  1246. package/node_modules/get-nonce/dist/es5/index.d.ts +0 -2
  1247. package/node_modules/get-nonce/dist/es5/index.js +0 -15
  1248. package/node_modules/get-nonce/package.json +0 -68
  1249. package/node_modules/invariant/LICENSE +0 -21
  1250. package/node_modules/invariant/README.md +0 -37
  1251. package/node_modules/invariant/browser.js +0 -49
  1252. package/node_modules/invariant/invariant.js +0 -51
  1253. package/node_modules/invariant/invariant.js.flow +0 -7
  1254. package/node_modules/invariant/package.json +0 -35
  1255. package/node_modules/js-tokens/LICENSE +0 -21
  1256. package/node_modules/js-tokens/README.md +0 -240
  1257. package/node_modules/js-tokens/index.js +0 -23
  1258. package/node_modules/js-tokens/package.json +0 -30
  1259. package/node_modules/loose-envify/LICENSE +0 -21
  1260. package/node_modules/loose-envify/README.md +0 -45
  1261. package/node_modules/loose-envify/cli.js +0 -16
  1262. package/node_modules/loose-envify/custom.js +0 -4
  1263. package/node_modules/loose-envify/index.js +0 -3
  1264. package/node_modules/loose-envify/loose-envify.js +0 -36
  1265. package/node_modules/loose-envify/package.json +0 -36
  1266. package/node_modules/loose-envify/replace.js +0 -65
  1267. package/node_modules/loupe/LICENSE +0 -9
  1268. package/node_modules/loupe/README.md +0 -63
  1269. package/node_modules/loupe/lib/arguments.d.ts +0 -3
  1270. package/node_modules/loupe/lib/arguments.d.ts.map +0 -1
  1271. package/node_modules/loupe/lib/arguments.js +0 -7
  1272. package/node_modules/loupe/lib/array.d.ts +0 -3
  1273. package/node_modules/loupe/lib/array.d.ts.map +0 -1
  1274. package/node_modules/loupe/lib/array.js +0 -16
  1275. package/node_modules/loupe/lib/bigint.d.ts +0 -3
  1276. package/node_modules/loupe/lib/bigint.d.ts.map +0 -1
  1277. package/node_modules/loupe/lib/bigint.js +0 -7
  1278. package/node_modules/loupe/lib/class.d.ts +0 -5
  1279. package/node_modules/loupe/lib/class.d.ts.map +0 -1
  1280. package/node_modules/loupe/lib/class.js +0 -15
  1281. package/node_modules/loupe/lib/date.d.ts +0 -3
  1282. package/node_modules/loupe/lib/date.d.ts.map +0 -1
  1283. package/node_modules/loupe/lib/date.js +0 -11
  1284. package/node_modules/loupe/lib/error.d.ts +0 -3
  1285. package/node_modules/loupe/lib/error.d.ts.map +0 -1
  1286. package/node_modules/loupe/lib/error.js +0 -29
  1287. package/node_modules/loupe/lib/function.d.ts +0 -7
  1288. package/node_modules/loupe/lib/function.d.ts.map +0 -1
  1289. package/node_modules/loupe/lib/function.js +0 -9
  1290. package/node_modules/loupe/lib/helpers.d.ts +0 -7
  1291. package/node_modules/loupe/lib/helpers.d.ts.map +0 -1
  1292. package/node_modules/loupe/lib/helpers.js +0 -159
  1293. package/node_modules/loupe/lib/html.d.ts +0 -5
  1294. package/node_modules/loupe/lib/html.d.ts.map +0 -1
  1295. package/node_modules/loupe/lib/html.js +0 -34
  1296. package/node_modules/loupe/lib/index.d.ts +0 -7
  1297. package/node_modules/loupe/lib/index.d.ts.map +0 -1
  1298. package/node_modules/loupe/lib/index.js +0 -161
  1299. package/node_modules/loupe/lib/map.d.ts +0 -3
  1300. package/node_modules/loupe/lib/map.d.ts.map +0 -1
  1301. package/node_modules/loupe/lib/map.js +0 -24
  1302. package/node_modules/loupe/lib/number.d.ts +0 -3
  1303. package/node_modules/loupe/lib/number.d.ts.map +0 -1
  1304. package/node_modules/loupe/lib/number.js +0 -17
  1305. package/node_modules/loupe/lib/object.d.ts +0 -3
  1306. package/node_modules/loupe/lib/object.d.ts.map +0 -1
  1307. package/node_modules/loupe/lib/object.js +0 -22
  1308. package/node_modules/loupe/lib/promise.d.ts +0 -5
  1309. package/node_modules/loupe/lib/promise.d.ts.map +0 -1
  1310. package/node_modules/loupe/lib/promise.js +0 -18
  1311. package/node_modules/loupe/lib/regexp.d.ts +0 -3
  1312. package/node_modules/loupe/lib/regexp.d.ts.map +0 -1
  1313. package/node_modules/loupe/lib/regexp.js +0 -7
  1314. package/node_modules/loupe/lib/set.d.ts +0 -3
  1315. package/node_modules/loupe/lib/set.d.ts.map +0 -1
  1316. package/node_modules/loupe/lib/set.js +0 -15
  1317. package/node_modules/loupe/lib/string.d.ts +0 -3
  1318. package/node_modules/loupe/lib/string.d.ts.map +0 -1
  1319. package/node_modules/loupe/lib/string.js +0 -24
  1320. package/node_modules/loupe/lib/symbol.d.ts +0 -2
  1321. package/node_modules/loupe/lib/symbol.d.ts.map +0 -1
  1322. package/node_modules/loupe/lib/symbol.js +0 -6
  1323. package/node_modules/loupe/lib/typedarray.d.ts +0 -5
  1324. package/node_modules/loupe/lib/typedarray.d.ts.map +0 -1
  1325. package/node_modules/loupe/lib/typedarray.js +0 -38
  1326. package/node_modules/loupe/lib/types.d.ts +0 -15
  1327. package/node_modules/loupe/lib/types.d.ts.map +0 -1
  1328. package/node_modules/loupe/lib/types.js +0 -1
  1329. package/node_modules/loupe/loupe.js +0 -644
  1330. package/node_modules/loupe/package.json +0 -126
  1331. package/node_modules/pathval/LICENSE +0 -16
  1332. package/node_modules/pathval/README.md +0 -147
  1333. package/node_modules/pathval/index.js +0 -292
  1334. package/node_modules/pathval/package.json +0 -73
  1335. package/node_modules/pathval/pathval.js +0 -1
  1336. package/node_modules/react-remove-scroll/LICENSE +0 -21
  1337. package/node_modules/react-remove-scroll/README.md +0 -152
  1338. package/node_modules/react-remove-scroll/UI/UI.d.ts +0 -1
  1339. package/node_modules/react-remove-scroll/UI/package.json +0 -8
  1340. package/node_modules/react-remove-scroll/dist/es2015/Combination.d.ts +0 -3
  1341. package/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -7
  1342. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.d.ts +0 -5
  1343. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -157
  1344. package/node_modules/react-remove-scroll/dist/es2015/UI.d.ts +0 -7
  1345. package/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -36
  1346. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.d.ts +0 -3
  1347. package/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -19
  1348. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.d.ts +0 -3
  1349. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -104
  1350. package/node_modules/react-remove-scroll/dist/es2015/index.d.ts +0 -2
  1351. package/node_modules/react-remove-scroll/dist/es2015/index.js +0 -2
  1352. package/node_modules/react-remove-scroll/dist/es2015/medium.d.ts +0 -2
  1353. package/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -2
  1354. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.d.ts +0 -8
  1355. package/node_modules/react-remove-scroll/dist/es2015/pinchAndZoom.js +0 -33
  1356. package/node_modules/react-remove-scroll/dist/es2015/sidecar.d.ts +0 -2
  1357. package/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -4
  1358. package/node_modules/react-remove-scroll/dist/es2015/types.d.ts +0 -98
  1359. package/node_modules/react-remove-scroll/dist/es2015/types.js +0 -1
  1360. package/node_modules/react-remove-scroll/dist/es2019/Combination.d.ts +0 -3
  1361. package/node_modules/react-remove-scroll/dist/es2019/Combination.js +0 -6
  1362. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.d.ts +0 -5
  1363. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.js +0 -155
  1364. package/node_modules/react-remove-scroll/dist/es2019/UI.d.ts +0 -7
  1365. package/node_modules/react-remove-scroll/dist/es2019/UI.js +0 -41
  1366. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.d.ts +0 -3
  1367. package/node_modules/react-remove-scroll/dist/es2019/aggresiveCapture.js +0 -19
  1368. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.d.ts +0 -3
  1369. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.js +0 -92
  1370. package/node_modules/react-remove-scroll/dist/es2019/index.d.ts +0 -2
  1371. package/node_modules/react-remove-scroll/dist/es2019/index.js +0 -2
  1372. package/node_modules/react-remove-scroll/dist/es2019/medium.d.ts +0 -2
  1373. package/node_modules/react-remove-scroll/dist/es2019/medium.js +0 -2
  1374. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.d.ts +0 -8
  1375. package/node_modules/react-remove-scroll/dist/es2019/pinchAndZoom.js +0 -33
  1376. package/node_modules/react-remove-scroll/dist/es2019/sidecar.d.ts +0 -2
  1377. package/node_modules/react-remove-scroll/dist/es2019/sidecar.js +0 -4
  1378. package/node_modules/react-remove-scroll/dist/es2019/types.d.ts +0 -98
  1379. package/node_modules/react-remove-scroll/dist/es2019/types.js +0 -1
  1380. package/node_modules/react-remove-scroll/dist/es5/Combination.d.ts +0 -3
  1381. package/node_modules/react-remove-scroll/dist/es5/Combination.js +0 -9
  1382. package/node_modules/react-remove-scroll/dist/es5/SideEffect.d.ts +0 -5
  1383. package/node_modules/react-remove-scroll/dist/es5/SideEffect.js +0 -163
  1384. package/node_modules/react-remove-scroll/dist/es5/UI.d.ts +0 -7
  1385. package/node_modules/react-remove-scroll/dist/es5/UI.js +0 -39
  1386. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.d.ts +0 -3
  1387. package/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.js +0 -22
  1388. package/node_modules/react-remove-scroll/dist/es5/handleScroll.d.ts +0 -3
  1389. package/node_modules/react-remove-scroll/dist/es5/handleScroll.js +0 -109
  1390. package/node_modules/react-remove-scroll/dist/es5/index.d.ts +0 -2
  1391. package/node_modules/react-remove-scroll/dist/es5/index.js +0 -6
  1392. package/node_modules/react-remove-scroll/dist/es5/medium.d.ts +0 -2
  1393. package/node_modules/react-remove-scroll/dist/es5/medium.js +0 -5
  1394. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.d.ts +0 -8
  1395. package/node_modules/react-remove-scroll/dist/es5/pinchAndZoom.js +0 -37
  1396. package/node_modules/react-remove-scroll/dist/es5/sidecar.d.ts +0 -2
  1397. package/node_modules/react-remove-scroll/dist/es5/sidecar.js +0 -6
  1398. package/node_modules/react-remove-scroll/dist/es5/types.d.ts +0 -98
  1399. package/node_modules/react-remove-scroll/dist/es5/types.js +0 -2
  1400. package/node_modules/react-remove-scroll/dist/index.js +0 -93
  1401. package/node_modules/react-remove-scroll/package.json +0 -97
  1402. package/node_modules/react-remove-scroll/sidecar/package.json +0 -7
  1403. package/node_modules/react-remove-scroll/sidecar/sidecar.d.ts +0 -5
  1404. package/node_modules/react-remove-scroll-bar/README.md +0 -52
  1405. package/node_modules/react-remove-scroll-bar/constants/package.json +0 -8
  1406. package/node_modules/react-remove-scroll-bar/dist/es2015/component.d.ts +0 -13
  1407. package/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -53
  1408. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.d.ts +0 -8
  1409. package/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -8
  1410. package/node_modules/react-remove-scroll-bar/dist/es2015/index.d.ts +0 -4
  1411. package/node_modules/react-remove-scroll-bar/dist/es2015/index.js +0 -4
  1412. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.d.ts +0 -14
  1413. package/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -29
  1414. package/node_modules/react-remove-scroll-bar/dist/es2019/component.d.ts +0 -13
  1415. package/node_modules/react-remove-scroll-bar/dist/es2019/component.js +0 -85
  1416. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.d.ts +0 -8
  1417. package/node_modules/react-remove-scroll-bar/dist/es2019/constants.js +0 -8
  1418. package/node_modules/react-remove-scroll-bar/dist/es2019/index.d.ts +0 -4
  1419. package/node_modules/react-remove-scroll-bar/dist/es2019/index.js +0 -4
  1420. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.d.ts +0 -14
  1421. package/node_modules/react-remove-scroll-bar/dist/es2019/utils.js +0 -28
  1422. package/node_modules/react-remove-scroll-bar/dist/es5/component.d.ts +0 -13
  1423. package/node_modules/react-remove-scroll-bar/dist/es5/component.js +0 -59
  1424. package/node_modules/react-remove-scroll-bar/dist/es5/constants.d.ts +0 -8
  1425. package/node_modules/react-remove-scroll-bar/dist/es5/constants.js +0 -11
  1426. package/node_modules/react-remove-scroll-bar/dist/es5/index.d.ts +0 -4
  1427. package/node_modules/react-remove-scroll-bar/dist/es5/index.js +0 -12
  1428. package/node_modules/react-remove-scroll-bar/dist/es5/utils.d.ts +0 -14
  1429. package/node_modules/react-remove-scroll-bar/dist/es5/utils.js +0 -33
  1430. package/node_modules/react-remove-scroll-bar/package.json +0 -85
  1431. package/node_modules/react-router/CHANGELOG.md +0 -723
  1432. package/node_modules/react-router/LICENSE.md +0 -23
  1433. package/node_modules/react-router/README.md +0 -16
  1434. package/node_modules/react-router/dist/index.d.ts +0 -29
  1435. package/node_modules/react-router/dist/index.js +0 -1456
  1436. package/node_modules/react-router/dist/index.js.map +0 -1
  1437. package/node_modules/react-router/dist/lib/components.d.ts +0 -157
  1438. package/node_modules/react-router/dist/lib/context.d.ts +0 -102
  1439. package/node_modules/react-router/dist/lib/hooks.d.ts +0 -181
  1440. package/node_modules/react-router/dist/main.js +0 -19
  1441. package/node_modules/react-router/dist/react-router.development.js +0 -1352
  1442. package/node_modules/react-router/dist/react-router.development.js.map +0 -1
  1443. package/node_modules/react-router/dist/react-router.production.min.js +0 -12
  1444. package/node_modules/react-router/dist/react-router.production.min.js.map +0 -1
  1445. package/node_modules/react-router/dist/umd/react-router.development.js +0 -1574
  1446. package/node_modules/react-router/dist/umd/react-router.development.js.map +0 -1
  1447. package/node_modules/react-router/dist/umd/react-router.production.min.js +0 -12
  1448. package/node_modules/react-router/dist/umd/react-router.production.min.js.map +0 -1
  1449. package/node_modules/react-router/package.json +0 -44
  1450. package/node_modules/react-router-dom/CHANGELOG.md +0 -866
  1451. package/node_modules/react-router-dom/LICENSE.md +0 -23
  1452. package/node_modules/react-router-dom/README.md +0 -5
  1453. package/node_modules/react-router-dom/dist/dom.d.ts +0 -117
  1454. package/node_modules/react-router-dom/dist/index.d.ts +0 -331
  1455. package/node_modules/react-router-dom/dist/index.js +0 -1447
  1456. package/node_modules/react-router-dom/dist/index.js.map +0 -1
  1457. package/node_modules/react-router-dom/dist/main.js +0 -19
  1458. package/node_modules/react-router-dom/dist/react-router-dom.development.js +0 -1514
  1459. package/node_modules/react-router-dom/dist/react-router-dom.development.js.map +0 -1
  1460. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js +0 -12
  1461. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js.map +0 -1
  1462. package/node_modules/react-router-dom/dist/server.d.ts +0 -31
  1463. package/node_modules/react-router-dom/dist/server.js +0 -322
  1464. package/node_modules/react-router-dom/dist/server.mjs +0 -297
  1465. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js +0 -1813
  1466. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js.map +0 -1
  1467. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js +0 -12
  1468. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js.map +0 -1
  1469. package/node_modules/react-router-dom/package.json +0 -49
  1470. package/node_modules/react-router-dom/server.d.ts +0 -31
  1471. package/node_modules/react-router-dom/server.js +0 -322
  1472. package/node_modules/react-router-dom/server.mjs +0 -297
  1473. package/node_modules/react-style-singleton/README.md +0 -41
  1474. package/node_modules/react-style-singleton/dist/es2015/component.d.ts +0 -21
  1475. package/node_modules/react-style-singleton/dist/es2015/component.js +0 -16
  1476. package/node_modules/react-style-singleton/dist/es2015/hook.d.ts +0 -23
  1477. package/node_modules/react-style-singleton/dist/es2015/hook.js +0 -22
  1478. package/node_modules/react-style-singleton/dist/es2015/index.d.ts +0 -3
  1479. package/node_modules/react-style-singleton/dist/es2015/index.js +0 -3
  1480. package/node_modules/react-style-singleton/dist/es2015/singleton.d.ts +0 -4
  1481. package/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -48
  1482. package/node_modules/react-style-singleton/dist/es2019/component.d.ts +0 -21
  1483. package/node_modules/react-style-singleton/dist/es2019/component.js +0 -15
  1484. package/node_modules/react-style-singleton/dist/es2019/hook.d.ts +0 -23
  1485. package/node_modules/react-style-singleton/dist/es2019/hook.js +0 -22
  1486. package/node_modules/react-style-singleton/dist/es2019/index.d.ts +0 -3
  1487. package/node_modules/react-style-singleton/dist/es2019/index.js +0 -3
  1488. package/node_modules/react-style-singleton/dist/es2019/singleton.d.ts +0 -4
  1489. package/node_modules/react-style-singleton/dist/es2019/singleton.js +0 -48
  1490. package/node_modules/react-style-singleton/dist/es5/component.d.ts +0 -21
  1491. package/node_modules/react-style-singleton/dist/es5/component.js +0 -20
  1492. package/node_modules/react-style-singleton/dist/es5/hook.d.ts +0 -23
  1493. package/node_modules/react-style-singleton/dist/es5/hook.js +0 -27
  1494. package/node_modules/react-style-singleton/dist/es5/index.d.ts +0 -3
  1495. package/node_modules/react-style-singleton/dist/es5/index.js +0 -9
  1496. package/node_modules/react-style-singleton/dist/es5/singleton.d.ts +0 -4
  1497. package/node_modules/react-style-singleton/dist/es5/singleton.js +0 -52
  1498. package/node_modules/react-style-singleton/dist/index.js +0 -1
  1499. package/node_modules/react-style-singleton/package.json +0 -87
  1500. package/node_modules/regenerator-runtime/LICENSE +0 -21
  1501. package/node_modules/regenerator-runtime/README.md +0 -31
  1502. package/node_modules/regenerator-runtime/package.json +0 -19
  1503. package/node_modules/regenerator-runtime/path.js +0 -11
  1504. package/node_modules/regenerator-runtime/runtime.js +0 -761
  1505. package/node_modules/remix-utils/.eslintrc.cjs +0 -54
  1506. package/node_modules/remix-utils/LICENSE +0 -21
  1507. package/node_modules/remix-utils/README.md +0 -2149
  1508. package/node_modules/remix-utils/build/client/cache-assets.d.ts +0 -22
  1509. package/node_modules/remix-utils/build/client/cache-assets.js +0 -66
  1510. package/node_modules/remix-utils/build/common/promise.d.ts +0 -87
  1511. package/node_modules/remix-utils/build/common/promise.js +0 -112
  1512. package/node_modules/remix-utils/build/common/timers.d.ts +0 -27
  1513. package/node_modules/remix-utils/build/common/timers.js +0 -47
  1514. package/node_modules/remix-utils/build/react/authenticity-token.d.ts +0 -50
  1515. package/node_modules/remix-utils/build/react/authenticity-token.js +0 -54
  1516. package/node_modules/remix-utils/build/react/client-only.d.ts +0 -27
  1517. package/node_modules/remix-utils/build/react/client-only.js +0 -20
  1518. package/node_modules/remix-utils/build/react/existing-search-params.d.ts +0 -34
  1519. package/node_modules/remix-utils/build/react/existing-search-params.js +0 -32
  1520. package/node_modules/remix-utils/build/react/external-scripts.d.ts +0 -91
  1521. package/node_modules/remix-utils/build/react/external-scripts.js +0 -106
  1522. package/node_modules/remix-utils/build/react/fetcher-type.d.ts +0 -31
  1523. package/node_modules/remix-utils/build/react/fetcher-type.js +0 -53
  1524. package/node_modules/remix-utils/build/react/handle-conventions.d.ts +0 -10
  1525. package/node_modules/remix-utils/build/react/handle-conventions.js +0 -1
  1526. package/node_modules/remix-utils/build/react/honeypot.d.ts +0 -11
  1527. package/node_modules/remix-utils/build/react/honeypot.js +0 -16
  1528. package/node_modules/remix-utils/build/react/server-only.d.ts +0 -25
  1529. package/node_modules/remix-utils/build/react/server-only.js +0 -18
  1530. package/node_modules/remix-utils/build/react/use-debounce-fetcher.d.ts +0 -28
  1531. package/node_modules/remix-utils/build/react/use-debounce-fetcher.js +0 -27
  1532. package/node_modules/remix-utils/build/react/use-debounce-submit.d.ts +0 -7
  1533. package/node_modules/remix-utils/build/react/use-debounce-submit.js +0 -41
  1534. package/node_modules/remix-utils/build/react/use-delegated-anchors.d.ts +0 -6
  1535. package/node_modules/remix-utils/build/react/use-delegated-anchors.js +0 -69
  1536. package/node_modules/remix-utils/build/react/use-event-source.d.ts +0 -17
  1537. package/node_modules/remix-utils/build/react/use-event-source.js +0 -37
  1538. package/node_modules/remix-utils/build/react/use-global-navigation-state.d.ts +0 -33
  1539. package/node_modules/remix-utils/build/react/use-global-navigation-state.js +0 -67
  1540. package/node_modules/remix-utils/build/react/use-hydrated.d.ts +0 -18
  1541. package/node_modules/remix-utils/build/react/use-hydrated.js +0 -24
  1542. package/node_modules/remix-utils/build/react/use-locales.d.ts +0 -24
  1543. package/node_modules/remix-utils/build/react/use-locales.js +0 -56
  1544. package/node_modules/remix-utils/build/react/use-should-hydrate.d.ts +0 -21
  1545. package/node_modules/remix-utils/build/react/use-should-hydrate.js +0 -44
  1546. package/node_modules/remix-utils/build/server/cors.d.ts +0 -101
  1547. package/node_modules/remix-utils/build/server/cors.js +0 -179
  1548. package/node_modules/remix-utils/build/server/csrf.d.ts +0 -85
  1549. package/node_modules/remix-utils/build/server/csrf.js +0 -121
  1550. package/node_modules/remix-utils/build/server/event-stream.d.ts +0 -27
  1551. package/node_modules/remix-utils/build/server/event-stream.js +0 -44
  1552. package/node_modules/remix-utils/build/server/get-client-ip-address.d.ts +0 -29
  1553. package/node_modules/remix-utils/build/server/get-client-ip-address.js +0 -51
  1554. package/node_modules/remix-utils/build/server/get-client-locales.d.ts +0 -18
  1555. package/node_modules/remix-utils/build/server/get-client-locales.js +0 -18
  1556. package/node_modules/remix-utils/build/server/get-headers.d.ts +0 -6
  1557. package/node_modules/remix-utils/build/server/get-headers.js +0 -11
  1558. package/node_modules/remix-utils/build/server/honeypot.d.ts +0 -32
  1559. package/node_modules/remix-utils/build/server/honeypot.js +0 -96
  1560. package/node_modules/remix-utils/build/server/is-prefetch.d.ts +0 -16
  1561. package/node_modules/remix-utils/build/server/is-prefetch.js +0 -11
  1562. package/node_modules/remix-utils/build/server/json-hash.d.ts +0 -6
  1563. package/node_modules/remix-utils/build/server/json-hash.js +0 -16
  1564. package/node_modules/remix-utils/build/server/named-action.d.ts +0 -19
  1565. package/node_modules/remix-utils/build/server/named-action.js +0 -62
  1566. package/node_modules/remix-utils/build/server/parse-accept-header.d.ts +0 -12
  1567. package/node_modules/remix-utils/build/server/parse-accept-header.js +0 -17
  1568. package/node_modules/remix-utils/build/server/preload-route-assets.d.ts +0 -80
  1569. package/node_modules/remix-utils/build/server/preload-route-assets.js +0 -120
  1570. package/node_modules/remix-utils/build/server/redirect-back.d.ts +0 -18
  1571. package/node_modules/remix-utils/build/server/redirect-back.js +0 -29
  1572. package/node_modules/remix-utils/build/server/respond-to.d.ts +0 -40
  1573. package/node_modules/remix-utils/build/server/respond-to.js +0 -22
  1574. package/node_modules/remix-utils/build/server/responses.d.ts +0 -100
  1575. package/node_modules/remix-utils/build/server/responses.js +0 -167
  1576. package/node_modules/remix-utils/build/server/rolling-cookie.d.ts +0 -4
  1577. package/node_modules/remix-utils/build/server/rolling-cookie.js +0 -9
  1578. package/node_modules/remix-utils/build/server/safe-redirect.d.ts +0 -10
  1579. package/node_modules/remix-utils/build/server/safe-redirect.js +0 -22
  1580. package/node_modules/remix-utils/build/server/sec-fetch.d.ts +0 -43
  1581. package/node_modules/remix-utils/build/server/sec-fetch.js +0 -67
  1582. package/node_modules/remix-utils/build/server/typed-cookie.d.ts +0 -17
  1583. package/node_modules/remix-utils/build/server/typed-cookie.js +0 -58
  1584. package/node_modules/remix-utils/build/server/typed-session.d.ts +0 -59
  1585. package/node_modules/remix-utils/build/server/typed-session.js +0 -88
  1586. package/node_modules/remix-utils/package.json +0 -182
  1587. package/node_modules/remix-utils/scripts/check-pkg-exports.ts +0 -61
  1588. package/node_modules/set-cookie-parser/LICENSE +0 -21
  1589. package/node_modules/set-cookie-parser/README.md +0 -199
  1590. package/node_modules/set-cookie-parser/lib/set-cookie.js +0 -226
  1591. package/node_modules/set-cookie-parser/package.json +0 -43
  1592. package/node_modules/source-map/LICENSE +0 -28
  1593. package/node_modules/source-map/README.md +0 -742
  1594. package/node_modules/source-map/dist/source-map.debug.js +0 -3234
  1595. package/node_modules/source-map/dist/source-map.js +0 -3233
  1596. package/node_modules/source-map/dist/source-map.min.js +0 -2
  1597. package/node_modules/source-map/dist/source-map.min.js.map +0 -1
  1598. package/node_modules/source-map/lib/array-set.js +0 -121
  1599. package/node_modules/source-map/lib/base64-vlq.js +0 -140
  1600. package/node_modules/source-map/lib/base64.js +0 -67
  1601. package/node_modules/source-map/lib/binary-search.js +0 -111
  1602. package/node_modules/source-map/lib/mapping-list.js +0 -79
  1603. package/node_modules/source-map/lib/mappings.wasm +0 -0
  1604. package/node_modules/source-map/lib/quick-sort.js +0 -114
  1605. package/node_modules/source-map/lib/read-wasm.js +0 -49
  1606. package/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  1607. package/node_modules/source-map/lib/source-map-generator.js +0 -425
  1608. package/node_modules/source-map/lib/source-node.js +0 -413
  1609. package/node_modules/source-map/lib/util.js +0 -488
  1610. package/node_modules/source-map/lib/wasm.js +0 -107
  1611. package/node_modules/source-map/package.json +0 -73
  1612. package/node_modules/source-map/source-map.d.ts +0 -98
  1613. package/node_modules/source-map/source-map.js +0 -8
  1614. package/node_modules/tailwind-merge/LICENSE.md +0 -21
  1615. package/node_modules/tailwind-merge/README.md +0 -38
  1616. package/node_modules/tailwind-merge/dist/bundle-cjs.js +0 -2595
  1617. package/node_modules/tailwind-merge/dist/bundle-cjs.js.map +0 -1
  1618. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs +0 -2583
  1619. package/node_modules/tailwind-merge/dist/bundle-mjs.mjs.map +0 -1
  1620. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js +0 -2645
  1621. package/node_modules/tailwind-merge/dist/es5/bundle-cjs.js.map +0 -1
  1622. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs +0 -2633
  1623. package/node_modules/tailwind-merge/dist/es5/bundle-mjs.mjs.map +0 -1
  1624. package/node_modules/tailwind-merge/dist/types.d.ts +0 -2143
  1625. package/node_modules/tailwind-merge/package.json +0 -95
  1626. package/node_modules/tailwind-merge/src/index.ts +0 -14
  1627. package/node_modules/tailwind-merge/src/lib/class-utils.ts +0 -215
  1628. package/node_modules/tailwind-merge/src/lib/config-utils.ts +0 -14
  1629. package/node_modules/tailwind-merge/src/lib/create-tailwind-merge.ts +0 -50
  1630. package/node_modules/tailwind-merge/src/lib/default-config.ts +0 -1865
  1631. package/node_modules/tailwind-merge/src/lib/extend-tailwind-merge.ts +0 -26
  1632. package/node_modules/tailwind-merge/src/lib/from-theme.ts +0 -13
  1633. package/node_modules/tailwind-merge/src/lib/lru-cache.ts +0 -52
  1634. package/node_modules/tailwind-merge/src/lib/merge-classlist.ts +0 -99
  1635. package/node_modules/tailwind-merge/src/lib/merge-configs.ts +0 -72
  1636. package/node_modules/tailwind-merge/src/lib/modifier-utils.ts +0 -95
  1637. package/node_modules/tailwind-merge/src/lib/tw-join.ts +0 -50
  1638. package/node_modules/tailwind-merge/src/lib/tw-merge.ts +0 -4
  1639. package/node_modules/tailwind-merge/src/lib/types.ts +0 -412
  1640. package/node_modules/tailwind-merge/src/lib/validators.ts +0 -104
  1641. package/node_modules/tslib/CopyrightNotice.txt +0 -15
  1642. package/node_modules/tslib/LICENSE.txt +0 -12
  1643. package/node_modules/tslib/README.md +0 -164
  1644. package/node_modules/tslib/SECURITY.md +0 -41
  1645. package/node_modules/tslib/modules/index.d.ts +0 -37
  1646. package/node_modules/tslib/modules/index.js +0 -68
  1647. package/node_modules/tslib/modules/package.json +0 -3
  1648. package/node_modules/tslib/package.json +0 -47
  1649. package/node_modules/tslib/tslib.d.ts +0 -453
  1650. package/node_modules/tslib/tslib.es6.html +0 -1
  1651. package/node_modules/tslib/tslib.es6.js +0 -374
  1652. package/node_modules/tslib/tslib.es6.mjs +0 -373
  1653. package/node_modules/tslib/tslib.html +0 -1
  1654. package/node_modules/tslib/tslib.js +0 -424
  1655. package/node_modules/turbo-stream/LICENSE +0 -7
  1656. package/node_modules/turbo-stream/README.md +0 -31
  1657. package/node_modules/turbo-stream/dist/flatten.d.ts +0 -2
  1658. package/node_modules/turbo-stream/dist/flatten.js +0 -172
  1659. package/node_modules/turbo-stream/dist/turbo-stream.d.ts +0 -12
  1660. package/node_modules/turbo-stream/dist/turbo-stream.js +0 -202
  1661. package/node_modules/turbo-stream/dist/turbo-stream.mjs +0 -530
  1662. package/node_modules/turbo-stream/dist/unflatten.d.ts +0 -2
  1663. package/node_modules/turbo-stream/dist/unflatten.js +0 -127
  1664. package/node_modules/turbo-stream/dist/utils.d.ts +0 -43
  1665. package/node_modules/turbo-stream/dist/utils.js +0 -55
  1666. package/node_modules/turbo-stream/package.json +0 -50
  1667. package/node_modules/type-fest/index.d.ts +0 -160
  1668. package/node_modules/type-fest/package.json +0 -72
  1669. package/node_modules/type-fest/readme.md +0 -992
  1670. package/node_modules/type-fest/source/and.d.ts +0 -25
  1671. package/node_modules/type-fest/source/array-indices.d.ts +0 -23
  1672. package/node_modules/type-fest/source/array-slice.d.ts +0 -107
  1673. package/node_modules/type-fest/source/array-splice.d.ts +0 -97
  1674. package/node_modules/type-fest/source/array-values.d.ts +0 -22
  1675. package/node_modules/type-fest/source/async-return-type.d.ts +0 -23
  1676. package/node_modules/type-fest/source/asyncify.d.ts +0 -32
  1677. package/node_modules/type-fest/source/basic.d.ts +0 -68
  1678. package/node_modules/type-fest/source/camel-case.d.ts +0 -80
  1679. package/node_modules/type-fest/source/camel-cased-properties-deep.d.ts +0 -87
  1680. package/node_modules/type-fest/source/camel-cased-properties.d.ts +0 -36
  1681. package/node_modules/type-fest/source/conditional-except.d.ts +0 -45
  1682. package/node_modules/type-fest/source/conditional-keys.d.ts +0 -47
  1683. package/node_modules/type-fest/source/conditional-pick-deep.d.ts +0 -104
  1684. package/node_modules/type-fest/source/conditional-pick.d.ts +0 -44
  1685. package/node_modules/type-fest/source/conditional-simplify.d.ts +0 -32
  1686. package/node_modules/type-fest/source/delimiter-case.d.ts +0 -99
  1687. package/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts +0 -84
  1688. package/node_modules/type-fest/source/delimiter-cased-properties.d.ts +0 -37
  1689. package/node_modules/type-fest/source/distributed-omit.d.ts +0 -89
  1690. package/node_modules/type-fest/source/distributed-pick.d.ts +0 -85
  1691. package/node_modules/type-fest/source/empty-object.d.ts +0 -46
  1692. package/node_modules/type-fest/source/enforce-optional.d.ts +0 -47
  1693. package/node_modules/type-fest/source/entries.d.ts +0 -62
  1694. package/node_modules/type-fest/source/entry.d.ts +0 -65
  1695. package/node_modules/type-fest/source/exact.d.ts +0 -63
  1696. package/node_modules/type-fest/source/except.d.ts +0 -80
  1697. package/node_modules/type-fest/source/fixed-length-array.d.ts +0 -43
  1698. package/node_modules/type-fest/source/get.d.ts +0 -191
  1699. package/node_modules/type-fest/source/global-this.d.ts +0 -21
  1700. package/node_modules/type-fest/source/greater-than-or-equal.d.ts +0 -22
  1701. package/node_modules/type-fest/source/greater-than.d.ts +0 -51
  1702. package/node_modules/type-fest/source/has-optional-keys.d.ts +0 -21
  1703. package/node_modules/type-fest/source/has-readonly-keys.d.ts +0 -21
  1704. package/node_modules/type-fest/source/has-required-keys.d.ts +0 -59
  1705. package/node_modules/type-fest/source/has-writable-keys.d.ts +0 -21
  1706. package/node_modules/type-fest/source/if-any.d.ts +0 -24
  1707. package/node_modules/type-fest/source/if-empty-object.d.ts +0 -26
  1708. package/node_modules/type-fest/source/if-never.d.ts +0 -24
  1709. package/node_modules/type-fest/source/if-null.d.ts +0 -24
  1710. package/node_modules/type-fest/source/if-unknown.d.ts +0 -24
  1711. package/node_modules/type-fest/source/includes.d.ts +0 -22
  1712. package/node_modules/type-fest/source/int-range.d.ts +0 -53
  1713. package/node_modules/type-fest/source/internal.d.ts +0 -783
  1714. package/node_modules/type-fest/source/invariant-of.d.ts +0 -78
  1715. package/node_modules/type-fest/source/is-any.d.ts +0 -29
  1716. package/node_modules/type-fest/source/is-equal.d.ts +0 -31
  1717. package/node_modules/type-fest/source/is-float.d.ts +0 -33
  1718. package/node_modules/type-fest/source/is-integer.d.ts +0 -48
  1719. package/node_modules/type-fest/source/is-literal.d.ts +0 -258
  1720. package/node_modules/type-fest/source/is-never.d.ts +0 -42
  1721. package/node_modules/type-fest/source/is-null.d.ts +0 -20
  1722. package/node_modules/type-fest/source/is-unknown.d.ts +0 -52
  1723. package/node_modules/type-fest/source/iterable-element.d.ts +0 -54
  1724. package/node_modules/type-fest/source/join.d.ts +0 -68
  1725. package/node_modules/type-fest/source/jsonifiable.d.ts +0 -37
  1726. package/node_modules/type-fest/source/jsonify.d.ts +0 -121
  1727. package/node_modules/type-fest/source/kebab-case.d.ts +0 -38
  1728. package/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts +0 -47
  1729. package/node_modules/type-fest/source/kebab-cased-properties.d.ts +0 -30
  1730. package/node_modules/type-fest/source/keys-of-union.d.ts +0 -40
  1731. package/node_modules/type-fest/source/last-array-element.d.ts +0 -38
  1732. package/node_modules/type-fest/source/less-than-or-equal.d.ts +0 -22
  1733. package/node_modules/type-fest/source/less-than.d.ts +0 -22
  1734. package/node_modules/type-fest/source/literal-to-primitive-deep.d.ts +0 -36
  1735. package/node_modules/type-fest/source/literal-to-primitive.d.ts +0 -36
  1736. package/node_modules/type-fest/source/literal-union.d.ts +0 -35
  1737. package/node_modules/type-fest/source/merge-deep.d.ts +0 -486
  1738. package/node_modules/type-fest/source/merge-exclusive.d.ts +0 -41
  1739. package/node_modules/type-fest/source/merge.d.ts +0 -48
  1740. package/node_modules/type-fest/source/multidimensional-array.d.ts +0 -44
  1741. package/node_modules/type-fest/source/multidimensional-readonly-array.d.ts +0 -48
  1742. package/node_modules/type-fest/source/non-empty-object.d.ts +0 -35
  1743. package/node_modules/type-fest/source/numeric.d.ts +0 -222
  1744. package/node_modules/type-fest/source/observable-like.d.ts +0 -63
  1745. package/node_modules/type-fest/source/omit-deep.d.ts +0 -140
  1746. package/node_modules/type-fest/source/omit-index-signature.d.ts +0 -107
  1747. package/node_modules/type-fest/source/opaque.d.ts +0 -252
  1748. package/node_modules/type-fest/source/optional-keys-of.d.ts +0 -38
  1749. package/node_modules/type-fest/source/or.d.ts +0 -25
  1750. package/node_modules/type-fest/source/override-properties.d.ts +0 -36
  1751. package/node_modules/type-fest/source/package-json.d.ts +0 -676
  1752. package/node_modules/type-fest/source/partial-deep.d.ts +0 -109
  1753. package/node_modules/type-fest/source/partial-on-undefined-deep.d.ts +0 -71
  1754. package/node_modules/type-fest/source/pascal-case.d.ts +0 -38
  1755. package/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts +0 -55
  1756. package/node_modules/type-fest/source/pascal-cased-properties.d.ts +0 -35
  1757. package/node_modules/type-fest/source/paths.d.ts +0 -85
  1758. package/node_modules/type-fest/source/pick-deep.d.ts +0 -149
  1759. package/node_modules/type-fest/source/pick-index-signature.d.ts +0 -102
  1760. package/node_modules/type-fest/source/primitive.d.ts +0 -13
  1761. package/node_modules/type-fest/source/promisable.d.ts +0 -25
  1762. package/node_modules/type-fest/source/readonly-deep.d.ts +0 -81
  1763. package/node_modules/type-fest/source/readonly-keys-of.d.ts +0 -29
  1764. package/node_modules/type-fest/source/readonly-tuple.d.ts +0 -41
  1765. package/node_modules/type-fest/source/replace.d.ts +0 -67
  1766. package/node_modules/type-fest/source/require-all-or-none.d.ts +0 -42
  1767. package/node_modules/type-fest/source/require-at-least-one.d.ts +0 -34
  1768. package/node_modules/type-fest/source/require-exactly-one.d.ts +0 -34
  1769. package/node_modules/type-fest/source/require-one-or-none.d.ts +0 -37
  1770. package/node_modules/type-fest/source/required-deep.d.ts +0 -78
  1771. package/node_modules/type-fest/source/required-keys-of.d.ts +0 -29
  1772. package/node_modules/type-fest/source/schema.d.ts +0 -71
  1773. package/node_modules/type-fest/source/screaming-snake-case.d.ts +0 -33
  1774. package/node_modules/type-fest/source/set-field-type.d.ts +0 -37
  1775. package/node_modules/type-fest/source/set-non-nullable.d.ts +0 -39
  1776. package/node_modules/type-fest/source/set-optional.d.ts +0 -35
  1777. package/node_modules/type-fest/source/set-parameter-type.d.ts +0 -117
  1778. package/node_modules/type-fest/source/set-readonly.d.ts +0 -38
  1779. package/node_modules/type-fest/source/set-required.d.ts +0 -40
  1780. package/node_modules/type-fest/source/set-return-type.d.ts +0 -29
  1781. package/node_modules/type-fest/source/shared-union-fields-deep.d.ts +0 -168
  1782. package/node_modules/type-fest/source/simplify-deep.d.ts +0 -115
  1783. package/node_modules/type-fest/source/simplify.d.ts +0 -58
  1784. package/node_modules/type-fest/source/single-key-object.d.ts +0 -29
  1785. package/node_modules/type-fest/source/snake-case.d.ts +0 -38
  1786. package/node_modules/type-fest/source/snake-cased-properties-deep.d.ts +0 -47
  1787. package/node_modules/type-fest/source/snake-cased-properties.d.ts +0 -30
  1788. package/node_modules/type-fest/source/split-words.d.ts +0 -57
  1789. package/node_modules/type-fest/source/split.d.ts +0 -29
  1790. package/node_modules/type-fest/source/spread.d.ts +0 -85
  1791. package/node_modules/type-fest/source/string-key-of.d.ts +0 -25
  1792. package/node_modules/type-fest/source/string-slice.d.ts +0 -37
  1793. package/node_modules/type-fest/source/stringified.d.ts +0 -23
  1794. package/node_modules/type-fest/source/subtract.d.ts +0 -70
  1795. package/node_modules/type-fest/source/sum.d.ts +0 -70
  1796. package/node_modules/type-fest/source/tagged-union.d.ts +0 -51
  1797. package/node_modules/type-fest/source/trim.d.ts +0 -27
  1798. package/node_modules/type-fest/source/tsconfig-json.d.ts +0 -1198
  1799. package/node_modules/type-fest/source/tuple-to-union.d.ts +0 -51
  1800. package/node_modules/type-fest/source/typed-array.d.ts +0 -17
  1801. package/node_modules/type-fest/source/undefined-on-partial-deep.d.ts +0 -81
  1802. package/node_modules/type-fest/source/union-to-intersection.d.ts +0 -61
  1803. package/node_modules/type-fest/source/unknown-array.d.ts +0 -25
  1804. package/node_modules/type-fest/source/unknown-record.d.ts +0 -31
  1805. package/node_modules/type-fest/source/value-of.d.ts +0 -42
  1806. package/node_modules/type-fest/source/writable-deep.d.ts +0 -83
  1807. package/node_modules/type-fest/source/writable-keys-of.d.ts +0 -30
  1808. package/node_modules/type-fest/source/writable.d.ts +0 -68
  1809. package/node_modules/use-callback-ref/LICENSE +0 -21
  1810. package/node_modules/use-callback-ref/README.md +0 -170
  1811. package/node_modules/use-callback-ref/dist/es2015/assignRef.d.ts +0 -15
  1812. package/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -22
  1813. package/node_modules/use-callback-ref/dist/es2015/createRef.d.ts +0 -10
  1814. package/node_modules/use-callback-ref/dist/es2015/createRef.js +0 -23
  1815. package/node_modules/use-callback-ref/dist/es2015/index.d.ts +0 -8
  1816. package/node_modules/use-callback-ref/dist/es2015/index.js +0 -12
  1817. package/node_modules/use-callback-ref/dist/es2015/mergeRef.d.ts +0 -16
  1818. package/node_modules/use-callback-ref/dist/es2015/mergeRef.js +0 -18
  1819. package/node_modules/use-callback-ref/dist/es2015/refToCallback.d.ts +0 -24
  1820. package/node_modules/use-callback-ref/dist/es2015/refToCallback.js +0 -48
  1821. package/node_modules/use-callback-ref/dist/es2015/transformRef.d.ts +0 -11
  1822. package/node_modules/use-callback-ref/dist/es2015/transformRef.js +0 -14
  1823. package/node_modules/use-callback-ref/dist/es2015/types.d.ts +0 -5
  1824. package/node_modules/use-callback-ref/dist/es2015/types.js +0 -1
  1825. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.d.ts +0 -17
  1826. package/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -45
  1827. package/node_modules/use-callback-ref/dist/es2015/useRef.d.ts +0 -16
  1828. package/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -39
  1829. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.d.ts +0 -15
  1830. package/node_modules/use-callback-ref/dist/es2015/useTransformRef.js +0 -18
  1831. package/node_modules/use-callback-ref/dist/es2019/assignRef.d.ts +0 -15
  1832. package/node_modules/use-callback-ref/dist/es2019/assignRef.js +0 -22
  1833. package/node_modules/use-callback-ref/dist/es2019/createRef.d.ts +0 -10
  1834. package/node_modules/use-callback-ref/dist/es2019/createRef.js +0 -23
  1835. package/node_modules/use-callback-ref/dist/es2019/index.d.ts +0 -8
  1836. package/node_modules/use-callback-ref/dist/es2019/index.js +0 -12
  1837. package/node_modules/use-callback-ref/dist/es2019/mergeRef.d.ts +0 -16
  1838. package/node_modules/use-callback-ref/dist/es2019/mergeRef.js +0 -18
  1839. package/node_modules/use-callback-ref/dist/es2019/refToCallback.d.ts +0 -24
  1840. package/node_modules/use-callback-ref/dist/es2019/refToCallback.js +0 -48
  1841. package/node_modules/use-callback-ref/dist/es2019/transformRef.d.ts +0 -11
  1842. package/node_modules/use-callback-ref/dist/es2019/transformRef.js +0 -14
  1843. package/node_modules/use-callback-ref/dist/es2019/types.d.ts +0 -5
  1844. package/node_modules/use-callback-ref/dist/es2019/types.js +0 -1
  1845. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.d.ts +0 -17
  1846. package/node_modules/use-callback-ref/dist/es2019/useMergeRef.js +0 -43
  1847. package/node_modules/use-callback-ref/dist/es2019/useRef.d.ts +0 -16
  1848. package/node_modules/use-callback-ref/dist/es2019/useRef.js +0 -39
  1849. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.d.ts +0 -15
  1850. package/node_modules/use-callback-ref/dist/es2019/useTransformRef.js +0 -18
  1851. package/node_modules/use-callback-ref/dist/es5/assignRef.d.ts +0 -15
  1852. package/node_modules/use-callback-ref/dist/es5/assignRef.js +0 -26
  1853. package/node_modules/use-callback-ref/dist/es5/createRef.d.ts +0 -10
  1854. package/node_modules/use-callback-ref/dist/es5/createRef.js +0 -27
  1855. package/node_modules/use-callback-ref/dist/es5/index.d.ts +0 -8
  1856. package/node_modules/use-callback-ref/dist/es5/index.js +0 -24
  1857. package/node_modules/use-callback-ref/dist/es5/mergeRef.d.ts +0 -16
  1858. package/node_modules/use-callback-ref/dist/es5/mergeRef.js +0 -22
  1859. package/node_modules/use-callback-ref/dist/es5/refToCallback.d.ts +0 -24
  1860. package/node_modules/use-callback-ref/dist/es5/refToCallback.js +0 -53
  1861. package/node_modules/use-callback-ref/dist/es5/transformRef.d.ts +0 -11
  1862. package/node_modules/use-callback-ref/dist/es5/transformRef.js +0 -18
  1863. package/node_modules/use-callback-ref/dist/es5/types.d.ts +0 -5
  1864. package/node_modules/use-callback-ref/dist/es5/types.js +0 -2
  1865. package/node_modules/use-callback-ref/dist/es5/useMergeRef.d.ts +0 -17
  1866. package/node_modules/use-callback-ref/dist/es5/useMergeRef.js +0 -50
  1867. package/node_modules/use-callback-ref/dist/es5/useRef.d.ts +0 -16
  1868. package/node_modules/use-callback-ref/dist/es5/useRef.js +0 -43
  1869. package/node_modules/use-callback-ref/dist/es5/useTransformRef.d.ts +0 -15
  1870. package/node_modules/use-callback-ref/dist/es5/useTransformRef.js +0 -22
  1871. package/node_modules/use-callback-ref/package.json +0 -84
  1872. package/node_modules/use-sidecar/LICENSE +0 -21
  1873. package/node_modules/use-sidecar/README.md +0 -349
  1874. package/node_modules/use-sidecar/dist/es2015/config.d.ts +0 -5
  1875. package/node_modules/use-sidecar/dist/es2015/config.js +0 -6
  1876. package/node_modules/use-sidecar/dist/es2015/env.d.ts +0 -4
  1877. package/node_modules/use-sidecar/dist/es2015/env.js +0 -5
  1878. package/node_modules/use-sidecar/dist/es2015/exports.d.ts +0 -3
  1879. package/node_modules/use-sidecar/dist/es2015/exports.js +0 -18
  1880. package/node_modules/use-sidecar/dist/es2015/hoc.d.ts +0 -3
  1881. package/node_modules/use-sidecar/dist/es2015/hoc.js +0 -15
  1882. package/node_modules/use-sidecar/dist/es2015/hook.d.ts +0 -2
  1883. package/node_modules/use-sidecar/dist/es2015/hook.js +0 -41
  1884. package/node_modules/use-sidecar/dist/es2015/index.d.ts +0 -7
  1885. package/node_modules/use-sidecar/dist/es2015/index.js +0 -6
  1886. package/node_modules/use-sidecar/dist/es2015/medium.d.ts +0 -3
  1887. package/node_modules/use-sidecar/dist/es2015/medium.js +0 -78
  1888. package/node_modules/use-sidecar/dist/es2015/renderProp.d.ts +0 -8
  1889. package/node_modules/use-sidecar/dist/es2015/renderProp.js +0 -35
  1890. package/node_modules/use-sidecar/dist/es2015/types.d.ts +0 -47
  1891. package/node_modules/use-sidecar/dist/es2015/types.js +0 -1
  1892. package/node_modules/use-sidecar/dist/es2019/config.d.ts +0 -5
  1893. package/node_modules/use-sidecar/dist/es2019/config.js +0 -6
  1894. package/node_modules/use-sidecar/dist/es2019/env.d.ts +0 -4
  1895. package/node_modules/use-sidecar/dist/es2019/env.js +0 -5
  1896. package/node_modules/use-sidecar/dist/es2019/exports.d.ts +0 -3
  1897. package/node_modules/use-sidecar/dist/es2019/exports.js +0 -16
  1898. package/node_modules/use-sidecar/dist/es2019/hoc.d.ts +0 -3
  1899. package/node_modules/use-sidecar/dist/es2019/hoc.js +0 -14
  1900. package/node_modules/use-sidecar/dist/es2019/hook.d.ts +0 -2
  1901. package/node_modules/use-sidecar/dist/es2019/hook.js +0 -41
  1902. package/node_modules/use-sidecar/dist/es2019/index.d.ts +0 -7
  1903. package/node_modules/use-sidecar/dist/es2019/index.js +0 -6
  1904. package/node_modules/use-sidecar/dist/es2019/medium.d.ts +0 -3
  1905. package/node_modules/use-sidecar/dist/es2019/medium.js +0 -78
  1906. package/node_modules/use-sidecar/dist/es2019/renderProp.d.ts +0 -8
  1907. package/node_modules/use-sidecar/dist/es2019/renderProp.js +0 -28
  1908. package/node_modules/use-sidecar/dist/es2019/types.d.ts +0 -47
  1909. package/node_modules/use-sidecar/dist/es2019/types.js +0 -1
  1910. package/node_modules/use-sidecar/dist/es5/config.d.ts +0 -5
  1911. package/node_modules/use-sidecar/dist/es5/config.js +0 -10
  1912. package/node_modules/use-sidecar/dist/es5/env.d.ts +0 -4
  1913. package/node_modules/use-sidecar/dist/es5/env.js +0 -8
  1914. package/node_modules/use-sidecar/dist/es5/exports.d.ts +0 -3
  1915. package/node_modules/use-sidecar/dist/es5/exports.js +0 -22
  1916. package/node_modules/use-sidecar/dist/es5/hoc.d.ts +0 -3
  1917. package/node_modules/use-sidecar/dist/es5/hoc.js +0 -19
  1918. package/node_modules/use-sidecar/dist/es5/hook.d.ts +0 -2
  1919. package/node_modules/use-sidecar/dist/es5/hook.js +0 -45
  1920. package/node_modules/use-sidecar/dist/es5/index.d.ts +0 -7
  1921. package/node_modules/use-sidecar/dist/es5/index.js +0 -16
  1922. package/node_modules/use-sidecar/dist/es5/medium.d.ts +0 -3
  1923. package/node_modules/use-sidecar/dist/es5/medium.js +0 -83
  1924. package/node_modules/use-sidecar/dist/es5/renderProp.d.ts +0 -8
  1925. package/node_modules/use-sidecar/dist/es5/renderProp.js +0 -39
  1926. package/node_modules/use-sidecar/dist/es5/types.d.ts +0 -47
  1927. package/node_modules/use-sidecar/dist/es5/types.js +0 -2
  1928. package/node_modules/use-sidecar/package.json +0 -89
  1929. package/node_modules/zod/LICENSE +0 -21
  1930. package/node_modules/zod/README.md +0 -2876
  1931. package/node_modules/zod/index.d.ts +0 -2
  1932. package/node_modules/zod/lib/ZodError.d.ts +0 -164
  1933. package/node_modules/zod/lib/ZodError.js +0 -137
  1934. package/node_modules/zod/lib/__tests__/Mocker.d.ts +0 -17
  1935. package/node_modules/zod/lib/__tests__/Mocker.js +0 -57
  1936. package/node_modules/zod/lib/benchmarks/datetime.d.ts +0 -5
  1937. package/node_modules/zod/lib/benchmarks/datetime.js +0 -54
  1938. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +0 -5
  1939. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +0 -79
  1940. package/node_modules/zod/lib/benchmarks/index.d.ts +0 -1
  1941. package/node_modules/zod/lib/benchmarks/index.js +0 -59
  1942. package/node_modules/zod/lib/benchmarks/ipv4.d.ts +0 -5
  1943. package/node_modules/zod/lib/benchmarks/ipv4.js +0 -54
  1944. package/node_modules/zod/lib/benchmarks/object.d.ts +0 -5
  1945. package/node_modules/zod/lib/benchmarks/object.js +0 -70
  1946. package/node_modules/zod/lib/benchmarks/primitives.d.ts +0 -5
  1947. package/node_modules/zod/lib/benchmarks/primitives.js +0 -170
  1948. package/node_modules/zod/lib/benchmarks/realworld.d.ts +0 -5
  1949. package/node_modules/zod/lib/benchmarks/realworld.js +0 -56
  1950. package/node_modules/zod/lib/benchmarks/string.d.ts +0 -5
  1951. package/node_modules/zod/lib/benchmarks/string.js +0 -55
  1952. package/node_modules/zod/lib/benchmarks/union.d.ts +0 -5
  1953. package/node_modules/zod/lib/benchmarks/union.js +0 -79
  1954. package/node_modules/zod/lib/errors.d.ts +0 -5
  1955. package/node_modules/zod/lib/errors.js +0 -17
  1956. package/node_modules/zod/lib/external.d.ts +0 -6
  1957. package/node_modules/zod/lib/external.js +0 -18
  1958. package/node_modules/zod/lib/helpers/enumUtil.d.ts +0 -8
  1959. package/node_modules/zod/lib/helpers/enumUtil.js +0 -2
  1960. package/node_modules/zod/lib/helpers/errorUtil.d.ts +0 -9
  1961. package/node_modules/zod/lib/helpers/errorUtil.js +0 -8
  1962. package/node_modules/zod/lib/helpers/parseUtil.d.ts +0 -78
  1963. package/node_modules/zod/lib/helpers/parseUtil.js +0 -125
  1964. package/node_modules/zod/lib/helpers/partialUtil.d.ts +0 -8
  1965. package/node_modules/zod/lib/helpers/partialUtil.js +0 -2
  1966. package/node_modules/zod/lib/helpers/typeAliases.d.ts +0 -2
  1967. package/node_modules/zod/lib/helpers/typeAliases.js +0 -2
  1968. package/node_modules/zod/lib/helpers/util.d.ts +0 -82
  1969. package/node_modules/zod/lib/helpers/util.js +0 -142
  1970. package/node_modules/zod/lib/index.d.ts +0 -4
  1971. package/node_modules/zod/lib/index.js +0 -29
  1972. package/node_modules/zod/lib/index.mjs +0 -4236
  1973. package/node_modules/zod/lib/index.umd.js +0 -4351
  1974. package/node_modules/zod/lib/locales/en.d.ts +0 -3
  1975. package/node_modules/zod/lib/locales/en.js +0 -129
  1976. package/node_modules/zod/lib/types.d.ts +0 -1127
  1977. package/node_modules/zod/lib/types.js +0 -3677
  1978. package/node_modules/zod/package.json +0 -119
@@ -1,4856 +0,0 @@
1
- /**
2
- * @remix-run/router v1.17.0
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
- function _extends() {
12
- _extends = Object.assign ? Object.assign.bind() : function (target) {
13
- for (var i = 1; i < arguments.length; i++) {
14
- var source = arguments[i];
15
- for (var key in source) {
16
- if (Object.prototype.hasOwnProperty.call(source, key)) {
17
- target[key] = source[key];
18
- }
19
- }
20
- }
21
- return target;
22
- };
23
- return _extends.apply(this, arguments);
24
- }
25
-
26
- ////////////////////////////////////////////////////////////////////////////////
27
- //#region Types and Constants
28
- ////////////////////////////////////////////////////////////////////////////////
29
- /**
30
- * Actions represent the type of change to a location value.
31
- */
32
- var Action;
33
- (function (Action) {
34
- /**
35
- * A POP indicates a change to an arbitrary index in the history stack, such
36
- * as a back or forward navigation. It does not describe the direction of the
37
- * navigation, only that the current index changed.
38
- *
39
- * Note: This is the default action for newly created history objects.
40
- */
41
- Action["Pop"] = "POP";
42
- /**
43
- * A PUSH indicates a new entry being added to the history stack, such as when
44
- * a link is clicked and a new page loads. When this happens, all subsequent
45
- * entries in the stack are lost.
46
- */
47
- Action["Push"] = "PUSH";
48
- /**
49
- * A REPLACE indicates the entry at the current index in the history stack
50
- * being replaced by a new one.
51
- */
52
- Action["Replace"] = "REPLACE";
53
- })(Action || (Action = {}));
54
- const PopStateEventType = "popstate";
55
- /**
56
- * Memory history stores the current location in memory. It is designed for use
57
- * in stateful non-browser environments like tests and React Native.
58
- */
59
- function createMemoryHistory(options) {
60
- if (options === void 0) {
61
- options = {};
62
- }
63
- let {
64
- initialEntries = ["/"],
65
- initialIndex,
66
- v5Compat = false
67
- } = options;
68
- let entries; // Declare so we can access from createMemoryLocation
69
- entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === "string" ? null : entry.state, index === 0 ? "default" : undefined));
70
- let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);
71
- let action = Action.Pop;
72
- let listener = null;
73
- function clampIndex(n) {
74
- return Math.min(Math.max(n, 0), entries.length - 1);
75
- }
76
- function getCurrentLocation() {
77
- return entries[index];
78
- }
79
- function createMemoryLocation(to, state, key) {
80
- if (state === void 0) {
81
- state = null;
82
- }
83
- let location = createLocation(entries ? getCurrentLocation().pathname : "/", to, state, key);
84
- warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in memory history: " + JSON.stringify(to));
85
- return location;
86
- }
87
- function createHref(to) {
88
- return typeof to === "string" ? to : createPath(to);
89
- }
90
- let history = {
91
- get index() {
92
- return index;
93
- },
94
- get action() {
95
- return action;
96
- },
97
- get location() {
98
- return getCurrentLocation();
99
- },
100
- createHref,
101
- createURL(to) {
102
- return new URL(createHref(to), "http://localhost");
103
- },
104
- encodeLocation(to) {
105
- let path = typeof to === "string" ? parsePath(to) : to;
106
- return {
107
- pathname: path.pathname || "",
108
- search: path.search || "",
109
- hash: path.hash || ""
110
- };
111
- },
112
- push(to, state) {
113
- action = Action.Push;
114
- let nextLocation = createMemoryLocation(to, state);
115
- index += 1;
116
- entries.splice(index, entries.length, nextLocation);
117
- if (v5Compat && listener) {
118
- listener({
119
- action,
120
- location: nextLocation,
121
- delta: 1
122
- });
123
- }
124
- },
125
- replace(to, state) {
126
- action = Action.Replace;
127
- let nextLocation = createMemoryLocation(to, state);
128
- entries[index] = nextLocation;
129
- if (v5Compat && listener) {
130
- listener({
131
- action,
132
- location: nextLocation,
133
- delta: 0
134
- });
135
- }
136
- },
137
- go(delta) {
138
- action = Action.Pop;
139
- let nextIndex = clampIndex(index + delta);
140
- let nextLocation = entries[nextIndex];
141
- index = nextIndex;
142
- if (listener) {
143
- listener({
144
- action,
145
- location: nextLocation,
146
- delta
147
- });
148
- }
149
- },
150
- listen(fn) {
151
- listener = fn;
152
- return () => {
153
- listener = null;
154
- };
155
- }
156
- };
157
- return history;
158
- }
159
- /**
160
- * Browser history stores the location in regular URLs. This is the standard for
161
- * most web apps, but it requires some configuration on the server to ensure you
162
- * serve the same app at multiple URLs.
163
- *
164
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
165
- */
166
- function createBrowserHistory(options) {
167
- if (options === void 0) {
168
- options = {};
169
- }
170
- function createBrowserLocation(window, globalHistory) {
171
- let {
172
- pathname,
173
- search,
174
- hash
175
- } = window.location;
176
- return createLocation("", {
177
- pathname,
178
- search,
179
- hash
180
- },
181
- // state defaults to `null` because `window.history.state` does
182
- globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
183
- }
184
- function createBrowserHref(window, to) {
185
- return typeof to === "string" ? to : createPath(to);
186
- }
187
- return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
188
- }
189
- /**
190
- * Hash history stores the location in window.location.hash. This makes it ideal
191
- * for situations where you don't want to send the location to the server for
192
- * some reason, either because you do cannot configure it or the URL space is
193
- * reserved for something else.
194
- *
195
- * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
196
- */
197
- function createHashHistory(options) {
198
- if (options === void 0) {
199
- options = {};
200
- }
201
- function createHashLocation(window, globalHistory) {
202
- let {
203
- pathname = "/",
204
- search = "",
205
- hash = ""
206
- } = parsePath(window.location.hash.substr(1));
207
- // Hash URL should always have a leading / just like window.location.pathname
208
- // does, so if an app ends up at a route like /#something then we add a
209
- // leading slash so all of our path-matching behaves the same as if it would
210
- // in a browser router. This is particularly important when there exists a
211
- // root splat route (<Route path="*">) since that matches internally against
212
- // "/*" and we'd expect /#something to 404 in a hash router app.
213
- if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
214
- pathname = "/" + pathname;
215
- }
216
- return createLocation("", {
217
- pathname,
218
- search,
219
- hash
220
- },
221
- // state defaults to `null` because `window.history.state` does
222
- globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || "default");
223
- }
224
- function createHashHref(window, to) {
225
- let base = window.document.querySelector("base");
226
- let href = "";
227
- if (base && base.getAttribute("href")) {
228
- let url = window.location.href;
229
- let hashIndex = url.indexOf("#");
230
- href = hashIndex === -1 ? url : url.slice(0, hashIndex);
231
- }
232
- return href + "#" + (typeof to === "string" ? to : createPath(to));
233
- }
234
- function validateHashLocation(location, to) {
235
- warning(location.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");
236
- }
237
- return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);
238
- }
239
- function invariant(value, message) {
240
- if (value === false || value === null || typeof value === "undefined") {
241
- throw new Error(message);
242
- }
243
- }
244
- function warning(cond, message) {
245
- if (!cond) {
246
- // eslint-disable-next-line no-console
247
- if (typeof console !== "undefined") console.warn(message);
248
- try {
249
- // Welcome to debugging history!
250
- //
251
- // This error is thrown as a convenience, so you can more easily
252
- // find the source for a warning that appears in the console by
253
- // enabling "pause on exceptions" in your JavaScript debugger.
254
- throw new Error(message);
255
- // eslint-disable-next-line no-empty
256
- } catch (e) {}
257
- }
258
- }
259
- function createKey() {
260
- return Math.random().toString(36).substr(2, 8);
261
- }
262
- /**
263
- * For browser-based histories, we combine the state and key into an object
264
- */
265
- function getHistoryState(location, index) {
266
- return {
267
- usr: location.state,
268
- key: location.key,
269
- idx: index
270
- };
271
- }
272
- /**
273
- * Creates a Location object with a unique key from the given Path
274
- */
275
- function createLocation(current, to, state, key) {
276
- if (state === void 0) {
277
- state = null;
278
- }
279
- let location = _extends({
280
- pathname: typeof current === "string" ? current : current.pathname,
281
- search: "",
282
- hash: ""
283
- }, typeof to === "string" ? parsePath(to) : to, {
284
- state,
285
- // TODO: This could be cleaned up. push/replace should probably just take
286
- // full Locations now and avoid the need to run through this flow at all
287
- // But that's a pretty big refactor to the current test suite so going to
288
- // keep as is for the time being and just let any incoming keys take precedence
289
- key: to && to.key || key || createKey()
290
- });
291
- return location;
292
- }
293
- /**
294
- * Creates a string URL path from the given pathname, search, and hash components.
295
- */
296
- function createPath(_ref) {
297
- let {
298
- pathname = "/",
299
- search = "",
300
- hash = ""
301
- } = _ref;
302
- if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
303
- if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
304
- return pathname;
305
- }
306
- /**
307
- * Parses a string URL path into its separate pathname, search, and hash components.
308
- */
309
- function parsePath(path) {
310
- let parsedPath = {};
311
- if (path) {
312
- let hashIndex = path.indexOf("#");
313
- if (hashIndex >= 0) {
314
- parsedPath.hash = path.substr(hashIndex);
315
- path = path.substr(0, hashIndex);
316
- }
317
- let searchIndex = path.indexOf("?");
318
- if (searchIndex >= 0) {
319
- parsedPath.search = path.substr(searchIndex);
320
- path = path.substr(0, searchIndex);
321
- }
322
- if (path) {
323
- parsedPath.pathname = path;
324
- }
325
- }
326
- return parsedPath;
327
- }
328
- function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
329
- if (options === void 0) {
330
- options = {};
331
- }
332
- let {
333
- window = document.defaultView,
334
- v5Compat = false
335
- } = options;
336
- let globalHistory = window.history;
337
- let action = Action.Pop;
338
- let listener = null;
339
- let index = getIndex();
340
- // Index should only be null when we initialize. If not, it's because the
341
- // user called history.pushState or history.replaceState directly, in which
342
- // case we should log a warning as it will result in bugs.
343
- if (index == null) {
344
- index = 0;
345
- globalHistory.replaceState(_extends({}, globalHistory.state, {
346
- idx: index
347
- }), "");
348
- }
349
- function getIndex() {
350
- let state = globalHistory.state || {
351
- idx: null
352
- };
353
- return state.idx;
354
- }
355
- function handlePop() {
356
- action = Action.Pop;
357
- let nextIndex = getIndex();
358
- let delta = nextIndex == null ? null : nextIndex - index;
359
- index = nextIndex;
360
- if (listener) {
361
- listener({
362
- action,
363
- location: history.location,
364
- delta
365
- });
366
- }
367
- }
368
- function push(to, state) {
369
- action = Action.Push;
370
- let location = createLocation(history.location, to, state);
371
- if (validateLocation) validateLocation(location, to);
372
- index = getIndex() + 1;
373
- let historyState = getHistoryState(location, index);
374
- let url = history.createHref(location);
375
- // try...catch because iOS limits us to 100 pushState calls :/
376
- try {
377
- globalHistory.pushState(historyState, "", url);
378
- } catch (error) {
379
- // If the exception is because `state` can't be serialized, let that throw
380
- // outwards just like a replace call would so the dev knows the cause
381
- // https://html.spec.whatwg.org/multipage/nav-history-apis.html#shared-history-push/replace-state-steps
382
- // https://html.spec.whatwg.org/multipage/structured-data.html#structuredserializeinternal
383
- if (error instanceof DOMException && error.name === "DataCloneError") {
384
- throw error;
385
- }
386
- // They are going to lose state here, but there is no real
387
- // way to warn them about it since the page will refresh...
388
- window.location.assign(url);
389
- }
390
- if (v5Compat && listener) {
391
- listener({
392
- action,
393
- location: history.location,
394
- delta: 1
395
- });
396
- }
397
- }
398
- function replace(to, state) {
399
- action = Action.Replace;
400
- let location = createLocation(history.location, to, state);
401
- if (validateLocation) validateLocation(location, to);
402
- index = getIndex();
403
- let historyState = getHistoryState(location, index);
404
- let url = history.createHref(location);
405
- globalHistory.replaceState(historyState, "", url);
406
- if (v5Compat && listener) {
407
- listener({
408
- action,
409
- location: history.location,
410
- delta: 0
411
- });
412
- }
413
- }
414
- function createURL(to) {
415
- // window.location.origin is "null" (the literal string value) in Firefox
416
- // under certain conditions, notably when serving from a local HTML file
417
- // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297
418
- let base = window.location.origin !== "null" ? window.location.origin : window.location.href;
419
- let href = typeof to === "string" ? to : createPath(to);
420
- // Treating this as a full URL will strip any trailing spaces so we need to
421
- // pre-encode them since they might be part of a matching splat param from
422
- // an ancestor route
423
- href = href.replace(/ $/, "%20");
424
- invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);
425
- return new URL(href, base);
426
- }
427
- let history = {
428
- get action() {
429
- return action;
430
- },
431
- get location() {
432
- return getLocation(window, globalHistory);
433
- },
434
- listen(fn) {
435
- if (listener) {
436
- throw new Error("A history only accepts one active listener");
437
- }
438
- window.addEventListener(PopStateEventType, handlePop);
439
- listener = fn;
440
- return () => {
441
- window.removeEventListener(PopStateEventType, handlePop);
442
- listener = null;
443
- };
444
- },
445
- createHref(to) {
446
- return createHref(window, to);
447
- },
448
- createURL,
449
- encodeLocation(to) {
450
- // Encode a Location the same way window.location would
451
- let url = createURL(to);
452
- return {
453
- pathname: url.pathname,
454
- search: url.search,
455
- hash: url.hash
456
- };
457
- },
458
- push,
459
- replace,
460
- go(n) {
461
- return globalHistory.go(n);
462
- }
463
- };
464
- return history;
465
- }
466
- //#endregion
467
-
468
- var ResultType;
469
- (function (ResultType) {
470
- ResultType["data"] = "data";
471
- ResultType["deferred"] = "deferred";
472
- ResultType["redirect"] = "redirect";
473
- ResultType["error"] = "error";
474
- })(ResultType || (ResultType = {}));
475
- const immutableRouteKeys = new Set(["lazy", "caseSensitive", "path", "id", "index", "children"]);
476
- function isIndexRoute(route) {
477
- return route.index === true;
478
- }
479
- // Walk the route tree generating unique IDs where necessary, so we are working
480
- // solely with AgnosticDataRouteObject's within the Router
481
- function convertRoutesToDataRoutes(routes, mapRouteProperties, parentPath, manifest) {
482
- if (parentPath === void 0) {
483
- parentPath = [];
484
- }
485
- if (manifest === void 0) {
486
- manifest = {};
487
- }
488
- return routes.map((route, index) => {
489
- let treePath = [...parentPath, String(index)];
490
- let id = typeof route.id === "string" ? route.id : treePath.join("-");
491
- invariant(route.index !== true || !route.children, "Cannot specify children on an index route");
492
- invariant(!manifest[id], "Found a route id collision on id \"" + id + "\". Route " + "id's must be globally unique within Data Router usages");
493
- if (isIndexRoute(route)) {
494
- let indexRoute = _extends({}, route, mapRouteProperties(route), {
495
- id
496
- });
497
- manifest[id] = indexRoute;
498
- return indexRoute;
499
- } else {
500
- let pathOrLayoutRoute = _extends({}, route, mapRouteProperties(route), {
501
- id,
502
- children: undefined
503
- });
504
- manifest[id] = pathOrLayoutRoute;
505
- if (route.children) {
506
- pathOrLayoutRoute.children = convertRoutesToDataRoutes(route.children, mapRouteProperties, treePath, manifest);
507
- }
508
- return pathOrLayoutRoute;
509
- }
510
- });
511
- }
512
- /**
513
- * Matches the given routes to a location and returns the match data.
514
- *
515
- * @see https://reactrouter.com/utils/match-routes
516
- */
517
- function matchRoutes(routes, locationArg, basename) {
518
- if (basename === void 0) {
519
- basename = "/";
520
- }
521
- return matchRoutesImpl(routes, locationArg, basename, false);
522
- }
523
- function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
524
- let location = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
525
- let pathname = stripBasename(location.pathname || "/", basename);
526
- if (pathname == null) {
527
- return null;
528
- }
529
- let branches = flattenRoutes(routes);
530
- rankRouteBranches(branches);
531
- let matches = null;
532
- for (let i = 0; matches == null && i < branches.length; ++i) {
533
- // Incoming pathnames are generally encoded from either window.location
534
- // or from router.navigate, but we want to match against the unencoded
535
- // paths in the route definitions. Memory router locations won't be
536
- // encoded here but there also shouldn't be anything to decode so this
537
- // should be a safe operation. This avoids needing matchRoutes to be
538
- // history-aware.
539
- let decoded = decodePath(pathname);
540
- matches = matchRouteBranch(branches[i], decoded, allowPartial);
541
- }
542
- return matches;
543
- }
544
- function convertRouteMatchToUiMatch(match, loaderData) {
545
- let {
546
- route,
547
- pathname,
548
- params
549
- } = match;
550
- return {
551
- id: route.id,
552
- pathname,
553
- params,
554
- data: loaderData[route.id],
555
- handle: route.handle
556
- };
557
- }
558
- function flattenRoutes(routes, branches, parentsMeta, parentPath) {
559
- if (branches === void 0) {
560
- branches = [];
561
- }
562
- if (parentsMeta === void 0) {
563
- parentsMeta = [];
564
- }
565
- if (parentPath === void 0) {
566
- parentPath = "";
567
- }
568
- let flattenRoute = (route, index, relativePath) => {
569
- let meta = {
570
- relativePath: relativePath === undefined ? route.path || "" : relativePath,
571
- caseSensitive: route.caseSensitive === true,
572
- childrenIndex: index,
573
- route
574
- };
575
- if (meta.relativePath.startsWith("/")) {
576
- 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.");
577
- meta.relativePath = meta.relativePath.slice(parentPath.length);
578
- }
579
- let path = joinPaths([parentPath, meta.relativePath]);
580
- let routesMeta = parentsMeta.concat(meta);
581
- // Add the children before adding this route to the array, so we traverse the
582
- // route tree depth-first and child routes appear before their parents in
583
- // the "flattened" version.
584
- if (route.children && route.children.length > 0) {
585
- invariant(
586
- // Our types know better, but runtime JS may not!
587
- // @ts-expect-error
588
- route.index !== true, "Index routes must not have child routes. Please remove " + ("all child routes from route path \"" + path + "\"."));
589
- flattenRoutes(route.children, branches, routesMeta, path);
590
- }
591
- // Routes without a path shouldn't ever match by themselves unless they are
592
- // index routes, so don't add them to the list of possible branches.
593
- if (route.path == null && !route.index) {
594
- return;
595
- }
596
- branches.push({
597
- path,
598
- score: computeScore(path, route.index),
599
- routesMeta
600
- });
601
- };
602
- routes.forEach((route, index) => {
603
- var _route$path;
604
- // coarse-grain check for optional params
605
- if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {
606
- flattenRoute(route, index);
607
- } else {
608
- for (let exploded of explodeOptionalSegments(route.path)) {
609
- flattenRoute(route, index, exploded);
610
- }
611
- }
612
- });
613
- return branches;
614
- }
615
- /**
616
- * Computes all combinations of optional path segments for a given path,
617
- * excluding combinations that are ambiguous and of lower priority.
618
- *
619
- * For example, `/one/:two?/three/:four?/:five?` explodes to:
620
- * - `/one/three`
621
- * - `/one/:two/three`
622
- * - `/one/three/:four`
623
- * - `/one/three/:five`
624
- * - `/one/:two/three/:four`
625
- * - `/one/:two/three/:five`
626
- * - `/one/three/:four/:five`
627
- * - `/one/:two/three/:four/:five`
628
- */
629
- function explodeOptionalSegments(path) {
630
- let segments = path.split("/");
631
- if (segments.length === 0) return [];
632
- let [first, ...rest] = segments;
633
- // Optional path segments are denoted by a trailing `?`
634
- let isOptional = first.endsWith("?");
635
- // Compute the corresponding required segment: `foo?` -> `foo`
636
- let required = first.replace(/\?$/, "");
637
- if (rest.length === 0) {
638
- // Intepret empty string as omitting an optional segment
639
- // `["one", "", "three"]` corresponds to omitting `:two` from `/one/:two?/three` -> `/one/three`
640
- return isOptional ? [required, ""] : [required];
641
- }
642
- let restExploded = explodeOptionalSegments(rest.join("/"));
643
- let result = [];
644
- // All child paths with the prefix. Do this for all children before the
645
- // optional version for all children, so we get consistent ordering where the
646
- // parent optional aspect is preferred as required. Otherwise, we can get
647
- // child sections interspersed where deeper optional segments are higher than
648
- // parent optional segments, where for example, /:two would explode _earlier_
649
- // then /:one. By always including the parent as required _for all children_
650
- // first, we avoid this issue
651
- result.push(...restExploded.map(subpath => subpath === "" ? required : [required, subpath].join("/")));
652
- // Then, if this is an optional value, add all child versions without
653
- if (isOptional) {
654
- result.push(...restExploded);
655
- }
656
- // for absolute paths, ensure `/` instead of empty segment
657
- return result.map(exploded => path.startsWith("/") && exploded === "" ? "/" : exploded);
658
- }
659
- function rankRouteBranches(branches) {
660
- branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first
661
- : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));
662
- }
663
- const paramRe = /^:[\w-]+$/;
664
- const dynamicSegmentValue = 3;
665
- const indexRouteValue = 2;
666
- const emptySegmentValue = 1;
667
- const staticSegmentValue = 10;
668
- const splatPenalty = -2;
669
- const isSplat = s => s === "*";
670
- function computeScore(path, index) {
671
- let segments = path.split("/");
672
- let initialScore = segments.length;
673
- if (segments.some(isSplat)) {
674
- initialScore += splatPenalty;
675
- }
676
- if (index) {
677
- initialScore += indexRouteValue;
678
- }
679
- return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
680
- }
681
- function compareIndexes(a, b) {
682
- let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);
683
- return siblings ?
684
- // If two routes are siblings, we should try to match the earlier sibling
685
- // first. This allows people to have fine-grained control over the matching
686
- // behavior by simply putting routes with identical paths in the order they
687
- // want them tried.
688
- a[a.length - 1] - b[b.length - 1] :
689
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
690
- // so they sort equally.
691
- 0;
692
- }
693
- function matchRouteBranch(branch, pathname, allowPartial) {
694
- if (allowPartial === void 0) {
695
- allowPartial = false;
696
- }
697
- let {
698
- routesMeta
699
- } = branch;
700
- let matchedParams = {};
701
- let matchedPathname = "/";
702
- let matches = [];
703
- for (let i = 0; i < routesMeta.length; ++i) {
704
- let meta = routesMeta[i];
705
- let end = i === routesMeta.length - 1;
706
- let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
707
- let match = matchPath({
708
- path: meta.relativePath,
709
- caseSensitive: meta.caseSensitive,
710
- end
711
- }, remainingPathname);
712
- let route = meta.route;
713
- if (!match && end && allowPartial && !routesMeta[routesMeta.length - 1].route.index) {
714
- match = matchPath({
715
- path: meta.relativePath,
716
- caseSensitive: meta.caseSensitive,
717
- end: false
718
- }, remainingPathname);
719
- }
720
- if (!match) {
721
- return null;
722
- }
723
- Object.assign(matchedParams, match.params);
724
- matches.push({
725
- // TODO: Can this as be avoided?
726
- params: matchedParams,
727
- pathname: joinPaths([matchedPathname, match.pathname]),
728
- pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),
729
- route
730
- });
731
- if (match.pathnameBase !== "/") {
732
- matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);
733
- }
734
- }
735
- return matches;
736
- }
737
- /**
738
- * Returns a path with params interpolated.
739
- *
740
- * @see https://reactrouter.com/utils/generate-path
741
- */
742
- function generatePath(originalPath, params) {
743
- if (params === void 0) {
744
- params = {};
745
- }
746
- let path = originalPath;
747
- if (path.endsWith("*") && path !== "*" && !path.endsWith("/*")) {
748
- 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(/\*$/, "/*") + "\"."));
749
- path = path.replace(/\*$/, "/*");
750
- }
751
- // ensure `/` is added at the beginning if the path is absolute
752
- const prefix = path.startsWith("/") ? "/" : "";
753
- const stringify = p => p == null ? "" : typeof p === "string" ? p : String(p);
754
- const segments = path.split(/\/+/).map((segment, index, array) => {
755
- const isLastSegment = index === array.length - 1;
756
- // only apply the splat if it's the last segment
757
- if (isLastSegment && segment === "*") {
758
- const star = "*";
759
- // Apply the splat
760
- return stringify(params[star]);
761
- }
762
- const keyMatch = segment.match(/^:([\w-]+)(\??)$/);
763
- if (keyMatch) {
764
- const [, key, optional] = keyMatch;
765
- let param = params[key];
766
- invariant(optional === "?" || param != null, "Missing \":" + key + "\" param");
767
- return stringify(param);
768
- }
769
- // Remove any optional markers from optional static segments
770
- return segment.replace(/\?$/g, "");
771
- })
772
- // Remove empty segments
773
- .filter(segment => !!segment);
774
- return prefix + segments.join("/");
775
- }
776
- /**
777
- * Performs pattern matching on a URL pathname and returns information about
778
- * the match.
779
- *
780
- * @see https://reactrouter.com/utils/match-path
781
- */
782
- function matchPath(pattern, pathname) {
783
- if (typeof pattern === "string") {
784
- pattern = {
785
- path: pattern,
786
- caseSensitive: false,
787
- end: true
788
- };
789
- }
790
- let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
791
- let match = pathname.match(matcher);
792
- if (!match) return null;
793
- let matchedPathname = match[0];
794
- let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
795
- let captureGroups = match.slice(1);
796
- let params = compiledParams.reduce((memo, _ref, index) => {
797
- let {
798
- paramName,
799
- isOptional
800
- } = _ref;
801
- // We need to compute the pathnameBase here using the raw splat value
802
- // instead of using params["*"] later because it will be decoded then
803
- if (paramName === "*") {
804
- let splatValue = captureGroups[index] || "";
805
- pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
806
- }
807
- const value = captureGroups[index];
808
- if (isOptional && !value) {
809
- memo[paramName] = undefined;
810
- } else {
811
- memo[paramName] = (value || "").replace(/%2F/g, "/");
812
- }
813
- return memo;
814
- }, {});
815
- return {
816
- params,
817
- pathname: matchedPathname,
818
- pathnameBase,
819
- pattern
820
- };
821
- }
822
- function compilePath(path, caseSensitive, end) {
823
- if (caseSensitive === void 0) {
824
- caseSensitive = false;
825
- }
826
- if (end === void 0) {
827
- end = true;
828
- }
829
- 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(/\*$/, "/*") + "\"."));
830
- let params = [];
831
- let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
832
- .replace(/^\/*/, "/") // Make sure it has a leading /
833
- .replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
834
- .replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
835
- params.push({
836
- paramName,
837
- isOptional: isOptional != null
838
- });
839
- return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
840
- });
841
- if (path.endsWith("*")) {
842
- params.push({
843
- paramName: "*"
844
- });
845
- regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
846
- : "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
847
- } else if (end) {
848
- // When matching to the end, ignore trailing slashes
849
- regexpSource += "\\/*$";
850
- } else if (path !== "" && path !== "/") {
851
- // If our path is non-empty and contains anything beyond an initial slash,
852
- // then we have _some_ form of path in our regex, so we should expect to
853
- // match only if we find the end of this path segment. Look for an optional
854
- // non-captured trailing slash (to match a portion of the URL) or the end
855
- // of the path (if we've matched to the end). We used to do this with a
856
- // word boundary but that gives false positives on routes like
857
- // /user-preferences since `-` counts as a word boundary.
858
- regexpSource += "(?:(?=\\/|$))";
859
- } else ;
860
- let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
861
- return [matcher, params];
862
- }
863
- function decodePath(value) {
864
- try {
865
- return value.split("/").map(v => decodeURIComponent(v).replace(/\//g, "%2F")).join("/");
866
- } catch (error) {
867
- 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 + ")."));
868
- return value;
869
- }
870
- }
871
- /**
872
- * @private
873
- */
874
- function stripBasename(pathname, basename) {
875
- if (basename === "/") return pathname;
876
- if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
877
- return null;
878
- }
879
- // We want to leave trailing slash behavior in the user's control, so if they
880
- // specify a basename with a trailing slash, we should support it
881
- let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
882
- let nextChar = pathname.charAt(startIndex);
883
- if (nextChar && nextChar !== "/") {
884
- // pathname does not start with basename/
885
- return null;
886
- }
887
- return pathname.slice(startIndex) || "/";
888
- }
889
- /**
890
- * Returns a resolved path object relative to the given pathname.
891
- *
892
- * @see https://reactrouter.com/utils/resolve-path
893
- */
894
- function resolvePath(to, fromPathname) {
895
- if (fromPathname === void 0) {
896
- fromPathname = "/";
897
- }
898
- let {
899
- pathname: toPathname,
900
- search = "",
901
- hash = ""
902
- } = typeof to === "string" ? parsePath(to) : to;
903
- let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
904
- return {
905
- pathname,
906
- search: normalizeSearch(search),
907
- hash: normalizeHash(hash)
908
- };
909
- }
910
- function resolvePathname(relativePath, fromPathname) {
911
- let segments = fromPathname.replace(/\/+$/, "").split("/");
912
- let relativeSegments = relativePath.split("/");
913
- relativeSegments.forEach(segment => {
914
- if (segment === "..") {
915
- // Keep the root "" segment so the pathname starts at /
916
- if (segments.length > 1) segments.pop();
917
- } else if (segment !== ".") {
918
- segments.push(segment);
919
- }
920
- });
921
- return segments.length > 1 ? segments.join("/") : "/";
922
- }
923
- function getInvalidPathError(char, field, dest, path) {
924
- 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.";
925
- }
926
- /**
927
- * @private
928
- *
929
- * When processing relative navigation we want to ignore ancestor routes that
930
- * do not contribute to the path, such that index/pathless layout routes don't
931
- * interfere.
932
- *
933
- * For example, when moving a route element into an index route and/or a
934
- * pathless layout route, relative link behavior contained within should stay
935
- * the same. Both of the following examples should link back to the root:
936
- *
937
- * <Route path="/">
938
- * <Route path="accounts" element={<Link to=".."}>
939
- * </Route>
940
- *
941
- * <Route path="/">
942
- * <Route path="accounts">
943
- * <Route element={<AccountsLayout />}> // <-- Does not contribute
944
- * <Route index element={<Link to=".."} /> // <-- Does not contribute
945
- * </Route
946
- * </Route>
947
- * </Route>
948
- */
949
- function getPathContributingMatches(matches) {
950
- return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
951
- }
952
- // Return the array of pathnames for the current route matches - used to
953
- // generate the routePathnames input for resolveTo()
954
- function getResolveToMatches(matches, v7_relativeSplatPath) {
955
- let pathMatches = getPathContributingMatches(matches);
956
- // When v7_relativeSplatPath is enabled, use the full pathname for the leaf
957
- // match so we include splat values for "." links. See:
958
- // https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
959
- if (v7_relativeSplatPath) {
960
- return pathMatches.map((match, idx) => idx === matches.length - 1 ? match.pathname : match.pathnameBase);
961
- }
962
- return pathMatches.map(match => match.pathnameBase);
963
- }
964
- /**
965
- * @private
966
- */
967
- function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
968
- if (isPathRelative === void 0) {
969
- isPathRelative = false;
970
- }
971
- let to;
972
- if (typeof toArg === "string") {
973
- to = parsePath(toArg);
974
- } else {
975
- to = _extends({}, toArg);
976
- invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
977
- invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
978
- invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
979
- }
980
- let isEmptyPath = toArg === "" || to.pathname === "";
981
- let toPathname = isEmptyPath ? "/" : to.pathname;
982
- let from;
983
- // Routing is relative to the current pathname if explicitly requested.
984
- //
985
- // If a pathname is explicitly provided in `to`, it should be relative to the
986
- // route context. This is explained in `Note on `<Link to>` values` in our
987
- // migration guide from v5 as a means of disambiguation between `to` values
988
- // that begin with `/` and those that do not. However, this is problematic for
989
- // `to` values that do not provide a pathname. `to` can simply be a search or
990
- // hash string, in which case we should assume that the navigation is relative
991
- // to the current location's pathname and *not* the route pathname.
992
- if (toPathname == null) {
993
- from = locationPathname;
994
- } else {
995
- let routePathnameIndex = routePathnames.length - 1;
996
- // With relative="route" (the default), each leading .. segment means
997
- // "go up one route" instead of "go up one URL segment". This is a key
998
- // difference from how <a href> works and a major reason we call this a
999
- // "to" value instead of a "href".
1000
- if (!isPathRelative && toPathname.startsWith("..")) {
1001
- let toSegments = toPathname.split("/");
1002
- while (toSegments[0] === "..") {
1003
- toSegments.shift();
1004
- routePathnameIndex -= 1;
1005
- }
1006
- to.pathname = toSegments.join("/");
1007
- }
1008
- from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
1009
- }
1010
- let path = resolvePath(to, from);
1011
- // Ensure the pathname has a trailing slash if the original "to" had one
1012
- let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
1013
- // Or if this was a link to the current path which has a trailing slash
1014
- let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
1015
- if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
1016
- path.pathname += "/";
1017
- }
1018
- return path;
1019
- }
1020
- /**
1021
- * @private
1022
- */
1023
- function getToPathname(to) {
1024
- // Empty strings should be treated the same as / paths
1025
- return to === "" || to.pathname === "" ? "/" : typeof to === "string" ? parsePath(to).pathname : to.pathname;
1026
- }
1027
- /**
1028
- * @private
1029
- */
1030
- const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
1031
- /**
1032
- * @private
1033
- */
1034
- const normalizePathname = pathname => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
1035
- /**
1036
- * @private
1037
- */
1038
- const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
1039
- /**
1040
- * @private
1041
- */
1042
- const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
1043
- /**
1044
- * This is a shortcut for creating `application/json` responses. Converts `data`
1045
- * to JSON and sets the `Content-Type` header.
1046
- */
1047
- const json = function json(data, init) {
1048
- if (init === void 0) {
1049
- init = {};
1050
- }
1051
- let responseInit = typeof init === "number" ? {
1052
- status: init
1053
- } : init;
1054
- let headers = new Headers(responseInit.headers);
1055
- if (!headers.has("Content-Type")) {
1056
- headers.set("Content-Type", "application/json; charset=utf-8");
1057
- }
1058
- return new Response(JSON.stringify(data), _extends({}, responseInit, {
1059
- headers
1060
- }));
1061
- };
1062
- class AbortedDeferredError extends Error {}
1063
- class DeferredData {
1064
- constructor(data, responseInit) {
1065
- this.pendingKeysSet = new Set();
1066
- this.subscribers = new Set();
1067
- this.deferredKeys = [];
1068
- invariant(data && typeof data === "object" && !Array.isArray(data), "defer() only accepts plain objects");
1069
- // Set up an AbortController + Promise we can race against to exit early
1070
- // cancellation
1071
- let reject;
1072
- this.abortPromise = new Promise((_, r) => reject = r);
1073
- this.controller = new AbortController();
1074
- let onAbort = () => reject(new AbortedDeferredError("Deferred data aborted"));
1075
- this.unlistenAbortSignal = () => this.controller.signal.removeEventListener("abort", onAbort);
1076
- this.controller.signal.addEventListener("abort", onAbort);
1077
- this.data = Object.entries(data).reduce((acc, _ref2) => {
1078
- let [key, value] = _ref2;
1079
- return Object.assign(acc, {
1080
- [key]: this.trackPromise(key, value)
1081
- });
1082
- }, {});
1083
- if (this.done) {
1084
- // All incoming values were resolved
1085
- this.unlistenAbortSignal();
1086
- }
1087
- this.init = responseInit;
1088
- }
1089
- trackPromise(key, value) {
1090
- if (!(value instanceof Promise)) {
1091
- return value;
1092
- }
1093
- this.deferredKeys.push(key);
1094
- this.pendingKeysSet.add(key);
1095
- // We store a little wrapper promise that will be extended with
1096
- // _data/_error props upon resolve/reject
1097
- let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, undefined, data), error => this.onSettle(promise, key, error));
1098
- // Register rejection listeners to avoid uncaught promise rejections on
1099
- // errors or aborted deferred values
1100
- promise.catch(() => {});
1101
- Object.defineProperty(promise, "_tracked", {
1102
- get: () => true
1103
- });
1104
- return promise;
1105
- }
1106
- onSettle(promise, key, error, data) {
1107
- if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {
1108
- this.unlistenAbortSignal();
1109
- Object.defineProperty(promise, "_error", {
1110
- get: () => error
1111
- });
1112
- return Promise.reject(error);
1113
- }
1114
- this.pendingKeysSet.delete(key);
1115
- if (this.done) {
1116
- // Nothing left to abort!
1117
- this.unlistenAbortSignal();
1118
- }
1119
- // If the promise was resolved/rejected with undefined, we'll throw an error as you
1120
- // should always resolve with a value or null
1121
- if (error === undefined && data === undefined) {
1122
- let undefinedError = new Error("Deferred data for key \"" + key + "\" resolved/rejected with `undefined`, " + "you must resolve/reject with a value or `null`.");
1123
- Object.defineProperty(promise, "_error", {
1124
- get: () => undefinedError
1125
- });
1126
- this.emit(false, key);
1127
- return Promise.reject(undefinedError);
1128
- }
1129
- if (data === undefined) {
1130
- Object.defineProperty(promise, "_error", {
1131
- get: () => error
1132
- });
1133
- this.emit(false, key);
1134
- return Promise.reject(error);
1135
- }
1136
- Object.defineProperty(promise, "_data", {
1137
- get: () => data
1138
- });
1139
- this.emit(false, key);
1140
- return data;
1141
- }
1142
- emit(aborted, settledKey) {
1143
- this.subscribers.forEach(subscriber => subscriber(aborted, settledKey));
1144
- }
1145
- subscribe(fn) {
1146
- this.subscribers.add(fn);
1147
- return () => this.subscribers.delete(fn);
1148
- }
1149
- cancel() {
1150
- this.controller.abort();
1151
- this.pendingKeysSet.forEach((v, k) => this.pendingKeysSet.delete(k));
1152
- this.emit(true);
1153
- }
1154
- async resolveData(signal) {
1155
- let aborted = false;
1156
- if (!this.done) {
1157
- let onAbort = () => this.cancel();
1158
- signal.addEventListener("abort", onAbort);
1159
- aborted = await new Promise(resolve => {
1160
- this.subscribe(aborted => {
1161
- signal.removeEventListener("abort", onAbort);
1162
- if (aborted || this.done) {
1163
- resolve(aborted);
1164
- }
1165
- });
1166
- });
1167
- }
1168
- return aborted;
1169
- }
1170
- get done() {
1171
- return this.pendingKeysSet.size === 0;
1172
- }
1173
- get unwrappedData() {
1174
- invariant(this.data !== null && this.done, "Can only unwrap data on initialized and settled deferreds");
1175
- return Object.entries(this.data).reduce((acc, _ref3) => {
1176
- let [key, value] = _ref3;
1177
- return Object.assign(acc, {
1178
- [key]: unwrapTrackedPromise(value)
1179
- });
1180
- }, {});
1181
- }
1182
- get pendingKeys() {
1183
- return Array.from(this.pendingKeysSet);
1184
- }
1185
- }
1186
- function isTrackedPromise(value) {
1187
- return value instanceof Promise && value._tracked === true;
1188
- }
1189
- function unwrapTrackedPromise(value) {
1190
- if (!isTrackedPromise(value)) {
1191
- return value;
1192
- }
1193
- if (value._error) {
1194
- throw value._error;
1195
- }
1196
- return value._data;
1197
- }
1198
- const defer = function defer(data, init) {
1199
- if (init === void 0) {
1200
- init = {};
1201
- }
1202
- let responseInit = typeof init === "number" ? {
1203
- status: init
1204
- } : init;
1205
- return new DeferredData(data, responseInit);
1206
- };
1207
- /**
1208
- * A redirect response. Sets the status code and the `Location` header.
1209
- * Defaults to "302 Found".
1210
- */
1211
- const redirect = function redirect(url, init) {
1212
- if (init === void 0) {
1213
- init = 302;
1214
- }
1215
- let responseInit = init;
1216
- if (typeof responseInit === "number") {
1217
- responseInit = {
1218
- status: responseInit
1219
- };
1220
- } else if (typeof responseInit.status === "undefined") {
1221
- responseInit.status = 302;
1222
- }
1223
- let headers = new Headers(responseInit.headers);
1224
- headers.set("Location", url);
1225
- return new Response(null, _extends({}, responseInit, {
1226
- headers
1227
- }));
1228
- };
1229
- /**
1230
- * A redirect response that will force a document reload to the new location.
1231
- * Sets the status code and the `Location` header.
1232
- * Defaults to "302 Found".
1233
- */
1234
- const redirectDocument = (url, init) => {
1235
- let response = redirect(url, init);
1236
- response.headers.set("X-Remix-Reload-Document", "true");
1237
- return response;
1238
- };
1239
- /**
1240
- * @private
1241
- * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies
1242
- *
1243
- * We don't export the class for public use since it's an implementation
1244
- * detail, but we export the interface above so folks can build their own
1245
- * abstractions around instances via isRouteErrorResponse()
1246
- */
1247
- class ErrorResponseImpl {
1248
- constructor(status, statusText, data, internal) {
1249
- if (internal === void 0) {
1250
- internal = false;
1251
- }
1252
- this.status = status;
1253
- this.statusText = statusText || "";
1254
- this.internal = internal;
1255
- if (data instanceof Error) {
1256
- this.data = data.toString();
1257
- this.error = data;
1258
- } else {
1259
- this.data = data;
1260
- }
1261
- }
1262
- }
1263
- /**
1264
- * Check if the given error is an ErrorResponse generated from a 4xx/5xx
1265
- * Response thrown from an action/loader
1266
- */
1267
- function isRouteErrorResponse(error) {
1268
- return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
1269
- }
1270
-
1271
- const validMutationMethodsArr = ["post", "put", "patch", "delete"];
1272
- const validMutationMethods = new Set(validMutationMethodsArr);
1273
- const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
1274
- const validRequestMethods = new Set(validRequestMethodsArr);
1275
- const redirectStatusCodes = new Set([301, 302, 303, 307, 308]);
1276
- const redirectPreserveMethodStatusCodes = new Set([307, 308]);
1277
- const IDLE_NAVIGATION = {
1278
- state: "idle",
1279
- location: undefined,
1280
- formMethod: undefined,
1281
- formAction: undefined,
1282
- formEncType: undefined,
1283
- formData: undefined,
1284
- json: undefined,
1285
- text: undefined
1286
- };
1287
- const IDLE_FETCHER = {
1288
- state: "idle",
1289
- data: undefined,
1290
- formMethod: undefined,
1291
- formAction: undefined,
1292
- formEncType: undefined,
1293
- formData: undefined,
1294
- json: undefined,
1295
- text: undefined
1296
- };
1297
- const IDLE_BLOCKER = {
1298
- state: "unblocked",
1299
- proceed: undefined,
1300
- reset: undefined,
1301
- location: undefined
1302
- };
1303
- const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
1304
- const defaultMapRouteProperties = route => ({
1305
- hasErrorBoundary: Boolean(route.hasErrorBoundary)
1306
- });
1307
- const TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
1308
- //#endregion
1309
- ////////////////////////////////////////////////////////////////////////////////
1310
- //#region createRouter
1311
- ////////////////////////////////////////////////////////////////////////////////
1312
- /**
1313
- * Create a router and listen to history POP navigations
1314
- */
1315
- function createRouter(init) {
1316
- const routerWindow = init.window ? init.window : typeof window !== "undefined" ? window : undefined;
1317
- const isBrowser = typeof routerWindow !== "undefined" && typeof routerWindow.document !== "undefined" && typeof routerWindow.document.createElement !== "undefined";
1318
- const isServer = !isBrowser;
1319
- invariant(init.routes.length > 0, "You must provide a non-empty routes array to createRouter");
1320
- let mapRouteProperties;
1321
- if (init.mapRouteProperties) {
1322
- mapRouteProperties = init.mapRouteProperties;
1323
- } else if (init.detectErrorBoundary) {
1324
- // If they are still using the deprecated version, wrap it with the new API
1325
- let detectErrorBoundary = init.detectErrorBoundary;
1326
- mapRouteProperties = route => ({
1327
- hasErrorBoundary: detectErrorBoundary(route)
1328
- });
1329
- } else {
1330
- mapRouteProperties = defaultMapRouteProperties;
1331
- }
1332
- // Routes keyed by ID
1333
- let manifest = {};
1334
- // Routes in tree format for matching
1335
- let dataRoutes = convertRoutesToDataRoutes(init.routes, mapRouteProperties, undefined, manifest);
1336
- let inFlightDataRoutes;
1337
- let basename = init.basename || "/";
1338
- let dataStrategyImpl = init.unstable_dataStrategy || defaultDataStrategy;
1339
- let patchRoutesOnMissImpl = init.unstable_patchRoutesOnMiss;
1340
- // Config driven behavior flags
1341
- let future = _extends({
1342
- v7_fetcherPersist: false,
1343
- v7_normalizeFormMethod: false,
1344
- v7_partialHydration: false,
1345
- v7_prependBasename: false,
1346
- v7_relativeSplatPath: false,
1347
- unstable_skipActionErrorRevalidation: false
1348
- }, init.future);
1349
- // Cleanup function for history
1350
- let unlistenHistory = null;
1351
- // Externally-provided functions to call on all state changes
1352
- let subscribers = new Set();
1353
- // Externally-provided object to hold scroll restoration locations during routing
1354
- let savedScrollPositions = null;
1355
- // Externally-provided function to get scroll restoration keys
1356
- let getScrollRestorationKey = null;
1357
- // Externally-provided function to get current scroll position
1358
- let getScrollPosition = null;
1359
- // One-time flag to control the initial hydration scroll restoration. Because
1360
- // we don't get the saved positions from <ScrollRestoration /> until _after_
1361
- // the initial render, we need to manually trigger a separate updateState to
1362
- // send along the restoreScrollPosition
1363
- // Set to true if we have `hydrationData` since we assume we were SSR'd and that
1364
- // SSR did the initial scroll restoration.
1365
- let initialScrollRestored = init.hydrationData != null;
1366
- let initialMatches = matchRoutes(dataRoutes, init.history.location, basename);
1367
- let initialErrors = null;
1368
- if (initialMatches == null && !patchRoutesOnMissImpl) {
1369
- // If we do not match a user-provided-route, fall back to the root
1370
- // to allow the error boundary to take over
1371
- let error = getInternalRouterError(404, {
1372
- pathname: init.history.location.pathname
1373
- });
1374
- let {
1375
- matches,
1376
- route
1377
- } = getShortCircuitMatches(dataRoutes);
1378
- initialMatches = matches;
1379
- initialErrors = {
1380
- [route.id]: error
1381
- };
1382
- }
1383
- let initialized;
1384
- if (!initialMatches) {
1385
- // We need to run patchRoutesOnMiss in initialize()
1386
- initialized = false;
1387
- initialMatches = [];
1388
- } else if (initialMatches.some(m => m.route.lazy)) {
1389
- // All initialMatches need to be loaded before we're ready. If we have lazy
1390
- // functions around still then we'll need to run them in initialize()
1391
- initialized = false;
1392
- } else if (!initialMatches.some(m => m.route.loader)) {
1393
- // If we've got no loaders to run, then we're good to go
1394
- initialized = true;
1395
- } else if (future.v7_partialHydration) {
1396
- // If partial hydration is enabled, we're initialized so long as we were
1397
- // provided with hydrationData for every route with a loader, and no loaders
1398
- // were marked for explicit hydration
1399
- let loaderData = init.hydrationData ? init.hydrationData.loaderData : null;
1400
- let errors = init.hydrationData ? init.hydrationData.errors : null;
1401
- let isRouteInitialized = m => {
1402
- // No loader, nothing to initialize
1403
- if (!m.route.loader) {
1404
- return true;
1405
- }
1406
- // Explicitly opting-in to running on hydration
1407
- if (typeof m.route.loader === "function" && m.route.loader.hydrate === true) {
1408
- return false;
1409
- }
1410
- // Otherwise, initialized if hydrated with data or an error
1411
- return loaderData && loaderData[m.route.id] !== undefined || errors && errors[m.route.id] !== undefined;
1412
- };
1413
- // If errors exist, don't consider routes below the boundary
1414
- if (errors) {
1415
- let idx = initialMatches.findIndex(m => errors[m.route.id] !== undefined);
1416
- initialized = initialMatches.slice(0, idx + 1).every(isRouteInitialized);
1417
- } else {
1418
- initialized = initialMatches.every(isRouteInitialized);
1419
- }
1420
- } else {
1421
- // Without partial hydration - we're initialized if we were provided any
1422
- // hydrationData - which is expected to be complete
1423
- initialized = init.hydrationData != null;
1424
- }
1425
- let router;
1426
- let state = {
1427
- historyAction: init.history.action,
1428
- location: init.history.location,
1429
- matches: initialMatches,
1430
- initialized,
1431
- navigation: IDLE_NAVIGATION,
1432
- // Don't restore on initial updateState() if we were SSR'd
1433
- restoreScrollPosition: init.hydrationData != null ? false : null,
1434
- preventScrollReset: false,
1435
- revalidation: "idle",
1436
- loaderData: init.hydrationData && init.hydrationData.loaderData || {},
1437
- actionData: init.hydrationData && init.hydrationData.actionData || null,
1438
- errors: init.hydrationData && init.hydrationData.errors || initialErrors,
1439
- fetchers: new Map(),
1440
- blockers: new Map()
1441
- };
1442
- // -- Stateful internal variables to manage navigations --
1443
- // Current navigation in progress (to be committed in completeNavigation)
1444
- let pendingAction = Action.Pop;
1445
- // Should the current navigation prevent the scroll reset if scroll cannot
1446
- // be restored?
1447
- let pendingPreventScrollReset = false;
1448
- // AbortController for the active navigation
1449
- let pendingNavigationController;
1450
- // Should the current navigation enable document.startViewTransition?
1451
- let pendingViewTransitionEnabled = false;
1452
- // Store applied view transitions so we can apply them on POP
1453
- let appliedViewTransitions = new Map();
1454
- // Cleanup function for persisting applied transitions to sessionStorage
1455
- let removePageHideEventListener = null;
1456
- // We use this to avoid touching history in completeNavigation if a
1457
- // revalidation is entirely uninterrupted
1458
- let isUninterruptedRevalidation = false;
1459
- // Use this internal flag to force revalidation of all loaders:
1460
- // - submissions (completed or interrupted)
1461
- // - useRevalidator()
1462
- // - X-Remix-Revalidate (from redirect)
1463
- let isRevalidationRequired = false;
1464
- // Use this internal array to capture routes that require revalidation due
1465
- // to a cancelled deferred on action submission
1466
- let cancelledDeferredRoutes = [];
1467
- // Use this internal array to capture fetcher loads that were cancelled by an
1468
- // action navigation and require revalidation
1469
- let cancelledFetcherLoads = [];
1470
- // AbortControllers for any in-flight fetchers
1471
- let fetchControllers = new Map();
1472
- // Track loads based on the order in which they started
1473
- let incrementingLoadId = 0;
1474
- // Track the outstanding pending navigation data load to be compared against
1475
- // the globally incrementing load when a fetcher load lands after a completed
1476
- // navigation
1477
- let pendingNavigationLoadId = -1;
1478
- // Fetchers that triggered data reloads as a result of their actions
1479
- let fetchReloadIds = new Map();
1480
- // Fetchers that triggered redirect navigations
1481
- let fetchRedirectIds = new Set();
1482
- // Most recent href/match for fetcher.load calls for fetchers
1483
- let fetchLoadMatches = new Map();
1484
- // Ref-count mounted fetchers so we know when it's ok to clean them up
1485
- let activeFetchers = new Map();
1486
- // Fetchers that have requested a delete when using v7_fetcherPersist,
1487
- // they'll be officially removed after they return to idle
1488
- let deletedFetchers = new Set();
1489
- // Store DeferredData instances for active route matches. When a
1490
- // route loader returns defer() we stick one in here. Then, when a nested
1491
- // promise resolves we update loaderData. If a new navigation starts we
1492
- // cancel active deferreds for eliminated routes.
1493
- let activeDeferreds = new Map();
1494
- // Store blocker functions in a separate Map outside of router state since
1495
- // we don't need to update UI state if they change
1496
- let blockerFunctions = new Map();
1497
- // Map of pending patchRoutesOnMiss() promises (keyed by path/matches) so
1498
- // that we only kick them off once for a given combo
1499
- let pendingPatchRoutes = new Map();
1500
- // Flag to ignore the next history update, so we can revert the URL change on
1501
- // a POP navigation that was blocked by the user without touching router state
1502
- let ignoreNextHistoryUpdate = false;
1503
- // Initialize the router, all side effects should be kicked off from here.
1504
- // Implemented as a Fluent API for ease of:
1505
- // let router = createRouter(init).initialize();
1506
- function initialize() {
1507
- // If history informs us of a POP navigation, start the navigation but do not update
1508
- // state. We'll update our own state once the navigation completes
1509
- unlistenHistory = init.history.listen(_ref => {
1510
- let {
1511
- action: historyAction,
1512
- location,
1513
- delta
1514
- } = _ref;
1515
- // Ignore this event if it was just us resetting the URL from a
1516
- // blocked POP navigation
1517
- if (ignoreNextHistoryUpdate) {
1518
- ignoreNextHistoryUpdate = false;
1519
- return;
1520
- }
1521
- 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.");
1522
- let blockerKey = shouldBlockNavigation({
1523
- currentLocation: state.location,
1524
- nextLocation: location,
1525
- historyAction
1526
- });
1527
- if (blockerKey && delta != null) {
1528
- // Restore the URL to match the current UI, but don't update router state
1529
- ignoreNextHistoryUpdate = true;
1530
- init.history.go(delta * -1);
1531
- // Put the blocker into a blocked state
1532
- updateBlocker(blockerKey, {
1533
- state: "blocked",
1534
- location,
1535
- proceed() {
1536
- updateBlocker(blockerKey, {
1537
- state: "proceeding",
1538
- proceed: undefined,
1539
- reset: undefined,
1540
- location
1541
- });
1542
- // Re-do the same POP navigation we just blocked
1543
- init.history.go(delta);
1544
- },
1545
- reset() {
1546
- let blockers = new Map(state.blockers);
1547
- blockers.set(blockerKey, IDLE_BLOCKER);
1548
- updateState({
1549
- blockers
1550
- });
1551
- }
1552
- });
1553
- return;
1554
- }
1555
- return startNavigation(historyAction, location);
1556
- });
1557
- if (isBrowser) {
1558
- // FIXME: This feels gross. How can we cleanup the lines between
1559
- // scrollRestoration/appliedTransitions persistance?
1560
- restoreAppliedTransitions(routerWindow, appliedViewTransitions);
1561
- let _saveAppliedTransitions = () => persistAppliedTransitions(routerWindow, appliedViewTransitions);
1562
- routerWindow.addEventListener("pagehide", _saveAppliedTransitions);
1563
- removePageHideEventListener = () => routerWindow.removeEventListener("pagehide", _saveAppliedTransitions);
1564
- }
1565
- // Kick off initial data load if needed. Use Pop to avoid modifying history
1566
- // Note we don't do any handling of lazy here. For SPA's it'll get handled
1567
- // in the normal navigation flow. For SSR it's expected that lazy modules are
1568
- // resolved prior to router creation since we can't go into a fallbackElement
1569
- // UI for SSR'd apps
1570
- if (!state.initialized) {
1571
- startNavigation(Action.Pop, state.location, {
1572
- initialHydration: true
1573
- });
1574
- }
1575
- return router;
1576
- }
1577
- // Clean up a router and it's side effects
1578
- function dispose() {
1579
- if (unlistenHistory) {
1580
- unlistenHistory();
1581
- }
1582
- if (removePageHideEventListener) {
1583
- removePageHideEventListener();
1584
- }
1585
- subscribers.clear();
1586
- pendingNavigationController && pendingNavigationController.abort();
1587
- state.fetchers.forEach((_, key) => deleteFetcher(key));
1588
- state.blockers.forEach((_, key) => deleteBlocker(key));
1589
- }
1590
- // Subscribe to state updates for the router
1591
- function subscribe(fn) {
1592
- subscribers.add(fn);
1593
- return () => subscribers.delete(fn);
1594
- }
1595
- // Update our state and notify the calling context of the change
1596
- function updateState(newState, opts) {
1597
- if (opts === void 0) {
1598
- opts = {};
1599
- }
1600
- state = _extends({}, state, newState);
1601
- // Prep fetcher cleanup so we can tell the UI which fetcher data entries
1602
- // can be removed
1603
- let completedFetchers = [];
1604
- let deletedFetchersKeys = [];
1605
- if (future.v7_fetcherPersist) {
1606
- state.fetchers.forEach((fetcher, key) => {
1607
- if (fetcher.state === "idle") {
1608
- if (deletedFetchers.has(key)) {
1609
- // Unmounted from the UI and can be totally removed
1610
- deletedFetchersKeys.push(key);
1611
- } else {
1612
- // Returned to idle but still mounted in the UI, so semi-remains for
1613
- // revalidations and such
1614
- completedFetchers.push(key);
1615
- }
1616
- }
1617
- });
1618
- }
1619
- // Iterate over a local copy so that if flushSync is used and we end up
1620
- // removing and adding a new subscriber due to the useCallback dependencies,
1621
- // we don't get ourselves into a loop calling the new subscriber immediately
1622
- [...subscribers].forEach(subscriber => subscriber(state, {
1623
- deletedFetchers: deletedFetchersKeys,
1624
- unstable_viewTransitionOpts: opts.viewTransitionOpts,
1625
- unstable_flushSync: opts.flushSync === true
1626
- }));
1627
- // Remove idle fetchers from state since we only care about in-flight fetchers.
1628
- if (future.v7_fetcherPersist) {
1629
- completedFetchers.forEach(key => state.fetchers.delete(key));
1630
- deletedFetchersKeys.forEach(key => deleteFetcher(key));
1631
- }
1632
- }
1633
- // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION
1634
- // and setting state.[historyAction/location/matches] to the new route.
1635
- // - Location is a required param
1636
- // - Navigation will always be set to IDLE_NAVIGATION
1637
- // - Can pass any other state in newState
1638
- function completeNavigation(location, newState, _temp) {
1639
- var _location$state, _location$state2;
1640
- let {
1641
- flushSync
1642
- } = _temp === void 0 ? {} : _temp;
1643
- // Deduce if we're in a loading/actionReload state:
1644
- // - We have committed actionData in the store
1645
- // - The current navigation was a mutation submission
1646
- // - We're past the submitting state and into the loading state
1647
- // - The location being loaded is not the result of a redirect
1648
- 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;
1649
- let actionData;
1650
- if (newState.actionData) {
1651
- if (Object.keys(newState.actionData).length > 0) {
1652
- actionData = newState.actionData;
1653
- } else {
1654
- // Empty actionData -> clear prior actionData due to an action error
1655
- actionData = null;
1656
- }
1657
- } else if (isActionReload) {
1658
- // Keep the current data if we're wrapping up the action reload
1659
- actionData = state.actionData;
1660
- } else {
1661
- // Clear actionData on any other completed navigations
1662
- actionData = null;
1663
- }
1664
- // Always preserve any existing loaderData from re-used routes
1665
- let loaderData = newState.loaderData ? mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [], newState.errors) : state.loaderData;
1666
- // On a successful navigation we can assume we got through all blockers
1667
- // so we can start fresh
1668
- let blockers = state.blockers;
1669
- if (blockers.size > 0) {
1670
- blockers = new Map(blockers);
1671
- blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
1672
- }
1673
- // Always respect the user flag. Otherwise don't reset on mutation
1674
- // submission navigations unless they redirect
1675
- let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_location$state2 = location.state) == null ? void 0 : _location$state2._isRedirect) !== true;
1676
- if (inFlightDataRoutes) {
1677
- dataRoutes = inFlightDataRoutes;
1678
- inFlightDataRoutes = undefined;
1679
- }
1680
- if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {
1681
- init.history.push(location, location.state);
1682
- } else if (pendingAction === Action.Replace) {
1683
- init.history.replace(location, location.state);
1684
- }
1685
- let viewTransitionOpts;
1686
- // On POP, enable transitions if they were enabled on the original navigation
1687
- if (pendingAction === Action.Pop) {
1688
- // Forward takes precedence so they behave like the original navigation
1689
- let priorPaths = appliedViewTransitions.get(state.location.pathname);
1690
- if (priorPaths && priorPaths.has(location.pathname)) {
1691
- viewTransitionOpts = {
1692
- currentLocation: state.location,
1693
- nextLocation: location
1694
- };
1695
- } else if (appliedViewTransitions.has(location.pathname)) {
1696
- // If we don't have a previous forward nav, assume we're popping back to
1697
- // the new location and enable if that location previously enabled
1698
- viewTransitionOpts = {
1699
- currentLocation: location,
1700
- nextLocation: state.location
1701
- };
1702
- }
1703
- } else if (pendingViewTransitionEnabled) {
1704
- // Store the applied transition on PUSH/REPLACE
1705
- let toPaths = appliedViewTransitions.get(state.location.pathname);
1706
- if (toPaths) {
1707
- toPaths.add(location.pathname);
1708
- } else {
1709
- toPaths = new Set([location.pathname]);
1710
- appliedViewTransitions.set(state.location.pathname, toPaths);
1711
- }
1712
- viewTransitionOpts = {
1713
- currentLocation: state.location,
1714
- nextLocation: location
1715
- };
1716
- }
1717
- updateState(_extends({}, newState, {
1718
- actionData,
1719
- loaderData,
1720
- historyAction: pendingAction,
1721
- location,
1722
- initialized: true,
1723
- navigation: IDLE_NAVIGATION,
1724
- revalidation: "idle",
1725
- restoreScrollPosition: getSavedScrollPosition(location, newState.matches || state.matches),
1726
- preventScrollReset,
1727
- blockers
1728
- }), {
1729
- viewTransitionOpts,
1730
- flushSync: flushSync === true
1731
- });
1732
- // Reset stateful navigation vars
1733
- pendingAction = Action.Pop;
1734
- pendingPreventScrollReset = false;
1735
- pendingViewTransitionEnabled = false;
1736
- isUninterruptedRevalidation = false;
1737
- isRevalidationRequired = false;
1738
- cancelledDeferredRoutes = [];
1739
- cancelledFetcherLoads = [];
1740
- }
1741
- // Trigger a navigation event, which can either be a numerical POP or a PUSH
1742
- // replace with an optional submission
1743
- async function navigate(to, opts) {
1744
- if (typeof to === "number") {
1745
- init.history.go(to);
1746
- return;
1747
- }
1748
- 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);
1749
- let {
1750
- path,
1751
- submission,
1752
- error
1753
- } = normalizeNavigateOptions(future.v7_normalizeFormMethod, false, normalizedPath, opts);
1754
- let currentLocation = state.location;
1755
- let nextLocation = createLocation(state.location, path, opts && opts.state);
1756
- // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded
1757
- // URL from window.location, so we need to encode it here so the behavior
1758
- // remains the same as POP and non-data-router usages. new URL() does all
1759
- // the same encoding we'd get from a history.pushState/window.location read
1760
- // without having to touch history
1761
- nextLocation = _extends({}, nextLocation, init.history.encodeLocation(nextLocation));
1762
- let userReplace = opts && opts.replace != null ? opts.replace : undefined;
1763
- let historyAction = Action.Push;
1764
- if (userReplace === true) {
1765
- historyAction = Action.Replace;
1766
- } else if (userReplace === false) ; else if (submission != null && isMutationMethod(submission.formMethod) && submission.formAction === state.location.pathname + state.location.search) {
1767
- // By default on submissions to the current location we REPLACE so that
1768
- // users don't have to double-click the back button to get to the prior
1769
- // location. If the user redirects to a different location from the
1770
- // action/loader this will be ignored and the redirect will be a PUSH
1771
- historyAction = Action.Replace;
1772
- }
1773
- let preventScrollReset = opts && "preventScrollReset" in opts ? opts.preventScrollReset === true : undefined;
1774
- let flushSync = (opts && opts.unstable_flushSync) === true;
1775
- let blockerKey = shouldBlockNavigation({
1776
- currentLocation,
1777
- nextLocation,
1778
- historyAction
1779
- });
1780
- if (blockerKey) {
1781
- // Put the blocker into a blocked state
1782
- updateBlocker(blockerKey, {
1783
- state: "blocked",
1784
- location: nextLocation,
1785
- proceed() {
1786
- updateBlocker(blockerKey, {
1787
- state: "proceeding",
1788
- proceed: undefined,
1789
- reset: undefined,
1790
- location: nextLocation
1791
- });
1792
- // Send the same navigation through
1793
- navigate(to, opts);
1794
- },
1795
- reset() {
1796
- let blockers = new Map(state.blockers);
1797
- blockers.set(blockerKey, IDLE_BLOCKER);
1798
- updateState({
1799
- blockers
1800
- });
1801
- }
1802
- });
1803
- return;
1804
- }
1805
- return await startNavigation(historyAction, nextLocation, {
1806
- submission,
1807
- // Send through the formData serialization error if we have one so we can
1808
- // render at the right error boundary after we match routes
1809
- pendingError: error,
1810
- preventScrollReset,
1811
- replace: opts && opts.replace,
1812
- enableViewTransition: opts && opts.unstable_viewTransition,
1813
- flushSync
1814
- });
1815
- }
1816
- // Revalidate all current loaders. If a navigation is in progress or if this
1817
- // is interrupted by a navigation, allow this to "succeed" by calling all
1818
- // loaders during the next loader round
1819
- function revalidate() {
1820
- interruptActiveLoads();
1821
- updateState({
1822
- revalidation: "loading"
1823
- });
1824
- // If we're currently submitting an action, we don't need to start a new
1825
- // navigation, we'll just let the follow up loader execution call all loaders
1826
- if (state.navigation.state === "submitting") {
1827
- return;
1828
- }
1829
- // If we're currently in an idle state, start a new navigation for the current
1830
- // action/location and mark it as uninterrupted, which will skip the history
1831
- // update in completeNavigation
1832
- if (state.navigation.state === "idle") {
1833
- startNavigation(state.historyAction, state.location, {
1834
- startUninterruptedRevalidation: true
1835
- });
1836
- return;
1837
- }
1838
- // Otherwise, if we're currently in a loading state, just start a new
1839
- // navigation to the navigation.location but do not trigger an uninterrupted
1840
- // revalidation so that history correctly updates once the navigation completes
1841
- startNavigation(pendingAction || state.historyAction, state.navigation.location, {
1842
- overrideNavigation: state.navigation
1843
- });
1844
- }
1845
- // Start a navigation to the given action/location. Can optionally provide a
1846
- // overrideNavigation which will override the normalLoad in the case of a redirect
1847
- // navigation
1848
- async function startNavigation(historyAction, location, opts) {
1849
- // Abort any in-progress navigations and start a new one. Unset any ongoing
1850
- // uninterrupted revalidations unless told otherwise, since we want this
1851
- // new navigation to update history normally
1852
- pendingNavigationController && pendingNavigationController.abort();
1853
- pendingNavigationController = null;
1854
- pendingAction = historyAction;
1855
- isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true;
1856
- // Save the current scroll position every time we start a new navigation,
1857
- // and track whether we should reset scroll on completion
1858
- saveScrollPosition(state.location, state.matches);
1859
- pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
1860
- pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
1861
- let routesToUse = inFlightDataRoutes || dataRoutes;
1862
- let loadingNavigation = opts && opts.overrideNavigation;
1863
- let matches = matchRoutes(routesToUse, location, basename);
1864
- let flushSync = (opts && opts.flushSync) === true;
1865
- let fogOfWar = checkFogOfWar(matches, routesToUse, location.pathname);
1866
- if (fogOfWar.active && fogOfWar.matches) {
1867
- matches = fogOfWar.matches;
1868
- }
1869
- // Short circuit with a 404 on the root error boundary if we match nothing
1870
- if (!matches) {
1871
- let {
1872
- error,
1873
- notFoundMatches,
1874
- route
1875
- } = handleNavigational404(location.pathname);
1876
- completeNavigation(location, {
1877
- matches: notFoundMatches,
1878
- loaderData: {},
1879
- errors: {
1880
- [route.id]: error
1881
- }
1882
- }, {
1883
- flushSync
1884
- });
1885
- return;
1886
- }
1887
- // Short circuit if it's only a hash change and not a revalidation or
1888
- // mutation submission.
1889
- //
1890
- // Ignore on initial page loads because since the initial load will always
1891
- // be "same hash". For example, on /page#hash and submit a <Form method="post">
1892
- // which will default to a navigation to /page
1893
- if (state.initialized && !isRevalidationRequired && isHashChangeOnly(state.location, location) && !(opts && opts.submission && isMutationMethod(opts.submission.formMethod))) {
1894
- completeNavigation(location, {
1895
- matches
1896
- }, {
1897
- flushSync
1898
- });
1899
- return;
1900
- }
1901
- // Create a controller/Request for this navigation
1902
- pendingNavigationController = new AbortController();
1903
- let request = createClientSideRequest(init.history, location, pendingNavigationController.signal, opts && opts.submission);
1904
- let pendingActionResult;
1905
- if (opts && opts.pendingError) {
1906
- // If we have a pendingError, it means the user attempted a GET submission
1907
- // with binary FormData so assign here and skip to handleLoaders. That
1908
- // way we handle calling loaders above the boundary etc. It's not really
1909
- // different from an actionError in that sense.
1910
- pendingActionResult = [findNearestBoundary(matches).route.id, {
1911
- type: ResultType.error,
1912
- error: opts.pendingError
1913
- }];
1914
- } else if (opts && opts.submission && isMutationMethod(opts.submission.formMethod)) {
1915
- // Call action if we received an action submission
1916
- let actionResult = await handleAction(request, location, opts.submission, matches, fogOfWar.active, {
1917
- replace: opts.replace,
1918
- flushSync
1919
- });
1920
- if (actionResult.shortCircuited) {
1921
- return;
1922
- }
1923
- // If we received a 404 from handleAction, it's because we couldn't lazily
1924
- // discover the destination route so we don't want to call loaders
1925
- if (actionResult.pendingActionResult) {
1926
- let [routeId, result] = actionResult.pendingActionResult;
1927
- if (isErrorResult(result) && isRouteErrorResponse(result.error) && result.error.status === 404) {
1928
- pendingNavigationController = null;
1929
- completeNavigation(location, {
1930
- matches: actionResult.matches,
1931
- loaderData: {},
1932
- errors: {
1933
- [routeId]: result.error
1934
- }
1935
- });
1936
- return;
1937
- }
1938
- }
1939
- matches = actionResult.matches || matches;
1940
- pendingActionResult = actionResult.pendingActionResult;
1941
- loadingNavigation = getLoadingNavigation(location, opts.submission);
1942
- flushSync = false;
1943
- // No need to do fog of war matching again on loader execution
1944
- fogOfWar.active = false;
1945
- // Create a GET request for the loaders
1946
- request = createClientSideRequest(init.history, request.url, request.signal);
1947
- }
1948
- // Call loaders
1949
- let {
1950
- shortCircuited,
1951
- matches: updatedMatches,
1952
- loaderData,
1953
- errors
1954
- } = await handleLoaders(request, location, matches, fogOfWar.active, loadingNavigation, opts && opts.submission, opts && opts.fetcherSubmission, opts && opts.replace, opts && opts.initialHydration === true, flushSync, pendingActionResult);
1955
- if (shortCircuited) {
1956
- return;
1957
- }
1958
- // Clean up now that the action/loaders have completed. Don't clean up if
1959
- // we short circuited because pendingNavigationController will have already
1960
- // been assigned to a new controller for the next navigation
1961
- pendingNavigationController = null;
1962
- completeNavigation(location, _extends({
1963
- matches: updatedMatches || matches
1964
- }, getActionDataForCommit(pendingActionResult), {
1965
- loaderData,
1966
- errors
1967
- }));
1968
- }
1969
- // Call the action matched by the leaf route for this navigation and handle
1970
- // redirects/errors
1971
- async function handleAction(request, location, submission, matches, isFogOfWar, opts) {
1972
- if (opts === void 0) {
1973
- opts = {};
1974
- }
1975
- interruptActiveLoads();
1976
- // Put us in a submitting state
1977
- let navigation = getSubmittingNavigation(location, submission);
1978
- updateState({
1979
- navigation
1980
- }, {
1981
- flushSync: opts.flushSync === true
1982
- });
1983
- if (isFogOfWar) {
1984
- let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);
1985
- if (discoverResult.type === "aborted") {
1986
- return {
1987
- shortCircuited: true
1988
- };
1989
- } else if (discoverResult.type === "error") {
1990
- let {
1991
- error,
1992
- notFoundMatches,
1993
- route
1994
- } = handleDiscoverRouteError(location.pathname, discoverResult);
1995
- return {
1996
- matches: notFoundMatches,
1997
- pendingActionResult: [route.id, {
1998
- type: ResultType.error,
1999
- error
2000
- }]
2001
- };
2002
- } else if (!discoverResult.matches) {
2003
- let {
2004
- notFoundMatches,
2005
- error,
2006
- route
2007
- } = handleNavigational404(location.pathname);
2008
- return {
2009
- matches: notFoundMatches,
2010
- pendingActionResult: [route.id, {
2011
- type: ResultType.error,
2012
- error
2013
- }]
2014
- };
2015
- } else {
2016
- matches = discoverResult.matches;
2017
- }
2018
- }
2019
- // Call our action and get the result
2020
- let result;
2021
- let actionMatch = getTargetMatch(matches, location);
2022
- if (!actionMatch.route.action && !actionMatch.route.lazy) {
2023
- result = {
2024
- type: ResultType.error,
2025
- error: getInternalRouterError(405, {
2026
- method: request.method,
2027
- pathname: location.pathname,
2028
- routeId: actionMatch.route.id
2029
- })
2030
- };
2031
- } else {
2032
- let results = await callDataStrategy("action", request, [actionMatch], matches);
2033
- result = results[0];
2034
- if (request.signal.aborted) {
2035
- return {
2036
- shortCircuited: true
2037
- };
2038
- }
2039
- }
2040
- if (isRedirectResult(result)) {
2041
- let replace;
2042
- if (opts && opts.replace != null) {
2043
- replace = opts.replace;
2044
- } else {
2045
- // If the user didn't explicity indicate replace behavior, replace if
2046
- // we redirected to the exact same location we're currently at to avoid
2047
- // double back-buttons
2048
- let location = normalizeRedirectLocation(result.response.headers.get("Location"), new URL(request.url), basename);
2049
- replace = location === state.location.pathname + state.location.search;
2050
- }
2051
- await startRedirectNavigation(request, result, {
2052
- submission,
2053
- replace
2054
- });
2055
- return {
2056
- shortCircuited: true
2057
- };
2058
- }
2059
- if (isDeferredResult(result)) {
2060
- throw getInternalRouterError(400, {
2061
- type: "defer-action"
2062
- });
2063
- }
2064
- if (isErrorResult(result)) {
2065
- // Store off the pending error - we use it to determine which loaders
2066
- // to call and will commit it when we complete the navigation
2067
- let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);
2068
- // By default, all submissions to the current location are REPLACE
2069
- // navigations, but if the action threw an error that'll be rendered in
2070
- // an errorElement, we fall back to PUSH so that the user can use the
2071
- // back button to get back to the pre-submission form location to try
2072
- // again
2073
- if ((opts && opts.replace) !== true) {
2074
- pendingAction = Action.Push;
2075
- }
2076
- return {
2077
- matches,
2078
- pendingActionResult: [boundaryMatch.route.id, result]
2079
- };
2080
- }
2081
- return {
2082
- matches,
2083
- pendingActionResult: [actionMatch.route.id, result]
2084
- };
2085
- }
2086
- // Call all applicable loaders for the given matches, handling redirects,
2087
- // errors, etc.
2088
- async function handleLoaders(request, location, matches, isFogOfWar, overrideNavigation, submission, fetcherSubmission, replace, initialHydration, flushSync, pendingActionResult) {
2089
- // Figure out the right navigation we want to use for data loading
2090
- let loadingNavigation = overrideNavigation || getLoadingNavigation(location, submission);
2091
- // If this was a redirect from an action we don't have a "submission" but
2092
- // we have it on the loading navigation so use that if available
2093
- let activeSubmission = submission || fetcherSubmission || getSubmissionFromNavigation(loadingNavigation);
2094
- // If this is an uninterrupted revalidation, we remain in our current idle
2095
- // state. If not, we need to switch to our loading state and load data,
2096
- // preserving any new action data or existing action data (in the case of
2097
- // a revalidation interrupting an actionReload)
2098
- // If we have partialHydration enabled, then don't update the state for the
2099
- // initial data load since it's not a "navigation"
2100
- let shouldUpdateNavigationState = !isUninterruptedRevalidation && (!future.v7_partialHydration || !initialHydration);
2101
- // When fog of war is enabled, we enter our `loading` state earlier so we
2102
- // can discover new routes during the `loading` state. We skip this if
2103
- // we've already run actions since we would have done our matching already.
2104
- // If the children() function threw then, we want to proceed with the
2105
- // partial matches it discovered.
2106
- if (isFogOfWar) {
2107
- if (shouldUpdateNavigationState) {
2108
- let actionData = getUpdatedActionData(pendingActionResult);
2109
- updateState(_extends({
2110
- navigation: loadingNavigation
2111
- }, actionData !== undefined ? {
2112
- actionData
2113
- } : {}), {
2114
- flushSync
2115
- });
2116
- }
2117
- let discoverResult = await discoverRoutes(matches, location.pathname, request.signal);
2118
- if (discoverResult.type === "aborted") {
2119
- return {
2120
- shortCircuited: true
2121
- };
2122
- } else if (discoverResult.type === "error") {
2123
- let {
2124
- error,
2125
- notFoundMatches,
2126
- route
2127
- } = handleDiscoverRouteError(location.pathname, discoverResult);
2128
- return {
2129
- matches: notFoundMatches,
2130
- loaderData: {},
2131
- errors: {
2132
- [route.id]: error
2133
- }
2134
- };
2135
- } else if (!discoverResult.matches) {
2136
- let {
2137
- error,
2138
- notFoundMatches,
2139
- route
2140
- } = handleNavigational404(location.pathname);
2141
- return {
2142
- matches: notFoundMatches,
2143
- loaderData: {},
2144
- errors: {
2145
- [route.id]: error
2146
- }
2147
- };
2148
- } else {
2149
- matches = discoverResult.matches;
2150
- }
2151
- }
2152
- let routesToUse = inFlightDataRoutes || dataRoutes;
2153
- let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, activeSubmission, location, future.v7_partialHydration && initialHydration === true, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult);
2154
- // Cancel pending deferreds for no-longer-matched routes or routes we're
2155
- // about to reload. Note that if this is an action reload we would have
2156
- // already cancelled all pending deferreds so this would be a no-op
2157
- cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId));
2158
- pendingNavigationLoadId = ++incrementingLoadId;
2159
- // Short circuit if we have no loaders to run
2160
- if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {
2161
- let updatedFetchers = markFetchRedirectsDone();
2162
- completeNavigation(location, _extends({
2163
- matches,
2164
- loaderData: {},
2165
- // Commit pending error if we're short circuiting
2166
- errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {
2167
- [pendingActionResult[0]]: pendingActionResult[1].error
2168
- } : null
2169
- }, getActionDataForCommit(pendingActionResult), updatedFetchers ? {
2170
- fetchers: new Map(state.fetchers)
2171
- } : {}), {
2172
- flushSync
2173
- });
2174
- return {
2175
- shortCircuited: true
2176
- };
2177
- }
2178
- if (shouldUpdateNavigationState) {
2179
- let updates = {};
2180
- if (!isFogOfWar) {
2181
- // Only update navigation/actionNData if we didn't already do it above
2182
- updates.navigation = loadingNavigation;
2183
- let actionData = getUpdatedActionData(pendingActionResult);
2184
- if (actionData !== undefined) {
2185
- updates.actionData = actionData;
2186
- }
2187
- }
2188
- if (revalidatingFetchers.length > 0) {
2189
- updates.fetchers = getUpdatedRevalidatingFetchers(revalidatingFetchers);
2190
- }
2191
- updateState(updates, {
2192
- flushSync
2193
- });
2194
- }
2195
- revalidatingFetchers.forEach(rf => {
2196
- if (fetchControllers.has(rf.key)) {
2197
- abortFetcher(rf.key);
2198
- }
2199
- if (rf.controller) {
2200
- // Fetchers use an independent AbortController so that aborting a fetcher
2201
- // (via deleteFetcher) does not abort the triggering navigation that
2202
- // triggered the revalidation
2203
- fetchControllers.set(rf.key, rf.controller);
2204
- }
2205
- });
2206
- // Proxy navigation abort through to revalidation fetchers
2207
- let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(f => abortFetcher(f.key));
2208
- if (pendingNavigationController) {
2209
- pendingNavigationController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2210
- }
2211
- let {
2212
- loaderResults,
2213
- fetcherResults
2214
- } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);
2215
- if (request.signal.aborted) {
2216
- return {
2217
- shortCircuited: true
2218
- };
2219
- }
2220
- // Clean up _after_ loaders have completed. Don't clean up if we short
2221
- // circuited because fetchControllers would have been aborted and
2222
- // reassigned to new controllers for the next navigation
2223
- if (pendingNavigationController) {
2224
- pendingNavigationController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2225
- }
2226
- revalidatingFetchers.forEach(rf => fetchControllers.delete(rf.key));
2227
- // If any loaders returned a redirect Response, start a new REPLACE navigation
2228
- let redirect = findRedirect([...loaderResults, ...fetcherResults]);
2229
- if (redirect) {
2230
- if (redirect.idx >= matchesToLoad.length) {
2231
- // If this redirect came from a fetcher make sure we mark it in
2232
- // fetchRedirectIds so it doesn't get revalidated on the next set of
2233
- // loader executions
2234
- let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2235
- fetchRedirectIds.add(fetcherKey);
2236
- }
2237
- await startRedirectNavigation(request, redirect.result, {
2238
- replace
2239
- });
2240
- return {
2241
- shortCircuited: true
2242
- };
2243
- }
2244
- // Process and commit output from loaders
2245
- let {
2246
- loaderData,
2247
- errors
2248
- } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds);
2249
- // Wire up subscribers to update loaderData as promises settle
2250
- activeDeferreds.forEach((deferredData, routeId) => {
2251
- deferredData.subscribe(aborted => {
2252
- // Note: No need to updateState here since the TrackedPromise on
2253
- // loaderData is stable across resolve/reject
2254
- // Remove this instance if we were aborted or if promises have settled
2255
- if (aborted || deferredData.done) {
2256
- activeDeferreds.delete(routeId);
2257
- }
2258
- });
2259
- });
2260
- // During partial hydration, preserve SSR errors for routes that don't re-run
2261
- if (future.v7_partialHydration && initialHydration && state.errors) {
2262
- Object.entries(state.errors).filter(_ref2 => {
2263
- let [id] = _ref2;
2264
- return !matchesToLoad.some(m => m.route.id === id);
2265
- }).forEach(_ref3 => {
2266
- let [routeId, error] = _ref3;
2267
- errors = Object.assign(errors || {}, {
2268
- [routeId]: error
2269
- });
2270
- });
2271
- }
2272
- let updatedFetchers = markFetchRedirectsDone();
2273
- let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);
2274
- let shouldUpdateFetchers = updatedFetchers || didAbortFetchLoads || revalidatingFetchers.length > 0;
2275
- return _extends({
2276
- matches,
2277
- loaderData,
2278
- errors
2279
- }, shouldUpdateFetchers ? {
2280
- fetchers: new Map(state.fetchers)
2281
- } : {});
2282
- }
2283
- function getUpdatedActionData(pendingActionResult) {
2284
- if (pendingActionResult && !isErrorResult(pendingActionResult[1])) {
2285
- // This is cast to `any` currently because `RouteData`uses any and it
2286
- // would be a breaking change to use any.
2287
- // TODO: v7 - change `RouteData` to use `unknown` instead of `any`
2288
- return {
2289
- [pendingActionResult[0]]: pendingActionResult[1].data
2290
- };
2291
- } else if (state.actionData) {
2292
- if (Object.keys(state.actionData).length === 0) {
2293
- return null;
2294
- } else {
2295
- return state.actionData;
2296
- }
2297
- }
2298
- }
2299
- function getUpdatedRevalidatingFetchers(revalidatingFetchers) {
2300
- revalidatingFetchers.forEach(rf => {
2301
- let fetcher = state.fetchers.get(rf.key);
2302
- let revalidatingFetcher = getLoadingFetcher(undefined, fetcher ? fetcher.data : undefined);
2303
- state.fetchers.set(rf.key, revalidatingFetcher);
2304
- });
2305
- return new Map(state.fetchers);
2306
- }
2307
- // Trigger a fetcher load/submit for the given fetcher key
2308
- function fetch(key, routeId, href, opts) {
2309
- if (isServer) {
2310
- 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.");
2311
- }
2312
- if (fetchControllers.has(key)) abortFetcher(key);
2313
- let flushSync = (opts && opts.unstable_flushSync) === true;
2314
- let routesToUse = inFlightDataRoutes || dataRoutes;
2315
- let normalizedPath = normalizeTo(state.location, state.matches, basename, future.v7_prependBasename, href, future.v7_relativeSplatPath, routeId, opts == null ? void 0 : opts.relative);
2316
- let matches = matchRoutes(routesToUse, normalizedPath, basename);
2317
- let fogOfWar = checkFogOfWar(matches, routesToUse, normalizedPath);
2318
- if (fogOfWar.active && fogOfWar.matches) {
2319
- matches = fogOfWar.matches;
2320
- }
2321
- if (!matches) {
2322
- setFetcherError(key, routeId, getInternalRouterError(404, {
2323
- pathname: normalizedPath
2324
- }), {
2325
- flushSync
2326
- });
2327
- return;
2328
- }
2329
- let {
2330
- path,
2331
- submission,
2332
- error
2333
- } = normalizeNavigateOptions(future.v7_normalizeFormMethod, true, normalizedPath, opts);
2334
- if (error) {
2335
- setFetcherError(key, routeId, error, {
2336
- flushSync
2337
- });
2338
- return;
2339
- }
2340
- let match = getTargetMatch(matches, path);
2341
- pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2342
- if (submission && isMutationMethod(submission.formMethod)) {
2343
- handleFetcherAction(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);
2344
- return;
2345
- }
2346
- // Store off the match so we can call it's shouldRevalidate on subsequent
2347
- // revalidations
2348
- fetchLoadMatches.set(key, {
2349
- routeId,
2350
- path
2351
- });
2352
- handleFetcherLoader(key, routeId, path, match, matches, fogOfWar.active, flushSync, submission);
2353
- }
2354
- // Call the action for the matched fetcher.submit(), and then handle redirects,
2355
- // errors, and revalidation
2356
- async function handleFetcherAction(key, routeId, path, match, requestMatches, isFogOfWar, flushSync, submission) {
2357
- interruptActiveLoads();
2358
- fetchLoadMatches.delete(key);
2359
- function detectAndHandle405Error(m) {
2360
- if (!m.route.action && !m.route.lazy) {
2361
- let error = getInternalRouterError(405, {
2362
- method: submission.formMethod,
2363
- pathname: path,
2364
- routeId: routeId
2365
- });
2366
- setFetcherError(key, routeId, error, {
2367
- flushSync
2368
- });
2369
- return true;
2370
- }
2371
- return false;
2372
- }
2373
- if (!isFogOfWar && detectAndHandle405Error(match)) {
2374
- return;
2375
- }
2376
- // Put this fetcher into it's submitting state
2377
- let existingFetcher = state.fetchers.get(key);
2378
- updateFetcherState(key, getSubmittingFetcher(submission, existingFetcher), {
2379
- flushSync
2380
- });
2381
- let abortController = new AbortController();
2382
- let fetchRequest = createClientSideRequest(init.history, path, abortController.signal, submission);
2383
- if (isFogOfWar) {
2384
- let discoverResult = await discoverRoutes(requestMatches, path, fetchRequest.signal);
2385
- if (discoverResult.type === "aborted") {
2386
- return;
2387
- } else if (discoverResult.type === "error") {
2388
- let {
2389
- error
2390
- } = handleDiscoverRouteError(path, discoverResult);
2391
- setFetcherError(key, routeId, error, {
2392
- flushSync
2393
- });
2394
- return;
2395
- } else if (!discoverResult.matches) {
2396
- setFetcherError(key, routeId, getInternalRouterError(404, {
2397
- pathname: path
2398
- }), {
2399
- flushSync
2400
- });
2401
- return;
2402
- } else {
2403
- requestMatches = discoverResult.matches;
2404
- match = getTargetMatch(requestMatches, path);
2405
- if (detectAndHandle405Error(match)) {
2406
- return;
2407
- }
2408
- }
2409
- }
2410
- // Call the action for the fetcher
2411
- fetchControllers.set(key, abortController);
2412
- let originatingLoadId = incrementingLoadId;
2413
- let actionResults = await callDataStrategy("action", fetchRequest, [match], requestMatches);
2414
- let actionResult = actionResults[0];
2415
- if (fetchRequest.signal.aborted) {
2416
- // We can delete this so long as we weren't aborted by our own fetcher
2417
- // re-submit which would have put _new_ controller is in fetchControllers
2418
- if (fetchControllers.get(key) === abortController) {
2419
- fetchControllers.delete(key);
2420
- }
2421
- return;
2422
- }
2423
- // When using v7_fetcherPersist, we don't want errors bubbling up to the UI
2424
- // or redirects processed for unmounted fetchers so we just revert them to
2425
- // idle
2426
- if (future.v7_fetcherPersist && deletedFetchers.has(key)) {
2427
- if (isRedirectResult(actionResult) || isErrorResult(actionResult)) {
2428
- updateFetcherState(key, getDoneFetcher(undefined));
2429
- return;
2430
- }
2431
- // Let SuccessResult's fall through for revalidation
2432
- } else {
2433
- if (isRedirectResult(actionResult)) {
2434
- fetchControllers.delete(key);
2435
- if (pendingNavigationLoadId > originatingLoadId) {
2436
- // A new navigation was kicked off after our action started, so that
2437
- // should take precedence over this redirect navigation. We already
2438
- // set isRevalidationRequired so all loaders for the new route should
2439
- // fire unless opted out via shouldRevalidate
2440
- updateFetcherState(key, getDoneFetcher(undefined));
2441
- return;
2442
- } else {
2443
- fetchRedirectIds.add(key);
2444
- updateFetcherState(key, getLoadingFetcher(submission));
2445
- return startRedirectNavigation(fetchRequest, actionResult, {
2446
- fetcherSubmission: submission
2447
- });
2448
- }
2449
- }
2450
- // Process any non-redirect errors thrown
2451
- if (isErrorResult(actionResult)) {
2452
- setFetcherError(key, routeId, actionResult.error);
2453
- return;
2454
- }
2455
- }
2456
- if (isDeferredResult(actionResult)) {
2457
- throw getInternalRouterError(400, {
2458
- type: "defer-action"
2459
- });
2460
- }
2461
- // Start the data load for current matches, or the next location if we're
2462
- // in the middle of a navigation
2463
- let nextLocation = state.navigation.location || state.location;
2464
- let revalidationRequest = createClientSideRequest(init.history, nextLocation, abortController.signal);
2465
- let routesToUse = inFlightDataRoutes || dataRoutes;
2466
- let matches = state.navigation.state !== "idle" ? matchRoutes(routesToUse, state.navigation.location, basename) : state.matches;
2467
- invariant(matches, "Didn't find any matches after fetcher action");
2468
- let loadId = ++incrementingLoadId;
2469
- fetchReloadIds.set(key, loadId);
2470
- let loadFetcher = getLoadingFetcher(submission, actionResult.data);
2471
- state.fetchers.set(key, loadFetcher);
2472
- let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(init.history, state, matches, submission, nextLocation, false, future.unstable_skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, [match.route.id, actionResult]);
2473
- // Put all revalidating fetchers into the loading state, except for the
2474
- // current fetcher which we want to keep in it's current loading state which
2475
- // contains it's action submission info + action data
2476
- revalidatingFetchers.filter(rf => rf.key !== key).forEach(rf => {
2477
- let staleKey = rf.key;
2478
- let existingFetcher = state.fetchers.get(staleKey);
2479
- let revalidatingFetcher = getLoadingFetcher(undefined, existingFetcher ? existingFetcher.data : undefined);
2480
- state.fetchers.set(staleKey, revalidatingFetcher);
2481
- if (fetchControllers.has(staleKey)) {
2482
- abortFetcher(staleKey);
2483
- }
2484
- if (rf.controller) {
2485
- fetchControllers.set(staleKey, rf.controller);
2486
- }
2487
- });
2488
- updateState({
2489
- fetchers: new Map(state.fetchers)
2490
- });
2491
- let abortPendingFetchRevalidations = () => revalidatingFetchers.forEach(rf => abortFetcher(rf.key));
2492
- abortController.signal.addEventListener("abort", abortPendingFetchRevalidations);
2493
- let {
2494
- loaderResults,
2495
- fetcherResults
2496
- } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);
2497
- if (abortController.signal.aborted) {
2498
- return;
2499
- }
2500
- abortController.signal.removeEventListener("abort", abortPendingFetchRevalidations);
2501
- fetchReloadIds.delete(key);
2502
- fetchControllers.delete(key);
2503
- revalidatingFetchers.forEach(r => fetchControllers.delete(r.key));
2504
- let redirect = findRedirect([...loaderResults, ...fetcherResults]);
2505
- if (redirect) {
2506
- if (redirect.idx >= matchesToLoad.length) {
2507
- // If this redirect came from a fetcher make sure we mark it in
2508
- // fetchRedirectIds so it doesn't get revalidated on the next set of
2509
- // loader executions
2510
- let fetcherKey = revalidatingFetchers[redirect.idx - matchesToLoad.length].key;
2511
- fetchRedirectIds.add(fetcherKey);
2512
- }
2513
- return startRedirectNavigation(revalidationRequest, redirect.result);
2514
- }
2515
- // Process and commit output from loaders
2516
- let {
2517
- loaderData,
2518
- errors
2519
- } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);
2520
- // Since we let revalidations complete even if the submitting fetcher was
2521
- // deleted, only put it back to idle if it hasn't been deleted
2522
- if (state.fetchers.has(key)) {
2523
- let doneFetcher = getDoneFetcher(actionResult.data);
2524
- state.fetchers.set(key, doneFetcher);
2525
- }
2526
- abortStaleFetchLoads(loadId);
2527
- // If we are currently in a navigation loading state and this fetcher is
2528
- // more recent than the navigation, we want the newer data so abort the
2529
- // navigation and complete it with the fetcher data
2530
- if (state.navigation.state === "loading" && loadId > pendingNavigationLoadId) {
2531
- invariant(pendingAction, "Expected pending action");
2532
- pendingNavigationController && pendingNavigationController.abort();
2533
- completeNavigation(state.navigation.location, {
2534
- matches,
2535
- loaderData,
2536
- errors,
2537
- fetchers: new Map(state.fetchers)
2538
- });
2539
- } else {
2540
- // otherwise just update with the fetcher data, preserving any existing
2541
- // loaderData for loaders that did not need to reload. We have to
2542
- // manually merge here since we aren't going through completeNavigation
2543
- updateState({
2544
- errors,
2545
- loaderData: mergeLoaderData(state.loaderData, loaderData, matches, errors),
2546
- fetchers: new Map(state.fetchers)
2547
- });
2548
- isRevalidationRequired = false;
2549
- }
2550
- }
2551
- // Call the matched loader for fetcher.load(), handling redirects, errors, etc.
2552
- async function handleFetcherLoader(key, routeId, path, match, matches, isFogOfWar, flushSync, submission) {
2553
- let existingFetcher = state.fetchers.get(key);
2554
- updateFetcherState(key, getLoadingFetcher(submission, existingFetcher ? existingFetcher.data : undefined), {
2555
- flushSync
2556
- });
2557
- let abortController = new AbortController();
2558
- let fetchRequest = createClientSideRequest(init.history, path, abortController.signal);
2559
- if (isFogOfWar) {
2560
- let discoverResult = await discoverRoutes(matches, path, fetchRequest.signal);
2561
- if (discoverResult.type === "aborted") {
2562
- return;
2563
- } else if (discoverResult.type === "error") {
2564
- let {
2565
- error
2566
- } = handleDiscoverRouteError(path, discoverResult);
2567
- setFetcherError(key, routeId, error, {
2568
- flushSync
2569
- });
2570
- return;
2571
- } else if (!discoverResult.matches) {
2572
- setFetcherError(key, routeId, getInternalRouterError(404, {
2573
- pathname: path
2574
- }), {
2575
- flushSync
2576
- });
2577
- return;
2578
- } else {
2579
- matches = discoverResult.matches;
2580
- match = getTargetMatch(matches, path);
2581
- }
2582
- }
2583
- // Call the loader for this fetcher route match
2584
- fetchControllers.set(key, abortController);
2585
- let originatingLoadId = incrementingLoadId;
2586
- let results = await callDataStrategy("loader", fetchRequest, [match], matches);
2587
- let result = results[0];
2588
- // Deferred isn't supported for fetcher loads, await everything and treat it
2589
- // as a normal load. resolveDeferredData will return undefined if this
2590
- // fetcher gets aborted, so we just leave result untouched and short circuit
2591
- // below if that happens
2592
- if (isDeferredResult(result)) {
2593
- result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;
2594
- }
2595
- // We can delete this so long as we weren't aborted by our our own fetcher
2596
- // re-load which would have put _new_ controller is in fetchControllers
2597
- if (fetchControllers.get(key) === abortController) {
2598
- fetchControllers.delete(key);
2599
- }
2600
- if (fetchRequest.signal.aborted) {
2601
- return;
2602
- }
2603
- // We don't want errors bubbling up or redirects followed for unmounted
2604
- // fetchers, so short circuit here if it was removed from the UI
2605
- if (deletedFetchers.has(key)) {
2606
- updateFetcherState(key, getDoneFetcher(undefined));
2607
- return;
2608
- }
2609
- // If the loader threw a redirect Response, start a new REPLACE navigation
2610
- if (isRedirectResult(result)) {
2611
- if (pendingNavigationLoadId > originatingLoadId) {
2612
- // A new navigation was kicked off after our loader started, so that
2613
- // should take precedence over this redirect navigation
2614
- updateFetcherState(key, getDoneFetcher(undefined));
2615
- return;
2616
- } else {
2617
- fetchRedirectIds.add(key);
2618
- await startRedirectNavigation(fetchRequest, result);
2619
- return;
2620
- }
2621
- }
2622
- // Process any non-redirect errors thrown
2623
- if (isErrorResult(result)) {
2624
- setFetcherError(key, routeId, result.error);
2625
- return;
2626
- }
2627
- invariant(!isDeferredResult(result), "Unhandled fetcher deferred data");
2628
- // Put the fetcher back into an idle state
2629
- updateFetcherState(key, getDoneFetcher(result.data));
2630
- }
2631
- /**
2632
- * Utility function to handle redirects returned from an action or loader.
2633
- * Normally, a redirect "replaces" the navigation that triggered it. So, for
2634
- * example:
2635
- *
2636
- * - user is on /a
2637
- * - user clicks a link to /b
2638
- * - loader for /b redirects to /c
2639
- *
2640
- * In a non-JS app the browser would track the in-flight navigation to /b and
2641
- * then replace it with /c when it encountered the redirect response. In
2642
- * the end it would only ever update the URL bar with /c.
2643
- *
2644
- * In client-side routing using pushState/replaceState, we aim to emulate
2645
- * this behavior and we also do not update history until the end of the
2646
- * navigation (including processed redirects). This means that we never
2647
- * actually touch history until we've processed redirects, so we just use
2648
- * the history action from the original navigation (PUSH or REPLACE).
2649
- */
2650
- async function startRedirectNavigation(request, redirect, _temp2) {
2651
- let {
2652
- submission,
2653
- fetcherSubmission,
2654
- replace
2655
- } = _temp2 === void 0 ? {} : _temp2;
2656
- if (redirect.response.headers.has("X-Remix-Revalidate")) {
2657
- isRevalidationRequired = true;
2658
- }
2659
- let location = redirect.response.headers.get("Location");
2660
- invariant(location, "Expected a Location header on the redirect Response");
2661
- location = normalizeRedirectLocation(location, new URL(request.url), basename);
2662
- let redirectLocation = createLocation(state.location, location, {
2663
- _isRedirect: true
2664
- });
2665
- if (isBrowser) {
2666
- let isDocumentReload = false;
2667
- if (redirect.response.headers.has("X-Remix-Reload-Document")) {
2668
- // Hard reload if the response contained X-Remix-Reload-Document
2669
- isDocumentReload = true;
2670
- } else if (ABSOLUTE_URL_REGEX.test(location)) {
2671
- const url = init.history.createURL(location);
2672
- isDocumentReload =
2673
- // Hard reload if it's an absolute URL to a new origin
2674
- url.origin !== routerWindow.location.origin ||
2675
- // Hard reload if it's an absolute URL that does not match our basename
2676
- stripBasename(url.pathname, basename) == null;
2677
- }
2678
- if (isDocumentReload) {
2679
- if (replace) {
2680
- routerWindow.location.replace(location);
2681
- } else {
2682
- routerWindow.location.assign(location);
2683
- }
2684
- return;
2685
- }
2686
- }
2687
- // There's no need to abort on redirects, since we don't detect the
2688
- // redirect until the action/loaders have settled
2689
- pendingNavigationController = null;
2690
- let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;
2691
- // Use the incoming submission if provided, fallback on the active one in
2692
- // state.navigation
2693
- let {
2694
- formMethod,
2695
- formAction,
2696
- formEncType
2697
- } = state.navigation;
2698
- if (!submission && !fetcherSubmission && formMethod && formAction && formEncType) {
2699
- submission = getSubmissionFromNavigation(state.navigation);
2700
- }
2701
- // If this was a 307/308 submission we want to preserve the HTTP method and
2702
- // re-submit the GET/POST/PUT/PATCH/DELETE as a submission navigation to the
2703
- // redirected location
2704
- let activeSubmission = submission || fetcherSubmission;
2705
- if (redirectPreserveMethodStatusCodes.has(redirect.response.status) && activeSubmission && isMutationMethod(activeSubmission.formMethod)) {
2706
- await startNavigation(redirectHistoryAction, redirectLocation, {
2707
- submission: _extends({}, activeSubmission, {
2708
- formAction: location
2709
- }),
2710
- // Preserve this flag across redirects
2711
- preventScrollReset: pendingPreventScrollReset
2712
- });
2713
- } else {
2714
- // If we have a navigation submission, we will preserve it through the
2715
- // redirect navigation
2716
- let overrideNavigation = getLoadingNavigation(redirectLocation, submission);
2717
- await startNavigation(redirectHistoryAction, redirectLocation, {
2718
- overrideNavigation,
2719
- // Send fetcher submissions through for shouldRevalidate
2720
- fetcherSubmission,
2721
- // Preserve this flag across redirects
2722
- preventScrollReset: pendingPreventScrollReset
2723
- });
2724
- }
2725
- }
2726
- // Utility wrapper for calling dataStrategy client-side without having to
2727
- // pass around the manifest, mapRouteProperties, etc.
2728
- async function callDataStrategy(type, request, matchesToLoad, matches) {
2729
- try {
2730
- let results = await callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties);
2731
- return await Promise.all(results.map((result, i) => {
2732
- if (isRedirectHandlerResult(result)) {
2733
- let response = result.result;
2734
- return {
2735
- type: ResultType.redirect,
2736
- response: normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath)
2737
- };
2738
- }
2739
- return convertHandlerResultToDataResult(result);
2740
- }));
2741
- } catch (e) {
2742
- // If the outer dataStrategy method throws, just return the error for all
2743
- // matches - and it'll naturally bubble to the root
2744
- return matchesToLoad.map(() => ({
2745
- type: ResultType.error,
2746
- error: e
2747
- }));
2748
- }
2749
- }
2750
- async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {
2751
- let [loaderResults, ...fetcherResults] = await Promise.all([matchesToLoad.length ? callDataStrategy("loader", request, matchesToLoad, matches) : [], ...fetchersToLoad.map(f => {
2752
- if (f.matches && f.match && f.controller) {
2753
- let fetcherRequest = createClientSideRequest(init.history, f.path, f.controller.signal);
2754
- return callDataStrategy("loader", fetcherRequest, [f.match], f.matches).then(r => r[0]);
2755
- } else {
2756
- return Promise.resolve({
2757
- type: ResultType.error,
2758
- error: getInternalRouterError(404, {
2759
- pathname: f.path
2760
- })
2761
- });
2762
- }
2763
- })]);
2764
- 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)]);
2765
- return {
2766
- loaderResults,
2767
- fetcherResults
2768
- };
2769
- }
2770
- function interruptActiveLoads() {
2771
- // Every interruption triggers a revalidation
2772
- isRevalidationRequired = true;
2773
- // Cancel pending route-level deferreds and mark cancelled routes for
2774
- // revalidation
2775
- cancelledDeferredRoutes.push(...cancelActiveDeferreds());
2776
- // Abort in-flight fetcher loads
2777
- fetchLoadMatches.forEach((_, key) => {
2778
- if (fetchControllers.has(key)) {
2779
- cancelledFetcherLoads.push(key);
2780
- abortFetcher(key);
2781
- }
2782
- });
2783
- }
2784
- function updateFetcherState(key, fetcher, opts) {
2785
- if (opts === void 0) {
2786
- opts = {};
2787
- }
2788
- state.fetchers.set(key, fetcher);
2789
- updateState({
2790
- fetchers: new Map(state.fetchers)
2791
- }, {
2792
- flushSync: (opts && opts.flushSync) === true
2793
- });
2794
- }
2795
- function setFetcherError(key, routeId, error, opts) {
2796
- if (opts === void 0) {
2797
- opts = {};
2798
- }
2799
- let boundaryMatch = findNearestBoundary(state.matches, routeId);
2800
- deleteFetcher(key);
2801
- updateState({
2802
- errors: {
2803
- [boundaryMatch.route.id]: error
2804
- },
2805
- fetchers: new Map(state.fetchers)
2806
- }, {
2807
- flushSync: (opts && opts.flushSync) === true
2808
- });
2809
- }
2810
- function getFetcher(key) {
2811
- if (future.v7_fetcherPersist) {
2812
- activeFetchers.set(key, (activeFetchers.get(key) || 0) + 1);
2813
- // If this fetcher was previously marked for deletion, unmark it since we
2814
- // have a new instance
2815
- if (deletedFetchers.has(key)) {
2816
- deletedFetchers.delete(key);
2817
- }
2818
- }
2819
- return state.fetchers.get(key) || IDLE_FETCHER;
2820
- }
2821
- function deleteFetcher(key) {
2822
- let fetcher = state.fetchers.get(key);
2823
- // Don't abort the controller if this is a deletion of a fetcher.submit()
2824
- // in it's loading phase since - we don't want to abort the corresponding
2825
- // revalidation and want them to complete and land
2826
- if (fetchControllers.has(key) && !(fetcher && fetcher.state === "loading" && fetchReloadIds.has(key))) {
2827
- abortFetcher(key);
2828
- }
2829
- fetchLoadMatches.delete(key);
2830
- fetchReloadIds.delete(key);
2831
- fetchRedirectIds.delete(key);
2832
- deletedFetchers.delete(key);
2833
- state.fetchers.delete(key);
2834
- }
2835
- function deleteFetcherAndUpdateState(key) {
2836
- if (future.v7_fetcherPersist) {
2837
- let count = (activeFetchers.get(key) || 0) - 1;
2838
- if (count <= 0) {
2839
- activeFetchers.delete(key);
2840
- deletedFetchers.add(key);
2841
- } else {
2842
- activeFetchers.set(key, count);
2843
- }
2844
- } else {
2845
- deleteFetcher(key);
2846
- }
2847
- updateState({
2848
- fetchers: new Map(state.fetchers)
2849
- });
2850
- }
2851
- function abortFetcher(key) {
2852
- let controller = fetchControllers.get(key);
2853
- invariant(controller, "Expected fetch controller: " + key);
2854
- controller.abort();
2855
- fetchControllers.delete(key);
2856
- }
2857
- function markFetchersDone(keys) {
2858
- for (let key of keys) {
2859
- let fetcher = getFetcher(key);
2860
- let doneFetcher = getDoneFetcher(fetcher.data);
2861
- state.fetchers.set(key, doneFetcher);
2862
- }
2863
- }
2864
- function markFetchRedirectsDone() {
2865
- let doneKeys = [];
2866
- let updatedFetchers = false;
2867
- for (let key of fetchRedirectIds) {
2868
- let fetcher = state.fetchers.get(key);
2869
- invariant(fetcher, "Expected fetcher: " + key);
2870
- if (fetcher.state === "loading") {
2871
- fetchRedirectIds.delete(key);
2872
- doneKeys.push(key);
2873
- updatedFetchers = true;
2874
- }
2875
- }
2876
- markFetchersDone(doneKeys);
2877
- return updatedFetchers;
2878
- }
2879
- function abortStaleFetchLoads(landedId) {
2880
- let yeetedKeys = [];
2881
- for (let [key, id] of fetchReloadIds) {
2882
- if (id < landedId) {
2883
- let fetcher = state.fetchers.get(key);
2884
- invariant(fetcher, "Expected fetcher: " + key);
2885
- if (fetcher.state === "loading") {
2886
- abortFetcher(key);
2887
- fetchReloadIds.delete(key);
2888
- yeetedKeys.push(key);
2889
- }
2890
- }
2891
- }
2892
- markFetchersDone(yeetedKeys);
2893
- return yeetedKeys.length > 0;
2894
- }
2895
- function getBlocker(key, fn) {
2896
- let blocker = state.blockers.get(key) || IDLE_BLOCKER;
2897
- if (blockerFunctions.get(key) !== fn) {
2898
- blockerFunctions.set(key, fn);
2899
- }
2900
- return blocker;
2901
- }
2902
- function deleteBlocker(key) {
2903
- state.blockers.delete(key);
2904
- blockerFunctions.delete(key);
2905
- }
2906
- // Utility function to update blockers, ensuring valid state transitions
2907
- function updateBlocker(key, newBlocker) {
2908
- let blocker = state.blockers.get(key) || IDLE_BLOCKER;
2909
- // Poor mans state machine :)
2910
- // https://mermaid.live/edit#pako:eNqVkc9OwzAMxl8l8nnjAYrEtDIOHEBIgwvKJTReGy3_lDpIqO27k6awMG0XcrLlnz87nwdonESogKXXBuE79rq75XZO3-yHds0RJVuv70YrPlUrCEe2HfrORS3rubqZfuhtpg5C9wk5tZ4VKcRUq88q9Z8RS0-48cE1iHJkL0ugbHuFLus9L6spZy8nX9MP2CNdomVaposqu3fGayT8T8-jJQwhepo_UtpgBQaDEUom04dZhAN1aJBDlUKJBxE1ceB2Smj0Mln-IBW5AFU2dwUiktt_2Qaq2dBfaKdEup85UV7Yd-dKjlnkabl2Pvr0DTkTreM
2911
- 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);
2912
- let blockers = new Map(state.blockers);
2913
- blockers.set(key, newBlocker);
2914
- updateState({
2915
- blockers
2916
- });
2917
- }
2918
- function shouldBlockNavigation(_ref4) {
2919
- let {
2920
- currentLocation,
2921
- nextLocation,
2922
- historyAction
2923
- } = _ref4;
2924
- if (blockerFunctions.size === 0) {
2925
- return;
2926
- }
2927
- // We ony support a single active blocker at the moment since we don't have
2928
- // any compelling use cases for multi-blocker yet
2929
- if (blockerFunctions.size > 1) {
2930
- warning(false, "A router only supports one blocker at a time");
2931
- }
2932
- let entries = Array.from(blockerFunctions.entries());
2933
- let [blockerKey, blockerFunction] = entries[entries.length - 1];
2934
- let blocker = state.blockers.get(blockerKey);
2935
- if (blocker && blocker.state === "proceeding") {
2936
- // If the blocker is currently proceeding, we don't need to re-check
2937
- // it and can let this navigation continue
2938
- return;
2939
- }
2940
- // At this point, we know we're unblocked/blocked so we need to check the
2941
- // user-provided blocker function
2942
- if (blockerFunction({
2943
- currentLocation,
2944
- nextLocation,
2945
- historyAction
2946
- })) {
2947
- return blockerKey;
2948
- }
2949
- }
2950
- function handleNavigational404(pathname) {
2951
- let error = getInternalRouterError(404, {
2952
- pathname
2953
- });
2954
- let routesToUse = inFlightDataRoutes || dataRoutes;
2955
- let {
2956
- matches,
2957
- route
2958
- } = getShortCircuitMatches(routesToUse);
2959
- // Cancel all pending deferred on 404s since we don't keep any routes
2960
- cancelActiveDeferreds();
2961
- return {
2962
- notFoundMatches: matches,
2963
- route,
2964
- error
2965
- };
2966
- }
2967
- function handleDiscoverRouteError(pathname, discoverResult) {
2968
- let matches = discoverResult.partialMatches;
2969
- let route = matches[matches.length - 1].route;
2970
- let error = getInternalRouterError(400, {
2971
- type: "route-discovery",
2972
- routeId: route.id,
2973
- pathname,
2974
- message: discoverResult.error != null && "message" in discoverResult.error ? discoverResult.error : String(discoverResult.error)
2975
- });
2976
- return {
2977
- notFoundMatches: matches,
2978
- route,
2979
- error
2980
- };
2981
- }
2982
- function cancelActiveDeferreds(predicate) {
2983
- let cancelledRouteIds = [];
2984
- activeDeferreds.forEach((dfd, routeId) => {
2985
- if (!predicate || predicate(routeId)) {
2986
- // Cancel the deferred - but do not remove from activeDeferreds here -
2987
- // we rely on the subscribers to do that so our tests can assert proper
2988
- // cleanup via _internalActiveDeferreds
2989
- dfd.cancel();
2990
- cancelledRouteIds.push(routeId);
2991
- activeDeferreds.delete(routeId);
2992
- }
2993
- });
2994
- return cancelledRouteIds;
2995
- }
2996
- // Opt in to capturing and reporting scroll positions during navigations,
2997
- // used by the <ScrollRestoration> component
2998
- function enableScrollRestoration(positions, getPosition, getKey) {
2999
- savedScrollPositions = positions;
3000
- getScrollPosition = getPosition;
3001
- getScrollRestorationKey = getKey || null;
3002
- // Perform initial hydration scroll restoration, since we miss the boat on
3003
- // the initial updateState() because we've not yet rendered <ScrollRestoration/>
3004
- // and therefore have no savedScrollPositions available
3005
- if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {
3006
- initialScrollRestored = true;
3007
- let y = getSavedScrollPosition(state.location, state.matches);
3008
- if (y != null) {
3009
- updateState({
3010
- restoreScrollPosition: y
3011
- });
3012
- }
3013
- }
3014
- return () => {
3015
- savedScrollPositions = null;
3016
- getScrollPosition = null;
3017
- getScrollRestorationKey = null;
3018
- };
3019
- }
3020
- function getScrollKey(location, matches) {
3021
- if (getScrollRestorationKey) {
3022
- let key = getScrollRestorationKey(location, matches.map(m => convertRouteMatchToUiMatch(m, state.loaderData)));
3023
- return key || location.key;
3024
- }
3025
- return location.key;
3026
- }
3027
- function saveScrollPosition(location, matches) {
3028
- if (savedScrollPositions && getScrollPosition) {
3029
- let key = getScrollKey(location, matches);
3030
- savedScrollPositions[key] = getScrollPosition();
3031
- }
3032
- }
3033
- function getSavedScrollPosition(location, matches) {
3034
- if (savedScrollPositions) {
3035
- let key = getScrollKey(location, matches);
3036
- let y = savedScrollPositions[key];
3037
- if (typeof y === "number") {
3038
- return y;
3039
- }
3040
- }
3041
- return null;
3042
- }
3043
- function checkFogOfWar(matches, routesToUse, pathname) {
3044
- if (patchRoutesOnMissImpl) {
3045
- if (!matches) {
3046
- let fogMatches = matchRoutesImpl(routesToUse, pathname, basename, true);
3047
- return {
3048
- active: true,
3049
- matches: fogMatches || []
3050
- };
3051
- } else {
3052
- let leafRoute = matches[matches.length - 1].route;
3053
- if (leafRoute.path === "*") {
3054
- // If we matched a splat, it might only be because we haven't yet fetched
3055
- // the children that would match with a higher score, so let's fetch
3056
- // around and find out
3057
- let partialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);
3058
- return {
3059
- active: true,
3060
- matches: partialMatches
3061
- };
3062
- }
3063
- }
3064
- }
3065
- return {
3066
- active: false,
3067
- matches: null
3068
- };
3069
- }
3070
- async function discoverRoutes(matches, pathname, signal) {
3071
- let partialMatches = matches;
3072
- let route = partialMatches.length > 0 ? partialMatches[partialMatches.length - 1].route : null;
3073
- while (true) {
3074
- try {
3075
- await loadLazyRouteChildren(patchRoutesOnMissImpl, pathname, partialMatches, dataRoutes || inFlightDataRoutes, manifest, mapRouteProperties, pendingPatchRoutes, signal);
3076
- } catch (e) {
3077
- return {
3078
- type: "error",
3079
- error: e,
3080
- partialMatches
3081
- };
3082
- }
3083
- if (signal.aborted) {
3084
- return {
3085
- type: "aborted"
3086
- };
3087
- }
3088
- let routesToUse = inFlightDataRoutes || dataRoutes;
3089
- let newMatches = matchRoutes(routesToUse, pathname, basename);
3090
- let matchedSplat = false;
3091
- if (newMatches) {
3092
- let leafRoute = newMatches[newMatches.length - 1].route;
3093
- if (leafRoute.index) {
3094
- // If we found an index route, we can stop
3095
- return {
3096
- type: "success",
3097
- matches: newMatches
3098
- };
3099
- }
3100
- if (leafRoute.path && leafRoute.path.length > 0) {
3101
- if (leafRoute.path === "*") {
3102
- // If we found a splat route, we can't be sure there's not a
3103
- // higher-scoring route down some partial matches trail so we need
3104
- // to check that out
3105
- matchedSplat = true;
3106
- } else {
3107
- // If we found a non-splat route, we can stop
3108
- return {
3109
- type: "success",
3110
- matches: newMatches
3111
- };
3112
- }
3113
- }
3114
- }
3115
- let newPartialMatches = matchRoutesImpl(routesToUse, pathname, basename, true);
3116
- // If we are no longer partially matching anything, this was either a
3117
- // legit splat match above, or it's a 404. Also avoid loops if the
3118
- // second pass results in the same partial matches
3119
- if (!newPartialMatches || partialMatches.map(m => m.route.id).join("-") === newPartialMatches.map(m => m.route.id).join("-")) {
3120
- return {
3121
- type: "success",
3122
- matches: matchedSplat ? newMatches : null
3123
- };
3124
- }
3125
- partialMatches = newPartialMatches;
3126
- route = partialMatches[partialMatches.length - 1].route;
3127
- if (route.path === "*") {
3128
- // The splat is still our most accurate partial, so run with it
3129
- return {
3130
- type: "success",
3131
- matches: partialMatches
3132
- };
3133
- }
3134
- }
3135
- }
3136
- function _internalSetRoutes(newRoutes) {
3137
- manifest = {};
3138
- inFlightDataRoutes = convertRoutesToDataRoutes(newRoutes, mapRouteProperties, undefined, manifest);
3139
- }
3140
- router = {
3141
- get basename() {
3142
- return basename;
3143
- },
3144
- get future() {
3145
- return future;
3146
- },
3147
- get state() {
3148
- return state;
3149
- },
3150
- get routes() {
3151
- return dataRoutes;
3152
- },
3153
- get window() {
3154
- return routerWindow;
3155
- },
3156
- initialize,
3157
- subscribe,
3158
- enableScrollRestoration,
3159
- navigate,
3160
- fetch,
3161
- revalidate,
3162
- // Passthrough to history-aware createHref used by useHref so we get proper
3163
- // hash-aware URLs in DOM paths
3164
- createHref: to => init.history.createHref(to),
3165
- encodeLocation: to => init.history.encodeLocation(to),
3166
- getFetcher,
3167
- deleteFetcher: deleteFetcherAndUpdateState,
3168
- dispose,
3169
- getBlocker,
3170
- deleteBlocker,
3171
- patchRoutes(routeId, children) {
3172
- return patchRoutes(routeId, children, dataRoutes || inFlightDataRoutes, manifest, mapRouteProperties);
3173
- },
3174
- _internalFetchControllers: fetchControllers,
3175
- _internalActiveDeferreds: activeDeferreds,
3176
- // TODO: Remove setRoutes, it's temporary to avoid dealing with
3177
- // updating the tree while validating the update algorithm.
3178
- _internalSetRoutes
3179
- };
3180
- return router;
3181
- }
3182
- //#endregion
3183
- ////////////////////////////////////////////////////////////////////////////////
3184
- //#region createStaticHandler
3185
- ////////////////////////////////////////////////////////////////////////////////
3186
- const UNSAFE_DEFERRED_SYMBOL = Symbol("deferred");
3187
- function createStaticHandler(routes, opts) {
3188
- invariant(routes.length > 0, "You must provide a non-empty routes array to createStaticHandler");
3189
- let manifest = {};
3190
- let basename = (opts ? opts.basename : null) || "/";
3191
- let mapRouteProperties;
3192
- if (opts != null && opts.mapRouteProperties) {
3193
- mapRouteProperties = opts.mapRouteProperties;
3194
- } else if (opts != null && opts.detectErrorBoundary) {
3195
- // If they are still using the deprecated version, wrap it with the new API
3196
- let detectErrorBoundary = opts.detectErrorBoundary;
3197
- mapRouteProperties = route => ({
3198
- hasErrorBoundary: detectErrorBoundary(route)
3199
- });
3200
- } else {
3201
- mapRouteProperties = defaultMapRouteProperties;
3202
- }
3203
- // Config driven behavior flags
3204
- let future = _extends({
3205
- v7_relativeSplatPath: false,
3206
- v7_throwAbortReason: false
3207
- }, opts ? opts.future : null);
3208
- let dataRoutes = convertRoutesToDataRoutes(routes, mapRouteProperties, undefined, manifest);
3209
- /**
3210
- * The query() method is intended for document requests, in which we want to
3211
- * call an optional action and potentially multiple loaders for all nested
3212
- * routes. It returns a StaticHandlerContext object, which is very similar
3213
- * to the router state (location, loaderData, actionData, errors, etc.) and
3214
- * also adds SSR-specific information such as the statusCode and headers
3215
- * from action/loaders Responses.
3216
- *
3217
- * It _should_ never throw and should report all errors through the
3218
- * returned context.errors object, properly associating errors to their error
3219
- * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be
3220
- * used to emulate React error boundaries during SSr by performing a second
3221
- * pass only down to the boundaryId.
3222
- *
3223
- * The one exception where we do not return a StaticHandlerContext is when a
3224
- * redirect response is returned or thrown from any action/loader. We
3225
- * propagate that out and return the raw Response so the HTTP server can
3226
- * return it directly.
3227
- *
3228
- * - `opts.requestContext` is an optional server context that will be passed
3229
- * to actions/loaders in the `context` parameter
3230
- * - `opts.skipLoaderErrorBubbling` is an optional parameter that will prevent
3231
- * the bubbling of errors which allows single-fetch-type implementations
3232
- * where the client will handle the bubbling and we may need to return data
3233
- * for the handling route
3234
- */
3235
- async function query(request, _temp3) {
3236
- let {
3237
- requestContext,
3238
- skipLoaderErrorBubbling,
3239
- unstable_dataStrategy
3240
- } = _temp3 === void 0 ? {} : _temp3;
3241
- let url = new URL(request.url);
3242
- let method = request.method;
3243
- let location = createLocation("", createPath(url), null, "default");
3244
- let matches = matchRoutes(dataRoutes, location, basename);
3245
- // SSR supports HEAD requests while SPA doesn't
3246
- if (!isValidMethod(method) && method !== "HEAD") {
3247
- let error = getInternalRouterError(405, {
3248
- method
3249
- });
3250
- let {
3251
- matches: methodNotAllowedMatches,
3252
- route
3253
- } = getShortCircuitMatches(dataRoutes);
3254
- return {
3255
- basename,
3256
- location,
3257
- matches: methodNotAllowedMatches,
3258
- loaderData: {},
3259
- actionData: null,
3260
- errors: {
3261
- [route.id]: error
3262
- },
3263
- statusCode: error.status,
3264
- loaderHeaders: {},
3265
- actionHeaders: {},
3266
- activeDeferreds: null
3267
- };
3268
- } else if (!matches) {
3269
- let error = getInternalRouterError(404, {
3270
- pathname: location.pathname
3271
- });
3272
- let {
3273
- matches: notFoundMatches,
3274
- route
3275
- } = getShortCircuitMatches(dataRoutes);
3276
- return {
3277
- basename,
3278
- location,
3279
- matches: notFoundMatches,
3280
- loaderData: {},
3281
- actionData: null,
3282
- errors: {
3283
- [route.id]: error
3284
- },
3285
- statusCode: error.status,
3286
- loaderHeaders: {},
3287
- actionHeaders: {},
3288
- activeDeferreds: null
3289
- };
3290
- }
3291
- let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, skipLoaderErrorBubbling === true, null);
3292
- if (isResponse(result)) {
3293
- return result;
3294
- }
3295
- // When returning StaticHandlerContext, we patch back in the location here
3296
- // since we need it for React Context. But this helps keep our submit and
3297
- // loadRouteData operating on a Request instead of a Location
3298
- return _extends({
3299
- location,
3300
- basename
3301
- }, result);
3302
- }
3303
- /**
3304
- * The queryRoute() method is intended for targeted route requests, either
3305
- * for fetch ?_data requests or resource route requests. In this case, we
3306
- * are only ever calling a single action or loader, and we are returning the
3307
- * returned value directly. In most cases, this will be a Response returned
3308
- * from the action/loader, but it may be a primitive or other value as well -
3309
- * and in such cases the calling context should handle that accordingly.
3310
- *
3311
- * We do respect the throw/return differentiation, so if an action/loader
3312
- * throws, then this method will throw the value. This is important so we
3313
- * can do proper boundary identification in Remix where a thrown Response
3314
- * must go to the Catch Boundary but a returned Response is happy-path.
3315
- *
3316
- * One thing to note is that any Router-initiated Errors that make sense
3317
- * to associate with a status code will be thrown as an ErrorResponse
3318
- * instance which include the raw Error, such that the calling context can
3319
- * serialize the error as they see fit while including the proper response
3320
- * code. Examples here are 404 and 405 errors that occur prior to reaching
3321
- * any user-defined loaders.
3322
- *
3323
- * - `opts.routeId` allows you to specify the specific route handler to call.
3324
- * If not provided the handler will determine the proper route by matching
3325
- * against `request.url`
3326
- * - `opts.requestContext` is an optional server context that will be passed
3327
- * to actions/loaders in the `context` parameter
3328
- */
3329
- async function queryRoute(request, _temp4) {
3330
- let {
3331
- routeId,
3332
- requestContext,
3333
- unstable_dataStrategy
3334
- } = _temp4 === void 0 ? {} : _temp4;
3335
- let url = new URL(request.url);
3336
- let method = request.method;
3337
- let location = createLocation("", createPath(url), null, "default");
3338
- let matches = matchRoutes(dataRoutes, location, basename);
3339
- // SSR supports HEAD requests while SPA doesn't
3340
- if (!isValidMethod(method) && method !== "HEAD" && method !== "OPTIONS") {
3341
- throw getInternalRouterError(405, {
3342
- method
3343
- });
3344
- } else if (!matches) {
3345
- throw getInternalRouterError(404, {
3346
- pathname: location.pathname
3347
- });
3348
- }
3349
- let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);
3350
- if (routeId && !match) {
3351
- throw getInternalRouterError(403, {
3352
- pathname: location.pathname,
3353
- routeId
3354
- });
3355
- } else if (!match) {
3356
- // This should never hit I don't think?
3357
- throw getInternalRouterError(404, {
3358
- pathname: location.pathname
3359
- });
3360
- }
3361
- let result = await queryImpl(request, location, matches, requestContext, unstable_dataStrategy || null, false, match);
3362
- if (isResponse(result)) {
3363
- return result;
3364
- }
3365
- let error = result.errors ? Object.values(result.errors)[0] : undefined;
3366
- if (error !== undefined) {
3367
- // If we got back result.errors, that means the loader/action threw
3368
- // _something_ that wasn't a Response, but it's not guaranteed/required
3369
- // to be an `instanceof Error` either, so we have to use throw here to
3370
- // preserve the "error" state outside of queryImpl.
3371
- throw error;
3372
- }
3373
- // Pick off the right state value to return
3374
- if (result.actionData) {
3375
- return Object.values(result.actionData)[0];
3376
- }
3377
- if (result.loaderData) {
3378
- var _result$activeDeferre;
3379
- let data = Object.values(result.loaderData)[0];
3380
- if ((_result$activeDeferre = result.activeDeferreds) != null && _result$activeDeferre[match.route.id]) {
3381
- data[UNSAFE_DEFERRED_SYMBOL] = result.activeDeferreds[match.route.id];
3382
- }
3383
- return data;
3384
- }
3385
- return undefined;
3386
- }
3387
- async function queryImpl(request, location, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch) {
3388
- invariant(request.signal, "query()/queryRoute() requests must contain an AbortController signal");
3389
- try {
3390
- if (isMutationMethod(request.method.toLowerCase())) {
3391
- let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch != null);
3392
- return result;
3393
- }
3394
- let result = await loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch);
3395
- return isResponse(result) ? result : _extends({}, result, {
3396
- actionData: null,
3397
- actionHeaders: {}
3398
- });
3399
- } catch (e) {
3400
- // If the user threw/returned a Response in callLoaderOrAction for a
3401
- // `queryRoute` call, we throw the `HandlerResult` to bail out early
3402
- // and then return or throw the raw Response here accordingly
3403
- if (isHandlerResult(e) && isResponse(e.result)) {
3404
- if (e.type === ResultType.error) {
3405
- throw e.result;
3406
- }
3407
- return e.result;
3408
- }
3409
- // Redirects are always returned since they don't propagate to catch
3410
- // boundaries
3411
- if (isRedirectResponse(e)) {
3412
- return e;
3413
- }
3414
- throw e;
3415
- }
3416
- }
3417
- async function submit(request, matches, actionMatch, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, isRouteRequest) {
3418
- let result;
3419
- if (!actionMatch.route.action && !actionMatch.route.lazy) {
3420
- let error = getInternalRouterError(405, {
3421
- method: request.method,
3422
- pathname: new URL(request.url).pathname,
3423
- routeId: actionMatch.route.id
3424
- });
3425
- if (isRouteRequest) {
3426
- throw error;
3427
- }
3428
- result = {
3429
- type: ResultType.error,
3430
- error
3431
- };
3432
- } else {
3433
- let results = await callDataStrategy("action", request, [actionMatch], matches, isRouteRequest, requestContext, unstable_dataStrategy);
3434
- result = results[0];
3435
- if (request.signal.aborted) {
3436
- throwStaticHandlerAbortedError(request, isRouteRequest, future);
3437
- }
3438
- }
3439
- if (isRedirectResult(result)) {
3440
- // Uhhhh - this should never happen, we should always throw these from
3441
- // callLoaderOrAction, but the type narrowing here keeps TS happy and we
3442
- // can get back on the "throw all redirect responses" train here should
3443
- // this ever happen :/
3444
- throw new Response(null, {
3445
- status: result.response.status,
3446
- headers: {
3447
- Location: result.response.headers.get("Location")
3448
- }
3449
- });
3450
- }
3451
- if (isDeferredResult(result)) {
3452
- let error = getInternalRouterError(400, {
3453
- type: "defer-action"
3454
- });
3455
- if (isRouteRequest) {
3456
- throw error;
3457
- }
3458
- result = {
3459
- type: ResultType.error,
3460
- error
3461
- };
3462
- }
3463
- if (isRouteRequest) {
3464
- // Note: This should only be non-Response values if we get here, since
3465
- // isRouteRequest should throw any Response received in callLoaderOrAction
3466
- if (isErrorResult(result)) {
3467
- throw result.error;
3468
- }
3469
- return {
3470
- matches: [actionMatch],
3471
- loaderData: {},
3472
- actionData: {
3473
- [actionMatch.route.id]: result.data
3474
- },
3475
- errors: null,
3476
- // Note: statusCode + headers are unused here since queryRoute will
3477
- // return the raw Response or value
3478
- statusCode: 200,
3479
- loaderHeaders: {},
3480
- actionHeaders: {},
3481
- activeDeferreds: null
3482
- };
3483
- }
3484
- // Create a GET request for the loaders
3485
- let loaderRequest = new Request(request.url, {
3486
- headers: request.headers,
3487
- redirect: request.redirect,
3488
- signal: request.signal
3489
- });
3490
- if (isErrorResult(result)) {
3491
- // Store off the pending error - we use it to determine which loaders
3492
- // to call and will commit it when we complete the navigation
3493
- let boundaryMatch = skipLoaderErrorBubbling ? actionMatch : findNearestBoundary(matches, actionMatch.route.id);
3494
- let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null, [boundaryMatch.route.id, result]);
3495
- // action status codes take precedence over loader status codes
3496
- return _extends({}, context, {
3497
- statusCode: isRouteErrorResponse(result.error) ? result.error.status : result.statusCode != null ? result.statusCode : 500,
3498
- actionData: null,
3499
- actionHeaders: _extends({}, result.headers ? {
3500
- [actionMatch.route.id]: result.headers
3501
- } : {})
3502
- });
3503
- }
3504
- let context = await loadRouteData(loaderRequest, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, null);
3505
- return _extends({}, context, {
3506
- actionData: {
3507
- [actionMatch.route.id]: result.data
3508
- }
3509
- }, result.statusCode ? {
3510
- statusCode: result.statusCode
3511
- } : {}, {
3512
- actionHeaders: result.headers ? {
3513
- [actionMatch.route.id]: result.headers
3514
- } : {}
3515
- });
3516
- }
3517
- async function loadRouteData(request, matches, requestContext, unstable_dataStrategy, skipLoaderErrorBubbling, routeMatch, pendingActionResult) {
3518
- let isRouteRequest = routeMatch != null;
3519
- // Short circuit if we have no loaders to run (queryRoute())
3520
- if (isRouteRequest && !(routeMatch != null && routeMatch.route.loader) && !(routeMatch != null && routeMatch.route.lazy)) {
3521
- throw getInternalRouterError(400, {
3522
- method: request.method,
3523
- pathname: new URL(request.url).pathname,
3524
- routeId: routeMatch == null ? void 0 : routeMatch.route.id
3525
- });
3526
- }
3527
- let requestMatches = routeMatch ? [routeMatch] : pendingActionResult && isErrorResult(pendingActionResult[1]) ? getLoaderMatchesUntilBoundary(matches, pendingActionResult[0]) : matches;
3528
- let matchesToLoad = requestMatches.filter(m => m.route.loader || m.route.lazy);
3529
- // Short circuit if we have no loaders to run (query())
3530
- if (matchesToLoad.length === 0) {
3531
- return {
3532
- matches,
3533
- // Add a null for all matched routes for proper revalidation on the client
3534
- loaderData: matches.reduce((acc, m) => Object.assign(acc, {
3535
- [m.route.id]: null
3536
- }), {}),
3537
- errors: pendingActionResult && isErrorResult(pendingActionResult[1]) ? {
3538
- [pendingActionResult[0]]: pendingActionResult[1].error
3539
- } : null,
3540
- statusCode: 200,
3541
- loaderHeaders: {},
3542
- activeDeferreds: null
3543
- };
3544
- }
3545
- let results = await callDataStrategy("loader", request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy);
3546
- if (request.signal.aborted) {
3547
- throwStaticHandlerAbortedError(request, isRouteRequest, future);
3548
- }
3549
- // Process and commit output from loaders
3550
- let activeDeferreds = new Map();
3551
- let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling);
3552
- // Add a null for any non-loader matches for proper revalidation on the client
3553
- let executedLoaders = new Set(matchesToLoad.map(match => match.route.id));
3554
- matches.forEach(match => {
3555
- if (!executedLoaders.has(match.route.id)) {
3556
- context.loaderData[match.route.id] = null;
3557
- }
3558
- });
3559
- return _extends({}, context, {
3560
- matches,
3561
- activeDeferreds: activeDeferreds.size > 0 ? Object.fromEntries(activeDeferreds.entries()) : null
3562
- });
3563
- }
3564
- // Utility wrapper for calling dataStrategy server-side without having to
3565
- // pass around the manifest, mapRouteProperties, etc.
3566
- async function callDataStrategy(type, request, matchesToLoad, matches, isRouteRequest, requestContext, unstable_dataStrategy) {
3567
- let results = await callDataStrategyImpl(unstable_dataStrategy || defaultDataStrategy, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext);
3568
- return await Promise.all(results.map((result, i) => {
3569
- if (isRedirectHandlerResult(result)) {
3570
- let response = result.result;
3571
- // Throw redirects and let the server handle them with an HTTP redirect
3572
- throw normalizeRelativeRoutingRedirectResponse(response, request, matchesToLoad[i].route.id, matches, basename, future.v7_relativeSplatPath);
3573
- }
3574
- if (isResponse(result.result) && isRouteRequest) {
3575
- // For SSR single-route requests, we want to hand Responses back
3576
- // directly without unwrapping
3577
- throw result;
3578
- }
3579
- return convertHandlerResultToDataResult(result);
3580
- }));
3581
- }
3582
- return {
3583
- dataRoutes,
3584
- query,
3585
- queryRoute
3586
- };
3587
- }
3588
- //#endregion
3589
- ////////////////////////////////////////////////////////////////////////////////
3590
- //#region Helpers
3591
- ////////////////////////////////////////////////////////////////////////////////
3592
- /**
3593
- * Given an existing StaticHandlerContext and an error thrown at render time,
3594
- * provide an updated StaticHandlerContext suitable for a second SSR render
3595
- */
3596
- function getStaticContextFromError(routes, context, error) {
3597
- let newContext = _extends({}, context, {
3598
- statusCode: isRouteErrorResponse(error) ? error.status : 500,
3599
- errors: {
3600
- [context._deepestRenderedBoundaryId || routes[0].id]: error
3601
- }
3602
- });
3603
- return newContext;
3604
- }
3605
- function throwStaticHandlerAbortedError(request, isRouteRequest, future) {
3606
- if (future.v7_throwAbortReason && request.signal.reason !== undefined) {
3607
- throw request.signal.reason;
3608
- }
3609
- let method = isRouteRequest ? "queryRoute" : "query";
3610
- throw new Error(method + "() call aborted: " + request.method + " " + request.url);
3611
- }
3612
- function isSubmissionNavigation(opts) {
3613
- return opts != null && ("formData" in opts && opts.formData != null || "body" in opts && opts.body !== undefined);
3614
- }
3615
- function normalizeTo(location, matches, basename, prependBasename, to, v7_relativeSplatPath, fromRouteId, relative) {
3616
- let contextualMatches;
3617
- let activeRouteMatch;
3618
- if (fromRouteId) {
3619
- // Grab matches up to the calling route so our route-relative logic is
3620
- // relative to the correct source route
3621
- contextualMatches = [];
3622
- for (let match of matches) {
3623
- contextualMatches.push(match);
3624
- if (match.route.id === fromRouteId) {
3625
- activeRouteMatch = match;
3626
- break;
3627
- }
3628
- }
3629
- } else {
3630
- contextualMatches = matches;
3631
- activeRouteMatch = matches[matches.length - 1];
3632
- }
3633
- // Resolve the relative path
3634
- let path = resolveTo(to ? to : ".", getResolveToMatches(contextualMatches, v7_relativeSplatPath), stripBasename(location.pathname, basename) || location.pathname, relative === "path");
3635
- // When `to` is not specified we inherit search/hash from the current
3636
- // location, unlike when to="." and we just inherit the path.
3637
- // See https://github.com/remix-run/remix/issues/927
3638
- if (to == null) {
3639
- path.search = location.search;
3640
- path.hash = location.hash;
3641
- }
3642
- // Add an ?index param for matched index routes if we don't already have one
3643
- if ((to == null || to === "" || to === ".") && activeRouteMatch && activeRouteMatch.route.index && !hasNakedIndexQuery(path.search)) {
3644
- path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
3645
- }
3646
- // If we're operating within a basename, prepend it to the pathname. If
3647
- // this is a root navigation, then just use the raw basename which allows
3648
- // the basename to have full control over the presence of a trailing slash
3649
- // on root actions
3650
- if (prependBasename && basename !== "/") {
3651
- path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
3652
- }
3653
- return createPath(path);
3654
- }
3655
- // Normalize navigation options by converting formMethod=GET formData objects to
3656
- // URLSearchParams so they behave identically to links with query params
3657
- function normalizeNavigateOptions(normalizeFormMethod, isFetcher, path, opts) {
3658
- // Return location verbatim on non-submission navigations
3659
- if (!opts || !isSubmissionNavigation(opts)) {
3660
- return {
3661
- path
3662
- };
3663
- }
3664
- if (opts.formMethod && !isValidMethod(opts.formMethod)) {
3665
- return {
3666
- path,
3667
- error: getInternalRouterError(405, {
3668
- method: opts.formMethod
3669
- })
3670
- };
3671
- }
3672
- let getInvalidBodyError = () => ({
3673
- path,
3674
- error: getInternalRouterError(400, {
3675
- type: "invalid-body"
3676
- })
3677
- });
3678
- // Create a Submission on non-GET navigations
3679
- let rawFormMethod = opts.formMethod || "get";
3680
- let formMethod = normalizeFormMethod ? rawFormMethod.toUpperCase() : rawFormMethod.toLowerCase();
3681
- let formAction = stripHashFromPath(path);
3682
- if (opts.body !== undefined) {
3683
- if (opts.formEncType === "text/plain") {
3684
- // text only support POST/PUT/PATCH/DELETE submissions
3685
- if (!isMutationMethod(formMethod)) {
3686
- return getInvalidBodyError();
3687
- }
3688
- let text = typeof opts.body === "string" ? opts.body : opts.body instanceof FormData || opts.body instanceof URLSearchParams ?
3689
- // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#plain-text-form-data
3690
- Array.from(opts.body.entries()).reduce((acc, _ref5) => {
3691
- let [name, value] = _ref5;
3692
- return "" + acc + name + "=" + value + "\n";
3693
- }, "") : String(opts.body);
3694
- return {
3695
- path,
3696
- submission: {
3697
- formMethod,
3698
- formAction,
3699
- formEncType: opts.formEncType,
3700
- formData: undefined,
3701
- json: undefined,
3702
- text
3703
- }
3704
- };
3705
- } else if (opts.formEncType === "application/json") {
3706
- // json only supports POST/PUT/PATCH/DELETE submissions
3707
- if (!isMutationMethod(formMethod)) {
3708
- return getInvalidBodyError();
3709
- }
3710
- try {
3711
- let json = typeof opts.body === "string" ? JSON.parse(opts.body) : opts.body;
3712
- return {
3713
- path,
3714
- submission: {
3715
- formMethod,
3716
- formAction,
3717
- formEncType: opts.formEncType,
3718
- formData: undefined,
3719
- json,
3720
- text: undefined
3721
- }
3722
- };
3723
- } catch (e) {
3724
- return getInvalidBodyError();
3725
- }
3726
- }
3727
- }
3728
- invariant(typeof FormData === "function", "FormData is not available in this environment");
3729
- let searchParams;
3730
- let formData;
3731
- if (opts.formData) {
3732
- searchParams = convertFormDataToSearchParams(opts.formData);
3733
- formData = opts.formData;
3734
- } else if (opts.body instanceof FormData) {
3735
- searchParams = convertFormDataToSearchParams(opts.body);
3736
- formData = opts.body;
3737
- } else if (opts.body instanceof URLSearchParams) {
3738
- searchParams = opts.body;
3739
- formData = convertSearchParamsToFormData(searchParams);
3740
- } else if (opts.body == null) {
3741
- searchParams = new URLSearchParams();
3742
- formData = new FormData();
3743
- } else {
3744
- try {
3745
- searchParams = new URLSearchParams(opts.body);
3746
- formData = convertSearchParamsToFormData(searchParams);
3747
- } catch (e) {
3748
- return getInvalidBodyError();
3749
- }
3750
- }
3751
- let submission = {
3752
- formMethod,
3753
- formAction,
3754
- formEncType: opts && opts.formEncType || "application/x-www-form-urlencoded",
3755
- formData,
3756
- json: undefined,
3757
- text: undefined
3758
- };
3759
- if (isMutationMethod(submission.formMethod)) {
3760
- return {
3761
- path,
3762
- submission
3763
- };
3764
- }
3765
- // Flatten submission onto URLSearchParams for GET submissions
3766
- let parsedPath = parsePath(path);
3767
- // On GET navigation submissions we can drop the ?index param from the
3768
- // resulting location since all loaders will run. But fetcher GET submissions
3769
- // only run a single loader so we need to preserve any incoming ?index params
3770
- if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {
3771
- searchParams.append("index", "");
3772
- }
3773
- parsedPath.search = "?" + searchParams;
3774
- return {
3775
- path: createPath(parsedPath),
3776
- submission
3777
- };
3778
- }
3779
- // Filter out all routes below any caught error as they aren't going to
3780
- // render so we don't need to load them
3781
- function getLoaderMatchesUntilBoundary(matches, boundaryId) {
3782
- let boundaryMatches = matches;
3783
- if (boundaryId) {
3784
- let index = matches.findIndex(m => m.route.id === boundaryId);
3785
- if (index >= 0) {
3786
- boundaryMatches = matches.slice(0, index);
3787
- }
3788
- }
3789
- return boundaryMatches;
3790
- }
3791
- function getMatchesToLoad(history, state, matches, submission, location, isInitialLoad, skipActionErrorRevalidation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, deletedFetchers, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, pendingActionResult) {
3792
- let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : undefined;
3793
- let currentUrl = history.createURL(state.location);
3794
- let nextUrl = history.createURL(location);
3795
- // Pick navigation matches that are net-new or qualify for revalidation
3796
- let boundaryId = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[0] : undefined;
3797
- let boundaryMatches = boundaryId ? getLoaderMatchesUntilBoundary(matches, boundaryId) : matches;
3798
- // Don't revalidate loaders by default after action 4xx/5xx responses
3799
- // when the flag is enabled. They can still opt-into revalidation via
3800
- // `shouldRevalidate` via `actionResult`
3801
- let actionStatus = pendingActionResult ? pendingActionResult[1].statusCode : undefined;
3802
- let shouldSkipRevalidation = skipActionErrorRevalidation && actionStatus && actionStatus >= 400;
3803
- let navigationMatches = boundaryMatches.filter((match, index) => {
3804
- let {
3805
- route
3806
- } = match;
3807
- if (route.lazy) {
3808
- // We haven't loaded this route yet so we don't know if it's got a loader!
3809
- return true;
3810
- }
3811
- if (route.loader == null) {
3812
- return false;
3813
- }
3814
- if (isInitialLoad) {
3815
- if (typeof route.loader !== "function" || route.loader.hydrate) {
3816
- return true;
3817
- }
3818
- return state.loaderData[route.id] === undefined && (
3819
- // Don't re-run if the loader ran and threw an error
3820
- !state.errors || state.errors[route.id] === undefined);
3821
- }
3822
- // Always call the loader on new route instances and pending defer cancellations
3823
- if (isNewLoader(state.loaderData, state.matches[index], match) || cancelledDeferredRoutes.some(id => id === match.route.id)) {
3824
- return true;
3825
- }
3826
- // This is the default implementation for when we revalidate. If the route
3827
- // provides it's own implementation, then we give them full control but
3828
- // provide this value so they can leverage it if needed after they check
3829
- // their own specific use cases
3830
- let currentRouteMatch = state.matches[index];
3831
- let nextRouteMatch = match;
3832
- return shouldRevalidateLoader(match, _extends({
3833
- currentUrl,
3834
- currentParams: currentRouteMatch.params,
3835
- nextUrl,
3836
- nextParams: nextRouteMatch.params
3837
- }, submission, {
3838
- actionResult,
3839
- unstable_actionStatus: actionStatus,
3840
- defaultShouldRevalidate: shouldSkipRevalidation ? false :
3841
- // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
3842
- isRevalidationRequired || currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search ||
3843
- // Search params affect all loaders
3844
- currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)
3845
- }));
3846
- });
3847
- // Pick fetcher.loads that need to be revalidated
3848
- let revalidatingFetchers = [];
3849
- fetchLoadMatches.forEach((f, key) => {
3850
- // Don't revalidate:
3851
- // - on initial load (shouldn't be any fetchers then anyway)
3852
- // - if fetcher won't be present in the subsequent render
3853
- // - no longer matches the URL (v7_fetcherPersist=false)
3854
- // - was unmounted but persisted due to v7_fetcherPersist=true
3855
- if (isInitialLoad || !matches.some(m => m.route.id === f.routeId) || deletedFetchers.has(key)) {
3856
- return;
3857
- }
3858
- let fetcherMatches = matchRoutes(routesToUse, f.path, basename);
3859
- // If the fetcher path no longer matches, push it in with null matches so
3860
- // we can trigger a 404 in callLoadersAndMaybeResolveData. Note this is
3861
- // currently only a use-case for Remix HMR where the route tree can change
3862
- // at runtime and remove a route previously loaded via a fetcher
3863
- if (!fetcherMatches) {
3864
- revalidatingFetchers.push({
3865
- key,
3866
- routeId: f.routeId,
3867
- path: f.path,
3868
- matches: null,
3869
- match: null,
3870
- controller: null
3871
- });
3872
- return;
3873
- }
3874
- // Revalidating fetchers are decoupled from the route matches since they
3875
- // load from a static href. They revalidate based on explicit revalidation
3876
- // (submission, useRevalidator, or X-Remix-Revalidate)
3877
- let fetcher = state.fetchers.get(key);
3878
- let fetcherMatch = getTargetMatch(fetcherMatches, f.path);
3879
- let shouldRevalidate = false;
3880
- if (fetchRedirectIds.has(key)) {
3881
- // Never trigger a revalidation of an actively redirecting fetcher
3882
- shouldRevalidate = false;
3883
- } else if (cancelledFetcherLoads.includes(key)) {
3884
- // Always revalidate if the fetcher was cancelled
3885
- shouldRevalidate = true;
3886
- } else if (fetcher && fetcher.state !== "idle" && fetcher.data === undefined) {
3887
- // If the fetcher hasn't ever completed loading yet, then this isn't a
3888
- // revalidation, it would just be a brand new load if an explicit
3889
- // revalidation is required
3890
- shouldRevalidate = isRevalidationRequired;
3891
- } else {
3892
- // Otherwise fall back on any user-defined shouldRevalidate, defaulting
3893
- // to explicit revalidations only
3894
- shouldRevalidate = shouldRevalidateLoader(fetcherMatch, _extends({
3895
- currentUrl,
3896
- currentParams: state.matches[state.matches.length - 1].params,
3897
- nextUrl,
3898
- nextParams: matches[matches.length - 1].params
3899
- }, submission, {
3900
- actionResult,
3901
- unstable_actionStatus: actionStatus,
3902
- defaultShouldRevalidate: shouldSkipRevalidation ? false : isRevalidationRequired
3903
- }));
3904
- }
3905
- if (shouldRevalidate) {
3906
- revalidatingFetchers.push({
3907
- key,
3908
- routeId: f.routeId,
3909
- path: f.path,
3910
- matches: fetcherMatches,
3911
- match: fetcherMatch,
3912
- controller: new AbortController()
3913
- });
3914
- }
3915
- });
3916
- return [navigationMatches, revalidatingFetchers];
3917
- }
3918
- function isNewLoader(currentLoaderData, currentMatch, match) {
3919
- let isNew =
3920
- // [a] -> [a, b]
3921
- !currentMatch ||
3922
- // [a, b] -> [a, c]
3923
- match.route.id !== currentMatch.route.id;
3924
- // Handle the case that we don't have data for a re-used route, potentially
3925
- // from a prior error or from a cancelled pending deferred
3926
- let isMissingData = currentLoaderData[match.route.id] === undefined;
3927
- // Always load if this is a net-new route or we don't yet have data
3928
- return isNew || isMissingData;
3929
- }
3930
- function isNewRouteInstance(currentMatch, match) {
3931
- let currentPath = currentMatch.route.path;
3932
- return (
3933
- // param change for this match, /users/123 -> /users/456
3934
- currentMatch.pathname !== match.pathname ||
3935
- // splat param changed, which is not present in match.path
3936
- // e.g. /files/images/avatar.jpg -> files/finances.xls
3937
- currentPath != null && currentPath.endsWith("*") && currentMatch.params["*"] !== match.params["*"]
3938
- );
3939
- }
3940
- function shouldRevalidateLoader(loaderMatch, arg) {
3941
- if (loaderMatch.route.shouldRevalidate) {
3942
- let routeChoice = loaderMatch.route.shouldRevalidate(arg);
3943
- if (typeof routeChoice === "boolean") {
3944
- return routeChoice;
3945
- }
3946
- }
3947
- return arg.defaultShouldRevalidate;
3948
- }
3949
- /**
3950
- * Idempotent utility to execute route.children() method to lazily load route
3951
- * definitions and update the routes/routeManifest
3952
- */
3953
- async function loadLazyRouteChildren(patchRoutesOnMissImpl, path, matches, routes, manifest, mapRouteProperties, pendingRouteChildren, signal) {
3954
- let key = [path, ...matches.map(m => m.route.id)].join("-");
3955
- try {
3956
- let pending = pendingRouteChildren.get(key);
3957
- if (!pending) {
3958
- pending = patchRoutesOnMissImpl({
3959
- path,
3960
- matches,
3961
- patch: (routeId, children) => {
3962
- if (!signal.aborted) {
3963
- patchRoutes(routeId, children, routes, manifest, mapRouteProperties);
3964
- }
3965
- }
3966
- });
3967
- pendingRouteChildren.set(key, pending);
3968
- }
3969
- if (pending && isPromise(pending)) {
3970
- await pending;
3971
- }
3972
- } finally {
3973
- pendingRouteChildren.delete(key);
3974
- }
3975
- }
3976
- function patchRoutes(routeId, children, routes, manifest, mapRouteProperties) {
3977
- if (routeId) {
3978
- var _route$children;
3979
- let route = manifest[routeId];
3980
- invariant(route, "No route found to patch children into: routeId = " + routeId);
3981
- let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, [routeId, "patch", String(((_route$children = route.children) == null ? void 0 : _route$children.length) || "0")], manifest);
3982
- if (route.children) {
3983
- route.children.push(...dataChildren);
3984
- } else {
3985
- route.children = dataChildren;
3986
- }
3987
- } else {
3988
- let dataChildren = convertRoutesToDataRoutes(children, mapRouteProperties, ["patch", String(routes.length || "0")], manifest);
3989
- routes.push(...dataChildren);
3990
- }
3991
- }
3992
- /**
3993
- * Execute route.lazy() methods to lazily load route modules (loader, action,
3994
- * shouldRevalidate) and update the routeManifest in place which shares objects
3995
- * with dataRoutes so those get updated as well.
3996
- */
3997
- async function loadLazyRouteModule(route, mapRouteProperties, manifest) {
3998
- if (!route.lazy) {
3999
- return;
4000
- }
4001
- let lazyRoute = await route.lazy();
4002
- // If the lazy route function was executed and removed by another parallel
4003
- // call then we can return - first lazy() to finish wins because the return
4004
- // value of lazy is expected to be static
4005
- if (!route.lazy) {
4006
- return;
4007
- }
4008
- let routeToUpdate = manifest[route.id];
4009
- invariant(routeToUpdate, "No route found in manifest");
4010
- // Update the route in place. This should be safe because there's no way
4011
- // we could yet be sitting on this route as we can't get there without
4012
- // resolving lazy() first.
4013
- //
4014
- // This is different than the HMR "update" use-case where we may actively be
4015
- // on the route being updated. The main concern boils down to "does this
4016
- // mutation affect any ongoing navigations or any current state.matches
4017
- // values?". If not, it should be safe to update in place.
4018
- let routeUpdates = {};
4019
- for (let lazyRouteProperty in lazyRoute) {
4020
- let staticRouteValue = routeToUpdate[lazyRouteProperty];
4021
- let isPropertyStaticallyDefined = staticRouteValue !== undefined &&
4022
- // This property isn't static since it should always be updated based
4023
- // on the route updates
4024
- lazyRouteProperty !== "hasErrorBoundary";
4025
- 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."));
4026
- if (!isPropertyStaticallyDefined && !immutableRouteKeys.has(lazyRouteProperty)) {
4027
- routeUpdates[lazyRouteProperty] = lazyRoute[lazyRouteProperty];
4028
- }
4029
- }
4030
- // Mutate the route with the provided updates. Do this first so we pass
4031
- // the updated version to mapRouteProperties
4032
- Object.assign(routeToUpdate, routeUpdates);
4033
- // Mutate the `hasErrorBoundary` property on the route based on the route
4034
- // updates and remove the `lazy` function so we don't resolve the lazy
4035
- // route again.
4036
- Object.assign(routeToUpdate, _extends({}, mapRouteProperties(routeToUpdate), {
4037
- lazy: undefined
4038
- }));
4039
- }
4040
- // Default implementation of `dataStrategy` which fetches all loaders in parallel
4041
- function defaultDataStrategy(opts) {
4042
- return Promise.all(opts.matches.map(m => m.resolve()));
4043
- }
4044
- async function callDataStrategyImpl(dataStrategyImpl, type, request, matchesToLoad, matches, manifest, mapRouteProperties, requestContext) {
4045
- let routeIdsToLoad = matchesToLoad.reduce((acc, m) => acc.add(m.route.id), new Set());
4046
- let loadedMatches = new Set();
4047
- // Send all matches here to allow for a middleware-type implementation.
4048
- // handler will be a no-op for unneeded routes and we filter those results
4049
- // back out below.
4050
- let results = await dataStrategyImpl({
4051
- matches: matches.map(match => {
4052
- let shouldLoad = routeIdsToLoad.has(match.route.id);
4053
- // `resolve` encapsulates the route.lazy, executing the
4054
- // loader/action, and mapping return values/thrown errors to a
4055
- // HandlerResult. Users can pass a callback to take fine-grained control
4056
- // over the execution of the loader/action
4057
- let resolve = handlerOverride => {
4058
- loadedMatches.add(match.route.id);
4059
- return shouldLoad ? callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, requestContext) : Promise.resolve({
4060
- type: ResultType.data,
4061
- result: undefined
4062
- });
4063
- };
4064
- return _extends({}, match, {
4065
- shouldLoad,
4066
- resolve
4067
- });
4068
- }),
4069
- request,
4070
- params: matches[0].params,
4071
- context: requestContext
4072
- });
4073
- // Throw if any loadRoute implementations not called since they are what
4074
- // ensures a route is fully loaded
4075
- matches.forEach(m => invariant(loadedMatches.has(m.route.id), "`match.resolve()` was not called for route id \"" + m.route.id + "\". " + "You must call `match.resolve()` on every match passed to " + "`dataStrategy` to ensure all routes are properly loaded."));
4076
- // Filter out any middleware-only matches for which we didn't need to run handlers
4077
- return results.filter((_, i) => routeIdsToLoad.has(matches[i].route.id));
4078
- }
4079
- // Default logic for calling a loader/action is the user has no specified a dataStrategy
4080
- async function callLoaderOrAction(type, request, match, manifest, mapRouteProperties, handlerOverride, staticContext) {
4081
- let result;
4082
- let onReject;
4083
- let runHandler = handler => {
4084
- // Setup a promise we can race against so that abort signals short circuit
4085
- let reject;
4086
- // This will never resolve so safe to type it as Promise<HandlerResult> to
4087
- // satisfy the function return value
4088
- let abortPromise = new Promise((_, r) => reject = r);
4089
- onReject = () => reject();
4090
- request.signal.addEventListener("abort", onReject);
4091
- let actualHandler = ctx => {
4092
- if (typeof handler !== "function") {
4093
- return Promise.reject(new Error("You cannot call the handler for a route which defines a boolean " + ("\"" + type + "\" [routeId: " + match.route.id + "]")));
4094
- }
4095
- return handler({
4096
- request,
4097
- params: match.params,
4098
- context: staticContext
4099
- }, ...(ctx !== undefined ? [ctx] : []));
4100
- };
4101
- let handlerPromise;
4102
- if (handlerOverride) {
4103
- handlerPromise = handlerOverride(ctx => actualHandler(ctx));
4104
- } else {
4105
- handlerPromise = (async () => {
4106
- try {
4107
- let val = await actualHandler();
4108
- return {
4109
- type: "data",
4110
- result: val
4111
- };
4112
- } catch (e) {
4113
- return {
4114
- type: "error",
4115
- result: e
4116
- };
4117
- }
4118
- })();
4119
- }
4120
- return Promise.race([handlerPromise, abortPromise]);
4121
- };
4122
- try {
4123
- let handler = match.route[type];
4124
- if (match.route.lazy) {
4125
- if (handler) {
4126
- // Run statically defined handler in parallel with lazy()
4127
- let handlerError;
4128
- let [value] = await Promise.all([
4129
- // If the handler throws, don't let it immediately bubble out,
4130
- // since we need to let the lazy() execution finish so we know if this
4131
- // route has a boundary that can handle the error
4132
- runHandler(handler).catch(e => {
4133
- handlerError = e;
4134
- }), loadLazyRouteModule(match.route, mapRouteProperties, manifest)]);
4135
- if (handlerError !== undefined) {
4136
- throw handlerError;
4137
- }
4138
- result = value;
4139
- } else {
4140
- // Load lazy route module, then run any returned handler
4141
- await loadLazyRouteModule(match.route, mapRouteProperties, manifest);
4142
- handler = match.route[type];
4143
- if (handler) {
4144
- // Handler still runs even if we got interrupted to maintain consistency
4145
- // with un-abortable behavior of handler execution on non-lazy or
4146
- // previously-lazy-loaded routes
4147
- result = await runHandler(handler);
4148
- } else if (type === "action") {
4149
- let url = new URL(request.url);
4150
- let pathname = url.pathname + url.search;
4151
- throw getInternalRouterError(405, {
4152
- method: request.method,
4153
- pathname,
4154
- routeId: match.route.id
4155
- });
4156
- } else {
4157
- // lazy() route has no loader to run. Short circuit here so we don't
4158
- // hit the invariant below that errors on returning undefined.
4159
- return {
4160
- type: ResultType.data,
4161
- result: undefined
4162
- };
4163
- }
4164
- }
4165
- } else if (!handler) {
4166
- let url = new URL(request.url);
4167
- let pathname = url.pathname + url.search;
4168
- throw getInternalRouterError(404, {
4169
- pathname
4170
- });
4171
- } else {
4172
- result = await runHandler(handler);
4173
- }
4174
- invariant(result.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`.");
4175
- } catch (e) {
4176
- // We should already be catching and converting normal handler executions to
4177
- // HandlerResults and returning them, so anything that throws here is an
4178
- // unexpected error we still need to wrap
4179
- return {
4180
- type: ResultType.error,
4181
- result: e
4182
- };
4183
- } finally {
4184
- if (onReject) {
4185
- request.signal.removeEventListener("abort", onReject);
4186
- }
4187
- }
4188
- return result;
4189
- }
4190
- async function convertHandlerResultToDataResult(handlerResult) {
4191
- let {
4192
- result,
4193
- type,
4194
- status
4195
- } = handlerResult;
4196
- if (isResponse(result)) {
4197
- let data;
4198
- try {
4199
- let contentType = result.headers.get("Content-Type");
4200
- // Check between word boundaries instead of startsWith() due to the last
4201
- // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type
4202
- if (contentType && /\bapplication\/json\b/.test(contentType)) {
4203
- if (result.body == null) {
4204
- data = null;
4205
- } else {
4206
- data = await result.json();
4207
- }
4208
- } else {
4209
- data = await result.text();
4210
- }
4211
- } catch (e) {
4212
- return {
4213
- type: ResultType.error,
4214
- error: e
4215
- };
4216
- }
4217
- if (type === ResultType.error) {
4218
- return {
4219
- type: ResultType.error,
4220
- error: new ErrorResponseImpl(result.status, result.statusText, data),
4221
- statusCode: result.status,
4222
- headers: result.headers
4223
- };
4224
- }
4225
- return {
4226
- type: ResultType.data,
4227
- data,
4228
- statusCode: result.status,
4229
- headers: result.headers
4230
- };
4231
- }
4232
- if (type === ResultType.error) {
4233
- return {
4234
- type: ResultType.error,
4235
- error: result,
4236
- statusCode: isRouteErrorResponse(result) ? result.status : status
4237
- };
4238
- }
4239
- if (isDeferredData(result)) {
4240
- var _result$init, _result$init2;
4241
- return {
4242
- type: ResultType.deferred,
4243
- deferredData: result,
4244
- statusCode: (_result$init = result.init) == null ? void 0 : _result$init.status,
4245
- headers: ((_result$init2 = result.init) == null ? void 0 : _result$init2.headers) && new Headers(result.init.headers)
4246
- };
4247
- }
4248
- return {
4249
- type: ResultType.data,
4250
- data: result,
4251
- statusCode: status
4252
- };
4253
- }
4254
- // Support relative routing in internal redirects
4255
- function normalizeRelativeRoutingRedirectResponse(response, request, routeId, matches, basename, v7_relativeSplatPath) {
4256
- let location = response.headers.get("Location");
4257
- invariant(location, "Redirects returned/thrown from loaders/actions must have a Location header");
4258
- if (!ABSOLUTE_URL_REGEX.test(location)) {
4259
- let trimmedMatches = matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1);
4260
- location = normalizeTo(new URL(request.url), trimmedMatches, basename, true, location, v7_relativeSplatPath);
4261
- response.headers.set("Location", location);
4262
- }
4263
- return response;
4264
- }
4265
- function normalizeRedirectLocation(location, currentUrl, basename) {
4266
- if (ABSOLUTE_URL_REGEX.test(location)) {
4267
- // Strip off the protocol+origin for same-origin + same-basename absolute redirects
4268
- let normalizedLocation = location;
4269
- let url = normalizedLocation.startsWith("//") ? new URL(currentUrl.protocol + normalizedLocation) : new URL(normalizedLocation);
4270
- let isSameBasename = stripBasename(url.pathname, basename) != null;
4271
- if (url.origin === currentUrl.origin && isSameBasename) {
4272
- return url.pathname + url.search + url.hash;
4273
- }
4274
- }
4275
- return location;
4276
- }
4277
- // Utility method for creating the Request instances for loaders/actions during
4278
- // client-side navigations and fetches. During SSR we will always have a
4279
- // Request instance from the static handler (query/queryRoute)
4280
- function createClientSideRequest(history, location, signal, submission) {
4281
- let url = history.createURL(stripHashFromPath(location)).toString();
4282
- let init = {
4283
- signal
4284
- };
4285
- if (submission && isMutationMethod(submission.formMethod)) {
4286
- let {
4287
- formMethod,
4288
- formEncType
4289
- } = submission;
4290
- // Didn't think we needed this but it turns out unlike other methods, patch
4291
- // won't be properly normalized to uppercase and results in a 405 error.
4292
- // See: https://fetch.spec.whatwg.org/#concept-method
4293
- init.method = formMethod.toUpperCase();
4294
- if (formEncType === "application/json") {
4295
- init.headers = new Headers({
4296
- "Content-Type": formEncType
4297
- });
4298
- init.body = JSON.stringify(submission.json);
4299
- } else if (formEncType === "text/plain") {
4300
- // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4301
- init.body = submission.text;
4302
- } else if (formEncType === "application/x-www-form-urlencoded" && submission.formData) {
4303
- // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4304
- init.body = convertFormDataToSearchParams(submission.formData);
4305
- } else {
4306
- // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)
4307
- init.body = submission.formData;
4308
- }
4309
- }
4310
- return new Request(url, init);
4311
- }
4312
- function convertFormDataToSearchParams(formData) {
4313
- let searchParams = new URLSearchParams();
4314
- for (let [key, value] of formData.entries()) {
4315
- // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#converting-an-entry-list-to-a-list-of-name-value-pairs
4316
- searchParams.append(key, typeof value === "string" ? value : value.name);
4317
- }
4318
- return searchParams;
4319
- }
4320
- function convertSearchParamsToFormData(searchParams) {
4321
- let formData = new FormData();
4322
- for (let [key, value] of searchParams.entries()) {
4323
- formData.append(key, value);
4324
- }
4325
- return formData;
4326
- }
4327
- function processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, skipLoaderErrorBubbling) {
4328
- // Fill in loaderData/errors from our loaders
4329
- let loaderData = {};
4330
- let errors = null;
4331
- let statusCode;
4332
- let foundError = false;
4333
- let loaderHeaders = {};
4334
- let pendingError = pendingActionResult && isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : undefined;
4335
- // Process loader results into state.loaderData/state.errors
4336
- results.forEach((result, index) => {
4337
- let id = matchesToLoad[index].route.id;
4338
- invariant(!isRedirectResult(result), "Cannot handle redirect results in processLoaderData");
4339
- if (isErrorResult(result)) {
4340
- let error = result.error;
4341
- // If we have a pending action error, we report it at the highest-route
4342
- // that throws a loader error, and then clear it out to indicate that
4343
- // it was consumed
4344
- if (pendingError !== undefined) {
4345
- error = pendingError;
4346
- pendingError = undefined;
4347
- }
4348
- errors = errors || {};
4349
- if (skipLoaderErrorBubbling) {
4350
- errors[id] = error;
4351
- } else {
4352
- // Look upwards from the matched route for the closest ancestor error
4353
- // boundary, defaulting to the root match. Prefer higher error values
4354
- // if lower errors bubble to the same boundary
4355
- let boundaryMatch = findNearestBoundary(matches, id);
4356
- if (errors[boundaryMatch.route.id] == null) {
4357
- errors[boundaryMatch.route.id] = error;
4358
- }
4359
- }
4360
- // Clear our any prior loaderData for the throwing route
4361
- loaderData[id] = undefined;
4362
- // Once we find our first (highest) error, we set the status code and
4363
- // prevent deeper status codes from overriding
4364
- if (!foundError) {
4365
- foundError = true;
4366
- statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;
4367
- }
4368
- if (result.headers) {
4369
- loaderHeaders[id] = result.headers;
4370
- }
4371
- } else {
4372
- if (isDeferredResult(result)) {
4373
- activeDeferreds.set(id, result.deferredData);
4374
- loaderData[id] = result.deferredData.data;
4375
- // Error status codes always override success status codes, but if all
4376
- // loaders are successful we take the deepest status code.
4377
- if (result.statusCode != null && result.statusCode !== 200 && !foundError) {
4378
- statusCode = result.statusCode;
4379
- }
4380
- if (result.headers) {
4381
- loaderHeaders[id] = result.headers;
4382
- }
4383
- } else {
4384
- loaderData[id] = result.data;
4385
- // Error status codes always override success status codes, but if all
4386
- // loaders are successful we take the deepest status code.
4387
- if (result.statusCode && result.statusCode !== 200 && !foundError) {
4388
- statusCode = result.statusCode;
4389
- }
4390
- if (result.headers) {
4391
- loaderHeaders[id] = result.headers;
4392
- }
4393
- }
4394
- }
4395
- });
4396
- // If we didn't consume the pending action error (i.e., all loaders
4397
- // resolved), then consume it here. Also clear out any loaderData for the
4398
- // throwing route
4399
- if (pendingError !== undefined && pendingActionResult) {
4400
- errors = {
4401
- [pendingActionResult[0]]: pendingError
4402
- };
4403
- loaderData[pendingActionResult[0]] = undefined;
4404
- }
4405
- return {
4406
- loaderData,
4407
- errors,
4408
- statusCode: statusCode || 200,
4409
- loaderHeaders
4410
- };
4411
- }
4412
- function processLoaderData(state, matches, matchesToLoad, results, pendingActionResult, revalidatingFetchers, fetcherResults, activeDeferreds) {
4413
- let {
4414
- loaderData,
4415
- errors
4416
- } = processRouteLoaderData(matches, matchesToLoad, results, pendingActionResult, activeDeferreds, false // This method is only called client side so we always want to bubble
4417
- );
4418
- // Process results from our revalidating fetchers
4419
- for (let index = 0; index < revalidatingFetchers.length; index++) {
4420
- let {
4421
- key,
4422
- match,
4423
- controller
4424
- } = revalidatingFetchers[index];
4425
- invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, "Did not find corresponding fetcher result");
4426
- let result = fetcherResults[index];
4427
- // Process fetcher non-redirect errors
4428
- if (controller && controller.signal.aborted) {
4429
- // Nothing to do for aborted fetchers
4430
- continue;
4431
- } else if (isErrorResult(result)) {
4432
- let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
4433
- if (!(errors && errors[boundaryMatch.route.id])) {
4434
- errors = _extends({}, errors, {
4435
- [boundaryMatch.route.id]: result.error
4436
- });
4437
- }
4438
- state.fetchers.delete(key);
4439
- } else if (isRedirectResult(result)) {
4440
- // Should never get here, redirects should get processed above, but we
4441
- // keep this to type narrow to a success result in the else
4442
- invariant(false, "Unhandled fetcher revalidation redirect");
4443
- } else if (isDeferredResult(result)) {
4444
- // Should never get here, deferred data should be awaited for fetchers
4445
- // in resolveDeferredResults
4446
- invariant(false, "Unhandled fetcher deferred data");
4447
- } else {
4448
- let doneFetcher = getDoneFetcher(result.data);
4449
- state.fetchers.set(key, doneFetcher);
4450
- }
4451
- }
4452
- return {
4453
- loaderData,
4454
- errors
4455
- };
4456
- }
4457
- function mergeLoaderData(loaderData, newLoaderData, matches, errors) {
4458
- let mergedLoaderData = _extends({}, newLoaderData);
4459
- for (let match of matches) {
4460
- let id = match.route.id;
4461
- if (newLoaderData.hasOwnProperty(id)) {
4462
- if (newLoaderData[id] !== undefined) {
4463
- mergedLoaderData[id] = newLoaderData[id];
4464
- }
4465
- } else if (loaderData[id] !== undefined && match.route.loader) {
4466
- // Preserve existing keys not included in newLoaderData and where a loader
4467
- // wasn't removed by HMR
4468
- mergedLoaderData[id] = loaderData[id];
4469
- }
4470
- if (errors && errors.hasOwnProperty(id)) {
4471
- // Don't keep any loader data below the boundary
4472
- break;
4473
- }
4474
- }
4475
- return mergedLoaderData;
4476
- }
4477
- function getActionDataForCommit(pendingActionResult) {
4478
- if (!pendingActionResult) {
4479
- return {};
4480
- }
4481
- return isErrorResult(pendingActionResult[1]) ? {
4482
- // Clear out prior actionData on errors
4483
- actionData: {}
4484
- } : {
4485
- actionData: {
4486
- [pendingActionResult[0]]: pendingActionResult[1].data
4487
- }
4488
- };
4489
- }
4490
- // Find the nearest error boundary, looking upwards from the leaf route (or the
4491
- // route specified by routeId) for the closest ancestor error boundary,
4492
- // defaulting to the root match
4493
- function findNearestBoundary(matches, routeId) {
4494
- let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];
4495
- return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];
4496
- }
4497
- function getShortCircuitMatches(routes) {
4498
- // Prefer a root layout route if present, otherwise shim in a route object
4499
- let route = routes.length === 1 ? routes[0] : routes.find(r => r.index || !r.path || r.path === "/") || {
4500
- id: "__shim-error-route__"
4501
- };
4502
- return {
4503
- matches: [{
4504
- params: {},
4505
- pathname: "",
4506
- pathnameBase: "",
4507
- route
4508
- }],
4509
- route
4510
- };
4511
- }
4512
- function getInternalRouterError(status, _temp5) {
4513
- let {
4514
- pathname,
4515
- routeId,
4516
- method,
4517
- type,
4518
- message
4519
- } = _temp5 === void 0 ? {} : _temp5;
4520
- let statusText = "Unknown Server Error";
4521
- let errorMessage = "Unknown @remix-run/router error";
4522
- if (status === 400) {
4523
- statusText = "Bad Request";
4524
- if (type === "route-discovery") {
4525
- errorMessage = "Unable to match URL \"" + pathname + "\" - the `children()` function for " + ("route `" + routeId + "` threw the following error:\n" + message);
4526
- } else if (method && pathname && routeId) {
4527
- 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.";
4528
- } else if (type === "defer-action") {
4529
- errorMessage = "defer() is not supported in actions";
4530
- } else if (type === "invalid-body") {
4531
- errorMessage = "Unable to encode submission body";
4532
- }
4533
- } else if (status === 403) {
4534
- statusText = "Forbidden";
4535
- errorMessage = "Route \"" + routeId + "\" does not match URL \"" + pathname + "\"";
4536
- } else if (status === 404) {
4537
- statusText = "Not Found";
4538
- errorMessage = "No route matches URL \"" + pathname + "\"";
4539
- } else if (status === 405) {
4540
- statusText = "Method Not Allowed";
4541
- if (method && pathname && routeId) {
4542
- 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.";
4543
- } else if (method) {
4544
- errorMessage = "Invalid request method \"" + method.toUpperCase() + "\"";
4545
- }
4546
- }
4547
- return new ErrorResponseImpl(status || 500, statusText, new Error(errorMessage), true);
4548
- }
4549
- // Find any returned redirect errors, starting from the lowest match
4550
- function findRedirect(results) {
4551
- for (let i = results.length - 1; i >= 0; i--) {
4552
- let result = results[i];
4553
- if (isRedirectResult(result)) {
4554
- return {
4555
- result,
4556
- idx: i
4557
- };
4558
- }
4559
- }
4560
- }
4561
- function stripHashFromPath(path) {
4562
- let parsedPath = typeof path === "string" ? parsePath(path) : path;
4563
- return createPath(_extends({}, parsedPath, {
4564
- hash: ""
4565
- }));
4566
- }
4567
- function isHashChangeOnly(a, b) {
4568
- if (a.pathname !== b.pathname || a.search !== b.search) {
4569
- return false;
4570
- }
4571
- if (a.hash === "") {
4572
- // /page -> /page#hash
4573
- return b.hash !== "";
4574
- } else if (a.hash === b.hash) {
4575
- // /page#hash -> /page#hash
4576
- return true;
4577
- } else if (b.hash !== "") {
4578
- // /page#hash -> /page#other
4579
- return true;
4580
- }
4581
- // If the hash is removed the browser will re-perform a request to the server
4582
- // /page#hash -> /page
4583
- return false;
4584
- }
4585
- function isPromise(val) {
4586
- return typeof val === "object" && val != null && "then" in val;
4587
- }
4588
- function isHandlerResult(result) {
4589
- return result != null && typeof result === "object" && "type" in result && "result" in result && (result.type === ResultType.data || result.type === ResultType.error);
4590
- }
4591
- function isRedirectHandlerResult(result) {
4592
- return isResponse(result.result) && redirectStatusCodes.has(result.result.status);
4593
- }
4594
- function isDeferredResult(result) {
4595
- return result.type === ResultType.deferred;
4596
- }
4597
- function isErrorResult(result) {
4598
- return result.type === ResultType.error;
4599
- }
4600
- function isRedirectResult(result) {
4601
- return (result && result.type) === ResultType.redirect;
4602
- }
4603
- function isDeferredData(value) {
4604
- let deferred = value;
4605
- return deferred && typeof deferred === "object" && typeof deferred.data === "object" && typeof deferred.subscribe === "function" && typeof deferred.cancel === "function" && typeof deferred.resolveData === "function";
4606
- }
4607
- function isResponse(value) {
4608
- return value != null && typeof value.status === "number" && typeof value.statusText === "string" && typeof value.headers === "object" && typeof value.body !== "undefined";
4609
- }
4610
- function isRedirectResponse(result) {
4611
- if (!isResponse(result)) {
4612
- return false;
4613
- }
4614
- let status = result.status;
4615
- let location = result.headers.get("Location");
4616
- return status >= 300 && status <= 399 && location != null;
4617
- }
4618
- function isValidMethod(method) {
4619
- return validRequestMethods.has(method.toLowerCase());
4620
- }
4621
- function isMutationMethod(method) {
4622
- return validMutationMethods.has(method.toLowerCase());
4623
- }
4624
- async function resolveDeferredResults(currentMatches, matchesToLoad, results, signals, isFetcher, currentLoaderData) {
4625
- for (let index = 0; index < results.length; index++) {
4626
- let result = results[index];
4627
- let match = matchesToLoad[index];
4628
- // If we don't have a match, then we can have a deferred result to do
4629
- // anything with. This is for revalidating fetchers where the route was
4630
- // removed during HMR
4631
- if (!match) {
4632
- continue;
4633
- }
4634
- let currentMatch = currentMatches.find(m => m.route.id === match.route.id);
4635
- let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;
4636
- if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {
4637
- // Note: we do not have to touch activeDeferreds here since we race them
4638
- // against the signal in resolveDeferredData and they'll get aborted
4639
- // there if needed
4640
- let signal = signals[index];
4641
- invariant(signal, "Expected an AbortSignal for revalidating fetcher deferred result");
4642
- await resolveDeferredData(result, signal, isFetcher).then(result => {
4643
- if (result) {
4644
- results[index] = result || results[index];
4645
- }
4646
- });
4647
- }
4648
- }
4649
- }
4650
- async function resolveDeferredData(result, signal, unwrap) {
4651
- if (unwrap === void 0) {
4652
- unwrap = false;
4653
- }
4654
- let aborted = await result.deferredData.resolveData(signal);
4655
- if (aborted) {
4656
- return;
4657
- }
4658
- if (unwrap) {
4659
- try {
4660
- return {
4661
- type: ResultType.data,
4662
- data: result.deferredData.unwrappedData
4663
- };
4664
- } catch (e) {
4665
- // Handle any TrackedPromise._error values encountered while unwrapping
4666
- return {
4667
- type: ResultType.error,
4668
- error: e
4669
- };
4670
- }
4671
- }
4672
- return {
4673
- type: ResultType.data,
4674
- data: result.deferredData.data
4675
- };
4676
- }
4677
- function hasNakedIndexQuery(search) {
4678
- return new URLSearchParams(search).getAll("index").some(v => v === "");
4679
- }
4680
- function getTargetMatch(matches, location) {
4681
- let search = typeof location === "string" ? parsePath(location).search : location.search;
4682
- if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || "")) {
4683
- // Return the leaf index route when index is present
4684
- return matches[matches.length - 1];
4685
- }
4686
- // Otherwise grab the deepest "path contributing" match (ignoring index and
4687
- // pathless layout routes)
4688
- let pathMatches = getPathContributingMatches(matches);
4689
- return pathMatches[pathMatches.length - 1];
4690
- }
4691
- function getSubmissionFromNavigation(navigation) {
4692
- let {
4693
- formMethod,
4694
- formAction,
4695
- formEncType,
4696
- text,
4697
- formData,
4698
- json
4699
- } = navigation;
4700
- if (!formMethod || !formAction || !formEncType) {
4701
- return;
4702
- }
4703
- if (text != null) {
4704
- return {
4705
- formMethod,
4706
- formAction,
4707
- formEncType,
4708
- formData: undefined,
4709
- json: undefined,
4710
- text
4711
- };
4712
- } else if (formData != null) {
4713
- return {
4714
- formMethod,
4715
- formAction,
4716
- formEncType,
4717
- formData,
4718
- json: undefined,
4719
- text: undefined
4720
- };
4721
- } else if (json !== undefined) {
4722
- return {
4723
- formMethod,
4724
- formAction,
4725
- formEncType,
4726
- formData: undefined,
4727
- json,
4728
- text: undefined
4729
- };
4730
- }
4731
- }
4732
- function getLoadingNavigation(location, submission) {
4733
- if (submission) {
4734
- let navigation = {
4735
- state: "loading",
4736
- location,
4737
- formMethod: submission.formMethod,
4738
- formAction: submission.formAction,
4739
- formEncType: submission.formEncType,
4740
- formData: submission.formData,
4741
- json: submission.json,
4742
- text: submission.text
4743
- };
4744
- return navigation;
4745
- } else {
4746
- let navigation = {
4747
- state: "loading",
4748
- location,
4749
- formMethod: undefined,
4750
- formAction: undefined,
4751
- formEncType: undefined,
4752
- formData: undefined,
4753
- json: undefined,
4754
- text: undefined
4755
- };
4756
- return navigation;
4757
- }
4758
- }
4759
- function getSubmittingNavigation(location, submission) {
4760
- let navigation = {
4761
- state: "submitting",
4762
- location,
4763
- formMethod: submission.formMethod,
4764
- formAction: submission.formAction,
4765
- formEncType: submission.formEncType,
4766
- formData: submission.formData,
4767
- json: submission.json,
4768
- text: submission.text
4769
- };
4770
- return navigation;
4771
- }
4772
- function getLoadingFetcher(submission, data) {
4773
- if (submission) {
4774
- let fetcher = {
4775
- state: "loading",
4776
- formMethod: submission.formMethod,
4777
- formAction: submission.formAction,
4778
- formEncType: submission.formEncType,
4779
- formData: submission.formData,
4780
- json: submission.json,
4781
- text: submission.text,
4782
- data
4783
- };
4784
- return fetcher;
4785
- } else {
4786
- let fetcher = {
4787
- state: "loading",
4788
- formMethod: undefined,
4789
- formAction: undefined,
4790
- formEncType: undefined,
4791
- formData: undefined,
4792
- json: undefined,
4793
- text: undefined,
4794
- data
4795
- };
4796
- return fetcher;
4797
- }
4798
- }
4799
- function getSubmittingFetcher(submission, existingFetcher) {
4800
- let fetcher = {
4801
- state: "submitting",
4802
- formMethod: submission.formMethod,
4803
- formAction: submission.formAction,
4804
- formEncType: submission.formEncType,
4805
- formData: submission.formData,
4806
- json: submission.json,
4807
- text: submission.text,
4808
- data: existingFetcher ? existingFetcher.data : undefined
4809
- };
4810
- return fetcher;
4811
- }
4812
- function getDoneFetcher(data) {
4813
- let fetcher = {
4814
- state: "idle",
4815
- formMethod: undefined,
4816
- formAction: undefined,
4817
- formEncType: undefined,
4818
- formData: undefined,
4819
- json: undefined,
4820
- text: undefined,
4821
- data
4822
- };
4823
- return fetcher;
4824
- }
4825
- function restoreAppliedTransitions(_window, transitions) {
4826
- try {
4827
- let sessionPositions = _window.sessionStorage.getItem(TRANSITIONS_STORAGE_KEY);
4828
- if (sessionPositions) {
4829
- let json = JSON.parse(sessionPositions);
4830
- for (let [k, v] of Object.entries(json || {})) {
4831
- if (v && Array.isArray(v)) {
4832
- transitions.set(k, new Set(v || []));
4833
- }
4834
- }
4835
- }
4836
- } catch (e) {
4837
- // no-op, use default empty object
4838
- }
4839
- }
4840
- function persistAppliedTransitions(_window, transitions) {
4841
- if (transitions.size > 0) {
4842
- let json = {};
4843
- for (let [k, v] of transitions) {
4844
- json[k] = [...v];
4845
- }
4846
- try {
4847
- _window.sessionStorage.setItem(TRANSITIONS_STORAGE_KEY, JSON.stringify(json));
4848
- } catch (error) {
4849
- warning(false, "Failed to save applied view transitions in sessionStorage (" + error + ").");
4850
- }
4851
- }
4852
- }
4853
- //#endregion
4854
-
4855
- export { AbortedDeferredError, Action, IDLE_BLOCKER, IDLE_FETCHER, IDLE_NAVIGATION, UNSAFE_DEFERRED_SYMBOL, DeferredData as UNSAFE_DeferredData, ErrorResponseImpl as UNSAFE_ErrorResponseImpl, convertRouteMatchToUiMatch as UNSAFE_convertRouteMatchToUiMatch, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getResolveToMatches as UNSAFE_getResolveToMatches, invariant as UNSAFE_invariant, warning as UNSAFE_warning, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, createStaticHandler, defer, generatePath, getStaticContextFromError, getToPathname, isDeferredData, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, redirectDocument, resolvePath, resolveTo, stripBasename };
4856
- //# sourceMappingURL=router.js.map