@mhmo91/schmancy 0.2.139 → 0.2.142

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 (277) hide show
  1. package/dist/{animated-text-D5Ki7KHu.js → animated-text-CWRnkzJa.js} +3 -3
  2. package/dist/{animated-text-D5Ki7KHu.js.map → animated-text-CWRnkzJa.js.map} +1 -1
  3. package/dist/{animated-text-BNbldkLi.cjs → animated-text-UjA34w-f.cjs} +2 -2
  4. package/dist/{animated-text-BNbldkLi.cjs.map → animated-text-UjA34w-f.cjs.map} +1 -1
  5. package/dist/animated-text.cjs +1 -1
  6. package/dist/animated-text.js +1 -1
  7. package/dist/area.cjs +1 -1
  8. package/dist/{area.component-Bm6rP9MT.cjs → area.component-BEDtgjNb.cjs} +2 -2
  9. package/dist/{area.component-Bm6rP9MT.cjs.map → area.component-BEDtgjNb.cjs.map} +1 -1
  10. package/dist/{area.component-D8b2RJic.js → area.component-BzuHoeHG.js} +3 -3
  11. package/dist/{area.component-D8b2RJic.js.map → area.component-BzuHoeHG.js.map} +1 -1
  12. package/dist/area.js +1 -1
  13. package/dist/{autocomplete-BAvxzIpj.js → autocomplete-B3W-MX_R.js} +3 -3
  14. package/dist/{autocomplete-BAvxzIpj.js.map → autocomplete-B3W-MX_R.js.map} +1 -1
  15. package/dist/{autocomplete-nZaZaU-s.cjs → autocomplete-CtqM8VN6.cjs} +2 -2
  16. package/dist/{autocomplete-nZaZaU-s.cjs.map → autocomplete-CtqM8VN6.cjs.map} +1 -1
  17. package/dist/autocomplete.cjs +1 -1
  18. package/dist/autocomplete.js +1 -1
  19. package/dist/busy.cjs +1 -1
  20. package/dist/busy.js +1 -1
  21. package/dist/button.cjs +1 -1
  22. package/dist/button.js +1 -1
  23. package/dist/card.cjs +1 -1
  24. package/dist/card.js +1 -1
  25. package/dist/{checkbox-yuvdefd4.cjs → checkbox-CGAbsupz.cjs} +2 -2
  26. package/dist/{checkbox-yuvdefd4.cjs.map → checkbox-CGAbsupz.cjs.map} +1 -1
  27. package/dist/{checkbox-BPXqV2sc.js → checkbox-gDmmaU-i.js} +2 -2
  28. package/dist/{checkbox-BPXqV2sc.js.map → checkbox-gDmmaU-i.js.map} +1 -1
  29. package/dist/checkbox.cjs +1 -1
  30. package/dist/checkbox.js +1 -1
  31. package/dist/{chips-B8bgmplU.js → chips-DtYGQiRe.js} +12 -12
  32. package/dist/{chips-B8bgmplU.js.map → chips-DtYGQiRe.js.map} +1 -1
  33. package/dist/{chips-CPmmFVGK.cjs → chips-FOChglMy.cjs} +2 -2
  34. package/dist/{chips-CPmmFVGK.cjs.map → chips-FOChglMy.cjs.map} +1 -1
  35. package/dist/chips.cjs +1 -1
  36. package/dist/chips.js +1 -1
  37. package/dist/components.cjs +1 -1
  38. package/dist/components.js +1 -1
  39. package/dist/content-drawer.cjs +1 -1
  40. package/dist/content-drawer.js +1 -1
  41. package/dist/context-array-BrljBA5R.cjs +2 -0
  42. package/dist/context-array-BrljBA5R.cjs.map +1 -0
  43. package/dist/context-array-CSGdoQ1W.js +923 -0
  44. package/dist/context-array-CSGdoQ1W.js.map +1 -0
  45. package/dist/{date-range-Mh7mi060.cjs → date-range-CCBukS6w.cjs} +2 -2
  46. package/dist/{date-range-Mh7mi060.cjs.map → date-range-CCBukS6w.cjs.map} +1 -1
  47. package/dist/{date-range-XD3eHmKe.js → date-range-CKocQ00P.js} +3 -3
  48. package/dist/{date-range-XD3eHmKe.js.map → date-range-CKocQ00P.js.map} +1 -1
  49. package/dist/date-range.cjs +1 -1
  50. package/dist/date-range.js +1 -1
  51. package/dist/{delay-BEh5HtKm.js → delay-Byk3BNTS.js} +11 -11
  52. package/dist/{delay-BEh5HtKm.js.map → delay-Byk3BNTS.js.map} +1 -1
  53. package/dist/{delay-Bz8DPPRF.cjs → delay-DoQ_jIcq.cjs} +2 -2
  54. package/dist/{delay-Bz8DPPRF.cjs.map → delay-DoQ_jIcq.cjs.map} +1 -1
  55. package/dist/delay.cjs +1 -1
  56. package/dist/delay.js +1 -1
  57. package/dist/{divider-BBy32B6r.js → divider-DW1XYPUt.js} +3 -3
  58. package/dist/{divider-BBy32B6r.js.map → divider-DW1XYPUt.js.map} +1 -1
  59. package/dist/{divider-Dxmbn2j0.cjs → divider-Wh-OY6OR.cjs} +2 -2
  60. package/dist/{divider-Dxmbn2j0.cjs.map → divider-Wh-OY6OR.cjs.map} +1 -1
  61. package/dist/divider.cjs +1 -1
  62. package/dist/divider.js +1 -1
  63. package/dist/extra.cjs +1 -1
  64. package/dist/extra.js +1 -1
  65. package/dist/{flex-BbafQvop.js → flex-BCcCTIEB.js} +2 -2
  66. package/dist/{flex-BbafQvop.js.map → flex-BCcCTIEB.js.map} +1 -1
  67. package/dist/{flex-C64fxWPl.cjs → flex-BaRE9ffF.cjs} +2 -2
  68. package/dist/{flex-C64fxWPl.cjs.map → flex-BaRE9ffF.cjs.map} +1 -1
  69. package/dist/{form-WOoGhjQx.cjs → form-B0CyaQwH.cjs} +2 -2
  70. package/dist/{form-WOoGhjQx.cjs.map → form-B0CyaQwH.cjs.map} +1 -1
  71. package/dist/{form-CjB8ReAw.js → form-DvQXRrGJ.js} +2 -2
  72. package/dist/{form-CjB8ReAw.js.map → form-DvQXRrGJ.js.map} +1 -1
  73. package/dist/form.cjs +1 -1
  74. package/dist/form.js +1 -1
  75. package/dist/{icon-D3FyfFuy.cjs → icon-BqQnZfcC.cjs} +2 -2
  76. package/dist/{icon-D3FyfFuy.cjs.map → icon-BqQnZfcC.cjs.map} +1 -1
  77. package/dist/{icon-1L_noI_n.js → icon-CoTwcGO7.js} +3 -3
  78. package/dist/{icon-1L_noI_n.js.map → icon-CoTwcGO7.js.map} +1 -1
  79. package/dist/{icon-button-Bfd0mfs9.cjs → icon-button-B3LSOKYP.cjs} +2 -2
  80. package/dist/{icon-button-Bfd0mfs9.cjs.map → icon-button-B3LSOKYP.cjs.map} +1 -1
  81. package/dist/{icon-button-Dji1Ck9p.js → icon-button-BMkOl7zP.js} +3 -3
  82. package/dist/{icon-button-Dji1Ck9p.js.map → icon-button-BMkOl7zP.js.map} +1 -1
  83. package/dist/icons.cjs +1 -1
  84. package/dist/icons.js +1 -1
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.js +136 -123
  87. package/dist/index.js.map +1 -1
  88. package/dist/{input-leV-sK9y.cjs → input-A8mZ7r9Z.cjs} +2 -2
  89. package/dist/{input-leV-sK9y.cjs.map → input-A8mZ7r9Z.cjs.map} +1 -1
  90. package/dist/{input-DIgPPDf4.js → input-FLgsuB5g.js} +2 -2
  91. package/dist/{input-DIgPPDf4.js.map → input-FLgsuB5g.js.map} +1 -1
  92. package/dist/input.cjs +1 -1
  93. package/dist/input.js +1 -1
  94. package/dist/layout.cjs +1 -1
  95. package/dist/layout.js +1 -1
  96. package/dist/{list-8U7mFDmR.cjs → list-4_krEg2r.cjs} +2 -2
  97. package/dist/{list-8U7mFDmR.cjs.map → list-4_krEg2r.cjs.map} +1 -1
  98. package/dist/{list-DiARM4rT.js → list-DxHWsB3z.js} +2 -2
  99. package/dist/{list-DiARM4rT.js.map → list-DxHWsB3z.js.map} +1 -1
  100. package/dist/list.cjs +1 -1
  101. package/dist/list.js +1 -1
  102. package/dist/{litElement.mixin-DBsn92pk.cjs → litElement.mixin-CssoQifr.cjs} +2 -2
  103. package/dist/{litElement.mixin-DBsn92pk.cjs.map → litElement.mixin-CssoQifr.cjs.map} +1 -1
  104. package/dist/{litElement.mixin-BOOn7U5Z.js → litElement.mixin-fACDhe7J.js} +2 -2
  105. package/dist/{litElement.mixin-BOOn7U5Z.js.map → litElement.mixin-fACDhe7J.js.map} +1 -1
  106. package/dist/{menu-Br6X3wmF.cjs → menu-fEUIZGXJ.cjs} +2 -2
  107. package/dist/{menu-Br6X3wmF.cjs.map → menu-fEUIZGXJ.cjs.map} +1 -1
  108. package/dist/{menu-xQx6N8LO.js → menu-rWt1jKex.js} +3 -3
  109. package/dist/{menu-xQx6N8LO.js.map → menu-rWt1jKex.js.map} +1 -1
  110. package/dist/menu.cjs +1 -1
  111. package/dist/menu.js +1 -1
  112. package/dist/mixins/tailwind.css +5 -0
  113. package/dist/nav-drawer.cjs +1 -1
  114. package/dist/nav-drawer.js +1 -1
  115. package/dist/notification-container-DKLh7Vt2.js +447 -0
  116. package/dist/notification-container-DKLh7Vt2.js.map +1 -0
  117. package/dist/notification-container-DdUjZ0bi.cjs +124 -0
  118. package/dist/notification-container-DdUjZ0bi.cjs.map +1 -0
  119. package/dist/notification-service-DWeUoHi2.js +29 -0
  120. package/dist/notification-service-DWeUoHi2.js.map +1 -0
  121. package/dist/notification-service-DXXrRCmK.cjs +2 -0
  122. package/dist/notification-service-DXXrRCmK.cjs.map +1 -0
  123. package/dist/notification.cjs +1 -1
  124. package/dist/notification.js +7 -4
  125. package/dist/notification.js.map +1 -1
  126. package/dist/{option-C1ZeDVrC.cjs → option-CpmK20dy.cjs} +2 -2
  127. package/dist/{option-C1ZeDVrC.cjs.map → option-CpmK20dy.cjs.map} +1 -1
  128. package/dist/{option-Dx2AWiaj.js → option-ztBnKZ_w.js} +2 -2
  129. package/dist/{option-Dx2AWiaj.js.map → option-ztBnKZ_w.js.map} +1 -1
  130. package/dist/option.cjs +1 -1
  131. package/dist/option.js +1 -1
  132. package/dist/{payment-card-form-CJ4YDbUJ.js → payment-card-form-CUgTRvBS.js} +3 -3
  133. package/dist/{payment-card-form-CJ4YDbUJ.js.map → payment-card-form-CUgTRvBS.js.map} +1 -1
  134. package/dist/{payment-card-form-liiHN2py.cjs → payment-card-form-DmHX_20B.cjs} +2 -2
  135. package/dist/{payment-card-form-liiHN2py.cjs.map → payment-card-form-DmHX_20B.cjs.map} +1 -1
  136. package/dist/{radio-group-C067Z6Sx.js → radio-group-BZMhEi5P.js} +2 -2
  137. package/dist/{radio-group-C067Z6Sx.js.map → radio-group-BZMhEi5P.js.map} +1 -1
  138. package/dist/{radio-group-9pg4qU4Q.cjs → radio-group-DOpJu0Pc.cjs} +2 -2
  139. package/dist/{radio-group-9pg4qU4Q.cjs.map → radio-group-DOpJu0Pc.cjs.map} +1 -1
  140. package/dist/radio-group.cjs +1 -1
  141. package/dist/radio-group.js +1 -1
  142. package/dist/rxjs-utils.js +4 -4
  143. package/dist/{schmancy-steps-container-W8iUrjjQ.cjs → schmancy-steps-container-B5UOYQG8.cjs} +2 -2
  144. package/dist/{schmancy-steps-container-W8iUrjjQ.cjs.map → schmancy-steps-container-B5UOYQG8.cjs.map} +1 -1
  145. package/dist/{schmancy-steps-container-CXOh8tn7.js → schmancy-steps-container-srToeIjV.js} +2 -2
  146. package/dist/{schmancy-steps-container-CXOh8tn7.js.map → schmancy-steps-container-srToeIjV.js.map} +1 -1
  147. package/dist/{select-Ebp9Y6T_.cjs → select-0NLmJErW.cjs} +2 -2
  148. package/dist/{select-Ebp9Y6T_.cjs.map → select-0NLmJErW.cjs.map} +1 -1
  149. package/dist/{select-CbiLYVGN.js → select-Dx6IF984.js} +3 -3
  150. package/dist/{select-CbiLYVGN.js.map → select-Dx6IF984.js.map} +1 -1
  151. package/dist/select.cjs +1 -1
  152. package/dist/select.js +1 -1
  153. package/dist/selector-hook-0691Losv.js +323 -0
  154. package/dist/selector-hook-0691Losv.js.map +1 -0
  155. package/dist/selector-hook-SzNTYQII.cjs +2 -0
  156. package/dist/selector-hook-SzNTYQII.cjs.map +1 -0
  157. package/dist/{sheet-BZ4d5wLR.js → sheet-Bl64wfBe.js} +3 -3
  158. package/dist/{sheet-BZ4d5wLR.js.map → sheet-Bl64wfBe.js.map} +1 -1
  159. package/dist/{sheet-DoWympTj.cjs → sheet-BwsspKto.cjs} +2 -2
  160. package/dist/{sheet-DoWympTj.cjs.map → sheet-BwsspKto.cjs.map} +1 -1
  161. package/dist/sheet.cjs +1 -1
  162. package/dist/sheet.js +1 -1
  163. package/dist/{slider-BGzs57Nd.cjs → slider-9zdabbA2.cjs} +2 -2
  164. package/dist/{slider-BGzs57Nd.cjs.map → slider-9zdabbA2.cjs.map} +1 -1
  165. package/dist/{slider-Bwt5zt67.js → slider-nyTR0hyw.js} +3 -3
  166. package/dist/{slider-Bwt5zt67.js.map → slider-nyTR0hyw.js.map} +1 -1
  167. package/dist/slider.cjs +1 -1
  168. package/dist/slider.js +1 -1
  169. package/dist/{spinner-B6Yx9jX1.js → spinner-37Y-o4jr.js} +3 -3
  170. package/dist/{spinner-B6Yx9jX1.js.map → spinner-37Y-o4jr.js.map} +1 -1
  171. package/dist/{spinner-vlXVxDki.cjs → spinner-D46_Vbxf.cjs} +2 -2
  172. package/dist/{spinner-vlXVxDki.cjs.map → spinner-D46_Vbxf.cjs.map} +1 -1
  173. package/dist/steps.cjs +1 -1
  174. package/dist/steps.js +1 -1
  175. package/dist/store.cjs +1 -1
  176. package/dist/store.js +33 -23
  177. package/dist/{surface-CXwP49Mi.cjs → surface-DFXFQBBC.cjs} +2 -2
  178. package/dist/{surface-CXwP49Mi.cjs.map → surface-DFXFQBBC.cjs.map} +1 -1
  179. package/dist/{surface-C2lcwsKJ.js → surface-RtVWZEdq.js} +2 -2
  180. package/dist/{surface-C2lcwsKJ.js.map → surface-RtVWZEdq.js.map} +1 -1
  181. package/dist/surface.cjs +1 -1
  182. package/dist/surface.js +1 -1
  183. package/dist/{table-2-DnKwRo.cjs → table-BG1_ofOE.cjs} +2 -2
  184. package/dist/{table-2-DnKwRo.cjs.map → table-BG1_ofOE.cjs.map} +1 -1
  185. package/dist/{table-CWfF0shQ.js → table-CGdNPIeN.js} +2 -2
  186. package/dist/{table-CWfF0shQ.js.map → table-CGdNPIeN.js.map} +1 -1
  187. package/dist/table.cjs +1 -1
  188. package/dist/table.js +1 -1
  189. package/dist/{tabs-group-CPUDkhJ_.cjs → tabs-group-BVsNqqN1.cjs} +2 -2
  190. package/dist/{tabs-group-CPUDkhJ_.cjs.map → tabs-group-BVsNqqN1.cjs.map} +1 -1
  191. package/dist/{tabs-group-DXMbbWuO.js → tabs-group-CvHe90C_.js} +2 -2
  192. package/dist/{tabs-group-DXMbbWuO.js.map → tabs-group-CvHe90C_.js.map} +1 -1
  193. package/dist/tabs.cjs +1 -1
  194. package/dist/tabs.js +1 -1
  195. package/dist/tailwind.mixin-1drvGQKC.cjs +2 -0
  196. package/dist/{tailwind.mixin-CWsvBayE.cjs.map → tailwind.mixin-1drvGQKC.cjs.map} +1 -1
  197. package/dist/tailwind.mixin-C7U3gr3P.js +43 -0
  198. package/dist/{tailwind.mixin-C8nuH8uq.js.map → tailwind.mixin-C7U3gr3P.js.map} +1 -1
  199. package/dist/teleport.cjs +1 -1
  200. package/dist/{teleport.component-tDzioCA7.js → teleport.component-Du14Yyxz.js} +63 -63
  201. package/dist/{teleport.component-tDzioCA7.js.map → teleport.component-Du14Yyxz.js.map} +1 -1
  202. package/dist/{teleport.component-BMTMnjJi.cjs → teleport.component-Vicu2fPa.cjs} +2 -2
  203. package/dist/{teleport.component-BMTMnjJi.cjs.map → teleport.component-Vicu2fPa.cjs.map} +1 -1
  204. package/dist/teleport.js +1 -1
  205. package/dist/{textarea-08VY-gi0.cjs → textarea-D1nov2H8.cjs} +2 -2
  206. package/dist/{textarea-08VY-gi0.cjs.map → textarea-D1nov2H8.cjs.map} +1 -1
  207. package/dist/{textarea-KY-H0XE9.js → textarea-Ddi7wWLs.js} +2 -2
  208. package/dist/{textarea-KY-H0XE9.js.map → textarea-Ddi7wWLs.js.map} +1 -1
  209. package/dist/textarea.cjs +1 -1
  210. package/dist/textarea.js +1 -1
  211. package/dist/{theme-button-Cp3y37Mz.js → theme-button-84n-IAL1.js} +2 -2
  212. package/dist/{theme-button-Cp3y37Mz.js.map → theme-button-84n-IAL1.js.map} +1 -1
  213. package/dist/{theme-button-TChFwWi6.cjs → theme-button-C-g9a2ZF.cjs} +2 -2
  214. package/dist/{theme-button-TChFwWi6.cjs.map → theme-button-C-g9a2ZF.cjs.map} +1 -1
  215. package/dist/theme-button.cjs +1 -1
  216. package/dist/theme-button.js +1 -1
  217. package/dist/theme.cjs +1 -1
  218. package/dist/{theme.component-Bgh-j4WN.cjs → theme.component-C61DdKLT.cjs} +2 -2
  219. package/dist/{theme.component-Bgh-j4WN.cjs.map → theme.component-C61DdKLT.cjs.map} +1 -1
  220. package/dist/{theme.component-tcsmGB6n.js → theme.component-Dk0d_7Og.js} +47 -47
  221. package/dist/{theme.component-tcsmGB6n.js.map → theme.component-Dk0d_7Og.js.map} +1 -1
  222. package/dist/theme.js +1 -1
  223. package/dist/{timezone-DwTl04Fb.cjs → timezone-2Eb26kSx.cjs} +2 -4
  224. package/dist/timezone-2Eb26kSx.cjs.map +1 -0
  225. package/dist/{timezone-Cob3Zs1V.js → timezone-C8cbkh7P.js} +3 -5
  226. package/dist/timezone-C8cbkh7P.js.map +1 -0
  227. package/dist/{tree-CBYb1k5W.cjs → tree-CsKV00BK.cjs} +2 -2
  228. package/dist/{tree-CBYb1k5W.cjs.map → tree-CsKV00BK.cjs.map} +1 -1
  229. package/dist/{tree-DR5qkGYr.js → tree-_dvGG1Dk.js} +2 -2
  230. package/dist/{tree-DR5qkGYr.js.map → tree-_dvGG1Dk.js.map} +1 -1
  231. package/dist/tree.cjs +1 -1
  232. package/dist/tree.js +1 -1
  233. package/dist/{typewriter-DKXGVYPg.cjs → typewriter-BTKJ8mPR.cjs} +2 -2
  234. package/dist/{typewriter-DKXGVYPg.cjs.map → typewriter-BTKJ8mPR.cjs.map} +1 -1
  235. package/dist/{typewriter-BJk9hiPU.js → typewriter-D1rGUZyO.js} +4 -4
  236. package/dist/{typewriter-BJk9hiPU.js.map → typewriter-D1rGUZyO.js.map} +1 -1
  237. package/dist/typewriter.cjs +1 -1
  238. package/dist/typewriter.js +1 -1
  239. package/dist/{typography-Czz5ZTwN.cjs → typography-BJzp77zk.cjs} +2 -2
  240. package/dist/{typography-Czz5ZTwN.cjs.map → typography-BJzp77zk.cjs.map} +1 -1
  241. package/dist/{typography-B3-y3gWb.js → typography-C3AU6NFt.js} +2 -2
  242. package/dist/{typography-B3-y3gWb.js.map → typography-C3AU6NFt.js.map} +1 -1
  243. package/dist/typography.cjs +1 -1
  244. package/dist/typography.js +1 -1
  245. package/package.json +2 -1
  246. package/types/src/notification/index.d.ts +6 -3
  247. package/types/src/notification/notification-audio-generator.d.ts +45 -0
  248. package/types/src/notification/notification-audio.d.ts +70 -0
  249. package/types/src/notification/notification-container.d.ts +44 -0
  250. package/types/src/notification/notification-service.d.ts +60 -0
  251. package/types/src/notification/notification.d.ts +33 -4
  252. package/types/src/store/context-array.d.ts +83 -0
  253. package/types/src/store/context-collection.d.ts +20 -41
  254. package/types/src/store/context-create.d.ts +31 -9
  255. package/types/src/store/context-object.d.ts +14 -43
  256. package/types/src/store/filter-directive.d.ts +62 -5
  257. package/types/src/store/immer-integration.d.ts +60 -0
  258. package/types/src/store/selector-hook.d.ts +4 -0
  259. package/types/src/store/selectors.d.ts +29 -20
  260. package/types/src/store/store.class.d.ts +67 -0
  261. package/types/src/store/types.d.ts +102 -0
  262. package/dist/context-object-BDXZ5EKJ.js +0 -306
  263. package/dist/context-object-BDXZ5EKJ.js.map +0 -1
  264. package/dist/context-object-BIywslrO.cjs +0 -2
  265. package/dist/context-object-BIywslrO.cjs.map +0 -1
  266. package/dist/outlet-CI05jyjr.cjs +0 -61
  267. package/dist/outlet-CI05jyjr.cjs.map +0 -1
  268. package/dist/outlet-CScugbm9.js +0 -128
  269. package/dist/outlet-CScugbm9.js.map +0 -1
  270. package/dist/selector-hook-C6VCezv7.js +0 -273
  271. package/dist/selector-hook-C6VCezv7.js.map +0 -1
  272. package/dist/selector-hook-DDaYMsHs.cjs +0 -2
  273. package/dist/selector-hook-DDaYMsHs.cjs.map +0 -1
  274. package/dist/tailwind.mixin-C8nuH8uq.js +0 -43
  275. package/dist/tailwind.mixin-CWsvBayE.cjs +0 -2
  276. package/dist/timezone-Cob3Zs1V.js.map +0 -1
  277. package/dist/timezone-DwTl04Fb.cjs.map +0 -1
@@ -0,0 +1,923 @@
1
+ import { Subject as ue, BehaviorSubject as q, throttleTime as ie } from "rxjs";
2
+ var oe = Symbol.for("immer-nothing"), H = Symbol.for("immer-draftable"), u = Symbol.for("immer-state"), le = process.env.NODE_ENV !== "production" ? [function(t) {
3
+ return `The plugin for '${t}' has not been loaded into Immer. To enable the plugin, import and call \`enable${t}()\` when initializing your application.`;
4
+ }, function(t) {
5
+ 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 '${t}'`;
6
+ }, "This object has been frozen and should not be mutated", function(t) {
7
+ return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + t;
8
+ }, "An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.", "Immer forbids circular references", "The first or second argument to `produce` must be a function", "The third argument to `produce` must be a function or undefined", "First argument to `createDraft` must be a plain object, an array, or an immerable object", "First argument to `finishDraft` must be a draft returned by `createDraft`", function(t) {
9
+ return `'current' expects a draft, got: ${t}`;
10
+ }, "Object.defineProperty() cannot be used on an Immer draft", "Object.setPrototypeOf() cannot be used on an Immer draft", "Immer only supports deleting array indices", "Immer only supports setting array indices and the 'length' property", function(t) {
11
+ return `'original' expects a draft, got: ${t}`;
12
+ }] : [];
13
+ function _(t, ...e) {
14
+ if (process.env.NODE_ENV !== "production") {
15
+ const r = le[t], s = typeof r == "function" ? r.apply(null, e) : r;
16
+ throw new Error(`[Immer] ${s}`);
17
+ }
18
+ throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`);
19
+ }
20
+ var $ = Object.getPrototypeOf;
21
+ function w(t) {
22
+ return !!t && !!t[u];
23
+ }
24
+ function v(t) {
25
+ var e;
26
+ return !!t && (ae(t) || Array.isArray(t) || !!t[H] || !!((e = t.constructor) != null && e[H]) || I(t) || A(t));
27
+ }
28
+ var de = Object.prototype.constructor.toString();
29
+ function ae(t) {
30
+ if (!t || typeof t != "object") return !1;
31
+ const e = $(t);
32
+ if (e === null) return !0;
33
+ const r = Object.hasOwnProperty.call(e, "constructor") && e.constructor;
34
+ return r === Object || typeof r == "function" && Function.toString.call(r) === de;
35
+ }
36
+ function P(t, e) {
37
+ M(t) === 0 ? Reflect.ownKeys(t).forEach((r) => {
38
+ e(r, t[r], t);
39
+ }) : t.forEach((r, s) => e(s, r, t));
40
+ }
41
+ function M(t) {
42
+ const e = t[u];
43
+ return e ? e.type_ : Array.isArray(t) ? 1 : I(t) ? 2 : A(t) ? 3 : 0;
44
+ }
45
+ function B(t, e) {
46
+ return M(t) === 2 ? t.has(e) : Object.prototype.hasOwnProperty.call(t, e);
47
+ }
48
+ function ce(t, e, r) {
49
+ const s = M(t);
50
+ s === 2 ? t.set(e, r) : s === 3 ? t.add(r) : t[e] = r;
51
+ }
52
+ function I(t) {
53
+ return t instanceof Map;
54
+ }
55
+ function A(t) {
56
+ return t instanceof Set;
57
+ }
58
+ function f(t) {
59
+ return t.copy_ || t.base_;
60
+ }
61
+ function C(t, e) {
62
+ if (I(t)) return new Map(t);
63
+ if (A(t)) return new Set(t);
64
+ if (Array.isArray(t)) return Array.prototype.slice.call(t);
65
+ const r = ae(t);
66
+ if (e === !0 || e === "class_only" && !r) {
67
+ const s = Object.getOwnPropertyDescriptors(t);
68
+ delete s[u];
69
+ let n = Reflect.ownKeys(s);
70
+ for (let a = 0; a < n.length; a++) {
71
+ const h = n[a], c = s[h];
72
+ c.writable === !1 && (c.writable = !0, c.configurable = !0), (c.get || c.set) && (s[h] = { configurable: !0, writable: !0, enumerable: c.enumerable, value: t[h] });
73
+ }
74
+ return Object.create($(t), s);
75
+ }
76
+ {
77
+ const s = $(t);
78
+ if (s !== null && r) return { ...t };
79
+ const n = Object.create(s);
80
+ return Object.assign(n, t);
81
+ }
82
+ }
83
+ function G(t, e = !1) {
84
+ return R(t) || w(t) || !v(t) || (M(t) > 1 && (t.set = t.add = t.clear = t.delete = pe), Object.freeze(t), e && Object.entries(t).forEach(([r, s]) => G(s, !0))), t;
85
+ }
86
+ function pe() {
87
+ _(2);
88
+ }
89
+ function R(t) {
90
+ return Object.isFrozen(t);
91
+ }
92
+ var N, J = {};
93
+ function S(t) {
94
+ const e = J[t];
95
+ return e || _(0, t), e;
96
+ }
97
+ function D() {
98
+ return N;
99
+ }
100
+ function Y(t, e) {
101
+ e && (S("Patches"), t.patches_ = [], t.inversePatches_ = [], t.patchListener_ = e);
102
+ }
103
+ function U(t) {
104
+ K(t), t.drafts_.forEach(fe), t.drafts_ = null;
105
+ }
106
+ function K(t) {
107
+ t === N && (N = t.parent_);
108
+ }
109
+ function Z(t) {
110
+ return N = { drafts_: [], parent_: N, immer_: t, canAutoFreeze_: !0, unfinalizedDrafts_: 0 };
111
+ }
112
+ function fe(t) {
113
+ const e = t[u];
114
+ e.type_ === 0 || e.type_ === 1 ? e.revoke_() : e.revoked_ = !0;
115
+ }
116
+ function Q(t, e) {
117
+ e.unfinalizedDrafts_ = e.drafts_.length;
118
+ const r = e.drafts_[0];
119
+ return t !== void 0 && t !== r ? (r[u].modified_ && (U(e), _(4)), v(t) && (t = T(e, t), e.parent_ || j(e, t)), e.patches_ && S("Patches").generateReplacementPatches_(r[u].base_, t, e.patches_, e.inversePatches_)) : t = T(e, r, []), U(e), e.patches_ && e.patchListener_(e.patches_, e.inversePatches_), t !== oe ? t : void 0;
120
+ }
121
+ function T(t, e, r) {
122
+ if (R(e)) return e;
123
+ const s = e[u];
124
+ if (!s) return P(e, (n, a) => ee(t, s, e, n, a, r)), e;
125
+ if (s.scope_ !== t) return e;
126
+ if (!s.modified_) return j(t, s.base_, !0), s.base_;
127
+ if (!s.finalized_) {
128
+ s.finalized_ = !0, s.scope_.unfinalizedDrafts_--;
129
+ const n = s.copy_;
130
+ let a = n, h = !1;
131
+ s.type_ === 3 && (a = new Set(n), n.clear(), h = !0), P(a, (c, i) => ee(t, s, n, c, i, r, h)), j(t, n, !1), r && t.patches_ && S("Patches").generatePatches_(s, r, t.patches_, t.inversePatches_);
132
+ }
133
+ return s.copy_;
134
+ }
135
+ function ee(t, e, r, s, n, a, h) {
136
+ if (process.env.NODE_ENV !== "production" && n === r && _(5), w(n)) {
137
+ const c = T(t, n, a && e && e.type_ !== 3 && !B(e.assigned_, s) ? a.concat(s) : void 0);
138
+ if (ce(r, s, c), !w(c)) return;
139
+ t.canAutoFreeze_ = !1;
140
+ } else h && r.add(n);
141
+ if (v(n) && !R(n)) {
142
+ if (!t.immer_.autoFreeze_ && t.unfinalizedDrafts_ < 1) return;
143
+ T(t, n), e && e.scope_.parent_ || typeof s == "symbol" || !Object.prototype.propertyIsEnumerable.call(r, s) || j(t, n);
144
+ }
145
+ }
146
+ function j(t, e, r = !1) {
147
+ !t.parent_ && t.immer_.autoFreeze_ && t.canAutoFreeze_ && G(e, r);
148
+ }
149
+ var L = { get(t, e) {
150
+ if (e === u) return t;
151
+ const r = f(t);
152
+ if (!B(r, e)) return function(n, a, h) {
153
+ var i;
154
+ const c = te(a, h);
155
+ return c ? "value" in c ? c.value : (i = c.get) == null ? void 0 : i.call(n.draft_) : void 0;
156
+ }(t, r, e);
157
+ const s = r[e];
158
+ return t.finalized_ || !v(s) ? s : s === F(t.base_, e) ? (V(t), t.copy_[e] = z(s, t)) : s;
159
+ }, has: (t, e) => e in f(t), ownKeys: (t) => Reflect.ownKeys(f(t)), set(t, e, r) {
160
+ const s = te(f(t), e);
161
+ if (s != null && s.set) return s.set.call(t.draft_, r), !0;
162
+ if (!t.modified_) {
163
+ const h = F(f(t), e), c = h == null ? void 0 : h[u];
164
+ if (c && c.base_ === r) return t.copy_[e] = r, t.assigned_[e] = !1, !0;
165
+ if (((n = r) === (a = h) ? n !== 0 || 1 / n == 1 / a : n != n && a != a) && (r !== void 0 || B(t.base_, e))) return !0;
166
+ V(t), m(t);
167
+ }
168
+ var n, a;
169
+ return t.copy_[e] === r && (r !== void 0 || e in t.copy_) || Number.isNaN(r) && Number.isNaN(t.copy_[e]) || (t.copy_[e] = r, t.assigned_[e] = !0), !0;
170
+ }, deleteProperty: (t, e) => (F(t.base_, e) !== void 0 || e in t.base_ ? (t.assigned_[e] = !1, V(t), m(t)) : delete t.assigned_[e], t.copy_ && delete t.copy_[e], !0), getOwnPropertyDescriptor(t, e) {
171
+ const r = f(t), s = Reflect.getOwnPropertyDescriptor(r, e);
172
+ return s && { writable: !0, configurable: t.type_ !== 1 || e !== "length", enumerable: s.enumerable, value: r[e] };
173
+ }, defineProperty() {
174
+ _(11);
175
+ }, getPrototypeOf: (t) => $(t.base_), setPrototypeOf() {
176
+ _(12);
177
+ } }, E = {};
178
+ function F(t, e) {
179
+ const r = t[u];
180
+ return (r ? f(r) : t)[e];
181
+ }
182
+ function te(t, e) {
183
+ if (!(e in t)) return;
184
+ let r = $(t);
185
+ for (; r; ) {
186
+ const s = Object.getOwnPropertyDescriptor(r, e);
187
+ if (s) return s;
188
+ r = $(r);
189
+ }
190
+ }
191
+ function m(t) {
192
+ t.modified_ || (t.modified_ = !0, t.parent_ && m(t.parent_));
193
+ }
194
+ function V(t) {
195
+ t.copy_ || (t.copy_ = C(t.base_, t.scope_.immer_.useStrictShallowCopy_));
196
+ }
197
+ P(L, (t, e) => {
198
+ E[t] = function() {
199
+ return arguments[0] = arguments[0][0], e.apply(this, arguments);
200
+ };
201
+ }), E.deleteProperty = function(t, e) {
202
+ return process.env.NODE_ENV !== "production" && isNaN(parseInt(e)) && _(13), E.set.call(this, t, e, void 0);
203
+ }, E.set = function(t, e, r) {
204
+ return process.env.NODE_ENV !== "production" && e !== "length" && isNaN(parseInt(e)) && _(14), L.set.call(this, t[0], e, r, t[0]);
205
+ };
206
+ function z(t, e) {
207
+ const r = I(t) ? S("MapSet").proxyMap_(t, e) : A(t) ? S("MapSet").proxySet_(t, e) : function(s, n) {
208
+ const a = Array.isArray(s), h = { type_: a ? 1 : 0, scope_: n ? n.scope_ : D(), modified_: !1, finalized_: !1, assigned_: {}, parent_: n, base_: s, draft_: null, copy_: null, revoke_: null, isManual_: !1 };
209
+ let c = h, i = L;
210
+ a && (c = [h], i = E);
211
+ const { revoke: o, proxy: p } = Proxy.revocable(c, i);
212
+ return h.draft_ = p, h.revoke_ = o, p;
213
+ }(t, e);
214
+ return (e ? e.scope_ : D()).drafts_.push(r), r;
215
+ }
216
+ function he(t) {
217
+ if (!v(t) || R(t)) return t;
218
+ const e = t[u];
219
+ let r;
220
+ if (e) {
221
+ if (!e.modified_) return e.base_;
222
+ e.finalized_ = !0, r = C(t, e.scope_.immer_.useStrictShallowCopy_);
223
+ } else r = C(t, !0);
224
+ return P(r, (s, n) => {
225
+ ce(r, s, he(n));
226
+ }), e && (e.finalized_ = !1), r;
227
+ }
228
+ var g = new class {
229
+ constructor(t) {
230
+ this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (e, r, s) => {
231
+ if (typeof e == "function" && typeof r != "function") {
232
+ const a = r;
233
+ r = e;
234
+ const h = this;
235
+ return function(c = a, ...i) {
236
+ return h.produce(c, (o) => r.call(this, o, ...i));
237
+ };
238
+ }
239
+ let n;
240
+ if (typeof r != "function" && _(6), s !== void 0 && typeof s != "function" && _(7), v(e)) {
241
+ const a = Z(this), h = z(e, void 0);
242
+ let c = !0;
243
+ try {
244
+ n = r(h), c = !1;
245
+ } finally {
246
+ c ? U(a) : K(a);
247
+ }
248
+ return Y(a, s), Q(n, a);
249
+ }
250
+ if (!e || typeof e != "object") {
251
+ if (n = r(e), n === void 0 && (n = e), n === oe && (n = void 0), this.autoFreeze_ && G(n, !0), s) {
252
+ const a = [], h = [];
253
+ S("Patches").generateReplacementPatches_(e, n, a, h), s(a, h);
254
+ }
255
+ return n;
256
+ }
257
+ _(1, e);
258
+ }, this.produceWithPatches = (e, r) => {
259
+ if (typeof e == "function") return (a, ...h) => this.produceWithPatches(a, (c) => e(c, ...h));
260
+ let s, n;
261
+ return [this.produce(e, r, (a, h) => {
262
+ s = a, n = h;
263
+ }), s, n];
264
+ }, typeof (t == null ? void 0 : t.autoFreeze) == "boolean" && this.setAutoFreeze(t.autoFreeze), typeof (t == null ? void 0 : t.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(t.useStrictShallowCopy);
265
+ }
266
+ createDraft(t) {
267
+ v(t) || _(8), w(t) && (t = function(s) {
268
+ return w(s) || _(10, s), he(s);
269
+ }(t));
270
+ const e = Z(this), r = z(t, void 0);
271
+ return r[u].isManual_ = !0, K(e), r;
272
+ }
273
+ finishDraft(t, e) {
274
+ const r = t && t[u];
275
+ r && r.isManual_ || _(9);
276
+ const { scope_: s } = r;
277
+ return Y(s, e), Q(void 0, s);
278
+ }
279
+ setAutoFreeze(t) {
280
+ this.autoFreeze_ = t;
281
+ }
282
+ setUseStrictShallowCopy(t) {
283
+ this.useStrictShallowCopy_ = t;
284
+ }
285
+ applyPatches(t, e) {
286
+ let r;
287
+ for (r = e.length - 1; r >= 0; r--) {
288
+ const n = e[r];
289
+ if (n.path.length === 0 && n.op === "replace") {
290
+ t = n.value;
291
+ break;
292
+ }
293
+ }
294
+ r > -1 && (e = e.slice(r + 1));
295
+ const s = S("Patches").applyPatches_;
296
+ return w(t) ? s(t, e) : this.produce(t, (n) => s(n, e));
297
+ }
298
+ }(), d = g.produce;
299
+ g.produceWithPatches.bind(g), g.setAutoFreeze.bind(g), g.setUseStrictShallowCopy.bind(g), g.applyPatches.bind(g), g.createDraft.bind(g), g.finishDraft.bind(g);
300
+ class l extends Error {
301
+ constructor(e, r, s) {
302
+ super(e), this.name = "StoreError", this.cause = r, this.context = s, this.timestamp = /* @__PURE__ */ new Date(), Error.captureStackTrace && Error.captureStackTrace(this, l);
303
+ }
304
+ toJSON() {
305
+ return { name: this.name, message: this.message, cause: this.cause, context: this.context, timestamp: this.timestamp.toISOString(), stack: this.stack };
306
+ }
307
+ }
308
+ class ye {
309
+ constructor() {
310
+ this.data = null;
311
+ }
312
+ async load() {
313
+ return this.data;
314
+ }
315
+ async save(e) {
316
+ this.data = e;
317
+ }
318
+ async clear() {
319
+ this.data = null;
320
+ }
321
+ }
322
+ class _e {
323
+ constructor(e) {
324
+ this.key = e;
325
+ }
326
+ async load() {
327
+ try {
328
+ const e = localStorage.getItem(this.key);
329
+ return e ? JSON.parse(e) : null;
330
+ } catch {
331
+ return null;
332
+ }
333
+ }
334
+ async save(e) {
335
+ try {
336
+ localStorage.setItem(this.key, JSON.stringify(e));
337
+ } catch (r) {
338
+ throw new l(`Failed to save to localStorage (${this.key})`, r);
339
+ }
340
+ }
341
+ async clear() {
342
+ localStorage.removeItem(this.key);
343
+ }
344
+ }
345
+ class ge {
346
+ constructor(e) {
347
+ this.key = e;
348
+ }
349
+ async load() {
350
+ try {
351
+ const e = sessionStorage.getItem(this.key);
352
+ return e ? JSON.parse(e) : null;
353
+ } catch {
354
+ return null;
355
+ }
356
+ }
357
+ async save(e) {
358
+ try {
359
+ sessionStorage.setItem(this.key, JSON.stringify(e));
360
+ } catch (r) {
361
+ throw new l(`Failed to save to sessionStorage (${this.key})`, r);
362
+ }
363
+ }
364
+ async clear() {
365
+ sessionStorage.removeItem(this.key);
366
+ }
367
+ }
368
+ const y = class y {
369
+ constructor(e) {
370
+ this.key = e;
371
+ }
372
+ openDB() {
373
+ return new Promise((e, r) => {
374
+ const s = indexedDB.open(y.DB_NAME, y.DB_VERSION);
375
+ s.onupgradeneeded = () => {
376
+ const n = s.result;
377
+ n.objectStoreNames.contains(y.STORE_NAME) || n.createObjectStore(y.STORE_NAME);
378
+ }, s.onsuccess = () => e(s.result), s.onerror = () => r(s.error);
379
+ });
380
+ }
381
+ async load() {
382
+ try {
383
+ const e = await this.openDB();
384
+ return new Promise((r, s) => {
385
+ const n = e.transaction(y.STORE_NAME, "readonly").objectStore(y.STORE_NAME).get(this.key);
386
+ n.onsuccess = () => {
387
+ e.close(), r(n.result || null);
388
+ }, n.onerror = () => {
389
+ e.close(), s(n.error);
390
+ };
391
+ });
392
+ } catch {
393
+ return null;
394
+ }
395
+ }
396
+ async save(e) {
397
+ try {
398
+ const r = await this.openDB();
399
+ return new Promise((s, n) => {
400
+ const a = r.transaction(y.STORE_NAME, "readwrite").objectStore(y.STORE_NAME).put(e, this.key);
401
+ a.onsuccess = () => {
402
+ r.close(), s();
403
+ }, a.onerror = () => {
404
+ r.close(), n(a.error);
405
+ };
406
+ });
407
+ } catch (r) {
408
+ throw new l(`Failed to save to IndexedDB (${this.key})`, r);
409
+ }
410
+ }
411
+ async clear() {
412
+ try {
413
+ const e = await this.openDB();
414
+ return new Promise((r, s) => {
415
+ const n = e.transaction(y.STORE_NAME, "readwrite").objectStore(y.STORE_NAME).delete(this.key);
416
+ n.onsuccess = () => {
417
+ e.close(), r();
418
+ }, n.onerror = () => {
419
+ e.close(), s(n.error);
420
+ };
421
+ });
422
+ } catch (e) {
423
+ throw new l(`Failed to clear from IndexedDB (${this.key})`, e);
424
+ }
425
+ }
426
+ };
427
+ y.DB_NAME = "StoreDB", y.STORE_NAME = "states", y.DB_VERSION = 1;
428
+ let W = y;
429
+ function be(t, e) {
430
+ switch (t) {
431
+ case "local":
432
+ return new _e(e);
433
+ case "session":
434
+ return new ge(e);
435
+ case "indexeddb":
436
+ return new W(e);
437
+ default:
438
+ return new ye();
439
+ }
440
+ }
441
+ (function() {
442
+ class t extends Map {
443
+ constructor(i, o) {
444
+ super(), this[u] = { type_: 2, parent_: o, scope_: o ? o.scope_ : D(), modified_: !1, finalized_: !1, copy_: void 0, assigned_: void 0, base_: i, draft_: this, isManual_: !1, revoked_: !1 };
445
+ }
446
+ get size() {
447
+ return f(this[u]).size;
448
+ }
449
+ has(i) {
450
+ return f(this[u]).has(i);
451
+ }
452
+ set(i, o) {
453
+ const p = this[u];
454
+ return n(p), f(p).has(i) && f(p).get(i) === o || (e(p), m(p), p.assigned_.set(i, !0), p.copy_.set(i, o), p.assigned_.set(i, !0)), this;
455
+ }
456
+ delete(i) {
457
+ if (!this.has(i)) return !1;
458
+ const o = this[u];
459
+ return n(o), e(o), m(o), o.base_.has(i) ? o.assigned_.set(i, !1) : o.assigned_.delete(i), o.copy_.delete(i), !0;
460
+ }
461
+ clear() {
462
+ const i = this[u];
463
+ n(i), f(i).size && (e(i), m(i), i.assigned_ = /* @__PURE__ */ new Map(), P(i.base_, (o) => {
464
+ i.assigned_.set(o, !1);
465
+ }), i.copy_.clear());
466
+ }
467
+ forEach(i, o) {
468
+ f(this[u]).forEach((p, b, me) => {
469
+ i.call(o, this.get(b), b, this);
470
+ });
471
+ }
472
+ get(i) {
473
+ const o = this[u];
474
+ n(o);
475
+ const p = f(o).get(i);
476
+ if (o.finalized_ || !v(p) || p !== o.base_.get(i)) return p;
477
+ const b = z(p, o);
478
+ return e(o), o.copy_.set(i, b), b;
479
+ }
480
+ keys() {
481
+ return f(this[u]).keys();
482
+ }
483
+ values() {
484
+ const i = this.keys();
485
+ return { [Symbol.iterator]: () => this.values(), next: () => {
486
+ const o = i.next();
487
+ return o.done ? o : { done: !1, value: this.get(o.value) };
488
+ } };
489
+ }
490
+ entries() {
491
+ const i = this.keys();
492
+ return { [Symbol.iterator]: () => this.entries(), next: () => {
493
+ const o = i.next();
494
+ if (o.done) return o;
495
+ const p = this.get(o.value);
496
+ return { done: !1, value: [o.value, p] };
497
+ } };
498
+ }
499
+ [Symbol.iterator]() {
500
+ return this.entries();
501
+ }
502
+ }
503
+ function e(c) {
504
+ c.copy_ || (c.assigned_ = /* @__PURE__ */ new Map(), c.copy_ = new Map(c.base_));
505
+ }
506
+ class r extends Set {
507
+ constructor(i, o) {
508
+ super(), this[u] = { type_: 3, parent_: o, scope_: o ? o.scope_ : D(), modified_: !1, finalized_: !1, copy_: void 0, base_: i, draft_: this, drafts_: /* @__PURE__ */ new Map(), revoked_: !1, isManual_: !1 };
509
+ }
510
+ get size() {
511
+ return f(this[u]).size;
512
+ }
513
+ has(i) {
514
+ const o = this[u];
515
+ return n(o), o.copy_ ? !!o.copy_.has(i) || !(!o.drafts_.has(i) || !o.copy_.has(o.drafts_.get(i))) : o.base_.has(i);
516
+ }
517
+ add(i) {
518
+ const o = this[u];
519
+ return n(o), this.has(i) || (s(o), m(o), o.copy_.add(i)), this;
520
+ }
521
+ delete(i) {
522
+ if (!this.has(i)) return !1;
523
+ const o = this[u];
524
+ return n(o), s(o), m(o), o.copy_.delete(i) || !!o.drafts_.has(i) && o.copy_.delete(o.drafts_.get(i));
525
+ }
526
+ clear() {
527
+ const i = this[u];
528
+ n(i), f(i).size && (s(i), m(i), i.copy_.clear());
529
+ }
530
+ values() {
531
+ const i = this[u];
532
+ return n(i), s(i), i.copy_.values();
533
+ }
534
+ entries() {
535
+ const i = this[u];
536
+ return n(i), s(i), i.copy_.entries();
537
+ }
538
+ keys() {
539
+ return this.values();
540
+ }
541
+ [Symbol.iterator]() {
542
+ return this.values();
543
+ }
544
+ forEach(i, o) {
545
+ const p = this.values();
546
+ let b = p.next();
547
+ for (; !b.done; ) i.call(o, b.value, b.value, this), b = p.next();
548
+ }
549
+ }
550
+ function s(c) {
551
+ c.copy_ || (c.copy_ = /* @__PURE__ */ new Set(), c.base_.forEach((i) => {
552
+ if (v(i)) {
553
+ const o = z(i, c);
554
+ c.drafts_.set(i, o), c.copy_.add(o);
555
+ } else c.copy_.add(i);
556
+ }));
557
+ }
558
+ function n(c) {
559
+ c.revoked_ && _(3, JSON.stringify(f(c)));
560
+ }
561
+ var a, h;
562
+ h = { proxyMap_: function(c, i) {
563
+ return new t(c, i);
564
+ }, proxySet_: function(c, i) {
565
+ return new r(c, i);
566
+ } }, J[a = "MapSet"] || (J[a] = h);
567
+ })();
568
+ class X {
569
+ constructor(e, r, s) {
570
+ this.storageType = e, this.key = r, this._ready = !1, this._destroy$ = new ue(), this.error$ = new q(null), this.defaultValue = d(s, (n) => n), this.$ = new q(this.defaultValue), this.storage = be(e, r), e === "memory" ? this._ready = !0 : this.initializeFromStorage();
571
+ }
572
+ get ready() {
573
+ return this._ready;
574
+ }
575
+ set ready(e) {
576
+ this._ready = e, this.updateState(this.$.value);
577
+ }
578
+ get value() {
579
+ return this.$.getValue();
580
+ }
581
+ destroy() {
582
+ this._destroy$.next(), this._destroy$.complete(), this.$.complete(), this.error$.complete();
583
+ }
584
+ replace(e) {
585
+ const r = d(e, (s) => s);
586
+ this.updateState(r);
587
+ }
588
+ updateState(e) {
589
+ try {
590
+ const r = d(e, (s) => s);
591
+ this.$.next(r), this.storageType !== "memory" && this.persistToStorage(r).catch((s) => {
592
+ const n = new l(`Error saving to ${this.storageType} storage for ${this.key}`, s);
593
+ this.error$.next(n);
594
+ });
595
+ } catch (r) {
596
+ const s = new l(`Error updating state in ${this.key}`, r);
597
+ this.error$.next(s);
598
+ }
599
+ }
600
+ async initializeFromStorage() {
601
+ try {
602
+ const e = await this.storage.load();
603
+ if (e) {
604
+ const r = this.processStoredValue(e), s = d(r, (n) => n);
605
+ this.updateState(s);
606
+ }
607
+ this._ready = !0;
608
+ } catch (e) {
609
+ const r = new l(`Error loading from ${this.storageType} storage for ${this.key}`, e);
610
+ this.error$.next(r), this._ready = !0;
611
+ }
612
+ }
613
+ processStoredValue(e) {
614
+ return e;
615
+ }
616
+ async persistToStorage(e) {
617
+ return this.storage.save(e);
618
+ }
619
+ }
620
+ const x = class x extends X {
621
+ static getInstance(e, r, s) {
622
+ const n = `${e}:${r}`;
623
+ return this.instances.has(n) || this.instances.set(n, new x(e, r, s)), this.instances.get(n);
624
+ }
625
+ set(e, r) {
626
+ try {
627
+ const s = d(this.value, (n) => {
628
+ n.set(e, r);
629
+ });
630
+ this.updateState(s), this.error$.next(null);
631
+ } catch (s) {
632
+ const n = new l(`Error setting value for key ${e} in ${this.key}`, s);
633
+ this.error$.next(n);
634
+ }
635
+ }
636
+ delete(e) {
637
+ try {
638
+ const r = d(this.value, (s) => {
639
+ s.delete(e);
640
+ });
641
+ this.updateState(r), this.error$.next(null);
642
+ } catch (r) {
643
+ const s = new l(`Error deleting key ${e} from ${this.key}`, r);
644
+ this.error$.next(s);
645
+ }
646
+ }
647
+ clear() {
648
+ this.updateState(/* @__PURE__ */ new Map());
649
+ }
650
+ batchUpdate(e) {
651
+ try {
652
+ const r = d(this.value, (s) => {
653
+ Object.entries(e).forEach(([n, a]) => {
654
+ s.set(n, a);
655
+ });
656
+ });
657
+ this.updateState(r), this.error$.next(null);
658
+ } catch (r) {
659
+ const s = new l(`Error batch updating in ${this.key}`, r);
660
+ this.error$.next(s);
661
+ }
662
+ }
663
+ update(e, r) {
664
+ try {
665
+ const s = d(this.value, (n) => {
666
+ const a = n.get(e);
667
+ a !== void 0 && r(a);
668
+ });
669
+ this.updateState(s), this.error$.next(null);
670
+ } catch (s) {
671
+ const n = new l(`Error updating item ${e} in ${this.key}`, s);
672
+ this.error$.next(n);
673
+ }
674
+ }
675
+ constructor(e, r, s) {
676
+ super(e, r, s), e !== "memory" && this.setupPersistence();
677
+ }
678
+ setupPersistence() {
679
+ this.$.pipe(ie(100, void 0, { leading: !0, trailing: !0 })).subscribe((e) => {
680
+ this.storage.save(e).catch((r) => {
681
+ const s = new l(`Error saving to ${this.storageType} storage for ${this.key}`, r);
682
+ this.error$.next(s);
683
+ });
684
+ });
685
+ }
686
+ setupDevTools() {
687
+ typeof window < "u" && (window.__STORES__ = window.__STORES__ || {}, window.__STORES__[this.key] = { getState: () => this.value, set: this.set.bind(this), delete: this.delete.bind(this), clear: this.clear.bind(this), batchUpdate: this.batchUpdate.bind(this), update: this.update.bind(this), subscribe: (e) => {
688
+ const r = this.$.subscribe(e);
689
+ return () => r.unsubscribe();
690
+ } });
691
+ }
692
+ };
693
+ x.type = "collection", x.instances = /* @__PURE__ */ new Map();
694
+ let re = x;
695
+ const k = class k extends X {
696
+ static getInstance(e, r, s) {
697
+ const n = `${e}:${r}`;
698
+ return this.instances.has(n) || this.instances.set(n, new k(e, r, s)), this.instances.get(n);
699
+ }
700
+ set(e, r = !0) {
701
+ try {
702
+ const s = d(this.value, (n) => {
703
+ if (!r) return e;
704
+ Object.assign(n, e);
705
+ });
706
+ this.updateState(s), this.error$.next(null);
707
+ } catch (s) {
708
+ const n = new l(`Error updating store: ${this.key}`, s, { value: e, merge: r });
709
+ this.error$.next(n);
710
+ }
711
+ }
712
+ clear() {
713
+ const e = d(this.defaultValue, (r) => r);
714
+ this.set(e, !1);
715
+ }
716
+ delete(e) {
717
+ const r = d(this.value, (s) => {
718
+ delete s[e];
719
+ });
720
+ this.updateState(r);
721
+ }
722
+ setPath(e, r) {
723
+ try {
724
+ const s = d(this.value, (n) => {
725
+ const a = e.split(".");
726
+ let h = n;
727
+ for (let c = 0; c < a.length - 1; c++) {
728
+ const i = a[c];
729
+ (h[i] === void 0 || typeof h[i] != "object") && (h[i] = {}), h = h[i];
730
+ }
731
+ h[a[a.length - 1]] = r;
732
+ });
733
+ this.updateState(s), this.error$.next(null);
734
+ } catch (s) {
735
+ const n = new l(`Error setting path ${e} in ${this.key}`, s);
736
+ this.error$.next(n);
737
+ }
738
+ }
739
+ processStoredValue(e) {
740
+ return d(this.defaultValue, (r) => {
741
+ Object.assign(r, e);
742
+ });
743
+ }
744
+ setupDevTools() {
745
+ typeof window < "u" && (window.__STORES__ = window.__STORES__ || {}, window.__STORES__[this.key] = { getState: () => this.value, set: this.set.bind(this), delete: this.delete.bind(this), clear: this.clear.bind(this), setPath: this.setPath.bind(this), subscribe: (e) => {
746
+ const r = this.$.subscribe(e);
747
+ return () => r.unsubscribe();
748
+ } });
749
+ }
750
+ };
751
+ k.type = "object", k.instances = /* @__PURE__ */ new Map();
752
+ let se = k;
753
+ const O = class O extends X {
754
+ static getInstance(e, r, s = []) {
755
+ const n = `${e}:${r}`;
756
+ return this.instances.has(n) || this.instances.set(n, new O(e, r, s)), this.instances.get(n);
757
+ }
758
+ constructor(e, r, s = []) {
759
+ super(e, r, s), e !== "memory" && this.setupPersistence();
760
+ }
761
+ setupPersistence() {
762
+ this.$.pipe(ie(100, void 0, { leading: !0, trailing: !0 })).subscribe((e) => {
763
+ this.storage.save(e).catch((r) => {
764
+ const s = new l(`Error saving to ${this.storageType} storage for ${this.key}`, r);
765
+ this.error$.next(s);
766
+ });
767
+ });
768
+ }
769
+ push(...e) {
770
+ try {
771
+ const r = d(this.value, (s) => {
772
+ s.push(...e.map((n) => n));
773
+ });
774
+ this.updateState(r), this.error$.next(null);
775
+ } catch (r) {
776
+ const s = new l(`Error pushing items in ${this.key}`, r);
777
+ this.error$.next(s);
778
+ }
779
+ }
780
+ pop() {
781
+ try {
782
+ const e = this.value.length > 0 ? this.value[this.value.length - 1] : void 0, r = d(this.value, (s) => {
783
+ s.pop();
784
+ });
785
+ return this.updateState(r), this.error$.next(null), e;
786
+ } catch (e) {
787
+ const r = new l(`Error popping item from ${this.key}`, e);
788
+ return void this.error$.next(r);
789
+ }
790
+ }
791
+ unshift(...e) {
792
+ try {
793
+ const r = d(this.value, (s) => {
794
+ s.unshift(...e.map((n) => n));
795
+ });
796
+ this.updateState(r), this.error$.next(null);
797
+ } catch (r) {
798
+ const s = new l(`Error unshifting items in ${this.key}`, r);
799
+ this.error$.next(s);
800
+ }
801
+ }
802
+ shift() {
803
+ try {
804
+ const e = this.value.length > 0 ? this.value[0] : void 0, r = d(this.value, (s) => {
805
+ s.shift();
806
+ });
807
+ return this.updateState(r), this.error$.next(null), e;
808
+ } catch (e) {
809
+ const r = new l(`Error shifting item from ${this.key}`, e);
810
+ return void this.error$.next(r);
811
+ }
812
+ }
813
+ set(e, r) {
814
+ try {
815
+ const s = d(this.value, (n) => {
816
+ if (!(e >= 0 && e < n.length)) throw new Error(`Index ${e} out of bounds (length: ${n.length})`);
817
+ n[e] = r;
818
+ });
819
+ this.updateState(s), this.error$.next(null);
820
+ } catch (s) {
821
+ const n = new l(`Error setting item at index ${e} in ${this.key}`, s);
822
+ this.error$.next(n);
823
+ }
824
+ }
825
+ get(e) {
826
+ return this.value[e];
827
+ }
828
+ splice(e, r, ...s) {
829
+ try {
830
+ const n = [...this.value].splice(e, r ?? 0, ...s), a = d(this.value, (h) => {
831
+ h.splice(e, r ?? 0, ...s.map((c) => c));
832
+ });
833
+ return this.updateState(a), this.error$.next(null), n;
834
+ } catch (n) {
835
+ const a = new l(`Error splicing items in ${this.key}`, n);
836
+ return this.error$.next(a), [];
837
+ }
838
+ }
839
+ remove(e, r) {
840
+ try {
841
+ const s = r || ((a, h) => a === h), n = this.value.findIndex((a) => s(a, e));
842
+ if (n !== -1) {
843
+ const a = d(this.value, (h) => {
844
+ h.splice(n, 1);
845
+ });
846
+ return this.updateState(a), this.error$.next(null), !0;
847
+ }
848
+ return this.error$.next(null), !1;
849
+ } catch (s) {
850
+ const n = new l(`Error removing item in ${this.key}`, s);
851
+ return this.error$.next(n), !1;
852
+ }
853
+ }
854
+ replace(e) {
855
+ try {
856
+ const r = d(e, (s) => s);
857
+ this.updateState(r), this.error$.next(null);
858
+ } catch (r) {
859
+ const s = new l(`Error replacing array in ${this.key}`, r);
860
+ this.error$.next(s);
861
+ }
862
+ }
863
+ filter(e) {
864
+ try {
865
+ const r = this.value.filter(e), s = d(this.value, (n) => {
866
+ n.length = 0, n.push(...r.map((a) => a));
867
+ });
868
+ this.updateState(s), this.error$.next(null);
869
+ } catch (r) {
870
+ const s = new l(`Error filtering array in ${this.key}`, r);
871
+ this.error$.next(s);
872
+ }
873
+ }
874
+ map(e) {
875
+ return this.value.map(e);
876
+ }
877
+ sort(e) {
878
+ try {
879
+ const r = [...this.value].sort(e), s = d(this.value, (n) => {
880
+ n.length = 0, n.push(...r.map((a) => a));
881
+ });
882
+ this.updateState(s), this.error$.next(null);
883
+ } catch (r) {
884
+ const s = new l(`Error sorting array in ${this.key}`, r);
885
+ this.error$.next(s);
886
+ }
887
+ }
888
+ update(e, r) {
889
+ try {
890
+ const s = d(this.value, (n) => {
891
+ if (!(e >= 0 && e < n.length)) throw new Error(`Index ${e} out of bounds (length: ${n.length})`);
892
+ r(n[e]);
893
+ });
894
+ this.updateState(s), this.error$.next(null);
895
+ } catch (s) {
896
+ const n = new l(`Error updating item at index ${e} in ${this.key}`, s);
897
+ this.error$.next(n);
898
+ }
899
+ }
900
+ clear() {
901
+ this.updateState([]);
902
+ }
903
+ setupDevTools() {
904
+ typeof window < "u" && (window.__STORES__ = window.__STORES__ || {}, window.__STORES__[this.key] = { getState: () => this.value, push: this.push.bind(this), pop: this.pop.bind(this), unshift: this.unshift.bind(this), shift: this.shift.bind(this), set: this.set.bind(this), get: this.get.bind(this), splice: this.splice.bind(this), remove: this.remove.bind(this), replace: this.replace.bind(this), filter: this.filter.bind(this), map: this.map.bind(this), sort: this.sort.bind(this), update: this.update.bind(this), clear: this.clear.bind(this), subscribe: (e) => {
905
+ const r = this.$.subscribe(e);
906
+ return () => r.unsubscribe();
907
+ } });
908
+ }
909
+ };
910
+ O.type = "array", O.instances = /* @__PURE__ */ new Map();
911
+ let ne = O;
912
+ export {
913
+ W as I,
914
+ _e as L,
915
+ ye as M,
916
+ se as S,
917
+ ge as a,
918
+ l as b,
919
+ be as c,
920
+ re as d,
921
+ ne as e
922
+ };
923
+ //# sourceMappingURL=context-array-CSGdoQ1W.js.map