@billgangcom/theme-lib 1.15.0 → 1.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('@charset "UTF-8";@import"https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap";._icon_bsuj2_1 path{fill:var(--icon-fill)}._hoverable_bsuj2_5{cursor:pointer}._rotated_bsuj2_9{transform:rotate(180deg)}._button_3jsln_1{padding:10px 16px;border-radius:12px;cursor:pointer;font-size:16px}._button_3jsln_1:disabled{opacity:.7;cursor:auto}._primary_3jsln_13{color:#fff;background-color:#ff3f19}._secondary_3jsln_18{color:#757575;background-color:#f8f8f8}._content_3jsln_23{display:flex;align-items:center;gap:4px}._wrapper_wp7u5_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_wp7u5_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_wp7u5_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:7px 11px;font-size:16px;line-height:24px;border:1px solid var(--background-color)}._input_wp7u5_17::placeholder{color:#c2c2c2}._input_wp7u5_17:disabled{background-color:var(--background-color);opacity:.7}._required_wp7u5_36{border:1px solid #ff3f19}._paddingless_wp7u5_40{padding:0}._content_wp7u5_44{display:flex;align-items:center;gap:8px}._borderless_wp7u5_50{border-radius:0;border:none}._wrapper_1v1ye_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1v1ye_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._select_1v1ye_17{width:100%;background-color:var(--background-color);border-radius:12px;padding:10px 12px;font-size:14px;line-height:20px;display:flex;align-items:center;justify-content:space-between;cursor:pointer}._icon_1v1ye_30{transition:.2s}._rotate_1v1ye_34{transform:rotate(180deg)}._content_1v1ye_38{position:relative}._options_1v1ye_42{position:absolute;top:45px;width:100%;background-color:var(--background-color);border-radius:12px;font-size:14px;line-height:20px;display:flex;flex-direction:column;max-height:200px;z-index:10;overflow-y:scroll;cursor:pointer}._option_1v1ye_42{padding:10px 12px;border-radius:12px}._option_1v1ye_42:hover{background-color:#e6e6e6}._addon_1v1ye_66{display:flex;align-items:center;gap:6px}._wrapper_3w2ni_1{display:flex;width:fit-content;gap:8px;align-items:center;border-radius:12px;line-height:20px;color:#252525;font-size:14px;font-weight:400}._switch_3w2ni_13{width:40px;height:24px;background-color:#ccc;border-radius:25px;display:flex;align-items:center;padding:2px;cursor:pointer;transition:background-color .2s}._switch_3w2ni_13._active_3w2ni_24{background:#ff3f19}._switch_3w2ni_13 ._toggle_3w2ni_27{width:14px;height:14px;background-color:#fff;border-radius:16px;transition:transform .2s;transform:translate(2px)}._switch_3w2ni_13._active_3w2ni_24 ._toggle_3w2ni_27{transform:translate(18px)}._background_3w2ni_39{background-color:#f8f8f8}._padding_3w2ni_43{padding:8px}._wrapper_1inu5_1{border:var(--default-border);width:fit-content;height:fit-content;max-height:500px;max-width:500px;min-width:300px;padding:10px;left:10px;top:10px;position:absolute;z-index:1000;background-color:#fff;display:flex;border-radius:8px;justify-content:center;align-items:center;overflow:hidden}._blocks_1op3c_1{display:flex;align-items:center;gap:8px}._block_1op3c_1{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1op3c_18{border:1px solid #ff3f19}._applyButton_1cqw4_2{flex:0 1 50%;font-weight:400}._cancelButton_1cqw4_7{background-color:#f8f8f8;color:var(--accent-color)}._content_1cqw4_12{display:flex;flex-direction:column;width:100%}._label_1cqw4_18{padding:8px 12px;border-radius:8px;display:flex;align-items:center;position:relative;gap:8px;width:100%;background-color:var(--background-color);cursor:pointer}._colorValue_1cqw4_30{width:20px;height:20px;padding:2.5px;border-radius:2px}._modal_1cqw4_37{left:15px;width:288px;overflow-y:auto;z-index:100000000;position:fixed;background-color:#fff;border-radius:12px;padding:10px;border:1px solid #e6e6e6;height:400px;display:flex;flex-direction:column;gap:10px;font-size:16px;line-height:24px;font-weight:700}._colorMap_1cqw4_56{position:relative;width:100%;height:300px;cursor:pointer;border-radius:4px}._indicator_1cqw4_64{position:absolute;width:20px;height:20px;border:4px solid white;border-radius:50%;pointer-events:none}._hueSlider_1cqw4_73{width:80%;left:30px;height:8px;position:absolute;bottom:80px;background:linear-gradient(to right,red,#ff0,#0f0,#0ff,#00f,#f0f,red,red);border-radius:5px}input[type=range]{-webkit-appearance:none;height:8px;outline:none;border-radius:5px;position:relative;display:flex;justify-content:center}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border:5px solid #fff;border-radius:50%;cursor:pointer}._slider_1cqw4_102{width:100%;cursor:pointer}._buttons_1cqw4_107{display:flex;gap:5px;width:100%}._name_1cqw4_113{line-height:20px;padding:0 4px 4px}._secondary_1cqw4_118{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1cqw4_126{line-height:20px;font-size:14px;font-weight:400}._modal_1qb2a_1{position:fixed;top:0;left:0;right:0;bottom:0;background:#2525253d;z-index:100000;display:flex;padding:20px;justify-content:center;align-items:center;overflow:hidden}._wrapper_1qvfi_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%;position:relative}._label_1qvfi_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._textarea_1qvfi_18{width:100%;background-color:var(--background-color);border-radius:12px;padding:8px 12px;font-size:16px;line-height:24px;resize:none;min-height:80px}._textarea_1qvfi_18::placeholder{color:#c2c2c2}._length_1qvfi_33{position:absolute;bottom:12px;right:12px;color:#c2c2c2;line-height:20px}._wrapper_1fcne_2{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1fcne_10{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._options_1fcne_18{display:flex;gap:20px}._radioLabel_1fcne_23{display:flex;align-items:center;cursor:pointer;position:relative}._radio_1fcne_23{position:absolute;opacity:0;cursor:pointer}._custom_1fcne_36{height:20px;width:20px;border-radius:50%;border:1px solid #e6e6e6;display:inline-block;margin-right:8px;position:relative}._radio_1fcne_23:checked+._custom_1fcne_36{border-color:#ff3f19;background:#ffeae5}._custom_1fcne_36:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:8px;height:8px;border-radius:50%;background-color:#e53e3e;opacity:0}._radio_1fcne_23:checked+._custom_1fcne_36:after{opacity:1}._option_1fcne_18{font-size:16px;line-height:24px;font-weight:400}._tip_pl6k0_1{display:flex;align-items:center;padding:8px;border-radius:12px;gap:8px}._text_pl6k0_9{flex:1 1 auto;line-height:20px;font-size:14px}._warning_pl6k0_15{background:#faf8e6;color:#c1972a}._error_pl6k0_20{background:#ffc3b7;color:#ff3f19}._hide_pl6k0_25{display:none}._customCheckbox_1b69m_1{display:inline-block;cursor:pointer;position:relative}._checkboxBox_1b69m_7{display:inline-block;width:20px;height:20px;border:1px solid #e6e6e6;border-radius:6px;position:relative}._checkboxBox_1b69m_7._checked_1b69m_16{background:#ffeae5;border:1px solid #ff3f19}._icon_1b69m_21{position:absolute;top:3px;left:3px}._loader_wrwsz_1{border:4px solid rgba(0,0,0,.1);border-left-color:#f8f8f8;border-radius:50%;width:40px;height:40px;animation:_spin_wrwsz_1 1s linear infinite}@keyframes _spin_wrwsz_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._wrapper_tm686_2{display:flex;flex-direction:column;gap:6px;width:100%}._label_tm686_9{color:#757575;font-weight:400;font-size:14px;line-height:20px}._icon_tm686_16{padding:4px;background-color:#fff;border:1px solid #f0f0f0;display:flex;justify-content:center;align-items:center;border-radius:6px}._text_tm686_26{font-weight:400;font-size:16px;line-height:24px;color:#ff3f19}._content_tm686_33{display:flex;align-items:center;gap:6px;cursor:pointer;background-color:#f8f8f8;border-radius:12px;padding:6px 8px}._modal_tm686_43{background-color:#f8f8f8;border:1px solid #f0f0f0;border-radius:16px;width:100%;max-width:640px}._top_tm686_51{padding:16px 24px;display:flex;align-items:center;justify-content:space-between}._title_tm686_58{color:#252525;font-weight:400;font-size:18px;line-height:24px}._modalContent_tm686_65{padding:16px 24px;border-top-left-radius:16px;border-top-right-radius:16px;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;background-color:#fff}._images_tm686_74{display:grid;grid-template-columns:repeat(3,1fr);align-items:center;gap:10px;overflow-y:scroll;max-height:390px}._add_tm686_83{display:flex;flex-direction:column;gap:8px;padding:43px 16px;border:1px dashed #e6e6e6;justify-content:center;align-items:center;border-radius:16px;aspect-ratio:1/1}._description_tm686_95{text-align:center;color:#252525;font-size:14px;line-height:20px}._description_tm686_95 span:last-child{padding-top:4px}._bottom_tm686_105{display:flex;justify-content:end;align-items:center;width:100%;background-color:#fff;border-bottom-left-radius:16px;border-bottom-right-radius:16px;padding:16px 24px 12px;gap:6px}._cancel_tm686_117{background-color:var(--background-color);color:var(--accent-color)}._highlight_tm686_122{color:#ff3f19;cursor:pointer}._accent_tm686_127{color:var(--accent-color)}._image_tm686_74{position:relative;padding:43px 16px;border:1px solid #e6e6e6;justify-content:center;align-items:center;border-radius:16px;aspect-ratio:1/1}._selected_tm686_141{border:1px solid #ff3f19}._checkbox_tm686_145{position:absolute;top:12px;left:12px}._loading_tm686_151{position:relative;padding:43px 16px;border:1px solid #e6e6e6;background-color:#f8f8f8;justify-content:center;align-items:center;display:flex;border-radius:16px;aspect-ratio:1/1}._spinner_tm686_163{width:24px;height:24px;border:2px solid #ff3f19;border-top-color:#f8f8f8;border-radius:50%;animation:_spin_tm686_163 1s linear infinite}@keyframes _spin_tm686_163{to{transform:rotate(360deg)}}*{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Noto Sans,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"}*{padding:0;margin:0;border:0}*,*:before,*:after{box-sizing:border-box}:focus,:active{outline:none}a:focus,a:active{outline:none}nav,footer,header,aside{display:block}html,body{width:100%;line-height:1;font-size:16px;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}input,button,textarea{font-family:inherit}input::-ms-clear{display:none}button{background-color:transparent;cursor:pointer}button::-moz-focus-inner{padding:0;border:0}a,a:visited,a:hover{text-decoration:none}ul li{list-style:none}img{vertical-align:top}h1,h2,h3,h4,h5,h6,a{font-size:inherit}a{color:inherit}*{-webkit-tap-highlight-color:transparent}input{border:none;background:none;outline:none;padding:0}input[type=color]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:40px;height:40px;border:none;background:transparent}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}*{-ms-overflow-style:none;scrollbar-width:none}* ::-webkit-scrollbar{display:none}:root{--default-border: 1px solid #f0f0f0;--accent-color: #757575;--main-color: #252525;--background-color: #f8f8f8}body,html{background-color:#fff;font-family:Archivo,sans-serif;max-height:100dvh;overflow:hidden}._wrapper_dbban_1{height:100%;overflow-y:scroll;display:flex;flex-direction:column}._main_dbban_8{flex:1 1 auto}._loading_dbban_12{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._buttons_1gn8m_1{display:flex;align-items:center;gap:16px}._button_1gn8m_1{cursor:pointer;padding:10px}._devices_hxl12_1{display:flex;gap:4px;background:var(--background-color);padding:4px;border-radius:16px}._device_hxl12_1{padding:6px 8px;display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:12px;border:1px solid var(--background-color)}._device_hxl12_1:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_hxl12_23{background-color:#fff}._active_hxl12_23:hover{border:1px solid var(--background-color);box-shadow:none}._header_zvaam_1{width:100%;padding:11px 22px;line-height:20px;border-bottom:var(--default-border);display:flex;align-items:center;justify-content:space-between;gap:24px}._left_zvaam_12,._right_zvaam_13{display:flex;align-items:center;gap:24px}._preview_vijvm_2{display:flex;align-items:center;gap:4px;color:var(--accent-color);line-height:20px;padding:10px 16px;cursor:pointer;border:1px solid #fff;border-radius:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}._preview_vijvm_2:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_vijvm_22{background-color:var(--background-color)}._active_vijvm_22:hover{border:1px solid #fff;box-shadow:none}._settings_q79q3_1{display:flex;gap:20px;align-items:center;color:var(--accent-color)}._language_1mbvp_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._text_1mbvp_11{padding-right:4px;color:var(--main-color)}._pages_sf7rl_1{position:relative}._default_sf7rl_5{display:flex;align-items:center;gap:4px;padding:10px 12px;background-color:var(--background-color);border-radius:8px;cursor:pointer;position:relative}._text_sf7rl_16{padding-right:4px;color:var(--main-color);flex:1 1 auto}._modal_sf7rl_22{position:absolute;top:45px;width:320px;left:0;z-index:5000;background-color:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column}._page_sf7rl_1{display:flex;align-items:center;gap:8px;padding:12px 8px;border-radius:8px;cursor:pointer}._hoverable_sf7rl_45{background-color:var(--background-color)}._separator_sf7rl_49{border-bottom:1px solid #f0f0f0}._button_sf7rl_53{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:start;gap:8px;padding:16px 8px 12px;transition:.2s}._button_sf7rl_53:hover{background-color:var(--background-color)}._items_sf7rl_67{max-height:400px;overflow-y:scroll;height:100%}._zoom_a77cn_1{display:flex;align-items:center;gap:4px;background-color:var(--background-color);padding:10px 12px;border-radius:12px;cursor:pointer}._theme_3wxbf_1{display:flex;align-items:center;gap:4px;padding:9px 12px;background:#e5fadd;color:#338b13;border-radius:100px}._exit_2ce42_1{border-bottom:var(--default-border);display:flex;gap:8px;align-items:center;padding:22px;cursor:pointer}._text_2ce42_10{color:#252525;line-height:20px}._navbar_2ac63_1{width:100px;border-right:var(--default-border)}._main_2ac63_6{display:flex;flex-direction:column;gap:8px;padding:16px 12px}._block_2ac63_13{display:flex;align-items:center;flex-direction:column;gap:4px;color:var(--accent-color);line-height:20px;padding:12px 24px;cursor:pointer;border:1px solid #fff;border-radius:16px}._block_2ac63_13:hover{border:var(--default-border);box-shadow:0 0 1px #dfdfdf}._active_2ac63_30{background-color:var(--background-color);color:#252525}._active_2ac63_30:hover{border:1px solid #fff;box-shadow:none}._preview_1q4f5_1{width:100%;background-color:var(--background-color);padding:16px 32px 0;position:relative;z-index:500}._main_1q4f5_9{width:100%;display:flex;flex-direction:column;overflow-y:auto;height:calc(100vh - 85px);position:relative;z-index:1}._content_1q4f5_19{background-color:#fff;border:var(--default-border);border-bottom:none;height:100%}._loading_1q4f5_26{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._loader_1q4f5_34{border:4px solid rgba(0,0,0,.1);border-left-color:#fff;border-radius:50%;width:40px;height:40px;animation:_spin_1q4f5_1 1s linear infinite}@keyframes _spin_1q4f5_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._header_1t64j_1{display:flex;width:100%;padding:18px;justify-content:center;border:var(--default-border);background-color:#fff;border-top-left-radius:16px;border-top-right-radius:16px;border-bottom:none;z-index:5}._circles_1t64j_14{left:28px;top:28px;position:absolute;display:flex;align-items:center;gap:8px}._circle_1t64j_14{width:12px;height:12px;border-radius:50%;border:.5px solid #e6e6e6}._red_1t64j_30{background:#ff5f57}._green_1t64j_34{background:#28c840}._yellow_1t64j_38{background:#febc2e}._input_1t64j_42{background-color:var(--background-color);padding:6px 8px;display:flex;max-width:480px;width:100%;border-radius:6px}._main_1t64j_51{flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:4px}._text_1t64j_59{font-weight:600;font-size:12px;line-height:16px;margin:0 0 0 4px}._content_1plo6_1{width:100%;height:100%;display:flex;flex-direction:column}._main_1plo6_8{flex:1 0 auto}._block_1plo6_12{position:relative;cursor:pointer;border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6}._active_1plo6_19{border:2px solid #ff3f19}._name_1plo6_23{z-index:10;position:absolute;top:-28px;left:-2px;border-top-left-radius:8px;border-top-right-radius:8px;color:#fff;background:#ff3f19;padding:4px 12px;line-height:20px;text-align:center}._empty_1plo6_37{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._icon_1plo6_48{width:64px;height:64px;background-color:var(--background-color);display:flex;border-radius:50%;justify-content:center;align-items:center;margin:0 0 8px}._title_1plo6_59{font-weight:700;font-size:24px;line-height:32px}._text_1plo6_65{font-size:16px;line-height:24px;color:var(--accent-color)}._sections_1plo6_71{padding:0 20px;margin:20px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:24px}._section_1plo6_71{cursor:pointer;display:flex;gap:10px;max-width:288px;width:100%;align-items:center;justify-content:space-between;padding:24px;background-color:var(--background-color);border-radius:24px;color:var(--accent-color)}._sidebar_1f3hk_1{position:absolute;display:flex;height:fit-content();flex-direction:column;right:10px;z-index:20;padding:10px;cursor:auto}._content_1f3hk_12{height:100%;border:1px solid #e6e6e6;border-radius:8px;background-color:#fff;padding:8px;max-width:60px;width:100%}._button_1f3hk_22{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._moveButton_1f3hk_30:hover{background-color:var(--background-color)}._border_1f3hk_34{border-bottom:var(--default-border)}._deleteButton_1f3hk_38:hover{background-color:#dd6363;color:#fff}._results_f488n_1{display:flex;flex-direction:column;padding:8px;gap:20px}._name_f488n_8{color:var(--main-color);font-weight:600;font-size:16px;line-height:24px}._product_f488n_15{display:flex;align-items:center;justify-content:space-between;cursor:pointer}._search_1s0qp_1{background:var(--background-color);padding:8px 12px;display:flex;align-items:center;border-radius:12px;width:100%;gap:10px;margin:8px 0}._input_1s0qp_12{width:100%;font-size:16px;line-height:24px;color:#252525}._input_1s0qp_12::placeholder{color:#c2c2c2}._sidebar_96mlz_1{max-width:320px;width:100%;padding:16px;border-right:var(--default-border);height:calc(100vh - 60px);position:relative}._title_96mlz_10{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;padding-bottom:8px}._active_96mlz_18{display:flex;align-items:center;gap:8px}._layers_62wod_1{display:flex;flex-direction:column;position:relative;height:100%}._block_62wod_8{position:relative;display:flex;align-items:center;gap:4px;font-size:16px;line-height:24px;padding:8px 12px;border-radius:8px;cursor:pointer}._block_62wod_8:hover{background-color:var(--background-color)}._dragging_62wod_23{box-shadow:0 2.1px 4.36px #00000004;box-shadow:0 5.3px 10.22px #00000005;border:var(--default-border);box-shadow:0 10.81px 19.93px #00000006;cursor:grabbing}._active_62wod_31{background:#ffeae5}._add_62wod_35{z-index:2;position:absolute;display:flex;justify-content:center;align-items:center;bottom:0;left:0;border-bottom:2px solid #ff3f19;width:100%}._button_62wod_47{position:relative;display:flex;justify-content:center;align-items:center;top:12px;background-color:#ff3f19;width:24px;height:24px;border-radius:50%;padding:4px}._empty_62wod_60{display:flex;flex-direction:column;justify-content:center;height:100%;width:100%;align-items:center;text-align:center;gap:4px;color:var(--accent-color)}._title_62wod_72{font-size:16px;line-height:24px;font-weight:700;color:var(--accent-color)}._icon_62wod_79{margin:0 0 12px}._text_62wod_83{font-size:16px;font-weight:400;line-height:24px}._highlight_62wod_89{color:#ff3f19;cursor:pointer}._block_1d6lb_1{position:relative;display:flex;align-items:center;gap:4px;font-size:16px;line-height:24px;padding:8px 12px;border-radius:8px;cursor:pointer}._block_1d6lb_1:hover{background-color:var(--background-color)}._theme_1xj36_1{display:flex;flex-direction:column}._block_1xj36_6{justify-content:start;display:flex;align-items:center;gap:8px;width:100%;padding:16px 8px;cursor:pointer;border-radius:8px}._block_1xj36_6:hover{background-color:var(--background-color)}._name_1xj36_20{flex:1 1 auto}._back_y3z55_1{display:flex;align-items:center;gap:8px;padding-bottom:8px}._render_y3z55_8{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:501}._open_y3z55_23{animation:.2s _open_y3z55_23 forwards}@keyframes _open_y3z55_23{0%{transform:translate(320px);z-index:1}99%{z-index:1}to{z-index:5000;transform:translate(0)}}@keyframes _close_y3z55_50{0%{z-index:1;transform:translate(0)}to{z-index:1;transform:translate(320px)}}._close_y3z55_50{animation:.2s _close_y3z55_50 forwards}._clicked_y3z55_54{opacity:0}._title_y3z55_58{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;flex:1 1 auto}._button_y3z55_66{align-self:center;flex:1}._loading_y3z55_71{flex:1 1 auto}._settings_y3z55_75{flex:1 1 100%;overflow-y:scroll;overflow-x:hidden}._deleteButton_y3z55_81{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._deleteButton_y3z55_81:hover{background-color:#dd6363;color:#fff}._settings_1r85j_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:3}._open_1r85j_16{transform:translate(0)}._close_1r85j_20{transform:translate(320px)}._header_1r85j_24{display:flex;align-items:center;gap:8px}._title_1r85j_30{font-weight:700;font-size:20px;line-height:24px;flex:1 1 auto}._addButton_1r85j_37{color:#ff3f19;display:flex;align-items:center;gap:4px;cursor:pointer}._wrapper_n1a7x_1{overflow-y:scroll}._category_n1a7x_5{display:flex;flex-direction:column}._categoryTitle_n1a7x_10{font-weight:600;font-size:16px;line-height:24px}._color_n1a7x_16{display:flex;flex-direction:column}._color_n1a7x_16:not(:last-child){border-bottom:1px solid #f0f0f0}._content_n1a7x_24{padding:12px 0;gap:8px;display:flex;align-items:center;flex:1 1 auto}._preview_n1a7x_32{width:39px;height:39px;flex:0 0 39px;padding:5px;border-radius:50%;border:1px solid #e6e6e6}._wrapper_kb55x_2{overflow-y:scroll}._category_kb55x_6{display:flex;flex-direction:column}._categoryTitle_kb55x_11{font-weight:600;font-size:16px;line-height:24px}._color_kb55x_17{gap:8px;display:flex;flex-direction:column}._name_kb55x_23{line-height:20px;padding:0 4px 4px}._content_kb55x_28{display:flex;flex-direction:column;width:100%}._label_kb55x_34{padding:8px 12px;border-radius:12px;display:flex;align-items:center;gap:5px;width:100%;background-color:var(--background-color);cursor:pointer}._input_kb55x_45[type=color]{width:20px;height:20px;padding:1px}._input_kb55x_45{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:100%;border:none;padding:0;cursor:pointer;border-radius:50%}._input_kb55x_45::-webkit-color-swatch{border-radius:50%;border:none}._input_kb55x_45::-webkit-color-swatch-wrapper{padding:0;border-radius:50%}._title_kb55x_71{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._field_kb55x_79{display:flex;flex-direction:column;gap:10px;padding:16px 0}._field_kb55x_79:not(:last-child){border-bottom:1px solid #f0f0f0}._alignments_kb55x_89{display:flex;flex-direction:column;gap:10px}._lineField_kb55x_95{display:flex;justify-content:space-between;align-items:center}._style_kb55x_101{flex:1 0 50%;display:flex;flex-direction:column;gap:8px}._header_kb55x_108{display:flex;align-items:center;justify-content:space-between}._wrapper_k9on2_1{overflow-y:scroll}._category_k9on2_5{display:flex;flex-direction:column}._categoryTitle_k9on2_10{font-weight:600;font-size:16px;line-height:24px}._font_k9on2_16{padding:12px 0;gap:8px;display:flex;align-items:center;position:relative;flex:1 1 auto;cursor:pointer}._font_k9on2_16:hover{background-color:#f8f8f8;border-radius:8px}._font_k9on2_16:not(:last-child){border-bottom:var(--default-border)}._font_k9on2_16:not(:last-child):hover{border-bottom:1px solid #f8f8f8}._content_k9on2_36{display:flex;flex-direction:column;width:100%}._icon_k9on2_42{padding:8px;border-radius:8px;background-color:#f8f8f8;display:flex;align-items:center;justify-content:center}._paragraph_k9on2_51{padding:12px}._deleteIcon_k9on2_55{position:absolute;right:10px;width:20px;height:20px}._iconButton_k9on2_62{width:32px;height:32px}._wrapper_94fpv_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_94fpv_16{transform:translate(0)}._close_94fpv_20{transform:translate(320px)}._header_94fpv_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_94fpv_31{font-weight:700;font-size:20px;line-height:24px}._options_94fpv_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_94fpv_44{opacity:0}._wrapper_1j33r_1{display:flex;flex-direction:column;gap:8px;height:100%;transition:.2s transform;position:absolute;top:0;left:0;padding:16px;width:100%;background:#fff;z-index:5}._open_1j33r_16{transform:translate(0)}._close_1j33r_20{transform:translate(320px)}._header_1j33r_24{display:flex;align-items:center;gap:8px;margin:0 0 10px}._title_1j33r_31{font-weight:700;font-size:20px;line-height:24px}._options_1j33r_37{display:flex;flex-direction:column;gap:10px;flex:1 1 auto}._clicked_1j33r_44{opacity:0}._label_1j33r_48{font-size:14px;font-weight:400;line-height:20px;color:var(--accent-color)}._alignments_1j33r_55{display:flex;flex-direction:column;gap:10px}._blocks_1j33r_61{display:flex;align-items:center;gap:8px}._alignment_1j33r_55{padding:8px;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1j33r_75{border:1px solid #ff3f19}._wrapper_jjfwh_1{display:flex;flex-direction:column;gap:20px;background:#fff;max-width:640px;width:100%;padding:16px 24px;border-radius:16px}._header_jjfwh_12{display:flex;justify-content:space-between;align-items:center;font-size:24px;font-weight:700;line-height:32px}._content_jjfwh_21{display:flex;flex-direction:column;gap:10px;overflow-y:scroll;max-height:500px}._buttons_jjfwh_29{display:flex;justify-content:end;gap:12px}._cancel_jjfwh_35{background-color:var(--background-color);color:var(--accent-color)}._label_jjfwh_40,._description_jjfwh_41{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._preview_jjfwh_49{display:flex;flex-direction:column;gap:10px}._block_jjfwh_55{padding:24px;display:flex;flex-direction:column;border:1px solid var(--background-color);border-radius:8px}._slug_jjfwh_63{line-height:20px;color:#ff3f19;margin-bottom:4px}._title_jjfwh_69{font-weight:600;font-size:16px;line-height:24px}._layout_vvs1k_1{width:100%;height:100%;display:flex;position:relative}._main_vvs1k_8{display:flex;flex-direction:column;width:100%;position:relative}._content_vvs1k_15{position:relative;height:100%;display:flex}._accordion_2tiiw_1{border-radius:24px;overflow:hidden;transition:all .3s ease;background-color:#f8f8f8;padding:24px}._header_2tiiw_9{display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-weight:700}._header_2tiiw_9 ._icon_2tiiw_16{transition:transform .3s ease}._header_2tiiw_9 ._icon_2tiiw_16._open_2tiiw_19{transform:rotate(180deg)}._content_2tiiw_23{overflow:hidden;transition:height .3s ease}._wrapper_1g82c_2{display:flex;flex-direction:column;gap:10px}._alignmentBlock_1g82c_8{padding:10px 0 16px;display:flex;flex-direction:column;gap:6px}._title_1g82c_15{font-weight:700;line-height:24px;font-size:16px;color:#252525}._subtitle_1g82c_22{color:#757575;font-size:14px;line-height:20px;font-weight:400}._alignmentContent_1g82c_29{display:flex;justify-content:space-between;align-items:stretch}._alignments_1g82c_35{border-radius:12px;background:#f8f8f8;display:grid;gap:4px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);flex:0 0 50%}._alignment_1g82c_8{cursor:pointer;display:flex;height:100%;width:100%;align-items:center;justify-content:center}._circle_1g82c_54{width:6px;height:6px;border-radius:50%;background-color:#c2c2c2}._paddings_1g82c_61{border-radius:12px;display:grid;gap:4px;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}._padding_1g82c_61{width:68px;display:flex;align-items:center;gap:4px;background:#f8f8f8;border-radius:12px;padding:10px 8px}._input_1g82c_79{width:100%}._subtitle_2zbxx_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_2zbxx_8,._text_2zbxx_9{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._top_2zbxx_16{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_2zbxx_23{display:flex;flex-direction:column;gap:6px}._typeTexts_3zlec_1{display:flex;align-items:center;gap:8px}._block_3zlec_7{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_3zlec_18{border:1px solid #ff3f19}._subtitle_11qr1_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_11qr1_8,._text_11qr1_9,._productsBlock_11qr1_10{padding:10px 0 16px;display:flex;flex-direction:column;gap:12px;width:100%}._productsBlock_11qr1_10{position:relative}._top_11qr1_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_11qr1_29{display:flex;flex-direction:column;gap:6px}._typeTexts_11qr1_35{display:flex;align-items:center;gap:8px}._block_11qr1_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_11qr1_52{border:1px solid #ff3f19}._products_11qr1_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_11qr1_10{display:flex;align-items:center;gap:8px;width:100%}._button_11qr1_70{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._disabled_11qr1_80{color:#757575}._image_11qr1_84{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_11qr1_91{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_11qr1_102{flex:1 1 100%}._buttons_11qr1_106{display:flex;align-items:center;gap:8px}._modal_11qr1_112{position:fixed;background-color:#fff;border:1px solid #f0f0f0;right:-300px;top:0;z-index:10000;max-width:276px;width:100%;padding:16px;border-radius:12px}._modal_11qr1_112 ._top_11qr1_22{display:flex;align-items:center;justify-content:space-between}._link_11qr1_130{display:flex;flex-direction:column;gap:8px}._modalOptions_11qr1_136{display:flex;flex-direction:column;gap:10px}._other_1wtgi_1{display:flex;flex-direction:column;gap:6px}._subtitle_1wtgi_7{color:#757575;font-size:14px;line-height:20px;font-weight:400}._items_1wtgi_14{display:flex;flex-direction:column;gap:8px}._subtitle_41klp_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_41klp_8,._text_41klp_9,._productsBlock_41klp_10,._buttonsBlock_41klp_11{padding:10px 0 16px;display:flex;flex-direction:column}._buttonsBlock_41klp_11{position:relative}._top_41klp_21{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_41klp_28{display:flex;flex-direction:column;gap:6px}._typeTexts_41klp_34{display:flex;align-items:center;gap:8px}._block_41klp_40{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_41klp_51{border:1px solid #ff3f19}._products_41klp_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_41klp_10{display:flex;align-items:center;gap:8px;width:100%}._button_41klp_11{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_41klp_79{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_41klp_86{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_41klp_97{flex:1 1 100%}._buttons_41klp_11{display:flex;align-items:center;gap:8px}._modal_41klp_107{position:fixed;background-color:#fff;right:-300px;z-index:10000;max-width:276px;width:100%;bottom:20px;padding:16px;border-radius:12px}._modal_41klp_107 ._top_41klp_21{display:flex;align-items:center;justify-content:space-between}._other_41klp_124{display:flex;flex-direction:column;gap:6px}._options_41klp_130{display:flex;flex-direction:column;gap:15px}._subtitle_1y5sw_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_1y5sw_8,._text_1y5sw_9,._productsBlock_1y5sw_10,._buttonsBlock_1y5sw_11{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._buttonsBlock_1y5sw_11{position:relative}._top_1y5sw_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_1y5sw_29{display:flex;flex-direction:column;gap:6px}._typeTexts_1y5sw_35{display:flex;align-items:center;gap:8px}._block_1y5sw_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1y5sw_52{border:1px solid #ff3f19}._products_1y5sw_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_1y5sw_10{display:flex;align-items:center;gap:8px;width:100%}._button_1y5sw_11{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_1y5sw_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_1y5sw_87{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_1y5sw_98{flex:1 1 100%}._buttons_1y5sw_11{display:flex;align-items:center;gap:8px}._modal_1y5sw_108{position:fixed;background-color:#fff;right:-300px;z-index:10000;max-width:276px;width:100%;bottom:20px;padding:16px;border-radius:12px}._modal_1y5sw_108 ._top_1y5sw_22{display:flex;align-items:center;justify-content:space-between}._other_1y5sw_125{display:flex;flex-direction:column;gap:6px}._options_1y5sw_131{display:flex;flex-direction:column;gap:15px}._wrapper_tn7gb_1{display:flex;flex-direction:column;gap:6px}._subtitle_tn7gb_7{color:#757575;font-size:14px;line-height:20px;font-weight:400}._content_tn7gb_14{display:flex;align-items:center;gap:10px;width:100%}._range_tn7gb_21{position:relative;flex:1}._track_tn7gb_26{position:absolute;width:95%;height:6px;background-color:#f0f0f0;border-radius:9999px;z-index:1}._progress_tn7gb_35{position:absolute;height:6px;width:100%;background-color:#ff3f19;transition:width .2s;border-radius:9999px;z-index:1}._dots_tn7gb_45{position:absolute;display:flex;justify-content:space-between;width:100%}._dot_tn7gb_45{width:14px;height:14px;border-radius:50%;transition:transform .2s;position:relative;top:-4px;left:0;z-index:1}._dot_tn7gb_45._active_tn7gb_62{background-color:#ff3f19;transform:scale(1)}._dot_tn7gb_45:not(._active_tn7gb_62){background-color:#e5e7eb;transform:scale(.9)}._dot_tn7gb_45:hover{transform:scale(1.1)}._input_tn7gb_74{position:absolute;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;cursor:pointer}._input_tn7gb_74::-webkit-slider-thumb,._input_tn7gb_74::-moz-range-thumb{-webkit-appearance:none!important;-moz-appearance:none;appearance:none;width:0;height:0}._countBlock_tn7gb_88{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#f8f8f8;border-radius:12px}._count_tn7gb_88{font-size:16px;font-weight:400;line-height:24px}._controls_tn7gb_103{display:flex;flex-direction:column}._button_tn7gb_108{transition:background-color .2s}._button_tn7gb_108:hover{background-color:#f3f4f6}._button_tn7gb_108:disabled{opacity:.5}._subtitle_1nl8x_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_1nl8x_8,._text_1nl8x_9,._productsBlock_1nl8x_10{padding:10px 0 16px;display:flex;flex-direction:column;gap:12px;width:100%}._productsBlock_1nl8x_10{position:relative}._top_1nl8x_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_1nl8x_29{display:flex;flex-direction:column;gap:6px}._typeTexts_1nl8x_35{display:flex;align-items:center;gap:8px}._block_1nl8x_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1nl8x_52{border:1px solid #ff3f19}._products_1nl8x_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_1nl8x_10{display:flex;align-items:center;gap:8px;width:100%}._button_1nl8x_70{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_1nl8x_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_1nl8x_87{border-radius:12px;display:flex;gap:4px;justify-content:space-between;align-items:center;flex:1 1 auto;background-color:#f8f8f8;padding:8px 12px}._name_1nl8x_98{flex:1 1 100%}._buttons_1nl8x_102{display:flex;align-items:center;gap:8px}._modal_1nl8x_108{position:fixed;background-color:#fff;border:1px solid #f0f0f0;right:-300px;top:0;z-index:10000;max-width:276px;width:100%;padding:16px;border-radius:12px}._modal_1nl8x_108 ._top_1nl8x_22{display:flex;align-items:center;justify-content:space-between}._link_1nl8x_126{display:flex;flex-direction:column;gap:8px}._modalOptions_1nl8x_132{display:flex;flex-direction:column;gap:10px}._options_163bj_1{border-radius:16px;border:1px solid #f0f0f0;width:100%;height:fit-content;padding:24px;display:flex;flex-direction:column;gap:20px}._price_163bj_12{display:flex;gap:4px;align-items:flex-start}._oldPrice_163bj_18{font-size:14px;font-weight:400;line-height:20px;text-decoration:line-through;color:#757575}._newPrice_163bj_26{font-size:20px;font-weight:700;line-height:24px;color:#252525}._meta_163bj_33{display:flex;flex-direction:column;gap:10px}._info_163bj_39{display:flex;align-items:center;justify-content:space-between;gap:10px}._infoRight_163bj_46{display:flex;align-items:center;gap:5px}._buttons_163bj_52{display:flex;flex-direction:column;gap:8px;width:100%}._variants_163bj_59{display:flex;flex-direction:column;gap:20px}._variant_163bj_59{display:flex;justify-content:space-between;align-items:center;border-radius:12px;padding:12px 16px;border:2px solid #e6e6e6}._stock_163bj_74{font-size:14px;font-weight:400;line-height:20px;color:#757575}._variantInfo_163bj_81{display:flex;flex-direction:column;gap:4px}._quantity_163bj_87{display:flex;align-items:stretch;gap:10px}._count_163bj_93{flex:1 1 auto;display:flex;justify-content:center;align-items:center;border:1px solid #e6e6e6}._button_163bj_52{background:#f8f8f8;border-radius:50%;padding:8px;display:flex;justify-content:center;align-items:center}._activeVariant_163bj_110{border:2px solid #ff3f19}._chargeTypes_163bj_114{display:flex;gap:5px;padding:4px;background-color:#f8f8f8}._charge_163bj_114{flex:1 1 auto;display:flex;justify-content:center;align-items:center;color:#757575;padding:8px;border-radius:12px}._chargeActive_163bj_131{background-color:#fff;color:#252525}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-O85p6vDc.cjs"),H=require("react"),Qr=require("react-dom");function cr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=cr(H),Zr=cr(Qr);/**
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-Cr8kurIY.cjs"),H=require("react"),Qr=require("react-dom");function cr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const y=cr(H),Zr=cr(Qr);/**
3
3
  * @remix-run/router v1.19.1
4
4
  *
5
5
  * Copyright (c) Remix Software Inc.
@@ -8,9 +8,9 @@
8
8
  * LICENSE.md file in the root directory of this source tree.
9
9
  *
10
10
  * @license MIT
11
- */function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Z.apply(this,arguments)}var re;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(re||(re={}));const An="popstate";function eo(e){e===void 0&&(e={});function t(o,a){let{pathname:s,search:i,hash:l}=o.location;return vt("",{pathname:s,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(o,a){return typeof a=="string"?a:Fe(a)}return no(t,r,null,e)}function T(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function to(){return Math.random().toString(36).substr(2,8)}function Fn(e,t){return{usr:e.state,key:e.key,idx:t}}function vt(e,t,r,o){return r===void 0&&(r=null),Z({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ie(t):t,{state:r,key:t&&t.key||o||to()})}function Fe(e){let{pathname:t="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Ie(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substr(o),e=e.substr(0,o)),e&&(t.pathname=e)}return t}function no(e,t,r,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:s=!1}=o,i=a.history,l=re.Pop,c=null,p=f();p==null&&(p=0,i.replaceState(Z({},i.state,{idx:p}),""));function f(){return(i.state||{idx:null}).idx}function h(){l=re.Pop;let w=f(),E=w==null?null:w-p;p=w,c&&c({action:l,location:y.location,delta:E})}function m(w,E){l=re.Push;let _=vt(y.location,w,E);p=f()+1;let B=Fn(_,p),P=y.createHref(_);try{i.pushState(B,"",P)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(P)}s&&c&&c({action:l,location:y.location,delta:1})}function v(w,E){l=re.Replace;let _=vt(y.location,w,E);p=f();let B=Fn(_,p),P=y.createHref(_);i.replaceState(B,"",P),s&&c&&c({action:l,location:y.location,delta:0})}function j(w){let E=a.location.origin!=="null"?a.location.origin:a.location.href,_=typeof w=="string"?w:Fe(w);return _=_.replace(/ $/,"%20"),T(E,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,E)}let y={get action(){return l},get location(){return e(a,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(An,h),c=w,()=>{a.removeEventListener(An,h),c=null}},createHref(w){return t(a,w)},createURL:j,encodeLocation(w){let E=j(w);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:m,replace:v,go(w){return i.go(w)}};return y}var X;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(X||(X={}));const ro=new Set(["lazy","caseSensitive","path","id","index","children"]);function oo(e){return e.index===!0}function St(e,t,r,o){return r===void 0&&(r=[]),o===void 0&&(o={}),e.map((a,s)=>{let i=[...r,String(s)],l=typeof a.id=="string"?a.id:i.join("-");if(T(a.index!==!0||!a.children,"Cannot specify children on an index route"),T(!o[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),oo(a)){let c=Z({},a,t(a),{id:l});return o[l]=c,c}else{let c=Z({},a,t(a),{id:l,children:void 0});return o[l]=c,a.children&&(c.children=St(a.children,t,i,o)),c}})}function $e(e,t,r){return r===void 0&&(r="/"),Ot(e,t,r,!1)}function Ot(e,t,r,o){let a=typeof t=="string"?Ie(t):t,s=ge(a.pathname||"/",r);if(s==null)return null;let i=ur(e);io(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let p=vo(s);l=go(i[c],p,o)}return l}function ao(e,t){let{route:r,pathname:o,params:a}=e;return{id:r.id,pathname:o,params:a,data:t[r.id],handle:r.handle}}function ur(e,t,r,o){t===void 0&&(t=[]),r===void 0&&(r=[]),o===void 0&&(o="");let a=(s,i,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};c.relativePath.startsWith("/")&&(T(c.relativePath.startsWith(o),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(o.length));let p=je([o,c.relativePath]),f=r.concat(c);s.children&&s.children.length>0&&(T(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),ur(s.children,t,f,p)),!(s.path==null&&!s.index)&&t.push({path:p,score:po(p,s.index),routesMeta:f})};return e.forEach((s,i)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))a(s,i);else for(let c of dr(s.path))a(s,i,c)}),t}function dr(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return a?[s,""]:[s];let i=dr(o.join("/")),l=[];return l.push(...i.map(c=>c===""?s:[s,c].join("/"))),a&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function io(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:mo(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const so=/^:[\w-]+$/,lo=3,co=2,uo=1,ho=10,fo=-2,Mn=e=>e==="*";function po(e,t){let r=e.split("/"),o=r.length;return r.some(Mn)&&(o+=fo),t&&(o+=co),r.filter(a=>!Mn(a)).reduce((a,s)=>a+(so.test(s)?lo:s===""?uo:ho),o)}function mo(e,t){return e.length===t.length&&e.slice(0,-1).every((o,a)=>o===t[a])?e[e.length-1]-t[t.length-1]:0}function go(e,t,r){r===void 0&&(r=!1);let{routesMeta:o}=e,a={},s="/",i=[];for(let l=0;l<o.length;++l){let c=o[l],p=l===o.length-1,f=s==="/"?t:t.slice(s.length)||"/",h=$t({path:c.relativePath,caseSensitive:c.caseSensitive,end:p},f),m=c.route;if(!h&&p&&r&&!o[o.length-1].route.index&&(h=$t({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!h)return null;Object.assign(a,h.params),i.push({params:a,pathname:je([s,h.pathname]),pathnameBase:bo(je([s,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(s=je([s,h.pathnameBase]))}return i}function $t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=xo(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],i=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:o.reduce((p,f,h)=>{let{paramName:m,isOptional:v}=f;if(m==="*"){let y=l[h]||"";i=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const j=l[h];return v&&!j?p[m]=void 0:p[m]=(j||"").replace(/%2F/g,"/"),p},{}),pathname:s,pathnameBase:i,pattern:e}}function xo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),oe(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(o.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function vo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return oe(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ge(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}function So(e,t){t===void 0&&(t="/");let{pathname:r,search:o="",hash:a=""}=typeof e=="string"?Ie(e):e;return{pathname:r?r.startsWith("/")?r:yo(r,t):t,search:jo(o),hash:wo(a)}}function yo(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function en(e,t,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fn(e,t){let r=hr(e);return t?r.map((o,a)=>a===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function pn(e,t,r,o){o===void 0&&(o=!1);let a;typeof e=="string"?a=Ie(e):(a=Z({},e),T(!a.pathname||!a.pathname.includes("?"),en("?","pathname","search",a)),T(!a.pathname||!a.pathname.includes("#"),en("#","pathname","hash",a)),T(!a.search||!a.search.includes("#"),en("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,l;if(i==null)l=r;else{let h=t.length-1;if(!o&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),h-=1;a.pathname=m.join("/")}l=h>=0?t[h]:"/"}let c=So(a,l),p=i&&i!=="/"&&i.endsWith("/"),f=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(p||f)&&(c.pathname+="/"),c}const je=e=>e.join("/").replace(/\/\/+/g,"/"),bo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class zt{constructor(t,r,o,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}}function Gt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fr=["post","put","patch","delete"],Co=new Set(fr),Eo=["get",...fr],Ro=new Set(Eo),_o=new Set([301,302,303,307,308]),ko=new Set([307,308]),tn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Po={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},mn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),pr="remix-router-transitions";function No(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",o=!r;T(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let u=e.detectErrorBoundary;a=d=>({hasErrorBoundary:u(d)})}else a=Lo;let s={},i=St(e.routes,a,void 0,s),l,c=e.basename||"/",p=e.unstable_dataStrategy||Fo,f=e.unstable_patchRoutesOnNavigation,h=Z({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,j=1e3,y=new Set,w=null,E=null,_=null,B=e.hydrationData!=null,P=$e(i,e.history.location,c),V=null;if(P==null&&!f){let u=se(404,{pathname:e.history.location.pathname}),{matches:d,route:x}=qn(i);P=d,V={[x.id]:u}}P&&!e.hydrationData&&kt(P,i,e.history.location.pathname).active&&(P=null);let $;if(P)if(P.some(u=>u.route.lazy))$=!1;else if(!P.some(u=>u.route.loader))$=!0;else if(h.v7_partialHydration){let u=e.hydrationData?e.hydrationData.loaderData:null,d=e.hydrationData?e.hydrationData.errors:null,x=S=>S.route.loader?typeof S.route.loader=="function"&&S.route.loader.hydrate===!0?!1:u&&u[S.route.id]!==void 0||d&&d[S.route.id]!==void 0:!0;if(d){let S=P.findIndex(k=>d[k.route.id]!==void 0);$=P.slice(0,S+1).every(x)}else $=P.every(x)}else $=e.hydrationData!=null;else if($=!1,P=[],h.v7_partialHydration){let u=kt(null,i,e.history.location.pathname);u.active&&u.matches&&(P=u.matches)}let G,g={historyAction:e.history.action,location:e.history.location,matches:P,initialized:$,navigation:tn,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||V,fetchers:new Map,blockers:new Map},C=re.Pop,N=!1,D,M=!1,F=new Map,W=null,le=!1,we=!1,Ce=[],wt=new Set,te=new Map,Ct=0,it=-1,We=new Map,Ee=new Set,Ge=new Map,st=new Map,Re=new Set,Oe=new Map,Ue=new Map,Br=new Map,Xt=!1;function Ar(){if(m=e.history.listen(u=>{let{action:d,location:x,delta:S}=u;if(Xt){Xt=!1;return}oe(Ue.size===0||S!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let k=Ln({currentLocation:g.location,nextLocation:x,historyAction:d});if(k&&S!=null){Xt=!0,e.history.go(S*-1),Rt(k,{state:"blocked",location:x,proceed(){Rt(k,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),e.history.go(S)},reset(){let L=new Map(g.blockers);L.set(k,dt),ie({blockers:L})}});return}return He(d,x)}),r){Yo(t,F);let u=()=>Xo(t,F);t.addEventListener("pagehide",u),W=()=>t.removeEventListener("pagehide",u)}return g.initialized||He(re.Pop,g.location,{initialHydration:!0}),G}function Fr(){m&&m(),W&&W(),v.clear(),D&&D.abort(),g.fetchers.forEach((u,d)=>Et(d)),g.blockers.forEach((u,d)=>Pn(d))}function Mr(u){return v.add(u),()=>v.delete(u)}function ie(u,d){d===void 0&&(d={}),g=Z({},g,u);let x=[],S=[];h.v7_fetcherPersist&&g.fetchers.forEach((k,L)=>{k.state==="idle"&&(Re.has(L)?S.push(L):x.push(L))}),[...v].forEach(k=>k(g,{deletedFetchers:S,unstable_viewTransitionOpts:d.viewTransitionOpts,unstable_flushSync:d.flushSync===!0})),h.v7_fetcherPersist&&(x.forEach(k=>g.fetchers.delete(k)),S.forEach(k=>Et(k)))}function qe(u,d,x){var S,k;let{flushSync:L}=x===void 0?{}:x,I=g.actionData!=null&&g.navigation.formMethod!=null&&pe(g.navigation.formMethod)&&g.navigation.state==="loading"&&((S=u.state)==null?void 0:S._isRedirect)!==!0,R;d.actionData?Object.keys(d.actionData).length>0?R=d.actionData:R=null:I?R=g.actionData:R=null;let O=d.loaderData?Wn(g.loaderData,d.loaderData,d.matches||[],d.errors):g.loaderData,A=g.blockers;A.size>0&&(A=new Map(A),A.forEach((K,J)=>A.set(J,dt)));let U=N===!0||g.navigation.formMethod!=null&&pe(g.navigation.formMethod)&&((k=u.state)==null?void 0:k._isRedirect)!==!0;l&&(i=l,l=void 0),le||C===re.Pop||(C===re.Push?e.history.push(u,u.state):C===re.Replace&&e.history.replace(u,u.state));let Y;if(C===re.Pop){let K=F.get(g.location.pathname);K&&K.has(u.pathname)?Y={currentLocation:g.location,nextLocation:u}:F.has(u.pathname)&&(Y={currentLocation:u,nextLocation:g.location})}else if(M){let K=F.get(g.location.pathname);K?K.add(u.pathname):(K=new Set([u.pathname]),F.set(g.location.pathname,K)),Y={currentLocation:g.location,nextLocation:u}}ie(Z({},d,{actionData:R,loaderData:O,historyAction:C,location:u,initialized:!0,navigation:tn,revalidation:"idle",restoreScrollPosition:Dn(u,d.matches||g.matches),preventScrollReset:U,blockers:A}),{viewTransitionOpts:Y,flushSync:L===!0}),C=re.Pop,N=!1,M=!1,le=!1,we=!1,Ce=[]}async function jn(u,d){if(typeof u=="number"){e.history.go(u);return}let x=dn(g.location,g.matches,c,h.v7_prependBasename,u,h.v7_relativeSplatPath,d==null?void 0:d.fromRouteId,d==null?void 0:d.relative),{path:S,submission:k,error:L}=In(h.v7_normalizeFormMethod,!1,x,d),I=g.location,R=vt(g.location,S,d&&d.state);R=Z({},R,e.history.encodeLocation(R));let O=d&&d.replace!=null?d.replace:void 0,A=re.Push;O===!0?A=re.Replace:O===!1||k!=null&&pe(k.formMethod)&&k.formAction===g.location.pathname+g.location.search&&(A=re.Replace);let U=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,Y=(d&&d.unstable_flushSync)===!0,K=Ln({currentLocation:I,nextLocation:R,historyAction:A});if(K){Rt(K,{state:"blocked",location:R,proceed(){Rt(K,{state:"proceeding",proceed:void 0,reset:void 0,location:R}),jn(u,d)},reset(){let J=new Map(g.blockers);J.set(K,dt),ie({blockers:J})}});return}return await He(A,R,{submission:k,pendingError:L,preventScrollReset:U,replace:d&&d.replace,enableViewTransition:d&&d.unstable_viewTransition,flushSync:Y})}function Ir(){if(Jt(),ie({revalidation:"loading"}),g.navigation.state!=="submitting"){if(g.navigation.state==="idle"){He(g.historyAction,g.location,{startUninterruptedRevalidation:!0});return}He(C||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation})}}async function He(u,d,x){D&&D.abort(),D=null,C=u,le=(x&&x.startUninterruptedRevalidation)===!0,Kr(g.location,g.matches),N=(x&&x.preventScrollReset)===!0,M=(x&&x.enableViewTransition)===!0;let S=l||i,k=x&&x.overrideNavigation,L=$e(S,d,c),I=(x&&x.flushSync)===!0,R=kt(L,S,d.pathname);if(R.active&&R.matches&&(L=R.matches),!L){let{error:q,notFoundMatches:ae,route:ne}=Qt(d.pathname);qe(d,{matches:ae,loaderData:{},errors:{[ne.id]:q}},{flushSync:I});return}if(g.initialized&&!we&&$o(g.location,d)&&!(x&&x.submission&&pe(x.submission.formMethod))){qe(d,{matches:L},{flushSync:I});return}D=new AbortController;let O=Je(e.history,d,D.signal,x&&x.submission),A;if(x&&x.pendingError)A=[rt(L).route.id,{type:X.error,error:x.pendingError}];else if(x&&x.submission&&pe(x.submission.formMethod)){let q=await Or(O,d,x.submission,L,R.active,{replace:x.replace,flushSync:I});if(q.shortCircuited)return;if(q.pendingActionResult){let[ae,ne]=q.pendingActionResult;if(ue(ne)&&Gt(ne.error)&&ne.error.status===404){D=null,qe(d,{matches:q.matches,loaderData:{},errors:{[ae]:ne.error}});return}}L=q.matches||L,A=q.pendingActionResult,k=nn(d,x.submission),I=!1,R.active=!1,O=Je(e.history,O.url,O.signal)}let{shortCircuited:U,matches:Y,loaderData:K,errors:J}=await Ur(O,d,L,R.active,k,x&&x.submission,x&&x.fetcherSubmission,x&&x.replace,x&&x.initialHydration===!0,I,A);U||(D=null,qe(d,Z({matches:Y||L},Gn(A),{loaderData:K,errors:J})))}async function Or(u,d,x,S,k,L){L===void 0&&(L={}),Jt();let I=qo(d,x);if(ie({navigation:I},{flushSync:L.flushSync===!0}),k){let A=await Pt(S,d.pathname,u.signal);if(A.type==="aborted")return{shortCircuited:!0};if(A.type==="error"){let{boundaryId:U,error:Y}=_t(d.pathname,A);return{matches:A.partialMatches,pendingActionResult:[U,{type:X.error,error:Y}]}}else if(A.matches)S=A.matches;else{let{notFoundMatches:U,error:Y,route:K}=Qt(d.pathname);return{matches:U,pendingActionResult:[K.id,{type:X.error,error:Y}]}}}let R,O=gt(S,d);if(!O.route.action&&!O.route.lazy)R={type:X.error,error:se(405,{method:u.method,pathname:d.pathname,routeId:O.route.id})};else if(R=(await ct("action",u,[O],S))[0],u.signal.aborted)return{shortCircuited:!0};if(Ve(R)){let A;return L&&L.replace!=null?A=L.replace:A=$n(R.response.headers.get("Location"),new URL(u.url),c)===g.location.pathname+g.location.search,await lt(u,R,{submission:x,replace:A}),{shortCircuited:!0}}if(ze(R))throw se(400,{type:"defer-action"});if(ue(R)){let A=rt(S,O.route.id);return(L&&L.replace)!==!0&&(C=re.Push),{matches:S,pendingActionResult:[A.route.id,R]}}return{matches:S,pendingActionResult:[O.route.id,R]}}async function Ur(u,d,x,S,k,L,I,R,O,A,U){let Y=k||nn(d,L),K=L||I||Jn(Y),J=!le&&(!h.v7_partialHydration||!O);if(S){if(J){let ee=wn(U);ie(Z({navigation:Y},ee!==void 0?{actionData:ee}:{}),{flushSync:A})}let z=await Pt(x,d.pathname,u.signal);if(z.type==="aborted")return{shortCircuited:!0};if(z.type==="error"){let{boundaryId:ee,error:ce}=_t(d.pathname,z);return{matches:z.partialMatches,loaderData:{},errors:{[ee]:ce}}}else if(z.matches)x=z.matches;else{let{error:ee,notFoundMatches:ce,route:Q}=Qt(d.pathname);return{matches:ce,loaderData:{},errors:{[Q.id]:ee}}}}let q=l||i,[ae,ne]=On(e.history,g,x,K,d,h.v7_partialHydration&&O===!0,h.v7_skipActionErrorRevalidation,we,Ce,wt,Re,Ge,Ee,q,c,U);if(Zt(z=>!(x&&x.some(ee=>ee.route.id===z))||ae&&ae.some(ee=>ee.route.id===z)),it=++Ct,ae.length===0&&ne.length===0){let z=_n();return qe(d,Z({matches:x,loaderData:{},errors:U&&ue(U[1])?{[U[0]]:U[1].error}:null},Gn(U),z?{fetchers:new Map(g.fetchers)}:{}),{flushSync:A}),{shortCircuited:!0}}if(J){let z={};if(!S){z.navigation=Y;let ee=wn(U);ee!==void 0&&(z.actionData=ee)}ne.length>0&&(z.fetchers=Hr(ne)),ie(z,{flushSync:A})}ne.forEach(z=>{te.has(z.key)&&Te(z.key),z.controller&&te.set(z.key,z.controller)});let ut=()=>ne.forEach(z=>Te(z.key));D&&D.signal.addEventListener("abort",ut);let{loaderResults:Be,fetcherResults:Ke}=await Cn(g.matches,x,ae,ne,u);if(u.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",ut),ne.forEach(z=>te.delete(z.key));let Ye=Kn([...Be,...Ke]);if(Ye){if(Ye.idx>=ae.length){let z=ne[Ye.idx-ae.length].key;Ee.add(z)}return await lt(u,Ye.result,{replace:R}),{shortCircuited:!0}}let{loaderData:Xe,errors:ve}=Vn(g,x,ae,Be,U,ne,Ke,Oe);Oe.forEach((z,ee)=>{z.subscribe(ce=>{(ce||z.done)&&Oe.delete(ee)})}),h.v7_partialHydration&&O&&g.errors&&Object.entries(g.errors).filter(z=>{let[ee]=z;return!ae.some(ce=>ce.route.id===ee)}).forEach(z=>{let[ee,ce]=z;ve=Object.assign(ve||{},{[ee]:ce})});let Lt=_n(),Nt=kn(it),Dt=Lt||Nt||ne.length>0;return Z({matches:x,loaderData:Xe,errors:ve},Dt?{fetchers:new Map(g.fetchers)}:{})}function wn(u){if(u&&!ue(u[1]))return{[u[0]]:u[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function Hr(u){return u.forEach(d=>{let x=g.fetchers.get(d.key),S=ht(void 0,x?x.data:void 0);g.fetchers.set(d.key,S)}),new Map(g.fetchers)}function $r(u,d,x,S){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");te.has(u)&&Te(u);let k=(S&&S.unstable_flushSync)===!0,L=l||i,I=dn(g.location,g.matches,c,h.v7_prependBasename,x,h.v7_relativeSplatPath,d,S==null?void 0:S.relative),R=$e(L,I,c),O=kt(R,L,I);if(O.active&&O.matches&&(R=O.matches),!R){_e(u,d,se(404,{pathname:I}),{flushSync:k});return}let{path:A,submission:U,error:Y}=In(h.v7_normalizeFormMethod,!0,I,S);if(Y){_e(u,d,Y,{flushSync:k});return}let K=gt(R,A);if(N=(S&&S.preventScrollReset)===!0,U&&pe(U.formMethod)){zr(u,d,A,K,R,O.active,k,U);return}Ge.set(u,{routeId:d,path:A}),Vr(u,d,A,K,R,O.active,k,U)}async function zr(u,d,x,S,k,L,I,R){Jt(),Ge.delete(u);function O(Q){if(!Q.route.action&&!Q.route.lazy){let ke=se(405,{method:R.formMethod,pathname:x,routeId:d});return _e(u,d,ke,{flushSync:I}),!0}return!1}if(!L&&O(S))return;let A=g.fetchers.get(u);De(u,Ko(R,A),{flushSync:I});let U=new AbortController,Y=Je(e.history,x,U.signal,R);if(L){let Q=await Pt(k,x,Y.signal);if(Q.type==="aborted")return;if(Q.type==="error"){let{error:ke}=_t(x,Q);_e(u,d,ke,{flushSync:I});return}else if(Q.matches){if(k=Q.matches,S=gt(k,x),O(S))return}else{_e(u,d,se(404,{pathname:x}),{flushSync:I});return}}te.set(u,U);let K=Ct,q=(await ct("action",Y,[S],k))[0];if(Y.signal.aborted){te.get(u)===U&&te.delete(u);return}if(h.v7_fetcherPersist&&Re.has(u)){if(Ve(q)||ue(q)){De(u,Ae(void 0));return}}else{if(Ve(q))if(te.delete(u),it>K){De(u,Ae(void 0));return}else return Ee.add(u),De(u,ht(R)),lt(Y,q,{fetcherSubmission:R});if(ue(q)){_e(u,d,q.error);return}}if(ze(q))throw se(400,{type:"defer-action"});let ae=g.navigation.location||g.location,ne=Je(e.history,ae,U.signal),ut=l||i,Be=g.navigation.state!=="idle"?$e(ut,g.navigation.location,c):g.matches;T(Be,"Didn't find any matches after fetcher action");let Ke=++Ct;We.set(u,Ke);let Ye=ht(R,q.data);g.fetchers.set(u,Ye);let[Xe,ve]=On(e.history,g,Be,R,ae,!1,h.v7_skipActionErrorRevalidation,we,Ce,wt,Re,Ge,Ee,ut,c,[S.route.id,q]);ve.filter(Q=>Q.key!==u).forEach(Q=>{let ke=Q.key,Bn=g.fetchers.get(ke),Jr=ht(void 0,Bn?Bn.data:void 0);g.fetchers.set(ke,Jr),te.has(ke)&&Te(ke),Q.controller&&te.set(ke,Q.controller)}),ie({fetchers:new Map(g.fetchers)});let Lt=()=>ve.forEach(Q=>Te(Q.key));U.signal.addEventListener("abort",Lt);let{loaderResults:Nt,fetcherResults:Dt}=await Cn(g.matches,Be,Xe,ve,ne);if(U.signal.aborted)return;U.signal.removeEventListener("abort",Lt),We.delete(u),te.delete(u),ve.forEach(Q=>te.delete(Q.key));let z=Kn([...Nt,...Dt]);if(z){if(z.idx>=Xe.length){let Q=ve[z.idx-Xe.length].key;Ee.add(Q)}return lt(ne,z.result)}let{loaderData:ee,errors:ce}=Vn(g,g.matches,Xe,Nt,void 0,ve,Dt,Oe);if(g.fetchers.has(u)){let Q=Ae(q.data);g.fetchers.set(u,Q)}kn(Ke),g.navigation.state==="loading"&&Ke>it?(T(C,"Expected pending action"),D&&D.abort(),qe(g.navigation.location,{matches:Be,loaderData:ee,errors:ce,fetchers:new Map(g.fetchers)})):(ie({errors:ce,loaderData:Wn(g.loaderData,ee,Be,ce),fetchers:new Map(g.fetchers)}),we=!1)}async function Vr(u,d,x,S,k,L,I,R){let O=g.fetchers.get(u);De(u,ht(R,O?O.data:void 0),{flushSync:I});let A=new AbortController,U=Je(e.history,x,A.signal);if(L){let q=await Pt(k,x,U.signal);if(q.type==="aborted")return;if(q.type==="error"){let{error:ae}=_t(x,q);_e(u,d,ae,{flushSync:I});return}else if(q.matches)k=q.matches,S=gt(k,x);else{_e(u,d,se(404,{pathname:x}),{flushSync:I});return}}te.set(u,A);let Y=Ct,J=(await ct("loader",U,[S],k))[0];if(ze(J)&&(J=await Sr(J,U.signal,!0)||J),te.get(u)===A&&te.delete(u),!U.signal.aborted){if(Re.has(u)){De(u,Ae(void 0));return}if(Ve(J))if(it>Y){De(u,Ae(void 0));return}else{Ee.add(u),await lt(U,J);return}if(ue(J)){_e(u,d,J.error);return}T(!ze(J),"Unhandled fetcher deferred data"),De(u,Ae(J.data))}}async function lt(u,d,x){let{submission:S,fetcherSubmission:k,replace:L}=x===void 0?{}:x;d.response.headers.has("X-Remix-Revalidate")&&(we=!0);let I=d.response.headers.get("Location");T(I,"Expected a Location header on the redirect Response"),I=$n(I,new URL(u.url),c);let R=vt(g.location,I,{_isRedirect:!0});if(r){let J=!1;if(d.response.headers.has("X-Remix-Reload-Document"))J=!0;else if(mn.test(I)){const q=e.history.createURL(I);J=q.origin!==t.location.origin||ge(q.pathname,c)==null}if(J){L?t.location.replace(I):t.location.assign(I);return}}D=null;let O=L===!0||d.response.headers.has("X-Remix-Replace")?re.Replace:re.Push,{formMethod:A,formAction:U,formEncType:Y}=g.navigation;!S&&!k&&A&&U&&Y&&(S=Jn(g.navigation));let K=S||k;if(ko.has(d.response.status)&&K&&pe(K.formMethod))await He(O,R,{submission:Z({},K,{formAction:I}),preventScrollReset:N});else{let J=nn(R,S);await He(O,R,{overrideNavigation:J,fetcherSubmission:k,preventScrollReset:N})}}async function ct(u,d,x,S){try{let k=await Mo(p,u,d,x,S,s,a);return await Promise.all(k.map((L,I)=>{if(Vo(L)){let R=L.result;return{type:X.redirect,response:Uo(R,d,x[I].route.id,S,c,h.v7_relativeSplatPath)}}return Oo(L)}))}catch(k){return x.map(()=>({type:X.error,error:k}))}}async function Cn(u,d,x,S,k){let[L,...I]=await Promise.all([x.length?ct("loader",k,x,d):[],...S.map(R=>{if(R.matches&&R.match&&R.controller){let O=Je(e.history,R.path,R.controller.signal);return ct("loader",O,[R.match],R.matches).then(A=>A[0])}else return Promise.resolve({type:X.error,error:se(404,{pathname:R.path})})})]);return await Promise.all([Xn(u,x,L,L.map(()=>k.signal),!1,g.loaderData),Xn(u,S.map(R=>R.match),I,S.map(R=>R.controller?R.controller.signal:null),!0)]),{loaderResults:L,fetcherResults:I}}function Jt(){we=!0,Ce.push(...Zt()),Ge.forEach((u,d)=>{te.has(d)&&(wt.add(d),Te(d))})}function De(u,d,x){x===void 0&&(x={}),g.fetchers.set(u,d),ie({fetchers:new Map(g.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function _e(u,d,x,S){S===void 0&&(S={});let k=rt(g.matches,d);Et(u),ie({errors:{[k.route.id]:x},fetchers:new Map(g.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function En(u){return h.v7_fetcherPersist&&(st.set(u,(st.get(u)||0)+1),Re.has(u)&&Re.delete(u)),g.fetchers.get(u)||Po}function Et(u){let d=g.fetchers.get(u);te.has(u)&&!(d&&d.state==="loading"&&We.has(u))&&Te(u),Ge.delete(u),We.delete(u),Ee.delete(u),Re.delete(u),wt.delete(u),g.fetchers.delete(u)}function Wr(u){if(h.v7_fetcherPersist){let d=(st.get(u)||0)-1;d<=0?(st.delete(u),Re.add(u)):st.set(u,d)}else Et(u);ie({fetchers:new Map(g.fetchers)})}function Te(u){let d=te.get(u);T(d,"Expected fetch controller: "+u),d.abort(),te.delete(u)}function Rn(u){for(let d of u){let x=En(d),S=Ae(x.data);g.fetchers.set(d,S)}}function _n(){let u=[],d=!1;for(let x of Ee){let S=g.fetchers.get(x);T(S,"Expected fetcher: "+x),S.state==="loading"&&(Ee.delete(x),u.push(x),d=!0)}return Rn(u),d}function kn(u){let d=[];for(let[x,S]of We)if(S<u){let k=g.fetchers.get(x);T(k,"Expected fetcher: "+x),k.state==="loading"&&(Te(x),We.delete(x),d.push(x))}return Rn(d),d.length>0}function Gr(u,d){let x=g.blockers.get(u)||dt;return Ue.get(u)!==d&&Ue.set(u,d),x}function Pn(u){g.blockers.delete(u),Ue.delete(u)}function Rt(u,d){let x=g.blockers.get(u)||dt;T(x.state==="unblocked"&&d.state==="blocked"||x.state==="blocked"&&d.state==="blocked"||x.state==="blocked"&&d.state==="proceeding"||x.state==="blocked"&&d.state==="unblocked"||x.state==="proceeding"&&d.state==="unblocked","Invalid blocker state transition: "+x.state+" -> "+d.state);let S=new Map(g.blockers);S.set(u,d),ie({blockers:S})}function Ln(u){let{currentLocation:d,nextLocation:x,historyAction:S}=u;if(Ue.size===0)return;Ue.size>1&&oe(!1,"A router only supports one blocker at a time");let k=Array.from(Ue.entries()),[L,I]=k[k.length-1],R=g.blockers.get(L);if(!(R&&R.state==="proceeding")&&I({currentLocation:d,nextLocation:x,historyAction:S}))return L}function Qt(u){let d=se(404,{pathname:u}),x=l||i,{matches:S,route:k}=qn(x);return Zt(),{notFoundMatches:S,route:k,error:d}}function _t(u,d){return{boundaryId:rt(d.partialMatches).route.id,error:se(400,{type:"route-discovery",pathname:u,message:d.error!=null&&"message"in d.error?d.error:String(d.error)})}}function Zt(u){let d=[];return Oe.forEach((x,S)=>{(!u||u(S))&&(x.cancel(),d.push(S),Oe.delete(S))}),d}function qr(u,d,x){if(w=u,_=d,E=x||null,!B&&g.navigation===tn){B=!0;let S=Dn(g.location,g.matches);S!=null&&ie({restoreScrollPosition:S})}return()=>{w=null,_=null,E=null}}function Nn(u,d){return E&&E(u,d.map(S=>ao(S,g.loaderData)))||u.key}function Kr(u,d){if(w&&_){let x=Nn(u,d);w[x]=_()}}function Dn(u,d){if(w){let x=Nn(u,d),S=w[x];if(typeof S=="number")return S}return null}function kt(u,d,x){if(f){if(y.has(x))return{active:!1,matches:u};if(u){if(Object.keys(u[0].params).length>0)return{active:!0,matches:Ot(d,x,c,!0)}}else return{active:!0,matches:Ot(d,x,c,!0)||[]}}return{active:!1,matches:null}}async function Pt(u,d,x){let S=u;for(;;){let k=l==null,L=l||i;try{await Ao(f,d,S,L,s,a,Br,x)}catch(O){return{type:"error",error:O,partialMatches:S}}finally{k&&(i=[...i])}if(x.aborted)return{type:"aborted"};let I=$e(L,d,c);if(I)return Tn(d,y),{type:"success",matches:I};let R=Ot(L,d,c,!0);if(!R||S.length===R.length&&S.every((O,A)=>O.route.id===R[A].route.id))return Tn(d,y),{type:"success",matches:null};S=R}}function Tn(u,d){if(d.size>=j){let x=d.values().next().value;d.delete(x)}d.add(u)}function Yr(u){s={},l=St(u,a,void 0,s)}function Xr(u,d){let x=l==null;gr(u,d,l||i,s,a),x&&(i=[...i],ie({}))}return G={get basename(){return c},get future(){return h},get state(){return g},get routes(){return i},get window(){return t},initialize:Ar,subscribe:Mr,enableScrollRestoration:qr,navigate:jn,fetch:$r,revalidate:Ir,createHref:u=>e.history.createHref(u),encodeLocation:u=>e.history.encodeLocation(u),getFetcher:En,deleteFetcher:Wr,dispose:Fr,getBlocker:Gr,deleteBlocker:Pn,patchRoutes:Xr,_internalFetchControllers:te,_internalActiveDeferreds:Oe,_internalSetRoutes:Yr},G}function Do(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function dn(e,t,r,o,a,s,i,l){let c,p;if(i){c=[];for(let h of t)if(c.push(h),h.route.id===i){p=h;break}}else c=t,p=t[t.length-1];let f=pn(a||".",fn(c,s),ge(e.pathname,r)||e.pathname,l==="path");return a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&p&&p.route.index&&!gn(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o&&r!=="/"&&(f.pathname=f.pathname==="/"?r:je([r,f.pathname])),Fe(f)}function In(e,t,r,o){if(!o||!Do(o))return{path:r};if(o.formMethod&&!Go(o.formMethod))return{path:r,error:se(405,{method:o.formMethod})};let a=()=>({path:r,error:se(400,{type:"invalid-body"})}),s=o.formMethod||"get",i=e?s.toUpperCase():s.toLowerCase(),l=xr(r);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!pe(i))return a();let m=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((v,j)=>{let[y,w]=j;return""+v+y+"="+w+`
12
- `},""):String(o.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:o.formEncType,formData:void 0,json:void 0,text:m}}}else if(o.formEncType==="application/json"){if(!pe(i))return a();try{let m=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:o.formEncType,formData:void 0,json:m,text:void 0}}}catch{return a()}}}T(typeof FormData=="function","FormData is not available in this environment");let c,p;if(o.formData)c=hn(o.formData),p=o.formData;else if(o.body instanceof FormData)c=hn(o.body),p=o.body;else if(o.body instanceof URLSearchParams)c=o.body,p=zn(c);else if(o.body==null)c=new URLSearchParams,p=new FormData;else try{c=new URLSearchParams(o.body),p=zn(c)}catch{return a()}let f={formMethod:i,formAction:l,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(pe(f.formMethod))return{path:r,submission:f};let h=Ie(r);return t&&h.search&&gn(h.search)&&c.append("index",""),h.search="?"+c,{path:Fe(h),submission:f}}function To(e,t){let r=e;if(t){let o=e.findIndex(a=>a.route.id===t);o>=0&&(r=e.slice(0,o))}return r}function On(e,t,r,o,a,s,i,l,c,p,f,h,m,v,j,y){let w=y?ue(y[1])?y[1].error:y[1].data:void 0,E=e.createURL(t.location),_=e.createURL(a),B=y&&ue(y[1])?y[0]:void 0,P=B?To(r,B):r,V=y?y[1].statusCode:void 0,$=i&&V&&V>=400,G=P.filter((C,N)=>{let{route:D}=C;if(D.lazy)return!0;if(D.loader==null)return!1;if(s)return typeof D.loader!="function"||D.loader.hydrate?!0:t.loaderData[D.id]===void 0&&(!t.errors||t.errors[D.id]===void 0);if(Bo(t.loaderData,t.matches[N],C)||c.some(W=>W===C.route.id))return!0;let M=t.matches[N],F=C;return Un(C,Z({currentUrl:E,currentParams:M.params,nextUrl:_,nextParams:F.params},o,{actionResult:w,actionStatus:V,defaultShouldRevalidate:$?!1:l||E.pathname+E.search===_.pathname+_.search||E.search!==_.search||mr(M,F)}))}),g=[];return h.forEach((C,N)=>{if(s||!r.some(le=>le.route.id===C.routeId)||f.has(N))return;let D=$e(v,C.path,j);if(!D){g.push({key:N,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let M=t.fetchers.get(N),F=gt(D,C.path),W=!1;m.has(N)?W=!1:p.has(N)?(p.delete(N),W=!0):M&&M.state!=="idle"&&M.data===void 0?W=l:W=Un(F,Z({currentUrl:E,currentParams:t.matches[t.matches.length-1].params,nextUrl:_,nextParams:r[r.length-1].params},o,{actionResult:w,actionStatus:V,defaultShouldRevalidate:$?!1:l})),W&&g.push({key:N,routeId:C.routeId,path:C.path,matches:D,match:F,controller:new AbortController})}),[G,g]}function Bo(e,t,r){let o=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return o||a}function mr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Un(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function Ao(e,t,r,o,a,s,i,l){let c=[t,...r.map(p=>p.route.id)].join("-");try{let p=i.get(c);p||(p=e({path:t,matches:r,patch:(f,h)=>{l.aborted||gr(f,h,o,a,s)}}),i.set(c,p)),p&&zo(p)&&await p}finally{i.delete(c)}}function gr(e,t,r,o,a){if(e){var s;let i=o[e];T(i,"No route found to patch children into: routeId = "+e);let l=St(t,a,[e,"patch",String(((s=i.children)==null?void 0:s.length)||"0")],o);i.children?i.children.push(...l):i.children=l}else{let i=St(t,a,["patch",String(r.length||"0")],o);r.push(...i)}}async function Hn(e,t,r){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let a=r[e.id];T(a,"No route found in manifest");let s={};for(let i in o){let c=a[i]!==void 0&&i!=="hasErrorBoundary";oe(!c,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!ro.has(i)&&(s[i]=o[i])}Object.assign(a,s),Object.assign(a,Z({},t(a),{lazy:void 0}))}function Fo(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Mo(e,t,r,o,a,s,i,l){let c=o.reduce((h,m)=>h.add(m.route.id),new Set),p=new Set,f=await e({matches:a.map(h=>{let m=c.has(h.route.id);return Z({},h,{shouldLoad:m,resolve:j=>(p.add(h.route.id),m?Io(t,r,h,s,i,j,l):Promise.resolve({type:X.data,result:void 0}))})}),request:r,params:a[0].params,context:l});return a.forEach(h=>T(p.has(h.route.id),'`match.resolve()` was not called for route id "'+h.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((h,m)=>c.has(a[m].route.id))}async function Io(e,t,r,o,a,s,i){let l,c,p=f=>{let h,m=new Promise((y,w)=>h=w);c=()=>h(),t.signal.addEventListener("abort",c);let v=y=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:i},...y!==void 0?[y]:[]),j;return s?j=s(y=>v(y)):j=(async()=>{try{return{type:"data",result:await v()}}catch(y){return{type:"error",result:y}}})(),Promise.race([j,m])};try{let f=r.route[e];if(r.route.lazy)if(f){let h,[m]=await Promise.all([p(f).catch(v=>{h=v}),Hn(r.route,a,o)]);if(h!==void 0)throw h;l=m}else if(await Hn(r.route,a,o),f=r.route[e],f)l=await p(f);else if(e==="action"){let h=new URL(t.url),m=h.pathname+h.search;throw se(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:X.data,result:void 0};else if(f)l=await p(f);else{let h=new URL(t.url),m=h.pathname+h.search;throw se(404,{pathname:m})}T(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:X.error,result:f}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function Oo(e){let{result:t,type:r}=e;if(vr(t)){let p;try{let f=t.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?t.body==null?p=null:p=await t.json():p=await t.text()}catch(f){return{type:X.error,error:f}}return r===X.error?{type:X.error,error:new zt(t.status,t.statusText,p),statusCode:t.status,headers:t.headers}:{type:X.data,data:p,statusCode:t.status,headers:t.headers}}if(r===X.error){if(Yn(t)){var o;if(t.data instanceof Error){var a;return{type:X.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new zt(((o=t.init)==null?void 0:o.status)||500,void 0,t.data)}return{type:X.error,error:t,statusCode:Gt(t)?t.status:void 0}}if(Wo(t)){var s,i;return{type:X.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(Yn(t)){var l,c;return{type:X.data,data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(c=t.init)!=null&&c.headers?new Headers(t.init.headers):void 0}}return{type:X.data,data:t}}function Uo(e,t,r,o,a,s){let i=e.headers.get("Location");if(T(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!mn.test(i)){let l=o.slice(0,o.findIndex(c=>c.route.id===r)+1);i=dn(new URL(t.url),l,a,!0,i,s),e.headers.set("Location",i)}return e}function $n(e,t,r){if(mn.test(e)){let o=e,a=o.startsWith("//")?new URL(t.protocol+o):new URL(o),s=ge(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}return e}function Je(e,t,r,o){let a=e.createURL(xr(t)).toString(),s={signal:r};if(o&&pe(o.formMethod)){let{formMethod:i,formEncType:l}=o;s.method=i.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(o.json)):l==="text/plain"?s.body=o.text:l==="application/x-www-form-urlencoded"&&o.formData?s.body=hn(o.formData):s.body=o.formData}return new Request(a,s)}function hn(e){let t=new URLSearchParams;for(let[r,o]of e.entries())t.append(r,typeof o=="string"?o:o.name);return t}function zn(e){let t=new FormData;for(let[r,o]of e.entries())t.append(r,o);return t}function Ho(e,t,r,o,a,s){let i={},l=null,c,p=!1,f={},h=o&&ue(o[1])?o[1].error:void 0;return r.forEach((m,v)=>{let j=t[v].route.id;if(T(!Ve(m),"Cannot handle redirect results in processLoaderData"),ue(m)){let y=m.error;h!==void 0&&(y=h,h=void 0),l=l||{};{let w=rt(e,j);l[w.route.id]==null&&(l[w.route.id]=y)}i[j]=void 0,p||(p=!0,c=Gt(m.error)?m.error.status:500),m.headers&&(f[j]=m.headers)}else ze(m)?(a.set(j,m.deferredData),i[j]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!p&&(c=m.statusCode),m.headers&&(f[j]=m.headers)):(i[j]=m.data,m.statusCode&&m.statusCode!==200&&!p&&(c=m.statusCode),m.headers&&(f[j]=m.headers))}),h!==void 0&&o&&(l={[o[0]]:h},i[o[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:f}}function Vn(e,t,r,o,a,s,i,l){let{loaderData:c,errors:p}=Ho(t,r,o,a,l);for(let f=0;f<s.length;f++){let{key:h,match:m,controller:v}=s[f];T(i!==void 0&&i[f]!==void 0,"Did not find corresponding fetcher result");let j=i[f];if(!(v&&v.signal.aborted))if(ue(j)){let y=rt(e.matches,m==null?void 0:m.route.id);p&&p[y.route.id]||(p=Z({},p,{[y.route.id]:j.error})),e.fetchers.delete(h)}else if(Ve(j))T(!1,"Unhandled fetcher revalidation redirect");else if(ze(j))T(!1,"Unhandled fetcher deferred data");else{let y=Ae(j.data);e.fetchers.set(h,y)}}return{loaderData:c,errors:p}}function Wn(e,t,r,o){let a=Z({},t);for(let s of r){let i=s.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&s.route.loader&&(a[i]=e[i]),o&&o.hasOwnProperty(i))break}return a}function Gn(e){return e?ue(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function rt(e,t){return(t?e.slice(0,e.findIndex(o=>o.route.id===t)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function qn(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function se(e,t){let{pathname:r,routeId:o,method:a,type:s,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",s==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
13
- `+i):a&&r&&o?c="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+o+'", ')+"so there is no way to handle the request.":s==="defer-action"?c="defer() is not supported in actions":s==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c='Route "'+o+'" does not match URL "'+r+'"'):e===404?(l="Not Found",c='No route matches URL "'+r+'"'):e===405&&(l="Method Not Allowed",a&&r&&o?c="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+o+'", ')+"so there is no way to handle the request.":a&&(c='Invalid request method "'+a.toUpperCase()+'"')),new zt(e||500,l,new Error(c),!0)}function Kn(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Ve(r))return{result:r,idx:t}}}function xr(e){let t=typeof e=="string"?Ie(e):e;return Fe(Z({},t,{hash:""}))}function $o(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function zo(e){return typeof e=="object"&&e!=null&&"then"in e}function Vo(e){return vr(e.result)&&_o.has(e.result.status)}function ze(e){return e.type===X.deferred}function ue(e){return e.type===X.error}function Ve(e){return(e&&e.type)===X.redirect}function Yn(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Wo(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function vr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Go(e){return Ro.has(e.toLowerCase())}function pe(e){return Co.has(e.toLowerCase())}async function Xn(e,t,r,o,a,s){for(let i=0;i<r.length;i++){let l=r[i],c=t[i];if(!c)continue;let p=e.find(h=>h.route.id===c.route.id),f=p!=null&&!mr(p,c)&&(s&&s[c.route.id])!==void 0;if(ze(l)&&(a||f)){let h=o[i];T(h,"Expected an AbortSignal for revalidating fetcher deferred result"),await Sr(l,h,a).then(m=>{m&&(r[i]=m||r[i])})}}}async function Sr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:X.data,data:e.deferredData.unwrappedData}}catch(a){return{type:X.error,error:a}}return{type:X.data,data:e.deferredData.data}}}function gn(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gt(e,t){let r=typeof t=="string"?Ie(t).search:t.search;if(e[e.length-1].route.index&&gn(r||""))return e[e.length-1];let o=hr(e);return o[o.length-1]}function Jn(e){let{formMethod:t,formAction:r,formEncType:o,text:a,formData:s,json:i}=e;if(!(!t||!r||!o)){if(a!=null)return{formMethod:t,formAction:r,formEncType:o,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:r,formEncType:o,formData:s,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:o,formData:void 0,json:i,text:void 0}}}function nn(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qo(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ht(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ko(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ae(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Yo(e,t){try{let r=e.sessionStorage.getItem(pr);if(r){let o=JSON.parse(r);for(let[a,s]of Object.entries(o||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function Xo(e,t){if(t.size>0){let r={};for(let[o,a]of t)r[o]=[...a];try{e.sessionStorage.setItem(pr,JSON.stringify(r))}catch(o){oe(!1,"Failed to save applied view transitions in sessionStorage ("+o+").")}}}/**
11
+ */function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Z.apply(this,arguments)}var re;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(re||(re={}));const An="popstate";function eo(e){e===void 0&&(e={});function t(o,a){let{pathname:s,search:i,hash:l}=o.location;return vt("",{pathname:s,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(o,a){return typeof a=="string"?a:Fe(a)}return no(t,r,null,e)}function T(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oe(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function to(){return Math.random().toString(36).substr(2,8)}function Fn(e,t){return{usr:e.state,key:e.key,idx:t}}function vt(e,t,r,o){return r===void 0&&(r=null),Z({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ie(t):t,{state:r,key:t&&t.key||o||to()})}function Fe(e){let{pathname:t="/",search:r="",hash:o=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Ie(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let o=e.indexOf("?");o>=0&&(t.search=e.substr(o),e=e.substr(0,o)),e&&(t.pathname=e)}return t}function no(e,t,r,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:s=!1}=o,i=a.history,l=re.Pop,c=null,p=f();p==null&&(p=0,i.replaceState(Z({},i.state,{idx:p}),""));function f(){return(i.state||{idx:null}).idx}function d(){l=re.Pop;let w=f(),E=w==null?null:w-p;p=w,c&&c({action:l,location:b.location,delta:E})}function m(w,E){l=re.Push;let _=vt(b.location,w,E);p=f()+1;let B=Fn(_,p),P=b.createHref(_);try{i.pushState(B,"",P)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(P)}s&&c&&c({action:l,location:b.location,delta:1})}function v(w,E){l=re.Replace;let _=vt(b.location,w,E);p=f();let B=Fn(_,p),P=b.createHref(_);i.replaceState(B,"",P),s&&c&&c({action:l,location:b.location,delta:0})}function j(w){let E=a.location.origin!=="null"?a.location.origin:a.location.href,_=typeof w=="string"?w:Fe(w);return _=_.replace(/ $/,"%20"),T(E,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,E)}let b={get action(){return l},get location(){return e(a,i)},listen(w){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(An,d),c=w,()=>{a.removeEventListener(An,d),c=null}},createHref(w){return t(a,w)},createURL:j,encodeLocation(w){let E=j(w);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:m,replace:v,go(w){return i.go(w)}};return b}var X;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(X||(X={}));const ro=new Set(["lazy","caseSensitive","path","id","index","children"]);function oo(e){return e.index===!0}function St(e,t,r,o){return r===void 0&&(r=[]),o===void 0&&(o={}),e.map((a,s)=>{let i=[...r,String(s)],l=typeof a.id=="string"?a.id:i.join("-");if(T(a.index!==!0||!a.children,"Cannot specify children on an index route"),T(!o[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),oo(a)){let c=Z({},a,t(a),{id:l});return o[l]=c,c}else{let c=Z({},a,t(a),{id:l,children:void 0});return o[l]=c,a.children&&(c.children=St(a.children,t,i,o)),c}})}function $e(e,t,r){return r===void 0&&(r="/"),Ot(e,t,r,!1)}function Ot(e,t,r,o){let a=typeof t=="string"?Ie(t):t,s=ge(a.pathname||"/",r);if(s==null)return null;let i=ur(e);io(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let p=vo(s);l=go(i[c],p,o)}return l}function ao(e,t){let{route:r,pathname:o,params:a}=e;return{id:r.id,pathname:o,params:a,data:t[r.id],handle:r.handle}}function ur(e,t,r,o){t===void 0&&(t=[]),r===void 0&&(r=[]),o===void 0&&(o="");let a=(s,i,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};c.relativePath.startsWith("/")&&(T(c.relativePath.startsWith(o),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(o.length));let p=je([o,c.relativePath]),f=r.concat(c);s.children&&s.children.length>0&&(T(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+p+'".')),ur(s.children,t,f,p)),!(s.path==null&&!s.index)&&t.push({path:p,score:po(p,s.index),routesMeta:f})};return e.forEach((s,i)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))a(s,i);else for(let c of dr(s.path))a(s,i,c)}),t}function dr(e){let t=e.split("/");if(t.length===0)return[];let[r,...o]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(o.length===0)return a?[s,""]:[s];let i=dr(o.join("/")),l=[];return l.push(...i.map(c=>c===""?s:[s,c].join("/"))),a&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function io(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:mo(t.routesMeta.map(o=>o.childrenIndex),r.routesMeta.map(o=>o.childrenIndex)))}const so=/^:[\w-]+$/,lo=3,co=2,uo=1,ho=10,fo=-2,Mn=e=>e==="*";function po(e,t){let r=e.split("/"),o=r.length;return r.some(Mn)&&(o+=fo),t&&(o+=co),r.filter(a=>!Mn(a)).reduce((a,s)=>a+(so.test(s)?lo:s===""?uo:ho),o)}function mo(e,t){return e.length===t.length&&e.slice(0,-1).every((o,a)=>o===t[a])?e[e.length-1]-t[t.length-1]:0}function go(e,t,r){r===void 0&&(r=!1);let{routesMeta:o}=e,a={},s="/",i=[];for(let l=0;l<o.length;++l){let c=o[l],p=l===o.length-1,f=s==="/"?t:t.slice(s.length)||"/",d=$t({path:c.relativePath,caseSensitive:c.caseSensitive,end:p},f),m=c.route;if(!d&&p&&r&&!o[o.length-1].route.index&&(d=$t({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;Object.assign(a,d.params),i.push({params:a,pathname:je([s,d.pathname]),pathnameBase:bo(je([s,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(s=je([s,d.pathnameBase]))}return i}function $t(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,o]=xo(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let s=a[0],i=s.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:o.reduce((p,f,d)=>{let{paramName:m,isOptional:v}=f;if(m==="*"){let b=l[d]||"";i=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const j=l[d];return v&&!j?p[m]=void 0:p[m]=(j||"").replace(/%2F/g,"/"),p},{}),pathname:s,pathnameBase:i,pattern:e}}function xo(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),oe(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let o=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(o.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(o.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function vo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return oe(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ge(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,o=e.charAt(r);return o&&o!=="/"?null:e.slice(r)||"/"}function So(e,t){t===void 0&&(t="/");let{pathname:r,search:o="",hash:a=""}=typeof e=="string"?Ie(e):e;return{pathname:r?r.startsWith("/")?r:yo(r,t):t,search:jo(o),hash:wo(a)}}function yo(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function en(e,t,r,o){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fn(e,t){let r=hr(e);return t?r.map((o,a)=>a===r.length-1?o.pathname:o.pathnameBase):r.map(o=>o.pathnameBase)}function pn(e,t,r,o){o===void 0&&(o=!1);let a;typeof e=="string"?a=Ie(e):(a=Z({},e),T(!a.pathname||!a.pathname.includes("?"),en("?","pathname","search",a)),T(!a.pathname||!a.pathname.includes("#"),en("#","pathname","hash",a)),T(!a.search||!a.search.includes("#"),en("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!o&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;a.pathname=m.join("/")}l=d>=0?t[d]:"/"}let c=So(a,l),p=i&&i!=="/"&&i.endsWith("/"),f=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(p||f)&&(c.pathname+="/"),c}const je=e=>e.join("/").replace(/\/\/+/g,"/"),bo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wo=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class zt{constructor(t,r,o,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,o instanceof Error?(this.data=o.toString(),this.error=o):this.data=o}}function Gt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const fr=["post","put","patch","delete"],Co=new Set(fr),Eo=["get",...fr],Ro=new Set(Eo),_o=new Set([301,302,303,307,308]),ko=new Set([307,308]),tn={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Po={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},mn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),pr="remix-router-transitions";function No(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",o=!r;T(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let u=e.detectErrorBoundary;a=h=>({hasErrorBoundary:u(h)})}else a=Lo;let s={},i=St(e.routes,a,void 0,s),l,c=e.basename||"/",p=e.unstable_dataStrategy||Fo,f=e.unstable_patchRoutesOnNavigation,d=Z({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,v=new Set,j=1e3,b=new Set,w=null,E=null,_=null,B=e.hydrationData!=null,P=$e(i,e.history.location,c),V=null;if(P==null&&!f){let u=se(404,{pathname:e.history.location.pathname}),{matches:h,route:x}=qn(i);P=h,V={[x.id]:u}}P&&!e.hydrationData&&kt(P,i,e.history.location.pathname).active&&(P=null);let $;if(P)if(P.some(u=>u.route.lazy))$=!1;else if(!P.some(u=>u.route.loader))$=!0;else if(d.v7_partialHydration){let u=e.hydrationData?e.hydrationData.loaderData:null,h=e.hydrationData?e.hydrationData.errors:null,x=S=>S.route.loader?typeof S.route.loader=="function"&&S.route.loader.hydrate===!0?!1:u&&u[S.route.id]!==void 0||h&&h[S.route.id]!==void 0:!0;if(h){let S=P.findIndex(k=>h[k.route.id]!==void 0);$=P.slice(0,S+1).every(x)}else $=P.every(x)}else $=e.hydrationData!=null;else if($=!1,P=[],d.v7_partialHydration){let u=kt(null,i,e.history.location.pathname);u.active&&u.matches&&(P=u.matches)}let G,g={historyAction:e.history.action,location:e.history.location,matches:P,initialized:$,navigation:tn,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||V,fetchers:new Map,blockers:new Map},C=re.Pop,N=!1,D,M=!1,F=new Map,W=null,le=!1,we=!1,Ce=[],wt=new Set,te=new Map,Ct=0,it=-1,We=new Map,Ee=new Set,Ge=new Map,st=new Map,Re=new Set,Oe=new Map,Ue=new Map,Br=new Map,Xt=!1;function Ar(){if(m=e.history.listen(u=>{let{action:h,location:x,delta:S}=u;if(Xt){Xt=!1;return}oe(Ue.size===0||S!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let k=Ln({currentLocation:g.location,nextLocation:x,historyAction:h});if(k&&S!=null){Xt=!0,e.history.go(S*-1),Rt(k,{state:"blocked",location:x,proceed(){Rt(k,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),e.history.go(S)},reset(){let L=new Map(g.blockers);L.set(k,dt),ie({blockers:L})}});return}return He(h,x)}),r){Yo(t,F);let u=()=>Xo(t,F);t.addEventListener("pagehide",u),W=()=>t.removeEventListener("pagehide",u)}return g.initialized||He(re.Pop,g.location,{initialHydration:!0}),G}function Fr(){m&&m(),W&&W(),v.clear(),D&&D.abort(),g.fetchers.forEach((u,h)=>Et(h)),g.blockers.forEach((u,h)=>Pn(h))}function Mr(u){return v.add(u),()=>v.delete(u)}function ie(u,h){h===void 0&&(h={}),g=Z({},g,u);let x=[],S=[];d.v7_fetcherPersist&&g.fetchers.forEach((k,L)=>{k.state==="idle"&&(Re.has(L)?S.push(L):x.push(L))}),[...v].forEach(k=>k(g,{deletedFetchers:S,unstable_viewTransitionOpts:h.viewTransitionOpts,unstable_flushSync:h.flushSync===!0})),d.v7_fetcherPersist&&(x.forEach(k=>g.fetchers.delete(k)),S.forEach(k=>Et(k)))}function qe(u,h,x){var S,k;let{flushSync:L}=x===void 0?{}:x,I=g.actionData!=null&&g.navigation.formMethod!=null&&pe(g.navigation.formMethod)&&g.navigation.state==="loading"&&((S=u.state)==null?void 0:S._isRedirect)!==!0,R;h.actionData?Object.keys(h.actionData).length>0?R=h.actionData:R=null:I?R=g.actionData:R=null;let O=h.loaderData?Wn(g.loaderData,h.loaderData,h.matches||[],h.errors):g.loaderData,A=g.blockers;A.size>0&&(A=new Map(A),A.forEach((K,J)=>A.set(J,dt)));let U=N===!0||g.navigation.formMethod!=null&&pe(g.navigation.formMethod)&&((k=u.state)==null?void 0:k._isRedirect)!==!0;l&&(i=l,l=void 0),le||C===re.Pop||(C===re.Push?e.history.push(u,u.state):C===re.Replace&&e.history.replace(u,u.state));let Y;if(C===re.Pop){let K=F.get(g.location.pathname);K&&K.has(u.pathname)?Y={currentLocation:g.location,nextLocation:u}:F.has(u.pathname)&&(Y={currentLocation:u,nextLocation:g.location})}else if(M){let K=F.get(g.location.pathname);K?K.add(u.pathname):(K=new Set([u.pathname]),F.set(g.location.pathname,K)),Y={currentLocation:g.location,nextLocation:u}}ie(Z({},h,{actionData:R,loaderData:O,historyAction:C,location:u,initialized:!0,navigation:tn,revalidation:"idle",restoreScrollPosition:Dn(u,h.matches||g.matches),preventScrollReset:U,blockers:A}),{viewTransitionOpts:Y,flushSync:L===!0}),C=re.Pop,N=!1,M=!1,le=!1,we=!1,Ce=[]}async function jn(u,h){if(typeof u=="number"){e.history.go(u);return}let x=dn(g.location,g.matches,c,d.v7_prependBasename,u,d.v7_relativeSplatPath,h==null?void 0:h.fromRouteId,h==null?void 0:h.relative),{path:S,submission:k,error:L}=In(d.v7_normalizeFormMethod,!1,x,h),I=g.location,R=vt(g.location,S,h&&h.state);R=Z({},R,e.history.encodeLocation(R));let O=h&&h.replace!=null?h.replace:void 0,A=re.Push;O===!0?A=re.Replace:O===!1||k!=null&&pe(k.formMethod)&&k.formAction===g.location.pathname+g.location.search&&(A=re.Replace);let U=h&&"preventScrollReset"in h?h.preventScrollReset===!0:void 0,Y=(h&&h.unstable_flushSync)===!0,K=Ln({currentLocation:I,nextLocation:R,historyAction:A});if(K){Rt(K,{state:"blocked",location:R,proceed(){Rt(K,{state:"proceeding",proceed:void 0,reset:void 0,location:R}),jn(u,h)},reset(){let J=new Map(g.blockers);J.set(K,dt),ie({blockers:J})}});return}return await He(A,R,{submission:k,pendingError:L,preventScrollReset:U,replace:h&&h.replace,enableViewTransition:h&&h.unstable_viewTransition,flushSync:Y})}function Ir(){if(Jt(),ie({revalidation:"loading"}),g.navigation.state!=="submitting"){if(g.navigation.state==="idle"){He(g.historyAction,g.location,{startUninterruptedRevalidation:!0});return}He(C||g.historyAction,g.navigation.location,{overrideNavigation:g.navigation})}}async function He(u,h,x){D&&D.abort(),D=null,C=u,le=(x&&x.startUninterruptedRevalidation)===!0,Kr(g.location,g.matches),N=(x&&x.preventScrollReset)===!0,M=(x&&x.enableViewTransition)===!0;let S=l||i,k=x&&x.overrideNavigation,L=$e(S,h,c),I=(x&&x.flushSync)===!0,R=kt(L,S,h.pathname);if(R.active&&R.matches&&(L=R.matches),!L){let{error:q,notFoundMatches:ae,route:ne}=Qt(h.pathname);qe(h,{matches:ae,loaderData:{},errors:{[ne.id]:q}},{flushSync:I});return}if(g.initialized&&!we&&$o(g.location,h)&&!(x&&x.submission&&pe(x.submission.formMethod))){qe(h,{matches:L},{flushSync:I});return}D=new AbortController;let O=Je(e.history,h,D.signal,x&&x.submission),A;if(x&&x.pendingError)A=[rt(L).route.id,{type:X.error,error:x.pendingError}];else if(x&&x.submission&&pe(x.submission.formMethod)){let q=await Or(O,h,x.submission,L,R.active,{replace:x.replace,flushSync:I});if(q.shortCircuited)return;if(q.pendingActionResult){let[ae,ne]=q.pendingActionResult;if(ue(ne)&&Gt(ne.error)&&ne.error.status===404){D=null,qe(h,{matches:q.matches,loaderData:{},errors:{[ae]:ne.error}});return}}L=q.matches||L,A=q.pendingActionResult,k=nn(h,x.submission),I=!1,R.active=!1,O=Je(e.history,O.url,O.signal)}let{shortCircuited:U,matches:Y,loaderData:K,errors:J}=await Ur(O,h,L,R.active,k,x&&x.submission,x&&x.fetcherSubmission,x&&x.replace,x&&x.initialHydration===!0,I,A);U||(D=null,qe(h,Z({matches:Y||L},Gn(A),{loaderData:K,errors:J})))}async function Or(u,h,x,S,k,L){L===void 0&&(L={}),Jt();let I=qo(h,x);if(ie({navigation:I},{flushSync:L.flushSync===!0}),k){let A=await Pt(S,h.pathname,u.signal);if(A.type==="aborted")return{shortCircuited:!0};if(A.type==="error"){let{boundaryId:U,error:Y}=_t(h.pathname,A);return{matches:A.partialMatches,pendingActionResult:[U,{type:X.error,error:Y}]}}else if(A.matches)S=A.matches;else{let{notFoundMatches:U,error:Y,route:K}=Qt(h.pathname);return{matches:U,pendingActionResult:[K.id,{type:X.error,error:Y}]}}}let R,O=gt(S,h);if(!O.route.action&&!O.route.lazy)R={type:X.error,error:se(405,{method:u.method,pathname:h.pathname,routeId:O.route.id})};else if(R=(await ct("action",u,[O],S))[0],u.signal.aborted)return{shortCircuited:!0};if(Ve(R)){let A;return L&&L.replace!=null?A=L.replace:A=$n(R.response.headers.get("Location"),new URL(u.url),c)===g.location.pathname+g.location.search,await lt(u,R,{submission:x,replace:A}),{shortCircuited:!0}}if(ze(R))throw se(400,{type:"defer-action"});if(ue(R)){let A=rt(S,O.route.id);return(L&&L.replace)!==!0&&(C=re.Push),{matches:S,pendingActionResult:[A.route.id,R]}}return{matches:S,pendingActionResult:[O.route.id,R]}}async function Ur(u,h,x,S,k,L,I,R,O,A,U){let Y=k||nn(h,L),K=L||I||Jn(Y),J=!le&&(!d.v7_partialHydration||!O);if(S){if(J){let ee=wn(U);ie(Z({navigation:Y},ee!==void 0?{actionData:ee}:{}),{flushSync:A})}let z=await Pt(x,h.pathname,u.signal);if(z.type==="aborted")return{shortCircuited:!0};if(z.type==="error"){let{boundaryId:ee,error:ce}=_t(h.pathname,z);return{matches:z.partialMatches,loaderData:{},errors:{[ee]:ce}}}else if(z.matches)x=z.matches;else{let{error:ee,notFoundMatches:ce,route:Q}=Qt(h.pathname);return{matches:ce,loaderData:{},errors:{[Q.id]:ee}}}}let q=l||i,[ae,ne]=On(e.history,g,x,K,h,d.v7_partialHydration&&O===!0,d.v7_skipActionErrorRevalidation,we,Ce,wt,Re,Ge,Ee,q,c,U);if(Zt(z=>!(x&&x.some(ee=>ee.route.id===z))||ae&&ae.some(ee=>ee.route.id===z)),it=++Ct,ae.length===0&&ne.length===0){let z=_n();return qe(h,Z({matches:x,loaderData:{},errors:U&&ue(U[1])?{[U[0]]:U[1].error}:null},Gn(U),z?{fetchers:new Map(g.fetchers)}:{}),{flushSync:A}),{shortCircuited:!0}}if(J){let z={};if(!S){z.navigation=Y;let ee=wn(U);ee!==void 0&&(z.actionData=ee)}ne.length>0&&(z.fetchers=Hr(ne)),ie(z,{flushSync:A})}ne.forEach(z=>{te.has(z.key)&&Te(z.key),z.controller&&te.set(z.key,z.controller)});let ut=()=>ne.forEach(z=>Te(z.key));D&&D.signal.addEventListener("abort",ut);let{loaderResults:Be,fetcherResults:Ke}=await Cn(g.matches,x,ae,ne,u);if(u.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",ut),ne.forEach(z=>te.delete(z.key));let Ye=Kn([...Be,...Ke]);if(Ye){if(Ye.idx>=ae.length){let z=ne[Ye.idx-ae.length].key;Ee.add(z)}return await lt(u,Ye.result,{replace:R}),{shortCircuited:!0}}let{loaderData:Xe,errors:ve}=Vn(g,x,ae,Be,U,ne,Ke,Oe);Oe.forEach((z,ee)=>{z.subscribe(ce=>{(ce||z.done)&&Oe.delete(ee)})}),d.v7_partialHydration&&O&&g.errors&&Object.entries(g.errors).filter(z=>{let[ee]=z;return!ae.some(ce=>ce.route.id===ee)}).forEach(z=>{let[ee,ce]=z;ve=Object.assign(ve||{},{[ee]:ce})});let Lt=_n(),Nt=kn(it),Dt=Lt||Nt||ne.length>0;return Z({matches:x,loaderData:Xe,errors:ve},Dt?{fetchers:new Map(g.fetchers)}:{})}function wn(u){if(u&&!ue(u[1]))return{[u[0]]:u[1].data};if(g.actionData)return Object.keys(g.actionData).length===0?null:g.actionData}function Hr(u){return u.forEach(h=>{let x=g.fetchers.get(h.key),S=ht(void 0,x?x.data:void 0);g.fetchers.set(h.key,S)}),new Map(g.fetchers)}function $r(u,h,x,S){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");te.has(u)&&Te(u);let k=(S&&S.unstable_flushSync)===!0,L=l||i,I=dn(g.location,g.matches,c,d.v7_prependBasename,x,d.v7_relativeSplatPath,h,S==null?void 0:S.relative),R=$e(L,I,c),O=kt(R,L,I);if(O.active&&O.matches&&(R=O.matches),!R){_e(u,h,se(404,{pathname:I}),{flushSync:k});return}let{path:A,submission:U,error:Y}=In(d.v7_normalizeFormMethod,!0,I,S);if(Y){_e(u,h,Y,{flushSync:k});return}let K=gt(R,A);if(N=(S&&S.preventScrollReset)===!0,U&&pe(U.formMethod)){zr(u,h,A,K,R,O.active,k,U);return}Ge.set(u,{routeId:h,path:A}),Vr(u,h,A,K,R,O.active,k,U)}async function zr(u,h,x,S,k,L,I,R){Jt(),Ge.delete(u);function O(Q){if(!Q.route.action&&!Q.route.lazy){let ke=se(405,{method:R.formMethod,pathname:x,routeId:h});return _e(u,h,ke,{flushSync:I}),!0}return!1}if(!L&&O(S))return;let A=g.fetchers.get(u);De(u,Ko(R,A),{flushSync:I});let U=new AbortController,Y=Je(e.history,x,U.signal,R);if(L){let Q=await Pt(k,x,Y.signal);if(Q.type==="aborted")return;if(Q.type==="error"){let{error:ke}=_t(x,Q);_e(u,h,ke,{flushSync:I});return}else if(Q.matches){if(k=Q.matches,S=gt(k,x),O(S))return}else{_e(u,h,se(404,{pathname:x}),{flushSync:I});return}}te.set(u,U);let K=Ct,q=(await ct("action",Y,[S],k))[0];if(Y.signal.aborted){te.get(u)===U&&te.delete(u);return}if(d.v7_fetcherPersist&&Re.has(u)){if(Ve(q)||ue(q)){De(u,Ae(void 0));return}}else{if(Ve(q))if(te.delete(u),it>K){De(u,Ae(void 0));return}else return Ee.add(u),De(u,ht(R)),lt(Y,q,{fetcherSubmission:R});if(ue(q)){_e(u,h,q.error);return}}if(ze(q))throw se(400,{type:"defer-action"});let ae=g.navigation.location||g.location,ne=Je(e.history,ae,U.signal),ut=l||i,Be=g.navigation.state!=="idle"?$e(ut,g.navigation.location,c):g.matches;T(Be,"Didn't find any matches after fetcher action");let Ke=++Ct;We.set(u,Ke);let Ye=ht(R,q.data);g.fetchers.set(u,Ye);let[Xe,ve]=On(e.history,g,Be,R,ae,!1,d.v7_skipActionErrorRevalidation,we,Ce,wt,Re,Ge,Ee,ut,c,[S.route.id,q]);ve.filter(Q=>Q.key!==u).forEach(Q=>{let ke=Q.key,Bn=g.fetchers.get(ke),Jr=ht(void 0,Bn?Bn.data:void 0);g.fetchers.set(ke,Jr),te.has(ke)&&Te(ke),Q.controller&&te.set(ke,Q.controller)}),ie({fetchers:new Map(g.fetchers)});let Lt=()=>ve.forEach(Q=>Te(Q.key));U.signal.addEventListener("abort",Lt);let{loaderResults:Nt,fetcherResults:Dt}=await Cn(g.matches,Be,Xe,ve,ne);if(U.signal.aborted)return;U.signal.removeEventListener("abort",Lt),We.delete(u),te.delete(u),ve.forEach(Q=>te.delete(Q.key));let z=Kn([...Nt,...Dt]);if(z){if(z.idx>=Xe.length){let Q=ve[z.idx-Xe.length].key;Ee.add(Q)}return lt(ne,z.result)}let{loaderData:ee,errors:ce}=Vn(g,g.matches,Xe,Nt,void 0,ve,Dt,Oe);if(g.fetchers.has(u)){let Q=Ae(q.data);g.fetchers.set(u,Q)}kn(Ke),g.navigation.state==="loading"&&Ke>it?(T(C,"Expected pending action"),D&&D.abort(),qe(g.navigation.location,{matches:Be,loaderData:ee,errors:ce,fetchers:new Map(g.fetchers)})):(ie({errors:ce,loaderData:Wn(g.loaderData,ee,Be,ce),fetchers:new Map(g.fetchers)}),we=!1)}async function Vr(u,h,x,S,k,L,I,R){let O=g.fetchers.get(u);De(u,ht(R,O?O.data:void 0),{flushSync:I});let A=new AbortController,U=Je(e.history,x,A.signal);if(L){let q=await Pt(k,x,U.signal);if(q.type==="aborted")return;if(q.type==="error"){let{error:ae}=_t(x,q);_e(u,h,ae,{flushSync:I});return}else if(q.matches)k=q.matches,S=gt(k,x);else{_e(u,h,se(404,{pathname:x}),{flushSync:I});return}}te.set(u,A);let Y=Ct,J=(await ct("loader",U,[S],k))[0];if(ze(J)&&(J=await Sr(J,U.signal,!0)||J),te.get(u)===A&&te.delete(u),!U.signal.aborted){if(Re.has(u)){De(u,Ae(void 0));return}if(Ve(J))if(it>Y){De(u,Ae(void 0));return}else{Ee.add(u),await lt(U,J);return}if(ue(J)){_e(u,h,J.error);return}T(!ze(J),"Unhandled fetcher deferred data"),De(u,Ae(J.data))}}async function lt(u,h,x){let{submission:S,fetcherSubmission:k,replace:L}=x===void 0?{}:x;h.response.headers.has("X-Remix-Revalidate")&&(we=!0);let I=h.response.headers.get("Location");T(I,"Expected a Location header on the redirect Response"),I=$n(I,new URL(u.url),c);let R=vt(g.location,I,{_isRedirect:!0});if(r){let J=!1;if(h.response.headers.has("X-Remix-Reload-Document"))J=!0;else if(mn.test(I)){const q=e.history.createURL(I);J=q.origin!==t.location.origin||ge(q.pathname,c)==null}if(J){L?t.location.replace(I):t.location.assign(I);return}}D=null;let O=L===!0||h.response.headers.has("X-Remix-Replace")?re.Replace:re.Push,{formMethod:A,formAction:U,formEncType:Y}=g.navigation;!S&&!k&&A&&U&&Y&&(S=Jn(g.navigation));let K=S||k;if(ko.has(h.response.status)&&K&&pe(K.formMethod))await He(O,R,{submission:Z({},K,{formAction:I}),preventScrollReset:N});else{let J=nn(R,S);await He(O,R,{overrideNavigation:J,fetcherSubmission:k,preventScrollReset:N})}}async function ct(u,h,x,S){try{let k=await Mo(p,u,h,x,S,s,a);return await Promise.all(k.map((L,I)=>{if(Vo(L)){let R=L.result;return{type:X.redirect,response:Uo(R,h,x[I].route.id,S,c,d.v7_relativeSplatPath)}}return Oo(L)}))}catch(k){return x.map(()=>({type:X.error,error:k}))}}async function Cn(u,h,x,S,k){let[L,...I]=await Promise.all([x.length?ct("loader",k,x,h):[],...S.map(R=>{if(R.matches&&R.match&&R.controller){let O=Je(e.history,R.path,R.controller.signal);return ct("loader",O,[R.match],R.matches).then(A=>A[0])}else return Promise.resolve({type:X.error,error:se(404,{pathname:R.path})})})]);return await Promise.all([Xn(u,x,L,L.map(()=>k.signal),!1,g.loaderData),Xn(u,S.map(R=>R.match),I,S.map(R=>R.controller?R.controller.signal:null),!0)]),{loaderResults:L,fetcherResults:I}}function Jt(){we=!0,Ce.push(...Zt()),Ge.forEach((u,h)=>{te.has(h)&&(wt.add(h),Te(h))})}function De(u,h,x){x===void 0&&(x={}),g.fetchers.set(u,h),ie({fetchers:new Map(g.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function _e(u,h,x,S){S===void 0&&(S={});let k=rt(g.matches,h);Et(u),ie({errors:{[k.route.id]:x},fetchers:new Map(g.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function En(u){return d.v7_fetcherPersist&&(st.set(u,(st.get(u)||0)+1),Re.has(u)&&Re.delete(u)),g.fetchers.get(u)||Po}function Et(u){let h=g.fetchers.get(u);te.has(u)&&!(h&&h.state==="loading"&&We.has(u))&&Te(u),Ge.delete(u),We.delete(u),Ee.delete(u),Re.delete(u),wt.delete(u),g.fetchers.delete(u)}function Wr(u){if(d.v7_fetcherPersist){let h=(st.get(u)||0)-1;h<=0?(st.delete(u),Re.add(u)):st.set(u,h)}else Et(u);ie({fetchers:new Map(g.fetchers)})}function Te(u){let h=te.get(u);T(h,"Expected fetch controller: "+u),h.abort(),te.delete(u)}function Rn(u){for(let h of u){let x=En(h),S=Ae(x.data);g.fetchers.set(h,S)}}function _n(){let u=[],h=!1;for(let x of Ee){let S=g.fetchers.get(x);T(S,"Expected fetcher: "+x),S.state==="loading"&&(Ee.delete(x),u.push(x),h=!0)}return Rn(u),h}function kn(u){let h=[];for(let[x,S]of We)if(S<u){let k=g.fetchers.get(x);T(k,"Expected fetcher: "+x),k.state==="loading"&&(Te(x),We.delete(x),h.push(x))}return Rn(h),h.length>0}function Gr(u,h){let x=g.blockers.get(u)||dt;return Ue.get(u)!==h&&Ue.set(u,h),x}function Pn(u){g.blockers.delete(u),Ue.delete(u)}function Rt(u,h){let x=g.blockers.get(u)||dt;T(x.state==="unblocked"&&h.state==="blocked"||x.state==="blocked"&&h.state==="blocked"||x.state==="blocked"&&h.state==="proceeding"||x.state==="blocked"&&h.state==="unblocked"||x.state==="proceeding"&&h.state==="unblocked","Invalid blocker state transition: "+x.state+" -> "+h.state);let S=new Map(g.blockers);S.set(u,h),ie({blockers:S})}function Ln(u){let{currentLocation:h,nextLocation:x,historyAction:S}=u;if(Ue.size===0)return;Ue.size>1&&oe(!1,"A router only supports one blocker at a time");let k=Array.from(Ue.entries()),[L,I]=k[k.length-1],R=g.blockers.get(L);if(!(R&&R.state==="proceeding")&&I({currentLocation:h,nextLocation:x,historyAction:S}))return L}function Qt(u){let h=se(404,{pathname:u}),x=l||i,{matches:S,route:k}=qn(x);return Zt(),{notFoundMatches:S,route:k,error:h}}function _t(u,h){return{boundaryId:rt(h.partialMatches).route.id,error:se(400,{type:"route-discovery",pathname:u,message:h.error!=null&&"message"in h.error?h.error:String(h.error)})}}function Zt(u){let h=[];return Oe.forEach((x,S)=>{(!u||u(S))&&(x.cancel(),h.push(S),Oe.delete(S))}),h}function qr(u,h,x){if(w=u,_=h,E=x||null,!B&&g.navigation===tn){B=!0;let S=Dn(g.location,g.matches);S!=null&&ie({restoreScrollPosition:S})}return()=>{w=null,_=null,E=null}}function Nn(u,h){return E&&E(u,h.map(S=>ao(S,g.loaderData)))||u.key}function Kr(u,h){if(w&&_){let x=Nn(u,h);w[x]=_()}}function Dn(u,h){if(w){let x=Nn(u,h),S=w[x];if(typeof S=="number")return S}return null}function kt(u,h,x){if(f){if(b.has(x))return{active:!1,matches:u};if(u){if(Object.keys(u[0].params).length>0)return{active:!0,matches:Ot(h,x,c,!0)}}else return{active:!0,matches:Ot(h,x,c,!0)||[]}}return{active:!1,matches:null}}async function Pt(u,h,x){let S=u;for(;;){let k=l==null,L=l||i;try{await Ao(f,h,S,L,s,a,Br,x)}catch(O){return{type:"error",error:O,partialMatches:S}}finally{k&&(i=[...i])}if(x.aborted)return{type:"aborted"};let I=$e(L,h,c);if(I)return Tn(h,b),{type:"success",matches:I};let R=Ot(L,h,c,!0);if(!R||S.length===R.length&&S.every((O,A)=>O.route.id===R[A].route.id))return Tn(h,b),{type:"success",matches:null};S=R}}function Tn(u,h){if(h.size>=j){let x=h.values().next().value;h.delete(x)}h.add(u)}function Yr(u){s={},l=St(u,a,void 0,s)}function Xr(u,h){let x=l==null;gr(u,h,l||i,s,a),x&&(i=[...i],ie({}))}return G={get basename(){return c},get future(){return d},get state(){return g},get routes(){return i},get window(){return t},initialize:Ar,subscribe:Mr,enableScrollRestoration:qr,navigate:jn,fetch:$r,revalidate:Ir,createHref:u=>e.history.createHref(u),encodeLocation:u=>e.history.encodeLocation(u),getFetcher:En,deleteFetcher:Wr,dispose:Fr,getBlocker:Gr,deleteBlocker:Pn,patchRoutes:Xr,_internalFetchControllers:te,_internalActiveDeferreds:Oe,_internalSetRoutes:Yr},G}function Do(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function dn(e,t,r,o,a,s,i,l){let c,p;if(i){c=[];for(let d of t)if(c.push(d),d.route.id===i){p=d;break}}else c=t,p=t[t.length-1];let f=pn(a||".",fn(c,s),ge(e.pathname,r)||e.pathname,l==="path");return a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&p&&p.route.index&&!gn(f.search)&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),o&&r!=="/"&&(f.pathname=f.pathname==="/"?r:je([r,f.pathname])),Fe(f)}function In(e,t,r,o){if(!o||!Do(o))return{path:r};if(o.formMethod&&!Go(o.formMethod))return{path:r,error:se(405,{method:o.formMethod})};let a=()=>({path:r,error:se(400,{type:"invalid-body"})}),s=o.formMethod||"get",i=e?s.toUpperCase():s.toLowerCase(),l=xr(r);if(o.body!==void 0){if(o.formEncType==="text/plain"){if(!pe(i))return a();let m=typeof o.body=="string"?o.body:o.body instanceof FormData||o.body instanceof URLSearchParams?Array.from(o.body.entries()).reduce((v,j)=>{let[b,w]=j;return""+v+b+"="+w+`
12
+ `},""):String(o.body);return{path:r,submission:{formMethod:i,formAction:l,formEncType:o.formEncType,formData:void 0,json:void 0,text:m}}}else if(o.formEncType==="application/json"){if(!pe(i))return a();try{let m=typeof o.body=="string"?JSON.parse(o.body):o.body;return{path:r,submission:{formMethod:i,formAction:l,formEncType:o.formEncType,formData:void 0,json:m,text:void 0}}}catch{return a()}}}T(typeof FormData=="function","FormData is not available in this environment");let c,p;if(o.formData)c=hn(o.formData),p=o.formData;else if(o.body instanceof FormData)c=hn(o.body),p=o.body;else if(o.body instanceof URLSearchParams)c=o.body,p=zn(c);else if(o.body==null)c=new URLSearchParams,p=new FormData;else try{c=new URLSearchParams(o.body),p=zn(c)}catch{return a()}let f={formMethod:i,formAction:l,formEncType:o&&o.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(pe(f.formMethod))return{path:r,submission:f};let d=Ie(r);return t&&d.search&&gn(d.search)&&c.append("index",""),d.search="?"+c,{path:Fe(d),submission:f}}function To(e,t){let r=e;if(t){let o=e.findIndex(a=>a.route.id===t);o>=0&&(r=e.slice(0,o))}return r}function On(e,t,r,o,a,s,i,l,c,p,f,d,m,v,j,b){let w=b?ue(b[1])?b[1].error:b[1].data:void 0,E=e.createURL(t.location),_=e.createURL(a),B=b&&ue(b[1])?b[0]:void 0,P=B?To(r,B):r,V=b?b[1].statusCode:void 0,$=i&&V&&V>=400,G=P.filter((C,N)=>{let{route:D}=C;if(D.lazy)return!0;if(D.loader==null)return!1;if(s)return typeof D.loader!="function"||D.loader.hydrate?!0:t.loaderData[D.id]===void 0&&(!t.errors||t.errors[D.id]===void 0);if(Bo(t.loaderData,t.matches[N],C)||c.some(W=>W===C.route.id))return!0;let M=t.matches[N],F=C;return Un(C,Z({currentUrl:E,currentParams:M.params,nextUrl:_,nextParams:F.params},o,{actionResult:w,actionStatus:V,defaultShouldRevalidate:$?!1:l||E.pathname+E.search===_.pathname+_.search||E.search!==_.search||mr(M,F)}))}),g=[];return d.forEach((C,N)=>{if(s||!r.some(le=>le.route.id===C.routeId)||f.has(N))return;let D=$e(v,C.path,j);if(!D){g.push({key:N,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let M=t.fetchers.get(N),F=gt(D,C.path),W=!1;m.has(N)?W=!1:p.has(N)?(p.delete(N),W=!0):M&&M.state!=="idle"&&M.data===void 0?W=l:W=Un(F,Z({currentUrl:E,currentParams:t.matches[t.matches.length-1].params,nextUrl:_,nextParams:r[r.length-1].params},o,{actionResult:w,actionStatus:V,defaultShouldRevalidate:$?!1:l})),W&&g.push({key:N,routeId:C.routeId,path:C.path,matches:D,match:F,controller:new AbortController})}),[G,g]}function Bo(e,t,r){let o=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return o||a}function mr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Un(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function Ao(e,t,r,o,a,s,i,l){let c=[t,...r.map(p=>p.route.id)].join("-");try{let p=i.get(c);p||(p=e({path:t,matches:r,patch:(f,d)=>{l.aborted||gr(f,d,o,a,s)}}),i.set(c,p)),p&&zo(p)&&await p}finally{i.delete(c)}}function gr(e,t,r,o,a){if(e){var s;let i=o[e];T(i,"No route found to patch children into: routeId = "+e);let l=St(t,a,[e,"patch",String(((s=i.children)==null?void 0:s.length)||"0")],o);i.children?i.children.push(...l):i.children=l}else{let i=St(t,a,["patch",String(r.length||"0")],o);r.push(...i)}}async function Hn(e,t,r){if(!e.lazy)return;let o=await e.lazy();if(!e.lazy)return;let a=r[e.id];T(a,"No route found in manifest");let s={};for(let i in o){let c=a[i]!==void 0&&i!=="hasErrorBoundary";oe(!c,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!c&&!ro.has(i)&&(s[i]=o[i])}Object.assign(a,s),Object.assign(a,Z({},t(a),{lazy:void 0}))}function Fo(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function Mo(e,t,r,o,a,s,i,l){let c=o.reduce((d,m)=>d.add(m.route.id),new Set),p=new Set,f=await e({matches:a.map(d=>{let m=c.has(d.route.id);return Z({},d,{shouldLoad:m,resolve:j=>(p.add(d.route.id),m?Io(t,r,d,s,i,j,l):Promise.resolve({type:X.data,result:void 0}))})}),request:r,params:a[0].params,context:l});return a.forEach(d=>T(p.has(d.route.id),'`match.resolve()` was not called for route id "'+d.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),f.filter((d,m)=>c.has(a[m].route.id))}async function Io(e,t,r,o,a,s,i){let l,c,p=f=>{let d,m=new Promise((b,w)=>d=w);c=()=>d(),t.signal.addEventListener("abort",c);let v=b=>typeof f!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):f({request:t,params:r.params,context:i},...b!==void 0?[b]:[]),j;return s?j=s(b=>v(b)):j=(async()=>{try{return{type:"data",result:await v()}}catch(b){return{type:"error",result:b}}})(),Promise.race([j,m])};try{let f=r.route[e];if(r.route.lazy)if(f){let d,[m]=await Promise.all([p(f).catch(v=>{d=v}),Hn(r.route,a,o)]);if(d!==void 0)throw d;l=m}else if(await Hn(r.route,a,o),f=r.route[e],f)l=await p(f);else if(e==="action"){let d=new URL(t.url),m=d.pathname+d.search;throw se(405,{method:t.method,pathname:m,routeId:r.route.id})}else return{type:X.data,result:void 0};else if(f)l=await p(f);else{let d=new URL(t.url),m=d.pathname+d.search;throw se(404,{pathname:m})}T(l.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(f){return{type:X.error,result:f}}finally{c&&t.signal.removeEventListener("abort",c)}return l}async function Oo(e){let{result:t,type:r}=e;if(vr(t)){let p;try{let f=t.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?t.body==null?p=null:p=await t.json():p=await t.text()}catch(f){return{type:X.error,error:f}}return r===X.error?{type:X.error,error:new zt(t.status,t.statusText,p),statusCode:t.status,headers:t.headers}:{type:X.data,data:p,statusCode:t.status,headers:t.headers}}if(r===X.error){if(Yn(t)){var o;if(t.data instanceof Error){var a;return{type:X.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new zt(((o=t.init)==null?void 0:o.status)||500,void 0,t.data)}return{type:X.error,error:t,statusCode:Gt(t)?t.status:void 0}}if(Wo(t)){var s,i;return{type:X.deferred,deferredData:t,statusCode:(s=t.init)==null?void 0:s.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(Yn(t)){var l,c;return{type:X.data,data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(c=t.init)!=null&&c.headers?new Headers(t.init.headers):void 0}}return{type:X.data,data:t}}function Uo(e,t,r,o,a,s){let i=e.headers.get("Location");if(T(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!mn.test(i)){let l=o.slice(0,o.findIndex(c=>c.route.id===r)+1);i=dn(new URL(t.url),l,a,!0,i,s),e.headers.set("Location",i)}return e}function $n(e,t,r){if(mn.test(e)){let o=e,a=o.startsWith("//")?new URL(t.protocol+o):new URL(o),s=ge(a.pathname,r)!=null;if(a.origin===t.origin&&s)return a.pathname+a.search+a.hash}return e}function Je(e,t,r,o){let a=e.createURL(xr(t)).toString(),s={signal:r};if(o&&pe(o.formMethod)){let{formMethod:i,formEncType:l}=o;s.method=i.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(o.json)):l==="text/plain"?s.body=o.text:l==="application/x-www-form-urlencoded"&&o.formData?s.body=hn(o.formData):s.body=o.formData}return new Request(a,s)}function hn(e){let t=new URLSearchParams;for(let[r,o]of e.entries())t.append(r,typeof o=="string"?o:o.name);return t}function zn(e){let t=new FormData;for(let[r,o]of e.entries())t.append(r,o);return t}function Ho(e,t,r,o,a,s){let i={},l=null,c,p=!1,f={},d=o&&ue(o[1])?o[1].error:void 0;return r.forEach((m,v)=>{let j=t[v].route.id;if(T(!Ve(m),"Cannot handle redirect results in processLoaderData"),ue(m)){let b=m.error;d!==void 0&&(b=d,d=void 0),l=l||{};{let w=rt(e,j);l[w.route.id]==null&&(l[w.route.id]=b)}i[j]=void 0,p||(p=!0,c=Gt(m.error)?m.error.status:500),m.headers&&(f[j]=m.headers)}else ze(m)?(a.set(j,m.deferredData),i[j]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!p&&(c=m.statusCode),m.headers&&(f[j]=m.headers)):(i[j]=m.data,m.statusCode&&m.statusCode!==200&&!p&&(c=m.statusCode),m.headers&&(f[j]=m.headers))}),d!==void 0&&o&&(l={[o[0]]:d},i[o[0]]=void 0),{loaderData:i,errors:l,statusCode:c||200,loaderHeaders:f}}function Vn(e,t,r,o,a,s,i,l){let{loaderData:c,errors:p}=Ho(t,r,o,a,l);for(let f=0;f<s.length;f++){let{key:d,match:m,controller:v}=s[f];T(i!==void 0&&i[f]!==void 0,"Did not find corresponding fetcher result");let j=i[f];if(!(v&&v.signal.aborted))if(ue(j)){let b=rt(e.matches,m==null?void 0:m.route.id);p&&p[b.route.id]||(p=Z({},p,{[b.route.id]:j.error})),e.fetchers.delete(d)}else if(Ve(j))T(!1,"Unhandled fetcher revalidation redirect");else if(ze(j))T(!1,"Unhandled fetcher deferred data");else{let b=Ae(j.data);e.fetchers.set(d,b)}}return{loaderData:c,errors:p}}function Wn(e,t,r,o){let a=Z({},t);for(let s of r){let i=s.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&s.route.loader&&(a[i]=e[i]),o&&o.hasOwnProperty(i))break}return a}function Gn(e){return e?ue(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function rt(e,t){return(t?e.slice(0,e.findIndex(o=>o.route.id===t)+1):[...e]).reverse().find(o=>o.route.hasErrorBoundary===!0)||e[0]}function qn(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function se(e,t){let{pathname:r,routeId:o,method:a,type:s,message:i}=t===void 0?{}:t,l="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(l="Bad Request",s==="route-discovery"?c='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
13
+ `+i):a&&r&&o?c="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+o+'", ')+"so there is no way to handle the request.":s==="defer-action"?c="defer() is not supported in actions":s==="invalid-body"&&(c="Unable to encode submission body")):e===403?(l="Forbidden",c='Route "'+o+'" does not match URL "'+r+'"'):e===404?(l="Not Found",c='No route matches URL "'+r+'"'):e===405&&(l="Method Not Allowed",a&&r&&o?c="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+o+'", ')+"so there is no way to handle the request.":a&&(c='Invalid request method "'+a.toUpperCase()+'"')),new zt(e||500,l,new Error(c),!0)}function Kn(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Ve(r))return{result:r,idx:t}}}function xr(e){let t=typeof e=="string"?Ie(e):e;return Fe(Z({},t,{hash:""}))}function $o(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function zo(e){return typeof e=="object"&&e!=null&&"then"in e}function Vo(e){return vr(e.result)&&_o.has(e.result.status)}function ze(e){return e.type===X.deferred}function ue(e){return e.type===X.error}function Ve(e){return(e&&e.type)===X.redirect}function Yn(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Wo(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function vr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Go(e){return Ro.has(e.toLowerCase())}function pe(e){return Co.has(e.toLowerCase())}async function Xn(e,t,r,o,a,s){for(let i=0;i<r.length;i++){let l=r[i],c=t[i];if(!c)continue;let p=e.find(d=>d.route.id===c.route.id),f=p!=null&&!mr(p,c)&&(s&&s[c.route.id])!==void 0;if(ze(l)&&(a||f)){let d=o[i];T(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await Sr(l,d,a).then(m=>{m&&(r[i]=m||r[i])})}}}async function Sr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:X.data,data:e.deferredData.unwrappedData}}catch(a){return{type:X.error,error:a}}return{type:X.data,data:e.deferredData.data}}}function gn(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gt(e,t){let r=typeof t=="string"?Ie(t).search:t.search;if(e[e.length-1].route.index&&gn(r||""))return e[e.length-1];let o=hr(e);return o[o.length-1]}function Jn(e){let{formMethod:t,formAction:r,formEncType:o,text:a,formData:s,json:i}=e;if(!(!t||!r||!o)){if(a!=null)return{formMethod:t,formAction:r,formEncType:o,formData:void 0,json:void 0,text:a};if(s!=null)return{formMethod:t,formAction:r,formEncType:o,formData:s,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:o,formData:void 0,json:i,text:void 0}}}function nn(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qo(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ht(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ko(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ae(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Yo(e,t){try{let r=e.sessionStorage.getItem(pr);if(r){let o=JSON.parse(r);for(let[a,s]of Object.entries(o||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function Xo(e,t){if(t.size>0){let r={};for(let[o,a]of t)r[o]=[...a];try{e.sessionStorage.setItem(pr,JSON.stringify(r))}catch(o){oe(!1,"Failed to save applied view transitions in sessionStorage ("+o+").")}}}/**
14
14
  * React Router v6.26.1
15
15
  *
16
16
  * Copyright (c) Remix Software Inc.
@@ -19,9 +19,9 @@
19
19
  * LICENSE.md file in the root directory of this source tree.
20
20
  *
21
21
  * @license MIT
22
- */function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Vt.apply(this,arguments)}const ot=b.createContext(null);process.env.NODE_ENV!=="production"&&(ot.displayName="DataRouter");const qt=b.createContext(null);process.env.NODE_ENV!=="production"&&(qt.displayName="DataRouterState");const Jo=b.createContext(null);process.env.NODE_ENV!=="production"&&(Jo.displayName="Await");const xe=b.createContext(null);process.env.NODE_ENV!=="production"&&(xe.displayName="Navigation");const Kt=b.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="Location");const Ne=b.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Ne.displayName="Route");const xn=b.createContext(null);process.env.NODE_ENV!=="production"&&(xn.displayName="RouteError");function Qo(e,t){let{relative:r}=t===void 0?{}:t;bt()||(process.env.NODE_ENV!=="production"?T(!1,"useHref() may be used only in the context of a <Router> component."):T(!1));let{basename:o,navigator:a}=b.useContext(xe),{hash:s,pathname:i,search:l}=jt(e,{relative:r}),c=i;return o!=="/"&&(c=i==="/"?o:je([o,i])),a.createHref({pathname:c,search:l,hash:s})}function bt(){return b.useContext(Kt)!=null}function at(){return bt()||(process.env.NODE_ENV!=="production"?T(!1,"useLocation() may be used only in the context of a <Router> component."):T(!1)),b.useContext(Kt).location}const yr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function br(e){b.useContext(xe).static||b.useLayoutEffect(e)}function jr(){let{isDataRoute:e}=b.useContext(Ne);return e?da():Zo()}function Zo(){bt()||(process.env.NODE_ENV!=="production"?T(!1,"useNavigate() may be used only in the context of a <Router> component."):T(!1));let e=b.useContext(ot),{basename:t,future:r,navigator:o}=b.useContext(xe),{matches:a}=b.useContext(Ne),{pathname:s}=at(),i=JSON.stringify(fn(a,r.v7_relativeSplatPath)),l=b.useRef(!1);return br(()=>{l.current=!0}),b.useCallback(function(p,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&oe(l.current,yr),!l.current)return;if(typeof p=="number"){o.go(p);return}let h=pn(p,JSON.parse(i),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:je([t,h.pathname])),(f.replace?o.replace:o.push)(h,f.state,f)},[t,o,i,s,e])}function jt(e,t){let{relative:r}=t===void 0?{}:t,{future:o}=b.useContext(xe),{matches:a}=b.useContext(Ne),{pathname:s}=at(),i=JSON.stringify(fn(a,o.v7_relativeSplatPath));return b.useMemo(()=>pn(e,JSON.parse(i),s,r==="path"),[e,i,s,r])}function ea(e,t,r,o){bt()||(process.env.NODE_ENV!=="production"?T(!1,"useRoutes() may be used only in the context of a <Router> component."):T(!1));let{navigator:a}=b.useContext(xe),{matches:s}=b.useContext(Ne),i=s[s.length-1],l=i?i.params:{},c=i?i.pathname:"/",p=i?i.pathnameBase:"/",f=i&&i.route;if(process.env.NODE_ENV!=="production"){let E=f&&f.path||"";Cr(c,!f||E.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+c+'" (under <Route path="'+E+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
22
+ */function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Vt.apply(this,arguments)}const ot=y.createContext(null);process.env.NODE_ENV!=="production"&&(ot.displayName="DataRouter");const qt=y.createContext(null);process.env.NODE_ENV!=="production"&&(qt.displayName="DataRouterState");const Jo=y.createContext(null);process.env.NODE_ENV!=="production"&&(Jo.displayName="Await");const xe=y.createContext(null);process.env.NODE_ENV!=="production"&&(xe.displayName="Navigation");const Kt=y.createContext(null);process.env.NODE_ENV!=="production"&&(Kt.displayName="Location");const Ne=y.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Ne.displayName="Route");const xn=y.createContext(null);process.env.NODE_ENV!=="production"&&(xn.displayName="RouteError");function Qo(e,t){let{relative:r}=t===void 0?{}:t;bt()||(process.env.NODE_ENV!=="production"?T(!1,"useHref() may be used only in the context of a <Router> component."):T(!1));let{basename:o,navigator:a}=y.useContext(xe),{hash:s,pathname:i,search:l}=jt(e,{relative:r}),c=i;return o!=="/"&&(c=i==="/"?o:je([o,i])),a.createHref({pathname:c,search:l,hash:s})}function bt(){return y.useContext(Kt)!=null}function at(){return bt()||(process.env.NODE_ENV!=="production"?T(!1,"useLocation() may be used only in the context of a <Router> component."):T(!1)),y.useContext(Kt).location}const yr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function br(e){y.useContext(xe).static||y.useLayoutEffect(e)}function jr(){let{isDataRoute:e}=y.useContext(Ne);return e?da():Zo()}function Zo(){bt()||(process.env.NODE_ENV!=="production"?T(!1,"useNavigate() may be used only in the context of a <Router> component."):T(!1));let e=y.useContext(ot),{basename:t,future:r,navigator:o}=y.useContext(xe),{matches:a}=y.useContext(Ne),{pathname:s}=at(),i=JSON.stringify(fn(a,r.v7_relativeSplatPath)),l=y.useRef(!1);return br(()=>{l.current=!0}),y.useCallback(function(p,f){if(f===void 0&&(f={}),process.env.NODE_ENV!=="production"&&oe(l.current,yr),!l.current)return;if(typeof p=="number"){o.go(p);return}let d=pn(p,JSON.parse(i),s,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:je([t,d.pathname])),(f.replace?o.replace:o.push)(d,f.state,f)},[t,o,i,s,e])}function jt(e,t){let{relative:r}=t===void 0?{}:t,{future:o}=y.useContext(xe),{matches:a}=y.useContext(Ne),{pathname:s}=at(),i=JSON.stringify(fn(a,o.v7_relativeSplatPath));return y.useMemo(()=>pn(e,JSON.parse(i),s,r==="path"),[e,i,s,r])}function ea(e,t,r,o){bt()||(process.env.NODE_ENV!=="production"?T(!1,"useRoutes() may be used only in the context of a <Router> component."):T(!1));let{navigator:a}=y.useContext(xe),{matches:s}=y.useContext(Ne),i=s[s.length-1],l=i?i.params:{},c=i?i.pathname:"/",p=i?i.pathnameBase:"/",f=i&&i.route;if(process.env.NODE_ENV!=="production"){let E=f&&f.path||"";Cr(c,!f||E.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+c+'" (under <Route path="'+E+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
23
23
 
24
- `+('Please change the parent <Route path="'+E+'"> to <Route ')+('path="'+(E==="/"?"*":E+"/*")+'">.'))}let h=at(),m;m=h;let v=m.pathname||"/",j=v;if(p!=="/"){let E=p.replace(/^\//,"").split("/");j="/"+v.replace(/^\//,"").split("/").slice(E.length).join("/")}let y=$e(e,{pathname:j});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&oe(f||y!=null,'No routes matched location "'+m.pathname+m.search+m.hash+'" '),process.env.NODE_ENV!=="production"&&oe(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,'Matched leaf route at location "'+m.pathname+m.search+m.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),aa(y&&y.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:je([p,a.encodeLocation?a.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?p:je([p,a.encodeLocation?a.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,r,o)}function ta(){let e=ua(),t=Gt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},i=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:s},"ErrorBoundary")," or"," ",b.createElement("code",{style:s},"errorElement")," prop on your route."))),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:a},r):null,i)}const na=b.createElement(ta,null);class ra extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(Ne.Provider,{value:this.props.routeContext},b.createElement(xn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oa(e){let{routeContext:t,match:r,children:o}=e,a=b.useContext(ot);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(Ne.Provider,{value:t},o)}function aa(e,t,r,o){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),o===void 0&&(o=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=o)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,l=(a=r)==null?void 0:a.errors;if(l!=null){let f=i.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?T(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(l).join(",")):T(!1)),i=i.slice(0,Math.min(i.length,f+1))}let c=!1,p=-1;if(r&&o&&o.v7_partialHydration)for(let f=0;f<i.length;f++){let h=i[f];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(p=f),h.route.id){let{loaderData:m,errors:v}=r,j=h.route.loader&&m[h.route.id]===void 0&&(!v||v[h.route.id]===void 0);if(h.route.lazy||j){c=!0,p>=0?i=i.slice(0,p+1):i=[i[0]];break}}}return i.reduceRight((f,h,m)=>{let v,j=!1,y=null,w=null;r&&(v=l&&h.route.id?l[h.route.id]:void 0,y=h.route.errorElement||na,c&&(p<0&&m===0?(Cr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,w=null):p===m&&(j=!0,w=h.route.hydrateFallbackElement||null)));let E=t.concat(i.slice(0,m+1)),_=()=>{let B;return v?B=y:j?B=w:h.route.Component?B=b.createElement(h.route.Component,null):h.route.element?B=h.route.element:B=f,b.createElement(oa,{match:h,routeContext:{outlet:f,matches:E,isDataRoute:r!=null},children:B})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?b.createElement(ra,{location:r.location,revalidation:r.revalidation,component:y,error:v,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):_()},null)}var wr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wr||{}),yt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(yt||{});function vn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ia(e){let t=b.useContext(ot);return t||(process.env.NODE_ENV!=="production"?T(!1,vn(e)):T(!1)),t}function sa(e){let t=b.useContext(qt);return t||(process.env.NODE_ENV!=="production"?T(!1,vn(e)):T(!1)),t}function la(e){let t=b.useContext(Ne);return t||(process.env.NODE_ENV!=="production"?T(!1,vn(e)):T(!1)),t}function Sn(e){let t=la(e),r=t.matches[t.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?T(!1,e+' can only be used on routes that contain a unique "id"'):T(!1)),r.route.id}function ca(){return Sn(yt.UseRouteId)}function ua(){var e;let t=b.useContext(xn),r=sa(yt.UseRouteError),o=Sn(yt.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[o]}function da(){let{router:e}=ia(wr.UseNavigateStable),t=Sn(yt.UseNavigateStable),r=b.useRef(!1);return br(()=>{r.current=!0}),b.useCallback(function(a,s){s===void 0&&(s={}),process.env.NODE_ENV!=="production"&&oe(r.current,yr),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Vt({fromRouteId:t},s)))},[e,t])}const Qn={};function Cr(e,t,r){!t&&!Qn[e]&&(Qn[e]=!0,process.env.NODE_ENV!=="production"&&oe(!1,r))}function ha(e){let{basename:t="/",children:r=null,location:o,navigationType:a=re.Pop,navigator:s,static:i=!1,future:l}=e;bt()&&(process.env.NODE_ENV!=="production"?T(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):T(!1));let c=t.replace(/^\/*/,"/"),p=b.useMemo(()=>({basename:c,navigator:s,static:i,future:Vt({v7_relativeSplatPath:!1},l)}),[c,l,s,i]);typeof o=="string"&&(o=Ie(o));let{pathname:f="/",search:h="",hash:m="",state:v=null,key:j="default"}=o,y=b.useMemo(()=>{let w=ge(f,c);return w==null?null:{location:{pathname:w,search:h,hash:m,state:v,key:j},navigationType:a}},[c,f,h,m,v,j,a]);return process.env.NODE_ENV!=="production"&&oe(y!=null,'<Router basename="'+c+'"> is not able to match the URL '+('"'+f+h+m+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),y==null?null:b.createElement(xe.Provider,{value:p},b.createElement(Kt.Provider,{children:r,value:y}))}new Promise(()=>{});function fa(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&oe(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&oe(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&oe(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
24
+ `+('Please change the parent <Route path="'+E+'"> to <Route ')+('path="'+(E==="/"?"*":E+"/*")+'">.'))}let d=at(),m;m=d;let v=m.pathname||"/",j=v;if(p!=="/"){let E=p.replace(/^\//,"").split("/");j="/"+v.replace(/^\//,"").split("/").slice(E.length).join("/")}let b=$e(e,{pathname:j});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&oe(f||b!=null,'No routes matched location "'+m.pathname+m.search+m.hash+'" '),process.env.NODE_ENV!=="production"&&oe(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,'Matched leaf route at location "'+m.pathname+m.search+m.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),aa(b&&b.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:je([p,a.encodeLocation?a.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?p:je([p,a.encodeLocation?a.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,r,o)}function ta(){let e=ua(),t=Gt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:o},s={padding:"2px 4px",backgroundColor:o},i=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:s},"ErrorBoundary")," or"," ",y.createElement("code",{style:s},"errorElement")," prop on your route."))),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:a},r):null,i)}const na=y.createElement(ta,null);class ra extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(Ne.Provider,{value:this.props.routeContext},y.createElement(xn.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function oa(e){let{routeContext:t,match:r,children:o}=e,a=y.useContext(ot);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(Ne.Provider,{value:t},o)}function aa(e,t,r,o){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),o===void 0&&(o=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=o)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,l=(a=r)==null?void 0:a.errors;if(l!=null){let f=i.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);f>=0||(process.env.NODE_ENV!=="production"?T(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(l).join(",")):T(!1)),i=i.slice(0,Math.min(i.length,f+1))}let c=!1,p=-1;if(r&&o&&o.v7_partialHydration)for(let f=0;f<i.length;f++){let d=i[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(p=f),d.route.id){let{loaderData:m,errors:v}=r,j=d.route.loader&&m[d.route.id]===void 0&&(!v||v[d.route.id]===void 0);if(d.route.lazy||j){c=!0,p>=0?i=i.slice(0,p+1):i=[i[0]];break}}}return i.reduceRight((f,d,m)=>{let v,j=!1,b=null,w=null;r&&(v=l&&d.route.id?l[d.route.id]:void 0,b=d.route.errorElement||na,c&&(p<0&&m===0?(Cr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,w=null):p===m&&(j=!0,w=d.route.hydrateFallbackElement||null)));let E=t.concat(i.slice(0,m+1)),_=()=>{let B;return v?B=b:j?B=w:d.route.Component?B=y.createElement(d.route.Component,null):d.route.element?B=d.route.element:B=f,y.createElement(oa,{match:d,routeContext:{outlet:f,matches:E,isDataRoute:r!=null},children:B})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?y.createElement(ra,{location:r.location,revalidation:r.revalidation,component:b,error:v,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0}}):_()},null)}var wr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wr||{}),yt=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(yt||{});function vn(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ia(e){let t=y.useContext(ot);return t||(process.env.NODE_ENV!=="production"?T(!1,vn(e)):T(!1)),t}function sa(e){let t=y.useContext(qt);return t||(process.env.NODE_ENV!=="production"?T(!1,vn(e)):T(!1)),t}function la(e){let t=y.useContext(Ne);return t||(process.env.NODE_ENV!=="production"?T(!1,vn(e)):T(!1)),t}function Sn(e){let t=la(e),r=t.matches[t.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?T(!1,e+' can only be used on routes that contain a unique "id"'):T(!1)),r.route.id}function ca(){return Sn(yt.UseRouteId)}function ua(){var e;let t=y.useContext(xn),r=sa(yt.UseRouteError),o=Sn(yt.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[o]}function da(){let{router:e}=ia(wr.UseNavigateStable),t=Sn(yt.UseNavigateStable),r=y.useRef(!1);return br(()=>{r.current=!0}),y.useCallback(function(a,s){s===void 0&&(s={}),process.env.NODE_ENV!=="production"&&oe(r.current,yr),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Vt({fromRouteId:t},s)))},[e,t])}const Qn={};function Cr(e,t,r){!t&&!Qn[e]&&(Qn[e]=!0,process.env.NODE_ENV!=="production"&&oe(!1,r))}function ha(e){let{basename:t="/",children:r=null,location:o,navigationType:a=re.Pop,navigator:s,static:i=!1,future:l}=e;bt()&&(process.env.NODE_ENV!=="production"?T(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):T(!1));let c=t.replace(/^\/*/,"/"),p=y.useMemo(()=>({basename:c,navigator:s,static:i,future:Vt({v7_relativeSplatPath:!1},l)}),[c,l,s,i]);typeof o=="string"&&(o=Ie(o));let{pathname:f="/",search:d="",hash:m="",state:v=null,key:j="default"}=o,b=y.useMemo(()=>{let w=ge(f,c);return w==null?null:{location:{pathname:w,search:d,hash:m,state:v,key:j},navigationType:a}},[c,f,d,m,v,j,a]);return process.env.NODE_ENV!=="production"&&oe(b!=null,'<Router basename="'+c+'"> is not able to match the URL '+('"'+f+d+m+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),b==null?null:y.createElement(xe.Provider,{value:p},y.createElement(Kt.Provider,{children:r,value:b}))}new Promise(()=>{});function fa(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&oe(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:y.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&oe(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&oe(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}/**
25
25
  * React Router DOM v6.26.1
26
26
  *
27
27
  * Copyright (c) Remix Software Inc.
@@ -30,7 +30,7 @@
30
30
  * LICENSE.md file in the root directory of this source tree.
31
31
  *
32
32
  * @license MIT
33
- */function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Me.apply(this,arguments)}function yn(e,t){if(e==null)return{};var r={},o=Object.keys(e),a,s;for(s=0;s<o.length;s++)a=o[s],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const Ut="get",Ht="application/x-www-form-urlencoded";function Yt(e){return e!=null&&typeof e.tagName=="string"}function pa(e){return Yt(e)&&e.tagName.toLowerCase()==="button"}function ma(e){return Yt(e)&&e.tagName.toLowerCase()==="form"}function ga(e){return Yt(e)&&e.tagName.toLowerCase()==="input"}function xa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function va(e,t){return e.button===0&&(!t||t==="_self")&&!xa(e)}let Tt=null;function Sa(){if(Tt===null)try{new FormData(document.createElement("form"),0),Tt=!1}catch{Tt=!0}return Tt}const ya=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rn(e){return e!=null&&!ya.has(e)?(process.env.NODE_ENV!=="production"&&oe(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+Ht+'"')),null):e}function ba(e,t){let r,o,a,s,i;if(ma(e)){let l=e.getAttribute("action");o=l?ge(l,t):null,r=e.getAttribute("method")||Ut,a=rn(e.getAttribute("enctype"))||Ht,s=new FormData(e)}else if(pa(e)||ga(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(o=c?ge(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Ut,a=rn(e.getAttribute("formenctype"))||rn(l.getAttribute("enctype"))||Ht,s=new FormData(l,e),!Sa()){let{name:p,type:f,value:h}=e;if(f==="image"){let m=p?p+".":"";s.append(m+"x","0"),s.append(m+"y","0")}else p&&s.append(p,h)}}else{if(Yt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ut,o=null,a=Ht,i=e}return s&&a==="text/plain"&&(i=s,s=void 0),{action:o,method:r.toLowerCase(),encType:a,formData:s,body:i}}const ja=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wa=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Ca=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Ea="6";try{window.__reactRouterVersion=Ea}catch{}function Ra(e,t){return No({basename:void 0,future:Me({},void 0,{v7_prependBasename:!0}),history:eo({window:void 0}),hydrationData:_a(),routes:e,mapRouteProperties:fa,unstable_dataStrategy:void 0,unstable_patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function _a(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Me({},t,{errors:ka(t.errors)})),t}function ka(e){if(!e)return null;let t=Object.entries(e),r={};for(let[o,a]of t)if(a&&a.__type==="RouteErrorResponse")r[o]=new zt(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let s=window[a.__subType];if(typeof s=="function")try{let i=new s(a.message);i.stack="",r[o]=i}catch{}}if(r[o]==null){let s=new Error(a.message);s.stack="",r[o]=s}}else r[o]=a;return r}const bn=b.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(bn.displayName="ViewTransition");const Er=b.createContext(new Map);process.env.NODE_ENV!=="production"&&(Er.displayName="Fetchers");const Pa="startTransition",Zn=b[Pa],La="flushSync",er=Zr[La];function Na(e){Zn?Zn(e):e()}function ft(e){er?er(e):e()}class Da{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",t(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",r(o))}})}}function Ta(e){let{fallbackElement:t,router:r,future:o}=e,[a,s]=b.useState(r.state),[i,l]=b.useState(),[c,p]=b.useState({isTransitioning:!1}),[f,h]=b.useState(),[m,v]=b.useState(),[j,y]=b.useState(),w=b.useRef(new Map),{v7_startTransition:E}=o||{},_=b.useCallback(g=>{E?Na(g):g()},[E]),B=b.useCallback((g,C)=>{let{deletedFetchers:N,unstable_flushSync:D,unstable_viewTransitionOpts:M}=C;N.forEach(W=>w.current.delete(W)),g.fetchers.forEach((W,le)=>{W.data!==void 0&&w.current.set(le,W.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!M||F){D?ft(()=>s(g)):_(()=>s(g));return}if(D){ft(()=>{m&&(f&&f.resolve(),m.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let W=r.window.document.startViewTransition(()=>{ft(()=>s(g))});W.finished.finally(()=>{ft(()=>{h(void 0),v(void 0),l(void 0),p({isTransitioning:!1})})}),ft(()=>v(W));return}m?(f&&f.resolve(),m.skipTransition(),y({state:g,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(l(g),p({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[r.window,m,f,w,_]);b.useLayoutEffect(()=>r.subscribe(B),[r,B]),b.useEffect(()=>{c.isTransitioning&&!c.flushSync&&h(new Da)},[c]),b.useEffect(()=>{if(f&&i&&r.window){let g=i,C=f.promise,N=r.window.document.startViewTransition(async()=>{_(()=>s(g)),await C});N.finished.finally(()=>{h(void 0),v(void 0),l(void 0),p({isTransitioning:!1})}),v(N)}},[_,i,f,r.window]),b.useEffect(()=>{f&&i&&a.location.key===i.location.key&&f.resolve()},[f,m,a.location,i]),b.useEffect(()=>{!c.isTransitioning&&j&&(l(j.state),p({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}),y(void 0))},[c.isTransitioning,j]),b.useEffect(()=>{process.env.NODE_ENV!=="production"&&oe(t==null||!r.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let P=b.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:g=>r.navigate(g),push:(g,C,N)=>r.navigate(g,{state:C,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(g,C,N)=>r.navigate(g,{replace:!0,state:C,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[r]),V=r.basename||"/",$=b.useMemo(()=>({router:r,navigator:P,static:!1,basename:V}),[r,P,V]),G=b.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return b.createElement(b.Fragment,null,b.createElement(ot.Provider,{value:$},b.createElement(qt.Provider,{value:a},b.createElement(Er.Provider,{value:w.current},b.createElement(bn.Provider,{value:c},b.createElement(ha,{basename:V,location:a.location,navigationType:a.historyAction,navigator:P,future:G},a.initialized||r.future.v7_partialHydration?b.createElement(Ba,{routes:r.routes,future:r.future,state:a}):t))))),null)}const Ba=b.memo(Aa);function Aa(e){let{routes:t,future:r,state:o}=e;return ea(t,void 0,o,r)}process.env.NODE_ENV;const Fa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ma=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rr=b.forwardRef(function(t,r){let{onClick:o,relative:a,reloadDocument:s,replace:i,state:l,target:c,to:p,preventScrollReset:f,unstable_viewTransition:h}=t,m=yn(t,ja),{basename:v}=b.useContext(xe),j,y=!1;if(typeof p=="string"&&Ma.test(p)&&(j=p,Fa))try{let B=new URL(window.location.href),P=p.startsWith("//")?new URL(B.protocol+p):new URL(p),V=ge(P.pathname,v);P.origin===B.origin&&V!=null?p=V+P.search+P.hash:y=!0}catch{process.env.NODE_ENV!=="production"&&oe(!1,'<Link to="'+p+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let w=Qo(p,{relative:a}),E=Ha(p,{replace:i,state:l,target:c,preventScrollReset:f,relative:a,unstable_viewTransition:h});function _(B){o&&o(B),B.defaultPrevented||E(B)}return b.createElement("a",Me({},m,{href:j||w,onClick:y||s?o:_,ref:r,target:c}))});process.env.NODE_ENV!=="production"&&(Rr.displayName="Link");const Ia=b.forwardRef(function(t,r){let{"aria-current":o="page",caseSensitive:a=!1,className:s="",end:i=!1,style:l,to:c,unstable_viewTransition:p,children:f}=t,h=yn(t,wa),m=jt(c,{relative:h.relative}),v=at(),j=b.useContext(qt),{navigator:y,basename:w}=b.useContext(xe),E=j!=null&&qa(m)&&p===!0,_=y.encodeLocation?y.encodeLocation(m).pathname:m.pathname,B=v.pathname,P=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;a||(B=B.toLowerCase(),P=P?P.toLowerCase():null,_=_.toLowerCase()),P&&w&&(P=ge(P,w)||P);const V=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let $=B===_||!i&&B.startsWith(_)&&B.charAt(V)==="/",G=P!=null&&(P===_||!i&&P.startsWith(_)&&P.charAt(_.length)==="/"),g={isActive:$,isPending:G,isTransitioning:E},C=$?o:void 0,N;typeof s=="function"?N=s(g):N=[s,$?"active":null,G?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let D=typeof l=="function"?l(g):l;return b.createElement(Rr,Me({},h,{"aria-current":C,className:N,ref:r,style:D,to:c,unstable_viewTransition:p}),typeof f=="function"?f(g):f)});process.env.NODE_ENV!=="production"&&(Ia.displayName="NavLink");const Oa=b.forwardRef((e,t)=>{let{fetcherKey:r,navigate:o,reloadDocument:a,replace:s,state:i,method:l=Ut,action:c,onSubmit:p,relative:f,preventScrollReset:h,unstable_viewTransition:m}=e,v=yn(e,Ca),j=Wa(),y=Ga(c,{relative:f}),w=l.toLowerCase()==="get"?"get":"post",E=_=>{if(p&&p(_),_.defaultPrevented)return;_.preventDefault();let B=_.nativeEvent.submitter,P=(B==null?void 0:B.getAttribute("formmethod"))||l;j(B||_.currentTarget,{fetcherKey:r,method:P,navigate:o,replace:s,state:i,relative:f,preventScrollReset:h,unstable_viewTransition:m})};return b.createElement("form",Me({ref:t,method:w,action:y,onSubmit:a?p:E},v))});process.env.NODE_ENV!=="production"&&(Oa.displayName="Form");process.env.NODE_ENV;var Wt;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wt||(Wt={}));var tr;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(tr||(tr={}));function Ua(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function _r(e){let t=b.useContext(ot);return t||(process.env.NODE_ENV!=="production"?T(!1,Ua(e)):T(!1)),t}function Ha(e,t){let{target:r,replace:o,state:a,preventScrollReset:s,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,c=jr(),p=at(),f=jt(e,{relative:i});return b.useCallback(h=>{if(va(h,r)){h.preventDefault();let m=o!==void 0?o:Fe(p)===Fe(f);c(e,{replace:m,state:a,preventScrollReset:s,relative:i,unstable_viewTransition:l})}},[p,c,f,o,a,r,e,s,i,l])}function $a(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let za=0,Va=()=>"__"+String(++za)+"__";function Wa(){let{router:e}=_r(Wt.UseSubmit),{basename:t}=b.useContext(xe),r=ca();return b.useCallback(function(o,a){a===void 0&&(a={}),$a();let{action:s,method:i,encType:l,formData:c,body:p}=ba(o,t);if(a.navigate===!1){let f=a.fetcherKey||Va();e.fetch(f,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:c,body:p,formMethod:a.method||i,formEncType:a.encType||l,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:c,body:p,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function Ga(e,t){let{relative:r}=t===void 0?{}:t,{basename:o}=b.useContext(xe),a=b.useContext(Ne);a||(process.env.NODE_ENV!=="production"?T(!1,"useFormAction must be used inside a RouteContext"):T(!1));let[s]=a.matches.slice(-1),i=Me({},jt(e||".",{relative:r})),l=at();if(e==null){i.search=l.search;let c=new URLSearchParams(i.search);c.has("index")&&c.get("index")===""&&(c.delete("index"),i.search=c.toString()?"?"+c.toString():"")}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(i.pathname=i.pathname==="/"?o:je([o,i.pathname])),Fe(i)}function qa(e,t){t===void 0&&(t={});let r=b.useContext(bn);r==null&&(process.env.NODE_ENV!=="production"?T(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):T(!1));let{basename:o}=_r(Wt.useViewTransitionState),a=jt(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=ge(r.currentLocation.pathname,o)||r.currentLocation.pathname,i=ge(r.nextLocation.pathname,o)||r.nextLocation.pathname;return $t(a.pathname,i)!=null||$t(a.pathname,s)!=null}const me=e=>e?e.replace(/_/g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" and "):"",Ka=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],Ya=[{icon:"PaintBrushBroad",name:"Colors"},{icon:"TextAa",name:"Fonts"},{icon:"CornersOut",name:"Borders"},{icon:"ArrowSquareIn",name:"Buttons"},{icon:"Textbox",name:"Inputs"}],xt=["home","reviews","faqs","contact","product","ticket","login"],on={home:{path:"/",name:"home",icon:"HouseSimple",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"SquaresFour",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"SealQuestion",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"Star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"ChatCentered",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"Ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"UserCircleGear",seo:{description:"",title:""},visibility:"public"}},Xa=["Acorn","Activity","AddressBook","AddressBookTabs","AirTrafficControl","Airplane","AirplaneInFlight","AirplaneLanding","AirplaneTakeoff","AirplaneTaxiing","AirplaneTilt","Airplay","Alarm","Alien","AlignBottom","AlignBottomSimple","AlignCenterHorizontal","AlignCenterHorizontalSimple","AlignCenterVertical","AlignCenterVerticalSimple","AlignLeft","AlignLeftSimple","AlignRight","AlignRightSimple","AlignTop","AlignTopSimple","AmazonLogo","Ambulance","Anchor","AnchorSimple","AndroidLogo","Angle","AngularLogo","Aperture","AppStoreLogo","AppWindow","AppleLogo","ApplePodcastsLogo","ApproximateEquals","Archive","ArchiveBox","ArchiveTray","Armchair","ArrowArcLeft","ArrowArcRight","ArrowBendDoubleUpLeft","ArrowBendDoubleUpRight","ArrowBendDownLeft","ArrowBendDownRight","ArrowBendLeftDown","ArrowBendLeftUp","ArrowBendRightDown","ArrowBendRightUp","ArrowBendUpLeft","ArrowBendUpRight","ArrowCircleDown","ArrowCircleDownLeft","ArrowCircleDownRight","ArrowCircleLeft","ArrowCircleRight","ArrowCircleUp","ArrowCircleUpLeft","ArrowCircleUpRight","ArrowClockwise","ArrowCounterClockwise","ArrowDown","ArrowDownLeft","ArrowDownRight","ArrowElbowDownLeft","ArrowElbowDownRight","ArrowElbowLeft","ArrowElbowLeftDown","ArrowElbowLeftUp","ArrowElbowRight","ArrowElbowRightDown","ArrowElbowRightUp","ArrowElbowUpLeft","ArrowElbowUpRight","ArrowFatDown","ArrowFatLeft","ArrowFatLineDown","ArrowFatLineLeft","ArrowFatLineRight","ArrowFatLineUp","ArrowFatLinesDown","ArrowFatLinesLeft","ArrowFatLinesRight","ArrowFatLinesUp","ArrowFatRight","ArrowFatUp","ArrowLeft","ArrowLineDown","ArrowLineDownLeft","ArrowLineDownRight","ArrowLineLeft","ArrowLineRight","ArrowLineUp","ArrowLineUpLeft","ArrowLineUpRight","ArrowRight","ArrowSquareDown","ArrowSquareDownLeft","ArrowSquareDownRight","ArrowSquareIn","ArrowSquareLeft","ArrowSquareOut","ArrowSquareRight","ArrowSquareUp","ArrowSquareUpLeft","ArrowSquareUpRight","ArrowUDownLeft","ArrowUDownRight","ArrowULeftDown","ArrowULeftUp","ArrowURightDown","ArrowURightUp","ArrowUUpLeft","ArrowUUpRight","ArrowUp","ArrowUpLeft","ArrowUpRight","ArrowsClockwise","ArrowsCounterClockwise","ArrowsDownUp","ArrowsHorizontal","ArrowsIn","ArrowsInCardinal","ArrowsInLineHorizontal","ArrowsInLineVertical","ArrowsInSimple","ArrowsLeftRight","ArrowsMerge","ArrowsOut","ArrowsOutCardinal","ArrowsOutLineHorizontal","ArrowsOutLineVertical","ArrowsOutSimple","ArrowsSplit","ArrowsVertical","Article","ArticleMedium","ArticleNyTimes","Asclepius","Asterisk","AsteriskSimple","At","Atom","Avocado","Axe","Baby","BabyCarriage","Backpack","Backspace","Bag","BagSimple","Balloon","Bandaids","Bank","Barbell","Barcode","Barn","Barricade","Baseball","BaseballCap","BaseballHelmet","Basket","Basketball","Bathtub","BatteryCharging","BatteryChargingVertical","BatteryEmpty","BatteryFull","BatteryHigh","BatteryLow","BatteryMedium","BatteryPlus","BatteryPlusVertical","BatteryVerticalEmpty","BatteryVerticalFull","BatteryVerticalHigh","BatteryVerticalLow","BatteryVerticalMedium","BatteryWarning","BatteryWarningVertical","BeachBall","Beanie","Bed","BeerBottle","BeerStein","BehanceLogo","Bell","BellRinging","BellSimple","BellSimpleRinging","BellSimpleSlash","BellSimpleZ","BellSlash","BellZ","Belt","BezierCurve","Bicycle","Binary","Binoculars","Biohazard","Bird","Blueprint","Bluetooth","BluetoothConnected","BluetoothSlash","BluetoothX","Boat","Bomb","Bone","Book","BookBookmark","BookOpen","BookOpenText","BookOpenUser","Bookmark","BookmarkSimple","Bookmarks","BookmarksSimple","Books","Boot","Boules","BoundingBox","BowlFood","BowlSteam","BowlingBall","BoxArrowDown","BoxArrowUp","BoxingGlove","BracketsAngle","BracketsCurly","BracketsRound","BracketsSquare","Brain","Brandy","Bread","Bridge","Briefcase","BriefcaseMetal","Broadcast","Broom","Browser","Browsers","Bug","BugBeetle","BugDroid","Building","BuildingApartment","BuildingOffice","Buildings","Bulldozer","Bus","Butterfly","CableCar","Cactus","Caduceus","Cake","Calculator","Calendar","CalendarBlank","CalendarCheck","CalendarDot","CalendarDots","CalendarHeart","CalendarMinus","CalendarPlus","CalendarSlash","CalendarStar","CalendarX","CallBell","Camera","CameraPlus","CameraRotate","CameraSlash","Campfire","Car","CarBattery","CarProfile","CarSimple","Cardholder","Cards","CardsThree","CaretCircleDoubleDown","CaretCircleDoubleLeft","CaretCircleDoubleRight","CaretCircleDoubleUp","CaretCircleDown","CaretCircleLeft","CaretCircleRight","CaretCircleUp","CaretCircleUpDown","CaretDoubleDown","CaretDoubleLeft","CaretDoubleRight","CaretDoubleUp","CaretDown","CaretLeft","CaretLineDown","CaretLineLeft","CaretLineRight","CaretLineUp","CaretRight","CaretUp","CaretUpDown","Carrot","CashRegister","CassetteTape","CastleTurret","Cat","CellSignalFull","CellSignalHigh","CellSignalLow","CellSignalMedium","CellSignalNone","CellSignalSlash","CellSignalX","CellTower","Certificate","Chair","Chalkboard","ChalkboardSimple","ChalkboardTeacher","Champagne","ChargingStation","ChartBar","ChartBarHorizontal","ChartDonut","ChartLine","ChartLineDown","ChartLineUp","ChartPie","ChartPieSlice","ChartPolar","ChartScatter","Chat","ChatCentered","ChatCenteredDots","ChatCenteredSlash","ChatCenteredText","ChatCircle","ChatCircleDots","ChatCircleSlash","ChatCircleText","ChatDots","ChatSlash","ChatTeardrop","ChatTeardropDots","ChatTeardropSlash","ChatTeardropText","ChatText","Chats","ChatsCircle","ChatsTeardrop","Check","CheckCircle","CheckFat","CheckSquare","CheckSquareOffset","Checkerboard","Checks","Cheers","Cheese","ChefHat","Cherries","Church","Cigarette","CigaretteSlash","Circle","CircleDashed","CircleHalf","CircleHalfTilt","CircleNotch","CircleWavy","CircleWavyCheck","CircleWavyQuestion","CircleWavyWarning","CirclesFour","CirclesThree","CirclesThreePlus","Circuitry","City","Clipboard","ClipboardText","Clock","ClockAfternoon","ClockClockwise","ClockCountdown","ClockCounterClockwise","ClockUser","ClosedCaptioning","Cloud","CloudArrowDown","CloudArrowUp","CloudCheck","CloudFog","CloudLightning","CloudMoon","CloudRain","CloudSlash","CloudSnow","CloudSun","CloudWarning","CloudX","Clover","Club","CoatHanger","CodaLogo","Code","CodeBlock","CodeSimple","CodepenLogo","CodesandboxLogo","Coffee","CoffeeBean","Coin","CoinVertical","Coins","Columns","ColumnsPlusLeft","ColumnsPlusRight","Command","Compass","CompassRose","CompassTool","ComputerTower","Confetti","ContactlessPayment","Control","Cookie","CookingPot","Copy","CopySimple","Copyleft","Copyright","CornersIn","CornersOut","Couch","CourtBasketball","Cow","CowboyHat","Cpu","Crane","CraneTower","CreditCard","Cricket","Crop","Cross","Crosshair","CrosshairSimple","Crown","CrownCross","CrownSimple","Cube","CubeFocus","CubeTransparent","CurrencyBtc","CurrencyCircleDollar","CurrencyCny","CurrencyDollar","CurrencyDollarSimple","CurrencyEth","CurrencyEur","CurrencyGbp","CurrencyInr","CurrencyJpy","CurrencyKrw","CurrencyKzt","CurrencyNgn","CurrencyRub","Cursor","CursorClick","CursorText","Cylinder","Database","Desk","Desktop","DesktopTower","Detective","DevToLogo","DeviceMobile","DeviceMobileCamera","DeviceMobileSlash","DeviceMobileSpeaker","DeviceRotate","DeviceTablet","DeviceTabletCamera","DeviceTabletSpeaker","Devices","Diamond","DiamondsFour","DiceFive","DiceFour","DiceOne","DiceSix","DiceThree","DiceTwo","Disc","DiscoBall","DiscordLogo","Divide","Dna","Dog","Door","DoorOpen","Dot","DotOutline","DotsNine","DotsSix","DotsSixVertical","DotsThree","DotsThreeCircle","DotsThreeCircleVertical","DotsThreeOutline","DotsThreeOutlineVertical","DotsThreeVertical","Download","DownloadSimple","Dress","Dresser","DribbbleLogo","Drone","Drop","DropHalf","DropHalfBottom","DropSimple","DropSlash","DropboxLogo","Ear","EarSlash","Egg","EggCrack","Eject","EjectSimple","Elevator","Empty","Engine","Envelope","EnvelopeOpen","EnvelopeSimple","EnvelopeSimpleOpen","Equalizer","Equals","Eraser","EscalatorDown","EscalatorUp","Exam","ExclamationMark","Exclude","ExcludeSquare","Export","Eye","EyeClosed","EyeSlash","Eyedropper","EyedropperSample","Eyeglasses","Eyes","FaceMask","FacebookLogo","Factory","Faders","FadersHorizontal","FalloutShelter","Fan","Farm","FastForward","FastForwardCircle","Feather","FediverseLogo","FigmaLogo","File","FileArchive","FileArrowDown","FileArrowUp","FileAudio","FileC","FileCSharp","FileCloud","FileCode","FileCpp","FileCss","FileCsv","FileDashed","FileDoc","FileDotted","FileHtml","FileImage","FileIni","FileJpg","FileJs","FileJsx","FileLock","FileMagnifyingGlass","FileMd","FileMinus","FilePdf","FilePlus","FilePng","FilePpt","FilePy","FileRs","FileSearch","FileSql","FileSvg","FileText","FileTs","FileTsx","FileTxt","FileVideo","FileVue","FileX","FileXls","FileZip","Files","FilmReel","FilmScript","FilmSlate","FilmStrip","Fingerprint","FingerprintSimple","FinnTheHuman","Fire","FireExtinguisher","FireSimple","FireTruck","FirstAid","FirstAidKit","Fish","FishSimple","Flag","FlagBanner","FlagBannerFold","FlagCheckered","FlagPennant","Flame","Flashlight","Flask","FlipHorizontal","FlipVertical","FloppyDisk","FloppyDiskBack","FlowArrow","Flower","FlowerLotus","FlowerTulip","FlyingSaucer","Folder","FolderDashed","FolderDotted","FolderLock","FolderMinus","FolderNotch","FolderNotchMinus","FolderNotchOpen","FolderNotchPlus","FolderOpen","FolderPlus","FolderSimple","FolderSimpleDashed","FolderSimpleDotted","FolderSimpleLock","FolderSimpleMinus","FolderSimplePlus","FolderSimpleStar","FolderSimpleUser","FolderStar","FolderUser","Folders","Football","FootballHelmet","Footprints","ForkKnife","FourK","FrameCorners","FramerLogo","Function","Funnel","FunnelSimple","FunnelSimpleX","FunnelX","GameController","Garage","GasCan","GasPump","Gauge","Gavel","Gear","GearFine","GearSix","GenderFemale","GenderIntersex","GenderMale","GenderNeuter","GenderNonbinary","GenderTransgender","Ghost","Gif","Gift","GitBranch","GitCommit","GitDiff","GitFork","GitMerge","GitPullRequest","GithubLogo","GitlabLogo","GitlabLogoSimple","Globe","GlobeHemisphereEast","GlobeHemisphereWest","GlobeSimple","GlobeSimpleX","GlobeStand","GlobeX","Goggles","Golf","GoodreadsLogo","GoogleCardboardLogo","GoogleChromeLogo","GoogleDriveLogo","GoogleLogo","GooglePhotosLogo","GooglePlayLogo","GooglePodcastsLogo","Gps","GpsFix","GpsSlash","Gradient","GraduationCap","Grains","GrainsSlash","Graph","GraphicsCard","GreaterThan","GreaterThanOrEqual","GridFour","GridNine","Guitar","HairDryer","Hamburger","Hammer","Hand","HandArrowDown","HandArrowUp","HandCoins","HandDeposit","HandEye","HandFist","HandGrabbing","HandHeart","HandPalm","HandPeace","HandPointing","HandSoap","HandSwipeLeft","HandSwipeRight","HandTap","HandWaving","HandWithdraw","Handbag","HandbagSimple","HandsClapping","HandsPraying","Handshake","HardDrive","HardDrives","HardHat","Hash","HashStraight","HeadCircuit","Headlights","Headphones","Headset","Heart","HeartBreak","HeartHalf","HeartStraight","HeartStraightBreak","Heartbeat","Hexagon","HighDefinition","HighHeel","Highlighter","HighlighterCircle","Hockey","Hoodie","Horse","Hospital","Hourglass","HourglassHigh","HourglassLow","HourglassMedium","HourglassSimple","HourglassSimpleHigh","HourglassSimpleLow","HourglassSimpleMedium","House","HouseLine","HouseSimple","Hurricane","IceCream","IconBase","IconContext","IdentificationBadge","IdentificationCard","Image","ImageBroken","ImageSquare","Images","ImagesSquare","Infinity","Info","InstagramLogo","Intersect","IntersectSquare","IntersectThree","Intersection","Invoice","Island","Jar","JarLabel","Jeep","Joystick","Kanban","Key","KeyReturn","Keyboard","Keyhole","Knife","Ladder","LadderSimple","Lamp","LampPendant","Laptop","Lasso","LastfmLogo","Layout","Leaf","Lectern","Lego","LegoSmiley","Lemniscate","LessThan","LessThanOrEqual","LetterCircleH","LetterCircleP","LetterCircleV","Lifebuoy","Lightbulb","LightbulbFilament","Lighthouse","Lightning","LightningA","LightningSlash","LineSegment","LineSegments","LineVertical","Link","LinkBreak","LinkSimple","LinkSimpleBreak","LinkSimpleHorizontal","LinkSimpleHorizontalBreak","LinkedinLogo","LinktreeLogo","LinuxLogo","List","ListBullets","ListChecks","ListDashes","ListHeart","ListMagnifyingGlass","ListNumbers","ListPlus","ListStar","Lock","LockKey","LockKeyOpen","LockLaminated","LockLaminatedOpen","LockOpen","LockSimple","LockSimpleOpen","Lockers","Log","MagicWand","Magnet","MagnetStraight","MagnifyingGlass","MagnifyingGlassMinus","MagnifyingGlassPlus","Mailbox","MapPin","MapPinArea","MapPinLine","MapPinPlus","MapPinSimple","MapPinSimpleArea","MapPinSimpleLine","MapTrifold","MarkdownLogo","MarkerCircle","Martini","MaskHappy","MaskSad","MastodonLogo","MathOperations","MatrixLogo","Medal","MedalMilitary","MediumLogo","Megaphone","MegaphoneSimple","MemberOf","Memory","MessengerLogo","MetaLogo","Meteor","Metronome","Microphone","MicrophoneSlash","MicrophoneStage","Microscope","MicrosoftExcelLogo","MicrosoftOutlookLogo","MicrosoftPowerpointLogo","MicrosoftTeamsLogo","MicrosoftWordLogo","Minus","MinusCircle","MinusSquare","Money","MoneyWavy","Monitor","MonitorArrowUp","MonitorPlay","Moon","MoonStars","Moped","MopedFront","Mosque","Motorcycle","Mountains","Mouse","MouseLeftClick","MouseMiddleClick","MouseRightClick","MouseScroll","MouseSimple","MusicNote","MusicNoteSimple","MusicNotes","MusicNotesMinus","MusicNotesPlus","MusicNotesSimple","NavigationArrow","Needle","Network","NetworkSlash","NetworkX","Newspaper","NewspaperClipping","NotEquals","NotMemberOf","NotSubsetOf","NotSupersetOf","Notches","Note","NoteBlank","NotePencil","Notebook","Notepad","Notification","NotionLogo","NuclearPlant","NumberCircleEight","NumberCircleFive","NumberCircleFour","NumberCircleNine","NumberCircleOne","NumberCircleSeven","NumberCircleSix","NumberCircleThree","NumberCircleTwo","NumberCircleZero","NumberEight","NumberFive","NumberFour","NumberNine","NumberOne","NumberSeven","NumberSix","NumberSquareEight","NumberSquareFive","NumberSquareFour","NumberSquareNine","NumberSquareOne","NumberSquareSeven","NumberSquareSix","NumberSquareThree","NumberSquareTwo","NumberSquareZero","NumberThree","NumberTwo","NumberZero","Numpad","Nut","NyTimesLogo","Octagon","OfficeChair","Onigiri","OpenAiLogo","Option","Orange","OrangeSlice","Oven","Package","PaintBrush","PaintBrushBroad","PaintBrushHousehold","PaintBucket","PaintRoller","Palette","Panorama","Pants","PaperPlane","PaperPlaneRight","PaperPlaneTilt","Paperclip","PaperclipHorizontal","Parachute","Paragraph","Parallelogram","Park","Password","Path","PatreonLogo","Pause","PauseCircle","PawPrint","PaypalLogo","Peace","Pen","PenNib","PenNibStraight","Pencil","PencilCircle","PencilLine","PencilRuler","PencilSimple","PencilSimpleLine","PencilSimpleSlash","PencilSlash","Pentagon","Pentagram","Pepper","Percent","Person","PersonArmsSpread","PersonSimple","PersonSimpleBike","PersonSimpleCircle","PersonSimpleHike","PersonSimpleRun","PersonSimpleSki","PersonSimpleSnowboard","PersonSimpleSwim","PersonSimpleTaiChi","PersonSimpleThrow","PersonSimpleWalk","Perspective","Phone","PhoneCall","PhoneDisconnect","PhoneIncoming","PhoneList","PhoneOutgoing","PhonePause","PhonePlus","PhoneSlash","PhoneTransfer","PhoneX","PhosphorLogo","Pi","PianoKeys","PicnicTable","PictureInPicture","PiggyBank","Pill","PingPong","PintGlass","PinterestLogo","Pinwheel","Pipe","PipeWrench","PixLogo","Pizza","Placeholder","Planet","Plant","Play","PlayCircle","PlayPause","Playlist","Plug","PlugCharging","Plugs","PlugsConnected","Plus","PlusCircle","PlusMinus","PlusSquare","PokerChip","PoliceCar","Polygon","Popcorn","Popsicle","PottedPlant","Power","Prescription","Presentation","PresentationChart","Printer","Prohibit","ProhibitInset","ProjectorScreen","ProjectorScreenChart","Pulse","PushPin","PushPinSimple","PushPinSimpleSlash","PushPinSlash","PuzzlePiece","QrCode","Question","QuestionMark","Queue","Quotes","Rabbit","Racquet","Radical","Radio","RadioButton","Radioactive","Rainbow","RainbowCloud","Ranking","ReadCvLogo","Receipt","ReceiptX","Record","Rectangle","RectangleDashed","Recycle","RedditLogo","Repeat","RepeatOnce","ReplitLogo","Resize","Rewind","RewindCircle","RoadHorizon","Robot","Rocket","RocketLaunch","Rows","RowsPlusBottom","RowsPlusTop","Rss","RssSimple","Rug","Ruler","SSR","Sailboat","Scales","Scan","ScanSmiley","Scissors","Scooter","Screencast","Screwdriver","Scribble","ScribbleLoop","Scroll","Seal","SealCheck","SealPercent","SealQuestion","SealWarning","Seat","Seatbelt","SecurityCamera","Selection","SelectionAll","SelectionBackground","SelectionForeground","SelectionInverse","SelectionPlus","SelectionSlash","Shapes","Share","ShareFat","ShareNetwork","Shield","ShieldCheck","ShieldCheckered","ShieldChevron","ShieldPlus","ShieldSlash","ShieldStar","ShieldWarning","ShippingContainer","ShirtFolded","ShootingStar","ShoppingBag","ShoppingBagOpen","ShoppingCart","ShoppingCartSimple","Shovel","Shower","Shrimp","Shuffle","ShuffleAngular","ShuffleSimple","Sidebar","SidebarSimple","Sigma","SignIn","SignOut","Signature","Signpost","SimCard","Siren","SketchLogo","SkipBack","SkipBackCircle","SkipForward","SkipForwardCircle","Skull","SkypeLogo","SlackLogo","Sliders","SlidersHorizontal","Slideshow","Smiley","SmileyAngry","SmileyBlank","SmileyMeh","SmileyMelting","SmileyNervous","SmileySad","SmileySticker","SmileyWink","SmileyXEyes","SnapchatLogo","Sneaker","SneakerMove","Snowflake","SoccerBall","Sock","SolarPanel","SolarRoof","SortAscending","SortDescending","SoundcloudLogo","Spade","Sparkle","SpeakerHifi","SpeakerHigh","SpeakerLow","SpeakerNone","SpeakerSimpleHigh","SpeakerSimpleLow","SpeakerSimpleNone","SpeakerSimpleSlash","SpeakerSimpleX","SpeakerSlash","SpeakerX","Speedometer","Sphere","Spinner","SpinnerBall","SpinnerGap","Spiral","SplitHorizontal","SplitVertical","SpotifyLogo","SprayBottle","Square","SquareHalf","SquareHalfBottom","SquareLogo","SquareSplitHorizontal","SquareSplitVertical","SquaresFour","Stack","StackMinus","StackOverflowLogo","StackPlus","StackSimple","Stairs","Stamp","StandardDefinition","Star","StarAndCrescent","StarFour","StarHalf","StarOfDavid","SteamLogo","SteeringWheel","Steps","Stethoscope","Sticker","Stool","Stop","StopCircle","Storefront","Strategy","StripeLogo","Student","SubsetOf","SubsetProperOf","Subtitles","SubtitlesSlash","Subtract","SubtractSquare","Subway","Suitcase","SuitcaseRolling","SuitcaseSimple","Sun","SunDim","SunHorizon","Sunglasses","SupersetOf","SupersetProperOf","Swap","Swatches","SwimmingPool","Sword","Synagogue","Syringe","TShirt","Table","Tabs","Tag","TagChevron","TagSimple","Target","Taxi","TeaBag","TelegramLogo","Television","TelevisionSimple","TennisBall","Tent","Terminal","TerminalWindow","TestTube","TextAUnderline","TextAa","TextAlignCenter","TextAlignJustify","TextAlignLeft","TextAlignRight","TextB","TextBolder","TextColumns","TextH","TextHFive","TextHFour","TextHOne","TextHSix","TextHThree","TextHTwo","TextIndent","TextItalic","TextOutdent","TextStrikethrough","TextSubscript","TextSuperscript","TextT","TextTSlash","TextUnderline","Textbox","Thermometer","ThermometerCold","ThermometerHot","ThermometerSimple","ThreadsLogo","ThreeD","ThumbsDown","ThumbsUp","Ticket","TidalLogo","TiktokLogo","Tilde","Timer","TipJar","Tipi","Tire","ToggleLeft","ToggleRight","Toilet","ToiletPaper","Toolbox","Tooth","Tornado","Tote","ToteSimple","Towel","Tractor","Trademark","TrademarkRegistered","TrafficCone","TrafficSign","TrafficSignal","Train","TrainRegional","TrainSimple","Tram","Translate","Trash","TrashSimple","Tray","TrayArrowDown","TrayArrowUp","TreasureChest","Tree","TreeEvergreen","TreePalm","TreeStructure","TreeView","TrendDown","TrendUp","Triangle","TriangleDashed","Trolley","TrolleySuitcase","Trophy","Truck","TruckTrailer","TumblrLogo","TwitchLogo","TwitterLogo","Umbrella","UmbrellaSimple","Union","Unite","UniteSquare","Upload","UploadSimple","Usb","User","UserCheck","UserCircle","UserCircleCheck","UserCircleDashed","UserCircleGear","UserCircleMinus","UserCirclePlus","UserFocus","UserGear","UserList","UserMinus","UserPlus","UserRectangle","UserSound","UserSquare","UserSwitch","Users","UsersFour","UsersThree","Van","Vault","VectorThree","VectorTwo","Vibrate","Video","VideoCamera","VideoCameraSlash","VideoConference","Vignette","VinylRecord","VirtualReality","Virus","Visor","Voicemail","Volleyball","Wall","Wallet","Warehouse","Warning","WarningCircle","WarningDiamond","WarningOctagon","WashingMachine","Watch","WaveSawtooth","WaveSine","WaveSquare","WaveTriangle","Waveform","WaveformSlash","Waves","Webcam","WebcamSlash","WebhooksLogo","WechatLogo","WhatsappLogo","Wheelchair","WheelchairMotion","WifiHigh","WifiLow","WifiMedium","WifiNone","WifiSlash","WifiX","Wind","Windmill","WindowsLogo","Wine","Wrench","X","XCircle","XLogo","XSquare","Yarn","YinYang","YoutubeLogo"];function Ja(){const e=localStorage.getItem("accessToken"),t=localStorage.getItem("shopId");return!!(e&&t)}const Qa="_wrapper_dbban_1",Za="_main_dbban_8",ei="_loading_dbban_12",an={wrapper:Qa,main:Za,loading:ei},kr=({render:e,block:t})=>e(t),Pr=()=>{const{footer:e}=n.useLayersStore(),{settings:t}=n.useSettingsStore(),{pageContext:r}=n.usePagesStore();return e==null?void 0:e.renderBlock(t,r)},Lr=()=>{const{header:e}=n.useLayersStore(),{settings:t}=n.useSettingsStore(),{pageContext:r}=n.usePagesStore();return e==null?void 0:e.renderBlock(t,r)},nr=({pagePath:e})=>{const{sourceBlocks:t}=n.useBlocksStore(),{pageContext:r}=n.usePagesStore(),[o,a]=H.useState(!0),[s,i]=H.useState(null),[l,c]=H.useState(),[p,f]=H.useState();H.useEffect(()=>{a(!0),(async()=>{if(e==="productId"){const y=window.location.pathname.slice(1),{layout:w}=await n.getDynamicPage(encodeURIComponent(y));i(w)}else{const{layout:y}=await n.getDynamicPage(encodeURIComponent(e));i(y)}const{settings:v}=await n.getSettings(),{themeSettings:j}=await n.getTheme();c(j),f(v),a(!1)})()},[]);const h=m=>{const v=new t[m.name];return Object.assign(v,m.value),v.renderBlock(p,r)};return n.jsxRuntimeExports.jsxs("div",{className:an.wrapper,children:[e!=="productId"&&n.jsxRuntimeExports.jsx(Lr,{}),!o&&s?n.jsxRuntimeExports.jsx("div",{className:an.main,children:Object.keys(s).map(m=>n.jsxRuntimeExports.jsx(kr,{block:s[m],render:h}))}):n.jsxRuntimeExports.jsx("div",{className:an.loading,children:n.jsxRuntimeExports.jsx(n.Loader,{})}),e!=="productId"&&n.jsxRuntimeExports.jsx(Pr,{})]})};function ti(){const{pages:e}=n.usePagesStore.getState();if(e){const t=Object.values(e).map(r=>({path:`${r.path}`,element:n.jsxRuntimeExports.jsx(nr,{pagePath:r.path})}));return t.push({path:"/product/:productPath",element:n.jsxRuntimeExports.jsx(nr,{pagePath:"productId"})}),t}else return[]}const ni="_buttons_1gn8m_1",ri="_button_1gn8m_1",oi={buttons:ni,button:ri},ai=()=>n.jsxRuntimeExports.jsxs("div",{className:oi.buttons,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUUpLeft",hoverable:!0,width:20,height:20}),n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUUpRight",hoverable:!0,width:20,height:20})]}),ii="_devices_hxl12_1",si="_device_hxl12_1",li="_active_hxl12_23",sn={devices:ii,device:si,active:li},ci=()=>{const{currentDevice:e,setCurrentDevice:t}=n.useDeviceStore();return n.jsxRuntimeExports.jsx("div",{className:sn.devices,children:Ka.map(r=>n.jsxRuntimeExports.jsx("div",{className:n.clx(sn.device,{[sn.active]:e===r}),onClick:()=>t(r),children:n.jsxRuntimeExports.jsx(n.Icon,{name:r.icon,fill:e===r?"#252525":"#757575",width:20,height:20})},r.value))})},ui="_header_zvaam_1",di="_left_zvaam_12",hi="_right_zvaam_13",Bt={header:ui,left:di,right:hi},fi="_preview_vijvm_2",pi="_active_vijvm_22",ln={preview:fi,active:pi},mi=()=>{const{onPreview:e,setOnPreview:t}=n.usePreviewStore();return n.jsxRuntimeExports.jsxs("div",{className:n.clx(ln.preview,{[ln.active]:e}),onClick:()=>t(!e),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUpRight",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:ln.text,children:"Preview"})]})},gi="_settings_q79q3_1",xi={settings:gi},vi="_language_1mbvp_1",Si="_text_1mbvp_11",rr={language:vi,text:Si},yi=()=>n.jsxRuntimeExports.jsxs("div",{className:rr.language,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Globe",fill:"#252525",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:rr.text,children:"Default"}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretDown",width:20,height:20})]}),bi="_pages_sf7rl_1",ji="_text_sf7rl_16",wi="_modal_sf7rl_22",Ci="_page_sf7rl_1",Ei="_hoverable_sf7rl_45",Ri="_separator_sf7rl_49",_i="_button_sf7rl_53",ki="_items_sf7rl_67",Se={pages:bi,default:"_default_sf7rl_5",text:ji,modal:wi,page:Ci,hoverable:Ei,separator:Ri,button:_i,items:ki},Pi=()=>{const{currentPage:e,setCurrentPage:t,setIsOpenModal:r,pages:o,setIsEdit:a,setEditedPage:s,deletePage:i,isOpenSelectModal:l,setIsOpenSelectModal:c}=n.usePagesStore(),{deletePage:p}=n.useLayersStore(),[f,h]=H.useState("");return H.useEffect(()=>{const m=()=>{c(!1)};return document.body.addEventListener("click",m),()=>{document.body.removeEventListener("click",m)}},[]),n.jsxRuntimeExports.jsxs("div",{className:Se.pages,children:[n.jsxRuntimeExports.jsxs("div",{className:Se.default,onClick:m=>{m.stopPropagation(),c(!l)},children:[n.jsxRuntimeExports.jsx(n.Icon,{name:o&&o[e]&&o[e].icon||"File",fill:"#252525",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:Se.text,children:o&&o[e]&&xt.includes(o[e].name)?`${me(o[e].name)} page`:o&&o[e]&&o[e].name}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretDown",width:20,height:20})]}),l&&n.jsxRuntimeExports.jsxs("div",{className:Se.modal,onClick:m=>m.stopPropagation(),children:[o&&n.jsxRuntimeExports.jsx("div",{className:Se.items,children:Object.keys(o).map(m=>{const v=o[m];return n.jsxRuntimeExports.jsxs("div",{className:n.clx(Se.page,{[Se.hoverable]:f===m}),onMouseEnter:()=>h(m),onMouseLeave:()=>h(""),onClick:()=>{h(""),a(!1),t(m),c(!1)},children:[n.jsxRuntimeExports.jsx(n.Icon,{name:v.icon,fill:"#252525"}),n.jsxRuntimeExports.jsx("span",{className:Se.text,children:xt.includes(v.name)?`${me(v.name)} page`:v.name}),f===m&&n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Gear",fill:"#757575",onClick:j=>{j.stopPropagation(),a(!0),s(m),r(!0)}}),!xt.includes(v.name)&&n.jsxRuntimeExports.jsx(n.Icon,{name:"Trash",fill:"#C12A2A",onClick:j=>{o[e].name===v.name&&t("home"),j.stopPropagation(),i(m),p(v.name),n.deletePage(v.path)}})]}),o[e]&&o[e].name===v.name&&n.jsxRuntimeExports.jsx(n.Icon,{name:"Check",fill:"#FF3F19"})]},m)})}),n.jsxRuntimeExports.jsx("div",{className:Se.separator}),n.jsxRuntimeExports.jsxs(n.Button,{className:Se.button,onClick:m=>{m.stopPropagation(),r(!0)},size:"l",children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Plus",fill:"#ff3f19"}),n.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},Li="_zoom_a77cn_1",Ni={zoom:Li},Di=()=>{const[e,t]=H.useState(),r=()=>{t(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return H.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),n.jsxRuntimeExports.jsxs("div",{className:Ni.zoom,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"MagnifyingGlassMinus",width:20,height:20}),n.jsxRuntimeExports.jsxs("span",{children:[e," %"]})]})},Ti=()=>n.jsxRuntimeExports.jsxs("div",{className:xi.settings,children:[n.jsxRuntimeExports.jsx(yi,{}),n.jsxRuntimeExports.jsx(Pi,{}),n.jsxRuntimeExports.jsx(Di,{})]}),Bi="_theme_3wxbf_1",Ai={theme:Bi},Fi=()=>n.jsxRuntimeExports.jsxs("div",{className:Ai.theme,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Check",width:18,height:18}),n.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),Mi=()=>{const{themeSettings:e}=n.useThemeSettingsStore(),{settings:t}=n.useSettingsStore(),{isOpenSelectModal:r}=n.usePagesStore(),[o,a]=H.useState(null),[s,i]=H.useState(!1),{pages:l}=n.usePagesStore(),{blocks:c}=n.useLayersStore();function p(j,y){return y.map(E=>Object.values(E.value.blockSettings).filter(_=>_.type===j).map(_=>_.value).flat()).flat().map(E=>E.listingId)}function f(j,y){return p(j,y).some(E=>E)}function h(j,y){const w=p(j,y);return Array.isArray(w)&&w.length>0?Math.max(...w):0}function m(j){if(l){const y=Object.keys(l).find(w=>l[w].name===j);if(y)return l[y]}return null}const v=()=>{if(s)o&&clearTimeout(o);else{const y=Object.keys(c).map(w=>{const E=m(w);return{name:E?E.name:w,path:w==="home"?"/":(E==null?void 0:E.path)||w,layout:{...c[w]},neededProductIds:[...p("ProductId",Object.values(c[w]))],neededCategoryIds:[...p("CategoryId",Object.values(c[w]))],neededAnnouncementIds:[...p("AnnouncementId",Object.values(c[w]))],neededListingIds:[...p("listings",Object.values(c[w]))],neededFaqs:f("Faqs",Object.values(c[w])),neededReviewCount:h("ReviewCount",Object.values(c[w])),seo:{pageTitle:E&&E.seo?E.seo.title:"",pageDescription:E&&E.seo?E.seo.description:""}}});n.updateSettings("POST","save",{themeSettings:e,settings:t,updatedPages:y})}i(!0);const j=setTimeout(()=>{i(!1)},2e3);a(j)};return n.jsxRuntimeExports.jsxs("div",{className:Bt.header,style:{zIndex:r?5e4:50},children:[n.jsxRuntimeExports.jsxs("div",{className:Bt.left,children:[n.jsxRuntimeExports.jsx(ci,{}),n.jsxRuntimeExports.jsx(mi,{})]}),n.jsxRuntimeExports.jsx("div",{className:Bt.center,children:n.jsxRuntimeExports.jsx(Ti,{})}),n.jsxRuntimeExports.jsxs("div",{className:Bt.right,children:[n.jsxRuntimeExports.jsx(Fi,{}),n.jsxRuntimeExports.jsx(ai,{}),n.jsxRuntimeExports.jsx(n.Button,{onClick:v,children:"Save"})]})]})},Ii="_exit_2ce42_1",Oi="_text_2ce42_10",or={exit:Ii,text:Oi},Ui=()=>n.jsxRuntimeExports.jsxs("div",{className:or.exit,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"SignOut",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:or.text,children:"Exit"})]}),Hi="_navbar_2ac63_1",$i="_main_2ac63_6",zi="_block_2ac63_13",Vi="_active_2ac63_30",At={navbar:Hi,main:$i,block:zi,active:Vi},Wi=()=>{const{activeBlock:e,setActiveBlock:t}=n.useNavbarStore(),{setActiveBlock:r}=n.useBlocksStore(),{setCurrentBlock:o}=n.useLayersStore(),{setActiveBlock:a}=n.useThemeSettingsStore();function s(i){r(null),t(i),o(null),a(null)}return n.jsxRuntimeExports.jsxs("div",{className:At.navbar,children:[n.jsxRuntimeExports.jsx(Ui,{}),n.jsxRuntimeExports.jsx("div",{className:At.main,children:n.navbarBlocks.map(i=>n.jsxRuntimeExports.jsxs("div",{className:n.clx(At.block,{[At.active]:e.icon===i.icon}),onClick:()=>s(i),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:i.icon,fill:e.icon===i.icon?"#252525":"#757575"}),n.jsxRuntimeExports.jsx("span",{children:i.name})]},i.icon))})]})},Gi="_preview_1q4f5_1",qi="_main_1q4f5_9",Ki="_content_1q4f5_19",Yi="_loading_1q4f5_26",Xi="_loader_1q4f5_34",Ji="_spin_1q4f5_1",Ft={preview:Gi,main:qi,content:Ki,loading:Yi,loader:Xi,spin:Ji},Qi="_header_1t64j_1",Zi="_circles_1t64j_14",es="_circle_1t64j_14",ts="_red_1t64j_30",ns="_green_1t64j_34",rs="_yellow_1t64j_38",os="_input_1t64j_42",as="_main_1t64j_51",is="_text_1t64j_59",Pe={header:Qi,circles:Zi,circle:es,red:ts,green:ns,yellow:rs,input:os,main:as,text:is},ss="data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.5'%20width='16'%20height='16'%20fill='url(%23pattern0_4042_718)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_4042_718'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_4042_718'%20transform='scale(0.015625)'/%3e%3c/pattern%3e%3cimage%20id='image0_4042_718'%20width='64'%20height='64'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAONJREFUeF7t20EOhEAIRFG4/6F7DvEnYeFzryQIv6pBd2behOu9dPvsbog+k+NLgArQAqmJcw9iAAhSgZKB3IJkkAySQTJ4CiE+gA8oBeg0mH3Ai084P89HhqwEqIA209ICsQdjAeaZIgaAYKxBDMCAYy8fXwAIgiAIcoJpJEYGI4VjB3YrbC9gL2AvkCB43cM5PgZgAAZgQFnNZAhdGykQBEEQBEEQDBmgAm2glM/z+QUYisYUGoldO7kY32IEAzCg6RgIRgjFAsw+AgRBMNYgBmCAT2TCYfoPPz/HCqQCX1eBHzHnv7C7WhBSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e",ls=["red","yellow","green"],cs=()=>n.jsxRuntimeExports.jsxs("div",{className:Pe.header,children:[n.jsxRuntimeExports.jsx("div",{className:Pe.circles,children:ls.map(e=>n.jsxRuntimeExports.jsx("div",{className:n.clx(Pe.circle,{[Pe.red]:e==="red",[Pe.yellow]:e==="yellow",[Pe.green]:e==="green"})},e))}),n.jsxRuntimeExports.jsxs("div",{className:Pe.input,children:[n.jsxRuntimeExports.jsxs("div",{className:Pe.main,children:[n.jsxRuntimeExports.jsx("img",{src:ss,alt:""}),n.jsxRuntimeExports.jsx("span",{className:Pe.text,children:"lorem.ipsum"}),n.jsxRuntimeExports.jsx(n.Icon,{name:"Lock",fill:"#757575",width:15,height:16})]}),n.jsxRuntimeExports.jsx(n.Icon,{name:"Copy",width:20,height:20})]})]}),us="_content_1plo6_1",ds="_main_1plo6_8",hs="_block_1plo6_12",fs="_active_1plo6_19",ps="_name_1plo6_23",ms="_empty_1plo6_37",gs="_icon_1plo6_48",xs="_title_1plo6_59",vs="_text_1plo6_65",Ss="_sections_1plo6_71",ys="_section_1plo6_71",pt={content:us,main:ds,block:hs,active:fs,name:ps,empty:ms,icon:gs,title:xs,text:vs,sections:Ss,section:ys},bs="_sidebar_1f3hk_1",js="_content_1f3hk_12",ws="_button_1f3hk_22",Cs="_moveButton_1f3hk_30",Es="_border_1f3hk_34",Rs="_deleteButton_1f3hk_38",de={sidebar:bs,content:js,button:ws,moveButton:Cs,border:Es,deleteButton:Rs},_s=()=>{const{activeBlock:e}=n.usePreviewStore(),{blocks:t,removeBlock:r,moveBlock:o,duplicateBlock:a}=n.useLayersStore(),{currentPage:s,pages:i}=n.usePagesStore(),l=i&&i[s]?Object.keys(t[i[s].name]):[],c=l.indexOf(e),p=()=>{c>0&&i&&o(i[s].name,c,c-1)},f=()=>{c<l.length-1&&i&&o(i[s].name,c,c+1)},h=()=>{i&&a(i[s].name,e)};return n.jsxRuntimeExports.jsx("div",{className:de.sidebar,children:n.jsxRuntimeExports.jsxs("div",{className:de.content,children:[n.jsxRuntimeExports.jsx("button",{onClick:p,className:n.clx(de.button,de.moveButton),disabled:c===0,children:n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUp"})}),n.jsxRuntimeExports.jsx("button",{onClick:f,className:n.clx(de.button,de.moveButton),disabled:c===l.length-1,children:n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowDown"})}),n.jsxRuntimeExports.jsx("div",{className:de.border}),n.jsxRuntimeExports.jsx("button",{onClick:h,className:n.clx(de.button,de.moveButton),children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Copy"})}),n.jsxRuntimeExports.jsx("div",{className:de.border}),n.jsxRuntimeExports.jsx("button",{onClick:()=>{i&&r(i[s].name,e)},className:n.clx(de.button,de.deleteButton),children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Trash",hoverable:!0})})]})})},ks=H.memo(()=>{const{setActiveBlock:e,activeBlock:t}=n.usePreviewStore(),{blocks:r,sourceBlocks:o}=n.useBlocksStore(),{blocks:a}=n.useLayersStore(),{settings:s}=n.useSettingsStore(),{currentPage:i,pages:l,setIsOpenSelectModal:c,pageContext:p}=n.usePagesStore(),f=H.useRef(t);H.useEffect(()=>{f.current=t},[t]),H.useEffect(()=>{const v=()=>{f.current&&e(null)};return document.body.addEventListener("click",v),()=>{document.body.removeEventListener("click",v)}},[]);const h=v=>{const j=new r[v.name];return Object.assign(j,v.value),j.renderBlock(s,p)};function m(v){if(o)return console.log(o,v),new o[v]().blockSettings.displayName}return n.jsxRuntimeExports.jsxs("div",{onClick:v=>{v.stopPropagation(),c(!1)},className:pt.content,children:[n.jsxRuntimeExports.jsx(Lr,{}),n.jsxRuntimeExports.jsx("div",{className:pt.main,children:l&&l[i]&&a[l[i].name]&&Object.keys(a[l[i].name]).map(v=>n.jsxRuntimeExports.jsxs("div",{onClick:()=>e(v),className:n.clx(pt.block,{[pt.active]:t===v}),children:[t===v&&n.jsxRuntimeExports.jsx("div",{className:pt.name,children:m(a[l[i].name][v].name)}),t===v&&n.jsxRuntimeExports.jsx(_s,{}),r&&n.jsxRuntimeExports.jsx(kr,{render:h,block:a[l[i].name][v]})]}))}),n.jsxRuntimeExports.jsx(Pr,{})]})}),Ps="_results_f488n_1",Ls="_name_f488n_8",Ns="_product_f488n_15",Mt={results:Ps,name:Ls,product:Ns},Ds="_search_1s0qp_1",Ts="_input_1s0qp_12",ar={search:Ds,input:Ts},Bs=()=>n.jsxRuntimeExports.jsxs("label",{className:ar.search,children:[n.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:ar.input}),n.jsxRuntimeExports.jsx(n.Icon,{name:"MagnifyingGlass",fill:"#757575"})]}),Nr=()=>{const{blocks:e,sourceBlocks:t,setActiveBlock:r}=n.useBlocksStore(),{hideModal:o}=n.useSubmodalStore();function a(l){r(l),o()}function s(l){if(t)return console.log(t,l),new t[l]().blockSettings.displayName}function i(l){if(t)return new t[l]().blockSettings.isAddable}return n.jsxRuntimeExports.jsxs("div",{className:Mt.add,children:[n.jsxRuntimeExports.jsx(Bs,{}),n.jsxRuntimeExports.jsx("div",{className:Mt.results,children:e&&Object.keys(e).map(l=>{if(i(l))return n.jsxRuntimeExports.jsxs("div",{className:Mt.product,onClick:()=>a(l),children:[n.jsxRuntimeExports.jsx("span",{className:Mt.name,children:s(l)}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretRight"})]},l)})})]})},As=()=>{const{modalPosition:e,color:t,initialColor:r,setShowModal:o,hue:a,saturation:s,brightness:i,dragging:l,setDragging:c,setHue:p,setSaturation:f,setBrightness:h,colorChange:m,setColor:v,update:j}=n.useColorPickerStore(),y=C=>{const{offsetX:N,offsetY:D}=C.nativeEvent;c(!0),_(N,D,C.currentTarget)},w=C=>{if(l){const N=document.querySelector(`.${n.styles.colorMap}`),{left:D,top:M}=N.getBoundingClientRect(),F=C.clientX-D,W=C.clientY-M;_(F,W,N)}},E=()=>{c(!1)},_=(C,N,D)=>{const{width:M,height:F}=D.getBoundingClientRect(),W=Math.max(0,Math.min(C/M*100,100)),le=Math.max(0,Math.min(100-N/F*100,100));f(W),h(le),B(W,le)},B=(C,N)=>{const D=$(a,C,N);m(D),v(D)},P=(C,N,D)=>{N/=100,D/=100;const M=Ce=>(Ce+C/60)%6,F=Ce=>D*(1-N*Math.max(0,Math.min(M(Ce),4-M(Ce),1))),W=Math.round(255*F(5)),le=Math.round(255*F(3)),we=Math.round(255*F(1));return{r:W,g:le,b:we}},V=(C,N,D)=>{const M=F=>F.toString(16).padStart(2,"0");return`#${M(C)}${M(N)}${M(D)}`},$=(C,N,D)=>{const{r:M,g:F,b:W}=P(C,N,D);return V(M,F,W)};H.useEffect(()=>{const C=D=>w(D),N=()=>E();return l?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",N)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",N)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",N)}},[l]);function G(){j(t),o(!1)}function g(){o(!1),m(r)}return n.jsxRuntimeExports.jsxs("div",{className:n.styles.modal,onClick:C=>C.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[n.jsxRuntimeExports.jsx("div",{children:"Color"}),n.jsxRuntimeExports.jsx("div",{className:n.styles.colorMap,onMouseDown:y,style:{background:`
33
+ */function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Me.apply(this,arguments)}function yn(e,t){if(e==null)return{};var r={},o=Object.keys(e),a,s;for(s=0;s<o.length;s++)a=o[s],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const Ut="get",Ht="application/x-www-form-urlencoded";function Yt(e){return e!=null&&typeof e.tagName=="string"}function pa(e){return Yt(e)&&e.tagName.toLowerCase()==="button"}function ma(e){return Yt(e)&&e.tagName.toLowerCase()==="form"}function ga(e){return Yt(e)&&e.tagName.toLowerCase()==="input"}function xa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function va(e,t){return e.button===0&&(!t||t==="_self")&&!xa(e)}let Tt=null;function Sa(){if(Tt===null)try{new FormData(document.createElement("form"),0),Tt=!1}catch{Tt=!0}return Tt}const ya=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rn(e){return e!=null&&!ya.has(e)?(process.env.NODE_ENV!=="production"&&oe(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+Ht+'"')),null):e}function ba(e,t){let r,o,a,s,i;if(ma(e)){let l=e.getAttribute("action");o=l?ge(l,t):null,r=e.getAttribute("method")||Ut,a=rn(e.getAttribute("enctype"))||Ht,s=new FormData(e)}else if(pa(e)||ga(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(o=c?ge(c,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||Ut,a=rn(e.getAttribute("formenctype"))||rn(l.getAttribute("enctype"))||Ht,s=new FormData(l,e),!Sa()){let{name:p,type:f,value:d}=e;if(f==="image"){let m=p?p+".":"";s.append(m+"x","0"),s.append(m+"y","0")}else p&&s.append(p,d)}}else{if(Yt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ut,o=null,a=Ht,i=e}return s&&a==="text/plain"&&(i=s,s=void 0),{action:o,method:r.toLowerCase(),encType:a,formData:s,body:i}}const ja=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],wa=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Ca=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Ea="6";try{window.__reactRouterVersion=Ea}catch{}function Ra(e,t){return No({basename:void 0,future:Me({},void 0,{v7_prependBasename:!0}),history:eo({window:void 0}),hydrationData:_a(),routes:e,mapRouteProperties:fa,unstable_dataStrategy:void 0,unstable_patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function _a(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Me({},t,{errors:ka(t.errors)})),t}function ka(e){if(!e)return null;let t=Object.entries(e),r={};for(let[o,a]of t)if(a&&a.__type==="RouteErrorResponse")r[o]=new zt(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let s=window[a.__subType];if(typeof s=="function")try{let i=new s(a.message);i.stack="",r[o]=i}catch{}}if(r[o]==null){let s=new Error(a.message);s.stack="",r[o]=s}}else r[o]=a;return r}const bn=y.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(bn.displayName="ViewTransition");const Er=y.createContext(new Map);process.env.NODE_ENV!=="production"&&(Er.displayName="Fetchers");const Pa="startTransition",Zn=y[Pa],La="flushSync",er=Zr[La];function Na(e){Zn?Zn(e):e()}function ft(e){er?er(e):e()}class Da{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=o=>{this.status==="pending"&&(this.status="resolved",t(o))},this.reject=o=>{this.status==="pending"&&(this.status="rejected",r(o))}})}}function Ta(e){let{fallbackElement:t,router:r,future:o}=e,[a,s]=y.useState(r.state),[i,l]=y.useState(),[c,p]=y.useState({isTransitioning:!1}),[f,d]=y.useState(),[m,v]=y.useState(),[j,b]=y.useState(),w=y.useRef(new Map),{v7_startTransition:E}=o||{},_=y.useCallback(g=>{E?Na(g):g()},[E]),B=y.useCallback((g,C)=>{let{deletedFetchers:N,unstable_flushSync:D,unstable_viewTransitionOpts:M}=C;N.forEach(W=>w.current.delete(W)),g.fetchers.forEach((W,le)=>{W.data!==void 0&&w.current.set(le,W.data)});let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!M||F){D?ft(()=>s(g)):_(()=>s(g));return}if(D){ft(()=>{m&&(f&&f.resolve(),m.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let W=r.window.document.startViewTransition(()=>{ft(()=>s(g))});W.finished.finally(()=>{ft(()=>{d(void 0),v(void 0),l(void 0),p({isTransitioning:!1})})}),ft(()=>v(W));return}m?(f&&f.resolve(),m.skipTransition(),b({state:g,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(l(g),p({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[r.window,m,f,w,_]);y.useLayoutEffect(()=>r.subscribe(B),[r,B]),y.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new Da)},[c]),y.useEffect(()=>{if(f&&i&&r.window){let g=i,C=f.promise,N=r.window.document.startViewTransition(async()=>{_(()=>s(g)),await C});N.finished.finally(()=>{d(void 0),v(void 0),l(void 0),p({isTransitioning:!1})}),v(N)}},[_,i,f,r.window]),y.useEffect(()=>{f&&i&&a.location.key===i.location.key&&f.resolve()},[f,m,a.location,i]),y.useEffect(()=>{!c.isTransitioning&&j&&(l(j.state),p({isTransitioning:!0,flushSync:!1,currentLocation:j.currentLocation,nextLocation:j.nextLocation}),b(void 0))},[c.isTransitioning,j]),y.useEffect(()=>{process.env.NODE_ENV!=="production"&&oe(t==null||!r.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let P=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:g=>r.navigate(g),push:(g,C,N)=>r.navigate(g,{state:C,preventScrollReset:N==null?void 0:N.preventScrollReset}),replace:(g,C,N)=>r.navigate(g,{replace:!0,state:C,preventScrollReset:N==null?void 0:N.preventScrollReset})}),[r]),V=r.basename||"/",$=y.useMemo(()=>({router:r,navigator:P,static:!1,basename:V}),[r,P,V]),G=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.createElement(y.Fragment,null,y.createElement(ot.Provider,{value:$},y.createElement(qt.Provider,{value:a},y.createElement(Er.Provider,{value:w.current},y.createElement(bn.Provider,{value:c},y.createElement(ha,{basename:V,location:a.location,navigationType:a.historyAction,navigator:P,future:G},a.initialized||r.future.v7_partialHydration?y.createElement(Ba,{routes:r.routes,future:r.future,state:a}):t))))),null)}const Ba=y.memo(Aa);function Aa(e){let{routes:t,future:r,state:o}=e;return ea(t,void 0,o,r)}process.env.NODE_ENV;const Fa=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ma=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rr=y.forwardRef(function(t,r){let{onClick:o,relative:a,reloadDocument:s,replace:i,state:l,target:c,to:p,preventScrollReset:f,unstable_viewTransition:d}=t,m=yn(t,ja),{basename:v}=y.useContext(xe),j,b=!1;if(typeof p=="string"&&Ma.test(p)&&(j=p,Fa))try{let B=new URL(window.location.href),P=p.startsWith("//")?new URL(B.protocol+p):new URL(p),V=ge(P.pathname,v);P.origin===B.origin&&V!=null?p=V+P.search+P.hash:b=!0}catch{process.env.NODE_ENV!=="production"&&oe(!1,'<Link to="'+p+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let w=Qo(p,{relative:a}),E=Ha(p,{replace:i,state:l,target:c,preventScrollReset:f,relative:a,unstable_viewTransition:d});function _(B){o&&o(B),B.defaultPrevented||E(B)}return y.createElement("a",Me({},m,{href:j||w,onClick:b||s?o:_,ref:r,target:c}))});process.env.NODE_ENV!=="production"&&(Rr.displayName="Link");const Ia=y.forwardRef(function(t,r){let{"aria-current":o="page",caseSensitive:a=!1,className:s="",end:i=!1,style:l,to:c,unstable_viewTransition:p,children:f}=t,d=yn(t,wa),m=jt(c,{relative:d.relative}),v=at(),j=y.useContext(qt),{navigator:b,basename:w}=y.useContext(xe),E=j!=null&&qa(m)&&p===!0,_=b.encodeLocation?b.encodeLocation(m).pathname:m.pathname,B=v.pathname,P=j&&j.navigation&&j.navigation.location?j.navigation.location.pathname:null;a||(B=B.toLowerCase(),P=P?P.toLowerCase():null,_=_.toLowerCase()),P&&w&&(P=ge(P,w)||P);const V=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let $=B===_||!i&&B.startsWith(_)&&B.charAt(V)==="/",G=P!=null&&(P===_||!i&&P.startsWith(_)&&P.charAt(_.length)==="/"),g={isActive:$,isPending:G,isTransitioning:E},C=$?o:void 0,N;typeof s=="function"?N=s(g):N=[s,$?"active":null,G?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let D=typeof l=="function"?l(g):l;return y.createElement(Rr,Me({},d,{"aria-current":C,className:N,ref:r,style:D,to:c,unstable_viewTransition:p}),typeof f=="function"?f(g):f)});process.env.NODE_ENV!=="production"&&(Ia.displayName="NavLink");const Oa=y.forwardRef((e,t)=>{let{fetcherKey:r,navigate:o,reloadDocument:a,replace:s,state:i,method:l=Ut,action:c,onSubmit:p,relative:f,preventScrollReset:d,unstable_viewTransition:m}=e,v=yn(e,Ca),j=Wa(),b=Ga(c,{relative:f}),w=l.toLowerCase()==="get"?"get":"post",E=_=>{if(p&&p(_),_.defaultPrevented)return;_.preventDefault();let B=_.nativeEvent.submitter,P=(B==null?void 0:B.getAttribute("formmethod"))||l;j(B||_.currentTarget,{fetcherKey:r,method:P,navigate:o,replace:s,state:i,relative:f,preventScrollReset:d,unstable_viewTransition:m})};return y.createElement("form",Me({ref:t,method:w,action:b,onSubmit:a?p:E},v))});process.env.NODE_ENV!=="production"&&(Oa.displayName="Form");process.env.NODE_ENV;var Wt;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wt||(Wt={}));var tr;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(tr||(tr={}));function Ua(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function _r(e){let t=y.useContext(ot);return t||(process.env.NODE_ENV!=="production"?T(!1,Ua(e)):T(!1)),t}function Ha(e,t){let{target:r,replace:o,state:a,preventScrollReset:s,relative:i,unstable_viewTransition:l}=t===void 0?{}:t,c=jr(),p=at(),f=jt(e,{relative:i});return y.useCallback(d=>{if(va(d,r)){d.preventDefault();let m=o!==void 0?o:Fe(p)===Fe(f);c(e,{replace:m,state:a,preventScrollReset:s,relative:i,unstable_viewTransition:l})}},[p,c,f,o,a,r,e,s,i,l])}function $a(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let za=0,Va=()=>"__"+String(++za)+"__";function Wa(){let{router:e}=_r(Wt.UseSubmit),{basename:t}=y.useContext(xe),r=ca();return y.useCallback(function(o,a){a===void 0&&(a={}),$a();let{action:s,method:i,encType:l,formData:c,body:p}=ba(o,t);if(a.navigate===!1){let f=a.fetcherKey||Va();e.fetch(f,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:c,body:p,formMethod:a.method||i,formEncType:a.encType||l,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:c,body:p,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function Ga(e,t){let{relative:r}=t===void 0?{}:t,{basename:o}=y.useContext(xe),a=y.useContext(Ne);a||(process.env.NODE_ENV!=="production"?T(!1,"useFormAction must be used inside a RouteContext"):T(!1));let[s]=a.matches.slice(-1),i=Me({},jt(e||".",{relative:r})),l=at();if(e==null){i.search=l.search;let c=new URLSearchParams(i.search);c.has("index")&&c.get("index")===""&&(c.delete("index"),i.search=c.toString()?"?"+c.toString():"")}return(!e||e===".")&&s.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),o!=="/"&&(i.pathname=i.pathname==="/"?o:je([o,i.pathname])),Fe(i)}function qa(e,t){t===void 0&&(t={});let r=y.useContext(bn);r==null&&(process.env.NODE_ENV!=="production"?T(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):T(!1));let{basename:o}=_r(Wt.useViewTransitionState),a=jt(e,{relative:t.relative});if(!r.isTransitioning)return!1;let s=ge(r.currentLocation.pathname,o)||r.currentLocation.pathname,i=ge(r.nextLocation.pathname,o)||r.nextLocation.pathname;return $t(a.pathname,i)!=null||$t(a.pathname,s)!=null}const me=e=>e?e.replace(/_/g," ").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" and "):"",Ka=[{icon:"Desktop",value:"desktop"},{icon:"DeviceTabletCamera",value:"tablet"},{icon:"DeviceMobileCamera",value:"mobile"}],Ya=[{icon:"PaintBrushBroad",name:"Colors"},{icon:"TextAa",name:"Fonts"},{icon:"CornersOut",name:"Borders"},{icon:"ArrowSquareIn",name:"Buttons"},{icon:"Textbox",name:"Inputs"}],xt=["home","reviews","faqs","contact","product","ticket","login"],on={home:{path:"/",name:"home",icon:"HouseSimple",seo:{description:"",title:""},visibility:"public"},product:{path:"/product",name:"product",icon:"SquaresFour",seo:{description:"",title:""},visibility:"public"},faqs:{path:"/faqs",name:"faqs",icon:"SealQuestion",seo:{description:"",title:""},visibility:"public"},reviews:{path:"/reviews",name:"reviews",icon:"Star",seo:{description:"",title:""},visibility:"public"},contact:{path:"/contact",name:"contact",icon:"ChatCentered",seo:{description:"",title:""},visibility:"public"},ticket:{path:"/ticket",name:"ticket",icon:"Ticket",seo:{description:"",title:""},visibility:"public"},login:{path:"/login",name:"login",icon:"UserCircleGear",seo:{description:"",title:""},visibility:"public"}},Xa=["Acorn","Activity","AddressBook","AddressBookTabs","AirTrafficControl","Airplane","AirplaneInFlight","AirplaneLanding","AirplaneTakeoff","AirplaneTaxiing","AirplaneTilt","Airplay","Alarm","Alien","AlignBottom","AlignBottomSimple","AlignCenterHorizontal","AlignCenterHorizontalSimple","AlignCenterVertical","AlignCenterVerticalSimple","AlignLeft","AlignLeftSimple","AlignRight","AlignRightSimple","AlignTop","AlignTopSimple","AmazonLogo","Ambulance","Anchor","AnchorSimple","AndroidLogo","Angle","AngularLogo","Aperture","AppStoreLogo","AppWindow","AppleLogo","ApplePodcastsLogo","ApproximateEquals","Archive","ArchiveBox","ArchiveTray","Armchair","ArrowArcLeft","ArrowArcRight","ArrowBendDoubleUpLeft","ArrowBendDoubleUpRight","ArrowBendDownLeft","ArrowBendDownRight","ArrowBendLeftDown","ArrowBendLeftUp","ArrowBendRightDown","ArrowBendRightUp","ArrowBendUpLeft","ArrowBendUpRight","ArrowCircleDown","ArrowCircleDownLeft","ArrowCircleDownRight","ArrowCircleLeft","ArrowCircleRight","ArrowCircleUp","ArrowCircleUpLeft","ArrowCircleUpRight","ArrowClockwise","ArrowCounterClockwise","ArrowDown","ArrowDownLeft","ArrowDownRight","ArrowElbowDownLeft","ArrowElbowDownRight","ArrowElbowLeft","ArrowElbowLeftDown","ArrowElbowLeftUp","ArrowElbowRight","ArrowElbowRightDown","ArrowElbowRightUp","ArrowElbowUpLeft","ArrowElbowUpRight","ArrowFatDown","ArrowFatLeft","ArrowFatLineDown","ArrowFatLineLeft","ArrowFatLineRight","ArrowFatLineUp","ArrowFatLinesDown","ArrowFatLinesLeft","ArrowFatLinesRight","ArrowFatLinesUp","ArrowFatRight","ArrowFatUp","ArrowLeft","ArrowLineDown","ArrowLineDownLeft","ArrowLineDownRight","ArrowLineLeft","ArrowLineRight","ArrowLineUp","ArrowLineUpLeft","ArrowLineUpRight","ArrowRight","ArrowSquareDown","ArrowSquareDownLeft","ArrowSquareDownRight","ArrowSquareIn","ArrowSquareLeft","ArrowSquareOut","ArrowSquareRight","ArrowSquareUp","ArrowSquareUpLeft","ArrowSquareUpRight","ArrowUDownLeft","ArrowUDownRight","ArrowULeftDown","ArrowULeftUp","ArrowURightDown","ArrowURightUp","ArrowUUpLeft","ArrowUUpRight","ArrowUp","ArrowUpLeft","ArrowUpRight","ArrowsClockwise","ArrowsCounterClockwise","ArrowsDownUp","ArrowsHorizontal","ArrowsIn","ArrowsInCardinal","ArrowsInLineHorizontal","ArrowsInLineVertical","ArrowsInSimple","ArrowsLeftRight","ArrowsMerge","ArrowsOut","ArrowsOutCardinal","ArrowsOutLineHorizontal","ArrowsOutLineVertical","ArrowsOutSimple","ArrowsSplit","ArrowsVertical","Article","ArticleMedium","ArticleNyTimes","Asclepius","Asterisk","AsteriskSimple","At","Atom","Avocado","Axe","Baby","BabyCarriage","Backpack","Backspace","Bag","BagSimple","Balloon","Bandaids","Bank","Barbell","Barcode","Barn","Barricade","Baseball","BaseballCap","BaseballHelmet","Basket","Basketball","Bathtub","BatteryCharging","BatteryChargingVertical","BatteryEmpty","BatteryFull","BatteryHigh","BatteryLow","BatteryMedium","BatteryPlus","BatteryPlusVertical","BatteryVerticalEmpty","BatteryVerticalFull","BatteryVerticalHigh","BatteryVerticalLow","BatteryVerticalMedium","BatteryWarning","BatteryWarningVertical","BeachBall","Beanie","Bed","BeerBottle","BeerStein","BehanceLogo","Bell","BellRinging","BellSimple","BellSimpleRinging","BellSimpleSlash","BellSimpleZ","BellSlash","BellZ","Belt","BezierCurve","Bicycle","Binary","Binoculars","Biohazard","Bird","Blueprint","Bluetooth","BluetoothConnected","BluetoothSlash","BluetoothX","Boat","Bomb","Bone","Book","BookBookmark","BookOpen","BookOpenText","BookOpenUser","Bookmark","BookmarkSimple","Bookmarks","BookmarksSimple","Books","Boot","Boules","BoundingBox","BowlFood","BowlSteam","BowlingBall","BoxArrowDown","BoxArrowUp","BoxingGlove","BracketsAngle","BracketsCurly","BracketsRound","BracketsSquare","Brain","Brandy","Bread","Bridge","Briefcase","BriefcaseMetal","Broadcast","Broom","Browser","Browsers","Bug","BugBeetle","BugDroid","Building","BuildingApartment","BuildingOffice","Buildings","Bulldozer","Bus","Butterfly","CableCar","Cactus","Caduceus","Cake","Calculator","Calendar","CalendarBlank","CalendarCheck","CalendarDot","CalendarDots","CalendarHeart","CalendarMinus","CalendarPlus","CalendarSlash","CalendarStar","CalendarX","CallBell","Camera","CameraPlus","CameraRotate","CameraSlash","Campfire","Car","CarBattery","CarProfile","CarSimple","Cardholder","Cards","CardsThree","CaretCircleDoubleDown","CaretCircleDoubleLeft","CaretCircleDoubleRight","CaretCircleDoubleUp","CaretCircleDown","CaretCircleLeft","CaretCircleRight","CaretCircleUp","CaretCircleUpDown","CaretDoubleDown","CaretDoubleLeft","CaretDoubleRight","CaretDoubleUp","CaretDown","CaretLeft","CaretLineDown","CaretLineLeft","CaretLineRight","CaretLineUp","CaretRight","CaretUp","CaretUpDown","Carrot","CashRegister","CassetteTape","CastleTurret","Cat","CellSignalFull","CellSignalHigh","CellSignalLow","CellSignalMedium","CellSignalNone","CellSignalSlash","CellSignalX","CellTower","Certificate","Chair","Chalkboard","ChalkboardSimple","ChalkboardTeacher","Champagne","ChargingStation","ChartBar","ChartBarHorizontal","ChartDonut","ChartLine","ChartLineDown","ChartLineUp","ChartPie","ChartPieSlice","ChartPolar","ChartScatter","Chat","ChatCentered","ChatCenteredDots","ChatCenteredSlash","ChatCenteredText","ChatCircle","ChatCircleDots","ChatCircleSlash","ChatCircleText","ChatDots","ChatSlash","ChatTeardrop","ChatTeardropDots","ChatTeardropSlash","ChatTeardropText","ChatText","Chats","ChatsCircle","ChatsTeardrop","Check","CheckCircle","CheckFat","CheckSquare","CheckSquareOffset","Checkerboard","Checks","Cheers","Cheese","ChefHat","Cherries","Church","Cigarette","CigaretteSlash","Circle","CircleDashed","CircleHalf","CircleHalfTilt","CircleNotch","CircleWavy","CircleWavyCheck","CircleWavyQuestion","CircleWavyWarning","CirclesFour","CirclesThree","CirclesThreePlus","Circuitry","City","Clipboard","ClipboardText","Clock","ClockAfternoon","ClockClockwise","ClockCountdown","ClockCounterClockwise","ClockUser","ClosedCaptioning","Cloud","CloudArrowDown","CloudArrowUp","CloudCheck","CloudFog","CloudLightning","CloudMoon","CloudRain","CloudSlash","CloudSnow","CloudSun","CloudWarning","CloudX","Clover","Club","CoatHanger","CodaLogo","Code","CodeBlock","CodeSimple","CodepenLogo","CodesandboxLogo","Coffee","CoffeeBean","Coin","CoinVertical","Coins","Columns","ColumnsPlusLeft","ColumnsPlusRight","Command","Compass","CompassRose","CompassTool","ComputerTower","Confetti","ContactlessPayment","Control","Cookie","CookingPot","Copy","CopySimple","Copyleft","Copyright","CornersIn","CornersOut","Couch","CourtBasketball","Cow","CowboyHat","Cpu","Crane","CraneTower","CreditCard","Cricket","Crop","Cross","Crosshair","CrosshairSimple","Crown","CrownCross","CrownSimple","Cube","CubeFocus","CubeTransparent","CurrencyBtc","CurrencyCircleDollar","CurrencyCny","CurrencyDollar","CurrencyDollarSimple","CurrencyEth","CurrencyEur","CurrencyGbp","CurrencyInr","CurrencyJpy","CurrencyKrw","CurrencyKzt","CurrencyNgn","CurrencyRub","Cursor","CursorClick","CursorText","Cylinder","Database","Desk","Desktop","DesktopTower","Detective","DevToLogo","DeviceMobile","DeviceMobileCamera","DeviceMobileSlash","DeviceMobileSpeaker","DeviceRotate","DeviceTablet","DeviceTabletCamera","DeviceTabletSpeaker","Devices","Diamond","DiamondsFour","DiceFive","DiceFour","DiceOne","DiceSix","DiceThree","DiceTwo","Disc","DiscoBall","DiscordLogo","Divide","Dna","Dog","Door","DoorOpen","Dot","DotOutline","DotsNine","DotsSix","DotsSixVertical","DotsThree","DotsThreeCircle","DotsThreeCircleVertical","DotsThreeOutline","DotsThreeOutlineVertical","DotsThreeVertical","Download","DownloadSimple","Dress","Dresser","DribbbleLogo","Drone","Drop","DropHalf","DropHalfBottom","DropSimple","DropSlash","DropboxLogo","Ear","EarSlash","Egg","EggCrack","Eject","EjectSimple","Elevator","Empty","Engine","Envelope","EnvelopeOpen","EnvelopeSimple","EnvelopeSimpleOpen","Equalizer","Equals","Eraser","EscalatorDown","EscalatorUp","Exam","ExclamationMark","Exclude","ExcludeSquare","Export","Eye","EyeClosed","EyeSlash","Eyedropper","EyedropperSample","Eyeglasses","Eyes","FaceMask","FacebookLogo","Factory","Faders","FadersHorizontal","FalloutShelter","Fan","Farm","FastForward","FastForwardCircle","Feather","FediverseLogo","FigmaLogo","File","FileArchive","FileArrowDown","FileArrowUp","FileAudio","FileC","FileCSharp","FileCloud","FileCode","FileCpp","FileCss","FileCsv","FileDashed","FileDoc","FileDotted","FileHtml","FileImage","FileIni","FileJpg","FileJs","FileJsx","FileLock","FileMagnifyingGlass","FileMd","FileMinus","FilePdf","FilePlus","FilePng","FilePpt","FilePy","FileRs","FileSearch","FileSql","FileSvg","FileText","FileTs","FileTsx","FileTxt","FileVideo","FileVue","FileX","FileXls","FileZip","Files","FilmReel","FilmScript","FilmSlate","FilmStrip","Fingerprint","FingerprintSimple","FinnTheHuman","Fire","FireExtinguisher","FireSimple","FireTruck","FirstAid","FirstAidKit","Fish","FishSimple","Flag","FlagBanner","FlagBannerFold","FlagCheckered","FlagPennant","Flame","Flashlight","Flask","FlipHorizontal","FlipVertical","FloppyDisk","FloppyDiskBack","FlowArrow","Flower","FlowerLotus","FlowerTulip","FlyingSaucer","Folder","FolderDashed","FolderDotted","FolderLock","FolderMinus","FolderNotch","FolderNotchMinus","FolderNotchOpen","FolderNotchPlus","FolderOpen","FolderPlus","FolderSimple","FolderSimpleDashed","FolderSimpleDotted","FolderSimpleLock","FolderSimpleMinus","FolderSimplePlus","FolderSimpleStar","FolderSimpleUser","FolderStar","FolderUser","Folders","Football","FootballHelmet","Footprints","ForkKnife","FourK","FrameCorners","FramerLogo","Function","Funnel","FunnelSimple","FunnelSimpleX","FunnelX","GameController","Garage","GasCan","GasPump","Gauge","Gavel","Gear","GearFine","GearSix","GenderFemale","GenderIntersex","GenderMale","GenderNeuter","GenderNonbinary","GenderTransgender","Ghost","Gif","Gift","GitBranch","GitCommit","GitDiff","GitFork","GitMerge","GitPullRequest","GithubLogo","GitlabLogo","GitlabLogoSimple","Globe","GlobeHemisphereEast","GlobeHemisphereWest","GlobeSimple","GlobeSimpleX","GlobeStand","GlobeX","Goggles","Golf","GoodreadsLogo","GoogleCardboardLogo","GoogleChromeLogo","GoogleDriveLogo","GoogleLogo","GooglePhotosLogo","GooglePlayLogo","GooglePodcastsLogo","Gps","GpsFix","GpsSlash","Gradient","GraduationCap","Grains","GrainsSlash","Graph","GraphicsCard","GreaterThan","GreaterThanOrEqual","GridFour","GridNine","Guitar","HairDryer","Hamburger","Hammer","Hand","HandArrowDown","HandArrowUp","HandCoins","HandDeposit","HandEye","HandFist","HandGrabbing","HandHeart","HandPalm","HandPeace","HandPointing","HandSoap","HandSwipeLeft","HandSwipeRight","HandTap","HandWaving","HandWithdraw","Handbag","HandbagSimple","HandsClapping","HandsPraying","Handshake","HardDrive","HardDrives","HardHat","Hash","HashStraight","HeadCircuit","Headlights","Headphones","Headset","Heart","HeartBreak","HeartHalf","HeartStraight","HeartStraightBreak","Heartbeat","Hexagon","HighDefinition","HighHeel","Highlighter","HighlighterCircle","Hockey","Hoodie","Horse","Hospital","Hourglass","HourglassHigh","HourglassLow","HourglassMedium","HourglassSimple","HourglassSimpleHigh","HourglassSimpleLow","HourglassSimpleMedium","House","HouseLine","HouseSimple","Hurricane","IceCream","IconBase","IconContext","IdentificationBadge","IdentificationCard","Image","ImageBroken","ImageSquare","Images","ImagesSquare","Infinity","Info","InstagramLogo","Intersect","IntersectSquare","IntersectThree","Intersection","Invoice","Island","Jar","JarLabel","Jeep","Joystick","Kanban","Key","KeyReturn","Keyboard","Keyhole","Knife","Ladder","LadderSimple","Lamp","LampPendant","Laptop","Lasso","LastfmLogo","Layout","Leaf","Lectern","Lego","LegoSmiley","Lemniscate","LessThan","LessThanOrEqual","LetterCircleH","LetterCircleP","LetterCircleV","Lifebuoy","Lightbulb","LightbulbFilament","Lighthouse","Lightning","LightningA","LightningSlash","LineSegment","LineSegments","LineVertical","Link","LinkBreak","LinkSimple","LinkSimpleBreak","LinkSimpleHorizontal","LinkSimpleHorizontalBreak","LinkedinLogo","LinktreeLogo","LinuxLogo","List","ListBullets","ListChecks","ListDashes","ListHeart","ListMagnifyingGlass","ListNumbers","ListPlus","ListStar","Lock","LockKey","LockKeyOpen","LockLaminated","LockLaminatedOpen","LockOpen","LockSimple","LockSimpleOpen","Lockers","Log","MagicWand","Magnet","MagnetStraight","MagnifyingGlass","MagnifyingGlassMinus","MagnifyingGlassPlus","Mailbox","MapPin","MapPinArea","MapPinLine","MapPinPlus","MapPinSimple","MapPinSimpleArea","MapPinSimpleLine","MapTrifold","MarkdownLogo","MarkerCircle","Martini","MaskHappy","MaskSad","MastodonLogo","MathOperations","MatrixLogo","Medal","MedalMilitary","MediumLogo","Megaphone","MegaphoneSimple","MemberOf","Memory","MessengerLogo","MetaLogo","Meteor","Metronome","Microphone","MicrophoneSlash","MicrophoneStage","Microscope","MicrosoftExcelLogo","MicrosoftOutlookLogo","MicrosoftPowerpointLogo","MicrosoftTeamsLogo","MicrosoftWordLogo","Minus","MinusCircle","MinusSquare","Money","MoneyWavy","Monitor","MonitorArrowUp","MonitorPlay","Moon","MoonStars","Moped","MopedFront","Mosque","Motorcycle","Mountains","Mouse","MouseLeftClick","MouseMiddleClick","MouseRightClick","MouseScroll","MouseSimple","MusicNote","MusicNoteSimple","MusicNotes","MusicNotesMinus","MusicNotesPlus","MusicNotesSimple","NavigationArrow","Needle","Network","NetworkSlash","NetworkX","Newspaper","NewspaperClipping","NotEquals","NotMemberOf","NotSubsetOf","NotSupersetOf","Notches","Note","NoteBlank","NotePencil","Notebook","Notepad","Notification","NotionLogo","NuclearPlant","NumberCircleEight","NumberCircleFive","NumberCircleFour","NumberCircleNine","NumberCircleOne","NumberCircleSeven","NumberCircleSix","NumberCircleThree","NumberCircleTwo","NumberCircleZero","NumberEight","NumberFive","NumberFour","NumberNine","NumberOne","NumberSeven","NumberSix","NumberSquareEight","NumberSquareFive","NumberSquareFour","NumberSquareNine","NumberSquareOne","NumberSquareSeven","NumberSquareSix","NumberSquareThree","NumberSquareTwo","NumberSquareZero","NumberThree","NumberTwo","NumberZero","Numpad","Nut","NyTimesLogo","Octagon","OfficeChair","Onigiri","OpenAiLogo","Option","Orange","OrangeSlice","Oven","Package","PaintBrush","PaintBrushBroad","PaintBrushHousehold","PaintBucket","PaintRoller","Palette","Panorama","Pants","PaperPlane","PaperPlaneRight","PaperPlaneTilt","Paperclip","PaperclipHorizontal","Parachute","Paragraph","Parallelogram","Park","Password","Path","PatreonLogo","Pause","PauseCircle","PawPrint","PaypalLogo","Peace","Pen","PenNib","PenNibStraight","Pencil","PencilCircle","PencilLine","PencilRuler","PencilSimple","PencilSimpleLine","PencilSimpleSlash","PencilSlash","Pentagon","Pentagram","Pepper","Percent","Person","PersonArmsSpread","PersonSimple","PersonSimpleBike","PersonSimpleCircle","PersonSimpleHike","PersonSimpleRun","PersonSimpleSki","PersonSimpleSnowboard","PersonSimpleSwim","PersonSimpleTaiChi","PersonSimpleThrow","PersonSimpleWalk","Perspective","Phone","PhoneCall","PhoneDisconnect","PhoneIncoming","PhoneList","PhoneOutgoing","PhonePause","PhonePlus","PhoneSlash","PhoneTransfer","PhoneX","PhosphorLogo","Pi","PianoKeys","PicnicTable","PictureInPicture","PiggyBank","Pill","PingPong","PintGlass","PinterestLogo","Pinwheel","Pipe","PipeWrench","PixLogo","Pizza","Placeholder","Planet","Plant","Play","PlayCircle","PlayPause","Playlist","Plug","PlugCharging","Plugs","PlugsConnected","Plus","PlusCircle","PlusMinus","PlusSquare","PokerChip","PoliceCar","Polygon","Popcorn","Popsicle","PottedPlant","Power","Prescription","Presentation","PresentationChart","Printer","Prohibit","ProhibitInset","ProjectorScreen","ProjectorScreenChart","Pulse","PushPin","PushPinSimple","PushPinSimpleSlash","PushPinSlash","PuzzlePiece","QrCode","Question","QuestionMark","Queue","Quotes","Rabbit","Racquet","Radical","Radio","RadioButton","Radioactive","Rainbow","RainbowCloud","Ranking","ReadCvLogo","Receipt","ReceiptX","Record","Rectangle","RectangleDashed","Recycle","RedditLogo","Repeat","RepeatOnce","ReplitLogo","Resize","Rewind","RewindCircle","RoadHorizon","Robot","Rocket","RocketLaunch","Rows","RowsPlusBottom","RowsPlusTop","Rss","RssSimple","Rug","Ruler","SSR","Sailboat","Scales","Scan","ScanSmiley","Scissors","Scooter","Screencast","Screwdriver","Scribble","ScribbleLoop","Scroll","Seal","SealCheck","SealPercent","SealQuestion","SealWarning","Seat","Seatbelt","SecurityCamera","Selection","SelectionAll","SelectionBackground","SelectionForeground","SelectionInverse","SelectionPlus","SelectionSlash","Shapes","Share","ShareFat","ShareNetwork","Shield","ShieldCheck","ShieldCheckered","ShieldChevron","ShieldPlus","ShieldSlash","ShieldStar","ShieldWarning","ShippingContainer","ShirtFolded","ShootingStar","ShoppingBag","ShoppingBagOpen","ShoppingCart","ShoppingCartSimple","Shovel","Shower","Shrimp","Shuffle","ShuffleAngular","ShuffleSimple","Sidebar","SidebarSimple","Sigma","SignIn","SignOut","Signature","Signpost","SimCard","Siren","SketchLogo","SkipBack","SkipBackCircle","SkipForward","SkipForwardCircle","Skull","SkypeLogo","SlackLogo","Sliders","SlidersHorizontal","Slideshow","Smiley","SmileyAngry","SmileyBlank","SmileyMeh","SmileyMelting","SmileyNervous","SmileySad","SmileySticker","SmileyWink","SmileyXEyes","SnapchatLogo","Sneaker","SneakerMove","Snowflake","SoccerBall","Sock","SolarPanel","SolarRoof","SortAscending","SortDescending","SoundcloudLogo","Spade","Sparkle","SpeakerHifi","SpeakerHigh","SpeakerLow","SpeakerNone","SpeakerSimpleHigh","SpeakerSimpleLow","SpeakerSimpleNone","SpeakerSimpleSlash","SpeakerSimpleX","SpeakerSlash","SpeakerX","Speedometer","Sphere","Spinner","SpinnerBall","SpinnerGap","Spiral","SplitHorizontal","SplitVertical","SpotifyLogo","SprayBottle","Square","SquareHalf","SquareHalfBottom","SquareLogo","SquareSplitHorizontal","SquareSplitVertical","SquaresFour","Stack","StackMinus","StackOverflowLogo","StackPlus","StackSimple","Stairs","Stamp","StandardDefinition","Star","StarAndCrescent","StarFour","StarHalf","StarOfDavid","SteamLogo","SteeringWheel","Steps","Stethoscope","Sticker","Stool","Stop","StopCircle","Storefront","Strategy","StripeLogo","Student","SubsetOf","SubsetProperOf","Subtitles","SubtitlesSlash","Subtract","SubtractSquare","Subway","Suitcase","SuitcaseRolling","SuitcaseSimple","Sun","SunDim","SunHorizon","Sunglasses","SupersetOf","SupersetProperOf","Swap","Swatches","SwimmingPool","Sword","Synagogue","Syringe","TShirt","Table","Tabs","Tag","TagChevron","TagSimple","Target","Taxi","TeaBag","TelegramLogo","Television","TelevisionSimple","TennisBall","Tent","Terminal","TerminalWindow","TestTube","TextAUnderline","TextAa","TextAlignCenter","TextAlignJustify","TextAlignLeft","TextAlignRight","TextB","TextBolder","TextColumns","TextH","TextHFive","TextHFour","TextHOne","TextHSix","TextHThree","TextHTwo","TextIndent","TextItalic","TextOutdent","TextStrikethrough","TextSubscript","TextSuperscript","TextT","TextTSlash","TextUnderline","Textbox","Thermometer","ThermometerCold","ThermometerHot","ThermometerSimple","ThreadsLogo","ThreeD","ThumbsDown","ThumbsUp","Ticket","TidalLogo","TiktokLogo","Tilde","Timer","TipJar","Tipi","Tire","ToggleLeft","ToggleRight","Toilet","ToiletPaper","Toolbox","Tooth","Tornado","Tote","ToteSimple","Towel","Tractor","Trademark","TrademarkRegistered","TrafficCone","TrafficSign","TrafficSignal","Train","TrainRegional","TrainSimple","Tram","Translate","Trash","TrashSimple","Tray","TrayArrowDown","TrayArrowUp","TreasureChest","Tree","TreeEvergreen","TreePalm","TreeStructure","TreeView","TrendDown","TrendUp","Triangle","TriangleDashed","Trolley","TrolleySuitcase","Trophy","Truck","TruckTrailer","TumblrLogo","TwitchLogo","TwitterLogo","Umbrella","UmbrellaSimple","Union","Unite","UniteSquare","Upload","UploadSimple","Usb","User","UserCheck","UserCircle","UserCircleCheck","UserCircleDashed","UserCircleGear","UserCircleMinus","UserCirclePlus","UserFocus","UserGear","UserList","UserMinus","UserPlus","UserRectangle","UserSound","UserSquare","UserSwitch","Users","UsersFour","UsersThree","Van","Vault","VectorThree","VectorTwo","Vibrate","Video","VideoCamera","VideoCameraSlash","VideoConference","Vignette","VinylRecord","VirtualReality","Virus","Visor","Voicemail","Volleyball","Wall","Wallet","Warehouse","Warning","WarningCircle","WarningDiamond","WarningOctagon","WashingMachine","Watch","WaveSawtooth","WaveSine","WaveSquare","WaveTriangle","Waveform","WaveformSlash","Waves","Webcam","WebcamSlash","WebhooksLogo","WechatLogo","WhatsappLogo","Wheelchair","WheelchairMotion","WifiHigh","WifiLow","WifiMedium","WifiNone","WifiSlash","WifiX","Wind","Windmill","WindowsLogo","Wine","Wrench","X","XCircle","XLogo","XSquare","Yarn","YinYang","YoutubeLogo"];function Ja(){const e=localStorage.getItem("accessToken"),t=localStorage.getItem("shopId");return!!(e&&t)}const Qa="_wrapper_dbban_1",Za="_main_dbban_8",ei="_loading_dbban_12",an={wrapper:Qa,main:Za,loading:ei},kr=({render:e,block:t})=>e(t),Pr=()=>{const{footer:e}=n.useLayersStore(),{settings:t}=n.useSettingsStore(),{pageContext:r}=n.usePagesStore();return e==null?void 0:e.renderBlock(t,r)},Lr=()=>{const{header:e}=n.useLayersStore(),{settings:t}=n.useSettingsStore(),{pageContext:r}=n.usePagesStore();return e==null?void 0:e.renderBlock(t,r)},nr=({pagePath:e})=>{const{sourceBlocks:t}=n.useBlocksStore(),{pageContext:r}=n.usePagesStore(),[o,a]=H.useState(!0),[s,i]=H.useState(null);H.useState();const[l,c]=H.useState();H.useEffect(()=>{a(!0),(async()=>{if(e==="productId"){const d=window.location.pathname.slice(1),{layout:m}=await n.getDynamicPage(encodeURIComponent(d));i(m)}else{const{layout:d}=await n.getDynamicPage(encodeURIComponent(e));i(d)}a(!1)})()},[]);const p=f=>{const d=new t[f.name];return Object.assign(d,f.value),d.renderBlock(l,r)};return n.jsxRuntimeExports.jsxs("div",{className:an.wrapper,children:[e!=="productId"&&n.jsxRuntimeExports.jsx(Lr,{}),!o&&s?n.jsxRuntimeExports.jsx("div",{className:an.main,children:Object.keys(s).map(f=>n.jsxRuntimeExports.jsx(kr,{block:s[f],render:p}))}):n.jsxRuntimeExports.jsx("div",{className:an.loading,children:n.jsxRuntimeExports.jsx(n.Loader,{})}),e!=="productId"&&n.jsxRuntimeExports.jsx(Pr,{})]})};function ti(){const{pages:e}=n.usePagesStore.getState();if(e){const t=Object.values(e).map(r=>({path:`${r.path}`,element:n.jsxRuntimeExports.jsx(nr,{pagePath:r.path})}));return t.push({path:"/product/:productPath",element:n.jsxRuntimeExports.jsx(nr,{pagePath:"productId"})}),t}else return[]}const ni="_buttons_1gn8m_1",ri="_button_1gn8m_1",oi={buttons:ni,button:ri},ai=()=>n.jsxRuntimeExports.jsxs("div",{className:oi.buttons,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUUpLeft",hoverable:!0,width:20,height:20}),n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUUpRight",hoverable:!0,width:20,height:20})]}),ii="_devices_hxl12_1",si="_device_hxl12_1",li="_active_hxl12_23",sn={devices:ii,device:si,active:li},ci=()=>{const{currentDevice:e,setCurrentDevice:t}=n.useDeviceStore();return n.jsxRuntimeExports.jsx("div",{className:sn.devices,children:Ka.map(r=>n.jsxRuntimeExports.jsx("div",{className:n.clx(sn.device,{[sn.active]:e===r}),onClick:()=>t(r),children:n.jsxRuntimeExports.jsx(n.Icon,{name:r.icon,fill:e===r?"#252525":"#757575",width:20,height:20})},r.value))})},ui="_header_zvaam_1",di="_left_zvaam_12",hi="_right_zvaam_13",Bt={header:ui,left:di,right:hi},fi="_preview_vijvm_2",pi="_active_vijvm_22",ln={preview:fi,active:pi},mi=()=>{const{onPreview:e,setOnPreview:t}=n.usePreviewStore();return n.jsxRuntimeExports.jsxs("div",{className:n.clx(ln.preview,{[ln.active]:e}),onClick:()=>t(!e),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUpRight",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:ln.text,children:"Preview"})]})},gi="_settings_q79q3_1",xi={settings:gi},vi="_language_1mbvp_1",Si="_text_1mbvp_11",rr={language:vi,text:Si},yi=()=>n.jsxRuntimeExports.jsxs("div",{className:rr.language,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Globe",fill:"#252525",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:rr.text,children:"Default"}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretDown",width:20,height:20})]}),bi="_pages_sf7rl_1",ji="_text_sf7rl_16",wi="_modal_sf7rl_22",Ci="_page_sf7rl_1",Ei="_hoverable_sf7rl_45",Ri="_separator_sf7rl_49",_i="_button_sf7rl_53",ki="_items_sf7rl_67",Se={pages:bi,default:"_default_sf7rl_5",text:ji,modal:wi,page:Ci,hoverable:Ei,separator:Ri,button:_i,items:ki},Pi=()=>{const{currentPage:e,setCurrentPage:t,setIsOpenModal:r,pages:o,setIsEdit:a,setEditedPage:s,deletePage:i,isOpenSelectModal:l,setIsOpenSelectModal:c}=n.usePagesStore(),{deletePage:p}=n.useLayersStore(),[f,d]=H.useState("");return H.useEffect(()=>{const m=()=>{c(!1)};return document.body.addEventListener("click",m),()=>{document.body.removeEventListener("click",m)}},[]),n.jsxRuntimeExports.jsxs("div",{className:Se.pages,children:[n.jsxRuntimeExports.jsxs("div",{className:Se.default,onClick:m=>{m.stopPropagation(),c(!l)},children:[n.jsxRuntimeExports.jsx(n.Icon,{name:o&&o[e]&&o[e].icon||"File",fill:"#252525",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:Se.text,children:o&&o[e]&&xt.includes(o[e].name)?`${me(o[e].name)} page`:o&&o[e]&&o[e].name}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretDown",width:20,height:20})]}),l&&n.jsxRuntimeExports.jsxs("div",{className:Se.modal,onClick:m=>m.stopPropagation(),children:[o&&n.jsxRuntimeExports.jsx("div",{className:Se.items,children:Object.keys(o).map(m=>{const v=o[m];return n.jsxRuntimeExports.jsxs("div",{className:n.clx(Se.page,{[Se.hoverable]:f===m}),onMouseEnter:()=>d(m),onMouseLeave:()=>d(""),onClick:()=>{d(""),a(!1),t(m),c(!1)},children:[n.jsxRuntimeExports.jsx(n.Icon,{name:v.icon,fill:"#252525"}),n.jsxRuntimeExports.jsx("span",{className:Se.text,children:xt.includes(v.name)?`${me(v.name)} page`:v.name}),f===m&&n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Gear",fill:"#757575",onClick:j=>{j.stopPropagation(),a(!0),s(m),r(!0)}}),!xt.includes(v.name)&&n.jsxRuntimeExports.jsx(n.Icon,{name:"Trash",fill:"#C12A2A",onClick:j=>{o[e].name===v.name&&t("home"),j.stopPropagation(),i(m),p(v.name),n.deletePage(v.path)}})]}),o[e]&&o[e].name===v.name&&n.jsxRuntimeExports.jsx(n.Icon,{name:"Check",fill:"#FF3F19"})]},m)})}),n.jsxRuntimeExports.jsx("div",{className:Se.separator}),n.jsxRuntimeExports.jsxs(n.Button,{className:Se.button,onClick:m=>{m.stopPropagation(),r(!0)},size:"l",children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Plus",fill:"#ff3f19"}),n.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},Li="_zoom_a77cn_1",Ni={zoom:Li},Di=()=>{const[e,t]=H.useState(),r=()=>{t(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return H.useEffect(()=>(r(),window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}),[]),n.jsxRuntimeExports.jsxs("div",{className:Ni.zoom,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"MagnifyingGlassMinus",width:20,height:20}),n.jsxRuntimeExports.jsxs("span",{children:[e," %"]})]})},Ti=()=>n.jsxRuntimeExports.jsxs("div",{className:xi.settings,children:[n.jsxRuntimeExports.jsx(yi,{}),n.jsxRuntimeExports.jsx(Pi,{}),n.jsxRuntimeExports.jsx(Di,{})]}),Bi="_theme_3wxbf_1",Ai={theme:Bi},Fi=()=>n.jsxRuntimeExports.jsxs("div",{className:Ai.theme,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Check",width:18,height:18}),n.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),Mi=()=>{const{themeSettings:e}=n.useThemeSettingsStore(),{settings:t}=n.useSettingsStore(),{isOpenSelectModal:r}=n.usePagesStore(),[o,a]=H.useState(null),[s,i]=H.useState(!1),{pages:l}=n.usePagesStore(),{blocks:c}=n.useLayersStore();function p(j,b){return b.map(E=>Object.values(E.value.blockSettings).filter(_=>_.type===j).map(_=>_.value).flat()).flat().map(E=>E.listingId)}function f(j,b){return p(j,b).some(E=>E)}function d(j,b){const w=p(j,b);return Array.isArray(w)&&w.length>0?Math.max(...w):0}function m(j){if(l){const b=Object.keys(l).find(w=>l[w].name===j);if(b)return l[b]}return null}const v=()=>{if(s)o&&clearTimeout(o);else{const b=Object.keys(c).map(w=>{const E=m(w);return{name:E?E.name:w,path:w==="home"?"/":(E==null?void 0:E.path)||w,layout:{...c[w]},neededProductIds:[...p("ProductId",Object.values(c[w]))],neededCategoryIds:[...p("CategoryId",Object.values(c[w]))],neededAnnouncementIds:[...p("AnnouncementId",Object.values(c[w]))],neededListingIds:[...p("listings",Object.values(c[w]))],neededFaqs:f("Faqs",Object.values(c[w])),neededReviewCount:d("ReviewCount",Object.values(c[w])),seo:{pageTitle:E&&E.seo?E.seo.title:"",pageDescription:E&&E.seo?E.seo.description:""}}});n.updateSettings("POST","save",{themeSettings:e,settings:t,updatedPages:b})}i(!0);const j=setTimeout(()=>{i(!1)},2e3);a(j)};return n.jsxRuntimeExports.jsxs("div",{className:Bt.header,style:{zIndex:r?5e4:50},children:[n.jsxRuntimeExports.jsxs("div",{className:Bt.left,children:[n.jsxRuntimeExports.jsx(ci,{}),n.jsxRuntimeExports.jsx(mi,{})]}),n.jsxRuntimeExports.jsx("div",{className:Bt.center,children:n.jsxRuntimeExports.jsx(Ti,{})}),n.jsxRuntimeExports.jsxs("div",{className:Bt.right,children:[n.jsxRuntimeExports.jsx(Fi,{}),n.jsxRuntimeExports.jsx(ai,{}),n.jsxRuntimeExports.jsx(n.Button,{onClick:v,children:"Save"})]})]})},Ii="_exit_2ce42_1",Oi="_text_2ce42_10",or={exit:Ii,text:Oi},Ui=()=>n.jsxRuntimeExports.jsxs("div",{className:or.exit,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"SignOut",width:20,height:20}),n.jsxRuntimeExports.jsx("span",{className:or.text,children:"Exit"})]}),Hi="_navbar_2ac63_1",$i="_main_2ac63_6",zi="_block_2ac63_13",Vi="_active_2ac63_30",At={navbar:Hi,main:$i,block:zi,active:Vi},Wi=()=>{const{activeBlock:e,setActiveBlock:t}=n.useNavbarStore(),{setActiveBlock:r}=n.useBlocksStore(),{setCurrentBlock:o}=n.useLayersStore(),{setActiveBlock:a}=n.useThemeSettingsStore();function s(i){r(null),t(i),o(null),a(null)}return n.jsxRuntimeExports.jsxs("div",{className:At.navbar,children:[n.jsxRuntimeExports.jsx(Ui,{}),n.jsxRuntimeExports.jsx("div",{className:At.main,children:n.navbarBlocks.map(i=>n.jsxRuntimeExports.jsxs("div",{className:n.clx(At.block,{[At.active]:e.icon===i.icon}),onClick:()=>s(i),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:i.icon,fill:e.icon===i.icon?"#252525":"#757575"}),n.jsxRuntimeExports.jsx("span",{children:i.name})]},i.icon))})]})},Gi="_preview_1q4f5_1",qi="_main_1q4f5_9",Ki="_content_1q4f5_19",Yi="_loading_1q4f5_26",Xi="_loader_1q4f5_34",Ji="_spin_1q4f5_1",Ft={preview:Gi,main:qi,content:Ki,loading:Yi,loader:Xi,spin:Ji},Qi="_header_1t64j_1",Zi="_circles_1t64j_14",es="_circle_1t64j_14",ts="_red_1t64j_30",ns="_green_1t64j_34",rs="_yellow_1t64j_38",os="_input_1t64j_42",as="_main_1t64j_51",is="_text_1t64j_59",Pe={header:Qi,circles:Zi,circle:es,red:ts,green:ns,yellow:rs,input:os,main:as,text:is},ss="data:image/svg+xml,%3csvg%20width='17'%20height='16'%20viewBox='0%200%2017%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3crect%20x='0.5'%20width='16'%20height='16'%20fill='url(%23pattern0_4042_718)'/%3e%3cdefs%3e%3cpattern%20id='pattern0_4042_718'%20patternContentUnits='objectBoundingBox'%20width='1'%20height='1'%3e%3cuse%20xlink:href='%23image0_4042_718'%20transform='scale(0.015625)'/%3e%3c/pattern%3e%3cimage%20id='image0_4042_718'%20width='64'%20height='64'%20xlink:href='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAONJREFUeF7t20EOhEAIRFG4/6F7DvEnYeFzryQIv6pBd2behOu9dPvsbog+k+NLgArQAqmJcw9iAAhSgZKB3IJkkAySQTJ4CiE+gA8oBeg0mH3Ai084P89HhqwEqIA209ICsQdjAeaZIgaAYKxBDMCAYy8fXwAIgiAIcoJpJEYGI4VjB3YrbC9gL2AvkCB43cM5PgZgAAZgQFnNZAhdGykQBEEQBEEQDBmgAm2glM/z+QUYisYUGoldO7kY32IEAzCg6RgIRgjFAsw+AgRBMNYgBmCAT2TCYfoPPz/HCqQCX1eBHzHnv7C7WhBSAAAAAElFTkSuQmCC'/%3e%3c/defs%3e%3c/svg%3e",ls=["red","yellow","green"],cs=()=>n.jsxRuntimeExports.jsxs("div",{className:Pe.header,children:[n.jsxRuntimeExports.jsx("div",{className:Pe.circles,children:ls.map(e=>n.jsxRuntimeExports.jsx("div",{className:n.clx(Pe.circle,{[Pe.red]:e==="red",[Pe.yellow]:e==="yellow",[Pe.green]:e==="green"})},e))}),n.jsxRuntimeExports.jsxs("div",{className:Pe.input,children:[n.jsxRuntimeExports.jsxs("div",{className:Pe.main,children:[n.jsxRuntimeExports.jsx("img",{src:ss,alt:""}),n.jsxRuntimeExports.jsx("span",{className:Pe.text,children:"lorem.ipsum"}),n.jsxRuntimeExports.jsx(n.Icon,{name:"Lock",fill:"#757575",width:15,height:16})]}),n.jsxRuntimeExports.jsx(n.Icon,{name:"Copy",width:20,height:20})]})]}),us="_content_1plo6_1",ds="_main_1plo6_8",hs="_block_1plo6_12",fs="_active_1plo6_19",ps="_name_1plo6_23",ms="_empty_1plo6_37",gs="_icon_1plo6_48",xs="_title_1plo6_59",vs="_text_1plo6_65",Ss="_sections_1plo6_71",ys="_section_1plo6_71",pt={content:us,main:ds,block:hs,active:fs,name:ps,empty:ms,icon:gs,title:xs,text:vs,sections:Ss,section:ys},bs="_sidebar_1f3hk_1",js="_content_1f3hk_12",ws="_button_1f3hk_22",Cs="_moveButton_1f3hk_30",Es="_border_1f3hk_34",Rs="_deleteButton_1f3hk_38",de={sidebar:bs,content:js,button:ws,moveButton:Cs,border:Es,deleteButton:Rs},_s=()=>{const{activeBlock:e}=n.usePreviewStore(),{blocks:t,removeBlock:r,moveBlock:o,duplicateBlock:a}=n.useLayersStore(),{currentPage:s,pages:i}=n.usePagesStore(),l=i&&i[s]?Object.keys(t[i[s].name]):[],c=l.indexOf(e),p=()=>{c>0&&i&&o(i[s].name,c,c-1)},f=()=>{c<l.length-1&&i&&o(i[s].name,c,c+1)},d=()=>{i&&a(i[s].name,e)};return n.jsxRuntimeExports.jsx("div",{className:de.sidebar,children:n.jsxRuntimeExports.jsxs("div",{className:de.content,children:[n.jsxRuntimeExports.jsx("button",{onClick:p,className:n.clx(de.button,de.moveButton),disabled:c===0,children:n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowUp"})}),n.jsxRuntimeExports.jsx("button",{onClick:f,className:n.clx(de.button,de.moveButton),disabled:c===l.length-1,children:n.jsxRuntimeExports.jsx(n.Icon,{name:"ArrowDown"})}),n.jsxRuntimeExports.jsx("div",{className:de.border}),n.jsxRuntimeExports.jsx("button",{onClick:d,className:n.clx(de.button,de.moveButton),children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Copy"})}),n.jsxRuntimeExports.jsx("div",{className:de.border}),n.jsxRuntimeExports.jsx("button",{onClick:()=>{i&&r(i[s].name,e)},className:n.clx(de.button,de.deleteButton),children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Trash",hoverable:!0})})]})})},ks=H.memo(()=>{const{setActiveBlock:e,activeBlock:t}=n.usePreviewStore(),{blocks:r,sourceBlocks:o}=n.useBlocksStore(),{blocks:a}=n.useLayersStore(),{settings:s}=n.useSettingsStore(),{currentPage:i,pages:l,setIsOpenSelectModal:c,pageContext:p}=n.usePagesStore(),f=H.useRef(t);H.useEffect(()=>{f.current=t},[t]),H.useEffect(()=>{const v=()=>{f.current&&e(null)};return document.body.addEventListener("click",v),()=>{document.body.removeEventListener("click",v)}},[]);const d=v=>{const j=new r[v.name];return Object.assign(j,v.value),j.renderBlock(s,p)};function m(v){if(o)return console.log(o,v),new o[v]().blockSettings.displayName}return n.jsxRuntimeExports.jsxs("div",{onClick:v=>{v.stopPropagation(),c(!1)},className:pt.content,children:[n.jsxRuntimeExports.jsx(Lr,{}),n.jsxRuntimeExports.jsx("div",{className:pt.main,children:l&&l[i]&&a[l[i].name]&&Object.keys(a[l[i].name]).map(v=>n.jsxRuntimeExports.jsxs("div",{onClick:()=>e(v),className:n.clx(pt.block,{[pt.active]:t===v}),children:[t===v&&n.jsxRuntimeExports.jsx("div",{className:pt.name,children:m(a[l[i].name][v].name)}),t===v&&n.jsxRuntimeExports.jsx(_s,{}),r&&n.jsxRuntimeExports.jsx(kr,{render:d,block:a[l[i].name][v]})]}))}),n.jsxRuntimeExports.jsx(Pr,{})]})}),Ps="_results_f488n_1",Ls="_name_f488n_8",Ns="_product_f488n_15",Mt={results:Ps,name:Ls,product:Ns},Ds="_search_1s0qp_1",Ts="_input_1s0qp_12",ar={search:Ds,input:Ts},Bs=()=>n.jsxRuntimeExports.jsxs("label",{className:ar.search,children:[n.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:ar.input}),n.jsxRuntimeExports.jsx(n.Icon,{name:"MagnifyingGlass",fill:"#757575"})]}),Nr=()=>{const{blocks:e,sourceBlocks:t,setActiveBlock:r}=n.useBlocksStore(),{hideModal:o}=n.useSubmodalStore();function a(l){r(l),o()}function s(l){if(t)return console.log(t,l),new t[l]().blockSettings.displayName}function i(l){if(t)return new t[l]().blockSettings.isAddable}return n.jsxRuntimeExports.jsxs("div",{className:Mt.add,children:[n.jsxRuntimeExports.jsx(Bs,{}),n.jsxRuntimeExports.jsx("div",{className:Mt.results,children:e&&Object.keys(e).map(l=>{if(i(l))return n.jsxRuntimeExports.jsxs("div",{className:Mt.product,onClick:()=>a(l),children:[n.jsxRuntimeExports.jsx("span",{className:Mt.name,children:s(l)}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretRight"})]},l)})})]})},As=()=>{const{modalPosition:e,color:t,initialColor:r,setShowModal:o,hue:a,saturation:s,brightness:i,dragging:l,setDragging:c,setHue:p,setSaturation:f,setBrightness:d,colorChange:m,setColor:v,update:j}=n.useColorPickerStore(),b=C=>{const{offsetX:N,offsetY:D}=C.nativeEvent;c(!0),_(N,D,C.currentTarget)},w=C=>{if(l){const N=document.querySelector(`.${n.styles.colorMap}`),{left:D,top:M}=N.getBoundingClientRect(),F=C.clientX-D,W=C.clientY-M;_(F,W,N)}},E=()=>{c(!1)},_=(C,N,D)=>{const{width:M,height:F}=D.getBoundingClientRect(),W=Math.max(0,Math.min(C/M*100,100)),le=Math.max(0,Math.min(100-N/F*100,100));f(W),d(le),B(W,le)},B=(C,N)=>{const D=$(a,C,N);m(D),v(D)},P=(C,N,D)=>{N/=100,D/=100;const M=Ce=>(Ce+C/60)%6,F=Ce=>D*(1-N*Math.max(0,Math.min(M(Ce),4-M(Ce),1))),W=Math.round(255*F(5)),le=Math.round(255*F(3)),we=Math.round(255*F(1));return{r:W,g:le,b:we}},V=(C,N,D)=>{const M=F=>F.toString(16).padStart(2,"0");return`#${M(C)}${M(N)}${M(D)}`},$=(C,N,D)=>{const{r:M,g:F,b:W}=P(C,N,D);return V(M,F,W)};H.useEffect(()=>{const C=D=>w(D),N=()=>E();return l?(document.addEventListener("mousemove",C),document.addEventListener("mouseup",N)):(document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",N)),()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",N)}},[l]);function G(){j(t),o(!1)}function g(){o(!1),m(r)}return n.jsxRuntimeExports.jsxs("div",{className:n.styles.modal,onClick:C=>C.stopPropagation(),style:{top:`${e.top}px`,left:`${e.left}px`},children:[n.jsxRuntimeExports.jsx("div",{children:"Color"}),n.jsxRuntimeExports.jsx("div",{className:n.styles.colorMap,onMouseDown:b,style:{background:`
34
34
  linear-gradient(to top, black, transparent),
35
35
  linear-gradient(to right, hsl(${a}, 100%, 100%), hsl(${a}, 100%, 50%))
36
- `},children:n.jsxRuntimeExports.jsx("div",{className:n.styles.indicator,style:{position:"absolute",left:`${s}%`,top:`${100-i}%`,transform:"translate(-50%, -50%)"}})}),n.jsxRuntimeExports.jsx("div",{className:n.styles.hueSlider,children:n.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:a,onChange:C=>{p(Number(C.target.value)),B(s,i)},className:n.styles.slider})}),n.jsxRuntimeExports.jsxs("div",{className:n.styles.buttons,children:[n.jsxRuntimeExports.jsx(n.Button,{onClick:g,className:n.clx(n.styles.applyButton,n.styles.cancelButton),children:"Cancel"}),n.jsxRuntimeExports.jsx(n.Button,{onClick:G,className:n.styles.applyButton,children:"Apply"})]})]})},Fs=()=>{const{onPreview:e}=n.usePreviewStore(),{isModalVisible:t}=n.useSubmodalStore(),{pageContext:r}=n.usePagesStore(),{showModal:o}=n.useColorPickerStore(),[a,s]=H.useState(!0);return H.useEffect(()=>{e&&r.general&&setTimeout(()=>{s(!1)},100)},[e,r]),n.jsxRuntimeExports.jsxs("div",{className:Ft.preview,children:[t&&n.jsxRuntimeExports.jsx(n.Submodal,{children:n.jsxRuntimeExports.jsx(Nr,{})}),o&&n.jsxRuntimeExports.jsx(As,{}),e&&n.jsxRuntimeExports.jsxs("div",{className:Ft.main,children:[n.jsxRuntimeExports.jsx(cs,{}),n.jsxRuntimeExports.jsx("div",{className:Ft.content,children:a?n.jsxRuntimeExports.jsx("div",{className:Ft.loading,children:n.jsxRuntimeExports.jsx(n.Loader,{})}):n.jsxRuntimeExports.jsx(ks,{})})]})]})},Ms="_sidebar_96mlz_1",Is="_title_96mlz_10",Os="_active_96mlz_18",ir={sidebar:Ms,title:Is,active:Os},Us="_layers_62wod_1",Hs="_block_62wod_8",$s="_dragging_62wod_23",zs="_active_62wod_31",Vs="_add_62wod_35",Ws="_button_62wod_47",Gs="_empty_62wod_60",qs="_title_62wod_72",Ks="_icon_62wod_79",Ys="_text_62wod_83",Xs="_highlight_62wod_89",nt={layers:Us,block:Hs,dragging:$s,active:zs,add:Vs,button:Ws,empty:Gs,title:qs,icon:Ks,text:Ys,highlight:Xs},Js="_block_1d6lb_1",sr={block:Js},Qs=()=>{const{setCurrentBlock:e}=n.useLayersStore(),{activeBlock:t}=n.usePreviewStore();function r(o){e(o)}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(sr.block,{[sr.active]:t==="header"}),onClick:()=>r("header"),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Cards"}),n.jsxRuntimeExports.jsx("span",{children:"Header"})]})},Zs="_block_1d6lb_1",lr={block:Zs},el=()=>{const{activeBlock:e}=n.usePreviewStore(),{setCurrentBlock:t}=n.useLayersStore();function r(o){t(o)}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(lr.block,{[lr.active]:e==="footer"}),onClick:()=>r("footer"),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Cards"}),n.jsxRuntimeExports.jsx("span",{children:"Footer"})]})},tl=({id:e,name:t,index:r,moveBlock:o,onClick:a})=>{const{currentPage:s,pages:i}=n.usePagesStore(),{activeBlock:l}=n.usePreviewStore(),{showPreview:c,hidePreview:p,showModal:f,hideModal:h,clearHideTimeout:m,startHideTimeout:v,hoverBlockId:j,isModalVisible:y}=n.useSubmodalStore(),{setPositionBlock:w}=n.useLayersStore(),[E,_]=H.useState(!1),B=()=>{y&&h(),c(e),_(!0),m()},P=C=>{C.stopPropagation(),p(),f(e),m(),w(r+1)},V=()=>{y?v():(_(!1),p())};H.useEffect(()=>{y||_(!1)},[y]);const[,$]=n.useDrop({accept:"block",hover(C){C.index!==r&&i&&(o(i[s].name,C.index,r),C.index=r)}}),[{isDragging:G},g]=n.useDrag({type:"block",item:{id:e,index:r},collect:C=>({isDragging:C.isDragging()})});return n.jsxRuntimeExports.jsxs("div",{ref:C=>g($(C)),className:n.clx(nt.block,{[nt.dragging]:G,[nt.active]:!G&&l===e}),onClick:()=>a(e),onMouseEnter:B,onMouseLeave:V,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Cards"}),n.jsxRuntimeExports.jsx("span",{children:t}),(E||j===e)&&!G&&n.jsxRuntimeExports.jsx("div",{className:nt.add,children:n.jsxRuntimeExports.jsx("button",{className:nt.button,onClick:C=>P(C),children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Plus",fill:"#fff"})})})]})},nl=()=>{const{blocks:e,setCurrentBlock:t,moveBlock:r}=n.useLayersStore(),{currentPage:o,pages:a}=n.usePagesStore(),{setMouseOverModal:s,setHoverBlockId:i}=n.useSubmodalStore();function l(f){t(f),s(!1),i(null)}const{sourceBlocks:c}=n.useBlocksStore();function p(f){if(c)return console.log(c,f),new c[f]().blockSettings.displayName}return n.jsxRuntimeExports.jsxs("div",{className:nt.layers,children:[n.jsxRuntimeExports.jsx(Qs,{}),n.jsxRuntimeExports.jsx(n.DndProvider,{backend:n.HTML5Backend,children:n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:a&&a[o]&&e[a[o].name]&&Object.keys(e[a[o].name]).map((f,h)=>n.jsxRuntimeExports.jsx(tl,{id:f,name:p(e[a[o].name][f].name),index:h,moveBlock:r,onClick:l},f))})}),n.jsxRuntimeExports.jsx(el,{})]})},rl=({isHeader:e})=>{const{header:t,footer:r}=n.useLayersStore(),{pageContext:o}=n.usePagesStore();return e?t==null?void 0:t.renderSettings(o):r==null?void 0:r.renderSettings(o)},ol=()=>{const{settings:e}=n.useSettingsStore();return e==null?void 0:e.renderSettings()},al="_theme_1xj36_1",il="_block_1xj36_6",sl="_name_1xj36_20",cn={theme:al,block:il,name:sl},ll=()=>{const{setActiveBlock:e}=n.useThemeSettingsStore();function t(r){e(r)}return n.jsxRuntimeExports.jsx("div",{className:cn.theme,children:Ya.map(r=>n.jsxRuntimeExports.jsxs("div",{onClick:()=>t(r),className:n.clx(cn.block),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:r.icon}),n.jsxRuntimeExports.jsx("span",{className:cn.name,children:r.name}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretRight"})]},r.icon))})},cl="_back_y3z55_1",ul="_render_y3z55_8",dl="_open_y3z55_23",hl="_close_y3z55_50",fl="_clicked_y3z55_54",pl="_title_y3z55_58",ml="_button_y3z55_66",gl="_loading_y3z55_71",xl="_settings_y3z55_75",vl="_deleteButton_y3z55_81",ye={back:cl,render:ul,open:dl,close:hl,clicked:fl,title:pl,button:ml,loading:gl,settings:xl,deleteButton:vl},Sl=({block:e})=>{if(!e)return null;const{pageContext:t}=n.usePagesStore();return e.renderSettings(t)},yl=e=>{var D;const{isAdd:t}=e,[r,o]=H.useState(!1),{setActiveBlock:a}=n.useNavbarStore(),{sourceBlocks:s,activeBlock:i,setActiveBlock:l,currentInstance:c,setCurrentInstance:p}=n.useBlocksStore(),{blocks:f,addBlock:h,editBlock:m,currentBlock:v,setCurrentBlock:j,removeBlock:y,setPositionBlock:w,setHeader:E,setFooter:_,header:B,footer:P}=n.useLayersStore(),{currentPage:V,pages:$}=n.usePagesStore();function G(M=!1){if(!t&&$&&c&&!M){const F={blockSettings:{}};Object.keys(c.blockSettings).filter(W=>!["displayName","isAddable"].includes(W)).map(W=>{F.blockSettings[W]=c.blockSettings[W]}),m($[V].name,v,{name:f[$[V].name][v].name,value:F})}l(null),j(null),setTimeout(()=>{o(!1)},150),p(null)}function g(){G(),a({name:"Layers",icon:"TreeStructure"}),p(null)}function C(){if(t)return new s[i];if($){const M=f[$[V].name][v];return new s[M.name](M.value.blockSettings)}}H.useEffect(()=>{if(i||v&&!["header","footer"].includes(v)){const M=C();p(M)}else p(null)},[i,v]),H.useEffect(()=>{v==="header"&&E(B)},[v,B]),H.useEffect(()=>{v==="footer"&&_(P)},[v,P]);function N(M){if(s&&M)return console.log(s,M),new s[M]().blockSettings.displayName}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(ye.render,{[ye.open]:v||i,[ye.close]:!v&&!i,[ye.clicked]:r}),children:[n.jsxRuntimeExports.jsxs("div",{className:ye.back,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:()=>G()}),n.jsxRuntimeExports.jsx("h3",{className:ye.title,children:i&&N(i)||$&&$[V]&&f[$[V].name]&&N((D=f[$[V].name][v])==null?void 0:D.name)||v&&me(v)||"Loading"}),!t&&$&&!["header","footer"].includes(v)&&n.jsxRuntimeExports.jsx("button",{onClick:()=>{o(!0),y($[V].name,v),G(!0)},className:ye.deleteButton,children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Trash",hoverable:!0})})]}),n.jsxRuntimeExports.jsxs("div",{className:ye.settings,children:[c&&n.jsxRuntimeExports.jsx(Sl,{block:c}),v&&["header","footer"].includes(v)&&n.jsxRuntimeExports.jsx(rl,{isHeader:v==="header"}),!i&&!v&&n.jsxRuntimeExports.jsx("div",{className:ye.loading,children:"Loading"})]}),t&&n.jsxRuntimeExports.jsx("div",{className:ye.addButton,children:n.jsxRuntimeExports.jsx(n.Button,{style:{width:"100%"},onClick:()=>{if(o(!0),!["header","footer"].includes(v)&&$){const M={blockSettings:{}};Object.keys(c.blockSettings).filter(F=>!["displayName","isAddable"].includes(F)).map(F=>{M.blockSettings[F]=c.blockSettings[F]}),h($[V].name,{name:i,value:M}),w(null)}else v==="header"?E(B):_(P);g()},children:"Add Section"})})]})},bl="_settings_1r85j_1",jl="_open_1r85j_16",wl="_close_1r85j_20",Cl="_header_1r85j_24",El="_title_1r85j_30",Rl="_addButton_1r85j_37",mt={settings:bl,open:jl,close:wl,header:Cl,title:El,addButton:Rl},_l="_wrapper_n1a7x_1",kl="_category_n1a7x_5",Pl="_categoryTitle_n1a7x_10",Ll="_color_n1a7x_16",Nl="_content_n1a7x_24",Dl="_preview_n1a7x_32",Qe={wrapper:_l,category:kl,categoryTitle:Pl,color:Ll,content:Nl,preview:Dl},Tl=()=>{const{themeSettings:e,updateColor:t}=n.useThemeSettingsStore();async function r(a,s,i){t(a,s,i)}const o=H.useMemo(()=>{const a={};return Object.entries(e.colors).forEach(([s,i])=>{Object.entries(i).forEach(([l,c])=>{a[c]||(a[c]=[]),a[c].push(`${s}-${l}`)})}),Object.keys(a).filter(s=>a[s].length>1)},[e.colors]);return n.jsxRuntimeExports.jsx("div",{className:Qe.wrapper,children:Object.entries(e.colors).map(([a,s])=>n.jsxRuntimeExports.jsxs("div",{className:Qe.category,children:[n.jsxRuntimeExports.jsx("h2",{className:Qe.categoryTitle,children:me(a)}),Object.entries(s).map(([i,l])=>n.jsxRuntimeExports.jsxs("div",{className:Qe.color,children:[n.jsxRuntimeExports.jsxs("div",{className:Qe.content,children:[n.jsxRuntimeExports.jsx("div",{className:Qe.preview,style:{background:l}}),n.jsxRuntimeExports.jsx(n.ColorPicker,{title:me(i),initialColor:l,onChange:c=>r(a,i,c)})]}),o.includes(l)&&n.jsxRuntimeExports.jsx(n.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},i))]},a))})},Bl="_wrapper_kb55x_2",Al="_category_kb55x_6",Fl="_categoryTitle_kb55x_11",Ml="_color_kb55x_17",Il="_name_kb55x_23",Ol="_content_kb55x_28",Ul="_label_kb55x_34",Hl="_input_kb55x_45",$l="_title_kb55x_71",zl="_field_kb55x_79",Vl="_alignments_kb55x_89",Wl="_lineField_kb55x_95",Gl="_style_kb55x_101",ql="_header_kb55x_108",be={wrapper:Bl,category:Al,categoryTitle:Fl,color:Ml,name:Il,content:Ol,label:Ul,input:Hl,title:$l,field:zl,alignments:Vl,lineField:Wl,style:Gl,header:ql},Kl=["left","center","right"],Yl=["solid","dashed"],It=e=>{const{title:t,children:r,rightAddon:o}=e;return n.jsxRuntimeExports.jsxs("div",{className:be.field,children:[n.jsxRuntimeExports.jsxs("div",{className:be.header,children:[n.jsxRuntimeExports.jsx("h4",{children:t}),o]}),r]})},Xl=()=>{const{themeSettings:e,updateInput:t}=n.useThemeSettingsStore(),r=H.useMemo(()=>e.inputs,[e]),o=(s,i,l)=>{t(s,i,l)},a=s=>i=>{t(s,i,"color")};return n.jsxRuntimeExports.jsxs("div",{className:be.wrapper,children:[n.jsxRuntimeExports.jsxs(It,{title:"General",children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Height (px)",value:String(r.general.height),onChange:s=>o("general",s,"height"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Input,{label:"Style name",value:r.general.name,onChange:s=>o("general",s,"name")}),n.jsxRuntimeExports.jsx(n.Select,{label:"Font Size (px)",onChange:s=>o("general",s,"size"),value:String(r.general.size),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.general.color),onChange:a("general"),title:"Font Color",labelStyle:"secondary"})]}),n.jsxRuntimeExports.jsxs(It,{title:"Field Fill",rightAddon:n.jsxRuntimeExports.jsx("div",{className:be.switch,children:n.jsxRuntimeExports.jsx(n.Switch,{onChange:s=>o("field",s,"active"),current:r.field.active})}),children:[n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.field.color),onChange:a("field"),title:"Color",labelStyle:"secondary"}),n.jsxRuntimeExports.jsx(n.Input,{label:"Opacity (%)",value:String(r.field.opacity),onChange:s=>o("field",s,"opacity"),type:"number",min:0})]}),n.jsxRuntimeExports.jsxs(It,{title:"Border",rightAddon:n.jsxRuntimeExports.jsx("div",{className:be.switch,children:n.jsxRuntimeExports.jsx(n.Switch,{onChange:s=>o("border",s,"active"),current:r.border.active})}),children:[n.jsxRuntimeExports.jsxs("div",{className:be.lineField,children:[n.jsxRuntimeExports.jsxs("div",{className:be.style,children:[n.jsxRuntimeExports.jsx("span",{className:be.title,children:"Style"}),n.jsxRuntimeExports.jsx(n.Picker,{items:Yl,selectedItem:r.border.style,onSelect:s=>o("border",s,"style"),getIconName:s=>s==="solid"?"Minus":"Selection"})]}),n.jsxRuntimeExports.jsx(n.Input,{label:"Radius (px)",value:String(r.border.radius),onChange:s=>o("border",s,"radius"),type:"number",min:0})]}),n.jsxRuntimeExports.jsx(n.Input,{label:"Thickness (px)",value:String(r.border.thickness),onChange:s=>o("border",s,"thickness"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.border.color),onChange:a("border"),title:"Color",labelStyle:"secondary"})]}),n.jsxRuntimeExports.jsxs(It,{title:"Label",children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Line Height (px)",value:String(r.label.height),onChange:s=>o("label",s,"height"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Select,{label:"Font Size (px)",onChange:s=>o("label",s,"size"),value:String(r.label.size),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.label.color),onChange:a("label"),title:"Color",labelStyle:"secondary"}),n.jsxRuntimeExports.jsxs("div",{className:be.alignments,children:[n.jsxRuntimeExports.jsx("h4",{className:be.title,children:"Alignment Type"}),n.jsxRuntimeExports.jsx(n.Picker,{items:Kl,selectedItem:r.label.alignment,onSelect:s=>o("label",s,"alignment"),getIconName:s=>s==="center"?"AlignCenterHorizontal":s==="left"?"AlignLeft":"AlignRight"})]})]})]})},Jl="_wrapper_k9on2_1",Ql="_category_k9on2_5",Zl="_categoryTitle_k9on2_10",ec="_font_k9on2_16",tc="_content_k9on2_36",nc="_icon_k9on2_42",rc="_paragraph_k9on2_51",oc="_deleteIcon_k9on2_55",ac="_iconButton_k9on2_62",Le={wrapper:Jl,category:Ql,categoryTitle:Zl,font:ec,content:tc,icon:nc,paragraph:rc,deleteIcon:oc,iconButton:ac},ic=e=>{const{font:t,size:r,id:o,category:a}=e,{setActiveFont:s}=n.useThemeSettingsStore();return n.jsxRuntimeExports.jsxs("div",{className:Le.font,onClick:()=>s(o),children:[n.jsxRuntimeExports.jsx("div",{className:n.clx(Le.icon,{[Le.paragraph]:a==="paragraph"}),children:n.jsxRuntimeExports.jsx(n.Icon,{name:a==="paragraph"?"TextB":"TextH"})}),n.jsxRuntimeExports.jsxs("div",{className:Le.content,children:[n.jsxRuntimeExports.jsx("h2",{className:Le.categoryTitle,children:me(o)}),n.jsxRuntimeExports.jsx("span",{className:Le.value,children:`${t}, ${r}px`})]})]})},sc=()=>{const{themeSettings:e,setActiveFont:t,activeBlock:r}=n.useThemeSettingsStore();H.useEffect(()=>(o(),()=>{o()}),[]);function o(){t(null)}if(r!=null&&r.name)return n.jsxRuntimeExports.jsx("div",{className:Le.wrapper,children:Object.entries(e.fonts).map(([a,s])=>n.jsxRuntimeExports.jsxs("div",{className:Le.category,children:[n.jsxRuntimeExports.jsx("h2",{className:Le.categoryTitle,children:me(a)}),Object.entries(s).map(([i,l])=>n.jsxRuntimeExports.jsx(ic,{id:i,category:a,...l},i))]},a))})},lc="_wrapper_94fpv_1",cc="_open_94fpv_16",uc="_close_94fpv_20",dc="_header_94fpv_24",hc="_title_94fpv_31",fc="_options_94fpv_37",pc="_clicked_94fpv_44",Ze={wrapper:lc,open:cc,close:uc,header:dc,title:hc,options:fc,clicked:pc},mc=()=>{const{activeBlock:e,setActiveFont:t,activeFont:r,themeSettings:o,updateFont:a}=n.useThemeSettingsStore(),{fonts:s}=n.useFontsStore(),[i,l]=H.useState(null);function c(){t(null)}function p(h,m){i&&r&&a(i,r,m,h)}const f=H.useMemo(()=>r?o.fonts.heading[r]?(l("heading"),o.fonts.heading[r]):o.fonts.paragraph[r]?(l("paragraph"),o.fonts.paragraph[r]):(l(null),null):null,[r,o]);return n.jsxRuntimeExports.jsxs("div",{className:n.clx(Ze.wrapper,{[Ze.open]:(e==null?void 0:e.name)==="Fonts"&&r,[Ze.close]:(e==null?void 0:e.name)!=="Fonts"||!r}),children:[n.jsxRuntimeExports.jsxs("div",{className:Ze.header,onClick:c,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0}),n.jsxRuntimeExports.jsx("span",{className:Ze.title,children:"Font Style"})]}),r&&f&&n.jsxRuntimeExports.jsxs("div",{className:Ze.options,children:[n.jsxRuntimeExports.jsx(n.Select,{label:"Font",value:f.font,onChange:h=>p(h,"font"),options:[...s.filter(h=>h!==f.font)]}),n.jsxRuntimeExports.jsx(n.Select,{label:"Size",value:String(f.size),onChange:h=>p(h,"size"),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.Select,{label:"Weight",value:String(f.weight),onChange:h=>p(h,"weight"),options:n.weightOptions})]})]})},gc="_wrapper_94fpv_1",xc="_open_94fpv_16",vc="_close_94fpv_20",Sc="_header_94fpv_24",yc="_title_94fpv_31",bc="_options_94fpv_37",jc="_clicked_94fpv_44",et={wrapper:gc,open:xc,close:vc,header:Sc,title:yc,options:bc,clicked:jc},Dr=()=>{const{activeBlock:e,themeSettings:t,updateBorder:r,setActiveBlock:o}=n.useThemeSettingsStore();function a(l,c){r(c,l)}function s(){o(null)}const i=H.useMemo(()=>t.borders,[t]);return n.jsxRuntimeExports.jsxs("div",{className:n.clx(et.wrapper,{[et.open]:(e==null?void 0:e.name)==="Borders",[et.close]:(e==null?void 0:e.name)!=="Borders"}),children:[n.jsxRuntimeExports.jsxs("div",{className:et.header,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:s}),n.jsxRuntimeExports.jsx("span",{className:et.title,children:"Borders Style"})]}),n.jsxRuntimeExports.jsxs("div",{className:et.options,children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Border Radius (px)",value:String(i.radius),onChange:l=>a(Number(l),"radius"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Input,{label:"Border Thickness (px)",value:String(i.thickness),onChange:l=>a(Number(l),"thickness"),type:"number",min:0})]})]})},wc="_wrapper_1j33r_1",Cc="_open_1j33r_16",Ec="_close_1j33r_20",Rc="_header_1j33r_24",_c="_title_1j33r_31",kc="_options_1j33r_37",Pc="_clicked_1j33r_44",Lc="_label_1j33r_48",Nc="_alignments_1j33r_55",Dc="_blocks_1j33r_61",Tc="_alignment_1j33r_55",Bc="_active_1j33r_75",he={wrapper:wc,open:Cc,close:Ec,header:Rc,title:_c,options:kc,clicked:Pc,label:Lc,alignments:Nc,blocks:Dc,alignment:Tc,active:Bc},Ac=["left","center","right"],Tr=()=>{const{activeBlock:e,themeSettings:t,updateButton:r,setActiveBlock:o}=n.useThemeSettingsStore();function a(l,c){r(c,l)}function s(){o(null)}const i=H.useMemo(()=>t.buttons,[t]);return n.jsxRuntimeExports.jsxs("div",{className:n.clx(he.wrapper,{[he.open]:(e==null?void 0:e.name)==="Buttons",[he.close]:(e==null?void 0:e.name)!=="Buttons"}),children:[n.jsxRuntimeExports.jsxs("div",{className:he.header,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:s}),n.jsxRuntimeExports.jsx("span",{className:he.title,children:"Buttons Style"})]}),i&&n.jsxRuntimeExports.jsxs("div",{className:he.options,children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Height (px)",value:String(i.height),onChange:l=>a(l,"height"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Select,{label:"Font Size (px)",value:String(i.size),onChange:l=>a(l,"size"),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.Input,{label:"Border Radius (px)",value:String(i.radius),onChange:l=>a(Number(l),"radius"),type:"number",min:0}),n.jsxRuntimeExports.jsxs("div",{className:he.alignments,children:[n.jsxRuntimeExports.jsx("h4",{className:he.label,children:"Alignment Type"}),n.jsxRuntimeExports.jsx("div",{className:he.blocks,children:Ac.map(l=>n.jsxRuntimeExports.jsx("div",{className:n.clx(he.alignment,{[he.active]:i.alignment===l}),onClick:()=>{a(l,"alignment")},children:n.jsxRuntimeExports.jsx(n.Icon,{name:l==="center"?"AlignCenterHorizontal":l==="left"?"AlignLeft":"AlignRight",fill:i.alignment===l?"#252525":"#757575"})},l))})]})]})]})},Fc=()=>{const{activeBlock:e}=n.useThemeSettingsStore();return n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[(e==null?void 0:e.name)==="Fonts"&&n.jsxRuntimeExports.jsx(mc,{}),(e==null?void 0:e.name)==="Borders"&&n.jsxRuntimeExports.jsx(Dr,{}),(e==null?void 0:e.name)==="Buttons"&&n.jsxRuntimeExports.jsx(Tr,{})]})},Mc=()=>{const{activeBlock:e,setActiveBlock:t}=n.useThemeSettingsStore(),{activeBlock:r}=n.useNavbarStore();function o(){t(null)}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(mt.settings,{[mt.open]:e,[mt.close]:!e||r.name!=="Theme"}),children:[n.jsxRuntimeExports.jsxs("div",{className:mt.header,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:o}),n.jsxRuntimeExports.jsx("span",{className:mt.title,children:e==null?void 0:e.name})]}),(e==null?void 0:e.name)==="Fonts"&&n.jsxRuntimeExports.jsx(sc,{}),(e==null?void 0:e.name)==="Colors"&&n.jsxRuntimeExports.jsx(Tl,{}),(e==null?void 0:e.name)==="Inputs"&&n.jsxRuntimeExports.jsx(Xl,{}),(e==null?void 0:e.name)==="Borders"&&n.jsxRuntimeExports.jsx(Dr,{}),(e==null?void 0:e.name)==="Borders"&&n.jsxRuntimeExports.jsx(Tr,{}),n.jsxRuntimeExports.jsx(Fc,{})]})},Ic=()=>{const{activeBlock:e}=n.useNavbarStore(),{activeBlock:t}=n.useBlocksStore();function r(){switch(e.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return n.jsxRuntimeExports.jsxs("div",{className:ir.sidebar,children:[n.jsxRuntimeExports.jsx("h3",{className:ir.title,children:r()}),e.name==="Layers"&&n.jsxRuntimeExports.jsx(nl,{}),e.name==="Add"&&n.jsxRuntimeExports.jsx(Nr,{}),n.jsxRuntimeExports.jsx(yl,{isAdd:!!t}),n.jsxRuntimeExports.jsx(Mc,{}),e.name==="Theme"&&n.jsxRuntimeExports.jsx(ll,{}),e.name==="Settings"&&n.jsxRuntimeExports.jsx(ol,{})]})},Oc="_wrapper_jjfwh_1",Uc="_header_jjfwh_12",Hc="_content_jjfwh_21",$c="_buttons_jjfwh_29",zc="_cancel_jjfwh_35",Vc="_label_jjfwh_40",Wc="_description_jjfwh_41",Gc="_preview_jjfwh_49",qc="_block_jjfwh_55",Kc="_slug_jjfwh_63",Yc="_title_jjfwh_69",fe={wrapper:Oc,header:Uc,content:Hc,buttons:$c,cancel:zc,label:Vc,description:Wc,preview:Gc,block:qc,slug:Kc,title:Yc},Xc=()=>{var G,g,C,N,D,M;const{setIsOpenModal:e,pages:t,createPage:r,updatePage:o,isEdit:a,setIsEdit:s,editedPage:i,setEditedPage:l}=n.usePagesStore(),{createPage:c,updatePage:p}=n.useLayersStore(),[f,h]=H.useState(i?t&&((G=t[i])==null?void 0:G.path):""),[m,v]=H.useState(i?t&&((g=t[i])==null?void 0:g.name):""),[j,y]=H.useState(i?t&&((C=t[i])==null?void 0:C.seo.description):""),[w,E]=H.useState(i?t&&((N=t[i])==null?void 0:N.visibility):"public");function _(){h(""),v(""),y(""),E("public"),s(!1),l(null)}function B(){_(),e(!1)}function P(F){return F[0]==="/"?F:"/"+F}function V(){r({path:P(f),name:m||f||"",icon:"File",seo:{title:m||"",description:j||""},visibility:w||"public"}),c(m),B()}function $(){t&&(p(t[i].name||"",m||f||""),o(i,{path:P(f),name:m||f,icon:t[i].icon||"File",seo:{title:m||"",description:j||""},visibility:w||"public"})),B()}return n.jsxRuntimeExports.jsxs("div",{className:fe.wrapper,onClick:F=>F.stopPropagation(),children:[n.jsxRuntimeExports.jsxs("div",{className:fe.header,children:[n.jsxRuntimeExports.jsxs("h2",{children:[a?"Edit":"Create"," Blank Page"]}),n.jsxRuntimeExports.jsx(n.Icon,{name:"X",fill:"#757575",hoverable:!0,onClick:B})]}),n.jsxRuntimeExports.jsxs("div",{className:fe.content,children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Page Slug",onChange:F=>h(F),value:f,placeholder:"path-to-page",disabled:!!(i&&t&&((D=t[i])!=null&&D.name)&&xt.includes(t[i].name)),required:!0,regex:"^.+$"}),n.jsxRuntimeExports.jsx(n.Input,{label:"Page Title",onChange:F=>v(F),value:m,placeholder:"Contact us",disabled:!!(i&&t&&((M=t[i])!=null&&M.name)&&xt.includes(t[i].name))}),n.jsxRuntimeExports.jsx(n.Textarea,{label:"Description",onChange:F=>y(F),value:j,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),n.jsxRuntimeExports.jsx(n.Radio,{label:"Visibility",defaultValue:w,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:F=>E(F)}),n.jsxRuntimeExports.jsxs("div",{className:fe.preview,children:[n.jsxRuntimeExports.jsx("span",{className:fe.label,children:"Preview"}),n.jsxRuntimeExports.jsxs("div",{className:fe.block,children:[n.jsxRuntimeExports.jsx("span",{className:fe.slug,children:f||"yoursite.url"}),n.jsxRuntimeExports.jsx("span",{className:fe.title,children:m||"My Blank Page"}),n.jsxRuntimeExports.jsx("span",{className:fe.description,children:j||"It is My Description"})]})]})]}),n.jsxRuntimeExports.jsxs("div",{className:fe.buttons,children:[n.jsxRuntimeExports.jsx(n.Button,{className:fe.cancel,onClick:B,children:"Cancel"}),n.jsxRuntimeExports.jsx(n.Button,{onClick:a?$:V,disabled:f.length===0,children:a?"Update":"Create"})]})]})},Jc="_layout_vvs1k_1",Qc="_main_vvs1k_8",Zc="_content_vvs1k_15",un={layout:Jc,main:Qc,content:Zc},eu=()=>{const{isOpenModal:e,setIsOpenModal:t}=n.usePagesStore(),{openModal:r,setOpenModal:o}=n.useChooseImageStore();return n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsxs("div",{className:un.layout,children:[n.jsxRuntimeExports.jsx(Wi,{}),n.jsxRuntimeExports.jsxs("main",{className:un.main,children:[n.jsxRuntimeExports.jsx(Mi,{}),n.jsxRuntimeExports.jsxs("div",{className:un.content,children:[n.jsxRuntimeExports.jsx(Ic,{}),n.jsxRuntimeExports.jsx(Fs,{})]})]})]}),e&&n.jsxRuntimeExports.jsx(n.Modal,{close:t,children:n.jsxRuntimeExports.jsx(Xc,{})}),r&&n.jsxRuntimeExports.jsx(n.Modal,{close:o,children:n.jsxRuntimeExports.jsx(n.ChooseImageModal,{})})]})};async function tt(e,t){const r=localStorage.getItem("shopId")||void 0,o=`${n.API_URL}/${e}/builder/shops/${r}/${t}`,a=localStorage.getItem("accessToken")||void 0;return(await n.axios.get(o,{headers:{Authorization:`Bearer ${a}`}})).data}async function tu(){try{const[e,t,r,o,a,s]=await Promise.allSettled([tt("v1","general"),tt("v1","faqs"),tt("v1","listings"),tt("v1","products"),tt("v1","reviews"),tt("v1","categories")]);return{general:e,faqs:t,listings:r,products:o,reviews:a,categories:s}}catch(e){throw console.error("Error fetching page data:",e),e}}async function nu(){try{const{data:e}=await n.axios.get(`${n.GOOGLE_FONTS_API}?key=AIzaSyAEsTbjAPUz_TeuFCq4z4LPK9w_vst0Pfw`);return e.items}catch(e){throw console.error("Error fetching page data:",e),e}}function ru(){const{editBlock:e,currentBlock:t,blocks:r,header:o,setHeader:a,footer:s,setFooter:i}=n.useLayersStore.getState(),{currentPage:l,pages:c}=n.usePagesStore.getState(),{currentInstance:p,activeBlock:f}=n.useBlocksStore.getState();if(!f&&p&&c){t==="header"&&a(o),t==="footer"&&i(s);const h={blockSettings:{}};Object.keys(p.blockSettings).filter(m=>!["displayName","isAddable"].includes(m)).map(m=>{h.blockSettings[m]=p.blockSettings[m]}),e(c[l].name,t,{name:r[c[l].name][t].name,value:h})}}async function ou(){const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${n.API_URL}/v2/builder/shops/${e}/drafts/${t}/pages`,o=localStorage.getItem("accessToken");return(await n.axios.get(r,{headers:{Authorization:`Bearer ${o}`}})).data}const au=e=>{const{blocks:t,settings:r,header:o,footer:a}=e,{setBlocks:s,setSourceBlocks:i}=n.useBlocksStore(),{fonts:l,setFonts:c}=n.useFontsStore(),{setSettings:p}=n.useSettingsStore(),{setPageContext:f,setPages:h,setCurrentPage:m}=n.usePagesStore(),{blocks:v,setHeader:j,setFooter:y,createPage:w}=n.useLayersStore();function E(_){return _[0]==="/"?_.slice(1):_}return H.useEffect(()=>{const _={};Object.keys(t).map(P=>{_[P]=t[P]}),i(_),s(_),j(o),y(a),p(r),(async()=>{if(l.length===0){const G=await nu();c([...G.map(g=>g.family)])}let P={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null};const V=await tu();Object.keys(V).map(G=>{const g=G;P[g]=V[g].value.data}),f(P);const $=await ou();if($.data.length>0){const G={};m($.data[0].name),$.data.forEach(g=>{const C=E(g.path);v[C]||w(C),g.path==="/"?G.home={...g,icon:on.home.icon,name:"home"}:on[C]?G[C]={...g,icon:on[C].icon,name:C}:G[C]={...g,icon:"File",name:C}}),h(G)}})()},[]),n.jsxRuntimeExports.jsx(eu,{})},iu=e=>{const{blocks:t,settings:r,header:o,footer:a}=e,[s,i]=H.useState(!0),l=jr();return H.useEffect(()=>{i(!0),Ja()?i(!1):l("/")},[]),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:s?n.jsxRuntimeExports.jsx(n.Loader,{}):n.jsxRuntimeExports.jsx(au,{blocks:t,settings:r,header:o,footer:a})})},su=e=>{const{blocks:t,settings:r,header:o,footer:a}=e,[s,i]=H.useState(null),{setBlocks:l,setSourceBlocks:c}=n.useBlocksStore(),{setSettings:p}=n.useSettingsStore(),{setHeader:f,setFooter:h}=n.useLayersStore();return H.useEffect(()=>{if(!s){const m={};Object.keys(t).map(j=>{m[j]=t[j]}),c(m),l(m),f(o),h(a),p(r);const v=Ra([{path:"/admin/builder",element:n.jsxRuntimeExports.jsx(iu,{blocks:t,settings:r,header:o,footer:a})},...ti()]);i(v)}},[s]),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:s&&n.jsxRuntimeExports.jsx(Ta,{router:s})})};exports.App=su;exports.hotReload=ru;exports.iconNames=Xa;
36
+ `},children:n.jsxRuntimeExports.jsx("div",{className:n.styles.indicator,style:{position:"absolute",left:`${s}%`,top:`${100-i}%`,transform:"translate(-50%, -50%)"}})}),n.jsxRuntimeExports.jsx("div",{className:n.styles.hueSlider,children:n.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:a,onChange:C=>{p(Number(C.target.value)),B(s,i)},className:n.styles.slider})}),n.jsxRuntimeExports.jsxs("div",{className:n.styles.buttons,children:[n.jsxRuntimeExports.jsx(n.Button,{onClick:g,className:n.clx(n.styles.applyButton,n.styles.cancelButton),children:"Cancel"}),n.jsxRuntimeExports.jsx(n.Button,{onClick:G,className:n.styles.applyButton,children:"Apply"})]})]})},Fs=()=>{const{onPreview:e}=n.usePreviewStore(),{isModalVisible:t}=n.useSubmodalStore(),{pageContext:r}=n.usePagesStore(),{showModal:o}=n.useColorPickerStore(),[a,s]=H.useState(!0);return H.useEffect(()=>{e&&r.general&&setTimeout(()=>{s(!1)},100)},[e,r]),n.jsxRuntimeExports.jsxs("div",{className:Ft.preview,children:[t&&n.jsxRuntimeExports.jsx(n.Submodal,{children:n.jsxRuntimeExports.jsx(Nr,{})}),o&&n.jsxRuntimeExports.jsx(As,{}),e&&n.jsxRuntimeExports.jsxs("div",{className:Ft.main,children:[n.jsxRuntimeExports.jsx(cs,{}),n.jsxRuntimeExports.jsx("div",{className:Ft.content,children:a?n.jsxRuntimeExports.jsx("div",{className:Ft.loading,children:n.jsxRuntimeExports.jsx(n.Loader,{})}):n.jsxRuntimeExports.jsx(ks,{})})]})]})},Ms="_sidebar_96mlz_1",Is="_title_96mlz_10",Os="_active_96mlz_18",ir={sidebar:Ms,title:Is,active:Os},Us="_layers_62wod_1",Hs="_block_62wod_8",$s="_dragging_62wod_23",zs="_active_62wod_31",Vs="_add_62wod_35",Ws="_button_62wod_47",Gs="_empty_62wod_60",qs="_title_62wod_72",Ks="_icon_62wod_79",Ys="_text_62wod_83",Xs="_highlight_62wod_89",nt={layers:Us,block:Hs,dragging:$s,active:zs,add:Vs,button:Ws,empty:Gs,title:qs,icon:Ks,text:Ys,highlight:Xs},Js="_block_1d6lb_1",sr={block:Js},Qs=()=>{const{setCurrentBlock:e}=n.useLayersStore(),{activeBlock:t}=n.usePreviewStore();function r(o){e(o)}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(sr.block,{[sr.active]:t==="header"}),onClick:()=>r("header"),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Cards"}),n.jsxRuntimeExports.jsx("span",{children:"Header"})]})},Zs="_block_1d6lb_1",lr={block:Zs},el=()=>{const{activeBlock:e}=n.usePreviewStore(),{setCurrentBlock:t}=n.useLayersStore();function r(o){t(o)}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(lr.block,{[lr.active]:e==="footer"}),onClick:()=>r("footer"),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Cards"}),n.jsxRuntimeExports.jsx("span",{children:"Footer"})]})},tl=({id:e,name:t,index:r,moveBlock:o,onClick:a})=>{const{currentPage:s,pages:i}=n.usePagesStore(),{activeBlock:l}=n.usePreviewStore(),{showPreview:c,hidePreview:p,showModal:f,hideModal:d,clearHideTimeout:m,startHideTimeout:v,hoverBlockId:j,isModalVisible:b}=n.useSubmodalStore(),{setPositionBlock:w}=n.useLayersStore(),[E,_]=H.useState(!1),B=()=>{b&&d(),c(e),_(!0),m()},P=C=>{C.stopPropagation(),p(),f(e),m(),w(r+1)},V=()=>{b?v():(_(!1),p())};H.useEffect(()=>{b||_(!1)},[b]);const[,$]=n.useDrop({accept:"block",hover(C){C.index!==r&&i&&(o(i[s].name,C.index,r),C.index=r)}}),[{isDragging:G},g]=n.useDrag({type:"block",item:{id:e,index:r},collect:C=>({isDragging:C.isDragging()})});return n.jsxRuntimeExports.jsxs("div",{ref:C=>g($(C)),className:n.clx(nt.block,{[nt.dragging]:G,[nt.active]:!G&&l===e}),onClick:()=>a(e),onMouseEnter:B,onMouseLeave:V,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"Cards"}),n.jsxRuntimeExports.jsx("span",{children:t}),(E||j===e)&&!G&&n.jsxRuntimeExports.jsx("div",{className:nt.add,children:n.jsxRuntimeExports.jsx("button",{className:nt.button,onClick:C=>P(C),children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Plus",fill:"#fff"})})})]})},nl=()=>{const{blocks:e,setCurrentBlock:t,moveBlock:r}=n.useLayersStore(),{currentPage:o,pages:a}=n.usePagesStore(),{setMouseOverModal:s,setHoverBlockId:i}=n.useSubmodalStore();function l(f){t(f),s(!1),i(null)}const{sourceBlocks:c}=n.useBlocksStore();function p(f){if(c)return console.log(c,f),new c[f]().blockSettings.displayName}return n.jsxRuntimeExports.jsxs("div",{className:nt.layers,children:[n.jsxRuntimeExports.jsx(Qs,{}),n.jsxRuntimeExports.jsx(n.DndProvider,{backend:n.HTML5Backend,children:n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:a&&a[o]&&e[a[o].name]&&Object.keys(e[a[o].name]).map((f,d)=>n.jsxRuntimeExports.jsx(tl,{id:f,name:p(e[a[o].name][f].name),index:d,moveBlock:r,onClick:l},f))})}),n.jsxRuntimeExports.jsx(el,{})]})},rl=({isHeader:e})=>{const{header:t,footer:r}=n.useLayersStore(),{pageContext:o}=n.usePagesStore();return e?t==null?void 0:t.renderSettings(o):r==null?void 0:r.renderSettings(o)},ol=()=>{const{settings:e}=n.useSettingsStore();return e==null?void 0:e.renderSettings()},al="_theme_1xj36_1",il="_block_1xj36_6",sl="_name_1xj36_20",cn={theme:al,block:il,name:sl},ll=()=>{const{setActiveBlock:e}=n.useThemeSettingsStore();function t(r){e(r)}return n.jsxRuntimeExports.jsx("div",{className:cn.theme,children:Ya.map(r=>n.jsxRuntimeExports.jsxs("div",{onClick:()=>t(r),className:n.clx(cn.block),children:[n.jsxRuntimeExports.jsx(n.Icon,{name:r.icon}),n.jsxRuntimeExports.jsx("span",{className:cn.name,children:r.name}),n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretRight"})]},r.icon))})},cl="_back_y3z55_1",ul="_render_y3z55_8",dl="_open_y3z55_23",hl="_close_y3z55_50",fl="_clicked_y3z55_54",pl="_title_y3z55_58",ml="_button_y3z55_66",gl="_loading_y3z55_71",xl="_settings_y3z55_75",vl="_deleteButton_y3z55_81",ye={back:cl,render:ul,open:dl,close:hl,clicked:fl,title:pl,button:ml,loading:gl,settings:xl,deleteButton:vl},Sl=({block:e})=>{if(!e)return null;const{pageContext:t}=n.usePagesStore();return e.renderSettings(t)},yl=e=>{var D;const{isAdd:t}=e,[r,o]=H.useState(!1),{setActiveBlock:a}=n.useNavbarStore(),{sourceBlocks:s,activeBlock:i,setActiveBlock:l,currentInstance:c,setCurrentInstance:p}=n.useBlocksStore(),{blocks:f,addBlock:d,editBlock:m,currentBlock:v,setCurrentBlock:j,removeBlock:b,setPositionBlock:w,setHeader:E,setFooter:_,header:B,footer:P}=n.useLayersStore(),{currentPage:V,pages:$}=n.usePagesStore();function G(M=!1){if(!t&&$&&c&&!M){const F={blockSettings:{}};Object.keys(c.blockSettings).filter(W=>!["displayName","isAddable"].includes(W)).map(W=>{F.blockSettings[W]=c.blockSettings[W]}),m($[V].name,v,{name:f[$[V].name][v].name,value:F})}l(null),j(null),setTimeout(()=>{o(!1)},150),p(null)}function g(){G(),a({name:"Layers",icon:"TreeStructure"}),p(null)}function C(){if(t)return new s[i];if($){const M=f[$[V].name][v];return new s[M.name](M.value.blockSettings)}}H.useEffect(()=>{if(i||v&&!["header","footer"].includes(v)){const M=C();p(M)}else p(null)},[i,v]),H.useEffect(()=>{v==="header"&&E(B)},[v,B]),H.useEffect(()=>{v==="footer"&&_(P)},[v,P]);function N(M){if(s&&M)return console.log(s,M),new s[M]().blockSettings.displayName}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(ye.render,{[ye.open]:v||i,[ye.close]:!v&&!i,[ye.clicked]:r}),children:[n.jsxRuntimeExports.jsxs("div",{className:ye.back,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:()=>G()}),n.jsxRuntimeExports.jsx("h3",{className:ye.title,children:i&&N(i)||$&&$[V]&&f[$[V].name]&&N((D=f[$[V].name][v])==null?void 0:D.name)||v&&me(v)||"Loading"}),!t&&$&&!["header","footer"].includes(v)&&n.jsxRuntimeExports.jsx("button",{onClick:()=>{o(!0),b($[V].name,v),G(!0)},className:ye.deleteButton,children:n.jsxRuntimeExports.jsx(n.Icon,{name:"Trash",hoverable:!0})})]}),n.jsxRuntimeExports.jsxs("div",{className:ye.settings,children:[c&&n.jsxRuntimeExports.jsx(Sl,{block:c}),v&&["header","footer"].includes(v)&&n.jsxRuntimeExports.jsx(rl,{isHeader:v==="header"}),!i&&!v&&n.jsxRuntimeExports.jsx("div",{className:ye.loading,children:"Loading"})]}),t&&n.jsxRuntimeExports.jsx("div",{className:ye.addButton,children:n.jsxRuntimeExports.jsx(n.Button,{style:{width:"100%"},onClick:()=>{if(o(!0),!["header","footer"].includes(v)&&$){const M={blockSettings:{}};Object.keys(c.blockSettings).filter(F=>!["displayName","isAddable"].includes(F)).map(F=>{M.blockSettings[F]=c.blockSettings[F]}),d($[V].name,{name:i,value:M}),w(null)}else v==="header"?E(B):_(P);g()},children:"Add Section"})})]})},bl="_settings_1r85j_1",jl="_open_1r85j_16",wl="_close_1r85j_20",Cl="_header_1r85j_24",El="_title_1r85j_30",Rl="_addButton_1r85j_37",mt={settings:bl,open:jl,close:wl,header:Cl,title:El,addButton:Rl},_l="_wrapper_n1a7x_1",kl="_category_n1a7x_5",Pl="_categoryTitle_n1a7x_10",Ll="_color_n1a7x_16",Nl="_content_n1a7x_24",Dl="_preview_n1a7x_32",Qe={wrapper:_l,category:kl,categoryTitle:Pl,color:Ll,content:Nl,preview:Dl},Tl=()=>{const{themeSettings:e,updateColor:t}=n.useThemeSettingsStore();async function r(a,s,i){t(a,s,i)}const o=H.useMemo(()=>{const a={};return Object.entries(e.colors).forEach(([s,i])=>{Object.entries(i).forEach(([l,c])=>{a[c]||(a[c]=[]),a[c].push(`${s}-${l}`)})}),Object.keys(a).filter(s=>a[s].length>1)},[e.colors]);return n.jsxRuntimeExports.jsx("div",{className:Qe.wrapper,children:Object.entries(e.colors).map(([a,s])=>n.jsxRuntimeExports.jsxs("div",{className:Qe.category,children:[n.jsxRuntimeExports.jsx("h2",{className:Qe.categoryTitle,children:me(a)}),Object.entries(s).map(([i,l])=>n.jsxRuntimeExports.jsxs("div",{className:Qe.color,children:[n.jsxRuntimeExports.jsxs("div",{className:Qe.content,children:[n.jsxRuntimeExports.jsx("div",{className:Qe.preview,style:{background:l}}),n.jsxRuntimeExports.jsx(n.ColorPicker,{title:me(i),initialColor:l,onChange:c=>r(a,i,c)})]}),o.includes(l)&&n.jsxRuntimeExports.jsx(n.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},i))]},a))})},Bl="_wrapper_kb55x_2",Al="_category_kb55x_6",Fl="_categoryTitle_kb55x_11",Ml="_color_kb55x_17",Il="_name_kb55x_23",Ol="_content_kb55x_28",Ul="_label_kb55x_34",Hl="_input_kb55x_45",$l="_title_kb55x_71",zl="_field_kb55x_79",Vl="_alignments_kb55x_89",Wl="_lineField_kb55x_95",Gl="_style_kb55x_101",ql="_header_kb55x_108",be={wrapper:Bl,category:Al,categoryTitle:Fl,color:Ml,name:Il,content:Ol,label:Ul,input:Hl,title:$l,field:zl,alignments:Vl,lineField:Wl,style:Gl,header:ql},Kl=["left","center","right"],Yl=["solid","dashed"],It=e=>{const{title:t,children:r,rightAddon:o}=e;return n.jsxRuntimeExports.jsxs("div",{className:be.field,children:[n.jsxRuntimeExports.jsxs("div",{className:be.header,children:[n.jsxRuntimeExports.jsx("h4",{children:t}),o]}),r]})},Xl=()=>{const{themeSettings:e,updateInput:t}=n.useThemeSettingsStore(),r=H.useMemo(()=>e.inputs,[e]),o=(s,i,l)=>{t(s,i,l)},a=s=>i=>{t(s,i,"color")};return n.jsxRuntimeExports.jsxs("div",{className:be.wrapper,children:[n.jsxRuntimeExports.jsxs(It,{title:"General",children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Height (px)",value:String(r.general.height),onChange:s=>o("general",s,"height"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Input,{label:"Style name",value:r.general.name,onChange:s=>o("general",s,"name")}),n.jsxRuntimeExports.jsx(n.Select,{label:"Font Size (px)",onChange:s=>o("general",s,"size"),value:String(r.general.size),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.general.color),onChange:a("general"),title:"Font Color",labelStyle:"secondary"})]}),n.jsxRuntimeExports.jsxs(It,{title:"Field Fill",rightAddon:n.jsxRuntimeExports.jsx("div",{className:be.switch,children:n.jsxRuntimeExports.jsx(n.Switch,{onChange:s=>o("field",s,"active"),current:r.field.active})}),children:[n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.field.color),onChange:a("field"),title:"Color",labelStyle:"secondary"}),n.jsxRuntimeExports.jsx(n.Input,{label:"Opacity (%)",value:String(r.field.opacity),onChange:s=>o("field",s,"opacity"),type:"number",min:0})]}),n.jsxRuntimeExports.jsxs(It,{title:"Border",rightAddon:n.jsxRuntimeExports.jsx("div",{className:be.switch,children:n.jsxRuntimeExports.jsx(n.Switch,{onChange:s=>o("border",s,"active"),current:r.border.active})}),children:[n.jsxRuntimeExports.jsxs("div",{className:be.lineField,children:[n.jsxRuntimeExports.jsxs("div",{className:be.style,children:[n.jsxRuntimeExports.jsx("span",{className:be.title,children:"Style"}),n.jsxRuntimeExports.jsx(n.Picker,{items:Yl,selectedItem:r.border.style,onSelect:s=>o("border",s,"style"),getIconName:s=>s==="solid"?"Minus":"Selection"})]}),n.jsxRuntimeExports.jsx(n.Input,{label:"Radius (px)",value:String(r.border.radius),onChange:s=>o("border",s,"radius"),type:"number",min:0})]}),n.jsxRuntimeExports.jsx(n.Input,{label:"Thickness (px)",value:String(r.border.thickness),onChange:s=>o("border",s,"thickness"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.border.color),onChange:a("border"),title:"Color",labelStyle:"secondary"})]}),n.jsxRuntimeExports.jsxs(It,{title:"Label",children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Line Height (px)",value:String(r.label.height),onChange:s=>o("label",s,"height"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Select,{label:"Font Size (px)",onChange:s=>o("label",s,"size"),value:String(r.label.size),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.ColorPicker,{initialColor:me(r.label.color),onChange:a("label"),title:"Color",labelStyle:"secondary"}),n.jsxRuntimeExports.jsxs("div",{className:be.alignments,children:[n.jsxRuntimeExports.jsx("h4",{className:be.title,children:"Alignment Type"}),n.jsxRuntimeExports.jsx(n.Picker,{items:Kl,selectedItem:r.label.alignment,onSelect:s=>o("label",s,"alignment"),getIconName:s=>s==="center"?"AlignCenterHorizontal":s==="left"?"AlignLeft":"AlignRight"})]})]})]})},Jl="_wrapper_k9on2_1",Ql="_category_k9on2_5",Zl="_categoryTitle_k9on2_10",ec="_font_k9on2_16",tc="_content_k9on2_36",nc="_icon_k9on2_42",rc="_paragraph_k9on2_51",oc="_deleteIcon_k9on2_55",ac="_iconButton_k9on2_62",Le={wrapper:Jl,category:Ql,categoryTitle:Zl,font:ec,content:tc,icon:nc,paragraph:rc,deleteIcon:oc,iconButton:ac},ic=e=>{const{font:t,size:r,id:o,category:a}=e,{setActiveFont:s}=n.useThemeSettingsStore();return n.jsxRuntimeExports.jsxs("div",{className:Le.font,onClick:()=>s(o),children:[n.jsxRuntimeExports.jsx("div",{className:n.clx(Le.icon,{[Le.paragraph]:a==="paragraph"}),children:n.jsxRuntimeExports.jsx(n.Icon,{name:a==="paragraph"?"TextB":"TextH"})}),n.jsxRuntimeExports.jsxs("div",{className:Le.content,children:[n.jsxRuntimeExports.jsx("h2",{className:Le.categoryTitle,children:me(o)}),n.jsxRuntimeExports.jsx("span",{className:Le.value,children:`${t}, ${r}px`})]})]})},sc=()=>{const{themeSettings:e,setActiveFont:t,activeBlock:r}=n.useThemeSettingsStore();H.useEffect(()=>(o(),()=>{o()}),[]);function o(){t(null)}if(r!=null&&r.name)return n.jsxRuntimeExports.jsx("div",{className:Le.wrapper,children:Object.entries(e.fonts).map(([a,s])=>n.jsxRuntimeExports.jsxs("div",{className:Le.category,children:[n.jsxRuntimeExports.jsx("h2",{className:Le.categoryTitle,children:me(a)}),Object.entries(s).map(([i,l])=>n.jsxRuntimeExports.jsx(ic,{id:i,category:a,...l},i))]},a))})},lc="_wrapper_94fpv_1",cc="_open_94fpv_16",uc="_close_94fpv_20",dc="_header_94fpv_24",hc="_title_94fpv_31",fc="_options_94fpv_37",pc="_clicked_94fpv_44",Ze={wrapper:lc,open:cc,close:uc,header:dc,title:hc,options:fc,clicked:pc},mc=()=>{const{activeBlock:e,setActiveFont:t,activeFont:r,themeSettings:o,updateFont:a}=n.useThemeSettingsStore(),{fonts:s}=n.useFontsStore(),[i,l]=H.useState(null);function c(){t(null)}function p(d,m){i&&r&&a(i,r,m,d)}const f=H.useMemo(()=>r?o.fonts.heading[r]?(l("heading"),o.fonts.heading[r]):o.fonts.paragraph[r]?(l("paragraph"),o.fonts.paragraph[r]):(l(null),null):null,[r,o]);return n.jsxRuntimeExports.jsxs("div",{className:n.clx(Ze.wrapper,{[Ze.open]:(e==null?void 0:e.name)==="Fonts"&&r,[Ze.close]:(e==null?void 0:e.name)!=="Fonts"||!r}),children:[n.jsxRuntimeExports.jsxs("div",{className:Ze.header,onClick:c,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0}),n.jsxRuntimeExports.jsx("span",{className:Ze.title,children:"Font Style"})]}),r&&f&&n.jsxRuntimeExports.jsxs("div",{className:Ze.options,children:[n.jsxRuntimeExports.jsx(n.Select,{label:"Font",value:f.font,onChange:d=>p(d,"font"),options:[...s.filter(d=>d!==f.font)]}),n.jsxRuntimeExports.jsx(n.Select,{label:"Size",value:String(f.size),onChange:d=>p(d,"size"),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.Select,{label:"Weight",value:String(f.weight),onChange:d=>p(d,"weight"),options:n.weightOptions})]})]})},gc="_wrapper_94fpv_1",xc="_open_94fpv_16",vc="_close_94fpv_20",Sc="_header_94fpv_24",yc="_title_94fpv_31",bc="_options_94fpv_37",jc="_clicked_94fpv_44",et={wrapper:gc,open:xc,close:vc,header:Sc,title:yc,options:bc,clicked:jc},Dr=()=>{const{activeBlock:e,themeSettings:t,updateBorder:r,setActiveBlock:o}=n.useThemeSettingsStore();function a(l,c){r(c,l)}function s(){o(null)}const i=H.useMemo(()=>t.borders,[t]);return n.jsxRuntimeExports.jsxs("div",{className:n.clx(et.wrapper,{[et.open]:(e==null?void 0:e.name)==="Borders",[et.close]:(e==null?void 0:e.name)!=="Borders"}),children:[n.jsxRuntimeExports.jsxs("div",{className:et.header,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:s}),n.jsxRuntimeExports.jsx("span",{className:et.title,children:"Borders Style"})]}),n.jsxRuntimeExports.jsxs("div",{className:et.options,children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Border Radius (px)",value:String(i.radius),onChange:l=>a(Number(l),"radius"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Input,{label:"Border Thickness (px)",value:String(i.thickness),onChange:l=>a(Number(l),"thickness"),type:"number",min:0})]})]})},wc="_wrapper_1j33r_1",Cc="_open_1j33r_16",Ec="_close_1j33r_20",Rc="_header_1j33r_24",_c="_title_1j33r_31",kc="_options_1j33r_37",Pc="_clicked_1j33r_44",Lc="_label_1j33r_48",Nc="_alignments_1j33r_55",Dc="_blocks_1j33r_61",Tc="_alignment_1j33r_55",Bc="_active_1j33r_75",he={wrapper:wc,open:Cc,close:Ec,header:Rc,title:_c,options:kc,clicked:Pc,label:Lc,alignments:Nc,blocks:Dc,alignment:Tc,active:Bc},Ac=["left","center","right"],Tr=()=>{const{activeBlock:e,themeSettings:t,updateButton:r,setActiveBlock:o}=n.useThemeSettingsStore();function a(l,c){r(c,l)}function s(){o(null)}const i=H.useMemo(()=>t.buttons,[t]);return n.jsxRuntimeExports.jsxs("div",{className:n.clx(he.wrapper,{[he.open]:(e==null?void 0:e.name)==="Buttons",[he.close]:(e==null?void 0:e.name)!=="Buttons"}),children:[n.jsxRuntimeExports.jsxs("div",{className:he.header,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:s}),n.jsxRuntimeExports.jsx("span",{className:he.title,children:"Buttons Style"})]}),i&&n.jsxRuntimeExports.jsxs("div",{className:he.options,children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Height (px)",value:String(i.height),onChange:l=>a(l,"height"),type:"number",min:0}),n.jsxRuntimeExports.jsx(n.Select,{label:"Font Size (px)",value:String(i.size),onChange:l=>a(l,"size"),options:n.sizeOptions}),n.jsxRuntimeExports.jsx(n.Input,{label:"Border Radius (px)",value:String(i.radius),onChange:l=>a(Number(l),"radius"),type:"number",min:0}),n.jsxRuntimeExports.jsxs("div",{className:he.alignments,children:[n.jsxRuntimeExports.jsx("h4",{className:he.label,children:"Alignment Type"}),n.jsxRuntimeExports.jsx("div",{className:he.blocks,children:Ac.map(l=>n.jsxRuntimeExports.jsx("div",{className:n.clx(he.alignment,{[he.active]:i.alignment===l}),onClick:()=>{a(l,"alignment")},children:n.jsxRuntimeExports.jsx(n.Icon,{name:l==="center"?"AlignCenterHorizontal":l==="left"?"AlignLeft":"AlignRight",fill:i.alignment===l?"#252525":"#757575"})},l))})]})]})]})},Fc=()=>{const{activeBlock:e}=n.useThemeSettingsStore();return n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[(e==null?void 0:e.name)==="Fonts"&&n.jsxRuntimeExports.jsx(mc,{}),(e==null?void 0:e.name)==="Borders"&&n.jsxRuntimeExports.jsx(Dr,{}),(e==null?void 0:e.name)==="Buttons"&&n.jsxRuntimeExports.jsx(Tr,{})]})},Mc=()=>{const{activeBlock:e,setActiveBlock:t}=n.useThemeSettingsStore(),{activeBlock:r}=n.useNavbarStore();function o(){t(null)}return n.jsxRuntimeExports.jsxs("div",{className:n.clx(mt.settings,{[mt.open]:e,[mt.close]:!e||r.name!=="Theme"}),children:[n.jsxRuntimeExports.jsxs("div",{className:mt.header,children:[n.jsxRuntimeExports.jsx(n.Icon,{name:"CaretLeft",hoverable:!0,onClick:o}),n.jsxRuntimeExports.jsx("span",{className:mt.title,children:e==null?void 0:e.name})]}),(e==null?void 0:e.name)==="Fonts"&&n.jsxRuntimeExports.jsx(sc,{}),(e==null?void 0:e.name)==="Colors"&&n.jsxRuntimeExports.jsx(Tl,{}),(e==null?void 0:e.name)==="Inputs"&&n.jsxRuntimeExports.jsx(Xl,{}),(e==null?void 0:e.name)==="Borders"&&n.jsxRuntimeExports.jsx(Dr,{}),(e==null?void 0:e.name)==="Borders"&&n.jsxRuntimeExports.jsx(Tr,{}),n.jsxRuntimeExports.jsx(Fc,{})]})},Ic=()=>{const{activeBlock:e}=n.useNavbarStore(),{activeBlock:t}=n.useBlocksStore();function r(){switch(e.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return n.jsxRuntimeExports.jsxs("div",{className:ir.sidebar,children:[n.jsxRuntimeExports.jsx("h3",{className:ir.title,children:r()}),e.name==="Layers"&&n.jsxRuntimeExports.jsx(nl,{}),e.name==="Add"&&n.jsxRuntimeExports.jsx(Nr,{}),n.jsxRuntimeExports.jsx(yl,{isAdd:!!t}),n.jsxRuntimeExports.jsx(Mc,{}),e.name==="Theme"&&n.jsxRuntimeExports.jsx(ll,{}),e.name==="Settings"&&n.jsxRuntimeExports.jsx(ol,{})]})},Oc="_wrapper_jjfwh_1",Uc="_header_jjfwh_12",Hc="_content_jjfwh_21",$c="_buttons_jjfwh_29",zc="_cancel_jjfwh_35",Vc="_label_jjfwh_40",Wc="_description_jjfwh_41",Gc="_preview_jjfwh_49",qc="_block_jjfwh_55",Kc="_slug_jjfwh_63",Yc="_title_jjfwh_69",fe={wrapper:Oc,header:Uc,content:Hc,buttons:$c,cancel:zc,label:Vc,description:Wc,preview:Gc,block:qc,slug:Kc,title:Yc},Xc=()=>{var G,g,C,N,D,M;const{setIsOpenModal:e,pages:t,createPage:r,updatePage:o,isEdit:a,setIsEdit:s,editedPage:i,setEditedPage:l}=n.usePagesStore(),{createPage:c,updatePage:p}=n.useLayersStore(),[f,d]=H.useState(i?t&&((G=t[i])==null?void 0:G.path):""),[m,v]=H.useState(i?t&&((g=t[i])==null?void 0:g.name):""),[j,b]=H.useState(i?t&&((C=t[i])==null?void 0:C.seo.description):""),[w,E]=H.useState(i?t&&((N=t[i])==null?void 0:N.visibility):"public");function _(){d(""),v(""),b(""),E("public"),s(!1),l(null)}function B(){_(),e(!1)}function P(F){return F[0]==="/"?F:"/"+F}function V(){r({path:P(f),name:m||f||"",icon:"File",seo:{title:m||"",description:j||""},visibility:w||"public"}),c(m),B()}function $(){t&&(p(t[i].name||"",m||f||""),o(i,{path:P(f),name:m||f,icon:t[i].icon||"File",seo:{title:m||"",description:j||""},visibility:w||"public"})),B()}return n.jsxRuntimeExports.jsxs("div",{className:fe.wrapper,onClick:F=>F.stopPropagation(),children:[n.jsxRuntimeExports.jsxs("div",{className:fe.header,children:[n.jsxRuntimeExports.jsxs("h2",{children:[a?"Edit":"Create"," Blank Page"]}),n.jsxRuntimeExports.jsx(n.Icon,{name:"X",fill:"#757575",hoverable:!0,onClick:B})]}),n.jsxRuntimeExports.jsxs("div",{className:fe.content,children:[n.jsxRuntimeExports.jsx(n.Input,{label:"Page Slug",onChange:F=>d(F),value:f,placeholder:"path-to-page",disabled:!!(i&&t&&((D=t[i])!=null&&D.name)&&xt.includes(t[i].name)),required:!0,regex:"^.+$"}),n.jsxRuntimeExports.jsx(n.Input,{label:"Page Title",onChange:F=>v(F),value:m,placeholder:"Contact us",disabled:!!(i&&t&&((M=t[i])!=null&&M.name)&&xt.includes(t[i].name))}),n.jsxRuntimeExports.jsx(n.Textarea,{label:"Description",onChange:F=>b(F),value:j,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),n.jsxRuntimeExports.jsx(n.Radio,{label:"Visibility",defaultValue:w,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:F=>E(F)}),n.jsxRuntimeExports.jsxs("div",{className:fe.preview,children:[n.jsxRuntimeExports.jsx("span",{className:fe.label,children:"Preview"}),n.jsxRuntimeExports.jsxs("div",{className:fe.block,children:[n.jsxRuntimeExports.jsx("span",{className:fe.slug,children:f||"yoursite.url"}),n.jsxRuntimeExports.jsx("span",{className:fe.title,children:m||"My Blank Page"}),n.jsxRuntimeExports.jsx("span",{className:fe.description,children:j||"It is My Description"})]})]})]}),n.jsxRuntimeExports.jsxs("div",{className:fe.buttons,children:[n.jsxRuntimeExports.jsx(n.Button,{className:fe.cancel,onClick:B,children:"Cancel"}),n.jsxRuntimeExports.jsx(n.Button,{onClick:a?$:V,disabled:f.length===0,children:a?"Update":"Create"})]})]})},Jc="_layout_vvs1k_1",Qc="_main_vvs1k_8",Zc="_content_vvs1k_15",un={layout:Jc,main:Qc,content:Zc},eu=()=>{const{isOpenModal:e,setIsOpenModal:t}=n.usePagesStore(),{openModal:r,setOpenModal:o}=n.useChooseImageStore();return n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsxs("div",{className:un.layout,children:[n.jsxRuntimeExports.jsx(Wi,{}),n.jsxRuntimeExports.jsxs("main",{className:un.main,children:[n.jsxRuntimeExports.jsx(Mi,{}),n.jsxRuntimeExports.jsxs("div",{className:un.content,children:[n.jsxRuntimeExports.jsx(Ic,{}),n.jsxRuntimeExports.jsx(Fs,{})]})]})]}),e&&n.jsxRuntimeExports.jsx(n.Modal,{close:t,children:n.jsxRuntimeExports.jsx(Xc,{})}),r&&n.jsxRuntimeExports.jsx(n.Modal,{close:o,children:n.jsxRuntimeExports.jsx(n.ChooseImageModal,{})})]})};async function tt(e,t){const r=localStorage.getItem("shopId")||void 0,o=`${n.API_URL}/${e}/builder/shops/${r}/${t}`,a=localStorage.getItem("accessToken")||void 0;return(await n.axios.get(o,{headers:{Authorization:`Bearer ${a}`}})).data}async function tu(){try{const[e,t,r,o,a,s]=await Promise.allSettled([tt("v1","general"),tt("v1","faqs"),tt("v1","listings"),tt("v1","products"),tt("v1","reviews"),tt("v1","categories")]);return{general:e,faqs:t,listings:r,products:o,reviews:a,categories:s}}catch(e){throw console.error("Error fetching page data:",e),e}}async function nu(){try{const{data:e}=await n.axios.get(`${n.GOOGLE_FONTS_API}?key=AIzaSyAEsTbjAPUz_TeuFCq4z4LPK9w_vst0Pfw`);return e.items}catch(e){throw console.error("Error fetching page data:",e),e}}function ru(){const{editBlock:e,currentBlock:t,blocks:r,header:o,setHeader:a,footer:s,setFooter:i}=n.useLayersStore.getState(),{currentPage:l,pages:c}=n.usePagesStore.getState(),{currentInstance:p,activeBlock:f}=n.useBlocksStore.getState();if(!f&&p&&c){t==="header"&&a(o),t==="footer"&&i(s);const d={blockSettings:{}};Object.keys(p.blockSettings).filter(m=>!["displayName","isAddable"].includes(m)).map(m=>{d.blockSettings[m]=p.blockSettings[m]}),e(c[l].name,t,{name:r[c[l].name][t].name,value:d})}}async function ou(){const e=localStorage.getItem("shopId"),t=localStorage.getItem("draftId"),r=`${n.API_URL}/v2/builder/shops/${e}/drafts/${t}/pages`,o=localStorage.getItem("accessToken");return(await n.axios.get(r,{headers:{Authorization:`Bearer ${o}`}})).data}const au=e=>{const{blocks:t,settings:r,header:o,footer:a}=e,{setBlocks:s,setSourceBlocks:i}=n.useBlocksStore(),{fonts:l,setFonts:c}=n.useFontsStore(),{setSettings:p}=n.useSettingsStore(),{setPageContext:f,setPages:d,setCurrentPage:m}=n.usePagesStore(),{blocks:v,setHeader:j,setFooter:b,createPage:w}=n.useLayersStore();function E(_){return _[0]==="/"?_.slice(1):_}return H.useEffect(()=>{const _={};Object.keys(t).map(P=>{_[P]=t[P]}),i(_),s(_),j(o),b(a),p(r),(async()=>{if(l.length===0){const G=await nu();c([...G.map(g=>g.family)])}let P={listings:null,products:null,reviews:null,categories:null,faqs:null,general:null};const V=await tu();Object.keys(V).map(G=>{const g=G;P[g]=V[g].value.data}),f(P);const $=await ou();if($.data.length>0){const G={};m($.data[0].name),$.data.forEach(g=>{const C=E(g.path);v[C]||w(C),g.path==="/"?G.home={...g,icon:on.home.icon,name:"home"}:on[C]?G[C]={...g,icon:on[C].icon,name:C}:G[C]={...g,icon:"File",name:C}}),d(G)}})()},[]),n.jsxRuntimeExports.jsx(eu,{})},iu=e=>{const{blocks:t,settings:r,header:o,footer:a}=e,[s,i]=H.useState(!0),l=jr();return H.useEffect(()=>{i(!0),Ja()?i(!1):l("/")},[]),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:s?n.jsxRuntimeExports.jsx(n.Loader,{}):n.jsxRuntimeExports.jsx(au,{blocks:t,settings:r,header:o,footer:a})})},su=e=>{const{blocks:t,settings:r,header:o,footer:a}=e,[s,i]=H.useState(null),{setBlocks:l,setSourceBlocks:c}=n.useBlocksStore(),{setSettings:p}=n.useSettingsStore(),{setHeader:f,setFooter:d}=n.useLayersStore();return H.useEffect(()=>{if(!s){const m={};Object.keys(t).map(j=>{m[j]=t[j]}),c(m),l(m),f(o),d(a),p(r);const v=Ra([{path:"/admin/builder",element:n.jsxRuntimeExports.jsx(iu,{blocks:t,settings:r,header:o,footer:a})},...ti()]);i(v)}},[s]),n.jsxRuntimeExports.jsx(n.jsxRuntimeExports.Fragment,{children:s&&n.jsxRuntimeExports.jsx(Ta,{router:s})})};exports.App=su;exports.hotReload=ru;exports.iconNames=Xa;