hasting-swatchcart-module 0.0.7 → 0.0.9

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 (351) hide show
  1. package/dist/assets/SwatchesModule.css +1 -0
  2. package/dist/components/SwatchesModule.js +23440 -24
  3. package/dist/components/Test.js +5 -0
  4. package/dist/lib/components/Test.d.ts +1 -0
  5. package/dist/main.js +0 -1
  6. package/dist/{src/shared/constants/props.js → rootReducer-BqfJd5QI.js} +1913 -3
  7. package/dist/store/LibraryProvider.js +3 -4
  8. package/dist/store/rootReducer.js +2 -10
  9. package/dist/store/store.js +5 -15
  10. package/dist/store-BZ_1BK_I.js +382 -0
  11. package/package.json +1 -1
  12. package/dist/_virtual/_commonjsHelpers.js +0 -6
  13. package/dist/_virtual/index.js +0 -7
  14. package/dist/_virtual/index2.js +0 -7
  15. package/dist/_virtual/index3.js +0 -4
  16. package/dist/_virtual/use-sync-external-store-with-selector.development.js +0 -4
  17. package/dist/_virtual/use-sync-external-store-with-selector.production.js +0 -4
  18. package/dist/_virtual/utilities.js +0 -4
  19. package/dist/_virtual/with-selector.js +0 -5
  20. package/dist/_virtual/with-selector2.js +0 -4
  21. package/dist/assets/src/shared/ui/CustomSidebar/CustomSidebar.module.css +0 -1
  22. package/dist/assets/src/shared/ui/Markdown/MDWithAccordion.module.css +0 -1
  23. package/dist/assets/styles/index.css +0 -0
  24. package/dist/main.d.ts +0 -1
  25. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -527
  26. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -402
  27. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -208
  28. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -136
  29. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -130
  30. package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -9
  31. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
  32. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -251
  33. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
  34. package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -68
  35. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -256
  36. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
  37. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
  38. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
  39. package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -13
  40. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -231
  41. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -219
  42. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
  43. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
  44. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -36
  45. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -49
  46. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -10
  47. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -52
  48. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -14
  49. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
  50. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -8
  51. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -27
  52. package/dist/node_modules/@reduxjs/toolkit/dist/redux-toolkit.modern.js +0 -877
  53. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +0 -35
  54. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +0 -497
  55. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +0 -52
  56. package/dist/node_modules/@ungap/structured-clone/esm/deserialize.js +0 -62
  57. package/dist/node_modules/@ungap/structured-clone/esm/index.js +0 -11
  58. package/dist/node_modules/@ungap/structured-clone/esm/serialize.js +0 -106
  59. package/dist/node_modules/@ungap/structured-clone/esm/types.js +0 -13
  60. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
  61. package/dist/node_modules/bail/index.js +0 -7
  62. package/dist/node_modules/clsx/dist/clsx.js +0 -17
  63. package/dist/node_modules/comma-separated-tokens/index.js +0 -20
  64. package/dist/node_modules/decode-named-character-reference/index.dom.js +0 -14
  65. package/dist/node_modules/devlop/lib/default.js +0 -8
  66. package/dist/node_modules/estree-util-is-identifier-name/lib/index.js +0 -7
  67. package/dist/node_modules/extend/index.js +0 -43
  68. package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -7
  69. package/dist/node_modules/hast-util-from-parse5/lib/index.js +0 -145
  70. package/dist/node_modules/hast-util-parse-selector/lib/index.js +0 -20
  71. package/dist/node_modules/hast-util-raw/lib/index.js +0 -217
  72. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +0 -302
  73. package/dist/node_modules/hast-util-to-parse5/lib/index.js +0 -118
  74. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/index.js +0 -12
  75. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/aria.js +0 -61
  76. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/find.js +0 -33
  77. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/html.js +0 -368
  78. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/normalize.js +0 -6
  79. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/svg.js +0 -566
  80. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
  81. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
  82. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/create.js +0 -22
  83. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/defined-info.js +0 -27
  84. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/info.js +0 -23
  85. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/merge.js +0 -11
  86. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/schema.js +0 -17
  87. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/util/types.js +0 -14
  88. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xlink.js +0 -19
  89. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xml.js +0 -11
  90. package/dist/node_modules/hast-util-to-parse5/node_modules/property-information/lib/xmlns.js +0 -11
  91. package/dist/node_modules/hast-util-whitespace/lib/index.js +0 -10
  92. package/dist/node_modules/hastscript/lib/create-h.js +0 -112
  93. package/dist/node_modules/hastscript/lib/index.js +0 -8
  94. package/dist/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js +0 -44
  95. package/dist/node_modules/html-url-attributes/lib/index.js +0 -26
  96. package/dist/node_modules/html-void-elements/index.js +0 -25
  97. package/dist/node_modules/immer/dist/immer.js +0 -467
  98. package/dist/node_modules/inline-style-parser/index.js +0 -93
  99. package/dist/node_modules/is-plain-obj/index.js +0 -9
  100. package/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -40
  101. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -27
  102. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -20
  103. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +0 -12
  104. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -12
  105. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +0 -15
  106. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -19
  107. package/dist/node_modules/mdast-util-from-markdown/lib/index.js +0 -581
  108. package/dist/node_modules/mdast-util-to-hast/lib/footer.js +0 -90
  109. package/dist/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +0 -12
  110. package/dist/node_modules/mdast-util-to-hast/lib/handlers/break.js +0 -8
  111. package/dist/node_modules/mdast-util-to-hast/lib/handlers/code.js +0 -15
  112. package/dist/node_modules/mdast-util-to-hast/lib/handlers/delete.js +0 -12
  113. package/dist/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +0 -12
  114. package/dist/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +0 -28
  115. package/dist/node_modules/mdast-util-to-hast/lib/handlers/heading.js +0 -12
  116. package/dist/node_modules/mdast-util-to-hast/lib/handlers/html.js +0 -9
  117. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +0 -14
  118. package/dist/node_modules/mdast-util-to-hast/lib/handlers/image.js +0 -10
  119. package/dist/node_modules/mdast-util-to-hast/lib/handlers/index.js +0 -58
  120. package/dist/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +0 -14
  121. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +0 -19
  122. package/dist/node_modules/mdast-util-to-hast/lib/handlers/link.js +0 -15
  123. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +0 -42
  124. package/dist/node_modules/mdast-util-to-hast/lib/handlers/list.js +0 -21
  125. package/dist/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +0 -12
  126. package/dist/node_modules/mdast-util-to-hast/lib/handlers/root.js +0 -7
  127. package/dist/node_modules/mdast-util-to-hast/lib/handlers/strong.js +0 -12
  128. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +0 -13
  129. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +0 -21
  130. package/dist/node_modules/mdast-util-to-hast/lib/handlers/table.js +0 -32
  131. package/dist/node_modules/mdast-util-to-hast/lib/handlers/text.js +0 -8
  132. package/dist/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +0 -12
  133. package/dist/node_modules/mdast-util-to-hast/lib/index.js +0 -10
  134. package/dist/node_modules/mdast-util-to-hast/lib/revert.js +0 -13
  135. package/dist/node_modules/mdast-util-to-hast/lib/state.js +0 -104
  136. package/dist/node_modules/mdast-util-to-string/lib/index.js +0 -29
  137. package/dist/node_modules/micromark/lib/constructs.js +0 -85
  138. package/dist/node_modules/micromark/lib/create-tokenizer.js +0 -223
  139. package/dist/node_modules/micromark/lib/initialize/content.js +0 -37
  140. package/dist/node_modules/micromark/lib/initialize/document.js +0 -126
  141. package/dist/node_modules/micromark/lib/initialize/flow.js +0 -33
  142. package/dist/node_modules/micromark/lib/initialize/text.js +0 -95
  143. package/dist/node_modules/micromark/lib/parse.js +0 -32
  144. package/dist/node_modules/micromark/lib/postprocess.js +0 -9
  145. package/dist/node_modules/micromark/lib/preprocess.js +0 -39
  146. package/dist/node_modules/micromark-core-commonmark/lib/attention.js +0 -83
  147. package/dist/node_modules/micromark-core-commonmark/lib/autolink.js +0 -43
  148. package/dist/node_modules/micromark-core-commonmark/lib/blank-line.js +0 -18
  149. package/dist/node_modules/micromark-core-commonmark/lib/block-quote.js +0 -42
  150. package/dist/node_modules/micromark-core-commonmark/lib/character-escape.js +0 -17
  151. package/dist/node_modules/micromark-core-commonmark/lib/character-reference.js +0 -30
  152. package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.js +0 -94
  153. package/dist/node_modules/micromark-core-commonmark/lib/code-indented.js +0 -43
  154. package/dist/node_modules/micromark-core-commonmark/lib/code-text.js +0 -45
  155. package/dist/node_modules/micromark-core-commonmark/lib/content.js +0 -50
  156. package/dist/node_modules/micromark-core-commonmark/lib/definition.js +0 -80
  157. package/dist/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +0 -17
  158. package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.js +0 -46
  159. package/dist/node_modules/micromark-core-commonmark/lib/html-flow.js +0 -144
  160. package/dist/node_modules/micromark-core-commonmark/lib/html-text.js +0 -102
  161. package/dist/node_modules/micromark-core-commonmark/lib/label-end.js +0 -152
  162. package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.js +0 -22
  163. package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.js +0 -19
  164. package/dist/node_modules/micromark-core-commonmark/lib/line-ending.js +0 -14
  165. package/dist/node_modules/micromark-core-commonmark/lib/list.js +0 -90
  166. package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.js +0 -57
  167. package/dist/node_modules/micromark-core-commonmark/lib/thematic-break.js +0 -25
  168. package/dist/node_modules/micromark-factory-destination/index.js +0 -31
  169. package/dist/node_modules/micromark-factory-label/index.js +0 -28
  170. package/dist/node_modules/micromark-factory-space/index.js +0 -15
  171. package/dist/node_modules/micromark-factory-title/index.js +0 -26
  172. package/dist/node_modules/micromark-factory-whitespace/index.js +0 -12
  173. package/dist/node_modules/micromark-util-character/index.js +0 -39
  174. package/dist/node_modules/micromark-util-chunked/index.js +0 -16
  175. package/dist/node_modules/micromark-util-classify-character/index.js +0 -10
  176. package/dist/node_modules/micromark-util-combine-extensions/index.js +0 -36
  177. package/dist/node_modules/micromark-util-decode-numeric-character-reference/index.js +0 -16
  178. package/dist/node_modules/micromark-util-decode-string/index.js +0 -18
  179. package/dist/node_modules/micromark-util-html-tag-name/index.js +0 -68
  180. package/dist/node_modules/micromark-util-normalize-identifier/index.js +0 -6
  181. package/dist/node_modules/micromark-util-resolve-all/index.js +0 -12
  182. package/dist/node_modules/micromark-util-sanitize-uri/index.js +0 -23
  183. package/dist/node_modules/micromark-util-subtokenize/index.js +0 -55
  184. package/dist/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +0 -175
  185. package/dist/node_modules/parse5/dist/common/doctype.js +0 -98
  186. package/dist/node_modules/parse5/dist/common/error-codes.js +0 -7
  187. package/dist/node_modules/parse5/dist/common/foreign-content.js +0 -210
  188. package/dist/node_modules/parse5/dist/common/html.js +0 -250
  189. package/dist/node_modules/parse5/dist/common/token.js +0 -14
  190. package/dist/node_modules/parse5/dist/common/unicode.js +0 -73
  191. package/dist/node_modules/parse5/dist/parser/formatting-element-list.js +0 -84
  192. package/dist/node_modules/parse5/dist/parser/index.js +0 -2271
  193. package/dist/node_modules/parse5/dist/parser/open-element-stack.js +0 -240
  194. package/dist/node_modules/parse5/dist/serializer/index.js +0 -2
  195. package/dist/node_modules/parse5/dist/tokenizer/index.js +0 -1940
  196. package/dist/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -88
  197. package/dist/node_modules/parse5/dist/tree-adapters/default.js +0 -162
  198. package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +0 -38
  199. package/dist/node_modules/parse5/node_modules/entities/dist/esm/decode.js +0 -245
  200. package/dist/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -7
  201. package/dist/node_modules/property-information/index.js +0 -12
  202. package/dist/node_modules/property-information/lib/aria.js +0 -61
  203. package/dist/node_modules/property-information/lib/find.js +0 -33
  204. package/dist/node_modules/property-information/lib/hast-to-react.js +0 -22
  205. package/dist/node_modules/property-information/lib/html.js +0 -368
  206. package/dist/node_modules/property-information/lib/normalize.js +0 -6
  207. package/dist/node_modules/property-information/lib/svg.js +0 -566
  208. package/dist/node_modules/property-information/lib/util/case-insensitive-transform.js +0 -7
  209. package/dist/node_modules/property-information/lib/util/case-sensitive-transform.js +0 -6
  210. package/dist/node_modules/property-information/lib/util/create.js +0 -19
  211. package/dist/node_modules/property-information/lib/util/defined-info.js +0 -36
  212. package/dist/node_modules/property-information/lib/util/info.js +0 -28
  213. package/dist/node_modules/property-information/lib/util/merge.js +0 -10
  214. package/dist/node_modules/property-information/lib/util/schema.js +0 -21
  215. package/dist/node_modules/property-information/lib/util/types.js +0 -14
  216. package/dist/node_modules/property-information/lib/xlink.js +0 -19
  217. package/dist/node_modules/property-information/lib/xml.js +0 -11
  218. package/dist/node_modules/property-information/lib/xmlns.js +0 -11
  219. package/dist/node_modules/react-markdown/lib/index.js +0 -102
  220. package/dist/node_modules/react-redux/dist/react-redux.js +0 -246
  221. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
  222. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
  223. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
  224. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
  225. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -68
  226. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  227. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  228. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -71
  229. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
  230. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -25
  231. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -11
  232. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -15
  233. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -30
  234. package/dist/node_modules/redux/dist/redux.js +0 -258
  235. package/dist/node_modules/redux-thunk/dist/redux-thunk.js +0 -8
  236. package/dist/node_modules/rehype-raw/lib/index.js +0 -12
  237. package/dist/node_modules/remark-parse/lib/index.js +0 -19
  238. package/dist/node_modules/remark-rehype/lib/index.js +0 -18
  239. package/dist/node_modules/reselect/dist/reselect.js +0 -244
  240. package/dist/node_modules/space-separated-tokens/index.js +0 -11
  241. package/dist/node_modules/style-to-js/cjs/index.js +0 -20
  242. package/dist/node_modules/style-to-js/cjs/utilities.js +0 -19
  243. package/dist/node_modules/style-to-object/cjs/index.js +0 -28
  244. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -2731
  245. package/dist/node_modules/trim-lines/index.js +0 -28
  246. package/dist/node_modules/trough/lib/index.js +0 -60
  247. package/dist/node_modules/tslib/tslib.es6.js +0 -27
  248. package/dist/node_modules/unified/lib/callable-instance.js +0 -25
  249. package/dist/node_modules/unified/lib/index.js +0 -529
  250. package/dist/node_modules/unist-util-is/lib/index.js +0 -84
  251. package/dist/node_modules/unist-util-position/lib/index.js +0 -23
  252. package/dist/node_modules/unist-util-stringify-position/lib/index.js +0 -15
  253. package/dist/node_modules/unist-util-visit/lib/index.js +0 -16
  254. package/dist/node_modules/unist-util-visit-parents/lib/color.js +0 -6
  255. package/dist/node_modules/unist-util-visit-parents/lib/index.js +0 -56
  256. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -6
  257. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -26
  258. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -25
  259. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -18
  260. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -67
  261. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +0 -66
  262. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +0 -65
  263. package/dist/node_modules/use-sync-external-store/with-selector.js +0 -10
  264. package/dist/node_modules/vfile/lib/index.js +0 -406
  265. package/dist/node_modules/vfile/lib/minpath.browser.js +0 -112
  266. package/dist/node_modules/vfile/lib/minproc.browser.js +0 -7
  267. package/dist/node_modules/vfile/lib/minurl.browser.js +0 -41
  268. package/dist/node_modules/vfile/lib/minurl.shared.js +0 -7
  269. package/dist/node_modules/vfile-location/lib/index.js +0 -42
  270. package/dist/node_modules/vfile-message/lib/index.js +0 -91
  271. package/dist/node_modules/web-namespaces/index.js +0 -11
  272. package/dist/node_modules/zwitch/index.js +0 -18
  273. package/dist/src/app/assets/images/product_thumb.png.js +0 -4
  274. package/dist/src/app/assets/svg/ArrowIconSVG.js +0 -25
  275. package/dist/src/app/assets/svg/CheckMarkIconSVG.js +0 -25
  276. package/dist/src/app/assets/svg/CloseIconSVG.js +0 -25
  277. package/dist/src/app/assets/svg/MinusIconSVG.js +0 -24
  278. package/dist/src/app/assets/svg/PlusIconSVG.js +0 -24
  279. package/dist/src/app/assets/svg/SearchIconSVG.js +0 -37
  280. package/dist/src/app/assets/svg/TrashIconSVG.js +0 -24
  281. package/dist/src/app/store/rootReducer.js +0 -12
  282. package/dist/src/app/store/store.js +0 -14
  283. package/dist/src/features/Cart/lib/CartCervices.js +0 -8
  284. package/dist/src/features/Cart/model/cartSlice.js +0 -58
  285. package/dist/src/features/Cart/model/selectors.js +0 -18
  286. package/dist/src/features/Cart/ui/CartHeader/CartHeader.js +0 -53
  287. package/dist/src/features/Cart/ui/CartList/CartList.js +0 -29
  288. package/dist/src/features/Cart/ui/CartListItem/CartListItem.js +0 -41
  289. package/dist/src/features/Cart/ui/CartPrice/CartPrice.js +0 -23
  290. package/dist/src/features/Cart/ui/CartWrapper/CartWrapper.js +0 -38
  291. package/dist/src/features/Cart/ui/Counter/Counter.js +0 -46
  292. package/dist/src/features/DataAdapter/lib/DataAdapterServices.js +0 -102
  293. package/dist/src/features/DataAdapter/utils/types.js +0 -8
  294. package/dist/src/features/MultiProduct/lib/MultiProductCartServices.js +0 -34
  295. package/dist/src/features/MultiProduct/model/API/api.js +0 -18
  296. package/dist/src/features/MultiProduct/model/multiProductCartSlice.js +0 -83
  297. package/dist/src/features/MultiProduct/model/selectors.js +0 -7
  298. package/dist/src/features/MultiProduct/ui/CartSelectedProductList/CartSelectedProductList.js +0 -21
  299. package/dist/src/features/MultiProduct/ui/CustomModal/CustomModal.js +0 -28
  300. package/dist/src/features/MultiProduct/ui/FiltersSelectedProductItem/FiltersSelectedProductItem.js +0 -27
  301. package/dist/src/features/MultiProduct/ui/MultiProductCartHeader/MultiProductCartHeader.js +0 -60
  302. package/dist/src/features/MultiProduct/ui/MultiProductItemCart/MultiProductItemCart.js +0 -71
  303. package/dist/src/features/MultiProduct/ui/MultiProductWrapper/MultiProductWrapper.js +0 -19
  304. package/dist/src/features/MultiProduct/ui/ProductList/ProductList.js +0 -138
  305. package/dist/src/features/MultiProduct/ui/ProductListItem/ProductListItem.js +0 -51
  306. package/dist/src/features/MultiProduct/ui/SelectedProductItem/SelectedProductItem.js +0 -55
  307. package/dist/src/features/MultiProduct/ui/SwatchContentContainer/SwatchContentContainer.js +0 -46
  308. package/dist/src/features/MultiProduct/utils/constants.js +0 -16
  309. package/dist/src/features/MultiProduct/utils/randomList.js +0 -41
  310. package/dist/src/features/swatches/lib/AttributeHelper.js +0 -21
  311. package/dist/src/features/swatches/lib/SwatchesServices.js +0 -54
  312. package/dist/src/features/swatches/model/selectors.js +0 -12
  313. package/dist/src/features/swatches/model/swatchesSlice.js +0 -108
  314. package/dist/src/features/swatches/model/thunks.js +0 -22
  315. package/dist/src/features/swatches/model/types.js +0 -6
  316. package/dist/src/features/swatches/ui/Filters/ColorsFilter.js +0 -45
  317. package/dist/src/features/swatches/ui/Filters/LooksFilter.js +0 -45
  318. package/dist/src/features/swatches/ui/Filters/MaterialsFilter.js +0 -47
  319. package/dist/src/features/swatches/ui/Filters/index.js +0 -12
  320. package/dist/src/features/swatches/ui/HexGridZoom/HexGridZoom.js +0 -50
  321. package/dist/src/features/swatches/ui/ImageGridZoom/ImageGridZoom.js +0 -45
  322. package/dist/src/features/swatches/ui/MaterialList/index.js +0 -39
  323. package/dist/src/features/swatches/ui/MaterialListItem/MaterialListItem.js +0 -51
  324. package/dist/src/features/swatches/ui/ProductElement/index.js +0 -65
  325. package/dist/src/features/swatches/ui/SwatchWrapper/SwatchWrapper.js +0 -62
  326. package/dist/src/features/swatches/ui/Swatches.js +0 -51
  327. package/dist/src/features/swatches/ui/SwatchesList/SwatchesList.js +0 -67
  328. package/dist/src/features/swatches/utils/constants.js +0 -8
  329. package/dist/src/shared/constants/selectedMaterials.js +0 -4
  330. package/dist/src/shared/types/activeTab.js +0 -7
  331. package/dist/src/shared/ui/Checkbox/Checkbox.js +0 -31
  332. package/dist/src/shared/ui/CustomButton/CustomButton.js +0 -16
  333. package/dist/src/shared/ui/CustomSidebar/CustomSidebar.js +0 -59
  334. package/dist/src/shared/ui/CustomSidebar/CustomSidebar.module.scss.js +0 -13
  335. package/dist/src/shared/ui/Dialog/Dialog.js +0 -81
  336. package/dist/src/shared/ui/Label/Label.js +0 -27
  337. package/dist/src/shared/ui/Markdown/MDWithAccordion.js +0 -36
  338. package/dist/src/shared/ui/Markdown/MDWithAccordion.module.scss.js +0 -9
  339. package/dist/src/shared/ui/MaterialItem/MaterialItem.js +0 -36
  340. package/dist/src/shared/ui/MultiSelect/MultiSelect.js +0 -150
  341. package/dist/src/shared/ui/PopoverTooltip/InfoIcon.js +0 -35
  342. package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.js +0 -37
  343. package/dist/src/shared/ui/PopoverTooltip/PopoverTooltip.module.scss.js +0 -4
  344. package/dist/src/shared/ui/Slider/Slider.js +0 -117
  345. package/dist/src/shared/utils/cn.js +0 -8
  346. package/dist/src/shared/utils/uniqueList.js +0 -4
  347. /package/dist/{components → lib/components}/SwatchesModule.d.ts +0 -0
  348. /package/dist/{store → lib/store}/LibraryProvider.d.ts +0 -0
  349. /package/dist/{store → lib/store}/rootReducer.d.ts +0 -0
  350. /package/dist/{store → lib/store}/store.d.ts +0 -0
  351. /package/dist/{store → lib/store}/withStore.d.ts +0 -0
@@ -1,4 +1,1605 @@
1
- const a = [
1
+ function L(e) {
2
+ return `Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
3
+ }
4
+ var ia = typeof Symbol == "function" && Symbol.observable || "@@observable", ge = ia, X = () => Math.random().toString(36).substring(7).split("").join("."), oa = {
5
+ INIT: `@@redux/INIT${/* @__PURE__ */ X()}`,
6
+ REPLACE: `@@redux/REPLACE${/* @__PURE__ */ X()}`,
7
+ PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${X()}`
8
+ }, R = oa;
9
+ function k(e) {
10
+ if (typeof e != "object" || e === null)
11
+ return !1;
12
+ let a = e;
13
+ for (; Object.getPrototypeOf(a) !== null; )
14
+ a = Object.getPrototypeOf(a);
15
+ return Object.getPrototypeOf(e) === a || Object.getPrototypeOf(e) === null;
16
+ }
17
+ function ra(e) {
18
+ if (e === void 0)
19
+ return "undefined";
20
+ if (e === null)
21
+ return "null";
22
+ const a = typeof e;
23
+ switch (a) {
24
+ case "boolean":
25
+ case "string":
26
+ case "number":
27
+ case "symbol":
28
+ case "function":
29
+ return a;
30
+ }
31
+ if (Array.isArray(e))
32
+ return "array";
33
+ if (ba(e))
34
+ return "date";
35
+ if (fa(e))
36
+ return "error";
37
+ const t = da(e);
38
+ switch (t) {
39
+ case "Symbol":
40
+ case "Promise":
41
+ case "WeakMap":
42
+ case "WeakSet":
43
+ case "Map":
44
+ case "Set":
45
+ return t;
46
+ }
47
+ return Object.prototype.toString.call(e).slice(8, -1).toLowerCase().replace(/\s/g, "");
48
+ }
49
+ function da(e) {
50
+ return typeof e.constructor == "function" ? e.constructor.name : null;
51
+ }
52
+ function fa(e) {
53
+ return e instanceof Error || typeof e.message == "string" && e.constructor && typeof e.constructor.stackTraceLimit == "number";
54
+ }
55
+ function ba(e) {
56
+ return e instanceof Date ? !0 : typeof e.toDateString == "function" && typeof e.getDate == "function" && typeof e.setDate == "function";
57
+ }
58
+ function I(e) {
59
+ let a = typeof e;
60
+ return process.env.NODE_ENV !== "production" && (a = ra(e)), a;
61
+ }
62
+ function Fe(e, a, t) {
63
+ if (typeof e != "function")
64
+ throw new Error(process.env.NODE_ENV === "production" ? L(2) : `Expected the root reducer to be a function. Instead, received: '${I(e)}'`);
65
+ if (typeof a == "function" && typeof t == "function" || typeof t == "function" && typeof arguments[3] == "function")
66
+ throw new Error(process.env.NODE_ENV === "production" ? L(0) : "It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");
67
+ if (typeof a == "function" && typeof t > "u" && (t = a, a = void 0), typeof t < "u") {
68
+ if (typeof t != "function")
69
+ throw new Error(process.env.NODE_ENV === "production" ? L(1) : `Expected the enhancer to be a function. Instead, received: '${I(t)}'`);
70
+ return t(Fe)(e, a);
71
+ }
72
+ let l = e, i = a, o = /* @__PURE__ */ new Map(), r = o, d = 0, f = !1;
73
+ function c() {
74
+ r === o && (r = /* @__PURE__ */ new Map(), o.forEach((m, C) => {
75
+ r.set(C, m);
76
+ }));
77
+ }
78
+ function b() {
79
+ if (f)
80
+ throw new Error(process.env.NODE_ENV === "production" ? L(3) : "You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");
81
+ return i;
82
+ }
83
+ function n(m) {
84
+ if (typeof m != "function")
85
+ throw new Error(process.env.NODE_ENV === "production" ? L(4) : `Expected the listener to be a function. Instead, received: '${I(m)}'`);
86
+ if (f)
87
+ throw new Error(process.env.NODE_ENV === "production" ? L(5) : "You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");
88
+ let C = !0;
89
+ c();
90
+ const G = d++;
91
+ return r.set(G, m), function() {
92
+ if (C) {
93
+ if (f)
94
+ throw new Error(process.env.NODE_ENV === "production" ? L(6) : "You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
95
+ C = !1, c(), r.delete(G), o = null;
96
+ }
97
+ };
98
+ }
99
+ function s(m) {
100
+ if (!k(m))
101
+ throw new Error(process.env.NODE_ENV === "production" ? L(7) : `Actions must be plain objects. Instead, the actual type was: '${I(m)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
102
+ if (typeof m.type > "u")
103
+ throw new Error(process.env.NODE_ENV === "production" ? L(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
104
+ if (typeof m.type != "string")
105
+ throw new Error(process.env.NODE_ENV === "production" ? L(17) : `Action "type" property must be a string. Instead, the actual type was: '${I(m.type)}'. Value was: '${m.type}' (stringified)`);
106
+ if (f)
107
+ throw new Error(process.env.NODE_ENV === "production" ? L(9) : "Reducers may not dispatch actions.");
108
+ try {
109
+ f = !0, i = l(i, m);
110
+ } finally {
111
+ f = !1;
112
+ }
113
+ return (o = r).forEach((G) => {
114
+ G();
115
+ }), m;
116
+ }
117
+ function u(m) {
118
+ if (typeof m != "function")
119
+ throw new Error(process.env.NODE_ENV === "production" ? L(10) : `Expected the nextReducer to be a function. Instead, received: '${I(m)}`);
120
+ l = m, s({
121
+ type: R.REPLACE
122
+ });
123
+ }
124
+ function g() {
125
+ const m = n;
126
+ return {
127
+ /**
128
+ * The minimal observable subscription method.
129
+ * @param observer Any object that can be used as an observer.
130
+ * The observer object should have a `next` method.
131
+ * @returns An object with an `unsubscribe` method that can
132
+ * be used to unsubscribe the observable from the store, and prevent further
133
+ * emission of values from the observable.
134
+ */
135
+ subscribe(C) {
136
+ if (typeof C != "object" || C === null)
137
+ throw new Error(process.env.NODE_ENV === "production" ? L(11) : `Expected the observer to be an object. Instead, received: '${I(C)}'`);
138
+ function G() {
139
+ const h = C;
140
+ h.next && h.next(b());
141
+ }
142
+ return G(), {
143
+ unsubscribe: m(G)
144
+ };
145
+ },
146
+ [ge]() {
147
+ return this;
148
+ }
149
+ };
150
+ }
151
+ return s({
152
+ type: R.INIT
153
+ }), {
154
+ dispatch: s,
155
+ subscribe: n,
156
+ getState: b,
157
+ replaceReducer: u,
158
+ [ge]: g
159
+ };
160
+ }
161
+ function Me(e) {
162
+ typeof console < "u" && typeof console.error == "function" && console.error(e);
163
+ try {
164
+ throw new Error(e);
165
+ } catch {
166
+ }
167
+ }
168
+ function ca(e, a, t, l) {
169
+ const i = Object.keys(a), o = t && t.type === R.INIT ? "preloadedState argument passed to createStore" : "previous state received by the reducer";
170
+ if (i.length === 0)
171
+ return "Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";
172
+ if (!k(e))
173
+ return `The ${o} has unexpected type of "${I(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;
174
+ const r = Object.keys(e).filter((d) => !a.hasOwnProperty(d) && !l[d]);
175
+ if (r.forEach((d) => {
176
+ l[d] = !0;
177
+ }), !(t && t.type === R.REPLACE) && r.length > 0)
178
+ return `Unexpected ${r.length > 1 ? "keys" : "key"} "${r.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`;
179
+ }
180
+ function na(e) {
181
+ Object.keys(e).forEach((a) => {
182
+ const t = e[a];
183
+ if (typeof t(void 0, {
184
+ type: R.INIT
185
+ }) > "u")
186
+ throw new Error(process.env.NODE_ENV === "production" ? L(12) : `The slice reducer for key "${a}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);
187
+ if (typeof t(void 0, {
188
+ type: R.PROBE_UNKNOWN_ACTION()
189
+ }) > "u")
190
+ throw new Error(process.env.NODE_ENV === "production" ? L(13) : `The slice reducer for key "${a}" returned undefined when probed with a random type. Don't try to handle '${R.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`);
191
+ });
192
+ }
193
+ function Re(e) {
194
+ const a = Object.keys(e), t = {};
195
+ for (let r = 0; r < a.length; r++) {
196
+ const d = a[r];
197
+ process.env.NODE_ENV !== "production" && typeof e[d] > "u" && Me(`No reducer provided for key "${d}"`), typeof e[d] == "function" && (t[d] = e[d]);
198
+ }
199
+ const l = Object.keys(t);
200
+ let i;
201
+ process.env.NODE_ENV !== "production" && (i = {});
202
+ let o;
203
+ try {
204
+ na(t);
205
+ } catch (r) {
206
+ o = r;
207
+ }
208
+ return function(d = {}, f) {
209
+ if (o)
210
+ throw o;
211
+ if (process.env.NODE_ENV !== "production") {
212
+ const n = ca(d, t, f, i);
213
+ n && Me(n);
214
+ }
215
+ let c = !1;
216
+ const b = {};
217
+ for (let n = 0; n < l.length; n++) {
218
+ const s = l[n], u = t[s], g = d[s], S = u(g, f);
219
+ if (typeof S > "u") {
220
+ const m = f && f.type;
221
+ throw new Error(process.env.NODE_ENV === "production" ? L(14) : `When called with an action of type ${m ? `"${String(m)}"` : "(unknown type)"}, the slice reducer for key "${s}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`);
222
+ }
223
+ b[s] = S, c = c || S !== g;
224
+ }
225
+ return c = c || l.length !== Object.keys(d).length, c ? b : d;
226
+ };
227
+ }
228
+ function Q(...e) {
229
+ return e.length === 0 ? (a) => a : e.length === 1 ? e[0] : e.reduce((a, t) => (...l) => a(t(...l)));
230
+ }
231
+ function sa(...e) {
232
+ return (a) => (t, l) => {
233
+ const i = a(t, l);
234
+ let o = () => {
235
+ throw new Error(process.env.NODE_ENV === "production" ? L(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
236
+ };
237
+ const r = {
238
+ getState: i.getState,
239
+ dispatch: (f, ...c) => o(f, ...c)
240
+ }, d = e.map((f) => f(r));
241
+ return o = Q(...d)(i.dispatch), {
242
+ ...i,
243
+ dispatch: o
244
+ };
245
+ };
246
+ }
247
+ function We(e) {
248
+ return k(e) && "type" in e && typeof e.type == "string";
249
+ }
250
+ var Pe = Symbol.for("immer-nothing"), ve = Symbol.for("immer-draftable"), A = Symbol.for("immer-state"), ua = process.env.NODE_ENV !== "production" ? [
251
+ // All error codes, starting by 0:
252
+ function(e) {
253
+ return `The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`;
254
+ },
255
+ function(e) {
256
+ return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`;
257
+ },
258
+ "This object has been frozen and should not be mutated",
259
+ function(e) {
260
+ return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + e;
261
+ },
262
+ "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
263
+ "Immer forbids circular references",
264
+ "The first or second argument to `produce` must be a function",
265
+ "The third argument to `produce` must be a function or undefined",
266
+ "First argument to `createDraft` must be a plain object, an array, or an immerable object",
267
+ "First argument to `finishDraft` must be a draft returned by `createDraft`",
268
+ function(e) {
269
+ return `'current' expects a draft, got: ${e}`;
270
+ },
271
+ "Object.defineProperty() cannot be used on an Immer draft",
272
+ "Object.setPrototypeOf() cannot be used on an Immer draft",
273
+ "Immer only supports deleting array indices",
274
+ "Immer only supports setting array indices and the 'length' property",
275
+ function(e) {
276
+ return `'original' expects a draft, got: ${e}`;
277
+ }
278
+ // Note: if more errors are added, the errorOffset in Patches.ts should be increased
279
+ // See Patches.ts for additional errors
280
+ ] : [];
281
+ function D(e, ...a) {
282
+ if (process.env.NODE_ENV !== "production") {
283
+ const t = ua[e], l = typeof t == "function" ? t.apply(null, a) : t;
284
+ throw new Error(`[Immer] ${l}`);
285
+ }
286
+ throw new Error(
287
+ `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
288
+ );
289
+ }
290
+ var w = Object.getPrototypeOf;
291
+ function W(e) {
292
+ return !!e && !!e[A];
293
+ }
294
+ function y(e) {
295
+ return e ? we(e) || Array.isArray(e) || !!e[ve] || !!e.constructor?.[ve] || O(e) || $(e) : !1;
296
+ }
297
+ var ma = Object.prototype.constructor.toString();
298
+ function we(e) {
299
+ if (!e || typeof e != "object")
300
+ return !1;
301
+ const a = w(e);
302
+ if (a === null)
303
+ return !0;
304
+ const t = Object.hasOwnProperty.call(a, "constructor") && a.constructor;
305
+ return t === Object ? !0 : typeof t == "function" && Function.toString.call(t) === ma;
306
+ }
307
+ function H(e, a) {
308
+ j(e) === 0 ? Reflect.ownKeys(e).forEach((t) => {
309
+ a(t, e[t], e);
310
+ }) : e.forEach((t, l) => a(l, t, e));
311
+ }
312
+ function j(e) {
313
+ const a = e[A];
314
+ return a ? a.type_ : Array.isArray(e) ? 1 : O(e) ? 2 : $(e) ? 3 : 0;
315
+ }
316
+ function oe(e, a) {
317
+ return j(e) === 2 ? e.has(a) : Object.prototype.hasOwnProperty.call(e, a);
318
+ }
319
+ function Ne(e, a, t) {
320
+ const l = j(e);
321
+ l === 2 ? e.set(a, t) : l === 3 ? e.add(t) : e[a] = t;
322
+ }
323
+ function Ta(e, a) {
324
+ return e === a ? e !== 0 || 1 / e === 1 / a : e !== e && a !== a;
325
+ }
326
+ function O(e) {
327
+ return e instanceof Map;
328
+ }
329
+ function $(e) {
330
+ return e instanceof Set;
331
+ }
332
+ function F(e) {
333
+ return e.copy_ || e.base_;
334
+ }
335
+ function re(e, a) {
336
+ if (O(e))
337
+ return new Map(e);
338
+ if ($(e))
339
+ return new Set(e);
340
+ if (Array.isArray(e))
341
+ return Array.prototype.slice.call(e);
342
+ const t = we(e);
343
+ if (a === !0 || a === "class_only" && !t) {
344
+ const l = Object.getOwnPropertyDescriptors(e);
345
+ delete l[A];
346
+ let i = Reflect.ownKeys(l);
347
+ for (let o = 0; o < i.length; o++) {
348
+ const r = i[o], d = l[r];
349
+ d.writable === !1 && (d.writable = !0, d.configurable = !0), (d.get || d.set) && (l[r] = {
350
+ configurable: !0,
351
+ writable: !0,
352
+ // could live with !!desc.set as well here...
353
+ enumerable: d.enumerable,
354
+ value: e[r]
355
+ });
356
+ }
357
+ return Object.create(w(e), l);
358
+ } else {
359
+ const l = w(e);
360
+ if (l !== null && t)
361
+ return { ...e };
362
+ const i = Object.create(l);
363
+ return Object.assign(i, e);
364
+ }
365
+ }
366
+ function se(e, a = !1) {
367
+ return Y(e) || W(e) || !y(e) || (j(e) > 1 && Object.defineProperties(e, {
368
+ set: { value: V },
369
+ add: { value: V },
370
+ clear: { value: V },
371
+ delete: { value: V }
372
+ }), Object.freeze(e), a && Object.values(e).forEach((t) => se(t, !0))), e;
373
+ }
374
+ function V() {
375
+ D(2);
376
+ }
377
+ function Y(e) {
378
+ return Object.isFrozen(e);
379
+ }
380
+ var ga = {};
381
+ function P(e) {
382
+ const a = ga[e];
383
+ return a || D(0, e), a;
384
+ }
385
+ var E;
386
+ function xe() {
387
+ return E;
388
+ }
389
+ function Ma(e, a) {
390
+ return {
391
+ drafts_: [],
392
+ parent_: e,
393
+ immer_: a,
394
+ // Whenever the modified draft contains a draft from another scope, we
395
+ // need to prevent auto-freezing so the unowned draft can be finalized.
396
+ canAutoFreeze_: !0,
397
+ unfinalizedDrafts_: 0
398
+ };
399
+ }
400
+ function he(e, a) {
401
+ a && (P("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = a);
402
+ }
403
+ function de(e) {
404
+ fe(e), e.drafts_.forEach(va), e.drafts_ = null;
405
+ }
406
+ function fe(e) {
407
+ e === E && (E = e.parent_);
408
+ }
409
+ function Se(e) {
410
+ return E = Ma(E, e);
411
+ }
412
+ function va(e) {
413
+ const a = e[A];
414
+ a.type_ === 0 || a.type_ === 1 ? a.revoke_() : a.revoked_ = !0;
415
+ }
416
+ function Ce(e, a) {
417
+ a.unfinalizedDrafts_ = a.drafts_.length;
418
+ const t = a.drafts_[0];
419
+ return e !== void 0 && e !== t ? (t[A].modified_ && (de(a), D(4)), y(e) && (e = J(a, e), a.parent_ || Z(a, e)), a.patches_ && P("Patches").generateReplacementPatches_(
420
+ t[A].base_,
421
+ e,
422
+ a.patches_,
423
+ a.inversePatches_
424
+ )) : e = J(a, t, []), de(a), a.patches_ && a.patchListener_(a.patches_, a.inversePatches_), e !== Pe ? e : void 0;
425
+ }
426
+ function J(e, a, t) {
427
+ if (Y(a))
428
+ return a;
429
+ const l = a[A];
430
+ if (!l)
431
+ return H(
432
+ a,
433
+ (i, o) => ze(e, l, a, i, o, t)
434
+ ), a;
435
+ if (l.scope_ !== e)
436
+ return a;
437
+ if (!l.modified_)
438
+ return Z(e, l.base_, !0), l.base_;
439
+ if (!l.finalized_) {
440
+ l.finalized_ = !0, l.scope_.unfinalizedDrafts_--;
441
+ const i = l.copy_;
442
+ let o = i, r = !1;
443
+ l.type_ === 3 && (o = new Set(i), i.clear(), r = !0), H(
444
+ o,
445
+ (d, f) => ze(e, l, i, d, f, t, r)
446
+ ), Z(e, i, !1), t && e.patches_ && P("Patches").generatePatches_(
447
+ l,
448
+ t,
449
+ e.patches_,
450
+ e.inversePatches_
451
+ );
452
+ }
453
+ return l.copy_;
454
+ }
455
+ function ze(e, a, t, l, i, o, r) {
456
+ if (process.env.NODE_ENV !== "production" && i === t && D(5), W(i)) {
457
+ const d = o && a && a.type_ !== 3 && // Set objects are atomic since they have no keys.
458
+ !oe(a.assigned_, l) ? o.concat(l) : void 0, f = J(e, i, d);
459
+ if (Ne(t, l, f), W(f))
460
+ e.canAutoFreeze_ = !1;
461
+ else
462
+ return;
463
+ } else r && t.add(i);
464
+ if (y(i) && !Y(i)) {
465
+ if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
466
+ return;
467
+ J(e, i), (!a || !a.scope_.parent_) && typeof l != "symbol" && (O(t) ? t.has(l) : Object.prototype.propertyIsEnumerable.call(t, l)) && Z(e, i);
468
+ }
469
+ }
470
+ function Z(e, a, t = !1) {
471
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && se(a, t);
472
+ }
473
+ function ha(e, a) {
474
+ const t = Array.isArray(e), l = {
475
+ type_: t ? 1 : 0,
476
+ // Track which produce call this is associated with.
477
+ scope_: a ? a.scope_ : xe(),
478
+ // True for both shallow and deep changes.
479
+ modified_: !1,
480
+ // Used during finalization.
481
+ finalized_: !1,
482
+ // Track which properties have been assigned (true) or deleted (false).
483
+ assigned_: {},
484
+ // The parent draft state.
485
+ parent_: a,
486
+ // The base state.
487
+ base_: e,
488
+ // The base proxy.
489
+ draft_: null,
490
+ // set below
491
+ // The base copy with any updated values.
492
+ copy_: null,
493
+ // Called by the `produce` function.
494
+ revoke_: null,
495
+ isManual_: !1
496
+ };
497
+ let i = l, o = ue;
498
+ t && (i = [l], o = _);
499
+ const { revoke: r, proxy: d } = Proxy.revocable(i, o);
500
+ return l.draft_ = d, l.revoke_ = r, d;
501
+ }
502
+ var ue = {
503
+ get(e, a) {
504
+ if (a === A)
505
+ return e;
506
+ const t = F(e);
507
+ if (!oe(t, a))
508
+ return Sa(e, t, a);
509
+ const l = t[a];
510
+ return e.finalized_ || !y(l) ? l : l === ee(e.base_, a) ? (ae(e), e.copy_[a] = ce(l, e)) : l;
511
+ },
512
+ has(e, a) {
513
+ return a in F(e);
514
+ },
515
+ ownKeys(e) {
516
+ return Reflect.ownKeys(F(e));
517
+ },
518
+ set(e, a, t) {
519
+ const l = Ee(F(e), a);
520
+ if (l?.set)
521
+ return l.set.call(e.draft_, t), !0;
522
+ if (!e.modified_) {
523
+ const i = ee(F(e), a), o = i?.[A];
524
+ if (o && o.base_ === t)
525
+ return e.copy_[a] = t, e.assigned_[a] = !1, !0;
526
+ if (Ta(t, i) && (t !== void 0 || oe(e.base_, a)))
527
+ return !0;
528
+ ae(e), be(e);
529
+ }
530
+ return e.copy_[a] === t && // special case: handle new props with value 'undefined'
531
+ (t !== void 0 || a in e.copy_) || // special case: NaN
532
+ Number.isNaN(t) && Number.isNaN(e.copy_[a]) || (e.copy_[a] = t, e.assigned_[a] = !0), !0;
533
+ },
534
+ deleteProperty(e, a) {
535
+ return ee(e.base_, a) !== void 0 || a in e.base_ ? (e.assigned_[a] = !1, ae(e), be(e)) : delete e.assigned_[a], e.copy_ && delete e.copy_[a], !0;
536
+ },
537
+ // Note: We never coerce `desc.value` into an Immer draft, because we can't make
538
+ // the same guarantee in ES5 mode.
539
+ getOwnPropertyDescriptor(e, a) {
540
+ const t = F(e), l = Reflect.getOwnPropertyDescriptor(t, a);
541
+ return l && {
542
+ writable: !0,
543
+ configurable: e.type_ !== 1 || a !== "length",
544
+ enumerable: l.enumerable,
545
+ value: t[a]
546
+ };
547
+ },
548
+ defineProperty() {
549
+ D(11);
550
+ },
551
+ getPrototypeOf(e) {
552
+ return w(e.base_);
553
+ },
554
+ setPrototypeOf() {
555
+ D(12);
556
+ }
557
+ }, _ = {};
558
+ H(ue, (e, a) => {
559
+ _[e] = function() {
560
+ return arguments[0] = arguments[0][0], a.apply(this, arguments);
561
+ };
562
+ });
563
+ _.deleteProperty = function(e, a) {
564
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(a)) && D(13), _.set.call(this, e, a, void 0);
565
+ };
566
+ _.set = function(e, a, t) {
567
+ return process.env.NODE_ENV !== "production" && a !== "length" && isNaN(parseInt(a)) && D(14), ue.set.call(this, e[0], a, t, e[0]);
568
+ };
569
+ function ee(e, a) {
570
+ const t = e[A];
571
+ return (t ? F(t) : e)[a];
572
+ }
573
+ function Sa(e, a, t) {
574
+ const l = Ee(a, t);
575
+ return l ? "value" in l ? l.value : (
576
+ // This is a very special case, if the prop is a getter defined by the
577
+ // prototype, we should invoke it with the draft as context!
578
+ l.get?.call(e.draft_)
579
+ ) : void 0;
580
+ }
581
+ function Ee(e, a) {
582
+ if (!(a in e))
583
+ return;
584
+ let t = w(e);
585
+ for (; t; ) {
586
+ const l = Object.getOwnPropertyDescriptor(t, a);
587
+ if (l)
588
+ return l;
589
+ t = w(t);
590
+ }
591
+ }
592
+ function be(e) {
593
+ e.modified_ || (e.modified_ = !0, e.parent_ && be(e.parent_));
594
+ }
595
+ function ae(e) {
596
+ e.copy_ || (e.copy_ = re(
597
+ e.base_,
598
+ e.scope_.immer_.useStrictShallowCopy_
599
+ ));
600
+ }
601
+ var Ca = class {
602
+ constructor(e) {
603
+ this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (a, t, l) => {
604
+ if (typeof a == "function" && typeof t != "function") {
605
+ const o = t;
606
+ t = a;
607
+ const r = this;
608
+ return function(f = o, ...c) {
609
+ return r.produce(f, (b) => t.call(this, b, ...c));
610
+ };
611
+ }
612
+ typeof t != "function" && D(6), l !== void 0 && typeof l != "function" && D(7);
613
+ let i;
614
+ if (y(a)) {
615
+ const o = Se(this), r = ce(a, void 0);
616
+ let d = !0;
617
+ try {
618
+ i = t(r), d = !1;
619
+ } finally {
620
+ d ? de(o) : fe(o);
621
+ }
622
+ return he(o, l), Ce(i, o);
623
+ } else if (!a || typeof a != "object") {
624
+ if (i = t(a), i === void 0 && (i = a), i === Pe && (i = void 0), this.autoFreeze_ && se(i, !0), l) {
625
+ const o = [], r = [];
626
+ P("Patches").generateReplacementPatches_(a, i, o, r), l(o, r);
627
+ }
628
+ return i;
629
+ } else
630
+ D(1, a);
631
+ }, this.produceWithPatches = (a, t) => {
632
+ if (typeof a == "function")
633
+ return (r, ...d) => this.produceWithPatches(r, (f) => a(f, ...d));
634
+ let l, i;
635
+ return [this.produce(a, t, (r, d) => {
636
+ l = r, i = d;
637
+ }), l, i];
638
+ }, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
639
+ }
640
+ createDraft(e) {
641
+ y(e) || D(8), W(e) && (e = _e(e));
642
+ const a = Se(this), t = ce(e, void 0);
643
+ return t[A].isManual_ = !0, fe(a), t;
644
+ }
645
+ finishDraft(e, a) {
646
+ const t = e && e[A];
647
+ (!t || !t.isManual_) && D(9);
648
+ const { scope_: l } = t;
649
+ return he(l, a), Ce(void 0, l);
650
+ }
651
+ /**
652
+ * Pass true to automatically freeze all copies created by Immer.
653
+ *
654
+ * By default, auto-freezing is enabled.
655
+ */
656
+ setAutoFreeze(e) {
657
+ this.autoFreeze_ = e;
658
+ }
659
+ /**
660
+ * Pass true to enable strict shallow copy.
661
+ *
662
+ * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
663
+ */
664
+ setUseStrictShallowCopy(e) {
665
+ this.useStrictShallowCopy_ = e;
666
+ }
667
+ applyPatches(e, a) {
668
+ let t;
669
+ for (t = a.length - 1; t >= 0; t--) {
670
+ const i = a[t];
671
+ if (i.path.length === 0 && i.op === "replace") {
672
+ e = i.value;
673
+ break;
674
+ }
675
+ }
676
+ t > -1 && (a = a.slice(t + 1));
677
+ const l = P("Patches").applyPatches_;
678
+ return W(e) ? l(e, a) : this.produce(
679
+ e,
680
+ (i) => l(i, a)
681
+ );
682
+ }
683
+ };
684
+ function ce(e, a) {
685
+ const t = O(e) ? P("MapSet").proxyMap_(e, a) : $(e) ? P("MapSet").proxySet_(e, a) : ha(e, a);
686
+ return (a ? a.scope_ : xe()).drafts_.push(t), t;
687
+ }
688
+ function _e(e) {
689
+ return W(e) || D(10, e), ke(e);
690
+ }
691
+ function ke(e) {
692
+ if (!y(e) || Y(e))
693
+ return e;
694
+ const a = e[A];
695
+ let t;
696
+ if (a) {
697
+ if (!a.modified_)
698
+ return a.base_;
699
+ a.finalized_ = !0, t = re(e, a.scope_.immer_.useStrictShallowCopy_);
700
+ } else
701
+ t = re(e, !0);
702
+ return H(t, (l, i) => {
703
+ Ne(t, l, ke(i));
704
+ }), a && (a.finalized_ = !1), t;
705
+ }
706
+ var za = new Ca(), Oe = za.produce;
707
+ function Ve(e) {
708
+ return ({ dispatch: t, getState: l }) => (i) => (o) => typeof o == "function" ? o(t, l, e) : i(o);
709
+ }
710
+ var pa = Ve(), Ga = Ve, La = typeof window < "u" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function() {
711
+ if (arguments.length !== 0)
712
+ return typeof arguments[0] == "object" ? Q : Q.apply(null, arguments);
713
+ }, Ke = (e) => e && typeof e.match == "function";
714
+ function x(e, a) {
715
+ function t(...l) {
716
+ if (a) {
717
+ let i = a(...l);
718
+ if (!i)
719
+ throw new Error(process.env.NODE_ENV === "production" ? M(0) : "prepareAction did not return an object");
720
+ return {
721
+ type: e,
722
+ payload: i.payload,
723
+ ..."meta" in i && {
724
+ meta: i.meta
725
+ },
726
+ ..."error" in i && {
727
+ error: i.error
728
+ }
729
+ };
730
+ }
731
+ return {
732
+ type: e,
733
+ payload: l[0]
734
+ };
735
+ }
736
+ return t.toString = () => `${e}`, t.type = e, t.match = (l) => We(l) && l.type === e, t;
737
+ }
738
+ function Da(e) {
739
+ return typeof e == "function" && "type" in e && // hasMatchFunction only wants Matchers but I don't see the point in rewriting it
740
+ Ke(e);
741
+ }
742
+ function Aa(e) {
743
+ const a = e ? `${e}`.split("/") : [], t = a[a.length - 1] || "actionCreator";
744
+ return `Detected an action creator with type "${e || "unknown"}" being dispatched.
745
+ Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${t}())\` instead of \`dispatch(${t})\`. This is necessary even if the action has no payload.`;
746
+ }
747
+ function Ba(e = {}) {
748
+ if (process.env.NODE_ENV === "production")
749
+ return () => (t) => (l) => t(l);
750
+ const {
751
+ isActionCreator: a = Da
752
+ } = e;
753
+ return () => (t) => (l) => (a(l) && console.warn(Aa(l.type)), t(l));
754
+ }
755
+ function Ue(e, a) {
756
+ let t = 0;
757
+ return {
758
+ measureTime(l) {
759
+ const i = Date.now();
760
+ try {
761
+ return l();
762
+ } finally {
763
+ const o = Date.now();
764
+ t += o - i;
765
+ }
766
+ },
767
+ warnIfExceeded() {
768
+ t > e && console.warn(`${a} took ${t}ms, which is more than the warning threshold of ${e}ms.
769
+ If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
770
+ It is disabled in production builds, so you don't need to worry about that.`);
771
+ }
772
+ };
773
+ }
774
+ var qe = class N extends Array {
775
+ constructor(...a) {
776
+ super(...a), Object.setPrototypeOf(this, N.prototype);
777
+ }
778
+ static get [Symbol.species]() {
779
+ return N;
780
+ }
781
+ concat(...a) {
782
+ return super.concat.apply(this, a);
783
+ }
784
+ prepend(...a) {
785
+ return a.length === 1 && Array.isArray(a[0]) ? new N(...a[0].concat(this)) : new N(...a.concat(this));
786
+ }
787
+ };
788
+ function pe(e) {
789
+ return y(e) ? Oe(e, () => {
790
+ }) : e;
791
+ }
792
+ function K(e, a, t) {
793
+ return e.has(a) ? e.get(a) : e.set(a, t(a)).get(a);
794
+ }
795
+ function ya(e) {
796
+ return typeof e != "object" || e == null || Object.isFrozen(e);
797
+ }
798
+ function Ia(e, a, t) {
799
+ const l = Qe(e, a, t);
800
+ return {
801
+ detectMutations() {
802
+ return He(e, a, l, t);
803
+ }
804
+ };
805
+ }
806
+ function Qe(e, a = [], t, l = "", i = /* @__PURE__ */ new Set()) {
807
+ const o = {
808
+ value: t
809
+ };
810
+ if (!e(t) && !i.has(t)) {
811
+ i.add(t), o.children = {};
812
+ for (const r in t) {
813
+ const d = l ? l + "." + r : r;
814
+ a.length && a.indexOf(d) !== -1 || (o.children[r] = Qe(e, a, t[r], d));
815
+ }
816
+ }
817
+ return o;
818
+ }
819
+ function He(e, a = [], t, l, i = !1, o = "") {
820
+ const r = t ? t.value : void 0, d = r === l;
821
+ if (i && !d && !Number.isNaN(l))
822
+ return {
823
+ wasMutated: !0,
824
+ path: o
825
+ };
826
+ if (e(r) || e(l))
827
+ return {
828
+ wasMutated: !1
829
+ };
830
+ const f = {};
831
+ for (let b in t.children)
832
+ f[b] = !0;
833
+ for (let b in l)
834
+ f[b] = !0;
835
+ const c = a.length > 0;
836
+ for (let b in f) {
837
+ const n = o ? o + "." + b : b;
838
+ if (c && a.some((g) => g instanceof RegExp ? g.test(n) : n === g))
839
+ continue;
840
+ const s = He(e, a, t.children[b], l[b], d, n);
841
+ if (s.wasMutated)
842
+ return s;
843
+ }
844
+ return {
845
+ wasMutated: !1
846
+ };
847
+ }
848
+ function Fa(e = {}) {
849
+ if (process.env.NODE_ENV === "production")
850
+ return () => (a) => (t) => a(t);
851
+ {
852
+ let a = function(d, f, c, b) {
853
+ return JSON.stringify(d, t(f, b), c);
854
+ }, t = function(d, f) {
855
+ let c = [], b = [];
856
+ return f || (f = function(n, s) {
857
+ return c[0] === s ? "[Circular ~]" : "[Circular ~." + b.slice(0, c.indexOf(s)).join(".") + "]";
858
+ }), function(n, s) {
859
+ if (c.length > 0) {
860
+ var u = c.indexOf(this);
861
+ ~u ? c.splice(u + 1) : c.push(this), ~u ? b.splice(u, 1 / 0, n) : b.push(n), ~c.indexOf(s) && (s = f.call(this, n, s));
862
+ } else c.push(s);
863
+ return d == null ? s : d.call(this, n, s);
864
+ };
865
+ }, {
866
+ isImmutable: l = ya,
867
+ ignoredPaths: i,
868
+ warnAfter: o = 32
869
+ } = e;
870
+ const r = Ia.bind(null, l, i);
871
+ return ({
872
+ getState: d
873
+ }) => {
874
+ let f = d(), c = r(f), b;
875
+ return (n) => (s) => {
876
+ const u = Ue(o, "ImmutableStateInvariantMiddleware");
877
+ u.measureTime(() => {
878
+ if (f = d(), b = c.detectMutations(), c = r(f), b.wasMutated)
879
+ throw new Error(process.env.NODE_ENV === "production" ? M(19) : `A state mutation was detected between dispatches, in the path '${b.path || ""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
880
+ });
881
+ const g = n(s);
882
+ return u.measureTime(() => {
883
+ if (f = d(), b = c.detectMutations(), c = r(f), b.wasMutated)
884
+ throw new Error(process.env.NODE_ENV === "production" ? M(20) : `A state mutation was detected inside a dispatch, in the path: ${b.path || ""}. Take a look at the reducer(s) handling the action ${a(s)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`);
885
+ }), u.warnIfExceeded(), g;
886
+ };
887
+ };
888
+ }
889
+ }
890
+ function Je(e) {
891
+ const a = typeof e;
892
+ return e == null || a === "string" || a === "boolean" || a === "number" || Array.isArray(e) || k(e);
893
+ }
894
+ function ne(e, a = "", t = Je, l, i = [], o) {
895
+ let r;
896
+ if (!t(e))
897
+ return {
898
+ keyPath: a || "<root>",
899
+ value: e
900
+ };
901
+ if (typeof e != "object" || e === null || o?.has(e)) return !1;
902
+ const d = l != null ? l(e) : Object.entries(e), f = i.length > 0;
903
+ for (const [c, b] of d) {
904
+ const n = a ? a + "." + c : c;
905
+ if (!(f && i.some((u) => u instanceof RegExp ? u.test(n) : n === u))) {
906
+ if (!t(b))
907
+ return {
908
+ keyPath: n,
909
+ value: b
910
+ };
911
+ if (typeof b == "object" && (r = ne(b, n, t, l, i, o), r))
912
+ return r;
913
+ }
914
+ }
915
+ return o && Ze(e) && o.add(e), !1;
916
+ }
917
+ function Ze(e) {
918
+ if (!Object.isFrozen(e)) return !1;
919
+ for (const a of Object.values(e))
920
+ if (!(typeof a != "object" || a === null) && !Ze(a))
921
+ return !1;
922
+ return !0;
923
+ }
924
+ function Ra(e = {}) {
925
+ if (process.env.NODE_ENV === "production")
926
+ return () => (a) => (t) => a(t);
927
+ {
928
+ const {
929
+ isSerializable: a = Je,
930
+ getEntries: t,
931
+ ignoredActions: l = [],
932
+ ignoredActionPaths: i = ["meta.arg", "meta.baseQueryMeta"],
933
+ ignoredPaths: o = [],
934
+ warnAfter: r = 32,
935
+ ignoreState: d = !1,
936
+ ignoreActions: f = !1,
937
+ disableCache: c = !1
938
+ } = e, b = !c && WeakSet ? /* @__PURE__ */ new WeakSet() : void 0;
939
+ return (n) => (s) => (u) => {
940
+ if (!We(u))
941
+ return s(u);
942
+ const g = s(u), S = Ue(r, "SerializableStateInvariantMiddleware");
943
+ return !f && !(l.length && l.indexOf(u.type) !== -1) && S.measureTime(() => {
944
+ const m = ne(u, "", a, t, i, b);
945
+ if (m) {
946
+ const {
947
+ keyPath: C,
948
+ value: G
949
+ } = m;
950
+ console.error(`A non-serializable value was detected in an action, in the path: \`${C}\`. Value:`, G, `
951
+ Take a look at the logic that dispatched this action: `, u, `
952
+ (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`, `
953
+ (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`);
954
+ }
955
+ }), d || (S.measureTime(() => {
956
+ const m = n.getState(), C = ne(m, "", a, t, o, b);
957
+ if (C) {
958
+ const {
959
+ keyPath: G,
960
+ value: T
961
+ } = C;
962
+ console.error(`A non-serializable value was detected in the state, in the path: \`${G}\`. Value:`, T, `
963
+ Take a look at the reducer(s) handling this action type: ${u.type}.
964
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`);
965
+ }
966
+ }), S.warnIfExceeded()), g;
967
+ };
968
+ }
969
+ }
970
+ function U(e) {
971
+ return typeof e == "boolean";
972
+ }
973
+ var Wa = () => function(a) {
974
+ const {
975
+ thunk: t = !0,
976
+ immutableCheck: l = !0,
977
+ serializableCheck: i = !0,
978
+ actionCreatorCheck: o = !0
979
+ } = a ?? {};
980
+ let r = new qe();
981
+ if (t && (U(t) ? r.push(pa) : r.push(Ga(t.extraArgument))), process.env.NODE_ENV !== "production") {
982
+ if (l) {
983
+ let d = {};
984
+ U(l) || (d = l), r.unshift(Fa(d));
985
+ }
986
+ if (i) {
987
+ let d = {};
988
+ U(i) || (d = i), r.push(Ra(d));
989
+ }
990
+ if (o) {
991
+ let d = {};
992
+ U(o) || (d = o), r.unshift(Ba(d));
993
+ }
994
+ }
995
+ return r;
996
+ }, Pa = "RTK_autoBatch", Ge = (e) => (a) => {
997
+ setTimeout(a, e);
998
+ }, wa = (e = {
999
+ type: "raf"
1000
+ }) => (a) => (...t) => {
1001
+ const l = a(...t);
1002
+ let i = !0, o = !1, r = !1;
1003
+ const d = /* @__PURE__ */ new Set(), f = e.type === "tick" ? queueMicrotask : e.type === "raf" ? (
1004
+ // requestAnimationFrame won't exist in SSR environments. Fall back to a vague approximation just to keep from erroring.
1005
+ typeof window < "u" && window.requestAnimationFrame ? window.requestAnimationFrame : Ge(10)
1006
+ ) : e.type === "callback" ? e.queueNotification : Ge(e.timeout), c = () => {
1007
+ r = !1, o && (o = !1, d.forEach((b) => b()));
1008
+ };
1009
+ return Object.assign({}, l, {
1010
+ // Override the base `store.subscribe` method to keep original listeners
1011
+ // from running if we're delaying notifications
1012
+ subscribe(b) {
1013
+ const n = () => i && b(), s = l.subscribe(n);
1014
+ return d.add(b), () => {
1015
+ s(), d.delete(b);
1016
+ };
1017
+ },
1018
+ // Override the base `store.dispatch` method so that we can check actions
1019
+ // for the `shouldAutoBatch` flag and determine if batching is active
1020
+ dispatch(b) {
1021
+ try {
1022
+ return i = !b?.meta?.[Pa], o = !i, o && (r || (r = !0, f(c))), l.dispatch(b);
1023
+ } finally {
1024
+ i = !0;
1025
+ }
1026
+ }
1027
+ });
1028
+ }, Na = (e) => function(t) {
1029
+ const {
1030
+ autoBatch: l = !0
1031
+ } = t ?? {};
1032
+ let i = new qe(e);
1033
+ return l && i.push(wa(typeof l == "object" ? l : void 0)), i;
1034
+ };
1035
+ function Mt(e) {
1036
+ const a = Wa(), {
1037
+ reducer: t = void 0,
1038
+ middleware: l,
1039
+ devTools: i = !0,
1040
+ duplicateMiddlewareCheck: o = !0,
1041
+ preloadedState: r = void 0,
1042
+ enhancers: d = void 0
1043
+ } = e || {};
1044
+ let f;
1045
+ if (typeof t == "function")
1046
+ f = t;
1047
+ else if (k(t))
1048
+ f = Re(t);
1049
+ else
1050
+ throw new Error(process.env.NODE_ENV === "production" ? M(1) : "`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");
1051
+ if (process.env.NODE_ENV !== "production" && l && typeof l != "function")
1052
+ throw new Error(process.env.NODE_ENV === "production" ? M(2) : "`middleware` field must be a callback");
1053
+ let c;
1054
+ if (typeof l == "function") {
1055
+ if (c = l(a), process.env.NODE_ENV !== "production" && !Array.isArray(c))
1056
+ throw new Error(process.env.NODE_ENV === "production" ? M(3) : "when using a middleware builder function, an array of middleware must be returned");
1057
+ } else
1058
+ c = a();
1059
+ if (process.env.NODE_ENV !== "production" && c.some((S) => typeof S != "function"))
1060
+ throw new Error(process.env.NODE_ENV === "production" ? M(4) : "each middleware provided to configureStore must be a function");
1061
+ if (process.env.NODE_ENV !== "production" && o) {
1062
+ let S = /* @__PURE__ */ new Set();
1063
+ c.forEach((m) => {
1064
+ if (S.has(m))
1065
+ throw new Error(process.env.NODE_ENV === "production" ? M(42) : "Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");
1066
+ S.add(m);
1067
+ });
1068
+ }
1069
+ let b = Q;
1070
+ i && (b = La({
1071
+ // Enable capture of stack traces for dispatched Redux actions
1072
+ trace: process.env.NODE_ENV !== "production",
1073
+ ...typeof i == "object" && i
1074
+ }));
1075
+ const n = sa(...c), s = Na(n);
1076
+ if (process.env.NODE_ENV !== "production" && d && typeof d != "function")
1077
+ throw new Error(process.env.NODE_ENV === "production" ? M(5) : "`enhancers` field must be a callback");
1078
+ let u = typeof d == "function" ? d(s) : s();
1079
+ if (process.env.NODE_ENV !== "production" && !Array.isArray(u))
1080
+ throw new Error(process.env.NODE_ENV === "production" ? M(6) : "`enhancers` callback must return an array");
1081
+ if (process.env.NODE_ENV !== "production" && u.some((S) => typeof S != "function"))
1082
+ throw new Error(process.env.NODE_ENV === "production" ? M(7) : "each enhancer provided to configureStore must be a function");
1083
+ process.env.NODE_ENV !== "production" && c.length && !u.includes(n) && console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");
1084
+ const g = b(...u);
1085
+ return Fe(f, r, g);
1086
+ }
1087
+ function je(e) {
1088
+ const a = {}, t = [];
1089
+ let l;
1090
+ const i = {
1091
+ addCase(o, r) {
1092
+ if (process.env.NODE_ENV !== "production") {
1093
+ if (t.length > 0)
1094
+ throw new Error(process.env.NODE_ENV === "production" ? M(26) : "`builder.addCase` should only be called before calling `builder.addMatcher`");
1095
+ if (l)
1096
+ throw new Error(process.env.NODE_ENV === "production" ? M(27) : "`builder.addCase` should only be called before calling `builder.addDefaultCase`");
1097
+ }
1098
+ const d = typeof o == "string" ? o : o.type;
1099
+ if (!d)
1100
+ throw new Error(process.env.NODE_ENV === "production" ? M(28) : "`builder.addCase` cannot be called with an empty action type");
1101
+ if (d in a)
1102
+ throw new Error(process.env.NODE_ENV === "production" ? M(29) : `\`builder.addCase\` cannot be called with two reducers for the same action type '${d}'`);
1103
+ return a[d] = r, i;
1104
+ },
1105
+ addAsyncThunk(o, r) {
1106
+ if (process.env.NODE_ENV !== "production" && l)
1107
+ throw new Error(process.env.NODE_ENV === "production" ? M(43) : "`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");
1108
+ return r.pending && (a[o.pending.type] = r.pending), r.rejected && (a[o.rejected.type] = r.rejected), r.fulfilled && (a[o.fulfilled.type] = r.fulfilled), r.settled && t.push({
1109
+ matcher: o.settled,
1110
+ reducer: r.settled
1111
+ }), i;
1112
+ },
1113
+ addMatcher(o, r) {
1114
+ if (process.env.NODE_ENV !== "production" && l)
1115
+ throw new Error(process.env.NODE_ENV === "production" ? M(30) : "`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
1116
+ return t.push({
1117
+ matcher: o,
1118
+ reducer: r
1119
+ }), i;
1120
+ },
1121
+ addDefaultCase(o) {
1122
+ if (process.env.NODE_ENV !== "production" && l)
1123
+ throw new Error(process.env.NODE_ENV === "production" ? M(31) : "`builder.addDefaultCase` can only be called once");
1124
+ return l = o, i;
1125
+ }
1126
+ };
1127
+ return e(i), [a, t, l];
1128
+ }
1129
+ function xa(e) {
1130
+ return typeof e == "function";
1131
+ }
1132
+ function Ea(e, a) {
1133
+ if (process.env.NODE_ENV !== "production" && typeof a == "object")
1134
+ throw new Error(process.env.NODE_ENV === "production" ? M(8) : "The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
1135
+ let [t, l, i] = je(a), o;
1136
+ if (xa(e))
1137
+ o = () => pe(e());
1138
+ else {
1139
+ const d = pe(e);
1140
+ o = () => d;
1141
+ }
1142
+ function r(d = o(), f) {
1143
+ let c = [t[f.type], ...l.filter(({
1144
+ matcher: b
1145
+ }) => b(f)).map(({
1146
+ reducer: b
1147
+ }) => b)];
1148
+ return c.filter((b) => !!b).length === 0 && (c = [i]), c.reduce((b, n) => {
1149
+ if (n)
1150
+ if (W(b)) {
1151
+ const u = n(b, f);
1152
+ return u === void 0 ? b : u;
1153
+ } else {
1154
+ if (y(b))
1155
+ return Oe(b, (s) => n(s, f));
1156
+ {
1157
+ const s = n(b, f);
1158
+ if (s === void 0) {
1159
+ if (b === null)
1160
+ return b;
1161
+ throw Error("A case reducer on a non-draftable value must not return undefined");
1162
+ }
1163
+ return s;
1164
+ }
1165
+ }
1166
+ return b;
1167
+ }, d);
1168
+ }
1169
+ return r.getInitialState = o, r;
1170
+ }
1171
+ var _a = (e, a) => Ke(e) ? e.match(a) : e(a);
1172
+ function ka(...e) {
1173
+ return (a) => e.some((t) => _a(t, a));
1174
+ }
1175
+ var Oa = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW", Va = (e = 21) => {
1176
+ let a = "", t = e;
1177
+ for (; t--; )
1178
+ a += Oa[Math.random() * 64 | 0];
1179
+ return a;
1180
+ }, Ka = ["name", "message", "stack", "code"], te = class {
1181
+ constructor(e, a) {
1182
+ this.payload = e, this.meta = a;
1183
+ }
1184
+ /*
1185
+ type-only property to distinguish between RejectWithValue and FulfillWithMeta
1186
+ does not exist at runtime
1187
+ */
1188
+ _type;
1189
+ }, Le = class {
1190
+ constructor(e, a) {
1191
+ this.payload = e, this.meta = a;
1192
+ }
1193
+ /*
1194
+ type-only property to distinguish between RejectWithValue and FulfillWithMeta
1195
+ does not exist at runtime
1196
+ */
1197
+ _type;
1198
+ }, Ua = (e) => {
1199
+ if (typeof e == "object" && e !== null) {
1200
+ const a = {};
1201
+ for (const t of Ka)
1202
+ typeof e[t] == "string" && (a[t] = e[t]);
1203
+ return a;
1204
+ }
1205
+ return {
1206
+ message: String(e)
1207
+ };
1208
+ }, De = "External signal was aborted", $e = /* @__PURE__ */ (() => {
1209
+ function e(a, t, l) {
1210
+ const i = x(a + "/fulfilled", (f, c, b, n) => ({
1211
+ payload: f,
1212
+ meta: {
1213
+ ...n || {},
1214
+ arg: b,
1215
+ requestId: c,
1216
+ requestStatus: "fulfilled"
1217
+ }
1218
+ })), o = x(a + "/pending", (f, c, b) => ({
1219
+ payload: void 0,
1220
+ meta: {
1221
+ ...b || {},
1222
+ arg: c,
1223
+ requestId: f,
1224
+ requestStatus: "pending"
1225
+ }
1226
+ })), r = x(a + "/rejected", (f, c, b, n, s) => ({
1227
+ payload: n,
1228
+ error: (l && l.serializeError || Ua)(f || "Rejected"),
1229
+ meta: {
1230
+ ...s || {},
1231
+ arg: b,
1232
+ requestId: c,
1233
+ rejectedWithValue: !!n,
1234
+ requestStatus: "rejected",
1235
+ aborted: f?.name === "AbortError",
1236
+ condition: f?.name === "ConditionError"
1237
+ }
1238
+ }));
1239
+ function d(f, {
1240
+ signal: c
1241
+ } = {}) {
1242
+ return (b, n, s) => {
1243
+ const u = l?.idGenerator ? l.idGenerator(f) : Va(), g = new AbortController();
1244
+ let S, m;
1245
+ function C(T) {
1246
+ m = T, g.abort();
1247
+ }
1248
+ c && (c.aborted ? C(De) : c.addEventListener("abort", () => C(De), {
1249
+ once: !0
1250
+ }));
1251
+ const G = (async function() {
1252
+ let T;
1253
+ try {
1254
+ let v = l?.condition?.(f, {
1255
+ getState: n,
1256
+ extra: s
1257
+ });
1258
+ if (Qa(v) && (v = await v), v === !1 || g.signal.aborted)
1259
+ throw {
1260
+ name: "ConditionError",
1261
+ message: "Aborted due to condition callback returning false."
1262
+ };
1263
+ const B = new Promise((z, p) => {
1264
+ S = () => {
1265
+ p({
1266
+ name: "AbortError",
1267
+ message: m || "Aborted"
1268
+ });
1269
+ }, g.signal.addEventListener("abort", S);
1270
+ });
1271
+ b(o(u, f, l?.getPendingMeta?.({
1272
+ requestId: u,
1273
+ arg: f
1274
+ }, {
1275
+ getState: n,
1276
+ extra: s
1277
+ }))), T = await Promise.race([B, Promise.resolve(t(f, {
1278
+ dispatch: b,
1279
+ getState: n,
1280
+ extra: s,
1281
+ requestId: u,
1282
+ signal: g.signal,
1283
+ abort: C,
1284
+ rejectWithValue: (z, p) => new te(z, p),
1285
+ fulfillWithValue: (z, p) => new Le(z, p)
1286
+ })).then((z) => {
1287
+ if (z instanceof te)
1288
+ throw z;
1289
+ return z instanceof Le ? i(z.payload, u, f, z.meta) : i(z, u, f);
1290
+ })]);
1291
+ } catch (v) {
1292
+ T = v instanceof te ? r(null, u, f, v.payload, v.meta) : r(v, u, f);
1293
+ } finally {
1294
+ S && g.signal.removeEventListener("abort", S);
1295
+ }
1296
+ return l && !l.dispatchConditionRejection && r.match(T) && T.meta.condition || b(T), T;
1297
+ })();
1298
+ return Object.assign(G, {
1299
+ abort: C,
1300
+ requestId: u,
1301
+ arg: f,
1302
+ unwrap() {
1303
+ return G.then(qa);
1304
+ }
1305
+ });
1306
+ };
1307
+ }
1308
+ return Object.assign(d, {
1309
+ pending: o,
1310
+ rejected: r,
1311
+ fulfilled: i,
1312
+ settled: ka(r, i),
1313
+ typePrefix: a
1314
+ });
1315
+ }
1316
+ return e.withTypes = () => e, e;
1317
+ })();
1318
+ function qa(e) {
1319
+ if (e.meta && e.meta.rejectedWithValue)
1320
+ throw e.payload;
1321
+ if (e.error)
1322
+ throw e.error;
1323
+ return e.payload;
1324
+ }
1325
+ function Qa(e) {
1326
+ return e !== null && typeof e == "object" && typeof e.then == "function";
1327
+ }
1328
+ var Ha = /* @__PURE__ */ Symbol.for("rtk-slice-createasyncthunk");
1329
+ function Ja(e, a) {
1330
+ return `${e}/${a}`;
1331
+ }
1332
+ function Za({
1333
+ creators: e
1334
+ } = {}) {
1335
+ const a = e?.asyncThunk?.[Ha];
1336
+ return function(l) {
1337
+ const {
1338
+ name: i,
1339
+ reducerPath: o = i
1340
+ } = l;
1341
+ if (!i)
1342
+ throw new Error(process.env.NODE_ENV === "production" ? M(11) : "`name` is a required option for createSlice");
1343
+ typeof process < "u" && process.env.NODE_ENV === "development" && l.initialState === void 0 && console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
1344
+ const r = (typeof l.reducers == "function" ? l.reducers($a()) : l.reducers) || {}, d = Object.keys(r), f = {
1345
+ sliceCaseReducersByName: {},
1346
+ sliceCaseReducersByType: {},
1347
+ actionCreators: {},
1348
+ sliceMatchers: []
1349
+ }, c = {
1350
+ addCase(T, h) {
1351
+ const v = typeof T == "string" ? T : T.type;
1352
+ if (!v)
1353
+ throw new Error(process.env.NODE_ENV === "production" ? M(12) : "`context.addCase` cannot be called with an empty action type");
1354
+ if (v in f.sliceCaseReducersByType)
1355
+ throw new Error(process.env.NODE_ENV === "production" ? M(13) : "`context.addCase` cannot be called with two reducers for the same action type: " + v);
1356
+ return f.sliceCaseReducersByType[v] = h, c;
1357
+ },
1358
+ addMatcher(T, h) {
1359
+ return f.sliceMatchers.push({
1360
+ matcher: T,
1361
+ reducer: h
1362
+ }), c;
1363
+ },
1364
+ exposeAction(T, h) {
1365
+ return f.actionCreators[T] = h, c;
1366
+ },
1367
+ exposeCaseReducer(T, h) {
1368
+ return f.sliceCaseReducersByName[T] = h, c;
1369
+ }
1370
+ };
1371
+ d.forEach((T) => {
1372
+ const h = r[T], v = {
1373
+ reducerName: T,
1374
+ type: Ja(i, T),
1375
+ createNotation: typeof l.reducers == "function"
1376
+ };
1377
+ Xa(h) ? at(v, h, c, a) : Ya(v, h, c);
1378
+ });
1379
+ function b() {
1380
+ if (process.env.NODE_ENV !== "production" && typeof l.extraReducers == "object")
1381
+ throw new Error(process.env.NODE_ENV === "production" ? M(14) : "The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
1382
+ const [T = {}, h = [], v = void 0] = typeof l.extraReducers == "function" ? je(l.extraReducers) : [l.extraReducers], B = {
1383
+ ...T,
1384
+ ...f.sliceCaseReducersByType
1385
+ };
1386
+ return Ea(l.initialState, (z) => {
1387
+ for (let p in B)
1388
+ z.addCase(p, B[p]);
1389
+ for (let p of f.sliceMatchers)
1390
+ z.addMatcher(p.matcher, p.reducer);
1391
+ for (let p of h)
1392
+ z.addMatcher(p.matcher, p.reducer);
1393
+ v && z.addDefaultCase(v);
1394
+ });
1395
+ }
1396
+ const n = (T) => T, s = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new WeakMap();
1397
+ let g;
1398
+ function S(T, h) {
1399
+ return g || (g = b()), g(T, h);
1400
+ }
1401
+ function m() {
1402
+ return g || (g = b()), g.getInitialState();
1403
+ }
1404
+ function C(T, h = !1) {
1405
+ function v(z) {
1406
+ let p = z[T];
1407
+ if (typeof p > "u") {
1408
+ if (h)
1409
+ p = K(u, v, m);
1410
+ else if (process.env.NODE_ENV !== "production")
1411
+ throw new Error(process.env.NODE_ENV === "production" ? M(15) : "selectSlice returned undefined for an uninjected slice reducer");
1412
+ }
1413
+ return p;
1414
+ }
1415
+ function B(z = n) {
1416
+ const p = K(s, h, () => /* @__PURE__ */ new WeakMap());
1417
+ return K(p, z, () => {
1418
+ const Te = {};
1419
+ for (const [ta, la] of Object.entries(l.selectors ?? {}))
1420
+ Te[ta] = ja(la, z, () => K(u, z, m), h);
1421
+ return Te;
1422
+ });
1423
+ }
1424
+ return {
1425
+ reducerPath: T,
1426
+ getSelectors: B,
1427
+ get selectors() {
1428
+ return B(v);
1429
+ },
1430
+ selectSlice: v
1431
+ };
1432
+ }
1433
+ const G = {
1434
+ name: i,
1435
+ reducer: S,
1436
+ actions: f.actionCreators,
1437
+ caseReducers: f.sliceCaseReducersByName,
1438
+ getInitialState: m,
1439
+ ...C(o),
1440
+ injectInto(T, {
1441
+ reducerPath: h,
1442
+ ...v
1443
+ } = {}) {
1444
+ const B = h ?? o;
1445
+ return T.inject({
1446
+ reducerPath: B,
1447
+ reducer: S
1448
+ }, v), {
1449
+ ...G,
1450
+ ...C(B, !0)
1451
+ };
1452
+ }
1453
+ };
1454
+ return G;
1455
+ };
1456
+ }
1457
+ function ja(e, a, t, l) {
1458
+ function i(o, ...r) {
1459
+ let d = a(o);
1460
+ if (typeof d > "u") {
1461
+ if (l)
1462
+ d = t();
1463
+ else if (process.env.NODE_ENV !== "production")
1464
+ throw new Error(process.env.NODE_ENV === "production" ? M(16) : "selectState returned undefined for an uninjected slice reducer");
1465
+ }
1466
+ return e(d, ...r);
1467
+ }
1468
+ return i.unwrapped = e, i;
1469
+ }
1470
+ var me = /* @__PURE__ */ Za();
1471
+ function $a() {
1472
+ function e(a, t) {
1473
+ return {
1474
+ _reducerDefinitionType: "asyncThunk",
1475
+ payloadCreator: a,
1476
+ ...t
1477
+ };
1478
+ }
1479
+ return e.withTypes = () => e, {
1480
+ reducer(a) {
1481
+ return Object.assign({
1482
+ // hack so the wrapping function has the same name as the original
1483
+ // we need to create a wrapper so the `reducerDefinitionType` is not assigned to the original
1484
+ [a.name](...t) {
1485
+ return a(...t);
1486
+ }
1487
+ }[a.name], {
1488
+ _reducerDefinitionType: "reducer"
1489
+ /* reducer */
1490
+ });
1491
+ },
1492
+ preparedReducer(a, t) {
1493
+ return {
1494
+ _reducerDefinitionType: "reducerWithPrepare",
1495
+ prepare: a,
1496
+ reducer: t
1497
+ };
1498
+ },
1499
+ asyncThunk: e
1500
+ };
1501
+ }
1502
+ function Ya({
1503
+ type: e,
1504
+ reducerName: a,
1505
+ createNotation: t
1506
+ }, l, i) {
1507
+ let o, r;
1508
+ if ("reducer" in l) {
1509
+ if (t && !et(l))
1510
+ throw new Error(process.env.NODE_ENV === "production" ? M(17) : "Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");
1511
+ o = l.reducer, r = l.prepare;
1512
+ } else
1513
+ o = l;
1514
+ i.addCase(e, o).exposeCaseReducer(a, o).exposeAction(a, r ? x(e, r) : x(e));
1515
+ }
1516
+ function Xa(e) {
1517
+ return e._reducerDefinitionType === "asyncThunk";
1518
+ }
1519
+ function et(e) {
1520
+ return e._reducerDefinitionType === "reducerWithPrepare";
1521
+ }
1522
+ function at({
1523
+ type: e,
1524
+ reducerName: a
1525
+ }, t, l, i) {
1526
+ if (!i)
1527
+ throw new Error(process.env.NODE_ENV === "production" ? M(18) : "Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");
1528
+ const {
1529
+ payloadCreator: o,
1530
+ fulfilled: r,
1531
+ pending: d,
1532
+ rejected: f,
1533
+ settled: c,
1534
+ options: b
1535
+ } = t, n = i(e, o, b);
1536
+ l.exposeAction(a, n), r && l.addCase(n.fulfilled, r), d && l.addCase(n.pending, d), f && l.addCase(n.rejected, f), c && l.addMatcher(n.settled, c), l.exposeCaseReducer(a, {
1537
+ fulfilled: r || q,
1538
+ pending: d || q,
1539
+ rejected: f || q,
1540
+ settled: c || q
1541
+ });
1542
+ }
1543
+ function q() {
1544
+ }
1545
+ function M(e) {
1546
+ return `Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `;
1547
+ }
1548
+ const tt = {
1549
+ Finish: "Material",
1550
+ Color: "Color",
1551
+ Look: "Look"
1552
+ }, lt = (e, a) => e.toLowerCase() === a.toLowerCase();
1553
+ class Ae {
1554
+ static getMaterialsValuesFromOptions(a) {
1555
+ if (a.length)
1556
+ return a.reduce((t, l) => {
1557
+ if (Array.isArray(l.values) && l.values.length) {
1558
+ const i = l.metadata?.Name ?? l.metadata?.Label ?? "without_name", o = l.values.map((r) => ({
1559
+ ...r,
1560
+ parentName: i
1561
+ }));
1562
+ t.push(...o);
1563
+ }
1564
+ return t;
1565
+ }, []).sort((t, l) => {
1566
+ const i = t.name?.toLowerCase() ?? "", o = l.name?.toLowerCase() ?? "";
1567
+ return i.localeCompare(o);
1568
+ });
1569
+ }
1570
+ static getUniqueByAssetId(a) {
1571
+ const t = /* @__PURE__ */ new Set();
1572
+ return a.filter((l) => t.has(l.assetId) ? !1 : (t.add(l.assetId), !0));
1573
+ }
1574
+ static normalizeToArray(a, t = !0) {
1575
+ return a ? Array.isArray(a) ? a.map((l) => l.trim()).filter(Boolean) : (t ? a.split(",") : [a]).map((l) => l.trim()).filter(Boolean) : [];
1576
+ }
1577
+ // Get all selected filters and their count
1578
+ static mapFiltersFromValues(a, t) {
1579
+ return Object.keys(t).map((l) => {
1580
+ const i = tt[l], r = t[l].map((d) => {
1581
+ let f = 0;
1582
+ for (const c of a) {
1583
+ const b = Array.isArray(c.values) ? c.values : [];
1584
+ for (const n of b) {
1585
+ const s = this.normalizeToArray(n.metadata?.[i]);
1586
+ f += s.filter((u) => lt(u, d)).length;
1587
+ }
1588
+ }
1589
+ return { filterKey: d, filterCount: f };
1590
+ });
1591
+ return { filterType: l, filters: r };
1592
+ });
1593
+ }
1594
+ // Get filters with a positive count
1595
+ static getPositiveSelectedFilers(a) {
1596
+ return a.map((t) => ({
1597
+ filterName: t.filterType,
1598
+ filterKeys: t.filters.filter((l) => l.filterCount !== 0).map((l) => l.filterKey)
1599
+ })).filter((t) => t.filterKeys.length > 0);
1600
+ }
1601
+ }
1602
+ const it = (e) => Array.from(new Set(e)), Ye = [
2
1603
  {
3
1604
  id: "1c3f582f-723e-4611-8864-b2ecd7a5f3fa",
4
1605
  type: "Asset",
@@ -13331,7 +14932,316 @@ const a = [
13331
14932
  disabledValues: [],
13332
14933
  value: ""
13333
14934
  }
13334
- ];
14935
+ ], ot = {
14936
+ name: "mock_product",
14937
+ categories: [],
14938
+ productId: 999,
14939
+ attributes: Ye
14940
+ }, vt = {
14941
+ name: "All",
14942
+ value: "",
14943
+ productId: 0,
14944
+ items: []
14945
+ }, Be = [
14946
+ "Kitchen",
14947
+ "Bathroom",
14948
+ "Outdoor",
14949
+ "Office",
14950
+ "Furniture",
14951
+ "Lighting",
14952
+ "Decor",
14953
+ "Electronics",
14954
+ "Appliances",
14955
+ "Storage",
14956
+ "Garden",
14957
+ "Bedroom",
14958
+ "Living Room",
14959
+ "Tools",
14960
+ "Accessories",
14961
+ "Hardware",
14962
+ "Flooring",
14963
+ "Paint",
14964
+ "Home Decor",
14965
+ "Smart Home"
14966
+ ], rt = (e = 100) => {
14967
+ const a = [];
14968
+ for (let t = 1; t <= e; t++) {
14969
+ const l = Math.floor(Math.random() * 4) + 1, i = Array.from(
14970
+ { length: l },
14971
+ () => Be[Math.floor(Math.random() * Be.length)]
14972
+ ), o = Array.from(new Set(i));
14973
+ a.push({
14974
+ name: `product-${t}`,
14975
+ categories: o,
14976
+ productId: t,
14977
+ attributes: Ye
14978
+ });
14979
+ }
14980
+ return a;
14981
+ }, dt = () => new Promise((e) => {
14982
+ setTimeout(() => {
14983
+ e(rt(100));
14984
+ }, 400);
14985
+ }), ft = ({
14986
+ productId: e,
14987
+ productName: a
14988
+ }) => new Promise((t) => {
14989
+ setTimeout(() => {
14990
+ t({ ...ot, productId: e, name: a });
14991
+ }, 400);
14992
+ }), le = $e("multiProducts/getProductListThunk", async (e, { rejectWithValue: a }) => {
14993
+ try {
14994
+ return await dt();
14995
+ } catch (t) {
14996
+ return console.error(t.message), a(t.message);
14997
+ }
14998
+ }), ht = $e(
14999
+ "multiProducts/getSelectedProductThunk",
15000
+ async ({ productId: e, productName: a }, { rejectWithValue: t }) => {
15001
+ try {
15002
+ return await ft({ productId: e, productName: a });
15003
+ } catch (l) {
15004
+ return console.error(l.message), t(l.message);
15005
+ }
15006
+ }
15007
+ ), bt = {
15008
+ isOpenSidebar: !0,
15009
+ listAttributes: [],
15010
+ productElementOptions: [],
15011
+ materialSelectState: { Finish: [], Color: [], Look: [] },
15012
+ allMaterialsValues: [],
15013
+ selectedMaterials: [],
15014
+ productList: [],
15015
+ isLoadingProductList: !1,
15016
+ selectedProduct: null,
15017
+ isLoadingSelectedProduct: !1,
15018
+ isOpenMultiProductCart: !1
15019
+ }, Xe = me({
15020
+ name: "swatches",
15021
+ initialState: bt,
15022
+ reducers: {
15023
+ toggleSidebar: (e) => {
15024
+ e.isOpenSidebar = !e.isOpenSidebar;
15025
+ },
15026
+ setMaterialSelect(e, a) {
15027
+ const { filterName: t, values: l } = a.payload;
15028
+ if (l.length === 0) {
15029
+ e.materialSelectState[t] = [];
15030
+ return;
15031
+ }
15032
+ e.materialSelectState[t] = it(l);
15033
+ },
15034
+ setPanelFilter(e, a) {
15035
+ const t = a.payload.attributes;
15036
+ if (t.length) {
15037
+ const l = Ae.getMaterialsValuesFromOptions(t);
15038
+ l?.length && (e.allMaterialsValues = Ae.getUniqueByAssetId(
15039
+ l
15040
+ ));
15041
+ }
15042
+ },
15043
+ clearMaterialFilter: (e, a) => {
15044
+ e.materialSelectState[a.payload] = [];
15045
+ },
15046
+ clearAllMaterialFilters: (e) => {
15047
+ e.materialSelectState = { Finish: [], Color: [], Look: [] };
15048
+ },
15049
+ setAllMaterialsOptions: (e, a) => {
15050
+ const { allMaterialValues: t, productElementOptions: l } = a.payload;
15051
+ t?.length && (e.allMaterialsValues = t), l?.length && (e.productElementOptions = l);
15052
+ },
15053
+ setSelectedMaterials(e, a) {
15054
+ const { selectedMaterial: t } = a.payload;
15055
+ if (!t) return;
15056
+ const l = _e(e.selectedMaterials), i = (r) => r.metadata?.label === t.metadata?.label && r.parentName === t.parentName;
15057
+ l.some(i) ? e.selectedMaterials = l.filter((r) => !i(r)) : l.length < 5 && (e.selectedMaterials = [...l, t]);
15058
+ },
15059
+ resetSelectedMaterials(e) {
15060
+ e.selectedMaterials = [];
15061
+ },
15062
+ setSelectedProduct(e, a) {
15063
+ e.selectedProduct = a.payload;
15064
+ },
15065
+ deleteSelectedProduct(e) {
15066
+ e.selectedProduct = null;
15067
+ },
15068
+ setIsOpenMultiProductCart(e, a) {
15069
+ e.isOpenMultiProductCart = a.payload;
15070
+ }
15071
+ },
15072
+ extraReducers: (e) => {
15073
+ e.addCase(le.pending, (a) => {
15074
+ a.isLoadingProductList = !0;
15075
+ }).addCase(le.fulfilled, (a, t) => {
15076
+ a.productList = t.payload, a.isLoadingProductList = !1;
15077
+ }).addCase(le.rejected, (a) => {
15078
+ a.isLoadingProductList = !1;
15079
+ });
15080
+ }
15081
+ }), ct = Xe.reducer, {
15082
+ // setListAttributes,
15083
+ setMaterialSelect: St,
15084
+ setAllMaterialsOptions: Ct,
15085
+ setPanelFilter: zt,
15086
+ setSelectedMaterials: pt,
15087
+ toggleSidebar: Gt,
15088
+ clearMaterialFilter: Lt,
15089
+ clearAllMaterialFilters: Dt,
15090
+ setSelectedProduct: At,
15091
+ deleteSelectedProduct: Bt,
15092
+ setIsOpenMultiProductCart: yt,
15093
+ resetSelectedMaterials: It
15094
+ } = Xe.actions, ye = 5, nt = { items: [] }, st = (e) => e.reduce((a, t) => a + t.count, 0), ea = me({
15095
+ name: "cart",
15096
+ initialState: nt,
15097
+ reducers: {
15098
+ setCartItems(e, a) {
15099
+ e.items = a.payload;
15100
+ },
15101
+ removeItem(e, a) {
15102
+ const { metadata: t, parentName: l } = a.payload.selectedMaterial;
15103
+ e.items = e.items.filter(
15104
+ (i) => !(i.metadata.label === t.label && i.parentName === l)
15105
+ );
15106
+ },
15107
+ increment(e, a) {
15108
+ const { metadata: t, parentName: l } = a.payload.selectedMaterial, i = e.items.find(
15109
+ (o) => o.metadata.label === t.label && o.parentName === l
15110
+ );
15111
+ i && st(e.items) < ye && (i.count += 1);
15112
+ },
15113
+ decrement(e, a) {
15114
+ const { metadata: t, parentName: l } = a.payload.selectedMaterial, i = e.items.find(
15115
+ (o) => o.metadata.label === t.label && o.parentName === l
15116
+ );
15117
+ i && i.count > 1 && (i.count -= 1);
15118
+ },
15119
+ setCount(e, a) {
15120
+ const { metadata: t, parentName: l } = a.payload.selectedMaterial, { next: i } = a.payload, o = e.items.find(
15121
+ (c) => c.metadata.label === t.label && c.parentName === l
15122
+ );
15123
+ if (!o) return;
15124
+ const r = Math.max(1, Math.floor(i)), d = e.items.filter(
15125
+ (c) => !(c.metadata.label === t.label && c.parentName === l)
15126
+ ).reduce((c, b) => c + b.count, 0), f = Math.max(1, ye - d);
15127
+ o.count = Math.min(r, f);
15128
+ },
15129
+ clear(e) {
15130
+ e.items = [];
15131
+ }
15132
+ }
15133
+ }), {
15134
+ setCartItems: Ft,
15135
+ removeItem: Rt,
15136
+ increment: Wt,
15137
+ decrement: Pt,
15138
+ setCount: wt,
15139
+ clear: Nt
15140
+ } = ea.actions, ut = ea.reducer, mt = { items: [], activeMultiCartProduct: null };
15141
+ function Tt(e, a, t) {
15142
+ let l = e.items.find((i) => i.productId === a);
15143
+ return l ? t && !l.name && (l.name = t) : (l = { productId: a, name: t ?? "", items: [] }, e.items.push(l)), l;
15144
+ }
15145
+ const ie = (e, a) => e.items.findIndex((t) => t.productId === a), Ie = (e, a, t, l) => a === -1 ? -1 : e.items[a].items.findIndex(
15146
+ (i) => i.metadata.label === t && i.parentName === l
15147
+ ), aa = me({
15148
+ name: "multiProduct",
15149
+ initialState: mt,
15150
+ reducers: {
15151
+ setCartForProduct(e, a) {
15152
+ const { productId: t } = a.payload, l = e.items.findIndex((i) => i.productId === t);
15153
+ l >= 0 ? e.items[l] = a.payload : e.items.push(a.payload);
15154
+ },
15155
+ setActiveMultiCartProduct(e, a) {
15156
+ e.activeMultiCartProduct = a.payload;
15157
+ },
15158
+ // setCartItems(
15159
+ // state,
15160
+ // action: PayloadAction<{
15161
+ // productId: number;
15162
+ // items: ICartItem[];
15163
+ // name?: string;
15164
+ // }>,
15165
+ // ) {
15166
+ // const { productId, items, name } = action.payload;
15167
+ // const bucket = ensureProduct(state, productId, name);
15168
+ // bucket.items = items;
15169
+ // },
15170
+ setCartItems(e, a) {
15171
+ const { productId: t, items: l, name: i } = a.payload;
15172
+ if (!l || l.length === 0) {
15173
+ const r = e.items.findIndex((d) => d.productId === t);
15174
+ r !== -1 && e.items.splice(r, 1);
15175
+ return;
15176
+ }
15177
+ const o = Tt(e, t, i);
15178
+ o.items = l;
15179
+ },
15180
+ incrementMultiProductItem(e, a) {
15181
+ const { productId: t, label: l, parentName: i } = a.payload, o = ie(e, t), r = Ie(e, o, l, i);
15182
+ r !== -1 && (e.items[o].items[r].count += 1);
15183
+ },
15184
+ decrementMultiProductItem(e, a) {
15185
+ const { productId: t, label: l, parentName: i } = a.payload, o = ie(e, t), r = Ie(e, o, l, i);
15186
+ if (r !== -1) {
15187
+ const d = e.items[o].items[r];
15188
+ d.count > 1 && (d.count -= 1);
15189
+ }
15190
+ },
15191
+ removeMultiProductItem(e, a) {
15192
+ const { productId: t, label: l, parentName: i } = a.payload, o = ie(e, t);
15193
+ if (o === -1) return;
15194
+ const r = e.items[o].items.filter(
15195
+ (d) => !(d.metadata.label === l && d.parentName === i)
15196
+ );
15197
+ e.items[o].items = r;
15198
+ },
15199
+ clear(e) {
15200
+ e.items = [];
15201
+ }
15202
+ }
15203
+ }), {
15204
+ setCartForProduct: xt,
15205
+ setCartItems: Et,
15206
+ incrementMultiProductItem: _t,
15207
+ decrementMultiProductItem: kt,
15208
+ removeMultiProductItem: Ot,
15209
+ clear: Vt,
15210
+ setActiveMultiCartProduct: Kt
15211
+ } = aa.actions, gt = aa.reducer, Ut = Re({
15212
+ swatches: ct,
15213
+ cart: ut,
15214
+ multiProductCart: gt
15215
+ });
13335
15216
  export {
13336
- a as MOCK_ROW_PROPS_ATTRIBUTES
15217
+ Rt as A,
15218
+ Ut as B,
15219
+ vt as M,
15220
+ Ae as S,
15221
+ ut as a,
15222
+ Mt as b,
15223
+ Re as c,
15224
+ Kt as d,
15225
+ ye as e,
15226
+ yt as f,
15227
+ kt as g,
15228
+ pt as h,
15229
+ _t as i,
15230
+ ht as j,
15231
+ At as k,
15232
+ It as l,
15233
+ gt as m,
15234
+ Ct as n,
15235
+ le as o,
15236
+ St as p,
15237
+ zt as q,
15238
+ Ot as r,
15239
+ ct as s,
15240
+ Gt as t,
15241
+ it as u,
15242
+ Et as v,
15243
+ Bt as w,
15244
+ Ft as x,
15245
+ Pt as y,
15246
+ Wt as z
13337
15247
  };