201<path d="M3 1L7 5L3 9" stroke="currentColor"/>202</svg>203`;204}205206/**207* Создает разметку иконки выхода из аккаунта208* @returns {string}209*/210function tmst__main__createLogoutIconHtml() {211return `212<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.76206 1.66675C3.9731 1.66675 3.3335 2.25585 3.3335 2.98253V17.0176C3.3335 17.7442 3.9731 18.3334 4.76206 18.3334H15.2383C16.0272 18.3334 16.6668 17.7442 16.6668 17.0176V15.2632H15.7144V17.0176C15.7144 17.2599 15.5012 17.4562 15.2383 17.4562H4.76206C4.49908 17.4562 4.28588 17.2599 4.28588 17.0176V2.98253C4.28588 2.74031 4.49908 2.54395 4.76206 2.54395H15.2383C15.5012 2.54395 15.7144 2.74031 15.7144 2.98253V5.00008H16.6668V2.98253C16.6668 2.25585 16.0272 1.66675 15.2383 1.66675H4.76206ZM18.2115 9.68L15.5598 6.79933C15.3971 6.62255 15.1333 6.62255 14.9705 6.79933C14.8078 6.9761 14.8078 7.2627 14.9705 7.43948L16.9108 9.54743H10.0002V10.4527H16.9108L14.9705 12.5607C14.8078 12.7375 14.8078 13.0241 14.9705 13.2008C15.1333 13.3776 15.3971 13.3776 15.5598 13.2008L18.2115 10.3202C18.3742 10.1434 18.3742 9.85678 18.2115 9.68Z" fill="currentColor"/> <path d="M16.6667 15.2632H16.8334V15.0965H16.6667V15.2632ZM15.7144 15.2632V15.0965H15.5477V15.2632H15.7144ZM15.7144 5H15.5477V5.16667H15.7144V5ZM16.6667 5V5.16667H16.8334V5H16.6667ZM16.9107 9.54735V9.71402H17.2907L17.0334 9.43447L16.9107 9.54735ZM10.0001 9.54735V9.38068H9.83341V9.54735H10.0001ZM10.0001 10.4527H9.83341V10.6193H10.0001V10.4527ZM16.9107 10.4527L17.0334 10.5655L17.2907 10.286H16.9107V10.4527ZM3.50008 2.98245C3.50008 2.36045 4.05188 1.83333 4.76198 1.83333V1.5C3.89413 1.5 3.16675 2.15108 3.16675 2.98245H3.50008ZM3.50008 17.0175V2.98245H3.16675V17.0175H3.50008ZM4.76198 18.1667C4.05188 18.1667 3.50008 17.6395 3.50008 17.0175H3.16675C3.16675 17.849 3.89413 18.5 4.76198 18.5V18.1667ZM15.2382 18.1667H4.76198V18.5H15.2382V18.1667ZM16.5001 17.0175C16.5001 17.6395 15.9483 18.1667 15.2382 18.1667V18.5C16.106 18.5 16.8334 17.849 16.8334 17.0175H16.5001ZM16.5001 15.2632V17.0175H16.8334V15.2632H16.5001ZM15.7144 15.4298H16.6667V15.0965H15.7144V15.4298ZM15.881 17.0175V15.2632H15.5477V17.0175H15.881ZM15.2382 17.6228C15.58 17.6228 15.881 17.3645 15.881 17.0175H15.5477C15.5477 17.1552 15.4223 17.2895 15.2382 17.2895V17.6228ZM4.76198 17.6228H15.2382V17.2895H4.76198V17.6228ZM4.11913 17.0175C4.11913 17.3645 4.42011 17.6228 4.76198 17.6228V17.2895C4.57786 17.2895 4.45246 17.1552 4.45246 17.0175H4.11913ZM4.11913 2.98245V17.0175H4.45246V2.98245H4.11913ZM4.76198 2.3772C4.42011 2.3772 4.11913 2.63553 4.11913 2.98245H4.45246C4.45246 2.84492 4.57786 2.71053 4.76198 2.71053V2.3772ZM15.2382 2.3772H4.76198V2.71053H15.2382V2.3772ZM15.881 2.98245C15.881 2.63553 15.58 2.3772 15.2382 2.3772V2.71053C15.4223 2.71053 15.5477 2.84492 15.5477 2.98245H15.881ZM15.881 5V2.98245H15.5477V5H15.881ZM16.6667 4.83333H15.7144V5.16667H16.6667V4.83333ZM16.5001 2.98245V5H16.8334V2.98245H16.5001ZM15.2382 1.83333C15.9483 1.83333 16.5001 2.36045 16.5001 2.98245H16.8334C16.8334 2.15108 16.106 1.5 15.2382 1.5V1.83333ZM4.76198 1.83333H15.2382V1.5H4.76198V1.83333ZM15.4371 6.91212L18.0887 9.7928L18.3341 9.5670 … </svg> `;}/** * Определяет, есть ли что-то, что можно отобразить на главной странице * @param {DashboardData} [dashboardData] */function tmst__main__hasStoreManagementResources(dashboardData) { return ( window.tildaMembers.is_init_store && dashboardData && (dashboardData.orders_count || dashboardData.purchases_count || dashboardData.active_order) );}/** * Создает карточки с информацией по заказам в зависимости от данных * * @param {DashboardData} ordersInfo * @returns {HTMLElement | undefined} элемент с карточками */function tmst__main__createContent(ordersInfo) { const { last_delivery, active_order, orders_count, purchases_count, last_purchases, last_orders, active_orders_count, } = ordersInfo; const arrowRightIconHtml = tmst__main__createArrowRightIconHtml(); const welcomepageSettings = window.tildaMembers.settingStyles.welcomepage || {}; const { ordersManagementShowOrders = true, ordersManagementShowPurchased = true, ordersManagementShowAddresses = true, ordersManagementShowProfile = true, } = welcomepageSettings; /** * Получает элемент ссылки * * @param {CardLink} link * @returns {HTMLElement} */ const createLinkEl = link => { const { html, href, className = '' } = link; return tmst__createElementFromString( `<a class="tmst-main__card__link ${className}" href="${href}" data-field="tlk-link"> ${tma__translate(html, 'store_dict')} </a>` ); }; /** * Получает элемент ссылки * * @param {CardButton} btn * @returns {HTMLElement} */ const createButtonEl = btn => { const { html, onClick, className = '' } = btn; const el = tmst__createElementFromString( `<button class="tmst-main__card__link ${className}" data-field="tlk-link"> ${tma__translate(html, 'store_dict')} </button>` ); if (typeof onClick === 'function') { el.addEventListener('click', onClick); } return el; }; /** @type {CardData[]} */ const cardsData = []; // Мои заказы if (ordersManagementShowOrders) { const headerEl = document.createDocumentFragment(); const headerText = tmst__createElementFromString( `<a href="/members/orderlist" class="tmst-main__card__title tmst-main__text-decoration-none" data-field="tlk-title">${tma__translate(Длинные строки сокращены. Полная версия доступна по ссылке «Полный текст».