diff --git a/assets/index-6wpwBJsk.css b/assets/index-Q1wERP3k.css similarity index 51% rename from assets/index-6wpwBJsk.css rename to assets/index-Q1wERP3k.css index 2754431..ad3879a 100644 --- a/assets/index-6wpwBJsk.css +++ b/assets/index-Q1wERP3k.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.left-0{left:0}.left-1\/2{left:50%}.top-0{top:0}.z-10{z-index:10}.m-10{margin:2.5rem}.m-3{margin:.75rem}.m-8{margin:2rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-1{margin-right:.25rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.box-border{box-sizing:border-box}.flex{display:flex}.h-8{height:2rem}.h-full{height:100%}.min-h-max{min-height:-moz-max-content;min-height:max-content}.min-h-screen{min-height:100vh}.w-32{width:8rem}.w-80{width:20rem}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border-none{border-style:none}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-contain{background-size:contain}.p-0{padding:0}.p-3{padding:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-amber-950{--tw-text-opacity: 1;color:rgb(69 26 3 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-500{transition-duration:.5s}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){.sm\:mx-20{margin-left:5rem;margin-right:5rem}.sm\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 768px){.md\:left-1\/3{left:33.333333%}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:ml-20{margin-left:5rem}.md\:mr-2{margin-right:.5rem}.md\:mr-20{margin-right:5rem}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 1280px){.xl\:text-3xl{font-size:1.875rem;line-height:2.25rem}.xl\:text-base{font-size:1rem;line-height:1.5rem}.xl\:text-xl{font-size:1.25rem;line-height:1.75rem}} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.left-0{left:0}.left-1\/2{left:50%}.top-0{top:0}.z-10{z-index:10}.z-20{z-index:20}.m-10{margin:2.5rem}.m-3{margin:.75rem}.m-8{margin:2rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-2{margin-bottom:.5rem}.ml-2{margin-left:.5rem}.mr-1{margin-right:.25rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-6{margin-top:1.5rem}.box-border{box-sizing:border-box}.flex{display:flex}.h-8{height:2rem}.h-full{height:100%}.min-h-max{min-height:-moz-max-content;min-height:max-content}.min-h-screen{min-height:100vh}.w-32{width:8rem}.w-80{width:20rem}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border-none{border-style:none}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity))}.bg-slate-200{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity))}.bg-slate-400{--tw-bg-opacity: 1;background-color:rgb(148 163 184 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-contain{background-size:contain}.p-0{padding:0}.p-3{padding:.75rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-amber-950{--tw-text-opacity: 1;color:rgb(69 26 3 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-orange-900{--tw-text-opacity: 1;color:rgb(124 45 18 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-500{transition-duration:.5s}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media (min-width: 640px){.sm\:mx-20{margin-left:5rem;margin-right:5rem}.sm\:py-10{padding-top:2.5rem;padding-bottom:2.5rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 768px){.md\:left-1\/3{left:33.333333%}.md\:my-2{margin-top:.5rem;margin-bottom:.5rem}.md\:ml-20{margin-left:5rem}.md\:mr-2{margin-right:.5rem}.md\:mr-20{margin-right:5rem}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:text-2xl{font-size:1.5rem;line-height:2rem}.lg\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 1280px){.xl\:text-3xl{font-size:1.875rem;line-height:2.25rem}.xl\:text-base{font-size:1rem;line-height:1.5rem}.xl\:text-xl{font-size:1.25rem;line-height:1.75rem}} diff --git a/assets/index-12iO57Yv.js b/assets/index-eQQMQrRa.js similarity index 95% rename from assets/index-12iO57Yv.js rename to assets/index-eQQMQrRa.js index 855f592..782156d 100644 --- a/assets/index-12iO57Yv.js +++ b/assets/index-eQQMQrRa.js @@ -72,4 +72,4 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var _r=E;function qh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bh=typeof Object.is=="function"?Object.is:qh,ev=_r.useSyncExternalStore,tv=_r.useRef,nv=_r.useEffect,rv=_r.useMemo,lv=_r.useDebugValue;bf.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=tv(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=rv(function(){function s(v){if(!a){if(a=!0,d=v,v=r(v),l!==void 0&&o.hasValue){var y=o.value;if(l(y,v))return p=y}return p=v}if(y=p,bh(d,v))return y;var g=r(v);return l!==void 0&&l(y,g)?y:(d=v,p=g)}var a=!1,d,p,h=n===void 0?null:n;return[function(){return s(t())},h===null?void 0:function(){return s(h())}]},[t,n,r,l]);var u=ev(e,i[0],i[1]);return nv(function(){o.hasValue=!0,o.value=u},[u]),lv(u),u};qf.exports=bf;var iv=qf.exports;function ov(e){e()}var ed=ov,uv=e=>ed=e,sv=()=>ed,we="default"in Ai?Yo:Ai,pa=Symbol.for("react-redux-context"),ma=typeof globalThis<"u"?globalThis:{};function av(){if(!we.createContext)return{};const e=ma[pa]??(ma[pa]=new Map);let t=e.get(we.createContext);return t||(t=we.createContext(null),e.set(we.createContext,t)),t}var Et=av(),cv=()=>{throw new Error("uSES not initialized!")};function Wu(e=Et){return function(){return we.useContext(e)}}var td=Wu(),nd=cv,fv=e=>{nd=e},dv=(e,t)=>e===t;function pv(e=Et){const t=e===Et?td:Wu(e);return function(r,l={}){const{equalityFn:i=dv,devModeChecks:o={}}=typeof l=="function"?{equalityFn:l}:l,{store:u,subscription:s,getServerState:a,stabilityCheck:d,identityFunctionCheck:p}=t();we.useRef(!0);const h=we.useCallback({[r.name](y){return r(y)}}[r.name],[r,d,o.stabilityCheck]),v=nd(s.addNestedSub,u.getState,a||u.getState,h,i);return we.useDebugValue(v),v}}var Ll=pv();function mv(){const e=sv();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],l=t;for(;l;)r.push(l),l=l.next;return r},subscribe(r){let l=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!l||t===null||(l=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var ha={notify(){},get:()=>[]};function hv(e,t){let n,r=ha,l=0,i=!1;function o(g){d();const S=r.subscribe(g);let f=!1;return()=>{f||(f=!0,S(),p())}}function u(){r.notify()}function s(){y.onStateChange&&y.onStateChange()}function a(){return i}function d(){l++,n||(n=t?t.addNestedSub(s):e.subscribe(s),r=mv())}function p(){l--,n&&l===0&&(n(),n=void 0,r.clear(),r=ha)}function h(){i||(i=!0,d())}function v(){i&&(i=!1,p())}const y={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:a,trySubscribe:h,tryUnsubscribe:v,getListeners:()=>r};return y}var vv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yv=vv?we.useLayoutEffect:we.useEffect;function gv({store:e,context:t,children:n,serverState:r,stabilityCheck:l="once",identityFunctionCheck:i="once"}){const o=we.useMemo(()=>{const a=hv(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0,stabilityCheck:l,identityFunctionCheck:i}},[e,r,l,i]),u=we.useMemo(()=>e.getState(),[e]);yv(()=>{const{subscription:a}=o;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),u!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[o,u]);const s=t||Et;return we.createElement(s.Provider,{value:o},n)}var wv=gv;function rd(e=Et){const t=e===Et?td:Wu(e);return function(){const{store:r}=t();return r}}var Sv=rd();function xv(e=Et){const t=e===Et?Sv:rd(e);return function(){return t().dispatch}}var Cr=xv();fv(iv.useSyncExternalStoreWithSelector);uv($f.unstable_batchedUpdates);function ee(e){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. `}var kv=typeof Symbol=="function"&&Symbol.observable||"@@observable",va=kv,Di=()=>Math.random().toString(36).substring(7).split("").join("."),Ev={INIT:`@@redux/INIT${Di()}`,REPLACE:`@@redux/REPLACE${Di()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Di()}`},Il=Ev;function Vu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ld(e,t,n){if(typeof e!="function")throw new Error(ee(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ee(1));return n(ld)(e,t)}let r=e,l=t,i=new Map,o=i,u=0,s=!1;function a(){o===i&&(o=new Map,i.forEach((S,f)=>{o.set(f,S)}))}function d(){if(s)throw new Error(ee(3));return l}function p(S){if(typeof S!="function")throw new Error(ee(4));if(s)throw new Error(ee(5));let f=!0;a();const c=u++;return o.set(c,S),function(){if(f){if(s)throw new Error(ee(6));f=!1,a(),o.delete(c),i=null}}}function h(S){if(!Vu(S))throw new Error(ee(7));if(typeof S.type>"u")throw new Error(ee(8));if(typeof S.type!="string")throw new Error(ee(17));if(s)throw new Error(ee(9));try{s=!0,l=r(l,S)}finally{s=!1}return(i=o).forEach(c=>{c()}),S}function v(S){if(typeof S!="function")throw new Error(ee(10));r=S,h({type:Il.REPLACE})}function y(){const S=p;return{subscribe(f){if(typeof f!="object"||f===null)throw new Error(ee(11));function c(){const w=f;w.next&&w.next(d())}return c(),{unsubscribe:S(c)}},[va](){return this}}}return h({type:Il.INIT}),{dispatch:h,subscribe:p,getState:d,replaceReducer:v,[va]:y}}function _v(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Il.INIT})>"u")throw new Error(ee(12));if(typeof n(void 0,{type:Il.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function Cv(e){const t=Object.keys(e),n={};for(let i=0;i"u")throw u&&u.type,new Error(ee(14));a[p]=y,s=s||y!==v}return s=s||r.length!==Object.keys(o).length,s?a:o}}function Ml(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Pv(...e){return t=>(n,r)=>{const l=t(n,r);let i=()=>{throw new Error(ee(15))};const o={getState:l.getState,dispatch:(s,...a)=>i(s,...a)},u=e.map(s=>s(o));return i=Ml(...u)(l.dispatch),{...l,dispatch:i}}}function Nv(e){return Vu(e)&&"type"in e&&typeof e.type=="string"}var id=Symbol.for("immer-nothing"),ya=Symbol.for("immer-draftable"),ke=Symbol.for("immer-state");function Fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Sn=Object.getPrototypeOf;function _t(e){return!!e&&!!e[ke]}function nt(e){var t;return e?od(e)||Array.isArray(e)||!!e[ya]||!!((t=e.constructor)!=null&&t[ya])||ri(e)||li(e):!1}var zv=Object.prototype.constructor.toString();function od(e){if(!e||typeof e!="object")return!1;const t=Sn(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zv}function mr(e,t){ni(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function ni(e){const t=e[ke];return t?t.type_:Array.isArray(e)?1:ri(e)?2:li(e)?3:0}function Uo(e,t){return ni(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ud(e,t,n){const r=ni(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Rv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ri(e){return e instanceof Map}function li(e){return e instanceof Set}function Lt(e){return e.copy_||e.base_}function Ao(e,t){if(ri(e))return new Map(e);if(li(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&od(e))return Sn(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[ke];let r=Reflect.ownKeys(n);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=Tv),Object.freeze(e),t&&mr(e,(n,r)=>Hu(r,!0))),e}function Tv(){Fe(2)}function ii(e){return Object.isFrozen(e)}var Ov={};function Ht(e){const t=Ov[e];return t||Fe(0,e),t}var hr;function sd(){return hr}function jv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ga(e,t){t&&(Ht("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $o(e){Bo(e),e.drafts_.forEach(Lv),e.drafts_=null}function Bo(e){e===hr&&(hr=e.parent_)}function wa(e){return hr=jv(hr,e)}function Lv(e){const t=e[ke];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sa(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ke].modified_&&($o(t),Fe(4)),nt(e)&&(e=Dl(t,e),t.parent_||Fl(t,e)),t.patches_&&Ht("Patches").generateReplacementPatches_(n[ke].base_,e,t.patches_,t.inversePatches_)):e=Dl(t,n,[]),$o(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==id?e:void 0}function Dl(e,t,n){if(ii(t))return t;const r=t[ke];if(!r)return mr(t,(l,i)=>xa(e,r,t,l,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Fl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const l=r.copy_;let i=l,o=!1;r.type_===3&&(i=new Set(l),l.clear(),o=!0),mr(i,(u,s)=>xa(e,r,l,u,s,n,o)),Fl(e,l,!1),n&&e.patches_&&Ht("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function xa(e,t,n,r,l,i,o){if(_t(l)){const u=i&&t&&t.type_!==3&&!Uo(t.assigned_,r)?i.concat(r):void 0,s=Dl(e,l,u);if(ud(n,r,s),_t(s))e.canAutoFreeze_=!1;else return}else o&&n.add(l);if(nt(l)&&!ii(l)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Dl(e,l),(!t||!t.scope_.parent_)&&Fl(e,l)}}function Fl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hu(t,n)}function Iv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:sd(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let l=r,i=Qu;n&&(l=[r],i=vr);const{revoke:o,proxy:u}=Proxy.revocable(l,i);return r.draft_=u,r.revoke_=o,u}var Qu={get(e,t){if(t===ke)return e;const n=Lt(e);if(!Uo(n,t))return Mv(e,n,t);const r=n[t];return e.finalized_||!nt(r)?r:r===Fi(e.base_,t)?(Ui(e),e.copy_[t]=Vo(r,e)):r},has(e,t){return t in Lt(e)},ownKeys(e){return Reflect.ownKeys(Lt(e))},set(e,t,n){const r=ad(Lt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const l=Fi(Lt(e),t),i=l==null?void 0:l[ke];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Rv(n,l)&&(n!==void 0||Uo(e.base_,t)))return!0;Ui(e),Wo(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Fi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ui(e),Wo(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Lt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fe(11)},getPrototypeOf(e){return Sn(e.base_)},setPrototypeOf(){Fe(12)}},vr={};mr(Qu,(e,t)=>{vr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});vr.deleteProperty=function(e,t){return vr.set.call(this,e,t,void 0)};vr.set=function(e,t,n){return Qu.set.call(this,e[0],t,n,e[0])};function Fi(e,t){const n=e[ke];return(n?Lt(n):e)[t]}function Mv(e,t,n){var l;const r=ad(t,n);return r?"value"in r?r.value:(l=r.get)==null?void 0:l.call(e.draft_):void 0}function ad(e,t){if(!(t in e))return;let n=Sn(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Sn(n)}}function Wo(e){e.modified_||(e.modified_=!0,e.parent_&&Wo(e.parent_))}function Ui(e){e.copy_||(e.copy_=Ao(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Dv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(s=i,...a){return o.produce(s,d=>n.call(this,d,...a))}}typeof n!="function"&&Fe(6),r!==void 0&&typeof r!="function"&&Fe(7);let l;if(nt(t)){const i=wa(this),o=Vo(t,void 0);let u=!0;try{l=n(o),u=!1}finally{u?$o(i):Bo(i)}return ga(i,r),Sa(l,i)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===id&&(l=void 0),this.autoFreeze_&&Hu(l,!0),r){const i=[],o=[];Ht("Patches").generateReplacementPatches_(t,l,i,o),r(i,o)}return l}else Fe(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...u)=>this.produceWithPatches(o,s=>t(s,...u));let r,l;return[this.produce(t,n,(o,u)=>{r=o,l=u}),r,l]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nt(e)||Fe(8),_t(e)&&(e=cd(e));const t=wa(this),n=Vo(e,void 0);return n[ke].isManual_=!0,Bo(t),n}finishDraft(e,t){const n=e&&e[ke];(!n||!n.isManual_)&&Fe(9);const{scope_:r}=n;return ga(r,t),Sa(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));const r=Ht("Patches").applyPatches_;return _t(e)?r(e,t):this.produce(e,l=>r(l,t))}};function Vo(e,t){const n=ri(e)?Ht("MapSet").proxyMap_(e,t):li(e)?Ht("MapSet").proxySet_(e,t):Iv(e,t);return(t?t.scope_:sd()).drafts_.push(n),n}function cd(e){return _t(e)||Fe(10,e),fd(e)}function fd(e){if(!nt(e)||ii(e))return e;const t=e[ke];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ao(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ao(e,!0);return mr(n,(r,l)=>{ud(n,r,fd(l))}),t&&(t.finalized_=!1),n}var Ee=new Dv,dd=Ee.produce;Ee.produceWithPatches.bind(Ee);Ee.setAutoFreeze.bind(Ee);Ee.setUseStrictShallowCopy.bind(Ee);Ee.applyPatches.bind(Ee);Ee.createDraft.bind(Ee);Ee.finishDraft.bind(Ee);function Fv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Uv(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var ka=e=>Array.isArray(e)?e:[e];function Av(e){const t=Array.isArray(e[0])?e[0]:e;return Uv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $v(e,t){const n=[],{length:r}=e;for(let l=0;l{n=Qr(),o.resetResultsCount()},o.resultsCount=()=>i,o.resetResultsCount=()=>{i=0},o}function Hv(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...l)=>{let i=0,o=0,u,s={},a=l.pop();typeof a=="object"&&(s=a,a=l.pop()),Fv(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const d={...n,...s},{memoize:p,memoizeOptions:h=[],argsMemoize:v=pd,argsMemoizeOptions:y=[],devModeChecks:g={}}=d,S=ka(h),f=ka(y),c=Av(l),m=p(function(){return i++,a.apply(null,arguments)},...S),w=v(function(){o++;const N=$v(c,arguments);return u=m.apply(null,N),u},...f);return Object.assign(w,{resultFunc:a,memoizedResultFunc:m,dependencies:c,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:v})}}function md(e){return({dispatch:n,getState:r})=>l=>i=>typeof i=="function"?i(n,r,e):l(i)}var Qv=md(),Kv=md,Xv=(...e)=>{const t=Hv(...e);return(...n)=>{const r=t(...n),l=(i,...o)=>r(_t(i)?cd(i):i,...o);return Object.assign(l,r),l}};Xv(pd);var Yv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ml:Ml.apply(null,arguments)};function yr(e,t){function n(...r){if(t){let l=t(...r);if(!l)throw new Error($e(0));return{type:e,payload:l.payload,..."meta"in l&&{meta:l.meta},..."error"in l&&{error:l.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Nv(r)&&r.type===e,n}var hd=class $n extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$n.prototype)}static get[Symbol.species](){return $n}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $n(...t[0].concat(this)):new $n(...t.concat(this))}};function _a(e){return nt(e)?dd(e,()=>{}):e}function Ca(e,t,n){if(e.has(t)){let l=e.get(t);return n.update&&(l=n.update(l,t,e),e.set(t,l)),l}if(!n.insert)throw new Error($e(10));const r=n.insert(t,e);return e.set(t,r),r}function Gv(e){return typeof e=="boolean"}var Jv=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:l=!0,actionCreatorCheck:i=!0}=t??{};let o=new hd;return n&&(Gv(n)?o.push(Qv):o.push(Kv(n.extraArgument))),o},Zv="RTK_autoBatch",vd=e=>t=>{setTimeout(t,e)},qv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vd(10),bv=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let l=!0,i=!1,o=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?qv:e.type==="callback"?e.queueNotification:vd(e.timeout),a=()=>{o=!1,i&&(i=!1,u.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const p=()=>l&&d(),h=r.subscribe(p);return u.add(d),()=>{h(),u.delete(d)}},dispatch(d){var p;try{return l=!((p=d==null?void 0:d.meta)!=null&&p[Zv]),i=!l,i&&(o||(o=!0,s(a))),r.dispatch(d)}finally{l=!0}}})},ey=e=>function(n){const{autoBatch:r=!0}=n??{};let l=new hd(e);return r&&l.push(bv(typeof r=="object"?r:void 0)),l},ty=!0;function ny(e){const t=Jv(),{reducer:n=void 0,middleware:r,devTools:l=!0,preloadedState:i=void 0,enhancers:o=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(Vu(n))u=Cv(n);else throw new Error($e(1));let s;typeof r=="function"?s=r(t):s=t();let a=Ml;l&&(a=Yv({trace:!ty,...typeof l=="object"&&l}));const d=Pv(...s),p=ey(d);let h=typeof o=="function"?o(p):p();const v=a(...h);return ld(u,i,v)}function yd(e){const t={},n=[];let r;const l={addCase(i,o){const u=typeof i=="string"?i:i.type;if(!u)throw new Error($e(28));if(u in t)throw new Error($e(29));return t[u]=o,l},addMatcher(i,o){return n.push({matcher:i,reducer:o}),l},addDefaultCase(i){return r=i,l}};return e(l),[t,n,r]}function ry(e){return typeof e=="function"}function ly(e,t){let[n,r,l]=yd(t),i;if(ry(e))i=()=>_a(e());else{const u=_a(e);i=()=>u}function o(u=i(),s){let a=[n[s.type],...r.filter(({matcher:d})=>d(s)).map(({reducer:d})=>d)];return a.filter(d=>!!d).length===0&&(a=[l]),a.reduce((d,p)=>{if(p)if(_t(d)){const v=p(d,s);return v===void 0?d:v}else{if(nt(d))return dd(d,h=>p(h,s));{const h=p(d,s);if(h===void 0){if(d===null)return d;throw new Error($e(9))}return h}}return d},u)}return o.getInitialState=i,o}var iy=Symbol.for("rtk-slice-createasyncthunk");function oy(e,t){return`${e}/${t}`}function uy({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[iy];return function(l){const{name:i,reducerPath:o=i}=l;if(!i)throw new Error($e(11));typeof process<"u";const u=(typeof l.reducers=="function"?l.reducers(ay()):l.reducers)||{},s=Object.keys(u),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,f){const c=typeof S=="string"?S:S.type;if(!c)throw new Error($e(12));if(c in a.sliceCaseReducersByType)throw new Error($e(13));return a.sliceCaseReducersByType[c]=f,d},addMatcher(S,f){return a.sliceMatchers.push({matcher:S,reducer:f}),d},exposeAction(S,f){return a.actionCreators[S]=f,d},exposeCaseReducer(S,f){return a.sliceCaseReducersByName[S]=f,d}};s.forEach(S=>{const f=u[S],c={reducerName:S,type:oy(i,S),createNotation:typeof l.reducers=="function"};fy(f)?py(c,f,d,t):cy(c,f,d)});function p(){const[S={},f=[],c=void 0]=typeof l.extraReducers=="function"?yd(l.extraReducers):[l.extraReducers],m={...S,...a.sliceCaseReducersByType};return ly(l.initialState,w=>{for(let k in m)w.addCase(k,m[k]);for(let k of a.sliceMatchers)w.addMatcher(k.matcher,k.reducer);for(let k of f)w.addMatcher(k.matcher,k.reducer);c&&w.addDefaultCase(c)})}const h=S=>S,v=new WeakMap;let y;const g={name:i,reducerPath:o,reducer(S,f){return y||(y=p()),y(S,f)},actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState(){return y||(y=p()),y.getInitialState()},getSelectors(S=h){const f=Ca(v,this,{insert:()=>new WeakMap});return Ca(f,S,{insert:()=>{const c={};for(const[m,w]of Object.entries(l.selectors??{}))c[m]=sy(this,w,S,this!==g);return c}})},selectSlice(S){let f=S[this.reducerPath];return typeof f>"u"&&this!==g&&(f=this.getInitialState()),f},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(S,{reducerPath:f,...c}={}){const m=f??this.reducerPath;return S.inject({reducerPath:m,reducer:this.reducer},c),{...this,reducerPath:m}}};return g}}function sy(e,t,n,r){function l(i,...o){let u=n.call(e,i);return typeof u>"u"&&r&&(u=e.getInitialState()),t(u,...o)}return l.unwrapped=t,l}var Ku=uy();function ay(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function cy({type:e,reducerName:t,createNotation:n},r,l){let i,o;if("reducer"in r){if(n&&!dy(r))throw new Error($e(17));i=r.reducer,o=r.prepare}else i=r;l.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?yr(e,o):yr(e))}function fy(e){return e._reducerDefinitionType==="asyncThunk"}function dy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function py({type:e,reducerName:t},n,r,l){if(!l)throw new Error($e(18));const{payloadCreator:i,fulfilled:o,pending:u,rejected:s,settled:a,options:d}=n,p=l(e,i,d);r.exposeAction(t,p),o&&r.addCase(p.fulfilled,o),u&&r.addCase(p.pending,u),s&&r.addCase(p.rejected,s),a&&r.addMatcher(p.settled,a),r.exposeCaseReducer(t,{fulfilled:o||Kr,pending:u||Kr,rejected:s||Kr,settled:a||Kr})}function Kr(){}var Xu="listenerMiddleware";yr(`${Xu}/add`);yr(`${Xu}/removeAll`);yr(`${Xu}/remove`);function $e(e){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. `}const my={items:[],length:0},gd=Ku({name:"cart",initialState:my,reducers:{addToCart:(e,t)=>{e.items.push(t.payload)},removeFromCart:(e,t)=>{const n=t.payload;n>=0&&n{e.length=t.payload}}}),{addToCart:hy,removeFromCart:vy,addCount:Yu}=gd.actions,yy=gd.reducer,Gu=()=>{const e=Cr(),[t,n]=E.useState(0),r=sessionStorage.getItem("cartItems"),l=Ll(i=>i.cart.length);return E.useEffect(()=>{if(l===0){const i=JSON.parse(r||"[]");n(i.length),e(Yu(i.length))}else n(l)},[l]),_.jsxs("nav",{className:"fixed z-10 left-1/2 md:left-1/3 w-90 flex flex-col md:flex-row justify-between md:items-center h-{50px} px-5 bg-gray-500 text-white",children:[_.jsx("h3",{className:"md:mr-20 font-bold",children:"goods"}),_.jsxs("span",{className:"flex flex-col md:flex-row justify-between items-center",children:[_.jsx(Fo,{className:"mr-8 my-1 md:my-2 text-1xl md:text-2xl",to:"/e-commmerce_SPA/",children:"Все товары"}),_.jsxs(Fo,{className:"flex md:mr-2 md:my-2 text-1xl md:text-2xl",to:"/e-commmerce_SPA/favorite",children:["Ваша корзина ",_.jsx("p",{className:"mr-1 text-base font-bold",children:t})]})]})]})},gy=()=>{const[e,t]=E.useState([]);return E.useEffect(()=>{Jh().then(n=>{t(n)})},[]),_.jsxs(_.Fragment,{children:[_.jsx(Gu,{}),_.jsx("h2",{className:"ml-2 md:ml-20 text-1xl text-2xl md:text-3xl underline",children:"Все товары"}),_.jsx("div",{className:"m-8 flex flex-wrap justify-center ",children:e.map(n=>_.jsxs(Fo,{className:"m-10 w-282 flex flex-col items-center box-border rounded-10 overflow-hidden bg-gray-100 cursor-pointer shadow-md hover:shadow-2xl",to:`/e-commmerce_SPA/product/${n.id}`,children:[n.colors.length>0&&_.jsx("div",{className:"",children:_.jsx("img",{className:"w-80 bg-contain ",src:n.colors[0].images[0],alt:n.colors[0].name})}),_.jsx("h2",{className:"my-5 mr-5 xl:text-3xl lg:text-2xl sm:text-xl font-bold text-orange-900",children:n.name})]},n.id))})]})},wy=()=>{const e=Cr(),[t,n]=E.useState([]);E.useEffect(()=>{const i=JSON.parse(sessionStorage.getItem("cartItems")||"[]");console.log(i),n(i)},[]);const r=i=>{sessionStorage.setItem("cartItems",JSON.stringify(i))},l=i=>{e(vy(i)),n(o=>{const u=o.filter((s,a)=>a!==i);return r(u),e(Yu(u.length)),u})};return _.jsxs(_.Fragment,{children:[_.jsx(Gu,{}),_.jsx("h2",{className:"ml-20 text-3xl underline",children:"Ваша корзина"}),_.jsxs("div",{className:"m-8 flex flex-wrap justify-center",children:[t.length===0&&_.jsx("h2",{className:"mt-3 xl:text-3xl lg:text-2xl sm:text-sm font-bold text-amber-950",children:"товаров в корзине нет"}),t.map((i,o)=>_.jsxs("div",{className:"m-10 w-282 flex flex-col items-center box-border rounded-10 overflow-hidden bg-gray-100 shadow-md rounded",children:[_.jsx("div",{className:"min-h-max",children:_.jsx("img",{className:"w-80 bg-contain cursor-pointer hover:shadow-2xl",src:i.photo,alt:i.nameProduct,title:"фото товара"})}),_.jsx("h2",{className:"mt-3 xl:text-3xl lg:text-2xl sm:text-sm font-bold text-amber-950",children:i.nameProduct}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["цвет: ",i.colorName]}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["размер: ",i.sizeName," "]}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["цена: ",i.price," "]}),_.jsx("button",{className:"mb-2 bg-slate-400 rounded-full",onClick:()=>l(o),children:_.jsx("p",{className:"py-2 px-3 font-bold xl:text-base lg:text-base sm:text-sm text-black",children:"Удалить из корзины"})})]},o))]})]})},Sy={isOpen:!1,images:[],currentImageIndex:0},wd=Ku({name:"popup",initialState:Sy,reducers:{openPopup:(e,t)=>{e.isOpen=!0,e.images=t.payload,e.currentImageIndex=0},closePopup:e=>{e.isOpen=!1,e.images=[],e.currentImageIndex=0},nextImage:e=>{e.currentImageIndex=(e.currentImageIndex+1)%e.images.length},prevImage:e=>{e.currentImageIndex=(e.currentImageIndex-1+e.images.length)%e.images.length}}}),{openPopup:xy,closePopup:ky,nextImage:Ey,prevImage:_y}=wd.actions,Cy=wd.reducer,Py={selectedSizes:{}},Sd=Ku({name:"sizeSelect",initialState:Py,reducers:{isSelect:(e,t)=>{const{cardId:n,sizeName:r}=t.payload;e.selectedSizes={...e.selectedSizes,[n]:r}},notSelect:(e,t)=>{const n=t.payload;e.selectedSizes={...e.selectedSizes,[n]:null}}}}),{isSelect:Ny,notSelect:xd}=Sd.actions,zy=Sd.reducer,Ry=({sizes:e,colorId:t})=>{const n=Cr(),[r,l]=E.useState([]),[i,o]=E.useState(null);E.useEffect(()=>{(async()=>{const a=e.map(async p=>(await Gh(p)).label),d=await Promise.all(a);l(d)})()},[e]);const u=s=>{i===s?(o(null),n(xd(t.toString()))):(o(s),n(Ny({cardId:t.toString(),sizeName:s})))};return _.jsx("div",{className:"flex",children:r.map((s,a)=>_.jsx("p",{className:`m-3 p-0 cursor-pointer font-bold ${i===s?"underline":""}`,onClick:()=>u(s),children:s},a))})},Ty=()=>{const e=Cr(),{isOpen:t,images:n,currentImageIndex:r}=Ll(u=>u.popup),l=()=>{e(ky())},i=()=>{e(Ey())},o=()=>{e(_y())};return!t||!n.length?null:_.jsx("div",{className:`fixed top-0 left-0 w-full h-full flex items-center justify-center bg-black bg-opacity-50 transition-all duration-500 ${t?"visible opacity-100":"invisible opacity-0"}`,children:_.jsxs("div",{className:"w-430 mx-auto bg-white shadow-md rounded-10 flex flex-col items-center",children:[_.jsx("button",{type:"button",className:"w-32 h-8 bg-slate-400 border-none font-bold text-24 text-black",onClick:l,children:"Закрыть ×"}),_.jsx("img",{className:"w-80 bg-contain",src:n[r],alt:`Image ${r+1}`}),_.jsxs("div",{className:"flex justify-between w-full items-start p-3",children:[_.jsx("button",{className:"w-32 h-8 bg-slate-400 font-bold text-24 text-black",onClick:o,children:"< Предыдущая"}),_.jsx("button",{className:"w-32 h-8 bg-slate-400 font-bold text-24 text-black",onClick:i,children:"Следующая >"})]})]})})},Oy=()=>{const e=Cr(),{id:t}=_h(),[n,r]=E.useState([]),[l,i]=E.useState(""),[o,u]=E.useState([]),{items:s}=Ll(v=>v.cart),{selectedSizes:a}=Ll(v=>v.sizeSelect);E.useEffect(()=>{sessionStorage.setItem("cartItems",JSON.stringify(s)),e(Yu(s.length))},[s]);const d=async()=>{if(t!==void 0){const v=await Zh(parseInt(t.toString()));i(v.name),r(v.colors);const g=await Promise.all(v.colors.map(async S=>S.sizes));u(g)}};E.useEffect(()=>{d()},[d]);const p=v=>{const g=v.currentTarget.getAttribute("data-images");g&&e(xy(JSON.parse(g)))},h=(v,y,g,S,f,c)=>{e(hy({colorName:y,sizeName:f,photo:g,price:S,nameProduct:v})),e(xd(c.toString()))};return _.jsxs(_.Fragment,{children:[_.jsx(Gu,{}),_.jsx("h2",{className:"ml-2 md:ml-20 text-1xl text-2xl md:text-3xl underline",children:l}),_.jsx("div",{className:"m-8 flex flex-wrap justify-center",children:n.map((v,y)=>_.jsxs("div",{className:"m-10 w-282 flex flex-col items-center box-border rounded-10 overflow-hidden bg-gray-100 shadow-md rounded",children:[_.jsx("div",{className:"",children:_.jsx("img",{className:"w-80 bg-contain cursor-pointer hover:shadow-2xl",src:v.images[0],alt:v.name,title:"посмотреть","data-images":JSON.stringify(v.images),onClick:p,onTouchStart:p})}),_.jsxs("h2",{className:"mt-3 xl:text-3xl lg:text-2xl sm:text-sm font-bold text-amber-950",children:["цвет: ",v.name]}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["цена: ",v.price," "]}),_.jsx("p",{className:"my-2",children:"выберете размер:"}),v.sizes.length>0?_.jsxs("div",{className:"flex flex-col items-center",children:[_.jsx(Ry,{sizes:o[y],colorId:v.id}),_.jsx("button",{className:`mb-2 ${a[v.id]?"bg-slate-400":"bg-gray-300"} rounded-full`,disabled:!a[v.id],onClick:()=>{const g=a[v.id];g!==null&&h(l,v.name,v.images[0],v.price,g,v.id)},children:_.jsx("p",{className:"py-2 px-3 font-bold xl:text-base lg:text-base sm:text-sm text-black",children:"Добавить в корзину"})})]}):_.jsx("p",{className:"my-2 font-bold xl:text-base lg:text-base sm:text-sm",children:"нет в наличии"})]},v.id))}),_.jsx(Ty,{})]})},jy=()=>_.jsxs("main",{className:"bg-slate-200 min-h-screen",children:[_.jsx("h1",{className:"py-5 mx-2 sm:py-10 sm:mx-20 text-2xl md:text-5xl sm:text-3xl font-bold",children:"E-commerce"}),_.jsxs(Uh,{children:[_.jsx(il,{path:"/e-commmerce_SPA/",element:_.jsx(gy,{})}),_.jsx(il,{path:"/e-commmerce_SPA/product/:id",element:_.jsx(Oy,{})}),_.jsx(il,{path:"/e-commmerce_SPA/favorite",element:_.jsx(wy,{})})]})]}),Ly=ny({reducer:{popup:Cy,cart:yy,sizeSelect:zy}});$i.createRoot(document.getElementById("root")).render(_.jsx(Yo.StrictMode,{children:_.jsx(wv,{store:Ly,children:_.jsx(Hh,{children:_.jsx(jy,{})})})})); + */var _r=E;function qh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bh=typeof Object.is=="function"?Object.is:qh,ev=_r.useSyncExternalStore,tv=_r.useRef,nv=_r.useEffect,rv=_r.useMemo,lv=_r.useDebugValue;bf.useSyncExternalStoreWithSelector=function(e,t,n,r,l){var i=tv(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=rv(function(){function s(v){if(!a){if(a=!0,d=v,v=r(v),l!==void 0&&o.hasValue){var y=o.value;if(l(y,v))return p=y}return p=v}if(y=p,bh(d,v))return y;var g=r(v);return l!==void 0&&l(y,g)?y:(d=v,p=g)}var a=!1,d,p,h=n===void 0?null:n;return[function(){return s(t())},h===null?void 0:function(){return s(h())}]},[t,n,r,l]);var u=ev(e,i[0],i[1]);return nv(function(){o.hasValue=!0,o.value=u},[u]),lv(u),u};qf.exports=bf;var iv=qf.exports;function ov(e){e()}var ed=ov,uv=e=>ed=e,sv=()=>ed,we="default"in Ai?Yo:Ai,pa=Symbol.for("react-redux-context"),ma=typeof globalThis<"u"?globalThis:{};function av(){if(!we.createContext)return{};const e=ma[pa]??(ma[pa]=new Map);let t=e.get(we.createContext);return t||(t=we.createContext(null),e.set(we.createContext,t)),t}var Et=av(),cv=()=>{throw new Error("uSES not initialized!")};function Wu(e=Et){return function(){return we.useContext(e)}}var td=Wu(),nd=cv,fv=e=>{nd=e},dv=(e,t)=>e===t;function pv(e=Et){const t=e===Et?td:Wu(e);return function(r,l={}){const{equalityFn:i=dv,devModeChecks:o={}}=typeof l=="function"?{equalityFn:l}:l,{store:u,subscription:s,getServerState:a,stabilityCheck:d,identityFunctionCheck:p}=t();we.useRef(!0);const h=we.useCallback({[r.name](y){return r(y)}}[r.name],[r,d,o.stabilityCheck]),v=nd(s.addNestedSub,u.getState,a||u.getState,h,i);return we.useDebugValue(v),v}}var Ll=pv();function mv(){const e=sv();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],l=t;for(;l;)r.push(l),l=l.next;return r},subscribe(r){let l=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!l||t===null||(l=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var ha={notify(){},get:()=>[]};function hv(e,t){let n,r=ha,l=0,i=!1;function o(g){d();const S=r.subscribe(g);let f=!1;return()=>{f||(f=!0,S(),p())}}function u(){r.notify()}function s(){y.onStateChange&&y.onStateChange()}function a(){return i}function d(){l++,n||(n=t?t.addNestedSub(s):e.subscribe(s),r=mv())}function p(){l--,n&&l===0&&(n(),n=void 0,r.clear(),r=ha)}function h(){i||(i=!0,d())}function v(){i&&(i=!1,p())}const y={addNestedSub:o,notifyNestedSubs:u,handleChangeWrapper:s,isSubscribed:a,trySubscribe:h,tryUnsubscribe:v,getListeners:()=>r};return y}var vv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yv=vv?we.useLayoutEffect:we.useEffect;function gv({store:e,context:t,children:n,serverState:r,stabilityCheck:l="once",identityFunctionCheck:i="once"}){const o=we.useMemo(()=>{const a=hv(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0,stabilityCheck:l,identityFunctionCheck:i}},[e,r,l,i]),u=we.useMemo(()=>e.getState(),[e]);yv(()=>{const{subscription:a}=o;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),u!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[o,u]);const s=t||Et;return we.createElement(s.Provider,{value:o},n)}var wv=gv;function rd(e=Et){const t=e===Et?td:Wu(e);return function(){const{store:r}=t();return r}}var Sv=rd();function xv(e=Et){const t=e===Et?Sv:rd(e);return function(){return t().dispatch}}var Cr=xv();fv(iv.useSyncExternalStoreWithSelector);uv($f.unstable_batchedUpdates);function ee(e){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. `}var kv=typeof Symbol=="function"&&Symbol.observable||"@@observable",va=kv,Di=()=>Math.random().toString(36).substring(7).split("").join("."),Ev={INIT:`@@redux/INIT${Di()}`,REPLACE:`@@redux/REPLACE${Di()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Di()}`},Il=Ev;function Vu(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ld(e,t,n){if(typeof e!="function")throw new Error(ee(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(ee(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(ee(1));return n(ld)(e,t)}let r=e,l=t,i=new Map,o=i,u=0,s=!1;function a(){o===i&&(o=new Map,i.forEach((S,f)=>{o.set(f,S)}))}function d(){if(s)throw new Error(ee(3));return l}function p(S){if(typeof S!="function")throw new Error(ee(4));if(s)throw new Error(ee(5));let f=!0;a();const c=u++;return o.set(c,S),function(){if(f){if(s)throw new Error(ee(6));f=!1,a(),o.delete(c),i=null}}}function h(S){if(!Vu(S))throw new Error(ee(7));if(typeof S.type>"u")throw new Error(ee(8));if(typeof S.type!="string")throw new Error(ee(17));if(s)throw new Error(ee(9));try{s=!0,l=r(l,S)}finally{s=!1}return(i=o).forEach(c=>{c()}),S}function v(S){if(typeof S!="function")throw new Error(ee(10));r=S,h({type:Il.REPLACE})}function y(){const S=p;return{subscribe(f){if(typeof f!="object"||f===null)throw new Error(ee(11));function c(){const w=f;w.next&&w.next(d())}return c(),{unsubscribe:S(c)}},[va](){return this}}}return h({type:Il.INIT}),{dispatch:h,subscribe:p,getState:d,replaceReducer:v,[va]:y}}function _v(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Il.INIT})>"u")throw new Error(ee(12));if(typeof n(void 0,{type:Il.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ee(13))})}function Cv(e){const t=Object.keys(e),n={};for(let i=0;i"u")throw u&&u.type,new Error(ee(14));a[p]=y,s=s||y!==v}return s=s||r.length!==Object.keys(o).length,s?a:o}}function Ml(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Pv(...e){return t=>(n,r)=>{const l=t(n,r);let i=()=>{throw new Error(ee(15))};const o={getState:l.getState,dispatch:(s,...a)=>i(s,...a)},u=e.map(s=>s(o));return i=Ml(...u)(l.dispatch),{...l,dispatch:i}}}function Nv(e){return Vu(e)&&"type"in e&&typeof e.type=="string"}var id=Symbol.for("immer-nothing"),ya=Symbol.for("immer-draftable"),ke=Symbol.for("immer-state");function Fe(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Sn=Object.getPrototypeOf;function _t(e){return!!e&&!!e[ke]}function nt(e){var t;return e?od(e)||Array.isArray(e)||!!e[ya]||!!((t=e.constructor)!=null&&t[ya])||ri(e)||li(e):!1}var zv=Object.prototype.constructor.toString();function od(e){if(!e||typeof e!="object")return!1;const t=Sn(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zv}function mr(e,t){ni(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function ni(e){const t=e[ke];return t?t.type_:Array.isArray(e)?1:ri(e)?2:li(e)?3:0}function Uo(e,t){return ni(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ud(e,t,n){const r=ni(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Rv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ri(e){return e instanceof Map}function li(e){return e instanceof Set}function Lt(e){return e.copy_||e.base_}function Ao(e,t){if(ri(e))return new Map(e);if(li(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&od(e))return Sn(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[ke];let r=Reflect.ownKeys(n);for(let l=0;l1&&(e.set=e.add=e.clear=e.delete=Tv),Object.freeze(e),t&&mr(e,(n,r)=>Hu(r,!0))),e}function Tv(){Fe(2)}function ii(e){return Object.isFrozen(e)}var Ov={};function Ht(e){const t=Ov[e];return t||Fe(0,e),t}var hr;function sd(){return hr}function jv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ga(e,t){t&&(Ht("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $o(e){Bo(e),e.drafts_.forEach(Lv),e.drafts_=null}function Bo(e){e===hr&&(hr=e.parent_)}function wa(e){return hr=jv(hr,e)}function Lv(e){const t=e[ke];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sa(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ke].modified_&&($o(t),Fe(4)),nt(e)&&(e=Dl(t,e),t.parent_||Fl(t,e)),t.patches_&&Ht("Patches").generateReplacementPatches_(n[ke].base_,e,t.patches_,t.inversePatches_)):e=Dl(t,n,[]),$o(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==id?e:void 0}function Dl(e,t,n){if(ii(t))return t;const r=t[ke];if(!r)return mr(t,(l,i)=>xa(e,r,t,l,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Fl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const l=r.copy_;let i=l,o=!1;r.type_===3&&(i=new Set(l),l.clear(),o=!0),mr(i,(u,s)=>xa(e,r,l,u,s,n,o)),Fl(e,l,!1),n&&e.patches_&&Ht("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function xa(e,t,n,r,l,i,o){if(_t(l)){const u=i&&t&&t.type_!==3&&!Uo(t.assigned_,r)?i.concat(r):void 0,s=Dl(e,l,u);if(ud(n,r,s),_t(s))e.canAutoFreeze_=!1;else return}else o&&n.add(l);if(nt(l)&&!ii(l)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Dl(e,l),(!t||!t.scope_.parent_)&&Fl(e,l)}}function Fl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Hu(t,n)}function Iv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:sd(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let l=r,i=Qu;n&&(l=[r],i=vr);const{revoke:o,proxy:u}=Proxy.revocable(l,i);return r.draft_=u,r.revoke_=o,u}var Qu={get(e,t){if(t===ke)return e;const n=Lt(e);if(!Uo(n,t))return Mv(e,n,t);const r=n[t];return e.finalized_||!nt(r)?r:r===Fi(e.base_,t)?(Ui(e),e.copy_[t]=Vo(r,e)):r},has(e,t){return t in Lt(e)},ownKeys(e){return Reflect.ownKeys(Lt(e))},set(e,t,n){const r=ad(Lt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const l=Fi(Lt(e),t),i=l==null?void 0:l[ke];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Rv(n,l)&&(n!==void 0||Uo(e.base_,t)))return!0;Ui(e),Wo(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Fi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Ui(e),Wo(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Lt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fe(11)},getPrototypeOf(e){return Sn(e.base_)},setPrototypeOf(){Fe(12)}},vr={};mr(Qu,(e,t)=>{vr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});vr.deleteProperty=function(e,t){return vr.set.call(this,e,t,void 0)};vr.set=function(e,t,n){return Qu.set.call(this,e[0],t,n,e[0])};function Fi(e,t){const n=e[ke];return(n?Lt(n):e)[t]}function Mv(e,t,n){var l;const r=ad(t,n);return r?"value"in r?r.value:(l=r.get)==null?void 0:l.call(e.draft_):void 0}function ad(e,t){if(!(t in e))return;let n=Sn(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Sn(n)}}function Wo(e){e.modified_||(e.modified_=!0,e.parent_&&Wo(e.parent_))}function Ui(e){e.copy_||(e.copy_=Ao(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Dv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(s=i,...a){return o.produce(s,d=>n.call(this,d,...a))}}typeof n!="function"&&Fe(6),r!==void 0&&typeof r!="function"&&Fe(7);let l;if(nt(t)){const i=wa(this),o=Vo(t,void 0);let u=!0;try{l=n(o),u=!1}finally{u?$o(i):Bo(i)}return ga(i,r),Sa(l,i)}else if(!t||typeof t!="object"){if(l=n(t),l===void 0&&(l=t),l===id&&(l=void 0),this.autoFreeze_&&Hu(l,!0),r){const i=[],o=[];Ht("Patches").generateReplacementPatches_(t,l,i,o),r(i,o)}return l}else Fe(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...u)=>this.produceWithPatches(o,s=>t(s,...u));let r,l;return[this.produce(t,n,(o,u)=>{r=o,l=u}),r,l]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nt(e)||Fe(8),_t(e)&&(e=cd(e));const t=wa(this),n=Vo(e,void 0);return n[ke].isManual_=!0,Bo(t),n}finishDraft(e,t){const n=e&&e[ke];(!n||!n.isManual_)&&Fe(9);const{scope_:r}=n;return ga(r,t),Sa(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const l=t[n];if(l.path.length===0&&l.op==="replace"){e=l.value;break}}n>-1&&(t=t.slice(n+1));const r=Ht("Patches").applyPatches_;return _t(e)?r(e,t):this.produce(e,l=>r(l,t))}};function Vo(e,t){const n=ri(e)?Ht("MapSet").proxyMap_(e,t):li(e)?Ht("MapSet").proxySet_(e,t):Iv(e,t);return(t?t.scope_:sd()).drafts_.push(n),n}function cd(e){return _t(e)||Fe(10,e),fd(e)}function fd(e){if(!nt(e)||ii(e))return e;const t=e[ke];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ao(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ao(e,!0);return mr(n,(r,l)=>{ud(n,r,fd(l))}),t&&(t.finalized_=!1),n}var Ee=new Dv,dd=Ee.produce;Ee.produceWithPatches.bind(Ee);Ee.setAutoFreeze.bind(Ee);Ee.setUseStrictShallowCopy.bind(Ee);Ee.applyPatches.bind(Ee);Ee.createDraft.bind(Ee);Ee.finishDraft.bind(Ee);function Fv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Uv(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var ka=e=>Array.isArray(e)?e:[e];function Av(e){const t=Array.isArray(e[0])?e[0]:e;return Uv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $v(e,t){const n=[],{length:r}=e;for(let l=0;l{n=Qr(),o.resetResultsCount()},o.resultsCount=()=>i,o.resetResultsCount=()=>{i=0},o}function Hv(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e;return(...l)=>{let i=0,o=0,u,s={},a=l.pop();typeof a=="object"&&(s=a,a=l.pop()),Fv(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const d={...n,...s},{memoize:p,memoizeOptions:h=[],argsMemoize:v=pd,argsMemoizeOptions:y=[],devModeChecks:g={}}=d,S=ka(h),f=ka(y),c=Av(l),m=p(function(){return i++,a.apply(null,arguments)},...S),w=v(function(){o++;const N=$v(c,arguments);return u=m.apply(null,N),u},...f);return Object.assign(w,{resultFunc:a,memoizedResultFunc:m,dependencies:c,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>u,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:v})}}function md(e){return({dispatch:n,getState:r})=>l=>i=>typeof i=="function"?i(n,r,e):l(i)}var Qv=md(),Kv=md,Xv=(...e)=>{const t=Hv(...e);return(...n)=>{const r=t(...n),l=(i,...o)=>r(_t(i)?cd(i):i,...o);return Object.assign(l,r),l}};Xv(pd);var Yv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ml:Ml.apply(null,arguments)};function yr(e,t){function n(...r){if(t){let l=t(...r);if(!l)throw new Error($e(0));return{type:e,payload:l.payload,..."meta"in l&&{meta:l.meta},..."error"in l&&{error:l.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Nv(r)&&r.type===e,n}var hd=class $n extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,$n.prototype)}static get[Symbol.species](){return $n}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new $n(...t[0].concat(this)):new $n(...t.concat(this))}};function _a(e){return nt(e)?dd(e,()=>{}):e}function Ca(e,t,n){if(e.has(t)){let l=e.get(t);return n.update&&(l=n.update(l,t,e),e.set(t,l)),l}if(!n.insert)throw new Error($e(10));const r=n.insert(t,e);return e.set(t,r),r}function Gv(e){return typeof e=="boolean"}var Jv=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:l=!0,actionCreatorCheck:i=!0}=t??{};let o=new hd;return n&&(Gv(n)?o.push(Qv):o.push(Kv(n.extraArgument))),o},Zv="RTK_autoBatch",vd=e=>t=>{setTimeout(t,e)},qv=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vd(10),bv=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let l=!0,i=!1,o=!1;const u=new Set,s=e.type==="tick"?queueMicrotask:e.type==="raf"?qv:e.type==="callback"?e.queueNotification:vd(e.timeout),a=()=>{o=!1,i&&(i=!1,u.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const p=()=>l&&d(),h=r.subscribe(p);return u.add(d),()=>{h(),u.delete(d)}},dispatch(d){var p;try{return l=!((p=d==null?void 0:d.meta)!=null&&p[Zv]),i=!l,i&&(o||(o=!0,s(a))),r.dispatch(d)}finally{l=!0}}})},ey=e=>function(n){const{autoBatch:r=!0}=n??{};let l=new hd(e);return r&&l.push(bv(typeof r=="object"?r:void 0)),l},ty=!0;function ny(e){const t=Jv(),{reducer:n=void 0,middleware:r,devTools:l=!0,preloadedState:i=void 0,enhancers:o=void 0}=e||{};let u;if(typeof n=="function")u=n;else if(Vu(n))u=Cv(n);else throw new Error($e(1));let s;typeof r=="function"?s=r(t):s=t();let a=Ml;l&&(a=Yv({trace:!ty,...typeof l=="object"&&l}));const d=Pv(...s),p=ey(d);let h=typeof o=="function"?o(p):p();const v=a(...h);return ld(u,i,v)}function yd(e){const t={},n=[];let r;const l={addCase(i,o){const u=typeof i=="string"?i:i.type;if(!u)throw new Error($e(28));if(u in t)throw new Error($e(29));return t[u]=o,l},addMatcher(i,o){return n.push({matcher:i,reducer:o}),l},addDefaultCase(i){return r=i,l}};return e(l),[t,n,r]}function ry(e){return typeof e=="function"}function ly(e,t){let[n,r,l]=yd(t),i;if(ry(e))i=()=>_a(e());else{const u=_a(e);i=()=>u}function o(u=i(),s){let a=[n[s.type],...r.filter(({matcher:d})=>d(s)).map(({reducer:d})=>d)];return a.filter(d=>!!d).length===0&&(a=[l]),a.reduce((d,p)=>{if(p)if(_t(d)){const v=p(d,s);return v===void 0?d:v}else{if(nt(d))return dd(d,h=>p(h,s));{const h=p(d,s);if(h===void 0){if(d===null)return d;throw new Error($e(9))}return h}}return d},u)}return o.getInitialState=i,o}var iy=Symbol.for("rtk-slice-createasyncthunk");function oy(e,t){return`${e}/${t}`}function uy({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[iy];return function(l){const{name:i,reducerPath:o=i}=l;if(!i)throw new Error($e(11));typeof process<"u";const u=(typeof l.reducers=="function"?l.reducers(ay()):l.reducers)||{},s=Object.keys(u),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(S,f){const c=typeof S=="string"?S:S.type;if(!c)throw new Error($e(12));if(c in a.sliceCaseReducersByType)throw new Error($e(13));return a.sliceCaseReducersByType[c]=f,d},addMatcher(S,f){return a.sliceMatchers.push({matcher:S,reducer:f}),d},exposeAction(S,f){return a.actionCreators[S]=f,d},exposeCaseReducer(S,f){return a.sliceCaseReducersByName[S]=f,d}};s.forEach(S=>{const f=u[S],c={reducerName:S,type:oy(i,S),createNotation:typeof l.reducers=="function"};fy(f)?py(c,f,d,t):cy(c,f,d)});function p(){const[S={},f=[],c=void 0]=typeof l.extraReducers=="function"?yd(l.extraReducers):[l.extraReducers],m={...S,...a.sliceCaseReducersByType};return ly(l.initialState,w=>{for(let k in m)w.addCase(k,m[k]);for(let k of a.sliceMatchers)w.addMatcher(k.matcher,k.reducer);for(let k of f)w.addMatcher(k.matcher,k.reducer);c&&w.addDefaultCase(c)})}const h=S=>S,v=new WeakMap;let y;const g={name:i,reducerPath:o,reducer(S,f){return y||(y=p()),y(S,f)},actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState(){return y||(y=p()),y.getInitialState()},getSelectors(S=h){const f=Ca(v,this,{insert:()=>new WeakMap});return Ca(f,S,{insert:()=>{const c={};for(const[m,w]of Object.entries(l.selectors??{}))c[m]=sy(this,w,S,this!==g);return c}})},selectSlice(S){let f=S[this.reducerPath];return typeof f>"u"&&this!==g&&(f=this.getInitialState()),f},get selectors(){return this.getSelectors(this.selectSlice)},injectInto(S,{reducerPath:f,...c}={}){const m=f??this.reducerPath;return S.inject({reducerPath:m,reducer:this.reducer},c),{...this,reducerPath:m}}};return g}}function sy(e,t,n,r){function l(i,...o){let u=n.call(e,i);return typeof u>"u"&&r&&(u=e.getInitialState()),t(u,...o)}return l.unwrapped=t,l}var Ku=uy();function ay(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function cy({type:e,reducerName:t,createNotation:n},r,l){let i,o;if("reducer"in r){if(n&&!dy(r))throw new Error($e(17));i=r.reducer,o=r.prepare}else i=r;l.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,o?yr(e,o):yr(e))}function fy(e){return e._reducerDefinitionType==="asyncThunk"}function dy(e){return e._reducerDefinitionType==="reducerWithPrepare"}function py({type:e,reducerName:t},n,r,l){if(!l)throw new Error($e(18));const{payloadCreator:i,fulfilled:o,pending:u,rejected:s,settled:a,options:d}=n,p=l(e,i,d);r.exposeAction(t,p),o&&r.addCase(p.fulfilled,o),u&&r.addCase(p.pending,u),s&&r.addCase(p.rejected,s),a&&r.addMatcher(p.settled,a),r.exposeCaseReducer(t,{fulfilled:o||Kr,pending:u||Kr,rejected:s||Kr,settled:a||Kr})}function Kr(){}var Xu="listenerMiddleware";yr(`${Xu}/add`);yr(`${Xu}/removeAll`);yr(`${Xu}/remove`);function $e(e){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. `}const my={items:[],length:0},gd=Ku({name:"cart",initialState:my,reducers:{addToCart:(e,t)=>{e.items.push(t.payload)},removeFromCart:(e,t)=>{const n=t.payload;n>=0&&n{e.length=t.payload}}}),{addToCart:hy,removeFromCart:vy,addCount:Yu}=gd.actions,yy=gd.reducer,Gu=()=>{const e=Cr(),[t,n]=E.useState(0),r=sessionStorage.getItem("cartItems"),l=Ll(i=>i.cart.length);return E.useEffect(()=>{if(l===0){const i=JSON.parse(r||"[]");n(i.length),e(Yu(i.length))}else n(l)},[l]),_.jsxs("nav",{className:"fixed z-10 left-1/2 md:left-1/3 w-90 flex flex-col md:flex-row justify-between md:items-center h-{50px} px-5 bg-gray-500 text-white",children:[_.jsx("h3",{className:"md:mr-20 font-bold",children:"goods"}),_.jsxs("span",{className:"flex flex-col md:flex-row justify-between items-center",children:[_.jsx(Fo,{className:"mr-8 my-1 md:my-2 text-1xl md:text-2xl",to:"/e-commmerce_SPA/",children:"Все товары"}),_.jsxs(Fo,{className:"flex md:mr-2 md:my-2 text-1xl md:text-2xl",to:"/e-commmerce_SPA/favorite",children:["Ваша корзина ",_.jsx("p",{className:"mr-1 text-base font-bold",children:t})]})]})]})},gy=()=>{const[e,t]=E.useState([]);return E.useEffect(()=>{Jh().then(n=>{t(n)})},[]),_.jsxs(_.Fragment,{children:[_.jsx(Gu,{}),_.jsx("h2",{className:"ml-2 md:ml-20 text-1xl text-2xl md:text-3xl underline",children:"Все товары"}),_.jsx("div",{className:"m-8 flex flex-wrap justify-center ",children:e.map(n=>_.jsxs(Fo,{className:"m-10 w-282 flex flex-col items-center box-border rounded-10 overflow-hidden bg-gray-100 cursor-pointer shadow-md hover:shadow-2xl",to:`/e-commmerce_SPA/product/${n.id}`,children:[n.colors.length>0&&_.jsx("div",{className:"",children:_.jsx("img",{className:"w-80 bg-contain ",src:n.colors[0].images[0],alt:n.colors[0].name})}),_.jsx("h2",{className:"my-5 mr-5 xl:text-3xl lg:text-2xl sm:text-xl font-bold text-orange-900",children:n.name})]},n.id))})]})},wy=()=>{const e=Cr(),[t,n]=E.useState([]);E.useEffect(()=>{const i=JSON.parse(sessionStorage.getItem("cartItems")||"[]");n(i)},[]);const r=i=>{sessionStorage.setItem("cartItems",JSON.stringify(i))},l=i=>{e(vy(i)),n(o=>{const u=o.filter((s,a)=>a!==i);return r(u),e(Yu(u.length)),u})};return _.jsxs(_.Fragment,{children:[_.jsx(Gu,{}),_.jsx("h2",{className:"ml-2 md:ml-20 text-1xl md:text-3xl underline",children:"Ваша корзина"}),_.jsxs("div",{className:"m-8 flex flex-wrap justify-center",children:[t.length===0&&_.jsx("h2",{className:"mt-6 xl:text-3xl lg:text-2xl sm:text-sm font-bold text-amber-950",children:"товаров в корзине нет"}),t.map((i,o)=>_.jsxs("div",{className:"m-10 w-282 flex flex-col items-center box-border rounded-10 overflow-hidden bg-gray-100 shadow-md rounded",children:[_.jsx("div",{className:"min-h-max",children:_.jsx("img",{className:"w-80 bg-contain cursor-pointer hover:shadow-2xl",src:i.photo,alt:i.nameProduct,title:"фото товара"})}),_.jsx("h2",{className:"mt-3 xl:text-3xl lg:text-2xl sm:text-sm font-bold text-amber-950",children:i.nameProduct}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["цвет: ",i.colorName]}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["размер: ",i.sizeName," "]}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["цена: ",i.price," "]}),_.jsx("button",{className:"mb-2 bg-slate-400 rounded-full",onClick:()=>l(o),children:_.jsx("p",{className:"py-2 px-3 font-bold xl:text-base lg:text-base sm:text-sm text-black",children:"Удалить из корзины"})})]},o))]})]})},Sy={isOpen:!1,images:[],currentImageIndex:0},wd=Ku({name:"popup",initialState:Sy,reducers:{openPopup:(e,t)=>{e.isOpen=!0,e.images=t.payload,e.currentImageIndex=0},closePopup:e=>{e.isOpen=!1,e.images=[],e.currentImageIndex=0},nextImage:e=>{e.currentImageIndex=(e.currentImageIndex+1)%e.images.length},prevImage:e=>{e.currentImageIndex=(e.currentImageIndex-1+e.images.length)%e.images.length}}}),{openPopup:xy,closePopup:ky,nextImage:Ey,prevImage:_y}=wd.actions,Cy=wd.reducer,Py={selectedSizes:{}},Sd=Ku({name:"sizeSelect",initialState:Py,reducers:{isSelect:(e,t)=>{const{cardId:n,sizeName:r}=t.payload;e.selectedSizes={...e.selectedSizes,[n]:r}},notSelect:(e,t)=>{const n=t.payload;e.selectedSizes={...e.selectedSizes,[n]:null}}}}),{isSelect:Ny,notSelect:xd}=Sd.actions,zy=Sd.reducer,Ry=({sizes:e,colorId:t})=>{const n=Cr(),[r,l]=E.useState([]),[i,o]=E.useState(null);E.useEffect(()=>{(async()=>{const a=e.map(async p=>(await Gh(p)).label),d=await Promise.all(a);l(d)})()},[e]);const u=s=>{i===s?(o(null),n(xd(t.toString()))):(o(s),n(Ny({cardId:t.toString(),sizeName:s})))};return _.jsx("div",{className:"flex",children:r.map((s,a)=>_.jsx("p",{className:`m-3 p-0 cursor-pointer font-bold ${i===s?"underline":""}`,onClick:()=>u(s),children:s},a))})},Ty=()=>{const e=Cr(),{isOpen:t,images:n,currentImageIndex:r}=Ll(u=>u.popup),l=()=>{e(ky())},i=()=>{e(Ey())},o=()=>{e(_y())};return!t||!n.length?null:_.jsx("div",{className:`fixed top-0 left-0 w-full h-full flex items-center justify-center bg-black bg-opacity-50 transition-all duration-500 ${t?"visible opacity-100 z-20":"invisible opacity-0"}`,children:_.jsxs("div",{className:"w-430 mx-auto bg-white shadow-md rounded-10 flex flex-col items-center",children:[_.jsx("button",{type:"button",className:"w-32 h-8 bg-slate-400 border-none font-bold text-24 text-black",onClick:l,children:"Закрыть ×"}),_.jsx("img",{className:"w-80 bg-contain",src:n[r],alt:`Image ${r+1}`}),_.jsxs("div",{className:"flex justify-between w-full items-start p-3",children:[_.jsx("button",{className:"w-32 h-8 bg-slate-400 font-bold text-24 text-black",onClick:o,children:"< Предыдущая"}),_.jsx("button",{className:"w-32 h-8 bg-slate-400 font-bold text-24 text-black",onClick:i,children:"Следующая >"})]})]})})},Oy=()=>{const e=Cr(),{id:t}=_h(),[n,r]=E.useState([]),[l,i]=E.useState(""),[o,u]=E.useState([]),{items:s}=Ll(v=>v.cart),{selectedSizes:a}=Ll(v=>v.sizeSelect);E.useEffect(()=>{sessionStorage.setItem("cartItems",JSON.stringify(s)),e(Yu(s.length))},[s]);const d=async()=>{if(t!==void 0){const v=await Zh(parseInt(t.toString()));i(v.name),r(v.colors);const g=await Promise.all(v.colors.map(async S=>S.sizes));u(g)}};E.useEffect(()=>{d()},[d]);const p=v=>{const g=v.currentTarget.getAttribute("data-images");g&&e(xy(JSON.parse(g)))},h=(v,y,g,S,f,c)=>{e(hy({colorName:y,sizeName:f,photo:g,price:S,nameProduct:v})),e(xd(c.toString()))};return _.jsxs(_.Fragment,{children:[_.jsx(Gu,{}),_.jsx("h2",{className:"ml-2 md:ml-20 text-1xl text-2xl md:text-3xl underline",children:l}),_.jsx("div",{className:"m-8 flex flex-wrap justify-center",children:n.map((v,y)=>_.jsxs("div",{className:"m-10 w-282 flex flex-col items-center box-border rounded-10 overflow-hidden bg-gray-100 shadow-md rounded",children:[_.jsx("div",{className:"",children:_.jsx("img",{className:"w-80 bg-contain cursor-pointer hover:shadow-2xl",src:v.images[0],alt:v.name,title:"посмотреть","data-images":JSON.stringify(v.images),onClick:p,onTouchStart:p})}),_.jsxs("h2",{className:"mt-3 xl:text-3xl lg:text-2xl sm:text-sm font-bold text-amber-950",children:["цвет: ",v.name]}),_.jsxs("p",{className:"mt-2 xl:text-xl lg:text-base sm:text-sm",children:["цена: ",v.price," "]}),_.jsx("p",{className:"my-2",children:"выберете размер:"}),v.sizes.length>0?_.jsxs("div",{className:"flex flex-col items-center",children:[_.jsx(Ry,{sizes:o[y],colorId:v.id}),_.jsx("button",{className:`mb-2 ${a[v.id]?"bg-slate-400":"bg-gray-300"} rounded-full`,disabled:!a[v.id],onClick:()=>{const g=a[v.id];g!==null&&h(l,v.name,v.images[0],v.price,g,v.id)},children:_.jsx("p",{className:"py-2 px-3 font-bold xl:text-base lg:text-base sm:text-sm text-black",children:"Добавить в корзину"})})]}):_.jsx("p",{className:"my-2 font-bold xl:text-base lg:text-base sm:text-sm",children:"нет в наличии"})]},v.id))}),_.jsx(Ty,{})]})},jy=()=>_.jsxs("main",{className:"bg-slate-200 min-h-screen",children:[_.jsx("h1",{className:"py-5 mx-2 sm:py-10 sm:mx-20 text-2xl md:text-5xl sm:text-3xl font-bold",children:"E-commerce"}),_.jsxs(Uh,{children:[_.jsx(il,{path:"/e-commmerce_SPA/",element:_.jsx(gy,{})}),_.jsx(il,{path:"/e-commmerce_SPA/product/:id",element:_.jsx(Oy,{})}),_.jsx(il,{path:"/e-commmerce_SPA/favorite",element:_.jsx(wy,{})})]})]}),Ly=ny({reducer:{popup:Cy,cart:yy,sizeSelect:zy}});$i.createRoot(document.getElementById("root")).render(_.jsx(Yo.StrictMode,{children:_.jsx(wv,{store:Ly,children:_.jsx(Hh,{children:_.jsx(jy,{})})})})); diff --git a/index.html b/index.html index 7668391..5e38511 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,8 @@ E-commerce - - + +