@billgangcom/theme-lib 1.3.0 → 1.4.0

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,11 +1,11 @@
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_21b8w_1 path{fill:var(--icon-fill)}._hoverable_21b8w_5{cursor:pointer}._button_rcjso_1{background-color:#ff3f19;padding:10px 16px;color:#fff;border-radius:12px;cursor:pointer;font-size:16px}._button_rcjso_1:disabled{opacity:.7;cursor:auto}._wrapper_1y283_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1y283_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1y283_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_1y283_17::placeholder{color:#c2c2c2}._input_1y283_17:disabled{background-color:var(--background-color);opacity:.7}._required_1y283_36{border:1px solid #ff3f19}._paddingless_1y283_40{padding:0}._wrapper_dmzhr_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_dmzhr_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._select_dmzhr_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_dmzhr_30{transition:.2s}._rotate_dmzhr_34{transform:rotate(180deg)}._content_dmzhr_38{position:relative}._options_dmzhr_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_dmzhr_42{padding:10px 12px;border-radius:12px}._option_dmzhr_42:hover{background-color:#e6e6e6}._switch_1gvxu_1{width:40px;height:24px;background-color:#ccc;border-radius:25px;display:flex;align-items:center;padding:2px;cursor:pointer;transition:background-color .2s}._switch_1gvxu_1._active_1gvxu_12{background:#ff3f19}._switch_1gvxu_1 ._toggle_1gvxu_15{width:14px;height:14px;background-color:#fff;border-radius:16px;transition:transform .2s;transform:translate(2px)}._switch_1gvxu_1._active_1gvxu_12 ._toggle_1gvxu_15{transform:translate(18px)}._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_1t5at_1{position:fixed;top:0;left:0;right:0;bottom:0;background:#2525253d;z-index:100;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}._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_ltoxx_1{position:absolute;top:0;left:0;width:100%;padding:11px 22px;line-height:20px;border-bottom:var(--default-border);display:flex;align-items:center;justify-content:space-between;gap:24px;z-index:5}._left_ltoxx_16,._right_ltoxx_17{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_x8pw2_1{position:relative}._default_x8pw2_5{display:flex;align-items:center;gap:4px;padding:10px 12px;background-color:var(--background-color);border-radius:8px;cursor:pointer;position:relative}._text_x8pw2_16{padding-right:4px;color:var(--main-color);flex:1 1 auto}._modal_x8pw2_22{position:absolute;top:45px;width:320px;left:0;z-index:100;background-color:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column}._page_x8pw2_1{display:flex;align-items:center;gap:8px;padding:12px 8px;border-radius:8px;cursor:pointer}._hoverable_x8pw2_45{background-color:var(--background-color)}._separator_x8pw2_49{border-bottom:1px solid #f0f0f0}._button_x8pw2_53{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:start;gap:8px;padding:16px 8px 12px;transition:.2s}._button_x8pw2_53:hover{background-color:var(--background-color)}._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_1jv6k_1{width:100%;background-color:var(--background-color);padding:16px 32px 0;position:relative}._main_1jv6k_8{width:100%;display:flex;flex-direction:column;overflow-y:auto;height:100%;position:relative;z-index:1}._content_1jv6k_18{background-color:#fff;border:var(--default-border);border-bottom:none;height:100%}._loading_1jv6k_25{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._loader_1jv6k_33{border:4px solid rgba(0,0,0,.1);border-left-color:#fff;border-radius:50%;width:40px;height:40px;animation:_spin_1jv6k_1 1s linear infinite}@keyframes _spin_1jv6k_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_92dk8_1{width:100%;height:100%}._block_92dk8_6{position:relative;cursor:pointer;border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6}._active_92dk8_13{border:2px solid #ff3f19}._name_92dk8_17{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_92dk8_31{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._icon_92dk8_42{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_92dk8_53{font-weight:700;font-size:24px;line-height:32px}._text_92dk8_59{font-size:16px;line-height:24px;color:var(--accent-color)}._sections_92dk8_65{padding:0 20px;margin:20px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:24px}._section_92dk8_65{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_xqbqi_1{max-width:320px;width:100%;padding:16px;border-right:var(--default-border);height:100%;position:relative;overflow:hidden}._title_xqbqi_11{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;padding-bottom:8px}._active_xqbqi_19{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}._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_1m2pj_1{display:flex;align-items:center;gap:8px;padding-bottom:8px}._render_1m2pj_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:3}._open_1m2pj_23{transform:translate(0)}._close_1m2pj_27{transform:translate(320px)}._clicked_1m2pj_31{opacity:0}._title_1m2pj_35{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px}._button_1m2pj_42{align-self:center;flex:1}._settings_1m2pj_47{flex:1 1 auto}._buttons_1m2pj_51{justify-content:space-between;display:flex;gap:10px}._deleteButton_1m2pj_57{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._deleteButton_1m2pj_57: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_kjedu_1{width:100%;height:100%;display:flex;position:relative}._main_kjedu_8{display:flex;flex-direction:column;width:100%;position:relative}._content_kjedu_15{position:relative;padding-top:64px;height:100%;display:flex}*{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}#root{height:100vh}body,html{background-color:#fff;font-family:Archivo,sans-serif;max-height:100vh;overflow:hidden}._wrapper_o1bnv_2{display:flex;flex-direction:column;gap:10px}._alignmentBlock_o1bnv_8{padding:10px 0 16px;display:flex;flex-direction:column;gap:6px;border-bottom:1px solid #f0f0f0}._title_o1bnv_16{font-weight:700;line-height:24px;font-size:16px;color:#252525}._subtitle_o1bnv_23{color:#757575;font-size:14px;line-height:20px;font-weight:400}._alignmentContent_o1bnv_30{display:flex;justify-content:space-between;align-items:stretch;gap:8px}._alignments_o1bnv_37{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_o1bnv_8{cursor:pointer;display:flex;height:100%;width:100%;align-items:center;justify-content:center}._circle_o1bnv_56{width:6px;height:6px;border-radius:50%;background-color:#c2c2c2}._paddings_o1bnv_63{border-radius:12px;display:grid;gap:4px;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}._padding_o1bnv_63{width:68px;display:flex;align-items:center;gap:4px;background:#f8f8f8;border-radius:12px;padding:10px 8px}._input_o1bnv_81{width:100%}._subtitle_1hhz4_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_1hhz4_8,._text_1hhz4_9{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0}._top_1hhz4_16{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_1hhz4_23{display:flex;flex-direction:column;gap:6px}._typeTexts_1hhz4_29{display:flex;align-items:center;gap:8px}._block_1hhz4_35{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_1hhz4_46{border:1px solid #ff3f19}')),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 o=require("./index-YVaQxWXR.cjs"),E=require("react"),Xn=["desktop","tablet","mobile"],Kn=[{icon:"paint",name:"Colors"},{icon:"font",name:"Fonts"},{icon:"corners-out",name:"Borders"},{icon:"arrow-square",name:"Buttons"},{icon:"textbox",name:"Inputs"}],Qn="https://g-api.billgang.com",Zn="https://www.googleapis.com/webfonts/v1/webfonts",er="_buttons_1gn8m_1",tr="_button_1gn8m_1",nr={buttons:er,button:tr},rr=()=>o.jsxRuntimeExports.jsxs("div",{className:nr.buttons,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"undo",hoverable:!0,width:20,height:20}),o.jsxRuntimeExports.jsx(o.Icon,{name:"redo",hoverable:!0,width:20,height:20})]}),sr="_devices_hxl12_1",or="_device_hxl12_1",ir="_active_hxl12_23",qe={devices:sr,device:or,active:ir},ar=()=>{const{currentDevice:t,setCurrentDevice:e}=o.useDeviceStore();return o.jsxRuntimeExports.jsx("div",{className:qe.devices,children:Xn.map(n=>o.jsxRuntimeExports.jsx("div",{className:o.clx(qe.device,{[qe.active]:t===n}),onClick:()=>e(n),children:o.jsxRuntimeExports.jsx(o.Icon,{name:n,fill:t===n?"#252525":"#757575",width:20,height:20})},n))})},cr="_header_ltoxx_1",ur="_left_ltoxx_16",lr="_right_ltoxx_17",Se={header:cr,left:ur,right:lr},dr="_preview_vijvm_2",fr="_active_vijvm_22",ze={preview:dr,active:fr},pr=()=>{const{onPreview:t,setOnPreview:e}=o.usePreviewStore();return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ze.preview,{[ze.active]:t}),onClick:()=>e(!t),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-up-right",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:ze.text,children:"Preview"})]})},hr="_settings_q79q3_1",gr={settings:hr},mr="_language_1mbvp_1",xr="_text_1mbvp_11",Rt={language:mr,text:xr},vr=()=>o.jsxRuntimeExports.jsxs("div",{className:Rt.language,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"globe",fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Rt.text,children:"Default"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),Er="_pages_x8pw2_1",jr="_text_x8pw2_16",br="_modal_x8pw2_22",yr="_page_x8pw2_1",Sr="_hoverable_x8pw2_45",_r="_separator_x8pw2_49",wr="_button_x8pw2_53",J={pages:Er,default:"_default_x8pw2_5",text:jr,modal:br,page:yr,hoverable:Sr,separator:_r,button:wr},Y=t=>t?t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" and "):"";function nn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Rr}=Object.prototype,{getPrototypeOf:gt}=Object,Pe=(t=>e=>{const n=Rr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),G=t=>(t=t.toLowerCase(),e=>Pe(e)===t),ke=t=>e=>typeof e===t,{isArray:de}=Array,ve=ke("undefined");function Or(t){return t!==null&&!ve(t)&&t.constructor!==null&&!ve(t.constructor)&&L(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rn=G("ArrayBuffer");function Tr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rn(t.buffer),e}const Dr=ke("string"),L=ke("function"),sn=ke("number"),Ae=t=>t!==null&&typeof t=="object",Cr=t=>t===!0||t===!1,Te=t=>{if(Pe(t)!=="object")return!1;const e=gt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Nr=G("Date"),Ir=G("File"),Pr=G("Blob"),kr=G("FileList"),Ar=t=>Ae(t)&&L(t.pipe),Br=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||L(t.append)&&((e=Pe(t))==="formdata"||e==="object"&&L(t.toString)&&t.toString()==="[object FormData]"))},Lr=G("URLSearchParams"),[Mr,$r,Fr,Ur]=["ReadableStream","Request","Response","Headers"].map(G),Hr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ee(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),de(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let c;for(r=0;r<a;r++)c=i[r],e.call(null,t[c],c,t)}}function on(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,an=t=>!ve(t)&&t!==te;function rt(){const{caseless:t}=an(this)&&this||{},e={},n=(r,s)=>{const i=t&&on(e,s)||s;Te(e[i])&&Te(r)?e[i]=rt(e[i],r):Te(r)?e[i]=rt({},r):de(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Ee(arguments[r],n);return e}const qr=(t,e,n,{allOwnKeys:r}={})=>(Ee(e,(s,i)=>{n&&L(s)?t[i]=nn(s,n):t[i]=s},{allOwnKeys:r}),t),zr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vr=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Gr=(t,e,n,r)=>{let s,i,a;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!r||r(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&gt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Yr=t=>{if(!t)return null;if(de(t))return t;let e=t.length;if(!sn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Jr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gt(Uint8Array)),Xr=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Kr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Qr=G("HTMLFormElement"),Zr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ot=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),es=G("RegExp"),cn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ee(n,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(r[i]=a||s)}),Object.defineProperties(t,r)},ts=t=>{cn(t,(e,n)=>{if(L(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(L(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ns=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return de(t)?r(t):r(String(t).split(e)),n},rs=()=>{},ss=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ve="abcdefghijklmnopqrstuvwxyz",Tt="0123456789",un={DIGIT:Tt,ALPHA:Ve,ALPHA_DIGIT:Ve+Ve.toUpperCase()+Tt},os=(t=16,e=un.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function is(t){return!!(t&&L(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const as=t=>{const e=new Array(10),n=(r,s)=>{if(Ae(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=de(r)?[]:{};return Ee(r,(a,c)=>{const u=n(a,s+1);!ve(u)&&(i[c]=u)}),e[s]=void 0,i}}return r};return n(t,0)},cs=G("AsyncFunction"),us=t=>t&&(Ae(t)||L(t))&&L(t.then)&&L(t.catch),ln=((t,e)=>t?setImmediate:e?((n,r)=>(te.addEventListener("message",({source:s,data:i})=>{s===te&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),te.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(te.postMessage)),ls=typeof queueMicrotask<"u"?queueMicrotask.bind(te):typeof process<"u"&&process.nextTick||ln,f={isArray:de,isArrayBuffer:rn,isBuffer:Or,isFormData:Br,isArrayBufferView:Tr,isString:Dr,isNumber:sn,isBoolean:Cr,isObject:Ae,isPlainObject:Te,isReadableStream:Mr,isRequest:$r,isResponse:Fr,isHeaders:Ur,isUndefined:ve,isDate:Nr,isFile:Ir,isBlob:Pr,isRegExp:es,isFunction:L,isStream:Ar,isURLSearchParams:Lr,isTypedArray:Jr,isFileList:kr,forEach:Ee,merge:rt,extend:qr,trim:Hr,stripBOM:zr,inherits:Vr,toFlatObject:Gr,kindOf:Pe,kindOfTest:G,endsWith:Wr,toArray:Yr,forEachEntry:Xr,matchAll:Kr,isHTMLForm:Qr,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:cn,freezeMethods:ts,toObjectSet:ns,toCamelCase:Zr,noop:rs,toFiniteNumber:ss,findKey:on,global:te,isContextDefined:an,ALPHABET:un,generateString:os,isSpecCompliantForm:is,toJSONObject:as,isAsyncFn:cs,isThenable:us,setImmediate:ln,asap:ls};function S(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const dn=S.prototype,fn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{fn[t]={value:t}});Object.defineProperties(S,fn);Object.defineProperty(dn,"isAxiosError",{value:!0});S.from=(t,e,n,r,s,i)=>{const a=Object.create(dn);return f.toFlatObject(t,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),S.call(a,t.message,e,n,r,s),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const ds=null;function st(t){return f.isPlainObject(t)||f.isArray(t)}function pn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function Dt(t,e,n){return t?t.concat(e).map(function(s,i){return s=pn(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function fs(t){return f.isArray(t)&&!t.some(st)}const ps=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Be(t,e,n){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!f.isUndefined(g[h])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(f.isDate(m))return m.toISOString();if(!u&&f.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(m)||f.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,g){let j=m;if(m&&!g&&typeof m=="object"){if(f.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(f.isArray(m)&&fs(m)||(f.isFileList(m)||f.endsWith(h,"[]"))&&(j=f.toArray(m)))return h=pn(h),j.forEach(function(y,D){!(f.isUndefined(y)||y===null)&&e.append(a===!0?Dt([h],D,i):a===null?h:h+"[]",l(y))}),!1}return st(m)?!0:(e.append(Dt(g,h,i),l(m)),!1)}const p=[],v=Object.assign(ps,{defaultVisitor:d,convertValue:l,isVisitable:st});function x(m,h){if(!f.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),f.forEach(m,function(j,b){(!(f.isUndefined(j)||j===null)&&s.call(e,j,f.isString(b)?b.trim():b,h,v))===!0&&x(j,h?h.concat(b):[b])}),p.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Ct(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function mt(t,e){this._pairs=[],t&&Be(t,this,e)}const hn=mt.prototype;hn.append=function(e,n){this._pairs.push([e,n])};hn.toString=function(e){const n=e?function(r){return e.call(this,r,Ct)}:Ct;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hs(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gn(t,e,n){if(!e)return t;const r=n&&n.encode||hs,s=n&&n.serialize;let i;if(s?i=s(e,n):i=f.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Nt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(r){r!==null&&e(r)})}}const mn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gs=typeof URLSearchParams<"u"?URLSearchParams:mt,ms=typeof FormData<"u"?FormData:null,xs=typeof Blob<"u"?Blob:null,vs={isBrowser:!0,classes:{URLSearchParams:gs,FormData:ms,Blob:xs},protocols:["http","https","file","blob","url","data"]},xt=typeof window<"u"&&typeof document<"u",ot=typeof navigator=="object"&&navigator||void 0,Es=xt&&(!ot||["ReactNative","NativeScript","NS"].indexOf(ot.product)<0),js=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bs=xt&&window.location.href||"http://localhost",ys=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xt,hasStandardBrowserEnv:Es,hasStandardBrowserWebWorkerEnv:js,navigator:ot,origin:bs},Symbol.toStringTag,{value:"Module"})),A={...ys,...vs};function Ss(t,e){return Be(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return A.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _s(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ws(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function xn(t){function e(n,r,s,i){let a=n[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=n.length;return a=!a&&f.isArray(s)?s.length:a,u?(f.hasOwnProp(s,a)?s[a]=[s[a],r]:s[a]=r,!c):((!s[a]||!f.isObject(s[a]))&&(s[a]=[]),e(n,r,s[a],i)&&f.isArray(s[a])&&(s[a]=ws(s[a])),!c)}if(f.isFormData(t)&&f.isFunction(t.entries)){const n={};return f.forEachEntry(t,(r,s)=>{e(_s(r),s,n,0)}),n}return null}function Rs(t,e,n){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const je={transitional:mn,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(xn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ss(e,this.formSerializer).toString();if((c=f.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Be(c?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Rs(e)):e}],transformResponse:[function(e){const n=this.transitional||je.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(r&&!this.responseType||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{je.headers[t]={}});const Os=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ts=t=>{const e={};let n,r,s;return t&&t.split(`
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_21b8w_1 path{fill:var(--icon-fill)}._hoverable_21b8w_5{cursor:pointer}._button_rcjso_1{background-color:#ff3f19;padding:10px 16px;color:#fff;border-radius:12px;cursor:pointer;font-size:16px}._button_rcjso_1:disabled{opacity:.7;cursor:auto}._wrapper_1y283_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_1y283_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._input_1y283_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_1y283_17::placeholder{color:#c2c2c2}._input_1y283_17:disabled{background-color:var(--background-color);opacity:.7}._required_1y283_36{border:1px solid #ff3f19}._paddingless_1y283_40{padding:0}._wrapper_dmzhr_1{display:flex;flex-direction:column;gap:6px;justify-content:start;width:100%}._label_dmzhr_9{width:100%;color:var(--accent-color);line-height:20px;font-size:14px;font-weight:400}._select_dmzhr_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_dmzhr_30{transition:.2s}._rotate_dmzhr_34{transform:rotate(180deg)}._content_dmzhr_38{position:relative}._options_dmzhr_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_dmzhr_42{padding:10px 12px;border-radius:12px}._option_dmzhr_42:hover{background-color:#e6e6e6}._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_1t5at_1{position:fixed;top:0;left:0;right:0;bottom:0;background:#2525253d;z-index:100;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}._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_wxpoz_1{position:absolute;top:0;left:0;width:100%;padding:11px 22px;line-height:20px;border-bottom:var(--default-border);display:flex;align-items:center;justify-content:space-between;gap:24px;z-index:50000}._left_wxpoz_16,._right_wxpoz_17{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_x8pw2_1{position:relative}._default_x8pw2_5{display:flex;align-items:center;gap:4px;padding:10px 12px;background-color:var(--background-color);border-radius:8px;cursor:pointer;position:relative}._text_x8pw2_16{padding-right:4px;color:var(--main-color);flex:1 1 auto}._modal_x8pw2_22{position:absolute;top:45px;width:320px;left:0;z-index:100;background-color:#fff;border:1px solid #e6e6e6;border-radius:8px;padding:8px 12px;display:flex;flex-direction:column}._page_x8pw2_1{display:flex;align-items:center;gap:8px;padding:12px 8px;border-radius:8px;cursor:pointer}._hoverable_x8pw2_45{background-color:var(--background-color)}._separator_x8pw2_49{border-bottom:1px solid #f0f0f0}._button_x8pw2_53{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:start;gap:8px;padding:16px 8px 12px;transition:.2s}._button_x8pw2_53:hover{background-color:var(--background-color)}._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_jui5n_1{width:100%;background-color:var(--background-color);padding:16px 32px 0;position:relative;z-index:500}._main_jui5n_9{width:100%;display:flex;flex-direction:column;overflow-y:auto;height:100%;position:relative;z-index:1}._content_jui5n_19{background-color:#fff;border:var(--default-border);border-bottom:none;height:100%}._loading_jui5n_26{width:100%;height:100%;display:flex;justify-content:center;align-items:center}._loader_jui5n_34{border:4px solid rgba(0,0,0,.1);border-left-color:#fff;border-radius:50%;width:40px;height:40px;animation:_spin_jui5n_1 1s linear infinite}@keyframes _spin_jui5n_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_92dk8_1{width:100%;height:100%}._block_92dk8_6{position:relative;cursor:pointer;border-left:1px solid #e6e6e6;border-right:1px solid #e6e6e6}._active_92dk8_13{border:2px solid #ff3f19}._name_92dk8_17{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_92dk8_31{height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center}._icon_92dk8_42{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_92dk8_53{font-weight:700;font-size:24px;line-height:32px}._text_92dk8_59{font-size:16px;line-height:24px;color:var(--accent-color)}._sections_92dk8_65{padding:0 20px;margin:20px 0 0;display:flex;flex-wrap:wrap;justify-content:center;gap:24px}._section_92dk8_65{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_1r5sp_1{max-width:320px;width:100%;padding:16px;border-right:var(--default-border);height:100%;position:relative}._title_1r5sp_10{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px;padding-bottom:8px}._active_1r5sp_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}._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_14yda_1{display:flex;align-items:center;gap:8px;padding-bottom:8px}._render_14yda_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_14yda_23{animation:.2s _open_14yda_23 forwards}@keyframes _open_14yda_23{0%{transform:translate(320px);z-index:1}99%{z-index:1}to{z-index:5000;transform:translate(0)}}@keyframes _close_14yda_50{0%{z-index:1;transform:translate(0)}to{z-index:1;transform:translate(320px)}}._close_14yda_50{animation:.2s _close_14yda_50 forwards}._clicked_14yda_54{opacity:0}._title_14yda_58{color:var(--main-color);font-weight:700;font-size:20px;line-height:24px}._button_14yda_65{align-self:center;flex:1}._loading_14yda_70{flex:1 1 auto}._settings_14yda_74{flex:1 1 auto;overflow-y:scroll;overflow-x:hidden}._buttons_14yda_80{justify-content:space-between;display:flex;gap:10px}._deleteButton_14yda_86{display:flex;align-items:center;border-radius:8px;padding:8px;transition:.2s background-color}._deleteButton_14yda_86: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_kjedu_1{width:100%;height:100%;display:flex;position:relative}._main_kjedu_8{display:flex;flex-direction:column;width:100%;position:relative}._content_kjedu_15{position:relative;padding-top:64px;height:100%;display:flex}*{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}#root{height:100vh}body,html{background-color:#fff;font-family:Archivo,sans-serif;max-height:100vh;overflow:hidden}._wrapper_o1bnv_2{display:flex;flex-direction:column;gap:10px}._alignmentBlock_o1bnv_8{padding:10px 0 16px;display:flex;flex-direction:column;gap:6px;border-bottom:1px solid #f0f0f0}._title_o1bnv_16{font-weight:700;line-height:24px;font-size:16px;color:#252525}._subtitle_o1bnv_23{color:#757575;font-size:14px;line-height:20px;font-weight:400}._alignmentContent_o1bnv_30{display:flex;justify-content:space-between;align-items:stretch;gap:8px}._alignments_o1bnv_37{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_o1bnv_8{cursor:pointer;display:flex;height:100%;width:100%;align-items:center;justify-content:center}._circle_o1bnv_56{width:6px;height:6px;border-radius:50%;background-color:#c2c2c2}._paddings_o1bnv_63{border-radius:12px;display:grid;gap:4px;grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,1fr)}._padding_o1bnv_63{width:68px;display:flex;align-items:center;gap:4px;background:#f8f8f8;border-radius:12px;padding:10px 8px}._input_o1bnv_81{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_2l7ty_1{color:#757575;font-size:14px;line-height:20px;font-weight:400}._header_2l7ty_8,._text_2l7ty_9,._productsBlock_2l7ty_10{padding:10px 0 16px;display:flex;flex-direction:column;border-bottom:1px solid #f0f0f0;width:100%}._productsBlock_2l7ty_10{position:relative}._top_2l7ty_22{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px}._itemsBlock_2l7ty_29{display:flex;flex-direction:column;gap:6px}._typeTexts_2l7ty_35{display:flex;align-items:center;gap:8px}._block_2l7ty_41{padding:8px;display:flex;align-items:center;justify-content:center;border:1px solid #f8f8f8;background-color:#f8f8f8;border-radius:12px;cursor:pointer}._active_2l7ty_52{border:1px solid #ff3f19}._products_2l7ty_10{width:100%;display:flex;flex-direction:column;gap:8px}._product_2l7ty_10{display:flex;align-items:center;gap:8px;width:100%}._button_2l7ty_70{background:inherit;color:#ff3f19;display:flex;align-items:center;justify-content:center;gap:6px;width:100%}._image_2l7ty_80{border-radius:8px;border:1px solid #f0f0f0;background-color:#fff;padding:4px}._info_2l7ty_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_2l7ty_98{flex:1 1 100%}._buttons_2l7ty_102{display:flex;align-items:center;gap:8px}._modal_2l7ty_108{position:fixed;background-color:#fff;right:-300px;top:0;z-index:10000;max-width:276px;width:100%;padding:16px;border-radius:12px}._modal_2l7ty_108 ._top_2l7ty_22{display:flex;align-items:center;justify-content:space-between}._other_2l7ty_125{display:flex;flex-direction:column;gap:6px}._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}')),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 o=require("./index-DUXD-4un.cjs"),E=require("react"),Xn=["desktop","tablet","mobile"],Kn=[{icon:"paint",name:"Colors"},{icon:"font",name:"Fonts"},{icon:"corners-out",name:"Borders"},{icon:"arrow-square",name:"Buttons"},{icon:"textbox",name:"Inputs"}],Qn="https://g-api.billgang.com",Zn="https://www.googleapis.com/webfonts/v1/webfonts",er="_buttons_1gn8m_1",tr="_button_1gn8m_1",nr={buttons:er,button:tr},rr=()=>o.jsxRuntimeExports.jsxs("div",{className:nr.buttons,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"undo",hoverable:!0,width:20,height:20}),o.jsxRuntimeExports.jsx(o.Icon,{name:"redo",hoverable:!0,width:20,height:20})]}),sr="_devices_hxl12_1",or="_device_hxl12_1",ir="_active_hxl12_23",qe={devices:sr,device:or,active:ir},ar=()=>{const{currentDevice:t,setCurrentDevice:e}=o.useDeviceStore();return o.jsxRuntimeExports.jsx("div",{className:qe.devices,children:Xn.map(n=>o.jsxRuntimeExports.jsx("div",{className:o.clx(qe.device,{[qe.active]:t===n}),onClick:()=>e(n),children:o.jsxRuntimeExports.jsx(o.Icon,{name:n,fill:t===n?"#252525":"#757575",width:20,height:20})},n))})},cr="_header_wxpoz_1",ur="_left_wxpoz_16",lr="_right_wxpoz_17",Se={header:cr,left:ur,right:lr},dr="_preview_vijvm_2",fr="_active_vijvm_22",ze={preview:dr,active:fr},pr=()=>{const{onPreview:t,setOnPreview:e}=o.usePreviewStore();return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ze.preview,{[ze.active]:t}),onClick:()=>e(!t),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-up-right",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:ze.text,children:"Preview"})]})},hr="_settings_q79q3_1",gr={settings:hr},mr="_language_1mbvp_1",xr="_text_1mbvp_11",Rt={language:mr,text:xr},vr=()=>o.jsxRuntimeExports.jsxs("div",{className:Rt.language,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"globe",fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Rt.text,children:"Default"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),Er="_pages_x8pw2_1",yr="_text_x8pw2_16",br="_modal_x8pw2_22",jr="_page_x8pw2_1",Sr="_hoverable_x8pw2_45",_r="_separator_x8pw2_49",wr="_button_x8pw2_53",X={pages:Er,default:"_default_x8pw2_5",text:yr,modal:br,page:jr,hoverable:Sr,separator:_r,button:wr},J=t=>t?t.replace(/_/g," ").split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" and "):"";function nn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Rr}=Object.prototype,{getPrototypeOf:gt}=Object,Pe=(t=>e=>{const n=Rr.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),G=t=>(t=t.toLowerCase(),e=>Pe(e)===t),ke=t=>e=>typeof e===t,{isArray:de}=Array,ve=ke("undefined");function Or(t){return t!==null&&!ve(t)&&t.constructor!==null&&!ve(t.constructor)&&L(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rn=G("ArrayBuffer");function Tr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rn(t.buffer),e}const Dr=ke("string"),L=ke("function"),sn=ke("number"),Ae=t=>t!==null&&typeof t=="object",Cr=t=>t===!0||t===!1,Te=t=>{if(Pe(t)!=="object")return!1;const e=gt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Nr=G("Date"),Ir=G("File"),Pr=G("Blob"),kr=G("FileList"),Ar=t=>Ae(t)&&L(t.pipe),Br=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||L(t.append)&&((e=Pe(t))==="formdata"||e==="object"&&L(t.toString)&&t.toString()==="[object FormData]"))},Lr=G("URLSearchParams"),[Mr,$r,Fr,Ur]=["ReadableStream","Request","Response","Headers"].map(G),Hr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ee(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),de(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),a=i.length;let c;for(r=0;r<a;r++)c=i[r],e.call(null,t[c],c,t)}}function on(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,s;for(;r-- >0;)if(s=n[r],e===s.toLowerCase())return s;return null}const te=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,an=t=>!ve(t)&&t!==te;function rt(){const{caseless:t}=an(this)&&this||{},e={},n=(r,s)=>{const i=t&&on(e,s)||s;Te(e[i])&&Te(r)?e[i]=rt(e[i],r):Te(r)?e[i]=rt({},r):de(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Ee(arguments[r],n);return e}const qr=(t,e,n,{allOwnKeys:r}={})=>(Ee(e,(s,i)=>{n&&L(s)?t[i]=nn(s,n):t[i]=s},{allOwnKeys:r}),t),zr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Vr=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Gr=(t,e,n,r)=>{let s,i,a;const c={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)a=s[i],(!r||r(a,t,e))&&!c[a]&&(e[a]=t[a],c[a]=!0);t=n!==!1&&gt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Wr=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Yr=t=>{if(!t)return null;if(de(t))return t;let e=t.length;if(!sn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Jr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&gt(Uint8Array)),Xr=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},Kr=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Qr=G("HTMLFormElement"),Zr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Ot=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),es=G("RegExp"),cn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ee(n,(s,i)=>{let a;(a=e(s,i,t))!==!1&&(r[i]=a||s)}),Object.defineProperties(t,r)},ts=t=>{cn(t,(e,n)=>{if(L(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(L(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ns=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return de(t)?r(t):r(String(t).split(e)),n},rs=()=>{},ss=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ve="abcdefghijklmnopqrstuvwxyz",Tt="0123456789",un={DIGIT:Tt,ALPHA:Ve,ALPHA_DIGIT:Ve+Ve.toUpperCase()+Tt},os=(t=16,e=un.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function is(t){return!!(t&&L(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const as=t=>{const e=new Array(10),n=(r,s)=>{if(Ae(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=de(r)?[]:{};return Ee(r,(a,c)=>{const u=n(a,s+1);!ve(u)&&(i[c]=u)}),e[s]=void 0,i}}return r};return n(t,0)},cs=G("AsyncFunction"),us=t=>t&&(Ae(t)||L(t))&&L(t.then)&&L(t.catch),ln=((t,e)=>t?setImmediate:e?((n,r)=>(te.addEventListener("message",({source:s,data:i})=>{s===te&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),te.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",L(te.postMessage)),ls=typeof queueMicrotask<"u"?queueMicrotask.bind(te):typeof process<"u"&&process.nextTick||ln,f={isArray:de,isArrayBuffer:rn,isBuffer:Or,isFormData:Br,isArrayBufferView:Tr,isString:Dr,isNumber:sn,isBoolean:Cr,isObject:Ae,isPlainObject:Te,isReadableStream:Mr,isRequest:$r,isResponse:Fr,isHeaders:Ur,isUndefined:ve,isDate:Nr,isFile:Ir,isBlob:Pr,isRegExp:es,isFunction:L,isStream:Ar,isURLSearchParams:Lr,isTypedArray:Jr,isFileList:kr,forEach:Ee,merge:rt,extend:qr,trim:Hr,stripBOM:zr,inherits:Vr,toFlatObject:Gr,kindOf:Pe,kindOfTest:G,endsWith:Wr,toArray:Yr,forEachEntry:Xr,matchAll:Kr,isHTMLForm:Qr,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:cn,freezeMethods:ts,toObjectSet:ns,toCamelCase:Zr,noop:rs,toFiniteNumber:ss,findKey:on,global:te,isContextDefined:an,ALPHABET:un,generateString:os,isSpecCompliantForm:is,toJSONObject:as,isAsyncFn:cs,isThenable:us,setImmediate:ln,asap:ls};function S(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}f.inherits(S,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const dn=S.prototype,fn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{fn[t]={value:t}});Object.defineProperties(S,fn);Object.defineProperty(dn,"isAxiosError",{value:!0});S.from=(t,e,n,r,s,i)=>{const a=Object.create(dn);return f.toFlatObject(t,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),S.call(a,t.message,e,n,r,s),a.cause=t,a.name=t.name,i&&Object.assign(a,i),a};const ds=null;function st(t){return f.isPlainObject(t)||f.isArray(t)}function pn(t){return f.endsWith(t,"[]")?t.slice(0,-2):t}function Dt(t,e,n){return t?t.concat(e).map(function(s,i){return s=pn(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function fs(t){return f.isArray(t)&&!t.some(st)}const ps=f.toFlatObject(f,{},null,function(e){return/^is[A-Z]/.test(e)});function Be(t,e,n){if(!f.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,g){return!f.isUndefined(g[h])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(e);if(!f.isFunction(s))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(f.isDate(m))return m.toISOString();if(!u&&f.isBlob(m))throw new S("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(m)||f.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,g){let y=m;if(m&&!g&&typeof m=="object"){if(f.endsWith(h,"{}"))h=r?h:h.slice(0,-2),m=JSON.stringify(m);else if(f.isArray(m)&&fs(m)||(f.isFileList(m)||f.endsWith(h,"[]"))&&(y=f.toArray(m)))return h=pn(h),y.forEach(function(j,D){!(f.isUndefined(j)||j===null)&&e.append(a===!0?Dt([h],D,i):a===null?h:h+"[]",l(j))}),!1}return st(m)?!0:(e.append(Dt(g,h,i),l(m)),!1)}const p=[],v=Object.assign(ps,{defaultVisitor:d,convertValue:l,isVisitable:st});function x(m,h){if(!f.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),f.forEach(m,function(y,b){(!(f.isUndefined(y)||y===null)&&s.call(e,y,f.isString(b)?b.trim():b,h,v))===!0&&x(y,h?h.concat(b):[b])}),p.pop()}}if(!f.isObject(t))throw new TypeError("data must be an object");return x(t),e}function Ct(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function mt(t,e){this._pairs=[],t&&Be(t,this,e)}const hn=mt.prototype;hn.append=function(e,n){this._pairs.push([e,n])};hn.toString=function(e){const n=e?function(r){return e.call(this,r,Ct)}:Ct;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function hs(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gn(t,e,n){if(!e)return t;const r=n&&n.encode||hs,s=n&&n.serialize;let i;if(s?i=s(e,n):i=f.isURLSearchParams(e)?e.toString():new mt(e,n).toString(r),i){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class Nt{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){f.forEach(this.handlers,function(r){r!==null&&e(r)})}}const mn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gs=typeof URLSearchParams<"u"?URLSearchParams:mt,ms=typeof FormData<"u"?FormData:null,xs=typeof Blob<"u"?Blob:null,vs={isBrowser:!0,classes:{URLSearchParams:gs,FormData:ms,Blob:xs},protocols:["http","https","file","blob","url","data"]},xt=typeof window<"u"&&typeof document<"u",ot=typeof navigator=="object"&&navigator||void 0,Es=xt&&(!ot||["ReactNative","NativeScript","NS"].indexOf(ot.product)<0),ys=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bs=xt&&window.location.href||"http://localhost",js=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:xt,hasStandardBrowserEnv:Es,hasStandardBrowserWebWorkerEnv:ys,navigator:ot,origin:bs},Symbol.toStringTag,{value:"Module"})),A={...js,...vs};function Ss(t,e){return Be(t,new A.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return A.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function _s(t){return f.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function ws(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],e[i]=t[i];return e}function xn(t){function e(n,r,s,i){let a=n[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=n.length;return a=!a&&f.isArray(s)?s.length:a,u?(f.hasOwnProp(s,a)?s[a]=[s[a],r]:s[a]=r,!c):((!s[a]||!f.isObject(s[a]))&&(s[a]=[]),e(n,r,s[a],i)&&f.isArray(s[a])&&(s[a]=ws(s[a])),!c)}if(f.isFormData(t)&&f.isFunction(t.entries)){const n={};return f.forEachEntry(t,(r,s)=>{e(_s(r),s,n,0)}),n}return null}function Rs(t,e,n){if(f.isString(t))try{return(e||JSON.parse)(t),f.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(t)}const ye={transitional:mn,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=f.isObject(e);if(i&&f.isHTMLForm(e)&&(e=new FormData(e)),f.isFormData(e))return s?JSON.stringify(xn(e)):e;if(f.isArrayBuffer(e)||f.isBuffer(e)||f.isStream(e)||f.isFile(e)||f.isBlob(e)||f.isReadableStream(e))return e;if(f.isArrayBufferView(e))return e.buffer;if(f.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ss(e,this.formSerializer).toString();if((c=f.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Be(c?{"files[]":e}:e,u&&new u,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),Rs(e)):e}],transformResponse:[function(e){const n=this.transitional||ye.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(f.isResponse(e)||f.isReadableStream(e))return e;if(e&&f.isString(e)&&(r&&!this.responseType||s)){const a=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(c){if(a)throw c.name==="SyntaxError"?S.from(c,S.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:A.classes.FormData,Blob:A.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],t=>{ye.headers[t]={}});const Os=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ts=t=>{const e={};let n,r,s;return t&&t.split(`
3
3
  `).forEach(function(a){s=a.indexOf(":"),n=a.substring(0,s).trim().toLowerCase(),r=a.substring(s+1).trim(),!(!n||e[n]&&Os[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},It=Symbol("internals");function he(t){return t&&String(t).trim().toLowerCase()}function De(t){return t===!1||t==null?t:f.isArray(t)?t.map(De):String(t)}function Ds(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Cs=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ge(t,e,n,r,s){if(f.isFunction(r))return r.call(this,e,n);if(s&&(e=n),!!f.isString(e)){if(f.isString(r))return e.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(e)}}function Ns(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Is(t,e){const n=f.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(s,i,a){return this[r].call(this,e,s,i,a)},configurable:!0})})}class B{constructor(e){e&&this.set(e)}set(e,n,r){const s=this;function i(c,u,l){const d=he(u);if(!d)throw new Error("header name must be a non-empty string");const p=f.findKey(s,d);(!p||s[p]===void 0||l===!0||l===void 0&&s[p]!==!1)&&(s[p||u]=De(c))}const a=(c,u)=>f.forEach(c,(l,d)=>i(l,d,u));if(f.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(f.isString(e)&&(e=e.trim())&&!Cs(e))a(Ts(e),n);else if(f.isHeaders(e))for(const[c,u]of e.entries())i(u,c,r);else e!=null&&i(n,e,r);return this}get(e,n){if(e=he(e),e){const r=f.findKey(this,e);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ds(s);if(f.isFunction(n))return n.call(this,s,r);if(f.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=he(e),e){const r=f.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Ge(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let s=!1;function i(a){if(a=he(a),a){const c=f.findKey(r,a);c&&(!n||Ge(r,r[c],c,n))&&(delete r[c],s=!0)}}return f.isArray(e)?e.forEach(i):i(e),s}clear(e){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!e||Ge(this,this[i],i,e,!0))&&(delete this[i],s=!0)}return s}normalize(e){const n=this,r={};return f.forEach(this,(s,i)=>{const a=f.findKey(r,i);if(a){n[a]=De(s),delete n[i];return}const c=e?Ns(i):String(i).trim();c!==i&&delete n[i],n[c]=De(s),r[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return f.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=e&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
4
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[It]=this[It]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=he(a);r[c]||(Is(s,a),r[c]=!0)}return f.isArray(e)?e.forEach(i):i(e),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(B.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});f.freezeMethods(B);function We(t,e){const n=this||je,r=e||n,s=B.from(r.headers);let i=r.data;return f.forEach(t,function(c){i=c.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function vn(t){return!!(t&&t.__CANCEL__)}function fe(t,e,n){S.call(this,t??"canceled",S.ERR_CANCELED,e,n),this.name="CanceledError"}f.inherits(fe,S,{__CANCEL__:!0});function En(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ps(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ks(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(u){const l=Date.now(),d=r[i];a||(a=l),n[s]=u,r[s]=l;let p=i,v=0;for(;p!==s;)v+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-a<e)return;const x=d&&l-d;return x?Math.round(v*1e3/x):void 0}}function As(t,e){let n=0,r=1e3/e,s,i;const a=(l,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),t.apply(null,l)};return[(...l)=>{const d=Date.now(),p=d-n;p>=r?a(l,d):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},r-p)))},()=>s&&a(s)]}const Ne=(t,e,n=3)=>{let r=0;const s=ks(50,250);return As(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-r,l=s(u),d=a<=c;r=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:l||void 0,estimated:l&&c&&d?(c-a)/l:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(p)},n)},Pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},kt=t=>(...e)=>f.asap(()=>t(...e)),Bs=A.hasStandardBrowserEnv?function(){const e=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function s(i){let a=i;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(a){const c=f.isString(a)?s(a):a;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Ls=A.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const a=[t+"="+encodeURIComponent(e)];f.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),f.isString(r)&&a.push("path="+r),f.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ms(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $s(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function jn(t,e){return t&&!Ms(e)?$s(t,e):e}const At=t=>t instanceof B?{...t}:t;function re(t,e){e=e||{};const n={};function r(l,d,p){return f.isPlainObject(l)&&f.isPlainObject(d)?f.merge.call({caseless:p},l,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function s(l,d,p){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l,p)}else return r(l,d,p)}function i(l,d){if(!f.isUndefined(d))return r(void 0,d)}function a(l,d){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function c(l,d,p){if(p in e)return r(l,d);if(p in t)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(l,d)=>s(At(l),At(d),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(d){const p=u[d]||s,v=p(t[d],e[d],d);f.isUndefined(v)&&p!==c||(n[d]=v)}),n}const bn=t=>{const e=re({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=e;e.headers=a=B.from(a),e.url=gn(jn(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(f.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...d]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...d].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(e)),r||r!==!1&&Bs(e.url))){const l=s&&i&&Ls.read(i);l&&a.set(s,l)}return e},Fs=typeof XMLHttpRequest<"u",Us=Fs&&function(t){return new Promise(function(n,r){const s=bn(t);let i=s.data;const a=B.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:l}=s,d,p,v,x,m;function h(){x&&x(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function j(){if(!g)return;const y=B.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:y,config:t,request:g};En(function(P){n(P),h()},function(P){r(P),h()},R),g=null}"onloadend"in g?g.onloadend=j:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(j)},g.onabort=function(){g&&(r(new S("Request aborted",S.ECONNABORTED,t,g)),g=null)},g.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||mn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new S(D,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,g)),g=null},i===void 0&&a.setContentType(null),"setRequestHeader"in g&&f.forEach(a.toJSON(),function(D,R){g.setRequestHeader(R,D)}),f.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),c&&c!=="json"&&(g.responseType=s.responseType),l&&([v,m]=Ne(l,!0),g.addEventListener("progress",v)),u&&g.upload&&([p,x]=Ne(u),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(d=y=>{g&&(r(!y||y.type?new fe(null,t,g):y),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const b=Ps(s.url);if(b&&A.protocols.indexOf(b)===-1){r(new S("Unsupported protocol "+b+":",S.ERR_BAD_REQUEST,t));return}g.send(i||null)})},Hs=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const d=l instanceof Error?l:this.reason;r.abort(d instanceof S?d:new fe(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>f.asap(c),u}},qs=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},zs=async function*(t,e){for await(const n of Vs(t))yield*qs(n,e)},Vs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Bt=(t,e,n,r)=>{const s=zs(t,e);let i=0,a,c=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await s.next();if(l){c(),u.close();return}let p=d.byteLength;if(n){let v=i+=p;n(v)}u.enqueue(new Uint8Array(d))}catch(l){throw c(l),l}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},Le=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yn=Le&&typeof ReadableStream=="function",Gs=Le&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sn=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ws=yn&&Sn(()=>{let t=!1;const e=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Lt=64*1024,it=yn&&Sn(()=>f.isReadableStream(new Response("").body)),Ie={stream:it&&(t=>t.body)};Le&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ie[e]&&(Ie[e]=f.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new S(`Response type '${e}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Ys=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await Gs(t)).byteLength},Js=async(t,e)=>{const n=f.toFiniteNumber(t.getContentLength());return n??Ys(e)},Xs=Le&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:d,withCredentials:p="same-origin",fetchOptions:v}=bn(t);l=l?(l+"").toLowerCase():"text";let x=Hs([s,i&&i.toAbortSignal()],a),m;const h=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let g;try{if(u&&Ws&&n!=="get"&&n!=="head"&&(g=await Js(d,r))!==0){let R=new Request(e,{method:"POST",body:r,duplex:"half"}),I;if(f.isFormData(r)&&(I=R.headers.get("content-type"))&&d.setContentType(I),R.body){const[P,U]=Pt(g,Ne(kt(u)));r=Bt(R.body,Lt,P,U)}}f.isString(p)||(p=p?"include":"omit");const j="credentials"in Request.prototype;m=new Request(e,{...v,signal:x,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:j?p:void 0});let b=await fetch(m);const y=it&&(l==="stream"||l==="response");if(it&&(c||y&&h)){const R={};["status","statusText","headers"].forEach(w=>{R[w]=b[w]});const I=f.toFiniteNumber(b.headers.get("content-length")),[P,U]=c&&Pt(I,Ne(kt(c),!0))||[];b=new Response(Bt(b.body,Lt,P,()=>{U&&U(),h&&h()}),R)}l=l||"text";let D=await Ie[f.findKey(Ie,l)||"text"](b,t);return!y&&h&&h(),await new Promise((R,I)=>{En(R,I,{data:D,headers:B.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:m})})}catch(j){throw h&&h(),j&&j.name==="TypeError"&&/fetch/i.test(j.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,t,m),{cause:j.cause||j}):S.from(j,j&&j.code,t,m)}}),at={http:ds,xhr:Us,fetch:Xs};f.forEach(at,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Mt=t=>`- ${t}`,Ks=t=>f.isFunction(t)||t===null||t===!1,_n={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let a;if(r=n,!Ks(n)&&(r=at[(a=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${a}'`);if(r)break;s[a||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
4
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(s=>r.set(s)),r}static accessor(e){const r=(this[It]=this[It]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=he(a);r[c]||(Is(s,a),r[c]=!0)}return f.isArray(e)?e.forEach(i):i(e),this}}B.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(B.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});f.freezeMethods(B);function We(t,e){const n=this||ye,r=e||n,s=B.from(r.headers);let i=r.data;return f.forEach(t,function(c){i=c.call(n,i,s.normalize(),e?e.status:void 0)}),s.normalize(),i}function vn(t){return!!(t&&t.__CANCEL__)}function fe(t,e,n){S.call(this,t??"canceled",S.ERR_CANCELED,e,n),this.name="CanceledError"}f.inherits(fe,S,{__CANCEL__:!0});function En(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new S("Request failed with status code "+n.status,[S.ERR_BAD_REQUEST,S.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Ps(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ks(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,i=0,a;return e=e!==void 0?e:1e3,function(u){const l=Date.now(),d=r[i];a||(a=l),n[s]=u,r[s]=l;let p=i,v=0;for(;p!==s;)v+=n[p++],p=p%t;if(s=(s+1)%t,s===i&&(i=(i+1)%t),l-a<e)return;const x=d&&l-d;return x?Math.round(v*1e3/x):void 0}}function As(t,e){let n=0,r=1e3/e,s,i;const a=(l,d=Date.now())=>{n=d,s=null,i&&(clearTimeout(i),i=null),t.apply(null,l)};return[(...l)=>{const d=Date.now(),p=d-n;p>=r?a(l,d):(s=l,i||(i=setTimeout(()=>{i=null,a(s)},r-p)))},()=>s&&a(s)]}const Ne=(t,e,n=3)=>{let r=0;const s=ks(50,250);return As(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-r,l=s(u),d=a<=c;r=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:l||void 0,estimated:l&&c&&d?(c-a)/l:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(p)},n)},Pt=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},kt=t=>(...e)=>f.asap(()=>t(...e)),Bs=A.hasStandardBrowserEnv?function(){const e=A.navigator&&/(msie|trident)/i.test(A.navigator.userAgent),n=document.createElement("a");let r;function s(i){let a=i;return e&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(a){const c=f.isString(a)?s(a):a;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),Ls=A.hasStandardBrowserEnv?{write(t,e,n,r,s,i){const a=[t+"="+encodeURIComponent(e)];f.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),f.isString(r)&&a.push("path="+r),f.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ms(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function $s(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function yn(t,e){return t&&!Ms(e)?$s(t,e):e}const At=t=>t instanceof B?{...t}:t;function re(t,e){e=e||{};const n={};function r(l,d,p){return f.isPlainObject(l)&&f.isPlainObject(d)?f.merge.call({caseless:p},l,d):f.isPlainObject(d)?f.merge({},d):f.isArray(d)?d.slice():d}function s(l,d,p){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l,p)}else return r(l,d,p)}function i(l,d){if(!f.isUndefined(d))return r(void 0,d)}function a(l,d){if(f.isUndefined(d)){if(!f.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function c(l,d,p){if(p in e)return r(l,d);if(p in t)return r(void 0,l)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(l,d)=>s(At(l),At(d),!0)};return f.forEach(Object.keys(Object.assign({},t,e)),function(d){const p=u[d]||s,v=p(t[d],e[d],d);f.isUndefined(v)&&p!==c||(n[d]=v)}),n}const bn=t=>{const e=re({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=e;e.headers=a=B.from(a),e.url=gn(yn(e.baseURL,e.url),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(f.isFormData(n)){if(A.hasStandardBrowserEnv||A.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...d]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...d].join("; "))}}if(A.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(e)),r||r!==!1&&Bs(e.url))){const l=s&&i&&Ls.read(i);l&&a.set(s,l)}return e},Fs=typeof XMLHttpRequest<"u",Us=Fs&&function(t){return new Promise(function(n,r){const s=bn(t);let i=s.data;const a=B.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:l}=s,d,p,v,x,m;function h(){x&&x(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let g=new XMLHttpRequest;g.open(s.method.toUpperCase(),s.url,!0),g.timeout=s.timeout;function y(){if(!g)return;const j=B.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:j,config:t,request:g};En(function(P){n(P),h()},function(P){r(P),h()},R),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(r(new S("Request aborted",S.ECONNABORTED,t,g)),g=null)},g.onerror=function(){r(new S("Network Error",S.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let D=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||mn;s.timeoutErrorMessage&&(D=s.timeoutErrorMessage),r(new S(D,R.clarifyTimeoutError?S.ETIMEDOUT:S.ECONNABORTED,t,g)),g=null},i===void 0&&a.setContentType(null),"setRequestHeader"in g&&f.forEach(a.toJSON(),function(D,R){g.setRequestHeader(R,D)}),f.isUndefined(s.withCredentials)||(g.withCredentials=!!s.withCredentials),c&&c!=="json"&&(g.responseType=s.responseType),l&&([v,m]=Ne(l,!0),g.addEventListener("progress",v)),u&&g.upload&&([p,x]=Ne(u),g.upload.addEventListener("progress",p),g.upload.addEventListener("loadend",x)),(s.cancelToken||s.signal)&&(d=j=>{g&&(r(!j||j.type?new fe(null,t,g):j),g.abort(),g=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const b=Ps(s.url);if(b&&A.protocols.indexOf(b)===-1){r(new S("Unsupported protocol "+b+":",S.ERR_BAD_REQUEST,t));return}g.send(i||null)})},Hs=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,s;const i=function(l){if(!s){s=!0,c();const d=l instanceof Error?l:this.reason;r.abort(d instanceof S?d:new fe(d instanceof Error?d.message:d))}};let a=e&&setTimeout(()=>{a=null,i(new S(`timeout ${e} of ms exceeded`,S.ETIMEDOUT))},e);const c=()=>{t&&(a&&clearTimeout(a),a=null,t.forEach(l=>{l.unsubscribe?l.unsubscribe(i):l.removeEventListener("abort",i)}),t=null)};t.forEach(l=>l.addEventListener("abort",i));const{signal:u}=r;return u.unsubscribe=()=>f.asap(c),u}},qs=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,s;for(;r<n;)s=r+e,yield t.slice(r,s),r=s},zs=async function*(t,e){for await(const n of Vs(t))yield*qs(n,e)},Vs=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Bt=(t,e,n,r)=>{const s=zs(t,e);let i=0,a,c=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:d}=await s.next();if(l){c(),u.close();return}let p=d.byteLength;if(n){let v=i+=p;n(v)}u.enqueue(new Uint8Array(d))}catch(l){throw c(l),l}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},Le=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",jn=Le&&typeof ReadableStream=="function",Gs=Le&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Sn=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Ws=jn&&Sn(()=>{let t=!1;const e=new Request(A.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Lt=64*1024,it=jn&&Sn(()=>f.isReadableStream(new Response("").body)),Ie={stream:it&&(t=>t.body)};Le&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ie[e]&&(Ie[e]=f.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new S(`Response type '${e}' is not supported`,S.ERR_NOT_SUPPORT,r)})})})(new Response);const Ys=async t=>{if(t==null)return 0;if(f.isBlob(t))return t.size;if(f.isSpecCompliantForm(t))return(await new Request(A.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(f.isArrayBufferView(t)||f.isArrayBuffer(t))return t.byteLength;if(f.isURLSearchParams(t)&&(t=t+""),f.isString(t))return(await Gs(t)).byteLength},Js=async(t,e)=>{const n=f.toFiniteNumber(t.getContentLength());return n??Ys(e)},Xs=Le&&(async t=>{let{url:e,method:n,data:r,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:l,headers:d,withCredentials:p="same-origin",fetchOptions:v}=bn(t);l=l?(l+"").toLowerCase():"text";let x=Hs([s,i&&i.toAbortSignal()],a),m;const h=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let g;try{if(u&&Ws&&n!=="get"&&n!=="head"&&(g=await Js(d,r))!==0){let R=new Request(e,{method:"POST",body:r,duplex:"half"}),I;if(f.isFormData(r)&&(I=R.headers.get("content-type"))&&d.setContentType(I),R.body){const[P,U]=Pt(g,Ne(kt(u)));r=Bt(R.body,Lt,P,U)}}f.isString(p)||(p=p?"include":"omit");const y="credentials"in Request.prototype;m=new Request(e,{...v,signal:x,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",credentials:y?p:void 0});let b=await fetch(m);const j=it&&(l==="stream"||l==="response");if(it&&(c||j&&h)){const R={};["status","statusText","headers"].forEach(w=>{R[w]=b[w]});const I=f.toFiniteNumber(b.headers.get("content-length")),[P,U]=c&&Pt(I,Ne(kt(c),!0))||[];b=new Response(Bt(b.body,Lt,P,()=>{U&&U(),h&&h()}),R)}l=l||"text";let D=await Ie[f.findKey(Ie,l)||"text"](b,t);return!j&&h&&h(),await new Promise((R,I)=>{En(R,I,{data:D,headers:B.from(b.headers),status:b.status,statusText:b.statusText,config:t,request:m})})}catch(y){throw h&&h(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new S("Network Error",S.ERR_NETWORK,t,m),{cause:y.cause||y}):S.from(y,y&&y.code,t,m)}}),at={http:ds,xhr:Us,fetch:Xs};f.forEach(at,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Mt=t=>`- ${t}`,Ks=t=>f.isFunction(t)||t===null||t===!1,_n={getAdapter:t=>{t=f.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let i=0;i<e;i++){n=t[i];let a;if(r=n,!Ks(n)&&(r=at[(a=String(n)).toLowerCase()],r===void 0))throw new S(`Unknown adapter '${a}'`);if(r)break;s[a||"#"+i]=r}if(!r){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=e?i.length>1?`since :
5
5
  `+i.map(Mt).join(`
6
- `):" "+Mt(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:at};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new fe(null,t)}function $t(t){return Ye(t),t.headers=B.from(t.headers),t.data=We.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_n.getAdapter(t.adapter||je.adapter)(t).then(function(r){return Ye(t),r.data=We.call(t,t.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return vn(r)||(Ye(t),r&&r.response&&(r.response.data=We.call(t,t.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const wn="1.7.7",vt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ft={};vt.transitional=function(e,n,r){function s(i,a){return"[Axios v"+wn+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,c)=>{if(e===!1)throw new S(s(a," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Ft[a]&&(Ft[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,c):!0}};function Qs(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],a=e[i];if(a){const c=t[i],u=c===void 0||a(c,i,t);if(u!==!0)throw new S("option "+i+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const ct={assertOptions:Qs,validators:vt},ee=ct.validators;class ne{constructor(e){this.defaults=e,this.interceptors={request:new Nt,response:new Nt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
- `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ct.assertOptions(r,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:ct.assertOptions(s,{encode:ee.function,serialize:ee.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&f.merge(i.common,i[n.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=B.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let d,p=0,v;if(!u){const m=[$t.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,l),v=m.length,d=Promise.resolve(n);p<v;)d=d.then(m[p++],m[p++]);return d}v=c.length;let x=n;for(p=0;p<v;){const m=c[p++],h=c[p++];try{x=m(x)}catch(g){h.call(this,g);break}}try{d=$t.call(this,x)}catch(m){return Promise.reject(m)}for(p=0,v=l.length;p<v;)d=d.then(l[p++],l[p++]);return d}getUri(e){e=re(this.defaults,e);const n=jn(e.baseURL,e.url);return gn(n,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(e){ne.prototype[e]=function(n,r){return this.request(re(r||{},{method:e,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,c){return this.request(re(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ne.prototype[e]=n(),ne.prototype[e+"Form"]=n(!0)});class Et{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{r.subscribe(c),i=c}).then(s);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,c){r.reason||(r.reason=new fe(i,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Et(function(s){e=s}),cancel:e}}}function Zs(t){return function(n){return t.apply(null,n)}}function eo(t){return f.isObject(t)&&t.isAxiosError===!0}const ut={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ut).forEach(([t,e])=>{ut[e]=t});function Rn(t){const e=new ne(t),n=nn(ne.prototype.request,e);return f.extend(n,ne.prototype,e,{allOwnKeys:!0}),f.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Rn(re(t,s))},n}const T=Rn(je);T.Axios=ne;T.CanceledError=fe;T.CancelToken=Et;T.isCancel=vn;T.VERSION=wn;T.toFormData=Be;T.AxiosError=S;T.Cancel=T.CanceledError;T.all=function(e){return Promise.all(e)};T.spread=Zs;T.isAxiosError=eo;T.mergeConfig=re;T.AxiosHeaders=B;T.formToJSON=t=>xn(f.isHTMLForm(t)?new FormData(t):t);T.getAdapter=_n.getAdapter;T.HttpStatusCode=ut;T.default=T;const to="https://g-api.billgang.com",no=async(t="get",e,n)=>{const r=localStorage.getItem("shopId")||void 0,s=`${to}/v2/builder/shops/${r}/${e}`,i=localStorage.getItem("accessToken")||void 0;if(t.toUpperCase()==="GET")return(await T.get(s,{headers:{Authorization:`Bearer ${i}`}})).data;t.toUpperCase()==="POST"&&await T.post(s,{...n},{headers:{Authorization:`Bearer ${i}`}}),t.toUpperCase()==="PUT"&&await T.put(s,{...n},{headers:{Authorization:`Bearer ${i}`}})},ro=()=>{const{currentPage:t,setCurrentPage:e,setIsOpenModal:n,pages:r,setIsEdit:s,setEditedPage:i,deletePage:a,isOpenSelectModal:c,setIsOpenSelectModal:u}=o.usePagesStore(),{deletePage:l}=o.useLayersStore(),[d,p]=E.useState("");return E.useEffect(()=>{const v=()=>{u(!1)};return document.body.addEventListener("click",v),()=>{document.body.removeEventListener("click",v)}},[]),o.jsxRuntimeExports.jsxs("div",{className:J.pages,children:[o.jsxRuntimeExports.jsxs("div",{className:J.default,onClick:v=>{v.stopPropagation(),u(!c)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:r[t].icon,fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:J.text,children:o.defaultPageNames.includes(r[t].name)?`${Y(r[t].name)} page`:r[t].name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),c&&o.jsxRuntimeExports.jsxs("div",{className:J.modal,onClick:v=>v.stopPropagation(),children:[Object.keys(r).map(v=>{const x=r[v];return o.jsxRuntimeExports.jsxs("div",{className:o.clx(J.page,{[J.hoverable]:d===v}),onMouseEnter:()=>p(v),onMouseLeave:()=>p(""),onClick:()=>{p(""),s(!1),e(v),u(!1)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:x.icon,fill:"#252525"}),o.jsxRuntimeExports.jsx("span",{className:J.text,children:o.defaultPageNames.includes(x.name)?`${Y(x.name)} page`:x.name}),d===v&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"settings",fill:"#757575",onClick:m=>{m.stopPropagation(),s(!0),i(v),n(!0)}}),!o.defaultPageNames.includes(x.name)&&o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",fill:"#C12A2A",onClick:m=>{r[t].name===x.name&&e("home"),m.stopPropagation(),a(v),l(x.name)}})]}),r[t].name===x.name&&o.jsxRuntimeExports.jsx(o.Icon,{name:"check",fill:"#FF3F19"})]},v)}),o.jsxRuntimeExports.jsx("div",{className:J.separator}),o.jsxRuntimeExports.jsxs(o.Button,{className:J.button,onClick:v=>{v.stopPropagation(),n(!0)},size:"l",children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#ff3f19"}),o.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},so="_zoom_a77cn_1",oo={zoom:so},io=()=>{const[t,e]=E.useState(),n=()=>{e(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return E.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),o.jsxRuntimeExports.jsxs("div",{className:oo.zoom,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"zoom-minus",width:20,height:20}),o.jsxRuntimeExports.jsxs("span",{children:[t," %"]})]})},ao=()=>o.jsxRuntimeExports.jsxs("div",{className:gr.settings,children:[o.jsxRuntimeExports.jsx(vr,{}),o.jsxRuntimeExports.jsx(ro,{}),o.jsxRuntimeExports.jsx(io,{})]}),co="_theme_3wxbf_1",uo={theme:co},lo=()=>o.jsxRuntimeExports.jsxs("div",{className:uo.theme,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"check",width:18,height:18}),o.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),fo=()=>{const{themeSettings:t}=o.useThemeSettingsStore(),{settings:e}=o.useSettingsStore(),[n,r]=E.useState(null),[s,i]=E.useState(!1),{pages:a}=o.usePagesStore(),{blocks:c}=o.useLayersStore();function u(x,m){return m.map(g=>Object.values(g.value).filter(j=>j.type===x).map(j=>j.value).flat()).flat()}function l(x,m){return u(x,m).some(g=>g)}function d(x,m){const h=u(x,m);return Array.isArray(h)&&h.length>0?Math.max(...h):0}function p(x){const m=Object.keys(a).find(h=>a[h].name===x);return m?a[m]:null}const v=()=>{if(s)n&&clearTimeout(n);else{const m=Object.keys(c).map(h=>{const g=p(h);return{name:g?g.name:h,path:h==="home"?"/":(g==null?void 0:g.path)||h,layout:{...c[h]},neededProductIds:[...u("ProductId",Object.values(c[h]))],neededCategoryIds:[...u("CategoryId",Object.values(c[h]))],neededAnnouncementIds:[...u("AnnouncementId",Object.values(c[h]))],neededListingIds:[...u("ListingId",Object.values(c[h]))],neededFaqs:l("Faqs",Object.values(c[h])),neededReviewCount:d("ReviewCount",Object.values(c[h])),seo:{pageTitle:g?g.seo.title:"",pageDescription:g?g.seo.description:""}}});no("POST","save",{themeSettings:t,settings:e,updatedPages:m})}i(!0);const x=setTimeout(()=>{i(!1)},2e3);r(x)};return o.jsxRuntimeExports.jsxs("div",{className:Se.header,children:[o.jsxRuntimeExports.jsxs("div",{className:Se.left,children:[o.jsxRuntimeExports.jsx(ar,{}),o.jsxRuntimeExports.jsx(pr,{})]}),o.jsxRuntimeExports.jsx("div",{className:Se.center,children:o.jsxRuntimeExports.jsx(ao,{})}),o.jsxRuntimeExports.jsxs("div",{className:Se.right,children:[o.jsxRuntimeExports.jsx(lo,{}),o.jsxRuntimeExports.jsx(rr,{}),o.jsxRuntimeExports.jsx(o.Button,{onClick:v,children:"Save"})]})]})},po="_exit_2ce42_1",ho="_text_2ce42_10",Ut={exit:po,text:ho},go=()=>o.jsxRuntimeExports.jsxs("div",{className:Ut.exit,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"sign-out",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Ut.text,children:"Exit"})]}),mo="_navbar_2ac63_1",xo="_main_2ac63_6",vo="_block_2ac63_13",Eo="_active_2ac63_30",_e={navbar:mo,main:xo,block:vo,active:Eo},jo=()=>{const{activeBlock:t,setActiveBlock:e}=o.useNavbarStore(),{setActiveBlock:n}=o.useBlocksStore(),{setCurrentBlock:r}=o.useLayersStore(),{setActiveBlock:s}=o.useThemeSettingsStore();function i(a){n(null),e(a),r(null),s(null)}return o.jsxRuntimeExports.jsxs("div",{className:_e.navbar,children:[o.jsxRuntimeExports.jsx(go,{}),o.jsxRuntimeExports.jsx("div",{className:_e.main,children:o.navbarBlocks.map(a=>o.jsxRuntimeExports.jsxs("div",{className:o.clx(_e.block,{[_e.active]:t.icon===a.icon}),onClick:()=>i(a),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:a.icon,fill:t.icon===a.icon?"#252525":"#757575"}),o.jsxRuntimeExports.jsx("span",{children:a.name})]},a.icon))})]})},bo="_preview_1jv6k_1",yo="_main_1jv6k_8",So="_content_1jv6k_18",_o="_loading_1jv6k_25",wo="_loader_1jv6k_33",Ro="_spin_1jv6k_1",ge={preview:bo,main:yo,content:So,loading:_o,loader:wo,spin:Ro},Oo="_header_1t64j_1",To="_circles_1t64j_14",Do="_circle_1t64j_14",Co="_red_1t64j_30",No="_green_1t64j_34",Io="_yellow_1t64j_38",Po="_input_1t64j_42",ko="_main_1t64j_51",Ao="_text_1t64j_59",X={header:Oo,circles:To,circle:Do,red:Co,green:No,yellow:Io,input:Po,main:ko,text:Ao},Bo="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",Lo=["red","yellow","green"],Mo=()=>o.jsxRuntimeExports.jsxs("div",{className:X.header,children:[o.jsxRuntimeExports.jsx("div",{className:X.circles,children:Lo.map(t=>o.jsxRuntimeExports.jsx("div",{className:o.clx(X.circle,{[X.red]:t==="red",[X.yellow]:t==="yellow",[X.green]:t==="green"})},t))}),o.jsxRuntimeExports.jsxs("div",{className:X.input,children:[o.jsxRuntimeExports.jsxs("div",{className:X.main,children:[o.jsxRuntimeExports.jsx("img",{src:Bo,alt:""}),o.jsxRuntimeExports.jsx("span",{className:X.text,children:"lorem.ipsum"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"lock",fill:"#757575",width:15,height:16})]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"copy",width:20,height:20})]})]}),$o="_content_92dk8_1",Fo="_block_92dk8_6",Uo="_active_92dk8_13",Ho="_name_92dk8_17",qo="_empty_92dk8_31",zo="_icon_92dk8_42",Vo="_title_92dk8_53",Go="_text_92dk8_59",Wo="_sections_92dk8_65",Yo="_section_92dk8_65",z={content:$o,block:Fo,active:Uo,name:Ho,empty:qo,icon:zo,title:Vo,text:Go,sections:Wo,section:Yo},Jo="_sidebar_1f3hk_1",Xo="_content_1f3hk_12",Ko="_button_1f3hk_22",Qo="_moveButton_1f3hk_30",Zo="_border_1f3hk_34",ei="_deleteButton_1f3hk_38",M={sidebar:Jo,content:Xo,button:Ko,moveButton:Qo,border:Zo,deleteButton:ei},ti=()=>{const{activeBlock:t}=o.usePreviewStore(),{blocks:e,removeBlock:n,moveBlock:r,duplicateBlock:s}=o.useLayersStore(),{currentPage:i,pages:a}=o.usePagesStore(),c=Object.keys(e[a[i].name]),u=c.indexOf(t),l=()=>{u>0&&r(a[i].name,u,u-1)},d=()=>{u<c.length-1&&r(a[i].name,u,u+1)},p=()=>{s(a[i].name,t)};return o.jsxRuntimeExports.jsx("div",{className:M.sidebar,children:o.jsxRuntimeExports.jsxs("div",{className:M.content,children:[o.jsxRuntimeExports.jsx("button",{onClick:l,className:o.clx(M.button,M.moveButton),disabled:u===0,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-up"})}),o.jsxRuntimeExports.jsx("button",{onClick:d,className:o.clx(M.button,M.moveButton),disabled:u===c.length-1,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-down"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:p,className:o.clx(M.button,M.moveButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"copy"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:()=>n(a[i].name,t),className:o.clx(M.button,M.deleteButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})})},On=({render:t,block:e})=>t(e),ni=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:z.empty,children:[o.jsxRuntimeExports.jsx("div",{className:z.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"file",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:z.title,children:"Empty Page"}),o.jsxRuntimeExports.jsx("div",{className:z.text,children:"Here are the recommended sections for you"}),o.jsxRuntimeExports.jsxs("div",{className:z.sections,children:[Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]})),Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]}))]})]})},ri=E.memo(()=>{const{setActiveBlock:t,activeBlock:e}=o.usePreviewStore(),{blocks:n}=o.useBlocksStore(),{blocks:r}=o.useLayersStore(),{settings:s}=o.useSettingsStore(),{currentPage:i,pages:a,setIsOpenSelectModal:c}=o.usePagesStore(),u=p=>{const v=n[p.name],x=p.value;for(const m in x)v[m]=x[m];return v.renderBlock(s)},l=E.useRef(e);E.useEffect(()=>{l.current=e},[e]),E.useEffect(()=>{const p=()=>{l.current&&t(null)};return document.body.addEventListener("click",p),()=>{document.body.removeEventListener("click",p)}},[]);const d=E.useCallback(p=>u(p),[r]);return o.jsxRuntimeExports.jsxs("div",{onClick:p=>{p.stopPropagation(),c(!1)},className:z.content,children:[r[a[i].name]&&Object.keys(r[a[i].name]).map(p=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>t(p),className:o.clx(z.block,{[z.active]:e===p}),children:[e===p&&o.jsxRuntimeExports.jsx("div",{className:z.name,children:r[a[i].name][p].name}),e===p&&o.jsxRuntimeExports.jsx(ti,{}),o.jsxRuntimeExports.jsx(On,{render:d,block:r[a[i].name][p]})]})),(!r[a[i].name]||Object.keys(r[a[i].name]).length===0)&&o.jsxRuntimeExports.jsx(ni,{})]})}),si="_results_f488n_1",oi="_name_f488n_8",ii="_product_f488n_15",we={results:si,name:oi,product:ii},ai="_search_1s0qp_1",ci="_input_1s0qp_12",Ht={search:ai,input:ci},ui=()=>o.jsxRuntimeExports.jsxs("label",{className:Ht.search,children:[o.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:Ht.input}),o.jsxRuntimeExports.jsx(o.Icon,{name:"search",fill:"#757575"})]}),Tn=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:we.add,children:[o.jsxRuntimeExports.jsx(ui,{}),o.jsxRuntimeExports.jsx("div",{className:we.results,children:Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:we.product,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsx("span",{className:we.name,children:s}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},s))})]})},li=()=>{const{modalPosition:t,color:e,initialColor:n,setShowModal:r,hue:s,saturation:i,brightness:a,dragging:c,setDragging:u,setHue:l,setSaturation:d,setBrightness:p,colorChange:v,setColor:x,update:m}=o.useColorPickerStore(),h=w=>{const{offsetX:C,offsetY:N}=w.nativeEvent;u(!0),b(C,N,w.currentTarget)},g=w=>{if(c){const C=document.querySelector(`.${o.styles.colorMap}`),{left:N,top:k}=C.getBoundingClientRect(),O=w.clientX-N,Z=w.clientY-k;b(O,Z,C)}},j=()=>{u(!1)},b=(w,C,N)=>{const{width:k,height:O}=N.getBoundingClientRect(),Z=Math.max(0,Math.min(w/k*100,100)),be=Math.max(0,Math.min(100-C/O*100,100));d(Z),p(be),y(Z,be)},y=(w,C)=>{const N=I(s,w,C);v(N),x(N)},D=(w,C,N)=>{C/=100,N/=100;const k=ye=>(ye+w/60)%6,O=ye=>N*(1-C*Math.max(0,Math.min(k(ye),4-k(ye),1))),Z=Math.round(255*O(5)),be=Math.round(255*O(3)),Jn=Math.round(255*O(1));return{r:Z,g:be,b:Jn}},R=(w,C,N)=>{const k=O=>O.toString(16).padStart(2,"0");return`#${k(w)}${k(C)}${k(N)}`},I=(w,C,N)=>{const{r:k,g:O,b:Z}=D(w,C,N);return R(k,O,Z)};E.useEffect(()=>{const w=N=>g(N),C=()=>j();return c?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",C)):(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)}},[c]);function P(){m(e),r(!1)}function U(){r(!1),v(n)}return o.jsxRuntimeExports.jsxs("div",{className:o.styles.modal,onClick:w=>w.stopPropagation(),style:{top:`${t.top}px`,left:`${t.left}px`},children:[o.jsxRuntimeExports.jsx("div",{children:"Color"}),o.jsxRuntimeExports.jsx("div",{className:o.styles.colorMap,onMouseDown:h,style:{background:`
6
+ `):" "+Mt(i[0]):"as no adapter specified";throw new S("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:at};function Ye(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new fe(null,t)}function $t(t){return Ye(t),t.headers=B.from(t.headers),t.data=We.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_n.getAdapter(t.adapter||ye.adapter)(t).then(function(r){return Ye(t),r.data=We.call(t,t.transformResponse,r),r.headers=B.from(r.headers),r},function(r){return vn(r)||(Ye(t),r&&r.response&&(r.response.data=We.call(t,t.transformResponse,r.response),r.response.headers=B.from(r.response.headers))),Promise.reject(r)})}const wn="1.7.7",vt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Ft={};vt.transitional=function(e,n,r){function s(i,a){return"[Axios v"+wn+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,c)=>{if(e===!1)throw new S(s(a," has been removed"+(n?" in "+n:"")),S.ERR_DEPRECATED);return n&&!Ft[a]&&(Ft[a]=!0,console.warn(s(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,a,c):!0}};function Qs(t,e,n){if(typeof t!="object")throw new S("options must be an object",S.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const i=r[s],a=e[i];if(a){const c=t[i],u=c===void 0||a(c,i,t);if(u!==!0)throw new S("option "+i+" must be "+u,S.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new S("Unknown option "+i,S.ERR_BAD_OPTION)}}const ct={assertOptions:Qs,validators:vt},ee=ct.validators;class ne{constructor(e){this.defaults=e,this.interceptors={request:new Nt,response:new Nt}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+i):r.stack=i}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&ct.assertOptions(r,{silentJSONParsing:ee.transitional(ee.boolean),forcedJSONParsing:ee.transitional(ee.boolean),clarifyTimeoutError:ee.transitional(ee.boolean)},!1),s!=null&&(f.isFunction(s)?n.paramsSerializer={serialize:s}:ct.assertOptions(s,{encode:ee.function,serialize:ee.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&f.merge(i.common,i[n.method]);i&&f.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=B.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,c.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let d,p=0,v;if(!u){const m=[$t.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,l),v=m.length,d=Promise.resolve(n);p<v;)d=d.then(m[p++],m[p++]);return d}v=c.length;let x=n;for(p=0;p<v;){const m=c[p++],h=c[p++];try{x=m(x)}catch(g){h.call(this,g);break}}try{d=$t.call(this,x)}catch(m){return Promise.reject(m)}for(p=0,v=l.length;p<v;)d=d.then(l[p++],l[p++]);return d}getUri(e){e=re(this.defaults,e);const n=yn(e.baseURL,e.url);return gn(n,e.params,e.paramsSerializer)}}f.forEach(["delete","get","head","options"],function(e){ne.prototype[e]=function(n,r){return this.request(re(r||{},{method:e,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(e){function n(r){return function(i,a,c){return this.request(re(c||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}ne.prototype[e]=n(),ne.prototype[e+"Form"]=n(!0)});class Et{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{r.subscribe(c),i=c}).then(s);return a.cancel=function(){r.unsubscribe(i)},a},e(function(i,a,c){r.reason||(r.reason=new fe(i,a,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Et(function(s){e=s}),cancel:e}}}function Zs(t){return function(n){return t.apply(null,n)}}function eo(t){return f.isObject(t)&&t.isAxiosError===!0}const ut={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ut).forEach(([t,e])=>{ut[e]=t});function Rn(t){const e=new ne(t),n=nn(ne.prototype.request,e);return f.extend(n,ne.prototype,e,{allOwnKeys:!0}),f.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return Rn(re(t,s))},n}const T=Rn(ye);T.Axios=ne;T.CanceledError=fe;T.CancelToken=Et;T.isCancel=vn;T.VERSION=wn;T.toFormData=Be;T.AxiosError=S;T.Cancel=T.CanceledError;T.all=function(e){return Promise.all(e)};T.spread=Zs;T.isAxiosError=eo;T.mergeConfig=re;T.AxiosHeaders=B;T.formToJSON=t=>xn(f.isHTMLForm(t)?new FormData(t):t);T.getAdapter=_n.getAdapter;T.HttpStatusCode=ut;T.default=T;const to="https://g-api.billgang.com",no=async(t="get",e,n)=>{const r=localStorage.getItem("shopId")||void 0,s=`${to}/v2/builder/shops/${r}/${e}`,i=localStorage.getItem("accessToken")||void 0;if(t.toUpperCase()==="GET")return(await T.get(s,{headers:{Authorization:`Bearer ${i}`}})).data;t.toUpperCase()==="POST"&&await T.post(s,{...n},{headers:{Authorization:`Bearer ${i}`}}),t.toUpperCase()==="PUT"&&await T.put(s,{...n},{headers:{Authorization:`Bearer ${i}`}})},ro=()=>{const{currentPage:t,setCurrentPage:e,setIsOpenModal:n,pages:r,setIsEdit:s,setEditedPage:i,deletePage:a,isOpenSelectModal:c,setIsOpenSelectModal:u}=o.usePagesStore(),{deletePage:l}=o.useLayersStore(),[d,p]=E.useState("");return E.useEffect(()=>{const v=()=>{u(!1)};return document.body.addEventListener("click",v),()=>{document.body.removeEventListener("click",v)}},[]),o.jsxRuntimeExports.jsxs("div",{className:X.pages,children:[o.jsxRuntimeExports.jsxs("div",{className:X.default,onClick:v=>{v.stopPropagation(),u(!c)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:r[t].icon,fill:"#252525",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:X.text,children:o.defaultPageNames.includes(r[t].name)?`${J(r[t].name)} page`:r[t].name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-down",width:20,height:20})]}),c&&o.jsxRuntimeExports.jsxs("div",{className:X.modal,onClick:v=>v.stopPropagation(),children:[Object.keys(r).map(v=>{const x=r[v];return o.jsxRuntimeExports.jsxs("div",{className:o.clx(X.page,{[X.hoverable]:d===v}),onMouseEnter:()=>p(v),onMouseLeave:()=>p(""),onClick:()=>{p(""),s(!1),e(v),u(!1)},children:[o.jsxRuntimeExports.jsx(o.Icon,{name:x.icon,fill:"#252525"}),o.jsxRuntimeExports.jsx("span",{className:X.text,children:o.defaultPageNames.includes(x.name)?`${J(x.name)} page`:x.name}),d===v&&o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"settings",fill:"#757575",onClick:m=>{m.stopPropagation(),s(!0),i(v),n(!0)}}),!o.defaultPageNames.includes(x.name)&&o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",fill:"#C12A2A",onClick:m=>{r[t].name===x.name&&e("home"),m.stopPropagation(),a(v),l(x.name)}})]}),r[t].name===x.name&&o.jsxRuntimeExports.jsx(o.Icon,{name:"check",fill:"#FF3F19"})]},v)}),o.jsxRuntimeExports.jsx("div",{className:X.separator}),o.jsxRuntimeExports.jsxs(o.Button,{className:X.button,onClick:v=>{v.stopPropagation(),n(!0)},size:"l",children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#ff3f19"}),o.jsxRuntimeExports.jsx("span",{children:"Create Page Blank"})]})]})]})},so="_zoom_a77cn_1",oo={zoom:so},io=()=>{const[t,e]=E.useState(),n=()=>{e(Number(Math.round(window.devicePixelRatio*50).toFixed(0)))};return E.useEffect(()=>(n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}),[]),o.jsxRuntimeExports.jsxs("div",{className:oo.zoom,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"zoom-minus",width:20,height:20}),o.jsxRuntimeExports.jsxs("span",{children:[t," %"]})]})},ao=()=>o.jsxRuntimeExports.jsxs("div",{className:gr.settings,children:[o.jsxRuntimeExports.jsx(vr,{}),o.jsxRuntimeExports.jsx(ro,{}),o.jsxRuntimeExports.jsx(io,{})]}),co="_theme_3wxbf_1",uo={theme:co},lo=()=>o.jsxRuntimeExports.jsxs("div",{className:uo.theme,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"check",width:18,height:18}),o.jsxRuntimeExports.jsx("div",{children:"Current Theme"})]}),fo=()=>{const{themeSettings:t}=o.useThemeSettingsStore(),{settings:e}=o.useSettingsStore(),[n,r]=E.useState(null),[s,i]=E.useState(!1),{pages:a}=o.usePagesStore(),{blocks:c}=o.useLayersStore();function u(x,m){return m.map(g=>Object.values(g.value).filter(y=>y.type===x).map(y=>y.value).flat()).flat()}function l(x,m){return u(x,m).some(g=>g)}function d(x,m){const h=u(x,m);return Array.isArray(h)&&h.length>0?Math.max(...h):0}function p(x){const m=Object.keys(a).find(h=>a[h].name===x);return m?a[m]:null}const v=()=>{if(s)n&&clearTimeout(n);else{const m=Object.keys(c).map(h=>{const g=p(h);return{name:g?g.name:h,path:h==="home"?"/":(g==null?void 0:g.path)||h,layout:{...c[h]},neededProductIds:[...u("ProductId",Object.values(c[h]))],neededCategoryIds:[...u("CategoryId",Object.values(c[h]))],neededAnnouncementIds:[...u("AnnouncementId",Object.values(c[h]))],neededListingIds:[...u("ListingId",Object.values(c[h]))],neededFaqs:l("Faqs",Object.values(c[h])),neededReviewCount:d("ReviewCount",Object.values(c[h])),seo:{pageTitle:g?g.seo.title:"",pageDescription:g?g.seo.description:""}}});no("POST","save",{themeSettings:t,settings:e,updatedPages:m})}i(!0);const x=setTimeout(()=>{i(!1)},2e3);r(x)};return o.jsxRuntimeExports.jsxs("div",{className:Se.header,children:[o.jsxRuntimeExports.jsxs("div",{className:Se.left,children:[o.jsxRuntimeExports.jsx(ar,{}),o.jsxRuntimeExports.jsx(pr,{})]}),o.jsxRuntimeExports.jsx("div",{className:Se.center,children:o.jsxRuntimeExports.jsx(ao,{})}),o.jsxRuntimeExports.jsxs("div",{className:Se.right,children:[o.jsxRuntimeExports.jsx(lo,{}),o.jsxRuntimeExports.jsx(rr,{}),o.jsxRuntimeExports.jsx(o.Button,{onClick:v,children:"Save"})]})]})},po="_exit_2ce42_1",ho="_text_2ce42_10",Ut={exit:po,text:ho},go=()=>o.jsxRuntimeExports.jsxs("div",{className:Ut.exit,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"sign-out",width:20,height:20}),o.jsxRuntimeExports.jsx("span",{className:Ut.text,children:"Exit"})]}),mo="_navbar_2ac63_1",xo="_main_2ac63_6",vo="_block_2ac63_13",Eo="_active_2ac63_30",_e={navbar:mo,main:xo,block:vo,active:Eo},yo=()=>{const{activeBlock:t,setActiveBlock:e}=o.useNavbarStore(),{setActiveBlock:n}=o.useBlocksStore(),{setCurrentBlock:r}=o.useLayersStore(),{setActiveBlock:s}=o.useThemeSettingsStore();function i(a){n(null),e(a),r(null),s(null)}return o.jsxRuntimeExports.jsxs("div",{className:_e.navbar,children:[o.jsxRuntimeExports.jsx(go,{}),o.jsxRuntimeExports.jsx("div",{className:_e.main,children:o.navbarBlocks.map(a=>o.jsxRuntimeExports.jsxs("div",{className:o.clx(_e.block,{[_e.active]:t.icon===a.icon}),onClick:()=>i(a),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:a.icon,fill:t.icon===a.icon?"#252525":"#757575"}),o.jsxRuntimeExports.jsx("span",{children:a.name})]},a.icon))})]})},bo="_preview_jui5n_1",jo="_main_jui5n_9",So="_content_jui5n_19",_o="_loading_jui5n_26",wo="_loader_jui5n_34",Ro="_spin_jui5n_1",ge={preview:bo,main:jo,content:So,loading:_o,loader:wo,spin:Ro},Oo="_header_1t64j_1",To="_circles_1t64j_14",Do="_circle_1t64j_14",Co="_red_1t64j_30",No="_green_1t64j_34",Io="_yellow_1t64j_38",Po="_input_1t64j_42",ko="_main_1t64j_51",Ao="_text_1t64j_59",K={header:Oo,circles:To,circle:Do,red:Co,green:No,yellow:Io,input:Po,main:ko,text:Ao},Bo="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",Lo=["red","yellow","green"],Mo=()=>o.jsxRuntimeExports.jsxs("div",{className:K.header,children:[o.jsxRuntimeExports.jsx("div",{className:K.circles,children:Lo.map(t=>o.jsxRuntimeExports.jsx("div",{className:o.clx(K.circle,{[K.red]:t==="red",[K.yellow]:t==="yellow",[K.green]:t==="green"})},t))}),o.jsxRuntimeExports.jsxs("div",{className:K.input,children:[o.jsxRuntimeExports.jsxs("div",{className:K.main,children:[o.jsxRuntimeExports.jsx("img",{src:Bo,alt:""}),o.jsxRuntimeExports.jsx("span",{className:K.text,children:"lorem.ipsum"}),o.jsxRuntimeExports.jsx(o.Icon,{name:"lock",fill:"#757575",width:15,height:16})]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"copy",width:20,height:20})]})]}),$o="_content_92dk8_1",Fo="_block_92dk8_6",Uo="_active_92dk8_13",Ho="_name_92dk8_17",qo="_empty_92dk8_31",zo="_icon_92dk8_42",Vo="_title_92dk8_53",Go="_text_92dk8_59",Wo="_sections_92dk8_65",Yo="_section_92dk8_65",z={content:$o,block:Fo,active:Uo,name:Ho,empty:qo,icon:zo,title:Vo,text:Go,sections:Wo,section:Yo},Jo="_sidebar_1f3hk_1",Xo="_content_1f3hk_12",Ko="_button_1f3hk_22",Qo="_moveButton_1f3hk_30",Zo="_border_1f3hk_34",ei="_deleteButton_1f3hk_38",M={sidebar:Jo,content:Xo,button:Ko,moveButton:Qo,border:Zo,deleteButton:ei},ti=()=>{const{activeBlock:t}=o.usePreviewStore(),{blocks:e,removeBlock:n,moveBlock:r,duplicateBlock:s}=o.useLayersStore(),{currentPage:i,pages:a}=o.usePagesStore(),c=Object.keys(e[a[i].name]),u=c.indexOf(t),l=()=>{u>0&&r(a[i].name,u,u-1)},d=()=>{u<c.length-1&&r(a[i].name,u,u+1)},p=()=>{s(a[i].name,t)};return o.jsxRuntimeExports.jsx("div",{className:M.sidebar,children:o.jsxRuntimeExports.jsxs("div",{className:M.content,children:[o.jsxRuntimeExports.jsx("button",{onClick:l,className:o.clx(M.button,M.moveButton),disabled:u===0,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-up"})}),o.jsxRuntimeExports.jsx("button",{onClick:d,className:o.clx(M.button,M.moveButton),disabled:u===c.length-1,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-preview-down"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:p,className:o.clx(M.button,M.moveButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"copy"})}),o.jsxRuntimeExports.jsx("div",{className:M.border}),o.jsxRuntimeExports.jsx("button",{onClick:()=>n(a[i].name,t),className:o.clx(M.button,M.deleteButton),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})})},On=({render:t,block:e})=>t(e),ni=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:z.empty,children:[o.jsxRuntimeExports.jsx("div",{className:z.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"file",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:z.title,children:"Empty Page"}),o.jsxRuntimeExports.jsx("div",{className:z.text,children:"Here are the recommended sections for you"}),o.jsxRuntimeExports.jsxs("div",{className:z.sections,children:[Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]})),Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:z.section,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsxs("span",{children:[s," Sections"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"plus"})]}))]})]})},ri=E.memo(()=>{const{setActiveBlock:t,activeBlock:e}=o.usePreviewStore(),{blocks:n}=o.useBlocksStore(),{blocks:r}=o.useLayersStore(),{settings:s}=o.useSettingsStore(),{currentPage:i,pages:a,setIsOpenSelectModal:c}=o.usePagesStore(),u=p=>{const v=n[p.name],x=p.value;for(const m in x)v[m]=x[m];return v.renderBlock(s)},l=E.useRef(e);E.useEffect(()=>{l.current=e},[e]),E.useEffect(()=>{const p=()=>{l.current&&t(null)};return document.body.addEventListener("click",p),()=>{document.body.removeEventListener("click",p)}},[]);const d=E.useCallback(p=>u(p),[r]);return o.jsxRuntimeExports.jsxs("div",{onClick:p=>{p.stopPropagation(),c(!1)},className:z.content,children:[r[a[i].name]&&Object.keys(r[a[i].name]).map(p=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>t(p),className:o.clx(z.block,{[z.active]:e===p}),children:[e===p&&o.jsxRuntimeExports.jsx("div",{className:z.name,children:r[a[i].name][p].name}),e===p&&o.jsxRuntimeExports.jsx(ti,{}),o.jsxRuntimeExports.jsx(On,{render:d,block:r[a[i].name][p]})]})),(!r[a[i].name]||Object.keys(r[a[i].name]).length===0)&&o.jsxRuntimeExports.jsx(ni,{})]})}),si="_results_f488n_1",oi="_name_f488n_8",ii="_product_f488n_15",we={results:si,name:oi,product:ii},ai="_search_1s0qp_1",ci="_input_1s0qp_12",Ht={search:ai,input:ci},ui=()=>o.jsxRuntimeExports.jsxs("label",{className:Ht.search,children:[o.jsxRuntimeExports.jsx("input",{type:"text",placeholder:"Search for sections",className:Ht.input}),o.jsxRuntimeExports.jsx(o.Icon,{name:"search",fill:"#757575"})]}),Tn=()=>{const{blocks:t,setActiveBlock:e}=o.useBlocksStore(),{hideModal:n}=o.useSubmodalStore();function r(s){e(s),n()}return o.jsxRuntimeExports.jsxs("div",{className:we.add,children:[o.jsxRuntimeExports.jsx(ui,{}),o.jsxRuntimeExports.jsx("div",{className:we.results,children:Object.keys(t).map(s=>o.jsxRuntimeExports.jsxs("div",{className:we.product,onClick:()=>r(s),children:[o.jsxRuntimeExports.jsx("span",{className:we.name,children:s}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},s))})]})},li=()=>{const{modalPosition:t,color:e,initialColor:n,setShowModal:r,hue:s,saturation:i,brightness:a,dragging:c,setDragging:u,setHue:l,setSaturation:d,setBrightness:p,colorChange:v,setColor:x,update:m}=o.useColorPickerStore(),h=w=>{const{offsetX:C,offsetY:N}=w.nativeEvent;u(!0),b(C,N,w.currentTarget)},g=w=>{if(c){const C=document.querySelector(`.${o.styles.colorMap}`),{left:N,top:k}=C.getBoundingClientRect(),O=w.clientX-N,Z=w.clientY-k;b(O,Z,C)}},y=()=>{u(!1)},b=(w,C,N)=>{const{width:k,height:O}=N.getBoundingClientRect(),Z=Math.max(0,Math.min(w/k*100,100)),be=Math.max(0,Math.min(100-C/O*100,100));d(Z),p(be),j(Z,be)},j=(w,C)=>{const N=I(s,w,C);v(N),x(N)},D=(w,C,N)=>{C/=100,N/=100;const k=je=>(je+w/60)%6,O=je=>N*(1-C*Math.max(0,Math.min(k(je),4-k(je),1))),Z=Math.round(255*O(5)),be=Math.round(255*O(3)),Jn=Math.round(255*O(1));return{r:Z,g:be,b:Jn}},R=(w,C,N)=>{const k=O=>O.toString(16).padStart(2,"0");return`#${k(w)}${k(C)}${k(N)}`},I=(w,C,N)=>{const{r:k,g:O,b:Z}=D(w,C,N);return R(k,O,Z)};E.useEffect(()=>{const w=N=>g(N),C=()=>y();return c?(document.addEventListener("mousemove",w),document.addEventListener("mouseup",C)):(document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)),()=>{document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C)}},[c]);function P(){m(e),r(!1)}function U(){r(!1),v(n)}return o.jsxRuntimeExports.jsxs("div",{className:o.styles.modal,onClick:w=>w.stopPropagation(),style:{top:`${t.top}px`,left:`${t.left}px`},children:[o.jsxRuntimeExports.jsx("div",{children:"Color"}),o.jsxRuntimeExports.jsx("div",{className:o.styles.colorMap,onMouseDown:h,style:{background:`
8
8
  linear-gradient(to top, black, transparent),
9
9
  linear-gradient(to right, hsl(${s}, 100%, 100%), hsl(${s}, 100%, 50%))
10
- `},children:o.jsxRuntimeExports.jsx("div",{className:o.styles.indicator,style:{position:"absolute",left:`${i}%`,top:`${100-a}%`,transform:"translate(-50%, -50%)"}})}),o.jsxRuntimeExports.jsx("div",{className:o.styles.hueSlider,children:o.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:s,onChange:w=>{l(Number(w.target.value)),y(i,a)},className:o.styles.slider})}),o.jsxRuntimeExports.jsxs("div",{className:o.styles.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{onClick:U,className:o.clx(o.styles.applyButton,o.styles.cancelButton),children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:P,className:o.styles.applyButton,children:"Apply"})]})]})},di=()=>{const{onPreview:t}=o.usePreviewStore(),{hoverBlockId:e,isModalVisible:n,isPreviewVisible:r}=o.useSubmodalStore(),{settings:s}=o.useSettingsStore(),{blocks:i}=o.useBlocksStore(),{blocks:a}=o.useLayersStore(),{currentPage:c,pages:u}=o.usePagesStore(),{showModal:l}=o.useColorPickerStore(),[d,p]=E.useState(!0);E.useEffect(()=>{t&&setTimeout(()=>{p(!1)},100)},[t]);const v=x=>{if(!x)return;const m=i[x.name],h=x.value;for(const g in h)m[g]=h[g];return m.renderBlock(s)};return o.jsxRuntimeExports.jsxs("div",{className:ge.preview,children:[n&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(Tn,{})}),r&&e&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(On,{render:v,block:a[u[c].name][e]})}),l&&o.jsxRuntimeExports.jsx(li,{}),t&&o.jsxRuntimeExports.jsxs("div",{className:ge.main,children:[o.jsxRuntimeExports.jsx(Mo,{}),o.jsxRuntimeExports.jsx("div",{className:ge.content,children:d?o.jsxRuntimeExports.jsx("div",{className:ge.loading,children:o.jsxRuntimeExports.jsx("div",{className:ge.loader})}):o.jsxRuntimeExports.jsx(ri,{})})]})]})},fi="_sidebar_xqbqi_1",pi="_title_xqbqi_11",hi="_active_xqbqi_19",qt={sidebar:fi,title:pi,active:hi},Dn=E.createContext({dragDropManager:void 0});function $(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var zt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Je=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Je(),REPLACE:"@@redux/REPLACE"+Je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Je()}};function gi(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mi(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Ei(t))return"date";if(vi(t))return"error";var n=xi(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function xi(t){return typeof t.constructor=="function"?t.constructor.name:null}function vi(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Ei(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function oe(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=mi(t)),e}function Cn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?$(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?$(1):"Expected the enhancer to be a function. Instead, received: '"+oe(n)+"'");return n(Cn)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?$(2):"Expected the root reducer to be a function. Instead, received: '"+oe(t)+"'");var s=t,i=e,a=[],c=a,u=!1;function l(){c===a&&(c=a.slice())}function d(){if(u)throw new Error(process.env.NODE_ENV==="production"?$(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(4):"Expected the listener to be a function. Instead, received: '"+oe(h)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?$(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var g=!0;return l(),c.push(h),function(){if(g){if(u)throw new Error(process.env.NODE_ENV==="production"?$(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,l();var b=c.indexOf(h);c.splice(b,1),a=null}}}function v(h){if(!gi(h))throw new Error(process.env.NODE_ENV==="production"?$(7):"Actions must be plain objects. Instead, the actual type was: '"+oe(h)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?$(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?$(9):"Reducers may not dispatch actions.");try{u=!0,i=s(i,h)}finally{u=!1}for(var g=a=c,j=0;j<g.length;j++){var b=g[j];b()}return h}function x(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(10):"Expected the nextReducer to be a function. Instead, received: '"+oe(h));s=h,v({type:Vt.REPLACE})}function m(){var h,g=p;return h={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?$(11):"Expected the observer to be an object. Instead, received: '"+oe(b)+"'");function y(){b.next&&b.next(d())}y();var D=g(y);return{unsubscribe:D}}},h[zt]=function(){return this},h}return v({type:Vt.INIT}),r={dispatch:v,subscribe:p,getState:d,replaceReducer:x},r[zt]=m,r}function _(t,e,...n){if(ji()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(e.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function ji(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function bi(t,e,n){return e.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,t)}function yi(t,e){return t.filter(n=>n!==e)}function Nn(t){return typeof t=="object"}function Si(t,e){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(r),e.forEach(r);const s=[];return n.forEach((i,a)=>{i===1&&s.push(a)}),s}function _i(t,e){return t.filter(n=>e.indexOf(n)>-1)}const jt="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",bt="dnd-core/PUBLISH_DRAG_SOURCE",$e="dnd-core/HOVER",Fe="dnd-core/DROP",Ue="dnd-core/END_DRAG";function Gt(t,e){return{type:jt,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const wi={type:jt,payload:{clientOffset:null,sourceClientOffset:null}};function Ri(t){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=r,c=t.getMonitor(),u=t.getRegistry();t.dispatch(Gt(i)),Oi(n,c,u);const l=Ci(n,c);if(l==null){t.dispatch(wi);return}let d=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Ti(a),d=a(l)}t.dispatch(Gt(i,d));const v=u.getSource(l).beginDrag(c,l);if(v==null)return;Di(v),u.pinSource(l);const x=u.getSourceType(l);return{type:Me,payload:{itemType:x,item:v,sourceId:l,clientOffset:i||null,sourceClientOffset:d||null,isSourcePublic:!!s}}}}function Oi(t,e,n){_(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){_(n.getSource(r),"Expected sourceIds to be registered.")})}function Ti(t){_(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Di(t){_(Nn(t),"Item must be an object.")}function Ci(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function Ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ii(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ni(t,s,n[s])})}return t}function Pi(t){return function(n={}){const r=t.getMonitor(),s=t.getRegistry();ki(r),Li(r).forEach((a,c)=>{const u=Ai(a,c,s,r),l={type:Fe,payload:{dropResult:Ii({},n,u)}};t.dispatch(l)})}}function ki(t){_(t.isDragging(),"Cannot call drop while not dragging."),_(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Ai(t,e,n,r){const s=n.getTarget(t);let i=s?s.drop(r,t):void 0;return Bi(i),typeof i>"u"&&(i=e===0?{}:r.getDropResult()),i}function Bi(t){_(typeof t>"u"||Nn(t),"Drop result must either be an object or undefined.")}function Li(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Mi(t){return function(){const n=t.getMonitor(),r=t.getRegistry();$i(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:Ue}}}function $i(t){_(t.isDragging(),"Cannot call endDrag while not dragging.")}function lt(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Fi(t){return function(n,{clientOffset:r}={}){Ui(n);const s=n.slice(0),i=t.getMonitor(),a=t.getRegistry(),c=i.getItemType();return qi(s,a,c),Hi(s,i,a),zi(s,i,a),{type:$e,payload:{targetIds:s,clientOffset:r||null}}}}function Ui(t){_(Array.isArray(t),"Expected targetIds to be an array.")}function Hi(t,e,n){_(e.isDragging(),"Cannot call hover while not dragging."),_(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const s=t[r];_(t.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(s);_(i,"Expected targetIds to be registered.")}}function qi(t,e,n){for(let r=t.length-1;r>=0;r--){const s=t[r],i=e.getTargetType(s);lt(i,n)||t.splice(r,1)}}function zi(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Vi(t){return function(){if(t.getMonitor().isDragging())return{type:bt}}}function Gi(t){return{beginDrag:Ri(t),publishDragSource:Vi(t),hover:Fi(t),drop:Pi(t),endDrag:Mi(t)}}class Wi{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(i){return(...a)=>{const c=i.apply(e,a);typeof c<"u"&&n(c)}}const s=Gi(this);return Object.keys(s).reduce((i,a)=>{const c=s[a];return i[a]=r(c),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Yi(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ji(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Yi(e,r),n)}function Xi(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const xe=[],yt=[];xe.__IS_NONE__=!0;yt.__IS_ALL__=!0;function Ki(t,e){return t===xe?!1:t===yt||typeof e>"u"?!0:_i(e,t).length>0}class Qi{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;_(typeof e=="function","listener must be a function."),_(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),c=a.stateId;try{c===s||c===s+1&&!Ki(a.dirtyHandlerIds,r)||e()}finally{s=c}};return this.store.subscribe(i)}subscribeToOffsetChange(e){_(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return _(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(_(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),s=this.getItemType();return lt(r,s)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(_(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),s=this.getItemType();return r!==s?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),i=this.getItemType();if(i&&!lt(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return r?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ji(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Xi(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Wt=typeof global<"u"?global:self,Pn=Wt.MutationObserver||Wt.WebKitMutationObserver;function kn(t){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),t()}}}function Zi(t){let e=1;const n=new Pn(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const ea=typeof Pn=="function"?Zi:kn;class ta{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,s=e.length-this.index;r<s;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ea(this.flush),this.requestErrorThrow=kn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class na{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class ra{create(e){const n=this.freeTasks,r=n.length?n.pop():new na(this.onError,s=>n[n.length]=s);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const An=new ta,sa=new ra(An.registerPendingError);function oa(t){An.enqueueTask(sa.create(t))}const St="dnd-core/ADD_SOURCE",_t="dnd-core/ADD_TARGET",wt="dnd-core/REMOVE_SOURCE",He="dnd-core/REMOVE_TARGET";function ia(t){return{type:St,payload:{sourceId:t}}}function aa(t){return{type:_t,payload:{targetId:t}}}function ca(t){return{type:wt,payload:{sourceId:t}}}function ua(t){return{type:He,payload:{targetId:t}}}function la(t){_(typeof t.canDrag=="function","Expected canDrag to be a function."),_(typeof t.beginDrag=="function","Expected beginDrag to be a function."),_(typeof t.endDrag=="function","Expected endDrag to be a function.")}function da(t){_(typeof t.canDrop=="function","Expected canDrop to be a function."),_(typeof t.hover=="function","Expected hover to be a function."),_(typeof t.drop=="function","Expected beginDrag to be a function.")}function dt(t,e){if(e&&Array.isArray(t)){t.forEach(n=>dt(n,!1));return}_(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var F;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(F||(F={}));let fa=0;function pa(){return fa++}function ha(t){const e=pa().toString();switch(t){case F.SOURCE:return`S${e}`;case F.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Yt(t){switch(t[0]){case"S":return F.SOURCE;case"T":return F.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Jt(t,e){const n=t.entries();let r=!1;do{const{done:s,value:[,i]}=n.next();if(i===e)return!0;r=!!s}while(!r);return!1}class ga{addSource(e,n){dt(e),la(n);const r=this.addHandler(F.SOURCE,e,n);return this.store.dispatch(ia(r)),r}addTarget(e,n){dt(e,!0),da(n);const r=this.addHandler(F.TARGET,e,n);return this.store.dispatch(aa(r)),r}containsHandler(e){return Jt(this.dragSources,e)||Jt(this.dropTargets,e)}getSource(e,n=!1){return _(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return _(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Yt(e)===F.SOURCE}isTargetId(e){return Yt(e)===F.TARGET}removeSource(e){_(this.getSource(e),"Expected an existing source."),this.store.dispatch(ca(e)),oa(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){_(this.getTarget(e),"Expected an existing target."),this.store.dispatch(ua(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);_(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){_(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const s=ha(e);return this.types.set(s,n),e===F.SOURCE?this.dragSources.set(s,r):e===F.TARGET&&this.dropTargets.set(s,r),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const ma=(t,e)=>t===e;function xa(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function va(t,e,n=ma){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Ea(t=xe,e){switch(e.type){case $e:break;case St:case _t:case He:case wt:return xe;case Me:case bt:case Ue:case Fe:default:return yt}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,s=Si(n,r);if(!(s.length>0||!va(n,r)))return xe;const a=r[r.length-1],c=n[n.length-1];return a!==c&&(a&&s.push(a),c&&s.push(c)),s}function ja(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ba(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){ja(t,s,n[s])})}return t}const Xt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ya(t=Xt,e){const{payload:n}=e;switch(e.type){case jt:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case $e:return xa(t.clientOffset,n.clientOffset)?t:ba({},t,{clientOffset:n.clientOffset});case Ue:case Fe:return Xt;default:return t}}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Sa(t,s,n[s])})}return t}const _a={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function wa(t=_a,e){const{payload:n}=e;switch(e.type){case Me:return ie({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case bt:return ie({},t,{isSourcePublic:!0});case $e:return ie({},t,{targetIds:n.targetIds});case He:return t.targetIds.indexOf(n.targetId)===-1?t:ie({},t,{targetIds:yi(t.targetIds,n.targetId)});case Fe:return ie({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ue:return ie({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Ra(t=0,e){switch(e.type){case St:case _t:return t+1;case wt:case He:return t-1;default:return t}}function Oa(t=0){return t+1}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Da(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ta(t,s,n[s])})}return t}function Ca(t={},e){return{dirtyHandlerIds:Ea(t.dirtyHandlerIds,{type:e.type,payload:Da({},e.payload,{prevTargetIds:bi(t,"dragOperation.targetIds",[])})}),dragOffset:ya(t.dragOffset,e),refCount:Ra(t.refCount,e),dragOperation:wa(t.dragOperation,e),stateId:Oa(t.stateId)}}function Na(t,e=void 0,n={},r=!1){const s=Ia(r),i=new Qi(s,new ga(s)),a=new Wi(s,i),c=t(a,e,n);return a.receiveBackend(c),a}function Ia(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Cn(Ca,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Pa(t,e){if(t==null)return{};var n=ka(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ka(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let Kt=0;const Ce=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Aa=E.memo(function(e){var{children:n}=e,r=Pa(e,["children"]);const[s,i]=Ba(r);return E.useEffect(()=>{if(i){const a=Bn();return++Kt,()=>{--Kt===0&&(a[Ce]=null)}}},[]),o.jsxRuntimeExports.jsx(Dn.Provider,{value:s,children:n})});function Ba(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=La(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function La(t,e=Bn(),n,r){const s=e;return s[Ce]||(s[Ce]={dragDropManager:Na(t,e,n,r)}),s[Ce]}function Bn(){return typeof global<"u"?global:window}var Ma=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var a=i[s];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n};const $a=o.getDefaultExportFromCjs(Ma),se=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Fa(t,e,n){const[r,s]=E.useState(()=>e(t)),i=E.useCallback(()=>{const a=e(t);$a(r,a)||(s(a),n&&n())},[r,t,n]);return se(i),[r,i]}function Ua(t,e,n){const[r,s]=Fa(t,e,n);return se(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(s,{handlerIds:[a]})},[t,s]),r}function Ln(t,e,n){return Ua(e,t||(()=>({})),()=>n.reconnect())}function Mn(t,e){const n=[];return typeof t!="function"&&n.push(t),E.useMemo(()=>typeof t=="function"?t():t,n)}function Ha(t){return E.useMemo(()=>t.hooks.dragSource(),[t])}function qa(t){return E.useMemo(()=>t.hooks.dragPreview(),[t])}let Xe=!1,Ke=!1;class za{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){_(!Xe,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Xe=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Xe=!1}}isDragging(){if(!this.sourceId)return!1;_(!Ke,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ke=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ke=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Qe=!1;class Va{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;_(!Qe,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Qe=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Qe=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Ga(t,e,n){const r=n.getRegistry(),s=r.addTarget(t,e);return[s,()=>r.removeTarget(s)]}function Wa(t,e,n){const r=n.getRegistry(),s=r.addSource(t,e);return[s,()=>r.removeSource(s)]}function ft(t,e,n,r){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let u=0;u<i.length;u++){const l=i[u];if(!c(l))return!1;const d=t[l],p=e[l];if(s=void 0,s===!1||s===void 0&&d!==p)return!1}return!0}function pt(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ya(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ja(t){return(e=null,n=null)=>{if(!E.isValidElement(e)){const i=e;return t(i,n),i}const r=e;return Ya(r),Xa(r,n?i=>t(i,n):t)}}function $n(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const s=Ja(r);e[n]=()=>s}}),e}function Qt(t,e){typeof t=="function"?t(e):t.current=e}function Xa(t,e){const n=t.ref;return _(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(t,{ref:r=>{Qt(n,r),Qt(e,r)}}):E.cloneElement(t,{ref:e})}class Ka{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ft(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ft(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=$n({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,pt(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,pt(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Qa{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ft(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=$n({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,pt(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function pe(){const{dragDropManager:t}=E.useContext(Dn);return _(t!=null,"Expected drag drop context"),t}function Za(t,e){const n=pe(),r=E.useMemo(()=>new Ka(n.getBackend()),[n]);return se(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),se(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function ec(){const t=pe();return E.useMemo(()=>new za(t),[t])}class tc{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,s=this.monitor,{isDragging:i}=r;return i?i(s):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:s}=e;s&&s(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function nc(t,e,n){const r=E.useMemo(()=>new tc(t,e,n),[e,n]);return E.useEffect(()=>{r.spec=t},[t]),r}function rc(t){return E.useMemo(()=>{const e=t.type;return _(e!=null,"spec.type must be defined"),e},[t])}function sc(t,e,n){const r=pe(),s=nc(t,e,n),i=rc(t);se(function(){if(i!=null){const[c,u]=Wa(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,s,i])}function oc(t,e){const n=Mn(t);_(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=ec(),s=Za(n.options,n.previewOptions);return sc(n,r,s),[Ln(n.collect,r,s),Ha(s),qa(s)]}function ic(t){return E.useMemo(()=>t.hooks.dropTarget(),[t])}function ac(t){const e=pe(),n=E.useMemo(()=>new Qa(e.getBackend()),[e]);return se(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function cc(){const t=pe();return E.useMemo(()=>new Va(t),[t])}function uc(t){const{accept:e}=t;return E.useMemo(()=>(_(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class lc{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function dc(t,e){const n=E.useMemo(()=>new lc(t,e),[e]);return E.useEffect(()=>{n.spec=t},[t]),n}function fc(t,e,n){const r=pe(),s=dc(t,e),i=uc(t);se(function(){const[c,u]=Ga(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,s,n,i.map(a=>a.toString()).join("|")])}function pc(t,e){const n=Mn(t),r=cc(),s=ac(n.options);return fc(n,r,s),[Ln(n.collect,r,s),ic(s)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function hc(t,e){return t.filter(n=>n!==e)}function gc(t,e){const n=new Set,r=i=>n.add(i);t.forEach(r),e.forEach(r);const s=[];return n.forEach(i=>s.push(i)),s}class mc{enter(e){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=gc(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=hc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class xc{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Un="__NATIVE_FILE__",Hn="__NATIVE_URL__",qn="__NATIVE_TEXT__",zn="__NATIVE_HTML__",Zt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Un,HTML:zn,TEXT:qn,URL:Hn},Symbol.toStringTag,{value:"Module"}));function Ze(t,e,n){const r=e.reduce((s,i)=>s||t.getData(i),"");return r??n}const ht={[Un]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[zn]:{exposeProperties:{html:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Hn]:{exposeProperties:{urls:(t,e)=>Ze(t,e,"").split(`
11
- `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[qn]:{exposeProperties:{text:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function vc(t,e){const n=ht[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new xc(n);return r.loadDataTransfer(e),r}function et(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(ht).filter(n=>{const r=ht[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const Ec=Fn(()=>/firefox/i.test(navigator.userAgent)),Vn=Fn(()=>!!window.safari);class en{interpolate(e){const{xs:n,ys:r,c1s:s,c2s:i,c3s:a}=this;let c=n.length-1;if(e===n[c])return r[c];let u=0,l=a.length-1,d;for(;u<=l;){d=Math.floor(.5*(u+l));const x=n[d];if(x<e)u=d+1;else if(x>e)l=d-1;else return r[d]}c=Math.max(0,l);const p=e-n[c],v=p*p;return r[c]+s[c]*p+i[c]*v+a[c]*p*v}constructor(e,n){const{length:r}=e,s=[];for(let x=0;x<r;x++)s.push(x);s.sort((x,m)=>e[x]<e[m]?-1:1);const i=[],a=[];let c,u;for(let x=0;x<r-1;x++)c=e[x+1]-e[x],u=n[x+1]-n[x],i.push(c),a.push(u/c);const l=[a[0]];for(let x=0;x<i.length-1;x++){const m=a[x],h=a[x+1];if(m*h<=0)l.push(0);else{c=i[x];const g=i[x+1],j=c+g;l.push(3*j/((j+g)/m+(j+c)/h))}}l.push(a[a.length-1]);const d=[],p=[];let v;for(let x=0;x<l.length-1;x++){v=a[x];const m=l[x],h=1/i[x],g=m+l[x+1]-v-v;d.push((v-m-g)*h),p.push(g*h*h)}this.xs=e,this.ys=n,this.c1s=l,this.c2s=d,this.c3s=p}}const jc=1;function Gn(t){const e=t.nodeType===jc?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Re(t){return{x:t.clientX,y:t.clientY}}function bc(t){var e;return t.nodeName==="IMG"&&(Ec()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function yc(t,e,n,r){let s=t?e.width:n,i=t?e.height:r;return Vn()&&t&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function Sc(t,e,n,r,s){const i=bc(e),c=Gn(i?t:e),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:l,offsetHeight:d}=t,{anchorX:p,anchorY:v}=r,{dragPreviewWidth:x,dragPreviewHeight:m}=yc(i,e,l,d),h=()=>{let I=new en([0,.5,1],[u.y,u.y/d*m,u.y+m-d]).interpolate(v);return Vn()&&i&&(I+=(window.devicePixelRatio-1)*m),I},g=()=>new en([0,.5,1],[u.x,u.x/l*x,u.x+x-l]).interpolate(p),{offsetX:j,offsetY:b}=s,y=j===0||j,D=b===0||b;return{x:y?j:g(),y:D?b:h()}}class _c{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function wc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){wc(t,s,n[s])})}return t}class Rc{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const s=a=>this.handleDragStart(a,e),i=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=a=>this.handleDragEnter(a,e),s=a=>this.handleDragOver(a,e),i=a=>this.handleDrop(a,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return tn({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return tn({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Zt).some(n=>Zt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=vc(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Gn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=Re(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:c}=s,u=et(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const d=this.monitor.getSourceId(),p=this.sourceNodes.get(d),v=this.sourcePreviewNodes.get(d)||p;if(v){const{anchorX:x,anchorY:m,offsetX:h,offsetY:g}=this.getCurrentSourcePreviewNodeOptions(),y=Sc(p,v,a,{anchorX:x,anchorY:m},{offsetX:h,offsetY:g});c.setDragImage(v,y.x,y.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(c&&!c.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:c}=s,u=et(c);u&&this.beginDragNativeItem(u,c)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Re(s)}),i.some(c=>this.monitor.canDropOnTarget(c))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=Re(s),this.scheduleHover(i),(i||[]).some(c=>this.monitor.canDropOnTarget(c))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else et(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Re(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new _c(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new mc(this.isNodeInDocument)}}const Oc=function(e,n,r){return new Rc(e,n,r)},Tc="_layers_62wod_1",Dc="_block_62wod_8",Cc="_dragging_62wod_23",Nc="_active_62wod_31",Ic="_add_62wod_35",Pc="_button_62wod_47",kc="_empty_62wod_60",Ac="_title_62wod_72",Bc="_icon_62wod_79",Lc="_text_62wod_83",Mc="_highlight_62wod_89",V={layers:Tc,block:Dc,dragging:Cc,active:Nc,add:Ic,button:Pc,empty:kc,title:Ac,icon:Bc,text:Lc,highlight:Mc},$c=({id:t,name:e,index:n,moveBlock:r,onClick:s})=>{const{currentPage:i,pages:a}=o.usePagesStore(),{activeBlock:c}=o.usePreviewStore(),{showPreview:u,hidePreview:l,showModal:d,hideModal:p,clearHideTimeout:v,startHideTimeout:x,hoverBlockId:m,isModalVisible:h}=o.useSubmodalStore(),{setPositionBlock:g}=o.useLayersStore(),[j,b]=E.useState(!1),y=()=>{h&&p(),u(t),b(!0),v()},D=w=>{w.stopPropagation(),l(),d(t),v(),g(n+1)},R=()=>{h?x():(b(!1),l())};E.useEffect(()=>{h||b(!1)},[h]);const[,I]=pc({accept:"block",hover(w){w.index!==n&&(r(a[i].name,w.index,n),w.index=n)}}),[{isDragging:P},U]=oc({type:"block",item:{id:t,index:n},collect:w=>({isDragging:w.isDragging()})});return o.jsxRuntimeExports.jsxs("div",{ref:w=>U(I(w)),className:o.clx(V.block,{[V.dragging]:P,[V.active]:!P&&c===t}),onClick:()=>s(t),onMouseEnter:y,onMouseLeave:R,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"cards"}),o.jsxRuntimeExports.jsx("span",{children:e}),(j||m===t)&&!P&&o.jsxRuntimeExports.jsx("div",{className:V.add,children:o.jsxRuntimeExports.jsx("button",{className:V.button,onClick:w=>D(w),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#fff"})})})]})},Fc=()=>{const{setActiveBlock:t}=o.useNavbarStore();return o.jsxRuntimeExports.jsxs("div",{className:V.empty,children:[o.jsxRuntimeExports.jsx("div",{className:V.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"layers",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:V.title,children:"Layers is empty"}),o.jsxRuntimeExports.jsxs("div",{className:V.text,children:["Try adding"," ",o.jsxRuntimeExports.jsx("span",{className:V.highlight,onClick:()=>t({icon:"plus",name:"Add"}),children:"sections"})," ","and recreate your own design"]})]})},Uc=()=>{const{blocks:t,setCurrentBlock:e,moveBlock:n}=o.useLayersStore(),{currentPage:r,pages:s}=o.usePagesStore();function i(a){e(a)}return o.jsxRuntimeExports.jsx(Aa,{backend:Oc,children:o.jsxRuntimeExports.jsxs("div",{className:V.layers,children:[t[s[r].name]&&Object.keys(t[s[r].name]).map((a,c)=>o.jsxRuntimeExports.jsx($c,{id:a,name:t[s[r].name][a].name,index:c,moveBlock:n,onClick:i},a)),(!t[s[r].name]||Object.keys(t[s[r].name]).length===0)&&o.jsxRuntimeExports.jsx(Fc,{})]})})},Hc=()=>{const{settings:t}=o.useSettingsStore();return t==null?void 0:t.renderSettings()},qc="_theme_1xj36_1",zc="_block_1xj36_6",Vc="_name_1xj36_20",tt={theme:qc,block:zc,name:Vc},Gc=()=>{const{setActiveBlock:t}=o.useThemeSettingsStore();function e(n){t(n)}return o.jsxRuntimeExports.jsx("div",{className:tt.theme,children:Kn.map(n=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>e(n),className:o.clx(tt.block),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:n.icon}),o.jsxRuntimeExports.jsx("span",{className:tt.name,children:n.name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},n.icon))})},Wc="_back_1m2pj_1",Yc="_render_1m2pj_8",Jc="_open_1m2pj_23",Xc="_close_1m2pj_27",Kc="_clicked_1m2pj_31",Qc="_title_1m2pj_35",Zc="_button_1m2pj_42",eu="_settings_1m2pj_47",tu="_buttons_1m2pj_51",nu="_deleteButton_1m2pj_57",K={back:Wc,render:Yc,open:Jc,close:Xc,clicked:Kc,title:Qc,button:Zc,settings:eu,buttons:tu,deleteButton:nu},ru=({block:t})=>{if(!t)return;const{blocks:e,sourceBlocks:n,activeBlock:r}=o.useBlocksStore(),{currentBlock:s}=o.useLayersStore();if(!r&&!s)return null;if(t!=null&&t.name){const i=e[t.name],a=t.value;for(const c in a)i[c]=a[c];return i.renderSettings()}else{const i=n[r];for(const a in i)t[a]=i[a];return t.renderSettings()}},su=t=>{var D;const{isAdd:e}=t,[n,r]=E.useState(!1),{setActiveBlock:s}=o.useNavbarStore(),{blocks:i,activeBlock:a,setActiveBlock:c}=o.useBlocksStore(),{blocks:u,addBlock:l,editBlock:d,currentBlock:p,setCurrentBlock:v,removeBlock:x,setPositionBlock:m}=o.useLayersStore(),{currentPage:h,pages:g}=o.usePagesStore();function j(){c(null),v(null),setTimeout(()=>{r(!1)},150)}function b(){j(),s({name:"Layers",icon:"layers"})}function y(){return e?i[a]:i[u[g[h].name]&&u[g[h].name][p]?u[g[h].name][p].name:"null"]}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(K.render,{[K.open]:y(),[K.close]:!y(),[K.clicked]:n}),children:[o.jsxRuntimeExports.jsxs("div",{className:K.back,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:j}),o.jsxRuntimeExports.jsx("h3",{className:K.title,children:a||u[g[h].name]&&((D=u[g[h].name][p])==null?void 0:D.name)||"Loading"})]}),o.jsxRuntimeExports.jsx("div",{className:K.settings,children:y()?o.jsxRuntimeExports.jsx(ru,{block:e?y():u[g[h].name][p]}):o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:"Loading"})}),o.jsxRuntimeExports.jsxs("div",{className:K.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{style:{width:"100%"},onClick:()=>{r(!0);const R=y();e?(l(g[h].name,{name:a,value:{...R}}),m(null)):d(g[h].name,p,{name:u[g[h].name][p].name,value:{...R}}),b()},children:e?"Add Section":"Edit Section"}),!e&&o.jsxRuntimeExports.jsx("button",{onClick:()=>{r(!0),x(g[h].name,p),setTimeout(()=>{r(!1)},150)},className:K.deleteButton,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})]})},ou="_settings_1r85j_1",iu="_open_1r85j_16",au="_close_1r85j_20",cu="_header_1r85j_24",uu="_title_1r85j_30",lu="_addButton_1r85j_37",me={settings:ou,open:iu,close:au,header:cu,title:uu,addButton:lu},du="_wrapper_n1a7x_1",fu="_category_n1a7x_5",pu="_categoryTitle_n1a7x_10",hu="_color_n1a7x_16",gu="_content_n1a7x_24",mu="_preview_n1a7x_32",ae={wrapper:du,category:fu,categoryTitle:pu,color:hu,content:gu,preview:mu},xu=()=>{const{themeSettings:t,updateColor:e}=o.useThemeSettingsStore();async function n(s,i,a){e(s,i,a)}const r=E.useMemo(()=>{const s={};return Object.entries(t.colors).forEach(([i,a])=>{Object.entries(a).forEach(([c,u])=>{s[u]||(s[u]=[]),s[u].push(`${i}-${c}`)})}),Object.keys(s).filter(i=>s[i].length>1)},[t.colors]);return o.jsxRuntimeExports.jsx("div",{className:ae.wrapper,children:Object.entries(t.colors).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:ae.category,children:[o.jsxRuntimeExports.jsx("h2",{className:ae.categoryTitle,children:Y(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsxs("div",{className:ae.color,children:[o.jsxRuntimeExports.jsxs("div",{className:ae.content,children:[o.jsxRuntimeExports.jsx("div",{className:ae.preview,style:{background:c}}),o.jsxRuntimeExports.jsx(o.ColorPicker,{title:Y(a),initialColor:c,onChange:u=>n(s,a,u)})]}),r.includes(c)&&o.jsxRuntimeExports.jsx(o.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},a))]},s))})},vu="_wrapper_kb55x_2",Eu="_category_kb55x_6",ju="_categoryTitle_kb55x_11",bu="_color_kb55x_17",yu="_name_kb55x_23",Su="_content_kb55x_28",_u="_label_kb55x_34",wu="_input_kb55x_45",Ru="_title_kb55x_71",Ou="_field_kb55x_79",Tu="_alignments_kb55x_89",Du="_lineField_kb55x_95",Cu="_style_kb55x_101",Nu="_header_kb55x_108",W={wrapper:vu,category:Eu,categoryTitle:ju,color:bu,name:yu,content:Su,label:_u,input:wu,title:Ru,field:Ou,alignments:Tu,lineField:Du,style:Cu,header:Nu},Iu=["left","center","right"],Pu=["solid","dashed"],Oe=t=>{const{title:e,children:n,rightAddon:r}=t;return o.jsxRuntimeExports.jsxs("div",{className:W.field,children:[o.jsxRuntimeExports.jsxs("div",{className:W.header,children:[o.jsxRuntimeExports.jsx("h4",{children:e}),r]}),n]})},ku=()=>{const{themeSettings:t,updateInput:e}=o.useThemeSettingsStore(),n=E.useMemo(()=>t.inputs,[t]),r=(i,a,c)=>{e(i,a,c)},s=i=>a=>{e(i,a,"color")};return o.jsxRuntimeExports.jsxs("div",{className:W.wrapper,children:[o.jsxRuntimeExports.jsxs(Oe,{title:"General",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(n.general.height),onChange:i=>r("general",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Style name",value:n.general.name,onChange:i=>r("general",i,"name")}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("general",i,"size"),value:String(n.general.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.general.color),onChange:s("general"),title:"Font Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Field Fill",rightAddon:o.jsxRuntimeExports.jsx("div",{className:W.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("field",i,"active"),current:n.field.active})}),children:[o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.field.color),onChange:s("field"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Opacity (%)",value:String(n.field.opacity),onChange:i=>r("field",i,"opacity"),type:"number",min:0})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Border",rightAddon:o.jsxRuntimeExports.jsx("div",{className:W.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("border",i,"active"),current:n.border.active})}),children:[o.jsxRuntimeExports.jsxs("div",{className:W.lineField,children:[o.jsxRuntimeExports.jsxs("div",{className:W.style,children:[o.jsxRuntimeExports.jsx("span",{className:W.title,children:"Style"}),o.jsxRuntimeExports.jsx(o.Picker,{items:Pu,selectedItem:n.border.style,onSelect:i=>r("border",i,"style"),getIconName:i=>`border-${i}`})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Radius (px)",value:String(n.border.radius),onChange:i=>r("border",i,"radius"),type:"number",min:0})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Thickness (px)",value:String(n.border.thickness),onChange:i=>r("border",i,"thickness"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.border.color),onChange:s("border"),title:"Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Label",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Line Height (px)",value:String(n.label.height),onChange:i=>r("label",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("label",i,"size"),value:String(n.label.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:Y(n.label.color),onChange:s("label"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsxs("div",{className:W.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:W.title,children:"Alignment Type"}),o.jsxRuntimeExports.jsx(o.Picker,{items:Iu,selectedItem:n.label.alignment,onSelect:i=>r("label",i,"alignment"),getIconName:i=>`align-${i}`})]})]})]})},Au="_wrapper_k9on2_1",Bu="_category_k9on2_5",Lu="_categoryTitle_k9on2_10",Mu="_font_k9on2_16",$u="_content_k9on2_36",Fu="_icon_k9on2_42",Uu="_paragraph_k9on2_51",Hu="_deleteIcon_k9on2_55",qu="_iconButton_k9on2_62",Q={wrapper:Au,category:Bu,categoryTitle:Lu,font:Mu,content:$u,icon:Fu,paragraph:Uu,deleteIcon:Hu,iconButton:qu},zu=t=>{const{font:e,size:n,id:r,category:s}=t,{setActiveFont:i}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs("div",{className:Q.font,onClick:()=>i(r),children:[o.jsxRuntimeExports.jsx("div",{className:o.clx(Q.icon,{[Q.paragraph]:s==="paragraph"}),children:o.jsxRuntimeExports.jsx(o.Icon,{name:s})}),o.jsxRuntimeExports.jsxs("div",{className:Q.content,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:Y(r)}),o.jsxRuntimeExports.jsx("span",{className:Q.value,children:`${e}, ${n}px`})]})]})},Vu=()=>{const{themeSettings:t,setActiveFont:e,activeBlock:n}=o.useThemeSettingsStore();E.useEffect(()=>(r(),()=>{r()}),[]);function r(){e(null)}if(n!=null&&n.name)return o.jsxRuntimeExports.jsx("div",{className:Q.wrapper,children:Object.entries(t.fonts).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:Q.category,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:Y(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsx(zu,{id:a,category:s,...c},a))]},s))})},Gu="_wrapper_94fpv_1",Wu="_open_94fpv_16",Yu="_close_94fpv_20",Ju="_header_94fpv_24",Xu="_title_94fpv_31",Ku="_options_94fpv_37",Qu="_clicked_94fpv_44",ce={wrapper:Gu,open:Wu,close:Yu,header:Ju,title:Xu,options:Ku,clicked:Qu},Zu=()=>{const{activeBlock:t,setActiveFont:e,activeFont:n,themeSettings:r,updateFont:s}=o.useThemeSettingsStore(),{fonts:i}=o.useFontsStore(),[a,c]=E.useState(null);function u(){e(null)}function l(p,v){a&&n&&s(a,n,v,p)}const d=E.useMemo(()=>n?r.fonts.heading[n]?(c("heading"),r.fonts.heading[n]):r.fonts.paragraph[n]?(c("paragraph"),r.fonts.paragraph[n]):(c(null),null):null,[n,r]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ce.wrapper,{[ce.open]:(t==null?void 0:t.name)==="Fonts"&&n,[ce.close]:(t==null?void 0:t.name)!=="Fonts"||!n}),children:[o.jsxRuntimeExports.jsxs("div",{className:ce.header,onClick:u,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0}),o.jsxRuntimeExports.jsx("span",{className:ce.title,children:"Font Style"})]}),n&&d&&o.jsxRuntimeExports.jsxs("div",{className:ce.options,children:[o.jsxRuntimeExports.jsx(o.Select,{label:"Font",value:d.font,onChange:p=>l(p,"font"),options:[...i.filter(p=>p!==d.font)]}),o.jsxRuntimeExports.jsx(o.Select,{label:"Size",value:String(d.size),onChange:p=>l(p,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Select,{label:"Weight",value:String(d.weight),onChange:p=>l(p,"weight"),options:o.weightOptions})]})]})},el="_wrapper_94fpv_1",tl="_open_94fpv_16",nl="_close_94fpv_20",rl="_header_94fpv_24",sl="_title_94fpv_31",ol="_options_94fpv_37",il="_clicked_94fpv_44",ue={wrapper:el,open:tl,close:nl,header:rl,title:sl,options:ol,clicked:il},Wn=()=>{const{activeBlock:t,themeSettings:e,updateBorder:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.borders,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ue.wrapper,{[ue.open]:(t==null?void 0:t.name)==="Borders",[ue.close]:(t==null?void 0:t.name)!=="Borders"}),children:[o.jsxRuntimeExports.jsxs("div",{className:ue.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:ue.title,children:"Borders Style"})]}),o.jsxRuntimeExports.jsxs("div",{className:ue.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Thickness (px)",value:String(a.thickness),onChange:c=>s(Number(c),"thickness"),type:"number",min:0})]})]})},al="_wrapper_1j33r_1",cl="_open_1j33r_16",ul="_close_1j33r_20",ll="_header_1j33r_24",dl="_title_1j33r_31",fl="_options_1j33r_37",pl="_clicked_1j33r_44",hl="_label_1j33r_48",gl="_alignments_1j33r_55",ml="_blocks_1j33r_61",xl="_alignment_1j33r_55",vl="_active_1j33r_75",H={wrapper:al,open:cl,close:ul,header:ll,title:dl,options:fl,clicked:pl,label:hl,alignments:gl,blocks:ml,alignment:xl,active:vl},El=["left","center","right"],Yn=()=>{const{activeBlock:t,themeSettings:e,updateButton:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.buttons,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(H.wrapper,{[H.open]:(t==null?void 0:t.name)==="Buttons",[H.close]:(t==null?void 0:t.name)!=="Buttons"}),children:[o.jsxRuntimeExports.jsxs("div",{className:H.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:H.title,children:"Buttons Style"})]}),a&&o.jsxRuntimeExports.jsxs("div",{className:H.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(a.height),onChange:c=>s(c,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",value:String(a.size),onChange:c=>s(c,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsxs("div",{className:H.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:H.label,children:"Alignment Type"}),o.jsxRuntimeExports.jsx("div",{className:H.blocks,children:El.map(c=>o.jsxRuntimeExports.jsx("div",{className:o.clx(H.alignment,{[H.active]:a.alignment===c}),onClick:()=>{s(c,"alignment")},children:o.jsxRuntimeExports.jsx(o.Icon,{name:`align-${c}`,fill:a.alignment===c?"#252525":"#757575"})},c))})]})]})]})},jl=()=>{const{activeBlock:t}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(Zu,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Buttons"&&o.jsxRuntimeExports.jsx(Yn,{})]})},bl=()=>{const{activeBlock:t,setActiveBlock:e}=o.useThemeSettingsStore(),{activeBlock:n}=o.useNavbarStore();function r(){e(null)}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(me.settings,{[me.open]:t,[me.close]:!t||n.name!=="Theme"}),children:[o.jsxRuntimeExports.jsxs("div",{className:me.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:r}),o.jsxRuntimeExports.jsx("span",{className:me.title,children:t==null?void 0:t.name})]}),(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(Vu,{}),(t==null?void 0:t.name)==="Colors"&&o.jsxRuntimeExports.jsx(xu,{}),(t==null?void 0:t.name)==="Inputs"&&o.jsxRuntimeExports.jsx(ku,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Yn,{}),o.jsxRuntimeExports.jsx(jl,{})]})},yl=()=>{const{activeBlock:t}=o.useNavbarStore(),{activeBlock:e}=o.useBlocksStore();function n(){switch(t.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return o.jsxRuntimeExports.jsxs("div",{className:qt.sidebar,children:[o.jsxRuntimeExports.jsx("h3",{className:qt.title,children:n()}),t.name==="Layers"&&o.jsxRuntimeExports.jsx(Uc,{}),t.name==="Add"&&o.jsxRuntimeExports.jsx(Tn,{}),o.jsxRuntimeExports.jsx(su,{isAdd:!!e}),o.jsxRuntimeExports.jsx(bl,{}),t.name==="Theme"&&o.jsxRuntimeExports.jsx(Gc,{}),t.name==="Settings"&&o.jsxRuntimeExports.jsx(Hc,{})]})},Sl="_wrapper_jjfwh_1",_l="_header_jjfwh_12",wl="_content_jjfwh_21",Rl="_buttons_jjfwh_29",Ol="_cancel_jjfwh_35",Tl="_label_jjfwh_40",Dl="_description_jjfwh_41",Cl="_preview_jjfwh_49",Nl="_block_jjfwh_55",Il="_slug_jjfwh_63",Pl="_title_jjfwh_69",q={wrapper:Sl,header:_l,content:wl,buttons:Rl,cancel:Ol,label:Tl,description:Dl,preview:Cl,block:Nl,slug:Il,title:Pl},kl=()=>{var P,U,w,C,N,k;const{setIsOpenModal:t,pages:e,createPage:n,updatePage:r,isEdit:s,setIsEdit:i,editedPage:a,setEditedPage:c}=o.usePagesStore(),{createPage:u,updatePage:l}=o.useLayersStore(),[d,p]=E.useState(a?(P=e[a])==null?void 0:P.path:""),[v,x]=E.useState(a?(U=e[a])==null?void 0:U.name:""),[m,h]=E.useState(a?(w=e[a])==null?void 0:w.seo.description:""),[g,j]=E.useState(a?(C=e[a])==null?void 0:C.visibility:"public");function b(){p(""),x(""),h(""),j("public"),i(!1),c(null)}function y(){b(),t(!1)}function D(O){return O[0]==="/"?O:"/"+O}function R(){n({path:D(d),name:v||d,icon:"file",seo:{title:v,description:m},visibility:g}),u(v),y()}function I(){l(e[a].name,v||d),r(a,{path:D(d),name:v||d,icon:e[a].icon||"file",seo:{title:v,description:m},visibility:g}),y()}return o.jsxRuntimeExports.jsxs("div",{className:q.wrapper,onClick:O=>O.stopPropagation(),children:[o.jsxRuntimeExports.jsxs("div",{className:q.header,children:[o.jsxRuntimeExports.jsxs("h2",{children:[s?"Edit":"Create"," Blank Page"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"x",fill:"#757575",hoverable:!0,onClick:y})]}),o.jsxRuntimeExports.jsxs("div",{className:q.content,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Page Slug",onChange:O=>p(O),value:d,placeholder:"path-to-page",disabled:!!(a&&((N=e[a])!=null&&N.name)&&o.defaultPageNames.includes(e[a].name)),required:!0,regex:"^.+$"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Page Title",onChange:O=>x(O),value:v,placeholder:"Contact us",disabled:!!(a&&((k=e[a])!=null&&k.name)&&o.defaultPageNames.includes(e[a].name))}),o.jsxRuntimeExports.jsx(o.Textarea,{label:"Description",onChange:O=>h(O),value:m,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),o.jsxRuntimeExports.jsx(o.Radio,{label:"Visibility",defaultValue:g,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:O=>j(O)}),o.jsxRuntimeExports.jsxs("div",{className:q.preview,children:[o.jsxRuntimeExports.jsx("span",{className:q.label,children:"Preview"}),o.jsxRuntimeExports.jsxs("div",{className:q.block,children:[o.jsxRuntimeExports.jsx("span",{className:q.slug,children:d||"yoursite.url"}),o.jsxRuntimeExports.jsx("span",{className:q.title,children:v||"My Blank Page"}),o.jsxRuntimeExports.jsx("span",{className:q.description,children:m||"It is My Description"})]})]})]}),o.jsxRuntimeExports.jsxs("div",{className:q.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{className:q.cancel,onClick:y,children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:s?I:R,disabled:d.length===0,children:s?"Update":"Create"})]})]})},Al="_layout_kjedu_1",Bl="_main_kjedu_8",Ll="_content_kjedu_15",nt={layout:Al,main:Bl,content:Ll},Ml=()=>{const{isOpenModal:t,setIsOpenModal:e}=o.usePagesStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:nt.layout,children:[o.jsxRuntimeExports.jsx(jo,{}),o.jsxRuntimeExports.jsxs("main",{className:nt.main,children:[o.jsxRuntimeExports.jsx(fo,{}),o.jsxRuntimeExports.jsxs("div",{className:nt.content,children:[o.jsxRuntimeExports.jsx(yl,{}),o.jsxRuntimeExports.jsx(di,{})]})]})]}),t&&o.jsxRuntimeExports.jsx(o.Modal,{close:e,children:o.jsxRuntimeExports.jsx(kl,{})})]})};async function le(t,e){const n=localStorage.getItem("shopId")||void 0,r=`${Qn}/${t}/builder/shops/${n}/${e}`,s=localStorage.getItem("accessToken")||void 0;return(await T.get(r,{headers:{Authorization:`Bearer ${s}`}})).data}async function $l(){try{const[t,e,n,r,s,i]=await Promise.allSettled([le("v1","general"),le("v1","faqs"),le("v1","listings"),le("v1","products"),le("v1","reviews"),le("v1","categories")]);return{general:t,faqs:e,listings:n,products:r,reviews:s,categories:i}}catch(t){throw console.error("Error fetching page data:",t),t}}async function Fl(){try{const{data:t}=await T.get(`${Zn}?key=undefined`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}const Ul=t=>{const{blocks:e,settings:n}=t,{setBlocks:r,setSourceBlocks:s}=o.useBlocksStore(),{fonts:i,setFonts:a}=o.useFontsStore(),{setSettings:c}=o.useSettingsStore(),{setPageContext:u}=o.usePagesStore();return E.useEffect(()=>{const l={};Object.keys(e).map(p=>{l[p]={...e[p]}}),c(n),s(l),r(e),(async()=>{if(i.length===0){const x=await Fl();a([...x.map(m=>m.family)])}let p={listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0};const v=await $l();Object.keys(v).map(x=>{const m=x;p[m]=v[m].value.data}),u(p)})()},[]),o.jsxRuntimeExports.jsx(Ml,{})};exports.Builder=Ul;
10
+ `},children:o.jsxRuntimeExports.jsx("div",{className:o.styles.indicator,style:{position:"absolute",left:`${i}%`,top:`${100-a}%`,transform:"translate(-50%, -50%)"}})}),o.jsxRuntimeExports.jsx("div",{className:o.styles.hueSlider,children:o.jsxRuntimeExports.jsx("input",{type:"range",min:"0",max:"360",value:s,onChange:w=>{l(Number(w.target.value)),j(i,a)},className:o.styles.slider})}),o.jsxRuntimeExports.jsxs("div",{className:o.styles.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{onClick:U,className:o.clx(o.styles.applyButton,o.styles.cancelButton),children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:P,className:o.styles.applyButton,children:"Apply"})]})]})},di=()=>{const{onPreview:t}=o.usePreviewStore(),{hoverBlockId:e,isModalVisible:n,isPreviewVisible:r}=o.useSubmodalStore(),{settings:s}=o.useSettingsStore(),{blocks:i}=o.useBlocksStore(),{blocks:a}=o.useLayersStore(),{currentPage:c,pages:u}=o.usePagesStore(),{showModal:l}=o.useColorPickerStore(),[d,p]=E.useState(!0);E.useEffect(()=>{t&&setTimeout(()=>{p(!1)},100)},[t]);const v=x=>{if(!x)return;const m=i[x.name],h=x.value;for(const g in h)m[g]=h[g];return m.renderBlock(s)};return o.jsxRuntimeExports.jsxs("div",{className:ge.preview,children:[n&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(Tn,{})}),r&&e&&o.jsxRuntimeExports.jsx(o.Submodal,{children:o.jsxRuntimeExports.jsx(On,{render:v,block:a[u[c].name][e]})}),l&&o.jsxRuntimeExports.jsx(li,{}),t&&o.jsxRuntimeExports.jsxs("div",{className:ge.main,children:[o.jsxRuntimeExports.jsx(Mo,{}),o.jsxRuntimeExports.jsx("div",{className:ge.content,children:d?o.jsxRuntimeExports.jsx("div",{className:ge.loading,children:o.jsxRuntimeExports.jsx("div",{className:ge.loader})}):o.jsxRuntimeExports.jsx(ri,{})})]})]})},fi="_sidebar_1r5sp_1",pi="_title_1r5sp_10",hi="_active_1r5sp_18",qt={sidebar:fi,title:pi,active:hi},Dn=E.createContext({dragDropManager:void 0});function $(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var zt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Je=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vt={INIT:"@@redux/INIT"+Je(),REPLACE:"@@redux/REPLACE"+Je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Je()}};function gi(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function mi(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(Ei(t))return"date";if(vi(t))return"error";var n=xi(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function xi(t){return typeof t.constructor=="function"?t.constructor.name:null}function vi(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function Ei(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function oe(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=mi(t)),e}function Cn(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?$(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?$(1):"Expected the enhancer to be a function. Instead, received: '"+oe(n)+"'");return n(Cn)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?$(2):"Expected the root reducer to be a function. Instead, received: '"+oe(t)+"'");var s=t,i=e,a=[],c=a,u=!1;function l(){c===a&&(c=a.slice())}function d(){if(u)throw new Error(process.env.NODE_ENV==="production"?$(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function p(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(4):"Expected the listener to be a function. Instead, received: '"+oe(h)+"'");if(u)throw new Error(process.env.NODE_ENV==="production"?$(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var g=!0;return l(),c.push(h),function(){if(g){if(u)throw new Error(process.env.NODE_ENV==="production"?$(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");g=!1,l();var b=c.indexOf(h);c.splice(b,1),a=null}}}function v(h){if(!gi(h))throw new Error(process.env.NODE_ENV==="production"?$(7):"Actions must be plain objects. Instead, the actual type was: '"+oe(h)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof h.type>"u")throw new Error(process.env.NODE_ENV==="production"?$(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(u)throw new Error(process.env.NODE_ENV==="production"?$(9):"Reducers may not dispatch actions.");try{u=!0,i=s(i,h)}finally{u=!1}for(var g=a=c,y=0;y<g.length;y++){var b=g[y];b()}return h}function x(h){if(typeof h!="function")throw new Error(process.env.NODE_ENV==="production"?$(10):"Expected the nextReducer to be a function. Instead, received: '"+oe(h));s=h,v({type:Vt.REPLACE})}function m(){var h,g=p;return h={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(process.env.NODE_ENV==="production"?$(11):"Expected the observer to be an object. Instead, received: '"+oe(b)+"'");function j(){b.next&&b.next(d())}j();var D=g(j);return{unsubscribe:D}}},h[zt]=function(){return this},h}return v({type:Vt.INIT}),r={dispatch:v,subscribe:p,getState:d,replaceReducer:x},r[zt]=m,r}function _(t,e,...n){if(yi()&&e===void 0)throw new Error("invariant requires an error message argument");if(!t){let r;if(e===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let s=0;r=new Error(e.replace(/%s/g,function(){return n[s++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function yi(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function bi(t,e,n){return e.split(".").reduce((r,s)=>r&&r[s]?r[s]:n||null,t)}function ji(t,e){return t.filter(n=>n!==e)}function Nn(t){return typeof t=="object"}function Si(t,e){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};t.forEach(r),e.forEach(r);const s=[];return n.forEach((i,a)=>{i===1&&s.push(a)}),s}function _i(t,e){return t.filter(n=>e.indexOf(n)>-1)}const yt="dnd-core/INIT_COORDS",Me="dnd-core/BEGIN_DRAG",bt="dnd-core/PUBLISH_DRAG_SOURCE",$e="dnd-core/HOVER",Fe="dnd-core/DROP",Ue="dnd-core/END_DRAG";function Gt(t,e){return{type:yt,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const wi={type:yt,payload:{clientOffset:null,sourceClientOffset:null}};function Ri(t){return function(n=[],r={publishSource:!0}){const{publishSource:s=!0,clientOffset:i,getSourceClientOffset:a}=r,c=t.getMonitor(),u=t.getRegistry();t.dispatch(Gt(i)),Oi(n,c,u);const l=Ci(n,c);if(l==null){t.dispatch(wi);return}let d=null;if(i){if(!a)throw new Error("getSourceClientOffset must be defined");Ti(a),d=a(l)}t.dispatch(Gt(i,d));const v=u.getSource(l).beginDrag(c,l);if(v==null)return;Di(v),u.pinSource(l);const x=u.getSourceType(l);return{type:Me,payload:{itemType:x,item:v,sourceId:l,clientOffset:i||null,sourceClientOffset:d||null,isSourcePublic:!!s}}}}function Oi(t,e,n){_(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(r){_(n.getSource(r),"Expected sourceIds to be registered.")})}function Ti(t){_(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Di(t){_(Nn(t),"Item must be an object.")}function Ci(t,e){let n=null;for(let r=t.length-1;r>=0;r--)if(e.canDragSource(t[r])){n=t[r];break}return n}function Ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ii(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ni(t,s,n[s])})}return t}function Pi(t){return function(n={}){const r=t.getMonitor(),s=t.getRegistry();ki(r),Li(r).forEach((a,c)=>{const u=Ai(a,c,s,r),l={type:Fe,payload:{dropResult:Ii({},n,u)}};t.dispatch(l)})}}function ki(t){_(t.isDragging(),"Cannot call drop while not dragging."),_(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Ai(t,e,n,r){const s=n.getTarget(t);let i=s?s.drop(r,t):void 0;return Bi(i),typeof i>"u"&&(i=e===0?{}:r.getDropResult()),i}function Bi(t){_(typeof t>"u"||Nn(t),"Drop result must either be an object or undefined.")}function Li(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function Mi(t){return function(){const n=t.getMonitor(),r=t.getRegistry();$i(n);const s=n.getSourceId();return s!=null&&(r.getSource(s,!0).endDrag(n,s),r.unpinSource()),{type:Ue}}}function $i(t){_(t.isDragging(),"Cannot call endDrag while not dragging.")}function lt(t,e){return e===null?t===null:Array.isArray(t)?t.some(n=>n===e):t===e}function Fi(t){return function(n,{clientOffset:r}={}){Ui(n);const s=n.slice(0),i=t.getMonitor(),a=t.getRegistry(),c=i.getItemType();return qi(s,a,c),Hi(s,i,a),zi(s,i,a),{type:$e,payload:{targetIds:s,clientOffset:r||null}}}}function Ui(t){_(Array.isArray(t),"Expected targetIds to be an array.")}function Hi(t,e,n){_(e.isDragging(),"Cannot call hover while not dragging."),_(!e.didDrop(),"Cannot call hover after drop.");for(let r=0;r<t.length;r++){const s=t[r];_(t.lastIndexOf(s)===r,"Expected targetIds to be unique in the passed array.");const i=n.getTarget(s);_(i,"Expected targetIds to be registered.")}}function qi(t,e,n){for(let r=t.length-1;r>=0;r--){const s=t[r],i=e.getTargetType(s);lt(i,n)||t.splice(r,1)}}function zi(t,e,n){t.forEach(function(r){n.getTarget(r).hover(e,r)})}function Vi(t){return function(){if(t.getMonitor().isDragging())return{type:bt}}}function Gi(t){return{beginDrag:Ri(t),publishDragSource:Vi(t),hover:Fi(t),drop:Pi(t),endDrag:Mi(t)}}class Wi{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:n}=this.store;function r(i){return(...a)=>{const c=i.apply(e,a);typeof c<"u"&&n(c)}}const s=Gi(this);return Object.keys(s).reduce((i,a)=>{const c=s[a];return i[a]=r(c),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=n,e.subscribe(this.handleRefCountChange)}}function Yi(t,e){return{x:t.x+e.x,y:t.y+e.y}}function In(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ji(t){const{clientOffset:e,initialClientOffset:n,initialSourceClientOffset:r}=t;return!e||!n||!r?null:In(Yi(e,r),n)}function Xi(t){const{clientOffset:e,initialClientOffset:n}=t;return!e||!n?null:In(e,n)}const xe=[],jt=[];xe.__IS_NONE__=!0;jt.__IS_ALL__=!0;function Ki(t,e){return t===xe?!1:t===jt||typeof e>"u"?!0:_i(e,t).length>0}class Qi{subscribeToStateChange(e,n={}){const{handlerIds:r}=n;_(typeof e=="function","listener must be a function."),_(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let s=this.store.getState().stateId;const i=()=>{const a=this.store.getState(),c=a.stateId;try{c===s||c===s+1&&!Ki(a.dirtyHandlerIds,r)||e()}finally{s=c}};return this.store.subscribe(i)}subscribeToOffsetChange(e){_(typeof e=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const s=this.store.getState().dragOffset;s!==n&&(n=s,e())};return this.store.subscribe(r)}canDragSource(e){if(!e)return!1;const n=this.registry.getSource(e);return _(n,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:n.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const n=this.registry.getTarget(e);if(_(n,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(e),s=this.getItemType();return lt(r,s)&&n.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const n=this.registry.getSource(e,!0);if(_(n,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(e),s=this.getItemType();return r!==s?!1:n.isDragging(this,e)}isOverTarget(e,n={shallow:!1}){if(!e)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const s=this.registry.getTargetType(e),i=this.getItemType();if(i&&!lt(s,i))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return r?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Ji(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Xi(this.store.getState().dragOffset)}constructor(e,n){this.store=e,this.registry=n}}const Wt=typeof global<"u"?global:self,Pn=Wt.MutationObserver||Wt.WebKitMutationObserver;function kn(t){return function(){const n=setTimeout(s,0),r=setInterval(s,50);function s(){clearTimeout(n),clearInterval(r),t()}}}function Zi(t){let e=1;const n=new Pn(t),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){e=-e,r.data=e}}const ea=typeof Pn=="function"?Zi:kn;class ta{enqueueTask(e){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const n=this.index;if(this.index++,e[n].call(),this.index>this.capacity){for(let r=0,s=e.length-this.index;r<s;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ea(this.flush),this.requestErrorThrow=kn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class na{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,n){this.onError=e,this.release=n,this.task=null}}class ra{create(e){const n=this.freeTasks,r=n.length?n.pop():new na(this.onError,s=>n[n.length]=s);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}}const An=new ta,sa=new ra(An.registerPendingError);function oa(t){An.enqueueTask(sa.create(t))}const St="dnd-core/ADD_SOURCE",_t="dnd-core/ADD_TARGET",wt="dnd-core/REMOVE_SOURCE",He="dnd-core/REMOVE_TARGET";function ia(t){return{type:St,payload:{sourceId:t}}}function aa(t){return{type:_t,payload:{targetId:t}}}function ca(t){return{type:wt,payload:{sourceId:t}}}function ua(t){return{type:He,payload:{targetId:t}}}function la(t){_(typeof t.canDrag=="function","Expected canDrag to be a function."),_(typeof t.beginDrag=="function","Expected beginDrag to be a function."),_(typeof t.endDrag=="function","Expected endDrag to be a function.")}function da(t){_(typeof t.canDrop=="function","Expected canDrop to be a function."),_(typeof t.hover=="function","Expected hover to be a function."),_(typeof t.drop=="function","Expected beginDrag to be a function.")}function dt(t,e){if(e&&Array.isArray(t)){t.forEach(n=>dt(n,!1));return}_(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var F;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(F||(F={}));let fa=0;function pa(){return fa++}function ha(t){const e=pa().toString();switch(t){case F.SOURCE:return`S${e}`;case F.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function Yt(t){switch(t[0]){case"S":return F.SOURCE;case"T":return F.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function Jt(t,e){const n=t.entries();let r=!1;do{const{done:s,value:[,i]}=n.next();if(i===e)return!0;r=!!s}while(!r);return!1}class ga{addSource(e,n){dt(e),la(n);const r=this.addHandler(F.SOURCE,e,n);return this.store.dispatch(ia(r)),r}addTarget(e,n){dt(e,!0),da(n);const r=this.addHandler(F.TARGET,e,n);return this.store.dispatch(aa(r)),r}containsHandler(e){return Jt(this.dragSources,e)||Jt(this.dropTargets,e)}getSource(e,n=!1){return _(this.isSourceId(e),"Expected a valid source ID."),n&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return _(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return _(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return Yt(e)===F.SOURCE}isTargetId(e){return Yt(e)===F.TARGET}removeSource(e){_(this.getSource(e),"Expected an existing source."),this.store.dispatch(ca(e)),oa(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){_(this.getTarget(e),"Expected an existing target."),this.store.dispatch(ua(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const n=this.getSource(e);_(n,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=n}unpinSource(){_(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,n,r){const s=ha(e);return this.types.set(s,n),e===F.SOURCE?this.dragSources.set(s,r):e===F.TARGET&&this.dropTargets.set(s,r),s}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const ma=(t,e)=>t===e;function xa(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function va(t,e,n=ma){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!n(t[r],e[r]))return!1;return!0}function Ea(t=xe,e){switch(e.type){case $e:break;case St:case _t:case He:case wt:return xe;case Me:case bt:case Ue:case Fe:default:return jt}const{targetIds:n=[],prevTargetIds:r=[]}=e.payload,s=Si(n,r);if(!(s.length>0||!va(n,r)))return xe;const a=r[r.length-1],c=n[n.length-1];return a!==c&&(a&&s.push(a),c&&s.push(c)),s}function ya(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ba(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){ya(t,s,n[s])})}return t}const Xt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ja(t=Xt,e){const{payload:n}=e;switch(e.type){case yt:case Me:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case $e:return xa(t.clientOffset,n.clientOffset)?t:ba({},t,{clientOffset:n.clientOffset});case Ue:case Fe:return Xt;default:return t}}function Sa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ie(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Sa(t,s,n[s])})}return t}const _a={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function wa(t=_a,e){const{payload:n}=e;switch(e.type){case Me:return ie({},t,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case bt:return ie({},t,{isSourcePublic:!0});case $e:return ie({},t,{targetIds:n.targetIds});case He:return t.targetIds.indexOf(n.targetId)===-1?t:ie({},t,{targetIds:ji(t.targetIds,n.targetId)});case Fe:return ie({},t,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Ue:return ie({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function Ra(t=0,e){switch(e.type){case St:case _t:return t+1;case wt:case He:return t-1;default:return t}}function Oa(t=0){return t+1}function Ta(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Da(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){Ta(t,s,n[s])})}return t}function Ca(t={},e){return{dirtyHandlerIds:Ea(t.dirtyHandlerIds,{type:e.type,payload:Da({},e.payload,{prevTargetIds:bi(t,"dragOperation.targetIds",[])})}),dragOffset:ja(t.dragOffset,e),refCount:Ra(t.refCount,e),dragOperation:wa(t.dragOperation,e),stateId:Oa(t.stateId)}}function Na(t,e=void 0,n={},r=!1){const s=Ia(r),i=new Qi(s,new ga(s)),a=new Wi(s,i),c=t(a,e,n);return a.receiveBackend(c),a}function Ia(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Cn(Ca,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}function Pa(t,e){if(t==null)return{};var n=ka(t,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function ka(t,e){if(t==null)return{};var n={},r=Object.keys(t),s,i;for(i=0;i<r.length;i++)s=r[i],!(e.indexOf(s)>=0)&&(n[s]=t[s]);return n}let Kt=0;const Ce=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var Aa=E.memo(function(e){var{children:n}=e,r=Pa(e,["children"]);const[s,i]=Ba(r);return E.useEffect(()=>{if(i){const a=Bn();return++Kt,()=>{--Kt===0&&(a[Ce]=null)}}},[]),o.jsxRuntimeExports.jsx(Dn.Provider,{value:s,children:n})});function Ba(t){if("manager"in t)return[{dragDropManager:t.manager},!1];const e=La(t.backend,t.context,t.options,t.debugMode),n=!t.context;return[e,n]}function La(t,e=Bn(),n,r){const s=e;return s[Ce]||(s[Ce]={dragDropManager:Na(t,e,n,r)}),s[Ce]}function Bn(){return typeof global<"u"?global:window}var Ma=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!t(e[s],n[s]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var a=i[s];if(!t(e[a],n[a]))return!1}return!0}return e!==e&&n!==n};const $a=o.getDefaultExportFromCjs(Ma),se=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Fa(t,e,n){const[r,s]=E.useState(()=>e(t)),i=E.useCallback(()=>{const a=e(t);$a(r,a)||(s(a),n&&n())},[r,t,n]);return se(i),[r,i]}function Ua(t,e,n){const[r,s]=Fa(t,e,n);return se(function(){const a=t.getHandlerId();if(a!=null)return t.subscribeToStateChange(s,{handlerIds:[a]})},[t,s]),r}function Ln(t,e,n){return Ua(e,t||(()=>({})),()=>n.reconnect())}function Mn(t,e){const n=[];return typeof t!="function"&&n.push(t),E.useMemo(()=>typeof t=="function"?t():t,n)}function Ha(t){return E.useMemo(()=>t.hooks.dragSource(),[t])}function qa(t){return E.useMemo(()=>t.hooks.dragPreview(),[t])}let Xe=!1,Ke=!1;class za{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){_(!Xe,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Xe=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Xe=!1}}isDragging(){if(!this.sourceId)return!1;_(!Ke,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Ke=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Ke=!1}}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,n){return this.internalMonitor.isOverTarget(e,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let Qe=!1;class Va{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,n){return this.internalMonitor.subscribeToStateChange(e,n)}canDrop(){if(!this.targetId)return!1;_(!Qe,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Qe=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Qe=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function Ga(t,e,n){const r=n.getRegistry(),s=r.addTarget(t,e);return[s,()=>r.removeTarget(s)]}function Wa(t,e,n){const r=n.getRegistry(),s=r.addSource(t,e);return[s,()=>r.removeSource(s)]}function ft(t,e,n,r){let s;if(s!==void 0)return!!s;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;const c=Object.prototype.hasOwnProperty.bind(e);for(let u=0;u<i.length;u++){const l=i[u];if(!c(l))return!1;const d=t[l],p=e[l];if(s=void 0,s===!1||s===void 0&&d!==p)return!1}return!0}function pt(t){return t!==null&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ya(t){if(typeof t.type=="string")return;const e=t.type.displayName||t.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${e} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ja(t){return(e=null,n=null)=>{if(!E.isValidElement(e)){const i=e;return t(i,n),i}const r=e;return Ya(r),Xa(r,n?i=>t(i,n):t)}}function $n(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];if(n.endsWith("Ref"))e[n]=t[n];else{const s=Ja(r);e[n]=()=>s}}),e}function Qt(t,e){typeof t=="function"?t(e):t.current=e}function Xa(t,e){const n=t.ref;return _(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(t,{ref:r=>{Qt(n,r),Qt(e,r)}}):E.cloneElement(t,{ref:e})}class Ka{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?e?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),n):(this.lastConnectedDragSource=e,n):n}reconnectDragPreview(e=!1){const n=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ft(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ft(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=$n({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,pt(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,pt(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class Qa{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ft(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=$n({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,pt(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function pe(){const{dragDropManager:t}=E.useContext(Dn);return _(t!=null,"Expected drag drop context"),t}function Za(t,e){const n=pe(),r=E.useMemo(()=>new Ka(n.getBackend()),[n]);return se(()=>(r.dragSourceOptions=t||null,r.reconnect(),()=>r.disconnectDragSource()),[r,t]),se(()=>(r.dragPreviewOptions=e||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,e]),r}function ec(){const t=pe();return E.useMemo(()=>new za(t),[t])}class tc{beginDrag(){const e=this.spec,n=this.monitor;let r=null;return typeof e.item=="object"?r=e.item:typeof e.item=="function"?r=e.item(n):r={},r??null}canDrag(){const e=this.spec,n=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(n):!0}isDragging(e,n){const r=this.spec,s=this.monitor,{isDragging:i}=r;return i?i(s):n===e.getSourceId()}endDrag(){const e=this.spec,n=this.monitor,r=this.connector,{end:s}=e;s&&s(n.getItem(),n),r.reconnect()}constructor(e,n,r){this.spec=e,this.monitor=n,this.connector=r}}function nc(t,e,n){const r=E.useMemo(()=>new tc(t,e,n),[e,n]);return E.useEffect(()=>{r.spec=t},[t]),r}function rc(t){return E.useMemo(()=>{const e=t.type;return _(e!=null,"spec.type must be defined"),e},[t])}function sc(t,e,n){const r=pe(),s=nc(t,e,n),i=rc(t);se(function(){if(i!=null){const[c,u]=Wa(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u}},[r,e,n,s,i])}function oc(t,e){const n=Mn(t);_(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=ec(),s=Za(n.options,n.previewOptions);return sc(n,r,s),[Ln(n.collect,r,s),Ha(s),qa(s)]}function ic(t){return E.useMemo(()=>t.hooks.dropTarget(),[t])}function ac(t){const e=pe(),n=E.useMemo(()=>new Qa(e.getBackend()),[e]);return se(()=>(n.dropTargetOptions=t||null,n.reconnect(),()=>n.disconnectDropTarget()),[t]),n}function cc(){const t=pe();return E.useMemo(()=>new Va(t),[t])}function uc(t){const{accept:e}=t;return E.useMemo(()=>(_(t.accept!=null,"accept must be defined"),Array.isArray(e)?e:[e]),[e])}class lc{canDrop(){const e=this.spec,n=this.monitor;return e.canDrop?e.canDrop(n.getItem(),n):!0}hover(){const e=this.spec,n=this.monitor;e.hover&&e.hover(n.getItem(),n)}drop(){const e=this.spec,n=this.monitor;if(e.drop)return e.drop(n.getItem(),n)}constructor(e,n){this.spec=e,this.monitor=n}}function dc(t,e){const n=E.useMemo(()=>new lc(t,e),[e]);return E.useEffect(()=>{n.spec=t},[t]),n}function fc(t,e,n){const r=pe(),s=dc(t,e),i=uc(t);se(function(){const[c,u]=Ga(i,s,r);return e.receiveHandlerId(c),n.receiveHandlerId(c),u},[r,e,s,n,i.map(a=>a.toString()).join("|")])}function pc(t,e){const n=Mn(t),r=cc(),s=ac(n.options);return fc(n,r,s),[Ln(n.collect,r,s),ic(s)]}function Fn(t){let e=null;return()=>(e==null&&(e=t()),e)}function hc(t,e){return t.filter(n=>n!==e)}function gc(t,e){const n=new Set,r=i=>n.add(i);t.forEach(r),e.forEach(r);const s=[];return n.forEach(i=>s.push(i)),s}class mc{enter(e){const n=this.entered.length,r=s=>this.isNodeInDocument(s)&&(!s.contains||s.contains(e));return this.entered=gc(this.entered.filter(r),[e]),n===0&&this.entered.length>0}leave(e){const n=this.entered.length;return this.entered=hc(this.entered.filter(this.isNodeInDocument),e),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class xc{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const s=this.config.exposeProperties[r];s!=null&&(n[r]={value:s(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,n){return n===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const Un="__NATIVE_FILE__",Hn="__NATIVE_URL__",qn="__NATIVE_TEXT__",zn="__NATIVE_HTML__",Zt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Un,HTML:zn,TEXT:qn,URL:Hn},Symbol.toStringTag,{value:"Module"}));function Ze(t,e,n){const r=e.reduce((s,i)=>s||t.getData(i),"");return r??n}const ht={[Un]:{exposeProperties:{files:t=>Array.prototype.slice.call(t.files),items:t=>t.items,dataTransfer:t=>t},matchesTypes:["Files"]},[zn]:{exposeProperties:{html:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Html","text/html"]},[Hn]:{exposeProperties:{urls:(t,e)=>Ze(t,e,"").split(`
11
+ `),dataTransfer:t=>t},matchesTypes:["Url","text/uri-list"]},[qn]:{exposeProperties:{text:(t,e)=>Ze(t,e,""),dataTransfer:t=>t},matchesTypes:["Text","text/plain"]}};function vc(t,e){const n=ht[t];if(!n)throw new Error(`native type ${t} has no configuration`);const r=new xc(n);return r.loadDataTransfer(e),r}function et(t){if(!t)return null;const e=Array.prototype.slice.call(t.types||[]);return Object.keys(ht).filter(n=>{const r=ht[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(s=>e.indexOf(s)>-1):!1})[0]||null}const Ec=Fn(()=>/firefox/i.test(navigator.userAgent)),Vn=Fn(()=>!!window.safari);class en{interpolate(e){const{xs:n,ys:r,c1s:s,c2s:i,c3s:a}=this;let c=n.length-1;if(e===n[c])return r[c];let u=0,l=a.length-1,d;for(;u<=l;){d=Math.floor(.5*(u+l));const x=n[d];if(x<e)u=d+1;else if(x>e)l=d-1;else return r[d]}c=Math.max(0,l);const p=e-n[c],v=p*p;return r[c]+s[c]*p+i[c]*v+a[c]*p*v}constructor(e,n){const{length:r}=e,s=[];for(let x=0;x<r;x++)s.push(x);s.sort((x,m)=>e[x]<e[m]?-1:1);const i=[],a=[];let c,u;for(let x=0;x<r-1;x++)c=e[x+1]-e[x],u=n[x+1]-n[x],i.push(c),a.push(u/c);const l=[a[0]];for(let x=0;x<i.length-1;x++){const m=a[x],h=a[x+1];if(m*h<=0)l.push(0);else{c=i[x];const g=i[x+1],y=c+g;l.push(3*y/((y+g)/m+(y+c)/h))}}l.push(a[a.length-1]);const d=[],p=[];let v;for(let x=0;x<l.length-1;x++){v=a[x];const m=l[x],h=1/i[x],g=m+l[x+1]-v-v;d.push((v-m-g)*h),p.push(g*h*h)}this.xs=e,this.ys=n,this.c1s=l,this.c2s=d,this.c3s=p}}const yc=1;function Gn(t){const e=t.nodeType===yc?t:t.parentElement;if(!e)return null;const{top:n,left:r}=e.getBoundingClientRect();return{x:r,y:n}}function Re(t){return{x:t.clientX,y:t.clientY}}function bc(t){var e;return t.nodeName==="IMG"&&(Ec()||!(!((e=document.documentElement)===null||e===void 0)&&e.contains(t)))}function jc(t,e,n,r){let s=t?e.width:n,i=t?e.height:r;return Vn()&&t&&(i/=window.devicePixelRatio,s/=window.devicePixelRatio),{dragPreviewWidth:s,dragPreviewHeight:i}}function Sc(t,e,n,r,s){const i=bc(e),c=Gn(i?t:e),u={x:n.x-c.x,y:n.y-c.y},{offsetWidth:l,offsetHeight:d}=t,{anchorX:p,anchorY:v}=r,{dragPreviewWidth:x,dragPreviewHeight:m}=jc(i,e,l,d),h=()=>{let I=new en([0,.5,1],[u.y,u.y/d*m,u.y+m-d]).interpolate(v);return Vn()&&i&&(I+=(window.devicePixelRatio-1)*m),I},g=()=>new en([0,.5,1],[u.x,u.x/l*x,u.x+x-l]).interpolate(p),{offsetX:y,offsetY:b}=s,j=y===0||y,D=b===0||b;return{x:j?y:g(),y:D?b:h()}}class _c{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;return!((e=this.globalContext)===null||e===void 0)&&e.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return((e=this.optionsArgs)===null||e===void 0?void 0:e.rootElement)||this.window}constructor(e,n){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=n}}function wc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),r.forEach(function(s){wc(t,s,n[s])})}return t}class Rc{profile(){var e,n;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)===null||e===void 0?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((n=this.dragOverTargetIds)===null||n===void 0?void 0:n.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var n;(n=this.window)===null||n===void 0||n.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,n,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,n),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,n,r){this.sourceNodes.set(e,n),this.sourceNodeOptions.set(e,r);const s=a=>this.handleDragStart(a,e),i=a=>this.handleSelectStart(a);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",s),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),n.removeEventListener("dragstart",s),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(e,n){const r=a=>this.handleDragEnter(a,e),s=a=>this.handleDragOver(a,e),i=a=>this.handleDrop(a,e);return n.addEventListener("dragenter",r),n.addEventListener("dragover",s),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",s),n.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(e);return tn({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(e);return tn({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(Zt).some(n=>Zt[n]===e)}beginDragNativeItem(e,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=vc(e,n),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)===null||e===void 0||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,n){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(e,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(e,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(e,n){this.dropTargetIds.unshift(n)}constructor(e,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=s=>{const i=this.sourceNodes.get(s);return i&&Gn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=s=>!!(s&&this.document&&this.document.body&&this.document.body.contains(s)),this.endDragIfSourceWasRemovedFromDOM=()=>{const s=this.currentDragSourceNode;s==null||this.isNodeInDocument(s)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=s=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(s||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=s=>{if(s.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const a=Re(s);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:a});const{dataTransfer:c}=s,u=et(c);if(this.monitor.isDragging()){if(c&&typeof c.setDragImage=="function"){const d=this.monitor.getSourceId(),p=this.sourceNodes.get(d),v=this.sourcePreviewNodes.get(d)||p;if(v){const{anchorX:x,anchorY:m,offsetX:h,offsetY:g}=this.getCurrentSourcePreviewNodeOptions(),j=Sc(p,v,a,{anchorX:x,anchorY:m},{offsetX:h,offsetY:g});c.setDragImage(v,j.x,j.y)}}try{c==null||c.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(s.target);const{captureDraggingState:l}=this.getCurrentSourcePreviewNodeOptions();l?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(c&&!c.types&&(s.target&&!s.target.hasAttribute||!s.target.hasAttribute("draggable")))return;s.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=s=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}if(!this.enterLeaveCounter.enter(s.target)||this.monitor.isDragging())return;const{dataTransfer:c}=s,u=et(c);u&&this.beginDragNativeItem(u,c)},this.handleTopDragEnter=s=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=s.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Re(s)}),i.some(c=>this.monitor.canDropOnTarget(c))&&(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=s=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}},this.handleTopDragOver=s=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none");return}this.altKeyPressed=s.altKey,this.lastClientOffset=Re(s),this.scheduleHover(i),(i||[]).some(c=>this.monitor.canDropOnTarget(c))?(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?s.preventDefault():(s.preventDefault(),s.dataTransfer&&(s.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=s=>{this.isDraggingNativeItem()&&s.preventDefault(),this.enterLeaveCounter.leave(s.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=s=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;s.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(s.dataTransfer)}else et(s.dataTransfer)&&s.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=s=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Re(s)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=s=>{const i=s.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(s.preventDefault(),i.dragDrop()))},this.options=new _c(n,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new mc(this.isNodeInDocument)}}const Oc=function(e,n,r){return new Rc(e,n,r)},Tc="_layers_62wod_1",Dc="_block_62wod_8",Cc="_dragging_62wod_23",Nc="_active_62wod_31",Ic="_add_62wod_35",Pc="_button_62wod_47",kc="_empty_62wod_60",Ac="_title_62wod_72",Bc="_icon_62wod_79",Lc="_text_62wod_83",Mc="_highlight_62wod_89",V={layers:Tc,block:Dc,dragging:Cc,active:Nc,add:Ic,button:Pc,empty:kc,title:Ac,icon:Bc,text:Lc,highlight:Mc},$c=({id:t,name:e,index:n,moveBlock:r,onClick:s})=>{const{currentPage:i,pages:a}=o.usePagesStore(),{activeBlock:c}=o.usePreviewStore(),{showPreview:u,hidePreview:l,showModal:d,hideModal:p,clearHideTimeout:v,startHideTimeout:x,hoverBlockId:m,isModalVisible:h}=o.useSubmodalStore(),{setPositionBlock:g}=o.useLayersStore(),[y,b]=E.useState(!1),j=()=>{h&&p(),u(t),b(!0),v()},D=w=>{w.stopPropagation(),l(),d(t),v(),g(n+1)},R=()=>{h?x():(b(!1),l())};E.useEffect(()=>{h||b(!1)},[h]);const[,I]=pc({accept:"block",hover(w){w.index!==n&&(r(a[i].name,w.index,n),w.index=n)}}),[{isDragging:P},U]=oc({type:"block",item:{id:t,index:n},collect:w=>({isDragging:w.isDragging()})});return o.jsxRuntimeExports.jsxs("div",{ref:w=>U(I(w)),className:o.clx(V.block,{[V.dragging]:P,[V.active]:!P&&c===t}),onClick:()=>s(t),onMouseEnter:j,onMouseLeave:R,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"cards"}),o.jsxRuntimeExports.jsx("span",{children:e}),(y||m===t)&&!P&&o.jsxRuntimeExports.jsx("div",{className:V.add,children:o.jsxRuntimeExports.jsx("button",{className:V.button,onClick:w=>D(w),children:o.jsxRuntimeExports.jsx(o.Icon,{name:"plus",fill:"#fff"})})})]})},Fc=()=>{const{setActiveBlock:t}=o.useNavbarStore();return o.jsxRuntimeExports.jsxs("div",{className:V.empty,children:[o.jsxRuntimeExports.jsx("div",{className:V.icon,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"layers",width:32,height:32,fill:"#757575"})}),o.jsxRuntimeExports.jsx("div",{className:V.title,children:"Layers is empty"}),o.jsxRuntimeExports.jsxs("div",{className:V.text,children:["Try adding"," ",o.jsxRuntimeExports.jsx("span",{className:V.highlight,onClick:()=>t({icon:"plus",name:"Add"}),children:"sections"})," ","and recreate your own design"]})]})},Uc=()=>{const{blocks:t,setCurrentBlock:e,moveBlock:n}=o.useLayersStore(),{currentPage:r,pages:s}=o.usePagesStore();function i(a){e(a)}return o.jsxRuntimeExports.jsx(Aa,{backend:Oc,children:o.jsxRuntimeExports.jsxs("div",{className:V.layers,children:[t[s[r].name]&&Object.keys(t[s[r].name]).map((a,c)=>o.jsxRuntimeExports.jsx($c,{id:a,name:t[s[r].name][a].name,index:c,moveBlock:n,onClick:i},a)),(!t[s[r].name]||Object.keys(t[s[r].name]).length===0)&&o.jsxRuntimeExports.jsx(Fc,{})]})})},Hc=()=>{const{settings:t}=o.useSettingsStore();return t==null?void 0:t.renderSettings()},qc="_theme_1xj36_1",zc="_block_1xj36_6",Vc="_name_1xj36_20",tt={theme:qc,block:zc,name:Vc},Gc=()=>{const{setActiveBlock:t}=o.useThemeSettingsStore();function e(n){t(n)}return o.jsxRuntimeExports.jsx("div",{className:tt.theme,children:Kn.map(n=>o.jsxRuntimeExports.jsxs("div",{onClick:()=>e(n),className:o.clx(tt.block),children:[o.jsxRuntimeExports.jsx(o.Icon,{name:n.icon}),o.jsxRuntimeExports.jsx("span",{className:tt.name,children:n.name}),o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-right"})]},n.icon))})},Wc="_back_14yda_1",Yc="_render_14yda_8",Jc="_open_14yda_23",Xc="_close_14yda_50",Kc="_clicked_14yda_54",Qc="_title_14yda_58",Zc="_button_14yda_65",eu="_loading_14yda_70",tu="_settings_14yda_74",nu="_buttons_14yda_80",ru="_deleteButton_14yda_86",W={back:Wc,render:Yc,open:Jc,close:Xc,clicked:Kc,title:Qc,button:Zc,loading:eu,settings:tu,buttons:nu,deleteButton:ru},su=({block:t})=>{if(!t)return;const{blocks:e,sourceBlocks:n,activeBlock:r}=o.useBlocksStore(),{currentBlock:s}=o.useLayersStore();if(!r&&!s)return null;if(t!=null&&t.name){const i=e[t.name],a={...t.value};for(const c in a)i[c]=a[c];return i.renderSettings()}else{const i=n[r];for(const a in i)t[a]={...i[a]};return t.renderSettings()}},ou=t=>{var D;const{isAdd:e}=t,[n,r]=E.useState(!1),{setActiveBlock:s}=o.useNavbarStore(),{blocks:i,activeBlock:a,setActiveBlock:c}=o.useBlocksStore(),{blocks:u,addBlock:l,editBlock:d,currentBlock:p,setCurrentBlock:v,removeBlock:x,setPositionBlock:m}=o.useLayersStore(),{currentPage:h,pages:g}=o.usePagesStore();function y(){c(null),v(null),setTimeout(()=>{r(!1)},150)}function b(){y(),s({name:"Layers",icon:"layers"})}function j(){return e?i[a]:i[u[g[h].name]&&u[g[h].name][p]?u[g[h].name][p].name:"null"]}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(W.render,{[W.open]:j(),[W.close]:!j(),[W.clicked]:n}),children:[o.jsxRuntimeExports.jsxs("div",{className:W.back,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:y}),o.jsxRuntimeExports.jsx("h3",{className:W.title,children:a||u[g[h].name]&&((D=u[g[h].name][p])==null?void 0:D.name)||"Loading"})]}),o.jsxRuntimeExports.jsx("div",{className:W.settings,children:j()?o.jsxRuntimeExports.jsx(su,{block:e?j():u[g[h].name][p]}):o.jsxRuntimeExports.jsx("div",{className:W.loading,children:"Loading"})}),o.jsxRuntimeExports.jsxs("div",{className:W.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{style:{width:"100%"},onClick:()=>{r(!0);const R=j();e?(l(g[h].name,{name:a,value:{...R}}),m(null)):d(g[h].name,p,{name:u[g[h].name][p].name,value:{...R}}),b()},children:e?"Add Section":"Edit Section"}),!e&&o.jsxRuntimeExports.jsx("button",{onClick:()=>{r(!0),x(g[h].name,p),setTimeout(()=>{r(!1)},150)},className:W.deleteButton,children:o.jsxRuntimeExports.jsx(o.Icon,{name:"trash",hoverable:!0})})]})]})},iu="_settings_1r85j_1",au="_open_1r85j_16",cu="_close_1r85j_20",uu="_header_1r85j_24",lu="_title_1r85j_30",du="_addButton_1r85j_37",me={settings:iu,open:au,close:cu,header:uu,title:lu,addButton:du},fu="_wrapper_n1a7x_1",pu="_category_n1a7x_5",hu="_categoryTitle_n1a7x_10",gu="_color_n1a7x_16",mu="_content_n1a7x_24",xu="_preview_n1a7x_32",ae={wrapper:fu,category:pu,categoryTitle:hu,color:gu,content:mu,preview:xu},vu=()=>{const{themeSettings:t,updateColor:e}=o.useThemeSettingsStore();async function n(s,i,a){e(s,i,a)}const r=E.useMemo(()=>{const s={};return Object.entries(t.colors).forEach(([i,a])=>{Object.entries(a).forEach(([c,u])=>{s[u]||(s[u]=[]),s[u].push(`${i}-${c}`)})}),Object.keys(s).filter(i=>s[i].length>1)},[t.colors]);return o.jsxRuntimeExports.jsx("div",{className:ae.wrapper,children:Object.entries(t.colors).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:ae.category,children:[o.jsxRuntimeExports.jsx("h2",{className:ae.categoryTitle,children:J(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsxs("div",{className:ae.color,children:[o.jsxRuntimeExports.jsxs("div",{className:ae.content,children:[o.jsxRuntimeExports.jsx("div",{className:ae.preview,style:{background:c}}),o.jsxRuntimeExports.jsx(o.ColorPicker,{title:J(a),initialColor:c,onChange:u=>n(s,a,u)})]}),r.includes(c)&&o.jsxRuntimeExports.jsx(o.Tip,{type:"warning",message:"To avoid contrast problems, please use a different color",style:{marginBottom:12}})]},a))]},s))})},Eu="_wrapper_kb55x_2",yu="_category_kb55x_6",bu="_categoryTitle_kb55x_11",ju="_color_kb55x_17",Su="_name_kb55x_23",_u="_content_kb55x_28",wu="_label_kb55x_34",Ru="_input_kb55x_45",Ou="_title_kb55x_71",Tu="_field_kb55x_79",Du="_alignments_kb55x_89",Cu="_lineField_kb55x_95",Nu="_style_kb55x_101",Iu="_header_kb55x_108",Y={wrapper:Eu,category:yu,categoryTitle:bu,color:ju,name:Su,content:_u,label:wu,input:Ru,title:Ou,field:Tu,alignments:Du,lineField:Cu,style:Nu,header:Iu},Pu=["left","center","right"],ku=["solid","dashed"],Oe=t=>{const{title:e,children:n,rightAddon:r}=t;return o.jsxRuntimeExports.jsxs("div",{className:Y.field,children:[o.jsxRuntimeExports.jsxs("div",{className:Y.header,children:[o.jsxRuntimeExports.jsx("h4",{children:e}),r]}),n]})},Au=()=>{const{themeSettings:t,updateInput:e}=o.useThemeSettingsStore(),n=E.useMemo(()=>t.inputs,[t]),r=(i,a,c)=>{e(i,a,c)},s=i=>a=>{e(i,a,"color")};return o.jsxRuntimeExports.jsxs("div",{className:Y.wrapper,children:[o.jsxRuntimeExports.jsxs(Oe,{title:"General",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(n.general.height),onChange:i=>r("general",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Style name",value:n.general.name,onChange:i=>r("general",i,"name")}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("general",i,"size"),value:String(n.general.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.general.color),onChange:s("general"),title:"Font Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Field Fill",rightAddon:o.jsxRuntimeExports.jsx("div",{className:Y.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("field",i,"active"),current:n.field.active})}),children:[o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.field.color),onChange:s("field"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Opacity (%)",value:String(n.field.opacity),onChange:i=>r("field",i,"opacity"),type:"number",min:0})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Border",rightAddon:o.jsxRuntimeExports.jsx("div",{className:Y.switch,children:o.jsxRuntimeExports.jsx(o.Switch,{onChange:i=>r("border",i,"active"),current:n.border.active})}),children:[o.jsxRuntimeExports.jsxs("div",{className:Y.lineField,children:[o.jsxRuntimeExports.jsxs("div",{className:Y.style,children:[o.jsxRuntimeExports.jsx("span",{className:Y.title,children:"Style"}),o.jsxRuntimeExports.jsx(o.Picker,{items:ku,selectedItem:n.border.style,onSelect:i=>r("border",i,"style"),getIconName:i=>`border-${i}`})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Radius (px)",value:String(n.border.radius),onChange:i=>r("border",i,"radius"),type:"number",min:0})]}),o.jsxRuntimeExports.jsx(o.Input,{label:"Thickness (px)",value:String(n.border.thickness),onChange:i=>r("border",i,"thickness"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.border.color),onChange:s("border"),title:"Color",labelStyle:"secondary"})]}),o.jsxRuntimeExports.jsxs(Oe,{title:"Label",children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Line Height (px)",value:String(n.label.height),onChange:i=>r("label",i,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",onChange:i=>r("label",i,"size"),value:String(n.label.size),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.ColorPicker,{initialColor:J(n.label.color),onChange:s("label"),title:"Color",labelStyle:"secondary"}),o.jsxRuntimeExports.jsxs("div",{className:Y.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:Y.title,children:"Alignment Type"}),o.jsxRuntimeExports.jsx(o.Picker,{items:Pu,selectedItem:n.label.alignment,onSelect:i=>r("label",i,"alignment"),getIconName:i=>`align-${i}`})]})]})]})},Bu="_wrapper_k9on2_1",Lu="_category_k9on2_5",Mu="_categoryTitle_k9on2_10",$u="_font_k9on2_16",Fu="_content_k9on2_36",Uu="_icon_k9on2_42",Hu="_paragraph_k9on2_51",qu="_deleteIcon_k9on2_55",zu="_iconButton_k9on2_62",Q={wrapper:Bu,category:Lu,categoryTitle:Mu,font:$u,content:Fu,icon:Uu,paragraph:Hu,deleteIcon:qu,iconButton:zu},Vu=t=>{const{font:e,size:n,id:r,category:s}=t,{setActiveFont:i}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs("div",{className:Q.font,onClick:()=>i(r),children:[o.jsxRuntimeExports.jsx("div",{className:o.clx(Q.icon,{[Q.paragraph]:s==="paragraph"}),children:o.jsxRuntimeExports.jsx(o.Icon,{name:s})}),o.jsxRuntimeExports.jsxs("div",{className:Q.content,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:J(r)}),o.jsxRuntimeExports.jsx("span",{className:Q.value,children:`${e}, ${n}px`})]})]})},Gu=()=>{const{themeSettings:t,setActiveFont:e,activeBlock:n}=o.useThemeSettingsStore();E.useEffect(()=>(r(),()=>{r()}),[]);function r(){e(null)}if(n!=null&&n.name)return o.jsxRuntimeExports.jsx("div",{className:Q.wrapper,children:Object.entries(t.fonts).map(([s,i])=>o.jsxRuntimeExports.jsxs("div",{className:Q.category,children:[o.jsxRuntimeExports.jsx("h2",{className:Q.categoryTitle,children:J(s)}),Object.entries(i).map(([a,c])=>o.jsxRuntimeExports.jsx(Vu,{id:a,category:s,...c},a))]},s))})},Wu="_wrapper_94fpv_1",Yu="_open_94fpv_16",Ju="_close_94fpv_20",Xu="_header_94fpv_24",Ku="_title_94fpv_31",Qu="_options_94fpv_37",Zu="_clicked_94fpv_44",ce={wrapper:Wu,open:Yu,close:Ju,header:Xu,title:Ku,options:Qu,clicked:Zu},el=()=>{const{activeBlock:t,setActiveFont:e,activeFont:n,themeSettings:r,updateFont:s}=o.useThemeSettingsStore(),{fonts:i}=o.useFontsStore(),[a,c]=E.useState(null);function u(){e(null)}function l(p,v){a&&n&&s(a,n,v,p)}const d=E.useMemo(()=>n?r.fonts.heading[n]?(c("heading"),r.fonts.heading[n]):r.fonts.paragraph[n]?(c("paragraph"),r.fonts.paragraph[n]):(c(null),null):null,[n,r]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ce.wrapper,{[ce.open]:(t==null?void 0:t.name)==="Fonts"&&n,[ce.close]:(t==null?void 0:t.name)!=="Fonts"||!n}),children:[o.jsxRuntimeExports.jsxs("div",{className:ce.header,onClick:u,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0}),o.jsxRuntimeExports.jsx("span",{className:ce.title,children:"Font Style"})]}),n&&d&&o.jsxRuntimeExports.jsxs("div",{className:ce.options,children:[o.jsxRuntimeExports.jsx(o.Select,{label:"Font",value:d.font,onChange:p=>l(p,"font"),options:[...i.filter(p=>p!==d.font)]}),o.jsxRuntimeExports.jsx(o.Select,{label:"Size",value:String(d.size),onChange:p=>l(p,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Select,{label:"Weight",value:String(d.weight),onChange:p=>l(p,"weight"),options:o.weightOptions})]})]})},tl="_wrapper_94fpv_1",nl="_open_94fpv_16",rl="_close_94fpv_20",sl="_header_94fpv_24",ol="_title_94fpv_31",il="_options_94fpv_37",al="_clicked_94fpv_44",ue={wrapper:tl,open:nl,close:rl,header:sl,title:ol,options:il,clicked:al},Wn=()=>{const{activeBlock:t,themeSettings:e,updateBorder:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.borders,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(ue.wrapper,{[ue.open]:(t==null?void 0:t.name)==="Borders",[ue.close]:(t==null?void 0:t.name)!=="Borders"}),children:[o.jsxRuntimeExports.jsxs("div",{className:ue.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:ue.title,children:"Borders Style"})]}),o.jsxRuntimeExports.jsxs("div",{className:ue.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Thickness (px)",value:String(a.thickness),onChange:c=>s(Number(c),"thickness"),type:"number",min:0})]})]})},cl="_wrapper_1j33r_1",ul="_open_1j33r_16",ll="_close_1j33r_20",dl="_header_1j33r_24",fl="_title_1j33r_31",pl="_options_1j33r_37",hl="_clicked_1j33r_44",gl="_label_1j33r_48",ml="_alignments_1j33r_55",xl="_blocks_1j33r_61",vl="_alignment_1j33r_55",El="_active_1j33r_75",H={wrapper:cl,open:ul,close:ll,header:dl,title:fl,options:pl,clicked:hl,label:gl,alignments:ml,blocks:xl,alignment:vl,active:El},yl=["left","center","right"],Yn=()=>{const{activeBlock:t,themeSettings:e,updateButton:n,setActiveBlock:r}=o.useThemeSettingsStore();function s(c,u){n(u,c)}function i(){r(null)}const a=E.useMemo(()=>e.buttons,[e]);return o.jsxRuntimeExports.jsxs("div",{className:o.clx(H.wrapper,{[H.open]:(t==null?void 0:t.name)==="Buttons",[H.close]:(t==null?void 0:t.name)!=="Buttons"}),children:[o.jsxRuntimeExports.jsxs("div",{className:H.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:i}),o.jsxRuntimeExports.jsx("span",{className:H.title,children:"Buttons Style"})]}),a&&o.jsxRuntimeExports.jsxs("div",{className:H.options,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Height (px)",value:String(a.height),onChange:c=>s(c,"height"),type:"number",min:0}),o.jsxRuntimeExports.jsx(o.Select,{label:"Font Size (px)",value:String(a.size),onChange:c=>s(c,"size"),options:o.sizeOptions}),o.jsxRuntimeExports.jsx(o.Input,{label:"Border Radius (px)",value:String(a.radius),onChange:c=>s(Number(c),"radius"),type:"number",min:0}),o.jsxRuntimeExports.jsxs("div",{className:H.alignments,children:[o.jsxRuntimeExports.jsx("h4",{className:H.label,children:"Alignment Type"}),o.jsxRuntimeExports.jsx("div",{className:H.blocks,children:yl.map(c=>o.jsxRuntimeExports.jsx("div",{className:o.clx(H.alignment,{[H.active]:a.alignment===c}),onClick:()=>{s(c,"alignment")},children:o.jsxRuntimeExports.jsx(o.Icon,{name:`align-${c}`,fill:a.alignment===c?"#252525":"#757575"})},c))})]})]})]})},bl=()=>{const{activeBlock:t}=o.useThemeSettingsStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(el,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Buttons"&&o.jsxRuntimeExports.jsx(Yn,{})]})},jl=()=>{const{activeBlock:t,setActiveBlock:e}=o.useThemeSettingsStore(),{activeBlock:n}=o.useNavbarStore();function r(){e(null)}return o.jsxRuntimeExports.jsxs("div",{className:o.clx(me.settings,{[me.open]:t,[me.close]:!t||n.name!=="Theme"}),children:[o.jsxRuntimeExports.jsxs("div",{className:me.header,children:[o.jsxRuntimeExports.jsx(o.Icon,{name:"arrow-left",hoverable:!0,onClick:r}),o.jsxRuntimeExports.jsx("span",{className:me.title,children:t==null?void 0:t.name})]}),(t==null?void 0:t.name)==="Fonts"&&o.jsxRuntimeExports.jsx(Gu,{}),(t==null?void 0:t.name)==="Colors"&&o.jsxRuntimeExports.jsx(vu,{}),(t==null?void 0:t.name)==="Inputs"&&o.jsxRuntimeExports.jsx(Au,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Wn,{}),(t==null?void 0:t.name)==="Borders"&&o.jsxRuntimeExports.jsx(Yn,{}),o.jsxRuntimeExports.jsx(bl,{})]})},Sl=()=>{const{activeBlock:t}=o.useNavbarStore(),{activeBlock:e}=o.useBlocksStore();function n(){switch(t.name){case"Layers":return"Layers";case"Add":return"Add Sections";case"Theme":return"Theme Settings";case"Settings":return"Settings"}}return o.jsxRuntimeExports.jsxs("div",{className:qt.sidebar,children:[o.jsxRuntimeExports.jsx("h3",{className:qt.title,children:n()}),t.name==="Layers"&&o.jsxRuntimeExports.jsx(Uc,{}),t.name==="Add"&&o.jsxRuntimeExports.jsx(Tn,{}),o.jsxRuntimeExports.jsx(ou,{isAdd:!!e}),o.jsxRuntimeExports.jsx(jl,{}),t.name==="Theme"&&o.jsxRuntimeExports.jsx(Gc,{}),t.name==="Settings"&&o.jsxRuntimeExports.jsx(Hc,{})]})},_l="_wrapper_jjfwh_1",wl="_header_jjfwh_12",Rl="_content_jjfwh_21",Ol="_buttons_jjfwh_29",Tl="_cancel_jjfwh_35",Dl="_label_jjfwh_40",Cl="_description_jjfwh_41",Nl="_preview_jjfwh_49",Il="_block_jjfwh_55",Pl="_slug_jjfwh_63",kl="_title_jjfwh_69",q={wrapper:_l,header:wl,content:Rl,buttons:Ol,cancel:Tl,label:Dl,description:Cl,preview:Nl,block:Il,slug:Pl,title:kl},Al=()=>{var P,U,w,C,N,k;const{setIsOpenModal:t,pages:e,createPage:n,updatePage:r,isEdit:s,setIsEdit:i,editedPage:a,setEditedPage:c}=o.usePagesStore(),{createPage:u,updatePage:l}=o.useLayersStore(),[d,p]=E.useState(a?(P=e[a])==null?void 0:P.path:""),[v,x]=E.useState(a?(U=e[a])==null?void 0:U.name:""),[m,h]=E.useState(a?(w=e[a])==null?void 0:w.seo.description:""),[g,y]=E.useState(a?(C=e[a])==null?void 0:C.visibility:"public");function b(){p(""),x(""),h(""),y("public"),i(!1),c(null)}function j(){b(),t(!1)}function D(O){return O[0]==="/"?O:"/"+O}function R(){n({path:D(d),name:v||d,icon:"file",seo:{title:v,description:m},visibility:g}),u(v),j()}function I(){l(e[a].name,v||d),r(a,{path:D(d),name:v||d,icon:e[a].icon||"file",seo:{title:v,description:m},visibility:g}),j()}return o.jsxRuntimeExports.jsxs("div",{className:q.wrapper,onClick:O=>O.stopPropagation(),children:[o.jsxRuntimeExports.jsxs("div",{className:q.header,children:[o.jsxRuntimeExports.jsxs("h2",{children:[s?"Edit":"Create"," Blank Page"]}),o.jsxRuntimeExports.jsx(o.Icon,{name:"x",fill:"#757575",hoverable:!0,onClick:j})]}),o.jsxRuntimeExports.jsxs("div",{className:q.content,children:[o.jsxRuntimeExports.jsx(o.Input,{label:"Page Slug",onChange:O=>p(O),value:d,placeholder:"path-to-page",disabled:!!(a&&((N=e[a])!=null&&N.name)&&o.defaultPageNames.includes(e[a].name)),required:!0,regex:"^.+$"}),o.jsxRuntimeExports.jsx(o.Input,{label:"Page Title",onChange:O=>x(O),value:v,placeholder:"Contact us",disabled:!!(a&&((k=e[a])!=null&&k.name)&&o.defaultPageNames.includes(e[a].name))}),o.jsxRuntimeExports.jsx(o.Textarea,{label:"Description",onChange:O=>h(O),value:m,placeholder:"Contact us at any time of the day or night. You are always welcome",maxLength:150}),o.jsxRuntimeExports.jsx(o.Radio,{label:"Visibility",defaultValue:g,options:[{value:"public",label:"Public"},{value:"private",label:"Private"}],onChange:O=>y(O)}),o.jsxRuntimeExports.jsxs("div",{className:q.preview,children:[o.jsxRuntimeExports.jsx("span",{className:q.label,children:"Preview"}),o.jsxRuntimeExports.jsxs("div",{className:q.block,children:[o.jsxRuntimeExports.jsx("span",{className:q.slug,children:d||"yoursite.url"}),o.jsxRuntimeExports.jsx("span",{className:q.title,children:v||"My Blank Page"}),o.jsxRuntimeExports.jsx("span",{className:q.description,children:m||"It is My Description"})]})]})]}),o.jsxRuntimeExports.jsxs("div",{className:q.buttons,children:[o.jsxRuntimeExports.jsx(o.Button,{className:q.cancel,onClick:j,children:"Cancel"}),o.jsxRuntimeExports.jsx(o.Button,{onClick:s?I:R,disabled:d.length===0,children:s?"Update":"Create"})]})]})},Bl="_layout_kjedu_1",Ll="_main_kjedu_8",Ml="_content_kjedu_15",nt={layout:Bl,main:Ll,content:Ml},$l=()=>{const{isOpenModal:t,setIsOpenModal:e}=o.usePagesStore();return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsxs("div",{className:nt.layout,children:[o.jsxRuntimeExports.jsx(yo,{}),o.jsxRuntimeExports.jsxs("main",{className:nt.main,children:[o.jsxRuntimeExports.jsx(fo,{}),o.jsxRuntimeExports.jsxs("div",{className:nt.content,children:[o.jsxRuntimeExports.jsx(Sl,{}),o.jsxRuntimeExports.jsx(di,{})]})]})]}),t&&o.jsxRuntimeExports.jsx(o.Modal,{close:e,children:o.jsxRuntimeExports.jsx(Al,{})})]})};async function le(t,e){const n=localStorage.getItem("shopId")||void 0,r=`${Qn}/${t}/builder/shops/${n}/${e}`,s=localStorage.getItem("accessToken")||void 0;return(await T.get(r,{headers:{Authorization:`Bearer ${s}`}})).data}async function Fl(){try{const[t,e,n,r,s,i]=await Promise.allSettled([le("v1","general"),le("v1","faqs"),le("v1","listings"),le("v1","products"),le("v1","reviews"),le("v1","categories")]);return{general:t,faqs:e,listings:n,products:r,reviews:s,categories:i}}catch(t){throw console.error("Error fetching page data:",t),t}}async function Ul(){try{const{data:t}=await T.get(`${Zn}?key=undefined`);return t.items}catch(t){throw console.error("Error fetching page data:",t),t}}const Hl=t=>{const{blocks:e,settings:n}=t,{setBlocks:r,setSourceBlocks:s}=o.useBlocksStore(),{fonts:i,setFonts:a}=o.useFontsStore(),{setSettings:c}=o.useSettingsStore(),{setPageContext:u}=o.usePagesStore();return E.useEffect(()=>{const l={};Object.keys(e).map(p=>{l[p]={...e[p]}}),c(n),s(l),r(e),(async()=>{if(i.length===0){const x=await Ul();a([...x.map(m=>m.family)])}let p={listings:void 0,products:void 0,reviews:void 0,categories:void 0,faqs:void 0,general:void 0};const v=await Fl();Object.keys(v).map(x=>{const m=x;p[m]=v[m].value.data}),u(p)})()},[]),o.jsxRuntimeExports.jsx($l,{})};exports.Builder=Hl;