diff --git a/admin/admin.css b/admin/admin.css index 9de8ec3..bdc61ca 100644 --- a/admin/admin.css +++ b/admin/admin.css @@ -923,6 +923,72 @@ body[data-file-picker-active="true"] .editor { align-content: start; } +.range-field { + gap: 0.46rem; +} + +.range-control { + display: flex; + min-height: 2.72rem; + align-items: center; + gap: 0.85rem; + border-radius: var(--launcher-radius-control); + background: var(--field); + padding: 0 0.86rem; +} + +.range-control input[type="range"] { + height: 1.5rem; + min-width: 0; + flex: 1 1 auto; + appearance: none; + border: 0; + border-radius: 0; + background: transparent; + padding: 0; + accent-color: #f7f8f4; +} + +.range-control input[type="range"]::-webkit-slider-runnable-track { + height: 0.32rem; + border-radius: 999px; + background: rgba(255, 255, 255, 0.16); +} + +.range-control input[type="range"]::-webkit-slider-thumb { + width: 1.08rem; + height: 1.08rem; + margin-top: -0.38rem; + appearance: none; + border-radius: 50%; + background: #f7f8f4; + box-shadow: 0 0 0 0.28rem rgba(255, 255, 255, 0.08); +} + +.range-control input[type="range"]::-moz-range-track { + height: 0.32rem; + border-radius: 999px; + background: rgba(255, 255, 255, 0.16); +} + +.range-control input[type="range"]::-moz-range-thumb { + width: 1.08rem; + height: 1.08rem; + border: 0; + border-radius: 50%; + background: #f7f8f4; + box-shadow: 0 0 0 0.28rem rgba(255, 255, 255, 0.08); +} + +.range-value { + min-width: 3.4rem; + color: var(--text-secondary); + font-size: 0.78rem; + font-weight: 850; + text-align: right; + white-space: nowrap; +} + .boolean-field input, .group-head-toggle input { width: 2.42rem; diff --git a/admin/admin.js b/admin/admin.js index c1cde1a..a6084a7 100644 --- a/admin/admin.js +++ b/admin/admin.js @@ -202,9 +202,12 @@ const GROUP_COPY = { "Видео-окно": "Окно демо-видео и подключенный медиа-файл.", Пункты: "Текстовые пункты внутри секции.", Слайдер: "Видео-превью и подписи карточек внутри горизонтального слайдера.", + Скролл: "Скорость локальной прокрутки внутри блока: меньше значение — спокойнее шаг, больше — быстрее.", "Один клик": "Подблок про быстрое добавление и настройку компонентов.", MCP: "Подблок про MCP-сервер и контекст Webflow.", - FAQ: "Список вопросов и тексты ответов в mail-интерфейсе.", + "Окно FAQ": "Название окна FAQ и служебные подписи mail-интерфейса.", + Отправитель: "Профиль отправителя в FAQ: аватар, имя и подписи письма.", + FAQ: "Вопросы и ответы mail-интерфейса. Каждый пункт можно добавить, удалить и переставить.", CTA: "Финальный призыв к действию: заголовок, пояснение, кнопка и ссылка.", Тарифы: "Верхняя часть тарифной таблицы: заголовки, планы, цены, кнопки и примечания.", "Строки тарифов": "Повторяемые строки тарифной таблицы и значения по каждому плану.", @@ -324,6 +327,7 @@ function inferFieldGroup(path) { if (path === "content.legalHtml") return "Юридический блок"; if (path === "content.windowTitle" || path === "content.videoSrc") return "Видео-окно"; if (path.startsWith("content.features.")) return "Пункты"; + if (path.startsWith("content.scroll.")) return "Скролл"; if (path.startsWith("content.sliderItems.")) return "Слайдер"; if (path.startsWith("content.oneClick.")) return "Один клик"; if (path.startsWith("content.mcp.")) return "MCP"; @@ -1393,8 +1397,19 @@ function prepareCollectionItemForInsert(items, item) { return nextItem; } +function fieldInputValue(input) { + if (input.type === "checkbox") return input.checked; + + if (input.dataset.valueType === "number" || input.type === "range" || input.type === "number") { + const value = Number.parseFloat(input.value); + return Number.isFinite(value) ? value : 0; + } + + return input.value; +} + function syncFieldValue(block, path, input) { - setByPath(block, path, input.type === "checkbox" ? input.checked : input.value); + setByPath(block, path, fieldInputValue(input)); el.json.value = JSON.stringify(block, null, 2); markDirty(); } @@ -1431,6 +1446,60 @@ function renderBooleanField({ block, editableField, grid }) { grid.append(label); } +function formatRangeValue(value, editableField) { + const step = Number.parseFloat(editableField.step ?? 1); + const precision = Number.isFinite(step) && step > 0 && step < 1 ? String(step).split(".")[1]?.length || 0 : 0; + return `${Number(value).toFixed(precision)}${editableField.suffix || ""}`; +} + +function renderRangeField({ block, editableField, grid }) { + const label = document.createElement("label"); + const labelRow = document.createElement("span"); + const labelText = document.createElement("span"); + const kind = document.createElement("span"); + const path = document.createElement("span"); + const control = document.createElement("span"); + const input = document.createElement("input"); + const output = document.createElement("span"); + const min = Number.parseFloat(editableField.min ?? 0); + const max = Number.parseFloat(editableField.max ?? 1); + const step = Number.parseFloat(editableField.step ?? 0.01); + const rawValue = Number.parseFloat(getByPath(block, editableField.path)); + const value = Number.isFinite(rawValue) ? rawValue : min; + + label.className = "field-control range-field wide"; + labelRow.className = "field-label-row"; + labelText.className = "field-label-text"; + labelText.textContent = editableField.label || editableField.path; + kind.className = "field-kind"; + kind.textContent = editableField.kind || "range"; + path.className = "field-path"; + path.textContent = editableField.path; + control.className = "range-control"; + output.className = "range-value"; + labelRow.append(labelText, kind); + + input.dataset.path = editableField.path; + input.dataset.valueType = "number"; + input.type = "range"; + input.min = Number.isFinite(min) ? String(min) : "0"; + input.max = Number.isFinite(max) ? String(max) : "1"; + input.step = Number.isFinite(step) ? String(step) : "0.01"; + input.value = String(value); + output.textContent = formatRangeValue(value, editableField); + + input.addEventListener("input", () => { + const active = activeBlock(); + if (!active) return; + output.textContent = formatRangeValue(input.value, editableField); + syncFieldValue(active, editableField.path, input); + }); + + control.append(input, output); + label.append(labelRow, control, path); + grid.append(label); +} + function renderHeaderBooleanToggle({ block, editableField, head }) { const label = document.createElement("label"); const input = document.createElement("input"); @@ -1458,6 +1527,11 @@ function renderCollectionScalarField({ block, field, grid }) { return; } + if (field.kind === "range") { + renderRangeField({ block, editableField: field, grid }); + return; + } + const label = document.createElement("label"); const labelRow = document.createElement("span"); const labelText = document.createElement("span"); @@ -1723,6 +1797,11 @@ function renderContentFields(block) { continue; } + if (editableField.kind === "range") { + renderRangeField({ block, editableField, grid }); + continue; + } + const label = document.createElement("label"); const labelRow = document.createElement("span"); const labelText = document.createElement("span"); @@ -1770,7 +1849,7 @@ function syncContentFields() { if (!block) return; for (const input of el.contentFields.querySelectorAll("[data-path]")) { - setByPath(block, input.dataset.path, input.type === "checkbox" ? input.checked : input.value); + setByPath(block, input.dataset.path, fieldInputValue(input)); } } diff --git a/assets/custom/js/app.js b/assets/custom/js/app.js index 11c07ae..018571b 100644 --- a/assets/custom/js/app.js +++ b/assets/custom/js/app.js @@ -83,13 +83,8 @@ float valueNoise(vec2 p) { } void main() { - float time = uUni[0].w; vec2 uv = vUv * uUni[1].xy + uUni[1].zw; - vec2 noiseUv = uv * 9.0 + vec2(time * 0.35, time * 0.22); - float n = valueNoise(noiseUv); - float offset = (n - 0.5) * 0.035; - vec2 distortedUv = uv + vec2(offset, -offset * 0.65); - outColor = texture(uTexture, distortedUv); + outColor = texture(uTexture, uv); }`}function iU(Q){let $=Q.shaders?.fragment??Q.shaders?.wgsl??null;if($)try{return{vertex:wq(),fragment:$8($,{includeUv:!0})}}catch(J){console.warn("Failed to compile custom WGSL fragment for WebGL, using default shader:",J)}if(Q.shaders?.vertex)console.warn("Custom WGSL vertex shaders are not supported on the WebGL runtime.");return{vertex:wq(),fragment:Q.hasTexture?lU():sU(Q.debugUv)}}function nU(Q,$={},J){let H=Sq($),q=Q.device.gl,K=J??T$($.uni??{value1:1}),G=K.toFloat32(16),U=K.subscribe(()=>{G=K.toFloat32(16)}),W=$.texture??null,X=W?.view?.texture,j=iU({debugUv:Boolean($.debugUv),shaders:$.shaders,hasTexture:Boolean(X)}),L=Boolean(X),B=I$(q,j.vertex,j.fragment,"plane"),M=null,I=null,z=null,R=q.createVertexArray(),F=q.createBuffer(),V=q.createBuffer();if(!R||!F||!V)throw new Error("Failed to create WebGL buffers.");q.bindVertexArray(R),q.bindBuffer(q.ARRAY_BUFFER,F),q.bufferData(q.ARRAY_BUFFER,H.vertices,q.STATIC_DRAW),q.enableVertexAttribArray(0),q.vertexAttribPointer(0,2,q.FLOAT,!1,16,0),q.enableVertexAttribArray(1),q.vertexAttribPointer(1,2,q.FLOAT,!1,16,8),q.bindBuffer(q.ELEMENT_ARRAY_BUFFER,V),q.bufferData(q.ELEMENT_ARRAY_BUFFER,H.indices,q.STATIC_DRAW),q.bindVertexArray(null);let Y=H.indices instanceof Uint32Array?q.UNSIGNED_INT:q.UNSIGNED_SHORT;return{geometry:H,render(N){if(!M){if(M=B.poll(),!M)return;I=q.getUniformLocation(M,"uUni"),z=q.getUniformLocation(M,"uTexture")}if(K.set({value4:performance.now()*0.001}),W){let C=N.canvas.width/Math.max(1,N.canvas.height),D=_J(W.aspect,C,$.textureFit??"cover");K.set({value5:D.scaleX,value6:D.scaleY,value7:D.offsetX,value8:D.offsetY})}if(q.disable(q.DEPTH_TEST),q.useProgram(M),I)q.uniform4fv(I,G);if(L&&X&&z)q.activeTexture(q.TEXTURE0),q.bindTexture(q.TEXTURE_2D,X),q.uniform1i(z,0);if(q.bindVertexArray(R),q.drawElements(q.TRIANGLES,H.indexCount,Y,0),q.bindVertexArray(null),L)q.bindTexture(q.TEXTURE_2D,null)},destroy(){U(),q.deleteBuffer(F),q.deleteBuffer(V),q.deleteVertexArray(R),B.destroy()}}}function uJ(Q={}){let $={subdivisionsX:Q.subdivisionsX??1,subdivisionsY:Q.subdivisionsY??1,debugUv:Q.debugUv??!1,shaders:Q.shaders,uni:Q.uni,texture:Q.texture??null,textureFit:Q.textureFit??"cover",renderLayer:Q.renderLayer??0},J=null,H=T$(Q.uni??{value1:1}),Z=null,q=(U)=>{if(!J)J=nU(U,$,H);if(Z)$.onFrame?.(Z,U);J.render(U)},K=null,G=()=>{K?.(),K=f0.onRender(q,{layer:$.renderLayer??0})};return G(),Z={render(){f0.chain((U)=>U.render())},configure(U){if($={...$,...U},G(),J)J.destroy(),J=null},destroy(){if(K?.(),K=null,J)J.destroy(),J=null},getGeometry(){return J?.geometry??Sq($)},setUni(U){H.set(U)},getUni(){return H.target}},Z}function rU(Q){if(typeof Q==="number")return{x:Q,y:Q};return{x:Q?.x??1,y:Q?.y??1}}function bq(Q){let $=rU(Q.subdivs);return{subdivisionsX:$.x,subdivisionsY:$.y,renderLayer:Q.layer??-100,debugUv:Q.debugUv??!1,shaders:Q.shaders,uni:Q.uni,texture:Q.texture??null,textureFit:Q.textureFit??"cover"}}function Tq(Q={}){let $=null,J=uJ({...bq(Q),onFrame:(H,Z)=>{if($)Q.onFrame?.($,Z)}});return $={render:()=>J.render(),configure(H){let Z={...Q,...H};Q=Z,J.configure(bq(Z))},destroy:()=>J.destroy(),getPlane:()=>J,setUni:(H)=>J.setUni(H),getUni:()=>J.getUni()},$}function d7(Q,$,J){return Math.min(J,Math.max($,Q))}function yq(Q,$){let J=Q.getBoundingClientRect(),H=$.getBoundingClientRect(),Z=J.left-H.left,q=J.right-H.left,K=J.top-H.top,G=J.bottom-H.top,U=Math.max(1,H.width),W=Math.max(1,H.height);if(!(q>0&&Z0&&K{if(this.destroyed)return;if(!this.canvas)this.canvas=Q.canvas;if(this.canvas!==Q.canvas)return;if(!this.renderer)this.renderer=$W(this.element,Q,this.options,this.uni);this.options.onFrame?.(this,Q),this.renderer.render(Q)},{layer:this.options.layer??10})}static ensurePendingLoop(){if(_1.pendingRafId)return;let Q=()=>{if(_1.pendingRafId=0,_1.pending.size===0)return;if(!f0.get()){_1.pendingRafId=window.requestAnimationFrame(Q);return}let J=Array.from(_1.pending);_1.pending.clear(),J.forEach((H)=>H.attach())};_1.pendingRafId=window.requestAnimationFrame(Q)}}function hq(){return`#version 300 es in vec2 aPosition; in vec2 aUv; @@ -552,11 +547,8 @@ vec4 applyEffect(vec4 color, vec2 uv, vec2 _resolution, vec4 uni[4]) { vec3 bandTint = vec3(0.18, 0.55, 1.0) * band * 0.16; outRgb = clamp(outRgb + bandTint * transitionStrength * backgroundMask, 0.0, 1.0); - // Dither to hide banding in the light gradient. - vec2 ditherUv = uv * _resolution + vec2(t * 60.0, t * 37.0); - float ditherNoise = fract(sin(dot(ditherUv, vec2(12.9898, 78.233))) * 43758.5453); - float dither = (ditherNoise - 0.5) / 255.0; - outRgb = clamp(outRgb + vec3(dither) * backgroundMask, 0.0, 1.0); + // Keep the background clean: animated dither reads as TV noise on dark screens. + outRgb = clamp(outRgb, 0.0, 1.0); // Restore alpha to 1.0 for final canvas output. return vec4(outRgb, 1.0); @@ -666,7 +658,7 @@ vec4 applyEffect(vec4 color, vec2 uv, vec2 resolution, vec4 uni[4]) { vec3 mixed = mix(color.rgb, asciiRgb, asciiMask); return vec4(mixed, color.a); } -`}),J.addNoiseEffect({amount:0.03,enabled:!0}),J}function e7(Q,$){let J=typeof window!=="undefined"?window.location.pathname:"";if(!(Q instanceof HTMLCanvasElement)){console.warn('"webgl" module expects a element.');return}let H=new gJ(Q,{screen:{subdivs:p.scene.subdivs,shaders:{fragment:` +`}),J.addNoiseEffect({amount:0,enabled:!1}),J}function e7(Q,$){let J=typeof window!=="undefined"?window.location.pathname:"";if(!(Q instanceof HTMLCanvasElement)){console.warn('"webgl" module expects a element.');return}let H=new gJ(Q,{screen:{subdivs:p.scene.subdivs,shaders:{fragment:` @fragment fn fsMain(in: VertexOut) -> @location(0) vec4f { let uv = in.uv; @@ -687,6 +679,6 @@ fn fsMain(in: VertexOut) -> @location(0) vec4f { // Alpha=0 marks background pixels so the post wipe can distinguish them from the model. return vec4f(darkCol, 0.0); } -`}},onInitError:(j)=>{console.warn("Failed to initialize mini WebGL runtime:",j)}}),Z=C9({easing:p.scene.mouseEasing}),q=iJ({element:Q,eventElement:window}),K=Z4(q,s8),G=S$.add(()=>{let j=s8();K.setEffectUni("background-flip-wipe",{value1:j}),K.setEffectUni("ascii-trail-mix",{value1:j})}),U=0,W=S0.add((j)=>{if(typeof j?.velocity==="number"){U=j.velocity;return}U=0}),X=nJ(H,{placement:p.scene.icon.placement,mouse:Z,getScale:rJ,getBackgroundFlipProgress:s8,getScrollVelocity:()=>U,scrollVelocityToYOffset:p.scene.icon.scrollVelocityToYOffset,scrollVelocityToXRotation:p.scene.icon.scrollVelocityToXRotation,scrollVelocityToYRotation:p.scene.icon.scrollVelocityToYRotation,scrollFlipVelocityThreshold:p.scene.icon.scrollFlipVelocityThreshold,scrollFlipDuration:p.scene.icon.scrollFlipDuration,scrollYOffsetDamping:p.scene.icon.scrollYOffsetDamping,scrollYOffsetRecenter:p.scene.icon.scrollBounceBack,scrollYOffsetEase:p.scene.icon.scrollYOffsetEase,idleFloatYOffsetAmplitude:p.scene.icon.idleFloatYOffsetAmplitude,idleFloatYOffsetSpeed:p.scene.icon.idleFloatYOffsetSpeed,idleFloatRotationAmplitude:p.scene.icon.idleFloatRotationAmplitude,idleFloatRotationSpeed:p.scene.icon.idleFloatRotationSpeed,log:p.scene.icon.log});return()=>{X(),G(),W(),K.destroy(),q.destroy(),Z.destroy(),H.destroy()}}var AH={};r(AH,{default:()=>dK});var vK="h1, h2, h3, h4",uK={opacity:0,xPercent:20,yPercent:20},q4="blur(6px)",mK={opacity:0,yPercent:12},E9={stagger:0.2,delay:0.1,paragraphDelay:0.05,paragraphWordStagger:0.04,groupStagger:0.18};function $Q(Q){return Q.filter(($)=>!!$&&$.isConnected)}function O9(Q,$){let J=$Q(Q);if(!J.length)return;n.set(J,$)}function K4(Q,$){let J=$Q(Q);if(!J.length)return;n.to(J,$)}function G4(Q){let $=$Q(Q);if(!$.length)return;n.killTweensOf($)}function U4(Q){let $=Q.parentElement,J=document.createElement("div");J.style.position="relative",J.style.display=Q.style.display||"block",$.insertBefore(J,Q),J.appendChild(Q),Q.style.opacity="0";let H=Q.cloneNode(!0);return H.setAttribute("aria-hidden","true"),H.style.opacity="1",H.style.position="absolute",H.style.top="0",H.style.left="0",H.style.width="100%",H.style.height="100%",H.style.pointerEvents="none",H.style.overflow="visible",H.style.zIndex="1",J.appendChild(H),new L$(H,{type:"words"}).words}function dK(Q,$){let J=$.group,H=J?Array.from(document.querySelectorAll(`[data-module="hg"][data-group="${CSS.escape(J)}"]`)).indexOf(Q):0,Z=Q.querySelector(`:scope > ${vK}`),q=Array.from(Q.querySelectorAll(`:scope > p, :scope > div:not(:has(${vK})):not(:has(a, button, [data-module="btn"]))`)).filter((X)=>!X.closest("a, button, [data-module='btn']")),K=Z?Array.from(Z.querySelectorAll("span")):[],G=K.length>0?K:Z?[Z]:[],U=[];if(q.length)U=q.flatMap(U4),O9(U,mK);if(!(G.length>0||U.length>0))return;O9(G,uK),O9([Q],{opacity:1}),l1(Q,{autoStart:!0,once:!1,callback:({isIn:X,direction:j})=>{if(X){if(Zq){O9([Q],{opacity:1}),O9(q,{opacity:1});return}let L=j===-1,B=J==="hero"&&!Q._hgAnimated,M=H*(B?E9.groupStagger*3:E9.groupStagger),I=E9.delay+M,z=E9.delay+E9.paragraphDelay+M;if(G.length){let R=$Q(G);if(R.length)n.fromTo(R,{filter:q4},{opacity:1,filter:"blur(0px)",xPercent:0,yPercent:0,stagger:{each:E9.stagger,from:L?"end":"start"},delay:I,onComplete:()=>{n.set(R,{clearProps:"filter"})}})}if(U.length)K4(U,{opacity:1,yPercent:0,stagger:{each:E9.paragraphWordStagger,from:L?"end":"start"},delay:z,ease:"expo.out"});if(B)Q._hgAnimated=!0}else G4([...G,...U]),O9(G,{...uK,clearProps:"filter"}),O9(U,mK)}})}var PH={};r(PH,{default:()=>oK});var gK="[data-ho-sticky]",W4="[data-ho-track]",X4=".ho-c",cK=0;function pK(Q,$){if(Q==null||Q==="")return $;let J=parseFloat(Q);if(!Number.isFinite(J))return $;return M$(0,0.45,J)}function j4(Q){let $=cK,J=cK,H=Q.hoBuffer?.split(",").map((Z)=>parseFloat(Z.trim()));if(H&&H.length>=2&&Number.isFinite(H[0])&&Number.isFinite(H[1]))$=M$(0,0.45,H[0]),J=M$(0,0.45,H[1]);if($=pK(Q.hoBufferStart,$),J=pK(Q.hoBufferEnd,J),$+J>=1){let Z=0.98/($+J);return{start:$*Z,end:J*Z}}return{start:$,end:J}}function B4(Q){if(Q.matches(gK))return Q;return Q.querySelector(gK)??Q.firstElementChild}function oK(Q,$){let J=j4($),H=B4(Q),Z=H?.querySelector(W4)??H?.firstElementChild;if(!H){console.warn("[ho-scroll] No sticky wrapper: put [data-ho-sticky] on the module root or add a first element child as the sticky container.");return}if(!Z){console.warn("[ho-scroll] No track: add [data-ho-track] inside the sticky wrapper, or make the wide row its first element child.");return}let q=0,K=1,G=[],U=null,W=parseFloat($.hoCThreshold??""),X=Number.isFinite(W)?M$(0.01,1,W):0.15,j=()=>{U?.disconnect(),U=null;for(let z of G)z.style.opacity="";if(G=Array.from(Z.querySelectorAll(X4)),G.length===0)return;for(let z of G)z.style.opacity="0";U=new IntersectionObserver((z)=>{for(let R of z){let F=R.target;F.style.opacity=R.isIntersecting?"1":"0"}},{root:H,threshold:X});for(let z of G)U.observe(z)},L=()=>{let z=Q.getBoundingClientRect().top+S0.scroll,R=S0.scroll-z,F=0;if(q>0){let V=J.start*K,Y=J.end*K,N=Math.max(0.000001,K-V-Y);F=M$(0,1,(R-V)/N)}if(q<=0){Z.style.transform="";return}Z.style.transform=`translate3d(${-F*q}px, 0, 0)`},B=()=>{q=Math.max(0,Z.scrollWidth-window.innerWidth);let z=H.offsetHeight;if(Q.style.minHeight=`${z+q}px`,K=Math.max(0.000001,Q.offsetHeight-H.offsetHeight),q>0&&K{M(),I(),U?.disconnect(),Q.style.minHeight="",Z.style.transform="";for(let z of G)z.style.opacity=""}}var kH={};r(kH,{default:()=>sK});function sK(Q,$){let J=Q.children[0].children[0],H=new L$(J,{type:"chars"}).chars,Z=0.018;H.forEach((q,K)=>{let G=q;G.style.transitionDelay=`${K*0.018}s`})}var xH={};r(xH,{default:()=>lK});var L4=0.12,I4=0.21;function lK(Q,$){let J=Q.querySelectorAll("a"),H=$.group,Z=H?Array.from(document.querySelectorAll(`[data-module="list"][data-group="${CSS.escape(H)}"]`)).indexOf(Q)*I4:0;n.set(J,{opacity:0,yPercent:100}),l1(Q,{autoStart:!0,callback:({isIn:q})=>{if(q)n.to(J,{opacity:1,yPercent:0,stagger:L4,delay:Z});else n.killTweensOf(J),n.set(J,{opacity:0,yPercent:100})}})}var wH={};r(wH,{default:()=>aK});var M4=Object.create,{getPrototypeOf:z4,defineProperty:iK,getOwnPropertyNames:Y4}=Object,N4=Object.prototype.hasOwnProperty,D4=(Q,$,J)=>{J=Q!=null?M4(z4(Q)):{};let H=$||!Q||!Q.__esModule?iK(J,"default",{value:Q,enumerable:!0}):J;for(let Z of Y4(Q))if(!N4.call(H,Z))iK(H,Z,{get:()=>Q[Z],enumerable:!0});return H},F4=(Q,$)=>()=>($||Q(($={exports:{}}).exports,$),$.exports),V4=F4((Q,$)=>{(function(J,H){typeof Q=="object"&&typeof $!="undefined"?$.exports=H():typeof define=="function"&&define.amd?define(H):(J||self).virtualScroll=H()})(Q,function(){var J=0;function H(I){return"__private_"+J+++"_"+I}function Z(I,z){if(!Object.prototype.hasOwnProperty.call(I,z))throw new TypeError("attempted to use private field on non-instance");return I}function q(){}q.prototype={on:function(I,z,R){var F=this.e||(this.e={});return(F[I]||(F[I]=[])).push({fn:z,ctx:R}),this},once:function(I,z,R){var F=this;function V(){F.off(I,V),z.apply(R,arguments)}return V._=z,this.on(I,V,R)},emit:function(I){for(var z=[].slice.call(arguments,1),R=((this.e||(this.e={}))[I]||[]).slice(),F=0,V=R.length;F1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1}),Z(this,W)[W]=Object.assign({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",useKeyboard:!0,useTouch:!0},R),Z(this,j)[j]=new K,Z(this,L)[L]={y:0,x:0,deltaX:0,deltaY:0},Z(this,B)[B]={x:null,y:null},Z(this,M)[M]=null,Z(this,W)[W].passive!==void 0&&(this.listenerOptions={passive:Z(this,W)[W].passive})}var z=I.prototype;return z._notify=function(R){var F=Z(this,L)[L];F.x+=F.deltaX,F.y+=F.deltaY,Z(this,j)[j].emit(U,{x:F.x,y:F.y,deltaX:F.deltaX,deltaY:F.deltaY,originalEvent:R})},z._bind=function(){G.hasWheelEvent&&Z(this,X)[X].addEventListener("wheel",this._onWheel,this.listenerOptions),G.hasMouseWheelEvent&&Z(this,X)[X].addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),G.hasTouch&&Z(this,W)[W].useTouch&&(Z(this,X)[X].addEventListener("touchstart",this._onTouchStart,this.listenerOptions),Z(this,X)[X].addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),G.hasPointer&&G.hasTouchWin&&(Z(this,M)[M]=document.body.style.msTouchAction,document.body.style.msTouchAction="none",Z(this,X)[X].addEventListener("MSPointerDown",this._onTouchStart,!0),Z(this,X)[X].addEventListener("MSPointerMove",this._onTouchMove,!0)),G.hasKeyDown&&Z(this,W)[W].useKeyboard&&document.addEventListener("keydown",this._onKeyDown)},z._unbind=function(){G.hasWheelEvent&&Z(this,X)[X].removeEventListener("wheel",this._onWheel),G.hasMouseWheelEvent&&Z(this,X)[X].removeEventListener("mousewheel",this._onMouseWheel),G.hasTouch&&(Z(this,X)[X].removeEventListener("touchstart",this._onTouchStart),Z(this,X)[X].removeEventListener("touchmove",this._onTouchMove)),G.hasPointer&&G.hasTouchWin&&(document.body.style.msTouchAction=Z(this,M)[M],Z(this,X)[X].removeEventListener("MSPointerDown",this._onTouchStart,!0),Z(this,X)[X].removeEventListener("MSPointerMove",this._onTouchMove,!0)),G.hasKeyDown&&Z(this,W)[W].useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)},z.on=function(R,F){Z(this,j)[j].on(U,R,F);var V=Z(this,j)[j].e;V&&V[U]&&V[U].length===1&&this._bind()},z.off=function(R,F){Z(this,j)[j].off(U,R,F);var V=Z(this,j)[j].e;(!V[U]||V[U].length<=0)&&this._unbind()},z.destroy=function(){Z(this,j)[j].off(),this._unbind()},I}()})}),R4=D4(V4(),1);function nK(Q,$,J,H){let Z=1-Math.exp(-J*H);return Q+($-Q)*Z}function QQ(Q,$){let J=Q%$;if(Math.abs(J)>$/2)J=J>0?J-$:J+$;return J}var C4={infinite:!0,snap:!0,variableWidth:!1,vertical:!1,dragSensitivity:0.005,lerpFactor:0.3,scrollSensitivity:1,snapStrength:0.1,speedDecay:0.85,bounceLimit:1,virtualScroll:{mouseMultiplier:0.5,touchMultiplier:2,firefoxMultiplier:30,useKeyboard:!1,passive:!0},setOffset:({itemWidth:Q,wrapperWidth:$,itemHeight:J,wrapperHeight:H,vertical:Z})=>Z?J:Q,scrollInput:!1};class rK{speed=0;#$=0;#H=0;#Q=0;deltaTime=0;#J=!0;#Z=!1;#q=0;#j=0;config;wrapper;items;viewport;itemWidths=[];itemOffsets=[];itemHeights=[];itemHeightOffsets=[];isDragging=!1;isTouching=!1;dragStart=0;dragStartTarget=0;isVisible=!1;current=0;target=0;maxScroll=0;resizeTimeout;virtualScroll;observer;touchStartY;touchStartX;touchPreviousX;touchPreviousY;scrollDirection;parallaxValues;webglValue=0;onSlideChange;onResize;onUpdate;constructor(Q,$={}){if(this.config={...C4,...$},$.onSlideChange)this.onSlideChange=$.onSlideChange;if($.onResize)this.onResize=$.onResize;if($.onUpdate)this.onUpdate=$.onUpdate;if(delete this.config.onSlideChange,delete this.config.onResize,delete this.config.onUpdate,this.wrapper=Q,this.items=[...Q.children],this.current=0,this.target=0,this.isDragging=!1,this.isTouching=!1,this.dragStart=0,this.dragStartTarget=0,this.isVisible=!1,this.#q=0,this.#j=0,this.#B(),this.#D(),this.#F(),this.wrapper.style.cursor="grab",this.#B(),this.#V(),this.config.variableWidth&&!this.config.infinite&&this.items.length>0){let J=this.#K(0);this.target=J,this.current=J,this.#N()}}#D(){let Q={root:null,rootMargin:"50px",threshold:0};this.observer=new IntersectionObserver(($)=>{$.forEach((J)=>{this.isVisible=J.isIntersecting})},Q),this.observer.observe(this.wrapper)}#B(){let Q=this.items.map((U)=>U.getBoundingClientRect().width),$=this.items.map((U)=>U.getBoundingClientRect().height),J=this.wrapper.clientWidth,H=this.wrapper.clientHeight,Z=Q.reduce((U,W)=>U+W,0),q=$.reduce((U,W)=>U+W,0),K=0;this.itemOffsets=Q.map((U)=>{let W=K;return K+=U,W}),this.itemWidths=Q;let G=0;if(this.itemHeightOffsets=$.map((U)=>{let W=G;return G+=U,W}),this.itemHeights=$,this.viewport={itemWidth:Q[0]??0,wrapperWidth:J,totalWidth:Z,itemHeight:$[0]??0,wrapperHeight:H,totalHeight:q,vertical:this.config.vertical},this.#H=this.config.setOffset(this.viewport),this.config.variableWidth)if(this.config.vertical)this.maxScroll=-(this.viewport.totalHeight-this.#H);else this.maxScroll=-(this.viewport.totalWidth-this.#H);else{let U=this.config.vertical?this.viewport.itemHeight||1:this.viewport.itemWidth||1,W=this.config.vertical?this.viewport.totalHeight:this.viewport.totalWidth;this.maxScroll=-(W-this.#H)/U}queueMicrotask(()=>{this.onResize?.(this)})}#F(){let Q=(G)=>this.#G(G),$=(G)=>this.#U(G),J=()=>this.#W();this.wrapper.addEventListener("mousedown",Q),window.addEventListener("mousemove",$),window.addEventListener("mouseup",J);let H=5,Z=(G)=>{let U=G.touches[0];this.touchStartY=U.clientY,this.touchStartX=U.clientX,this.touchPreviousX=U.clientX,this.touchPreviousY=U.clientY,this.scrollDirection=void 0,this.isTouching=!0,this.#G(U)},q=(G)=>{if(!this.isTouching||this.#Z)return;let U=G.touches[0],W=Math.abs(U.clientY-this.touchStartY),X=Math.abs(U.clientX-this.touchStartX);if(!this.scrollDirection&&(X>H||W>H))this.scrollDirection=X>W?"horizontal":"vertical";if(this.config.vertical?this.scrollDirection==="vertical":this.scrollDirection==="horizontal")if(G.preventDefault(),this.#U(U),this.config.vertical)this.touchPreviousY=U.clientY;else this.touchPreviousX=U.clientX},K=()=>{this.isTouching=!1,this.scrollDirection=void 0,this.touchPreviousX=void 0,this.touchPreviousY=void 0,this.#W()};this.wrapper.addEventListener("touchstart",Z),window.addEventListener("touchmove",q,{passive:!1}),window.addEventListener("touchend",K),new ResizeObserver(()=>{if(this.resizeTimeout)clearTimeout(this.resizeTimeout);this.resizeTimeout=setTimeout(()=>this.resize(),10)}).observe(this.wrapper)}#M(Q){if(!this.config.infinite){let $=this.config.vertical?this.viewport.itemHeight:this.viewport.itemWidth,J=this.config.variableWidth&&$?this.config.bounceLimit*$:this.config.bounceLimit;if(Q>J)return J;else if(Q{if(!this.isDragging&&!this.#Z){if($.touchDevice){let K=Math.abs($.deltaY),G=Math.abs($.deltaX);if(KK)return}else if(K>G)return}let J=this.config.vertical?!this.config.scrollInput?$.deltaY:Math.abs($.deltaY)>Math.abs($.deltaX)?$.deltaY:$.deltaX:!this.config.scrollInput?$.deltaX:Math.abs($.deltaX)>Math.abs($.deltaY)?$.deltaX:$.deltaY,H=this.config.variableWidth?this.config.scrollSensitivity:this.config.scrollSensitivity*0.001,Z=J*H,q=this.target+Z;if(!this.config.infinite){if(q>0)q=0;else if(q0)this.target=0;else if(this.target0)this.target=0;else if(this.target{let J=this.config.vertical?this.current*this.viewport.itemHeight:this.current*this.viewport.itemWidth,H=this.config.vertical?`translateY(${J}px)`:`translateX(${J}px)`;return Q.style.transform=H,J})}#C(){this.parallaxValues=this.items.map((Q,$)=>{let J=this.current+$,H=QQ(J,this.items.length)-$,Z=this.config.vertical?this.viewport.itemHeight:this.viewport.itemWidth,q=H*Z,K=this.config.vertical?`translateY(${q}px)`:`translateX(${q}px)`;return Q.style.transform=K,QQ(J,this.items.length)})}#z(Q){if(this.config.vertical){let $=this.itemHeights[Q]??this.viewport.itemHeight??0;return(this.itemHeightOffsets[Q]??0)+$/2}else{let $=this.itemWidths[Q]??this.viewport.itemWidth??0;return(this.itemOffsets[Q]??0)+$/2}}#K(Q){let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,J=this.config.vertical?this.viewport.wrapperHeight/2:this.viewport.wrapperWidth/2,H=-(this.#z(Q)-J);if(this.config.infinite){let Z=Math.round((this.target-H)/$);H+=Z*$}else H=Math.min(0,Math.max(this.maxScroll,H));return H}#L(Q){let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1;return(Q%$+$)%$}#I(Q){let $=this.config.vertical?this.itemHeightOffsets:this.itemOffsets;if(!$.length)return 0;let J=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,H=this.config.infinite?this.#L(Q):Math.max(0,Math.min(Q,J)),Z=0,q=Number.POSITIVE_INFINITY;return $.forEach((K,G)=>{let U=this.#z(G),W=Math.abs(H-U);if(W{let J=this.current,H=this.config.vertical?this.itemHeightOffsets:this.itemOffsets,Z=this.config.vertical?`translateY(${J}px)`:`translateX(${J}px)`;return Q.style.transform=Z,J+H[$]})}#E(){let Q=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1;this.parallaxValues=this.items.map(($,J)=>{let H=(this.config.vertical?this.itemHeightOffsets:this.itemOffsets)[J]??0,Z=QQ(this.current+H,Q)-H,q=this.config.vertical?`translateY(${Z}px)`:`translateX(${Z}px)`;return $.style.transform=q,QQ(this.current+H,Q)})}#O(){this.#$=nK(this.#$,this.speed,1/this.config.lerpFactor,this.deltaTime),this.speed*=this.config.speedDecay}goToNext(){if(this.config.variableWidth){let Q=this.config.infinite?(this.currentSlide+1)%this.items.length:Math.min(this.currentSlide+1,this.items.length-1);this.target=this.#K(Q)}else if(!this.config.infinite)this.target=Math.max(this.maxScroll,Math.round(this.target-1));else this.target=Math.round(this.target-1)}goToPrev(){if(this.config.variableWidth){let Q=this.config.infinite?(this.currentSlide-1+this.items.length)%this.items.length:Math.max(this.currentSlide-1,0);this.target=this.#K(Q)}else if(!this.config.infinite)this.target=Math.min(0,Math.round(this.target+1));else this.target=Math.round(this.target+1)}goToIndex(Q){if(this.config.variableWidth){let $=this.config.infinite?(Q%this.items.length+this.items.length)%this.items.length:Math.min(Math.max(Q,0),this.items.length-1);this.target=this.#K($)}else this.target=-Q}set snap(Q){this.config.snap=Q}getProgress(){if(this.config.variableWidth){let $=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1;return(-this.current%$+$)%$/$}let Q=this.items.length;return Math.abs(this.current)%Q/Q}destroy(){if(this.kill(),window.removeEventListener("mousemove",(Q)=>this.#U(Q)),window.removeEventListener("mouseup",()=>this.#W()),window.removeEventListener("touchmove",(Q)=>{let $=Q.touches[0];this.#U($)}),window.removeEventListener("touchend",()=>this.#W()),this.wrapper.removeEventListener("mousedown",(Q)=>this.#G(Q)),this.wrapper.removeEventListener("touchstart",(Q)=>{let $=Q.touches[0];this.#G($)}),this.resizeTimeout)clearTimeout(this.resizeTimeout);if(this.virtualScroll&&this.config.scrollInput)this.virtualScroll.destroy();if(this.observer)this.observer.disconnect()}get currentSlide(){return this.#q}#X(Q){if(this.#q!==Q)this.#j=this.#q,this.#q=Q,this.onSlideChange?.(this.#q,this.#j)}kill(){this.#J=!1,this.items.forEach((Q)=>{Q.style.transform=""}),this.current=0,this.target=0,this.speed=0,this.#$=0,this.touchPreviousX=void 0,this.touchPreviousY=void 0,this.isTouching=!1}init(){this.#J=!0,this.#Q=performance.now()}set paused(Q){this.#Z=Q}get paused(){return this.#Z}get progress(){if(this.config.variableWidth){let Q=this.config.vertical?this.viewport.totalHeight||1:this.viewport.totalWidth||1,$=-this.target;if(this.config.infinite)return($%Q+Q)%Q/Q;else return Math.max(0,Math.min($,Q))/Q}else if(this.config.infinite){let Q=-this.target,$=this.items.length;return(Q%$+$)%$/($-1)}else{let Q=Math.abs(this.current),$=Math.abs(this.maxScroll);return Math.max(0,Math.min(1,Q/$))}}resize(){if(this.#B(),this.config.variableWidth&&!this.config.infinite&&this.items.length>0){let J=this.currentSlide,H=this.#K(J);if(this.target=H,Math.abs(this.current-this.target)<1)this.current=H}let Q=this.#J,$=this.isVisible;this.#J=!0,this.isVisible=!0,this.update(),this.#J=Q,this.isVisible=$}}var JQ=rK;function aK(Q,$){let H=!1,Z=null,q=Q.closest("[data-module='app']"),K=()=>{if(H)return;H=!0;let G=Array.from(Q.children),U="current",W=80,X=(V)=>{setTimeout(()=>{G[V]?.querySelectorAll("[data-unread]").forEach((Y)=>Y.remove())},W)},j=new JQ(Q,{vertical:!0,infinite:!1,snap:!0,dragSensitivity:0.01,onSlideChange:(V,Y)=>{G[Y]?.classList.remove(U),G[V]?.classList.add(U),X(V),y$.CURRENT_MAIL=V}});G[j.currentSlide]?.classList.add(U),X(j.currentSlide),S$.add(()=>{j.update()});let L=8,B=G.length,M=(V,Y)=>-Y+B*Math.round((V+Y)/B),I=[],z=null,R=null,F=()=>{if(z)document.removeEventListener("pointermove",z),z=null;if(R)document.removeEventListener("pointerup",R),R=null};G.forEach((V,Y)=>{let N=0,C=0,D=!1,O=(w)=>{let x=w.clientX-N,S=w.clientY-C;if(Math.abs(x)>L||Math.abs(S)>L)D=!0},A=()=>{if(F(),!D)j.target=M(j.current,Y)},P=(w)=>{N=w.clientX,C=w.clientY,D=!1,z=O,R=A,document.addEventListener("pointermove",O),document.addEventListener("pointerup",A)};V.addEventListener("pointerdown",P),I.push(()=>V.removeEventListener("pointerdown",P))}),Z=()=>{F(),I.forEach((V)=>V()),j.destroy()}};if(!q)K();else if(q.dataset.appOpened==="true")K();else q.addEventListener("app:opened",K,{once:!0});return()=>{q?.removeEventListener("app:opened",K),Z?.()}}var SH={};r(SH,{default:()=>tK});function tK(Q,$){let H=Array.from(Q.children),Z=Q.closest("[data-module='app']"),q=0,K=!1,G=(W)=>{H[q]?.style.setProperty("opacity","0"),q=W,H[W]?.style.setProperty("opacity","1")},U=()=>{if(K)return;K=!0,y$.on("CURRENT_MAIL",G)};if(!Z||Z.dataset.appOpened==="true")U();else Z.addEventListener("app:opened",U,{once:!0});return()=>{if(Z?.removeEventListener("app:opened",U),K)y$.off("CURRENT_MAIL",G)}}var bH={};r(bH,{default:()=>eK});var E4=0.12,O4=-10,A4=10,P4=100;function eK(Q){let $=C9({easing:E4,element:window}),J=Q.style.transform,H=Q.style.willChange,Z=Q.style.backfaceVisibility,q=Q.style.transformStyle;Q.style.willChange="transform",Q.style.backfaceVisibility="hidden",Q.style.transformStyle="preserve-3d";let K=S$.add(()=>{let G=$.update(),U=G.x+G.dragX,X=(G.y+G.dragY)*O4,j=U*A4,L=`perspective(${P4}px) rotateX(${X.toFixed(3)}deg) rotateY(${j.toFixed(3)}deg)`;Q.style.transform=J?`${J} ${L}`:L});return()=>{K(),$.destroy(),Q.style.transform=J,Q.style.willChange=H,Q.style.backfaceVisibility=Z,Q.style.transformStyle=q}}var TH={};r(TH,{default:()=>$6});function $6(Q,$){y$.on("PAGE",(J)=>{console.log("page changed")})}var yH={};r(yH,{default:()=>Q6});function Q6(Q,$){let J=Array.from(Q.children);n.set(Q,{xPercent:150}),n.set(J,{visibility:"visible"}),setTimeout(()=>{n.to(Q,{xPercent:0,duration:0.6,ease:"expo.out"})},3200);let H=(Z)=>{n.killTweensOf(Z),n.to(Z,{xPercent:120,autoAlpha:0,duration:0.1,ease:"expo.out",onComplete:()=>{Z.remove()}})};Q.addEventListener("click",(Z)=>{let q=Z.target;if(!q)return;let K=q.closest("[data-close]");if(!K||!Q.contains(K))return;let G=K.closest('[data-module="notification"]');if(!(G instanceof HTMLElement))return;H(G)})}var fH={};r(fH,{default:()=>J6});var hH="current";function J6(Q,$){let J=Array.from(Q.children),H=new JQ(Q,{infinite:!0,onSlideChange:(Z,q)=>{J[q]?.classList.remove(hH),J[Z]?.classList.add(hH)}});return J[H.currentSlide]?.classList.add(hH),S$.add(()=>{H.update()}),()=>{H.destroy()}}var _H={};r(_H,{default:()=>H6});function k4(Q){Q.setAttribute("aria-hidden","true"),Q.style.position="absolute",Q.style.left="-9999px",Q.style.top="-9999px",Q.style.width="1px"}var x4=(Q)=>{let $=Q.textContent;Q.textContent="";let J=document.createElement("span");J.textContent=$,Q.appendChild(J),k4(J);let H=document.createElement("span");return H.setAttribute("data-css","overflow-clip"),H.textContent=$,H.setAttribute("aria-hidden","true"),Q.appendChild(H),new L$(H,{type:"chars"})};function H6(Q){let $=x4(Q);l1(Q,{autoStart:!0,callback:({isIn:J})=>{if(J)n.to($.chars,{yPercent:0,stagger:0.02});else n.killTweensOf($.chars),n.set($.chars,{yPercent:100})}})}var vH={};r(vH,{default:()=>Z6});function Z6(Q,$){}var uH={};r(uH,{default:()=>q6});function w4(Q){return Array.from(Q)}function HQ(Q,$,J){return Math.min(J,Math.max($,Q))}function S4(Q,$,J,H){if($<=1)return H;let Z=Q/($-1),q=Math.abs(Z*2-1),K=q*q;return J+(H-J)*K}function b4(Q,$){let J=(Math.random()*2-1)*$;return Math.max(8,Q+J)}function T4(Q){let $=Math.max(1,Q),J=HQ(10/$,0.75,1.8),H=18*J,Z=56*J,q=HQ(420*J,280,700),G=(H+Z)/2*$,U=HQ(1400+G*1.2,1400,4200),W=HQ(120+$*3,80,260);return{fastStepMs:H,slowStepMs:Z,returnMs:q,loopGapMs:U,loopJitterMs:W}}function q6(Q){let $=Q.innerHTML,J=Q.textContent??"",H=w4(J),Z=H.filter((M)=>M.trim().length>0),q=T4(Z.length||H.length);if(!J.trim())return;let K=document.createElement("span");K.setAttribute("data-text-wave-original","true"),K.classList.add("opacity-0"),K.style.opacity="0",K.style.whiteSpace="pre-wrap",K.textContent=J;let G=document.createElement("span");if(G.setAttribute("data-text-wave-overlay","true"),G.setAttribute("aria-hidden","true"),G.style.position="absolute",G.style.inset="0",G.style.pointerEvents="none",G.style.whiteSpace="pre-wrap",H.forEach((M)=>{let I=document.createElement("span");I.setAttribute("data-text-wave-char","true"),I.style.display="inline-block",I.style.opacity="1",I.style.filter="blur(0px)",I.style.scale="1",I.style.transition=`opacity ${q.returnMs}ms ease-in-out, filter ${q.returnMs}ms ease-in-out, scale ${q.returnMs}ms ease-in-out`,I.textContent=M===" "?" ":M,G.appendChild(I)}),getComputedStyle(Q).position==="static")Q.style.position="relative";Q.innerHTML="",Q.appendChild(K),Q.appendChild(G);let U=Array.from(G.querySelectorAll("[data-text-wave-char]")),W,X=[],j=0,L=()=>{if(W!==void 0)window.clearTimeout(W),W=void 0;X.forEach((M)=>window.clearTimeout(M)),X.length=0},B=()=>{if(!U.length)return;let M=j,I=U[M];I.style.opacity="0.62",I.style.filter="blur(1.3px)",I.style.scale="0.985";let z=window.setTimeout(()=>{I.style.opacity="1",I.style.filter="blur(0px)",I.style.scale="1"},q.returnMs);X.push(z);let R=M>=U.length-1;j=R?0:M+1;let F=R?b4(q.loopGapMs,q.loopJitterMs):S4(M,U.length,q.fastStepMs,q.slowStepMs);W=window.setTimeout(B,F)};return B(),()=>{L(),Q.innerHTML=$}}var mH={};r(mH,{default:()=>G6});var y4=new Intl.DateTimeFormat("ru-RU",{hour:"2-digit",minute:"2-digit",hour12:!1});function K6(Q){Q.textContent=y4.format(new Date)}function G6(Q,$){K6(Q);let J=setInterval(()=>K6(Q),60000);return()=>clearInterval(J)}var dH={};r(dH,{default:()=>U6});function U6(Q,$){let J=$.locale||"ru-RU",H=new Intl.DateTimeFormat(J,{weekday:"short",day:"numeric",month:"short"});Q.textContent=H.format(new Date)}var cH={};r(cH,{default:()=>W6});var h4=500,f4=300,ZQ=new Set,a$=null,gH=!1;function _4(Q){if(Q instanceof HTMLVideoElement)return Q;return Q.querySelector("video")}function v4(Q){if(a$!==null)return;let $=()=>{let H=Array.from(ZQ).filter((Z)=>!Z.preloaded).sort((Z,q)=>Z.video.getBoundingClientRect().top+window.scrollY-(q.video.getBoundingClientRect().top+window.scrollY))[0];if(!H){if(a$!==null)window.clearInterval(a$),a$=null;return}H.preload()};a$=window.setInterval($,Q),$()}function u4(Q){if(gH)return;gH=!0;let $=()=>window.setTimeout(()=>v4(Q),f4);if(document.readyState==="complete")$();else window.addEventListener("load",$,{once:!0})}function W6(Q,$){let J=_4(Q);if(!J){console.warn('"video-handle" found no