diff --git a/.github/release-notes/v0.13.0.md b/.github/release-notes/v0.13.0.md new file mode 100644 index 00000000..a2a2ff42 --- /dev/null +++ b/.github/release-notes/v0.13.0.md @@ -0,0 +1,47 @@ +# Kineto v0.13.0 + +## English + +- **Entry points (toward 1.0).** New `@dong-gri/kineto/auto`: the core first, every module known by name and imported the first time markup uses it (one chunk per module; all 55 `data-kt-*` modules keep working). `Kineto.loadModules(names?)` waits for modules before the JS API, `Kineto.registerLazy(name, importer)` adds your own on-demand modules. New `@dong-gri/kineto/all`: the full runtime, explicitly. The default `@dong-gri/kineto` is still the full runtime (same file and instance as `/all`), but its meaning is deprecated: in 1.0 it becomes the on-demand core. With diagnostics on it reports `KT_DEPRECATED` once; TypeScript marks the default export `@deprecated`. A failed on-demand import is reported as `KT_MODULE_LOAD_FAILED`, leaves the markup static and is not retried by later scans. The React, Vue and jQuery adapters import `/all`, so their users change nothing. Guide: `docs/entry-points.md`. Entry points are declared in `kineto.features.json#entryPoints` and checked against `package.json`, the types and the build. +- Package metadata: `LICENSE` is now the verbatim MIT text with the owner's copyright (the old copyright holder and an appended third-party paragraph made GitHub report "Other (NOASSERTION)" while README and `package.json` said MIT); the third-party note moved to the README. Both packages share one `author`, the MCP package ships the same LICENSE, and the npm description no longer carries a module count (it said 53). Gate: `tests/license.mjs`. +- Package-consumer lint: `npm run test:package-lint` runs `publint --strict` and arethetypeswrong on the packed tarball (Node and release-package lanes); findings that are true by design (TypeScript's legacy node10 resolution, `require()` of the ESM-only subpaths, the script-tag `./umd` file) are allowed by shape only. `require('@dong-gri/kineto')` and `require('@dong-gri/kineto/all')` now get CommonJS declarations (`types/index.d.cts`) instead of ESM ones. +- `dist/` is no longer committed; the committed copy hid size regressions and conflicted in every merge. Run `npm run build` after cloning. Every workflow now builds the commit it tests before reading `dist/`: the weekly supply-chain audit and live-site parity check and the MCP release still read the old committed copy and failed their first run without it. `npm run test:workflow-build-order` (Node lane) reads every job on every pull request and fails when a command that reads `dist/` — found through the npm scripts and the files they run, not a hand-kept list — comes before `npm run build`. +- `docs/consumer-bundle-size.md` is checked in CI: rows and budgets must match the fixture matrix and each size must be within its runner variance + 0.5 KB of a fresh measurement (it had drifted by 20 KB). Measurements now report the first download separately from on-demand chunks, with new `all` and `auto` rows. +- CI finishes sooner, and a local check runs only what a change can affect. A lane is split across CI runners by the measured time of each test (`tests/lane-timings.json`, longest first onto the least-loaded runner) instead of by position: round-robin had put two of the slowest tests on one runner and left Firefox on its own for about 6 minutes while the other runners idled. Chromium and WebKit now use three runners and Firefox two, and every test still runs exactly once. `node scripts/run-lane.mjs --changed` (and `npm run verify:push -- --changed`, the new usual check before a push) runs only the steps the changed files can affect — a shared file such as `src/core.js` or `package.json` still runs everything, and CI never uses it; a one-module change runs about a fifth of the Chromium lane. `--record-timings` refreshes the times. Two slow browser tests run their independent real-time waits side by side (Reveal variants about 58 → 42 s and Stylize patterns 31 → 8 s per engine), with the same assertions. Gate: `tests/lane-select.mjs`. +- Screen readers hear text effects once, as written. Typewriter, Text Split, Blur Text, Text Reveal, Text Fill, Glitch (text), Overflow Text and Text Transition draw `aria-hidden` glyphs and used to put the text back only as `aria-label` on a div, span or p — a name those elements may not carry, which NVDA and JAWS ignore in browse mode, so the text was silent. Each now keeps one visually hidden copy (`.kt-sr-only`) and names only a host that takes a name (a heading, link, button); `destroy()` restores the authored DOM. Reduced motion shows the text itself and no longer names a paragraph either. Counter hides its reels and is no longer `aria-live` (it was rewritten every frame); Overflow Text rolling keeps a link's role and names it by its first item; rotating text (tickers, looping Text Transition) is never a live region. Gate: `tests/browser/text-a11y-lifecycle.mjs` (Chromium, WebKit, Firefox). +- Text effects stay bounded over time: `resume()` after an effect finished does nothing (Typewriter, Text Transition, Text Reveal); Text Reveal's flicker no longer piles up a player every second; Glitch replays no longer stack burst chains; an Overflow Text rebuild keeps one set of hover listeners; the Counter clock pauses off screen (a countdown still reports its end on time); number and text formatters are reused instead of rebuilt per frame or keystroke. +- Returning to a hidden tab no longer starts scroll animations early. The core pauses every instance while the tab is hidden and resumes it on return; Reveal's `resume()` played an entrance that was still waiting for its ScrollTrigger (it ran below the fold before the reader got there), and Parallax and Scroll Sequence ran their scrubbed tween to its end on its own. +- Core lifecycle: destroying the last instance no longer stops smooth scroll (while `config.smooth` stayed on) or drops a pending `autoInit()`; `updateModule()` and the React/Vue adapters keep nested instances of the same module; a scan waiting for GSAP no longer creates instances on roots removed or destroyed meanwhile. +- Loader always finishes. The window `load` event was passed as the status (`"[object Event]"`); `source: 'resources'` waited forever for scripts and stylesheets that had already loaded, for media and for lazy images below the fold (it now checks what is loaded and stops after 10 s at most); after a `revealEffect` exit, `finished` never resolved and `onHide`/`kt-loader-hide` never fired; a throwing page callback left the scroll lock held. +- Lifecycle races: a Lightbox reopened during its closing fade stayed hidden and left the page locked for good; destroying a Page Reveal cleaned up the next run; Presence settled `enter()`/`leave()` before the motion ran (so `safeToRemove` removed an element before its exit played) and, in mode `'wait'`, an enter queued behind a failed leave never settled (now `{ status: 'cancelled', reason: 'error' }`); a new Motion States `apply()` snapped back every staggered element of the older run instead of the one it took over; Progress outputs kept a `40%` label on a button after `destroy()`; destroying one of two Page Transitions stopped navigation for both; Cover Reveal built panels after `destroy()`. Gate: `tests/browser/lifecycle-core.mjs` (three engines). +- Slider: under reduced motion only slide 1 was visible and next/previous did nothing — the slider is now a snap scroller with every slide reachable; `goTo()` without a number is ignored (it set the index to NaN and a frame loop that never ended); tabbing into a hidden slide brings it into view. Radial: the front item is the one tab stop, Enter/Space activate it, the status names the front item only when it changes (`labels.radialStatus`), autoplay holds while focus is inside, built buttons use `labels.previous`/`labels.next`, and a wheel created in a closed panel refits its radius. The track slider's autoplay progress and metrics rest while nothing changes. +- Keyboard and screen readers across components: Hold confirms from a screen reader's activate (a first press arms it, like `tap`) and a hold-to-confirm link no longer follows a plain click (`labels.holdHint`/`mashHint`/`tapHint` describe the gesture); Tooltip moves an icon button's only name from `title` to `aria-label`, stays open while the pointer is over it (WCAG 1.4.13) and closes on Escape wherever focus is; Toast announces through persistent live regions and gives focus back when a focused toast is dismissed; Bottom Sheet makes the page behind it inert, focuses its first control, closes from `[data-kt-sheet-close]` and resizes from the keyboard (a focusable separator, ↑/↓ 24 px, Home/End); Mega Menu follows a link trigger on Enter, uses disclosure semantics and lets ←/→ reach plain links; Fullpage leaves keys to focused controls, scrolls a long section before paging, and its dots are a named group (`labels.dots`); Marquee clones are inert and focus stops the strip (WCAG 2.2.2); nested Tabs and Accordions keep their own parts; the Switch's off track is drawn at 55% of the text colour (it had 1.8:1 contrast); a hidden back-to-top ring is out of the Tab order; Drag's arrow keys work only when the draggable has focus. Gate: `tests/browser/components-a11y.mjs` (three engines). +- A custom cursor keeps the native pointer where it is needed: over text fields, selects, `contenteditable` and `[data-kt-cursor-hide]`, and whenever the cursor is paused (`Kineto.pause()` used to leave the page with no pointer at all). A scoped cursor with the pointer elsewhere does no work per move. The toast close button and Fullpage dots have 24 px targets. +- Loops rest when nothing moves: Tilt ran at 60 fps for as long as it was hovered and now rests, pauses off screen and keeps the gyroscope after a pause (so does Mouse Parallax); Card Glow, Magnetic and Brush Reveal stop asking for frames under a still pointer; a held Marquee rests. Lenis' `prevent()` reads one computed style per element (a 14-element path cost 91 reads per wheel event); Sticky Stack reads its card heights in one batch (9 forced layouts for 8 cards before); a Media wrapper created in a closed panel no longer keeps a 16:9 box forever. +- Demo: the settings drawer, once closed, is inert and no longer a modal dialog (Tab reached its hidden buttons); a sitemap reopened during its closing fade stays open (the page was left inert with no way out); demo tab strips follow the tabs pattern (panels, `aria-controls`, one tab stop, arrow keys); the hero title's gradient rests once the hero is scrolled away; the hero snap no longer reads layout on every wheel or touch event. Gate: `tests/browser/demo-a11y.mjs`. +- Fullpage: a deck the page gives a height (the demo's 420px cards) no longer grows as tall as the window. A deck with no height of its own fills the screen (`height: 100svh`), and that was decided from one size read when the deck was created — so a deck created before it was laid out (inside a hidden panel, before it was attached, or in a part of the page the browser had not laid out yet) measured 0 and was pinned at the window's height for good; the first Fullpage card in the demo did this just by scrolling to it. A read under 10px is now confirmed on the laid-out deck (one ResizeObserver report) before the fallback applies, and reduced motion keeps an explicit `height` too. Gate: `tests/browser/components-a11y.mjs` `fullpage-hidden-panel` (Chromium, WebKit, Firefox). +- Demo: a settings drawer closed in the frame it opened in (a quick double click on its summary) no longer stays open. Its frame callbacks opened the dim backdrop again after the close, so the page was covered with nothing left to close it; they now check that the panel is still the one shown. This was also the flaky click in `tests/browser/demo-code-access.mjs`. Gate: `tests/browser/demo-a11y.mjs`. +- Tests: `create-cost` counts forced layouts only in the creating task and the next frame's shared read (its trace ran on until it was stopped and sometimes counted a Lazy image's later work: 6 or 10 instead of 1 on a busy machine), and `measure` waits for the cursor's hover state with the stage in view instead of a fixed 320 ms (under a full lane the stage was once 1,000 px above the viewport when the pointer arrived); demo QA polls its five timed checks (class Reveal, Loader progress, Overflow Text rolling, Text Transition, dynamic noise) instead of fixed sleeps that a busy run missed. + +## 한국어 + +- **엔트리 포인트(1.0 준비).** 새 `@dong-gri/kineto/auto`: 코어만 먼저 받고, 모든 모듈을 이름으로 알고 있다가 마크업이 처음 쓸 때 import합니다(모듈마다 청크 하나, `data-kt-*` 55개 모두 그대로 동작). JS API 전에는 `Kineto.loadModules(names?)`로 기다리고, `Kineto.registerLazy(name, importer)`로 직접 만든 모듈도 필요할 때 불러올 수 있습니다. 새 `@dong-gri/kineto/all`: 전체 런타임을 명시적으로. 기본 `@dong-gri/kineto`는 여전히 전체 런타임(`/all`과 같은 파일·같은 인스턴스)이지만 의미가 deprecated입니다 — 1.0에서 필요할 때 불러오는 코어가 됩니다. 진단을 켜면 `KT_DEPRECATED`를 한 번 보내고, TypeScript에서는 기본 export가 `@deprecated`로 보입니다. 필요할 때 불러오기가 실패하면 `KT_MODULE_LOAD_FAILED`로 알리고 마크업은 정적 상태로 두며, 이후 scan은 다시 시도하지 않습니다. React·Vue·jQuery 어댑터는 `/all`을 가져오므로 사용자는 바꿀 것이 없습니다. 안내: `docs/entry-points.md`. 엔트리는 `kineto.features.json#entryPoints`에 선언되고 `package.json`·타입·빌드와 대조됩니다. +- 패키지 메타데이터: `LICENSE`를 소유자 저작권이 적힌 MIT 원문 그대로로 바꿨습니다(예전 저작권자와 덧붙인 서드파티 문단 때문에 README·`package.json`은 MIT인데 GitHub는 "Other (NOASSERTION)"으로 표시). 서드파티 안내는 README로 옮겼습니다. 두 패키지가 같은 `author`를 쓰고, MCP 패키지도 같은 LICENSE를 싣고, npm 설명에서 모듈 수(53으로 남아 있었음)를 뺐습니다. 게이트: `tests/license.mjs`. +- 패키지 소비자 검사: `npm run test:package-lint`가 패킹한 tarball에 `publint --strict`와 arethetypeswrong을 돌립니다(Node·release-package 레인). 설계상 맞는 결과(TypeScript의 옛 node10 해석, ESM 전용 하위 경로의 `require()`, script 태그용 `./umd`)는 모양으로만 허용합니다. `require('@dong-gri/kineto')`·`require('@dong-gri/kineto/all')`은 이제 ESM 선언 대신 CommonJS 선언(`types/index.d.cts`)을 받습니다. +- `dist/`를 더 이상 커밋하지 않습니다. 커밋된 사본은 용량 회귀를 가리고 병합마다 충돌했습니다. clone 뒤 `npm run build`를 실행하세요. 이제 모든 워크플로우가 `dist/`를 읽기 전에 검사하는 커밋을 빌드합니다: 주간 공급망 감사·라이브 사이트 일치 검사와 MCP 릴리스는 예전에 커밋된 사본을 읽고 있어서, 사본이 없어진 첫 실행에서 실패했습니다. `npm run test:workflow-build-order`(Node 레인)가 PR마다 모든 job을 읽어, `dist/`를 읽는 명령이 `npm run build`보다 앞에 있으면 실패합니다. 읽는 명령은 손으로 적은 목록이 아니라 npm 스크립트와 그 스크립트가 실행하는 파일을 따라가 찾습니다. +- `docs/consumer-bundle-size.md`를 CI가 검사합니다: 행과 예산은 fixture 표와 같아야 하고, 크기는 새 측정값과 runner 편차 + 0.5 KB 안이어야 합니다(20 KB 어긋나 있었음). 측정은 첫 다운로드와 필요할 때 받는 청크를 나눠 보고하고, `all`·`auto` 행이 추가됐습니다. +- CI가 더 빨리 끝나고, 로컬 확인은 바뀐 파일이 영향을 주는 것만 돌립니다. CI는 lane을 위치 순서가 아니라 테스트마다 측정한 시간(`tests/lane-timings.json`)으로 runner에 나눕니다 — 긴 것부터 가장 덜 찬 runner로. 순서대로 나누면 가장 느린 테스트 두 개가 한 runner에 몰렸고, 다른 runner가 쉬는 동안 Firefox 혼자 약 6분을 돌았습니다. 이제 Chromium·WebKit은 runner 3개, Firefox는 2개를 쓰고, 모든 테스트는 여전히 정확히 한 번 돕니다. `node scripts/run-lane.mjs --changed`(와 push 전 기본 확인이 된 `npm run verify:push -- --changed`)는 바뀐 파일이 영향을 줄 수 있는 단계만 돌립니다. `src/core.js`·`package.json`처럼 공유 파일이 바뀌면 전부 돌리고 CI는 이 옵션을 쓰지 않습니다. 모듈 하나를 바꾸면 Chromium lane의 약 5분의 1만 돕니다. `--record-timings`는 측정 시간을 갱신합니다. 느린 브라우저 테스트 두 개는 서로 독립인 실시간 대기를 나란히 돌립니다(엔진마다 Reveal variant 약 58 → 42초, Stylize pattern 31 → 8초). 검사 내용은 같습니다. 게이트: `tests/lane-select.mjs`. +- 스크린 리더가 텍스트 효과를 한 번, 쓰인 그대로 읽습니다. Typewriter·Text Split·Blur Text·Text Reveal·Text Fill·Glitch(텍스트)·Overflow Text·Text Transition은 글자를 `aria-hidden` 조각으로 그리고, 텍스트는 div·span·p의 `aria-label`로만 돌려놓았습니다. 이 요소들에는 이름을 붙일 수 없어 NVDA·JAWS가 browse 모드에서 무시했고, 텍스트가 읽히지 않았습니다. 이제 화면에 보이지 않는 사본 하나(`.kt-sr-only`)를 두고, 이름을 가질 수 있는 요소(제목·링크·버튼)에만 이름을 붙입니다. `destroy()`는 작성한 DOM을 되돌립니다. reduced motion은 텍스트 자체를 보여 주고 문단에 이름을 붙이지 않습니다. Counter는 릴을 숨기고 더 이상 `aria-live`가 아닙니다(매 프레임 다시 쓰였습니다). Overflow Text rolling은 링크의 role을 지키고 첫 항목으로 이름을 붙이며, 돌아가는 텍스트(티커, 반복하는 Text Transition)는 live region이 되지 않습니다. 게이트: `tests/browser/text-a11y-lifecycle.mjs`(Chromium·WebKit·Firefox). +- 텍스트 효과가 시간이 지나도 불어나지 않습니다. 끝난 효과의 `resume()`은 아무것도 하지 않고(Typewriter·Text Transition·Text Reveal), Text Reveal의 깜빡임은 1초마다 player를 쌓지 않으며, Glitch는 다시 재생해도 버스트가 겹치지 않고, Overflow Text는 다시 만들어도 hover 리스너 한 벌만 유지합니다. Counter 시계는 화면 밖에서 멈추고(카운트다운 종료는 제때 알림), 숫자·텍스트 포매터는 프레임이나 키 입력마다 새로 만들지 않고 재사용합니다. +- 숨겼던 탭으로 돌아와도 스크롤 애니메이션이 먼저 시작되지 않습니다. 코어는 탭이 숨겨진 동안 모든 인스턴스를 멈췄다가 돌아오면 재개하는데, Reveal의 `resume()`이 ScrollTrigger를 기다리던 등장 효과를 재생해 독자가 오기 전에 화면 아래에서 끝났고, Parallax·Scroll Sequence는 스크럽 트윈을 스스로 끝까지 돌렸습니다. +- 코어 lifecycle: 마지막 인스턴스를 destroy 해도 부드러운 스크롤이 멈추지 않고(`config.smooth`는 켜진 채였음) 대기 중인 `autoInit()`도 사라지지 않습니다. `updateModule()`과 React/Vue 어댑터는 같은 모듈의 중첩 인스턴스를 지키고, GSAP을 기다리던 scan은 그사이 제거·destroy 된 루트에 인스턴스를 만들지 않습니다. +- Loader가 항상 끝납니다. window `load` 이벤트가 상태값으로 넘어갔고(`"[object Event]"`), `source: 'resources'`는 이미 로드된 스크립트·스타일시트, 미디어, 화면 아래 lazy 이미지를 영원히 기다렸습니다(이제 로드 여부를 확인하고 길어도 10초 뒤 끝냄). `revealEffect` 퇴장 뒤에는 `finished`가 풀리지 않고 `onHide`/`kt-loader-hide`가 오지 않았으며, 페이지 콜백이 예외를 던지면 스크롤 잠금이 남았습니다. +- lifecycle 경합: 닫히는 페이드 중에 다시 연 Lightbox는 숨겨진 채 페이지를 영영 잠갔고, Page Reveal을 destroy 하면 다음 실행을 정리해 버렸습니다. Presence는 모션이 돌기 전에 `enter()`/`leave()`를 끝내 퇴장이 재생되기 전에 `safeToRemove`가 요소를 제거했고, `'wait'` 모드에서는 실패한 leave 뒤의 enter가 끝나지 않았습니다(이제 `{ status: 'cancelled', reason: 'error' }`). Motion States의 새 `apply()`는 넘겨받은 요소 하나가 아니라 이전 실행의 stagger 요소를 모두 되돌렸고, Progress 출력은 `destroy()` 뒤에도 버튼에 `40%` 라벨을 남겼습니다. Page Transition 둘 중 하나를 destroy 하면 둘 다 내비게이션이 멈췄고, Cover Reveal은 `destroy()` 뒤에 패널을 만들었습니다. 게이트: `tests/browser/lifecycle-core.mjs`(세 엔진). +- Slider: reduced motion에서는 첫 슬라이드만 보이고 이전/다음이 동작하지 않았습니다 — 이제 모든 슬라이드에 닿는 snap 스크롤러입니다. 숫자가 아닌 `goTo()`는 무시합니다(인덱스가 NaN이 되고 끝나지 않는 프레임 루프가 돌았음). Tab으로 숨은 슬라이드에 들어가면 그 슬라이드가 화면에 옵니다. Radial: 앞 항목이 유일한 탭 정지점이고 Enter/Space로 실행되며, 상태 문구는 앞 항목이 바뀔 때만 그 항목을 알립니다(`labels.radialStatus`). 포커스가 안에 있으면 자동 재생을 멈추고, 만든 버튼은 `labels.previous`/`labels.next`를 쓰며, 닫힌 패널에서 만든 휠도 반지름을 다시 맞춥니다. 트랙 슬라이더의 자동 재생 진행 표시와 치수 계산은 바뀐 것이 없으면 쉽니다. +- 컴포넌트 전반의 키보드·스크린 리더: Hold는 스크린 리더의 실행으로도 확인되고(첫 실행은 `tap`처럼 준비) 길게 눌러 확인하는 링크가 일반 클릭으로 이동하지 않습니다(`labels.holdHint`/`mashHint`/`tapHint`가 제스처를 설명). Tooltip은 아이콘 버튼의 유일한 이름을 `title`에서 `aria-label`로 옮기고, 포인터가 팁 위에 있는 동안 열려 있으며(WCAG 1.4.13), 포커스가 어디 있든 Escape로 닫힙니다. Toast는 항상 있는 live region으로 알리고, 포커스가 있던 토스트를 닫으면 포커스를 돌려줍니다. Bottom Sheet는 열린 동안 뒤 페이지를 inert로 만들고, 첫 컨트롤에 포커스를 주며, `[data-kt-sheet-close]`로 닫히고, 키보드로 높이를 바꿉니다(포커스 가능한 구분선, ↑/↓ 24px, Home/End). Mega Menu는 링크 트리거에서 Enter로 링크를 따라가고, disclosure 의미를 쓰며, ←/→가 일반 링크에도 닿습니다. Fullpage는 포커스된 컨트롤의 키를 가로채지 않고, 긴 섹션은 먼저 스크롤하며, 점 목록은 이름 있는 그룹입니다(`labels.dots`). Marquee 복제본은 inert이고 포커스가 들어오면 멈춥니다(WCAG 2.2.2). 중첩된 Tabs·Accordion은 자기 부분만 다룹니다. Switch 꺼짐 트랙은 글자색의 55%로 그리고(대비 1.8:1이었음), 숨은 맨 위로 링은 Tab 순서에서 빠지며, Drag의 화살표 키는 드래그 요소에 포커스가 있을 때만 동작합니다. 게이트: `tests/browser/components-a11y.mjs`(세 엔진). +- 커스텀 커서가 필요한 곳에서는 기본 포인터를 남깁니다: 입력 필드·select·`contenteditable`·`[data-kt-cursor-hide]` 위, 그리고 커서가 멈춘 동안(`Kineto.pause()`가 페이지에서 포인터를 아예 없앴습니다). 포인터가 다른 곳에 있는 영역 커서는 움직임마다 일하지 않습니다. 토스트 닫기 버튼과 Fullpage 점은 24px 터치 영역을 가집니다. +- 움직이는 것이 없으면 루프가 쉽니다. Tilt는 hover 동안 계속 60fps로 돌았는데 이제 쉬고, 화면 밖에서 멈추며, 일시정지 뒤에도 자이로를 유지합니다(Mouse Parallax도). Card Glow·Magnetic·Brush Reveal은 포인터가 멈추면 프레임을 요청하지 않고, 멈춘 Marquee도 쉽니다. Lenis `prevent()`는 요소마다 computed style을 한 번만 읽고(요소 14개 경로에서 휠 이벤트마다 91번), Sticky Stack은 카드 높이를 한 번에 읽으며(카드 8장에 강제 레이아웃 9번이었음), 닫힌 패널에서 만든 Media 래퍼가 16:9 상자에 영원히 갇히지 않습니다. +- 데모: 닫은 설정 드로어는 inert이고 더 이상 모달 대화상자가 아닙니다(Tab이 숨은 버튼에 닿았음). 닫히는 페이드 중에 다시 연 사이트맵은 열린 채로 남습니다(페이지가 빠져나갈 길 없이 inert로 남았음). 데모 탭 줄은 탭 패턴을 따르고(패널, `aria-controls`, 탭 정지점 하나, 화살표 키), 히어로를 지나 스크롤하면 히어로 제목의 그라디언트가 쉬며, 히어로 스냅은 휠·터치 이벤트마다 레이아웃을 읽지 않습니다. 게이트: `tests/browser/demo-a11y.mjs`. +- Fullpage: 페이지가 높이를 준 덱(데모의 420px 카드)이 더 이상 창 높이만큼 커지지 않습니다. 높이가 없는 덱은 화면을 채우는데(`height: 100svh`), 이 판단을 덱을 만들 때 한 번 잰 크기로 했습니다. 그래서 배치되기 전에 만들어진 덱(숨겨진 패널 안, 붙기 전, 브라우저가 아직 배치하지 않은 영역)은 0으로 재져 창 높이에 고정됐고, 데모의 첫 Fullpage 카드가 스크롤만 해도 그렇게 됐습니다. 이제 10px 미만으로 재지면 배치된 덱에서 한 번 더 확인(ResizeObserver 보고 한 번)한 뒤에만 대체 높이를 씁니다. reduced motion에서도 명시한 `height`를 지킵니다. 게이트: `tests/browser/components-a11y.mjs` `fullpage-hidden-panel`(Chromium·WebKit·Firefox). +- 데모: 연 프레임 안에 바로 닫은 설정 드로어(요약을 빠르게 두 번 클릭)가 더 이상 열린 채로 남지 않습니다. 닫은 뒤에 프레임 콜백이 어두운 배경을 다시 열어, 닫을 방법 없이 페이지가 덮였습니다. 이제 콜백이 그 패널이 아직 보이는 패널인지 먼저 확인합니다. `tests/browser/demo-code-access.mjs`의 흔들리던 클릭도 이것이었습니다. 게이트: `tests/browser/demo-a11y.mjs`. +- 테스트: `create-cost`는 강제 레이아웃을 만드는 작업과 다음 프레임의 공유 읽기 안에서만 셉니다(트레이스가 멈출 때까지 이어져 Lazy 이미지의 나중 작업까지 세는 일이 있었음 — 바쁜 기계에서 1 대신 6·10). `measure`는 고정 320ms 대신 무대를 화면에 둔 채 커서의 hover 상태를 기다립니다(전체 레인에서 포인터가 도착했을 때 무대가 화면 위 1,000px에 있던 적이 있음). 데모 QA는 시간이 걸리는 확인 다섯 개(class Reveal, Loader 진행률, Overflow Text rolling, Text Transition, 동적 노이즈)를 고정 대기 대신 조건으로 기다립니다(바쁜 실행에서 놓쳤음). diff --git a/.github/workflows/live-site-parity.yml b/.github/workflows/live-site-parity.yml index 1fa585b7..d54fec5f 100644 --- a/.github/workflows/live-site-parity.yml +++ b/.github/workflows/live-site-parity.yml @@ -31,6 +31,11 @@ jobs: - name: Install dependencies run: npm ci --prefer-offline --fetch-retries=3 --fetch-retry-mintimeout=1000 --fetch-retry-maxtimeout=5000 --fetch-timeout=30000 + # dist/ is not tracked. The check compares the live runtime bytes with + # this build of the same commit (tests/workflow-build-order.mjs). + - name: Build distributions + run: npm run build + - name: Verify live-site parity env: KT_EXPECTED_BUILD: ${{ github.sha }} diff --git a/.github/workflows/release-mcp.yml b/.github/workflows/release-mcp.yml index 380df5eb..c7818fb1 100644 --- a/.github/workflows/release-mcp.yml +++ b/.github/workflows/release-mcp.yml @@ -51,6 +51,15 @@ jobs: set -o pipefail node scripts/retry-command.mjs npm run lint 2>&1 | tee -a release-mcp.log + # dist/ is not tracked; the feature contract below imports the build + # (tests/workflow-build-order.mjs). The build must leave tracked files + # unchanged, so the MCP tarball packed later is exactly the tagged source. + - name: Build distributions + run: | + set -o pipefail + node scripts/retry-command.mjs npm run build 2>&1 | tee -a release-mcp.log + git diff --exit-code --stat + - name: Verify the integration map and generated artefacts run: | set -euo pipefail diff --git a/.github/workflows/supply-chain.yml b/.github/workflows/supply-chain.yml index de4778d8..4410fa5d 100644 --- a/.github/workflows/supply-chain.yml +++ b/.github/workflows/supply-chain.yml @@ -45,6 +45,12 @@ jobs: mkdir -p artifacts npm sbom --sbom-format=spdx > artifacts/kineto-sbom.spdx.json + # dist/ is not tracked; the package checks below read what this builds. + # tests/workflow-build-order.mjs keeps the build ahead of them. + - name: Build the package files + if: always() + run: npm run build + - name: Check package surface if: always() run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d166b98..76944e0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,20 @@ ### English + + +### 한국어 + + + +## [0.13.0] - 2026-09-27 + +### English + - **Entry points (toward 1.0).** New `@dong-gri/kineto/auto`: the core first, every module known by name and imported the first time markup uses it (one chunk per module; all 55 `data-kt-*` modules keep working). `Kineto.loadModules(names?)` waits for modules before the JS API, `Kineto.registerLazy(name, importer)` adds your own on-demand modules. New `@dong-gri/kineto/all`: the full runtime, explicitly. The default `@dong-gri/kineto` is still the full runtime (same file and instance as `/all`), but its meaning is deprecated: in 1.0 it becomes the on-demand core. With diagnostics on it reports `KT_DEPRECATED` once; TypeScript marks the default export `@deprecated`. A failed on-demand import is reported as `KT_MODULE_LOAD_FAILED`, leaves the markup static and is not retried by later scans. The React, Vue and jQuery adapters import `/all`, so their users change nothing. Guide: `docs/entry-points.md`. Entry points are declared in `kineto.features.json#entryPoints` and checked against `package.json`, the types and the build. - Package metadata: `LICENSE` is now the verbatim MIT text with the owner's copyright (the old copyright holder and an appended third-party paragraph made GitHub report "Other (NOASSERTION)" while README and `package.json` said MIT); the third-party note moved to the README. Both packages share one `author`, the MCP package ships the same LICENSE, and the npm description no longer carries a module count (it said 53). Gate: `tests/license.mjs`. - Package-consumer lint: `npm run test:package-lint` runs `publint --strict` and arethetypeswrong on the packed tarball (Node and release-package lanes); findings that are true by design (TypeScript's legacy node10 resolution, `require()` of the ESM-only subpaths, the script-tag `./umd` file) are allowed by shape only. `require('@dong-gri/kineto')` and `require('@dong-gri/kineto/all')` now get CommonJS declarations (`types/index.d.cts`) instead of ESM ones. -- `dist/` is no longer committed. Every workflow already builds the commit it tests; the committed copy hid size regressions and conflicted in every merge. Run `npm run build` after cloning. +- `dist/` is no longer committed; the committed copy hid size regressions and conflicted in every merge. Run `npm run build` after cloning. Every workflow now builds the commit it tests before reading `dist/`: the weekly supply-chain audit and live-site parity check and the MCP release still read the old committed copy and failed their first run without it. `npm run test:workflow-build-order` (Node lane) reads every job on every pull request and fails when a command that reads `dist/` — found through the npm scripts and the files they run, not a hand-kept list — comes before `npm run build`. - `docs/consumer-bundle-size.md` is checked in CI: rows and budgets must match the fixture matrix and each size must be within its runner variance + 0.5 KB of a fresh measurement (it had drifted by 20 KB). Measurements now report the first download separately from on-demand chunks, with new `all` and `auto` rows. - CI finishes sooner, and a local check runs only what a change can affect. A lane is split across CI runners by the measured time of each test (`tests/lane-timings.json`, longest first onto the least-loaded runner) instead of by position: round-robin had put two of the slowest tests on one runner and left Firefox on its own for about 6 minutes while the other runners idled. Chromium and WebKit now use three runners and Firefox two, and every test still runs exactly once. `node scripts/run-lane.mjs --changed` (and `npm run verify:push -- --changed`, the new usual check before a push) runs only the steps the changed files can affect — a shared file such as `src/core.js` or `package.json` still runs everything, and CI never uses it; a one-module change runs about a fifth of the Chromium lane. `--record-timings` refreshes the times. Two slow browser tests run their independent real-time waits side by side (Reveal variants about 58 → 42 s and Stylize patterns 31 → 8 s per engine), with the same assertions. Gate: `tests/lane-select.mjs`. - Screen readers hear text effects once, as written. Typewriter, Text Split, Blur Text, Text Reveal, Text Fill, Glitch (text), Overflow Text and Text Transition draw `aria-hidden` glyphs and used to put the text back only as `aria-label` on a div, span or p — a name those elements may not carry, which NVDA and JAWS ignore in browse mode, so the text was silent. Each now keeps one visually hidden copy (`.kt-sr-only`) and names only a host that takes a name (a heading, link, button); `destroy()` restores the authored DOM. Reduced motion shows the text itself and no longer names a paragraph either. Counter hides its reels and is no longer `aria-live` (it was rewritten every frame); Overflow Text rolling keeps a link's role and names it by its first item; rotating text (tickers, looping Text Transition) is never a live region. Gate: `tests/browser/text-a11y-lifecycle.mjs` (Chromium, WebKit, Firefox). @@ -23,16 +33,14 @@ - Demo: the settings drawer, once closed, is inert and no longer a modal dialog (Tab reached its hidden buttons); a sitemap reopened during its closing fade stays open (the page was left inert with no way out); demo tab strips follow the tabs pattern (panels, `aria-controls`, one tab stop, arrow keys); the hero title's gradient rests once the hero is scrolled away; the hero snap no longer reads layout on every wheel or touch event. Gate: `tests/browser/demo-a11y.mjs`. - Fullpage: a deck the page gives a height (the demo's 420px cards) no longer grows as tall as the window. A deck with no height of its own fills the screen (`height: 100svh`), and that was decided from one size read when the deck was created — so a deck created before it was laid out (inside a hidden panel, before it was attached, or in a part of the page the browser had not laid out yet) measured 0 and was pinned at the window's height for good; the first Fullpage card in the demo did this just by scrolling to it. A read under 10px is now confirmed on the laid-out deck (one ResizeObserver report) before the fallback applies, and reduced motion keeps an explicit `height` too. Gate: `tests/browser/components-a11y.mjs` `fullpage-hidden-panel` (Chromium, WebKit, Firefox). - Demo: a settings drawer closed in the frame it opened in (a quick double click on its summary) no longer stays open. Its frame callbacks opened the dim backdrop again after the close, so the page was covered with nothing left to close it; they now check that the panel is still the one shown. This was also the flaky click in `tests/browser/demo-code-access.mjs`. Gate: `tests/browser/demo-a11y.mjs`. -- Tests: `create-cost` counts forced layouts only in the creating task and the next frame's shared read (its trace ran on until it was stopped and sometimes counted a Lazy image's later work: 6 or 10 instead of 1 on a busy machine), and `measure` waits for the cursor's hover state with the stage in view instead of a fixed 320 ms (under a full lane the stage was once 1,000 px above the viewport when the pointer arrived). - - +- Tests: `create-cost` counts forced layouts only in the creating task and the next frame's shared read (its trace ran on until it was stopped and sometimes counted a Lazy image's later work: 6 or 10 instead of 1 on a busy machine), and `measure` waits for the cursor's hover state with the stage in view instead of a fixed 320 ms (under a full lane the stage was once 1,000 px above the viewport when the pointer arrived); demo QA polls its five timed checks (class Reveal, Loader progress, Overflow Text rolling, Text Transition, dynamic noise) instead of fixed sleeps that a busy run missed. ### 한국어 - **엔트리 포인트(1.0 준비).** 새 `@dong-gri/kineto/auto`: 코어만 먼저 받고, 모든 모듈을 이름으로 알고 있다가 마크업이 처음 쓸 때 import합니다(모듈마다 청크 하나, `data-kt-*` 55개 모두 그대로 동작). JS API 전에는 `Kineto.loadModules(names?)`로 기다리고, `Kineto.registerLazy(name, importer)`로 직접 만든 모듈도 필요할 때 불러올 수 있습니다. 새 `@dong-gri/kineto/all`: 전체 런타임을 명시적으로. 기본 `@dong-gri/kineto`는 여전히 전체 런타임(`/all`과 같은 파일·같은 인스턴스)이지만 의미가 deprecated입니다 — 1.0에서 필요할 때 불러오는 코어가 됩니다. 진단을 켜면 `KT_DEPRECATED`를 한 번 보내고, TypeScript에서는 기본 export가 `@deprecated`로 보입니다. 필요할 때 불러오기가 실패하면 `KT_MODULE_LOAD_FAILED`로 알리고 마크업은 정적 상태로 두며, 이후 scan은 다시 시도하지 않습니다. React·Vue·jQuery 어댑터는 `/all`을 가져오므로 사용자는 바꿀 것이 없습니다. 안내: `docs/entry-points.md`. 엔트리는 `kineto.features.json#entryPoints`에 선언되고 `package.json`·타입·빌드와 대조됩니다. - 패키지 메타데이터: `LICENSE`를 소유자 저작권이 적힌 MIT 원문 그대로로 바꿨습니다(예전 저작권자와 덧붙인 서드파티 문단 때문에 README·`package.json`은 MIT인데 GitHub는 "Other (NOASSERTION)"으로 표시). 서드파티 안내는 README로 옮겼습니다. 두 패키지가 같은 `author`를 쓰고, MCP 패키지도 같은 LICENSE를 싣고, npm 설명에서 모듈 수(53으로 남아 있었음)를 뺐습니다. 게이트: `tests/license.mjs`. - 패키지 소비자 검사: `npm run test:package-lint`가 패킹한 tarball에 `publint --strict`와 arethetypeswrong을 돌립니다(Node·release-package 레인). 설계상 맞는 결과(TypeScript의 옛 node10 해석, ESM 전용 하위 경로의 `require()`, script 태그용 `./umd`)는 모양으로만 허용합니다. `require('@dong-gri/kineto')`·`require('@dong-gri/kineto/all')`은 이제 ESM 선언 대신 CommonJS 선언(`types/index.d.cts`)을 받습니다. -- `dist/`를 더 이상 커밋하지 않습니다. 모든 워크플로우가 이미 검사하는 커밋을 직접 빌드하며, 커밋된 사본은 용량 회귀를 가리고 병합마다 충돌했습니다. clone 뒤 `npm run build`를 실행하세요. +- `dist/`를 더 이상 커밋하지 않습니다. 커밋된 사본은 용량 회귀를 가리고 병합마다 충돌했습니다. clone 뒤 `npm run build`를 실행하세요. 이제 모든 워크플로우가 `dist/`를 읽기 전에 검사하는 커밋을 빌드합니다: 주간 공급망 감사·라이브 사이트 일치 검사와 MCP 릴리스는 예전에 커밋된 사본을 읽고 있어서, 사본이 없어진 첫 실행에서 실패했습니다. `npm run test:workflow-build-order`(Node 레인)가 PR마다 모든 job을 읽어, `dist/`를 읽는 명령이 `npm run build`보다 앞에 있으면 실패합니다. 읽는 명령은 손으로 적은 목록이 아니라 npm 스크립트와 그 스크립트가 실행하는 파일을 따라가 찾습니다. - `docs/consumer-bundle-size.md`를 CI가 검사합니다: 행과 예산은 fixture 표와 같아야 하고, 크기는 새 측정값과 runner 편차 + 0.5 KB 안이어야 합니다(20 KB 어긋나 있었음). 측정은 첫 다운로드와 필요할 때 받는 청크를 나눠 보고하고, `all`·`auto` 행이 추가됐습니다. - CI가 더 빨리 끝나고, 로컬 확인은 바뀐 파일이 영향을 주는 것만 돌립니다. CI는 lane을 위치 순서가 아니라 테스트마다 측정한 시간(`tests/lane-timings.json`)으로 runner에 나눕니다 — 긴 것부터 가장 덜 찬 runner로. 순서대로 나누면 가장 느린 테스트 두 개가 한 runner에 몰렸고, 다른 runner가 쉬는 동안 Firefox 혼자 약 6분을 돌았습니다. 이제 Chromium·WebKit은 runner 3개, Firefox는 2개를 쓰고, 모든 테스트는 여전히 정확히 한 번 돕니다. `node scripts/run-lane.mjs --changed`(와 push 전 기본 확인이 된 `npm run verify:push -- --changed`)는 바뀐 파일이 영향을 줄 수 있는 단계만 돌립니다. `src/core.js`·`package.json`처럼 공유 파일이 바뀌면 전부 돌리고 CI는 이 옵션을 쓰지 않습니다. 모듈 하나를 바꾸면 Chromium lane의 약 5분의 1만 돕니다. `--record-timings`는 측정 시간을 갱신합니다. 느린 브라우저 테스트 두 개는 서로 독립인 실시간 대기를 나란히 돌립니다(엔진마다 Reveal variant 약 58 → 42초, Stylize pattern 31 → 8초). 검사 내용은 같습니다. 게이트: `tests/lane-select.mjs`. - 스크린 리더가 텍스트 효과를 한 번, 쓰인 그대로 읽습니다. Typewriter·Text Split·Blur Text·Text Reveal·Text Fill·Glitch(텍스트)·Overflow Text·Text Transition은 글자를 `aria-hidden` 조각으로 그리고, 텍스트는 div·span·p의 `aria-label`로만 돌려놓았습니다. 이 요소들에는 이름을 붙일 수 없어 NVDA·JAWS가 browse 모드에서 무시했고, 텍스트가 읽히지 않았습니다. 이제 화면에 보이지 않는 사본 하나(`.kt-sr-only`)를 두고, 이름을 가질 수 있는 요소(제목·링크·버튼)에만 이름을 붙입니다. `destroy()`는 작성한 DOM을 되돌립니다. reduced motion은 텍스트 자체를 보여 주고 문단에 이름을 붙이지 않습니다. Counter는 릴을 숨기고 더 이상 `aria-live`가 아닙니다(매 프레임 다시 쓰였습니다). Overflow Text rolling은 링크의 role을 지키고 첫 항목으로 이름을 붙이며, 돌아가는 텍스트(티커, 반복하는 Text Transition)는 live region이 되지 않습니다. 게이트: `tests/browser/text-a11y-lifecycle.mjs`(Chromium·WebKit·Firefox). @@ -48,10 +56,7 @@ - 데모: 닫은 설정 드로어는 inert이고 더 이상 모달 대화상자가 아닙니다(Tab이 숨은 버튼에 닿았음). 닫히는 페이드 중에 다시 연 사이트맵은 열린 채로 남습니다(페이지가 빠져나갈 길 없이 inert로 남았음). 데모 탭 줄은 탭 패턴을 따르고(패널, `aria-controls`, 탭 정지점 하나, 화살표 키), 히어로를 지나 스크롤하면 히어로 제목의 그라디언트가 쉬며, 히어로 스냅은 휠·터치 이벤트마다 레이아웃을 읽지 않습니다. 게이트: `tests/browser/demo-a11y.mjs`. - Fullpage: 페이지가 높이를 준 덱(데모의 420px 카드)이 더 이상 창 높이만큼 커지지 않습니다. 높이가 없는 덱은 화면을 채우는데(`height: 100svh`), 이 판단을 덱을 만들 때 한 번 잰 크기로 했습니다. 그래서 배치되기 전에 만들어진 덱(숨겨진 패널 안, 붙기 전, 브라우저가 아직 배치하지 않은 영역)은 0으로 재져 창 높이에 고정됐고, 데모의 첫 Fullpage 카드가 스크롤만 해도 그렇게 됐습니다. 이제 10px 미만으로 재지면 배치된 덱에서 한 번 더 확인(ResizeObserver 보고 한 번)한 뒤에만 대체 높이를 씁니다. reduced motion에서도 명시한 `height`를 지킵니다. 게이트: `tests/browser/components-a11y.mjs` `fullpage-hidden-panel`(Chromium·WebKit·Firefox). - 데모: 연 프레임 안에 바로 닫은 설정 드로어(요약을 빠르게 두 번 클릭)가 더 이상 열린 채로 남지 않습니다. 닫은 뒤에 프레임 콜백이 어두운 배경을 다시 열어, 닫을 방법 없이 페이지가 덮였습니다. 이제 콜백이 그 패널이 아직 보이는 패널인지 먼저 확인합니다. `tests/browser/demo-code-access.mjs`의 흔들리던 클릭도 이것이었습니다. 게이트: `tests/browser/demo-a11y.mjs`. -- 테스트: `create-cost`는 강제 레이아웃을 만드는 작업과 다음 프레임의 공유 읽기 안에서만 셉니다(트레이스가 멈출 때까지 이어져 Lazy 이미지의 나중 작업까지 세는 일이 있었음 — 바쁜 기계에서 1 대신 6·10). `measure`는 고정 320ms 대신 무대를 화면에 둔 채 커서의 hover 상태를 기다립니다(전체 레인에서 포인터가 도착했을 때 무대가 화면 위 1,000px에 있던 적이 있음). - - - +- 테스트: `create-cost`는 강제 레이아웃을 만드는 작업과 다음 프레임의 공유 읽기 안에서만 셉니다(트레이스가 멈출 때까지 이어져 Lazy 이미지의 나중 작업까지 세는 일이 있었음 — 바쁜 기계에서 1 대신 6·10). `measure`는 고정 320ms 대신 무대를 화면에 둔 채 커서의 hover 상태를 기다립니다(전체 레인에서 포인터가 도착했을 때 무대가 화면 위 1,000px에 있던 적이 있음). 데모 QA는 시간이 걸리는 확인 다섯 개(class Reveal, Loader 진행률, Overflow Text rolling, Text Transition, 동적 노이즈)를 고정 대기 대신 조건으로 기다립니다(바쁜 실행에서 놓쳤음). ## [0.12.3] - 2026-09-27 ### English diff --git a/FEATURE_CONTRACT.md b/FEATURE_CONTRACT.md index 6c0bd351..d270b49a 100644 --- a/FEATURE_CONTRACT.md +++ b/FEATURE_CONTRACT.md @@ -4,7 +4,7 @@ ## 공개 범위 -- 라이브러리 버전: `0.12.3` +- 라이브러리 버전: `0.13.0` - 기능 계약 버전: `1.8.0` - 동작 계약 버전: `1.2.0` - 공개 모듈: 정확히 **55개** diff --git a/OWNER_REQUIREMENTS.md b/OWNER_REQUIREMENTS.md index ced1b637..e6f1849c 100644 --- a/OWNER_REQUIREMENTS.md +++ b/OWNER_REQUIREMENTS.md @@ -4,7 +4,7 @@ ## 현재 계약 -- 라이브러리 버전: `0.12.3` +- 라이브러리 버전: `0.13.0` - 요구사항 계약 버전: `3.3.0` - 고정 요구사항: **50개** - 변경 정책: 소유자의 명시적 승인 없이 요구사항을 제거하거나 의미를 바꿀 수 없습니다. diff --git a/ai/cursor/kineto.mdc b/ai/cursor/kineto.mdc index 87307926..b80cd15d 100644 --- a/ai/cursor/kineto.mdc +++ b/ai/cursor/kineto.mdc @@ -4,7 +4,7 @@ globs: ["**/*.tsx", "**/*.jsx", "**/*.vue", "**/*.html", "**/*.astro", "**/*.sve alwaysApply: false --- -# Kineto rules for coding agents (v0.12.3) +# Kineto rules for coding agents (v0.13.0) Kineto (`@dong-gri/kineto`) is a vanilla-first motion/effects library: 55 modules activated by `data-kt-*` attributes or `Kineto.create()`, with React/Vue/jQuery adapters. Use these rules whenever you generate UI with any component library (shadcn/ui, Bootstrap, MUI, Mantine, Chakra, Ant Design, daisyUI, Nuxt UI, PrimeVue, Vuetify) or from a Figma frame. diff --git a/ai/kineto.rules.md b/ai/kineto.rules.md index 44e28fff..d38c7cc2 100644 --- a/ai/kineto.rules.md +++ b/ai/kineto.rules.md @@ -1,4 +1,4 @@ -# Kineto rules for coding agents (v0.12.3) +# Kineto rules for coding agents (v0.13.0) Kineto (`@dong-gri/kineto`) is a vanilla-first motion/effects library: 55 modules activated by `data-kt-*` attributes or `Kineto.create()`, with React/Vue/jQuery adapters. Use these rules whenever you generate UI with any component library (shadcn/ui, Bootstrap, MUI, Mantine, Chakra, Ant Design, daisyUI, Nuxt UI, PrimeVue, Vuetify) or from a Figma frame. diff --git a/demo/index.html b/demo/index.html index 506f5db4..1f0aa92f 100644 --- a/demo/index.html +++ b/demo/index.html @@ -39,7 +39,7 @@
@@ -396,7 +396,7 @@

Horizontal scroll section

화면 중앙을 고정하고 세로 스크

Magnetic button

자석 반응과 클릭 리플을 한 버튼에 함께 적용합니다.

Dock — 아이콘 확대

가까운 아이콘이 커지고 나머지는 자리를 내주며 밀려납니다.

Hover / Press 제스처

호버·누름·키보드 입력에 스프링으로 반응합니다.

-

Pull to refresh

맨 위에서 아래로 당기면 저항이 걸리고, 놓으면 새로고침합니다.

새 메시지 3건
배포 성공 — v0.12.3
디자인 리뷰 오후 3시
아이콘 세트 교체
접근성 체크리스트
릴리스 노트 초안
QA 회귀 테스트
모션 가이드
+

Pull to refresh

맨 위에서 아래로 당기면 저항이 걸리고, 놓으면 새로고침합니다.

새 메시지 3건
배포 성공 — v0.13.0
디자인 리뷰 오후 3시
아이콘 세트 교체
접근성 체크리스트
릴리스 노트 초안
QA 회귀 테스트
모션 가이드

Drag (드래그)

관성·경계·스냅백·방향키 이동을 지원합니다.

DRAG

Mouse Parallax

포인터 위치에 따라 요소를 X·Y축으로 이동합니다.

MOVE

Compass

바늘이 포인터를 향하도록 회전합니다.

NSWE
@@ -473,7 +473,7 @@

Horizontal scroll section

화면 중앙을 고정하고 세로 스크

- + diff --git a/demo/variant-catalog.js b/demo/variant-catalog.js index 40aa333f..85510bc9 100644 --- a/demo/variant-catalog.js +++ b/demo/variant-catalog.js @@ -2,7 +2,7 @@ /* global window */ window.KINETO_VARIANT_CATALOG = Object.freeze({ "schemaVersion": "1.0.0", - "libraryVersion": "0.12.3", + "libraryVersion": "0.13.0", "moduleCount": 38, "variantCount": 228, "capabilities": { diff --git a/docs/AI-HANDOFF.md b/docs/AI-HANDOFF.md index 97679505..e075cf20 100644 --- a/docs/AI-HANDOFF.md +++ b/docs/AI-HANDOFF.md @@ -66,7 +66,7 @@ distinct positions, gesture-tail ownership and final-position assertions. ## Current state - Package: `@dong-gri/kineto` -- Current source version: `0.12.3` +- Current source version: `0.13.0` - Latest published npm version at the time of this handoff: `0.12.2` (tag `v0.12.2`, GitHub Release and demo deployed; verify with `npm view @dong-gri/kineto version`) — the entry-point work in `[Unreleased]` is planned as the minor `0.13.0` - Public surface: 55 modules and 31 Core APIs @@ -262,7 +262,12 @@ or a tag; release approval remains separate. keep loading logic out of `src/core.js` so `/core` and `/all` do not pay for it. Adapters import `@dong-gri/kineto/all`, not the deprecated default. - **`dist/` is build output and is not committed** (2026-09-27). Build before - running tests locally; CI, Pages, Release and the backup sync all build. + running tests locally. Every workflow job that reads `dist/` runs + `npm run build` first — CI, Pages, Release, the MCP release, the weekly + supply-chain audit and live-site parity check (the last three were missed at + first and failed their next run), and the backup sync in the backup site's own + repository. `tests/workflow-build-order.mjs` checks the order of every job on + every PR: a new job or step that reads `dist/` must come after the build. - **Visual effects can wait for the viewport**: with `Kineto.config({ defer: true })` (the demo turns it on for touch devices) a module that declares `defer: true` is created only near the screen diff --git a/docs/CONTEXT.md b/docs/CONTEXT.md index 64258049..b74f5c37 100644 --- a/docs/CONTEXT.md +++ b/docs/CONTEXT.md @@ -1,4 +1,4 @@ -# Kineto v0.12.3 — 개발·유지보수 컨텍스트 +# Kineto v0.13.0 — 개발·유지보수 컨텍스트 ## 프로젝트 목적 @@ -8,7 +8,7 @@ Kineto는 `dongri.me`의 픽셀 모자이크 실험에서 시작한 인터랙션 ## 현재 기준 -- 버전: `0.12.3` +- 버전: `0.13.0` - 공개 모듈: 55개 - Core API: 31개 - 소유자 고정 요구사항: 52개 diff --git a/docs/QA_REPORT.md b/docs/QA_REPORT.md index 121db3d5..dc3608f4 100644 --- a/docs/QA_REPORT.md +++ b/docs/QA_REPORT.md @@ -1,7 +1,7 @@ -# Kineto v0.12.3 QA Report +# Kineto v0.13.0 QA Report 검증일: 2026-09-20 -대상: v0.12.3 릴리스 후보 소스 · 이전 공개 배포 근거는 버전별로 유지 +대상: v0.13.0 릴리스 후보 소스 · 이전 공개 배포 근거는 버전별로 유지 ## 2026-09-27 감사 수정 · 데모 접근성 · CI와 로컬 확인 속도 (Unreleased) @@ -64,6 +64,38 @@ Counter·Fullpage teardown, `observe()` 하위 트리 정리, `KT_ENGINE_UNAVAIL 검증하지 못한 것: 새 shard matrix의 실제 CI 시간(PR의 첫 CI가 첫 측정), 실기기 iOS/Android, 스크린 리더 실제 낭독 (NVDA·JAWS·VoiceOver). 스크린 리더 동작은 접근성 트리와 DOM 규칙으로만 확인했습니다. +PR #52(`agent/claude/perf-a11y-ci`, `18d5a80`)의 첫 CI: 11개 job 모두 통과. 가장 느린 job은 WebKit 3/3의 245초였습니다 +(전에는 Firefox 1/1이 363초). Chromium 171/189/172초, WebKit 196/200/245초, Firefox 191/214초, Node 24 job 206초. + +### 소유자 보고 — Fullpage 첫 카드가 창 높이만큼 커짐 + +접속해서 스크롤만 해도 첫 카드의 덱이 `style="height: 100svh; …"`였습니다(소유자 콘솔 확인). 높이 없는 덱을 화면에 +채우는 대체 규칙을 만들 때 한 번 잰 `clientHeight`로 정했고, 배치되기 전에 만들어진 덱은 0으로 재져 창 높이에 +고정됐습니다. 이 컨테이너의 Chromium·WebKit에서는 같은 순서가 재현되지 않았지만(여러 창 크기, 첫 방문, 스크롤로 이동, +설정 변경, 비교 시트 — 라이브 사이트 포함), 숨긴 패널·붙기 전 요소에서는 옛 코드가 매번 `100svh`를 씁니다 +(`components-a11y`의 `fullpage-hidden-panel`, 옛 코드에서 실패). 이제 10px 미만으로 재지면 배치된 덱의 ResizeObserver +보고로 한 번 더 확인합니다. + +### v0.13.0 준비 (브랜치 `agent/claude/release-0.13.0`) + +- 준비 중 `npm run verify`에서 흔들림 셋을 찾아 고쳤습니다. + - `demo-code-access`의 30초 클릭 실패: 설정 드로어를 연 프레임 안에 닫으면 프레임 콜백이 배경을 다시 열었습니다. 데모 결함이며, `demo-a11y`에 게이트를 추가했습니다. + - `create-cost`: 트레이스 창이 너무 길었습니다. + - `measure`: 포인터가 도착했을 때 무대가 화면 밖에 있었습니다. + - `demo-qa`: 시간이 걸리는 확인 다섯 개가 고정 대기였습니다. + - 고친 뒤 결과: demo QA는 코어 하나를 바쁘게 둔 채 5/5, `create-cost`는 부하 중 3/3입니다. +- 최종 `npm run verify` 통과. 결과는 Node 64/64, 데모 QA(한 번 흔들린 뒤 위 수정), Chromium 레인 48/48(flaky 0), pack, lockfile 5개 감사 0건입니다. +- `release:prepare -- minor`: 모든 버전 소스를 0.13.0으로 올리고, `[0.13.0]` 절(영/한 각 20개)과 `.github/release-notes/v0.13.0.md`를 만들고, `docs/module-cost.md`(core 16.1 KB gzip)를 갱신했습니다. `docs/consumer-bundle-size.md`는 다시 측정했습니다. +- 게시(`release:ship -- v0.13.0`)는 소유자의 명시적 승인 뒤에만 합니다. + +### #52 병합 뒤 첫 예약 실행 — `dist/`를 빌드 없이 읽던 job 셋 (2026-09-29) + +- 2026-09-28 월요일 예약 실행 두 개가 `main` `41d3319`에서 실패했습니다: [Supply-chain audit `36407856338`](https://github.com/catgarret/kineto/actions/runs/36407856338)의 `Check package surface`와 [Live-site parity `36405966893`](https://github.com/catgarret/kineto/actions/runs/36405966893)의 `Verify live-site parity`. 깨끗한 checkout에서 재현했습니다. `package-size`는 `required release file missing: dist/…`, `package-tarball`은 `ERR_MODULE_NOT_FOUND …/dist/kineto.default.js`, `verify-live-site`는 `ENOENT dist/kineto.umd.min.js`로 실패했습니다. +- 원인: v1 Phase 1이 `dist/`를 추적에서 뺄 때 이 두 워크플로와 태그 전용 `release-mcp.yml`(`test:contract`가 `dist/kineto.js`를 import)이 빌드 없이 옛 커밋 사본을 읽고 있었습니다. MCP 릴리스는 아직 태그가 없어 실패가 드러나지 않았을 뿐입니다. +- 조치: 세 job에 `npm run build`를 추가했습니다. MCP 릴리스는 빌드 뒤 `git diff --exit-code`로 추적 파일이 그대로인지 확인해, 패킹하는 tarball이 태그 소스와 같게 합니다. 새 게이트 `tests/workflow-build-order.mjs`(`test:workflow-build-order`, Node 레인)는 모든 워크플로의 job을 순서대로 읽습니다. npm 스크립트와 그 스크립트가 실행하는 파일을 따라가, `dist/`를 읽는 명령이 `npm run build`보다 앞서면 실패합니다. 수정 전 트리에서는 정확히 이 세 job만 잡고 다른 job은 오탐이 없습니다. fixture 16개로 래퍼 인자, `for` 목록, import 경유, 다른 패키지, 주석, job 경계를 고정했습니다. +- 빌드 뒤 `test:live-site:parity`: canonical `kineto.dongri.me`는 `41d3319`와 런타임 해시까지 일치했습니다. 백업 `git.dongri.me/example/kineto`는 build `1b28eb9`(2026-08-25, v0.8.104)를 서빙했습니다. 백업 저장소의 `sync-kineto.yml`은 "가장 최근 성공한 main push CI"를 묻는데, 2026-09-29 06:11 UTC 실행에서 그 질의가 8월 run을 돌려줬고 백업이 v0.12.3에서 v0.8.104로 되돌아갔습니다. 같은 질의를 다시 하면 `41d3319`를 돌려주므로 일시적인 응답 오류로 보입니다. 이 저장소 밖의 파일이라, main 끝 커밋(`git ls-remote`)을 정하고 그 SHA의 push CI가 성공했을 때만 배포하는 패치를 소유자에게 전달했습니다. 이 방식은 CI가 도는 동안 백업이 뒤처질 수는 있어도 뒤로 가지는 않습니다. +- 검증: `dist/`가 없는 깨끗한 checkout에서 고친 job의 명령을 순서대로 실행했습니다. Supply-chain은 boundary → build → package-size·tarball 통과. MCP 릴리스는 build 뒤 추적 파일 변화 없음 → `integrations:check`·`test:contract`·integrations-contract·MCP stdio 통과. Live-site parity는 main 트리에서 build 뒤 canonical 런타임 해시가 일치했습니다. 이 브랜치 트리에서는 v0.13.0이 아직 배포 전이라 설계대로 불일치를 보고합니다. Node 레인은 65/65 통과(새 게이트 포함), lint·`release:check` OK. + ## 2026-09-26 아이폰 탭 튐 · 유령 커서 · 스크롤 중 ScrollTrigger refresh (v0.12.3) v0.12.2 게시(태그 `v0.12.2` → `3cc58bb`, Release·데모 배포 성공) 뒤의 소유자 보고 셋: @@ -1280,7 +1312,7 @@ registry의 해제 크기는 1,797,191 bytes로 확인했습니다. 이 수치 현재 소스의 패키지명은 -`@dong-gri/kineto`, 버전은 `0.12.3`입니다. +`@dong-gri/kineto`, 버전은 `0.13.0`입니다. ## 배포 후 확인 diff --git a/docs/README.md b/docs/README.md index b38ad783..355ac261 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ # Kineto Documentation -Kineto v0.12.3의 공개 API와 소유자 의도를 기준으로 정리한 문서입니다. +Kineto v0.13.0의 공개 API와 소유자 의도를 기준으로 정리한 문서입니다. ## 시작하기 diff --git a/docs/RELEASING.md b/docs/RELEASING.md index ca0cddcd..dd5600e3 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -66,9 +66,16 @@ canonical and backup URLs together, including their build markers and runtime asset hashes. `.github/workflows/live-site-parity.yml` runs the same check weekly and on manual -dispatch. It is intentionally independent of the Pages deploy workflow, so a -delayed or failed backup sync raises a separate signal instead of blocking a -canonical deploy. +dispatch. It builds the commit first, because the asset hashes are compared +with that build and `dist/` is not committed. It is intentionally independent of +the Pages deploy workflow, so a delayed or failed backup sync raises a separate +signal instead of blocking a canonical deploy. + +The backup sync lives in the backup site's repository +(`.github/workflows/sync-kineto.yml`). It must only publish the current tip of +`main`, and only once that commit's push CI has passed. Trusting a "latest +successful run" query is not enough: it can answer with an older run, and on +2026-09-29 such an answer replaced the backup with an August build (v0.8.104). ## Preparing a version diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 3a567896..08ac6d4a 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1,6 +1,6 @@ # Kineto 제품·기술 로드맵 -> 기준 버전: v0.12.3 · 작성일: 2026-08-02 · 검토: 2026-09-19 +> 기준 버전: v0.13.0 · 작성일: 2026-08-02 · 검토: 2026-09-19 > 성격: 일정 약속이 아니라 우선순위와 진입·중단 조건을 정하는 실행 문서 > > 2026-08-09 검토에서 추가·수정된 부분은 §2 병목 3개 항목, §3 하지 않을 일 2개 항목, @@ -80,6 +80,16 @@ v0.12.3에서 휴대폰 탭 튐(에뮬레이션 스윕 20px 초과 10 → 0)· 흡수했고, README 설치 절을 `core` + 쓰는 모듈 우선으로 바꾸며 모듈별 비용 표([module-cost](module-cost.md))를 공개했습니다. 엔진(GSAP·Lenis)을 불러오지 못하면 `KT_ENGINE_UNAVAILABLE` 진단이 이유를 알려 줍니다. +v0.13.0에서 엔트리 포인트를 1.0 방향으로 정리합니다. `@dong-gri/kineto/auto`는 코어를 먼저 받고 마크업이 쓰는 +모듈만 그때 불러오며, `/all`은 전체 런타임입니다. 기본 엔트리는 0.13에서 `/all`과 같은 파일이라 깨지는 것이 없지만, +1.0에서 `/auto`의 의미로 바뀌므로 deprecated로 알립니다([엔트리 포인트](entry-points.md)). `dist/`는 더 이상 커밋하지 +않고, LICENSE는 MIT 원문으로 바로잡았습니다. 약 40개 모듈의 접근성·수명주기 감사도 함께 들어갑니다 — 스크린 리더가 +텍스트 효과를 한 번 쓰인 그대로 읽고, 컴포넌트가 키보드·포커스·inert 규칙을 따르며, 숨긴 탭 복귀·destroy·다시 재생의 +경합이 정리되고, 움직이는 것이 없으면 루프가 쉽니다. 크기를 만들 때 한 번 재서 정하던 곳(Cursor 범위, Fullpage 높이)은 +배치된 뒤의 크기로 정합니다. CI는 브라우저 테스트를 측정 시간으로 나눠 돌리고(가장 느린 job 363 → 245초), push 전 +확인은 바뀐 파일이 영향을 주는 테스트만 고르는 `npm run verify:push -- --changed`입니다 +([QA 보고서](QA_REPORT.md)의 2026-09-27 항목). + ## 1. 결론 Kineto는 Motion, GSAP, Swiper를 정면으로 대체하는 범용 애니메이션 엔진을 목표로 하지 않습니다. diff --git a/docs/STABILIZATION_REPORT.md b/docs/STABILIZATION_REPORT.md index d37c2375..605783d0 100644 --- a/docs/STABILIZATION_REPORT.md +++ b/docs/STABILIZATION_REPORT.md @@ -1,4 +1,4 @@ -# Kineto v0.12.3 Stabilization Report +# Kineto v0.13.0 Stabilization Report ## 범위 diff --git a/docs/consumer-bundle-size.md b/docs/consumer-bundle-size.md index b72b3107..c5926e24 100644 --- a/docs/consumer-bundle-size.md +++ b/docs/consumer-bundle-size.md @@ -6,15 +6,15 @@ | Consumer entry | JS files | Raw | Gzip | On-demand chunks | Budget (gzip) | | --- | ---: | ---: | ---: | ---: | ---: | -| full | 1 | 639.7 KB | 175.3 KB | — | ≤ 176 KB (+4 KB runner variance) | -| all | 1 | 639.0 KB | 175.0 KB | — | ≤ 176 KB (+4 KB runner variance) | -| auto | 4 | 59.7 KB | 20.7 KB | 57 (196.5 KB) | ≤ 22 KB | +| full | 1 | 640.1 KB | 175.4 KB | — | ≤ 176 KB (+4 KB runner variance) | +| all | 1 | 639.4 KB | 175.1 KB | — | ≤ 176 KB (+4 KB runner variance) | +| auto | 4 | 59.7 KB | 20.7 KB | 57 (196.7 KB) | ≤ 22 KB | | core-reveal | 1 | 56.9 KB | 17.8 KB | — | ≤ 30 KB | | core-three | 1 | 122.6 KB | 35.1 KB | — | ≤ 65 KB | | core-states | 1 | 43.6 KB | 13.9 KB | — | ≤ 35 KB | | core-presence | 1 | 45.5 KB | 14.3 KB | — | ≤ 35 KB | -| react-adapter | 1 | 652.8 KB | 179.1 KB | — | ≤ 180 KB (+1 KB runner variance) | -| vue-adapter | 1 | 656.7 KB | 180.3 KB | — | ≤ 181 KB (+1 KB runner variance) | +| react-adapter | 1 | 653.2 KB | 179.2 KB | — | ≤ 180 KB (+1 KB runner variance) | +| vue-adapter | 1 | 657.1 KB | 180.4 KB | — | ≤ 181 KB (+1 KB runner variance) | The fixture test also requires `core + one module`, `core + three modules`, `core + states`, `core + presence` and the on-demand `auto` entry to remain smaller than the full entry, and `auto` to split every module into its own chunk. @@ -37,15 +37,15 @@ The fixture test also requires `core + one module`, `core + three modules`, `cor | Rolldown consumer entry | JS files | Raw | Gzip | On-demand chunks | Budget (gzip) | | --- | ---: | ---: | ---: | ---: | ---: | -| full | 1 | 641.9 KB | 175.6 KB | — | ≤ 176 KB (+4 KB runner variance) | -| all | 1 | 639.9 KB | 174.7 KB | — | ≤ 176 KB (+4 KB runner variance) | -| auto | 1 | 60.3 KB | 19.2 KB | 57 (195.6 KB) | ≤ 22 KB (+1 KB runner variance) | +| full | 1 | 642.3 KB | 175.7 KB | — | ≤ 176 KB (+4 KB runner variance) | +| all | 1 | 640.2 KB | 174.8 KB | — | ≤ 176 KB (+4 KB runner variance) | +| auto | 1 | 60.3 KB | 19.2 KB | 57 (195.8 KB) | ≤ 22 KB (+1 KB runner variance) | | core-reveal | 1 | 57.5 KB | 18.1 KB | — | ≤ 30 KB (+1 KB runner variance) | | core-three | 1 | 123.4 KB | 35.6 KB | — | ≤ 65 KB (+1 KB runner variance) | | core-states | 1 | 44.2 KB | 14.0 KB | — | ≤ 35 KB | | core-presence | 1 | 46.0 KB | 14.4 KB | — | ≤ 35 KB | -| react-adapter | 1 | 655.7 KB | 179.3 KB | — | ≤ 180 KB (+1 KB runner variance) | -| vue-adapter | 1 | 661.3 KB | 180.8 KB | — | ≤ 181 KB (+2 KB runner variance) | +| react-adapter | 1 | 656.0 KB | 179.4 KB | — | ≤ 180 KB (+1 KB runner variance) | +| vue-adapter | 1 | 661.6 KB | 181.0 KB | — | ≤ 181 KB (+2 KB runner variance) | This uses the same public-entry matrix, product gzip budgets, and modular tree-shaking boundaries as Vite. It is a second bundler signal, not a promise that every bundler produces identical bytes. diff --git a/docs/getting-started.md b/docs/getting-started.md index 0df079a6..23ba395c 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -7,7 +7,7 @@ ```bash npm install @dong-gri/kineto # 또는 -npm install ./dong-gri-kineto-0.12.3.tgz +npm install ./dong-gri-kineto-0.13.0.tgz ``` ```js diff --git a/docs/integrations/README.md b/docs/integrations/README.md index 8f97b59d..3a7de6cc 100644 --- a/docs/integrations/README.md +++ b/docs/integrations/README.md @@ -1,6 +1,6 @@ -# UI 라이브러리·디자인 시스템과 함께 쓰기 (v0.12.3) +# UI 라이브러리·디자인 시스템과 함께 쓰기 (v0.13.0) Kineto는 어떤 프레임워크·디자인 시스템·컴포넌트 라이브러리와도 함께 쓰이도록 만들었습니다. 라이브러리를 대체하지 않고 그 위에 모션·미디어 효과를 얹어 어울리게 합니다. 이 문서들은 `kineto.integrations.json`에서 생성되며, 같은 정보가 AI 도구용 규칙 파일([`ai/kineto.rules.md`](../../ai/kineto.rules.md))과 [Kineto MCP 서버](../../packages/kineto-mcp/README.md)에도 그대로 들어갑니다. diff --git a/docs/integrations/antd.md b/docs/integrations/antd.md index ca99c2b3..547e614e 100644 --- a/docs/integrations/antd.md +++ b/docs/integrations/antd.md @@ -1,6 +1,6 @@ -# Ant Design + Kineto (v0.12.3) +# Ant Design + Kineto (v0.13.0) 붙이는 방식: **props-passthrough-or-wrapper** — Most Ant Design components pass extra HTML attributes to their root (`Button`, `Card`, `Typography.Title`, `Statistic` wrapper). When a component does not forward `data-kt-*` (check the rendered DOM), wrap it in a plain `
` or use `useKineto` with a `ref`. Mount `` once. diff --git a/docs/integrations/bootstrap.md b/docs/integrations/bootstrap.md index 687dc96b..a4a621a0 100644 --- a/docs/integrations/bootstrap.md +++ b/docs/integrations/bootstrap.md @@ -1,6 +1,6 @@ -# Bootstrap 5 + Kineto (v0.12.3) +# Bootstrap 5 + Kineto (v0.13.0) 붙이는 방식: **data-attributes** — `data-bs-*` (Bootstrap) and `data-kt-*` (Kineto) live on the same element without conflict. Load Bootstrap's bundle and Kineto's UMD (or ESM) and call `Kineto.observe()`; toasts, popovers and dynamically shown modals are picked up automatically. diff --git a/docs/integrations/chakra.md b/docs/integrations/chakra.md index 85d4643c..4fa54316 100644 --- a/docs/integrations/chakra.md +++ b/docs/integrations/chakra.md @@ -1,6 +1,6 @@ -# Chakra UI v3 + Kineto (v0.12.3) +# Chakra UI v3 + Kineto (v0.13.0) 붙이는 방식: **props-passthrough** — Chakra v3 components are Ark UI + style props; unknown `data-kt-*` props reach the DOM. Mount `` once. For `asChild` compositions put the attribute on the element that renders. diff --git a/docs/integrations/daisyui.md b/docs/integrations/daisyui.md index 729c88df..658c41d0 100644 --- a/docs/integrations/daisyui.md +++ b/docs/integrations/daisyui.md @@ -1,6 +1,6 @@ -# daisyUI + Kineto (v0.12.3) +# daisyUI + Kineto (v0.13.0) 붙이는 방식: **data-attributes** — daisyUI is CSS classes only, so attach exactly like vanilla HTML. daisyUI ships static `skeleton`, `toast`, `tooltip`, `tabs` and `collapse` classes without JavaScript; Kineto can supply the behaviour where you need motion or live state. diff --git a/docs/integrations/mantine.md b/docs/integrations/mantine.md index f47cb57d..86d8963a 100644 --- a/docs/integrations/mantine.md +++ b/docs/integrations/mantine.md @@ -1,6 +1,6 @@ -# Mantine + Kineto (v0.12.3) +# Mantine + Kineto (v0.13.0) 붙이는 방식: **props-passthrough** — Mantine components spread `...others` onto the root node and forward refs, so `data-kt-*` props work everywhere. Mount `` once. diff --git a/docs/integrations/mui.md b/docs/integrations/mui.md index 4891f0f9..c9086824 100644 --- a/docs/integrations/mui.md +++ b/docs/integrations/mui.md @@ -1,6 +1,6 @@ -# Material UI (MUI) + Kineto (v0.12.3) +# Material UI (MUI) + Kineto (v0.13.0) 붙이는 방식: **props-passthrough** — MUI components forward unknown props (including `data-kt-*`) and refs to their root element. Mount `` once, then add attributes on `Card`, `Button`, `Typography`, `Box` … diff --git a/docs/integrations/nuxt-ui.md b/docs/integrations/nuxt-ui.md index 8e3edc2a..389bbe08 100644 --- a/docs/integrations/nuxt-ui.md +++ b/docs/integrations/nuxt-ui.md @@ -1,6 +1,6 @@ -# Nuxt UI (Reka UI + Tailwind) + Kineto (v0.12.3) +# Nuxt UI (Reka UI + Tailwind) + Kineto (v0.13.0) 붙이는 방식: **attrs-fallthrough** — Vue attribute fallthrough puts `data-kt-*` on the component's root element. Register a client plugin (`plugins/kineto.client.ts`) that imports the stylesheet and calls `Kineto.observe()`; use `v-motion` / `useKineto` from `@dong-gri/kineto/vue` when you need the instance. diff --git a/docs/integrations/primevue.md b/docs/integrations/primevue.md index a1220f59..60c6e188 100644 --- a/docs/integrations/primevue.md +++ b/docs/integrations/primevue.md @@ -1,6 +1,6 @@ -# PrimeVue v4 + Kineto (v0.12.3) +# PrimeVue v4 + Kineto (v0.13.0) 붙이는 방식: **attrs-fallthrough** — PrimeVue components fall attributes through to the root (or accept `pt` pass-through for inner parts). `Dialog`, `Toast` and `Sidebar` teleport to ``, which `Kineto.observe()` on the document already covers. diff --git a/docs/integrations/shadcn.md b/docs/integrations/shadcn.md index 0408b43b..1d833a87 100644 --- a/docs/integrations/shadcn.md +++ b/docs/integrations/shadcn.md @@ -1,6 +1,6 @@ -# shadcn/ui (Radix / Base UI + Tailwind) + Kineto (v0.12.3) +# shadcn/ui (Radix / Base UI + Tailwind) + Kineto (v0.13.0) 붙이는 방식: **props-passthrough** — shadcn components spread extra props onto their root DOM node, so `data-kt-*` props reach the DOM unchanged. Add `` (registry item `@kineto/provider`) once in the root layout; it imports the stylesheet and calls `Kineto.observe()` on the client. Use `useKineto` / `` from `@dong-gri/kineto/react` only when the code needs the instance. diff --git a/docs/integrations/tailwind.md b/docs/integrations/tailwind.md index 4c36dc0c..995e1652 100644 --- a/docs/integrations/tailwind.md +++ b/docs/integrations/tailwind.md @@ -1,6 +1,6 @@ -# Tailwind CSS (no component library) + Kineto (v0.12.3) +# Tailwind CSS (no component library) + Kineto (v0.13.0) 붙이는 방식: **data-attributes** — Same as vanilla: `data-kt-*` attributes on utility-styled markup. Keep Tailwind `transition-*`/`animate-*` classes off elements that carry a Kineto reveal/gesture. diff --git a/docs/integrations/vanilla.md b/docs/integrations/vanilla.md index 35713640..39b54754 100644 --- a/docs/integrations/vanilla.md +++ b/docs/integrations/vanilla.md @@ -1,6 +1,6 @@ -# Vanilla HTML / CSS + Kineto (v0.12.3) +# Vanilla HTML / CSS + Kineto (v0.13.0) 붙이는 방식: **data-attributes** — Put `data-kt-=""` and `data-kt-
- + @@ -482,7 +482,7 @@

Horizontal scroll section

화면 중앙을 고정하고 세로 스크 - + @@ -490,7 +490,7 @@

Horizontal scroll section

화면 중앙을 고정하고 세로 스크 - + diff --git a/site/kineto.umd.min.js b/site/kineto.umd.min.js index 8f3549f0..0f3274cc 100644 --- a/site/kineto.umd.min.js +++ b/site/kineto.umd.min.js @@ -21,7 +21,7 @@ @media (prefers-reduced-motion: reduce) { [data-kt-reveal], [data-kt-text-split], [data-kt-blur-text] { opacity: 1 !important; transform: none !important; filter: none !important; } } - `,document.head.appendChild(e)}var En={version:`0.12.3`,easing:I,easingFn:z,easings:F,get env(){return kt||=W(),Gt(),kt},get prefersReducedMotion(){return Pt.forceReducedMotion?!0:!!(Pt.respectReducedMotion&&this.env.reducedMotion)},setReducedMotion(e){e===`always`||e===!0?(Pt.forceReducedMotion=!0,Pt.respectReducedMotion=!0):e===`never`||e===!1?(Pt.forceReducedMotion=!1,Pt.respectReducedMotion=!1):(Pt.forceReducedMotion=!1,Pt.respectReducedMotion=!0),Vt();try{document.dispatchEvent(new CustomEvent(`kineto:reduced-motion`,{detail:{reduced:this.prefersReducedMotion}}))}catch{}return this},get performance(){return Pt.performance===`auto`?this.env.perf:Pt.performance},get registry(){return Object.fromEntries(_t)},get instanceCount(){return vt.size},diagnostics:Rt,diagnosticCodes:ct,get smoothEnabled(){return!!wt},get lenis(){return wt},config(e={}){return e.smoothOptions&&(Pt.smoothOptions={...Pt.smoothOptions,...e.smoothOptions}),Object.assign(Pt,{...e,smoothOptions:Pt.smoothOptions}),e.spring!==void 0&&ee({spring:e.spring===!0}),kt=null,this},setAnimationEngine:h,setEngineSource(e={}){return f(e),this},getEngineSource(){return p()},enableSmooth(e={}){return Pt.smooth=!0,Pt.smoothOptions={...Pt.smoothOptions,...e},xt?xn():gn(),this},disableSmooth(){return Pt.smooth=!1,Sn(),this},toggleSmooth(e,t={}){return(typeof e==`boolean`?e:!Pt.smooth)?this.enableSmooth(t):this.disableSmooth()},scrollTo(e,t={}){return wt?(wt.scrollTo(e,t),this):(typeof e==`number`?window.scrollTo({top:e,behavior:t.behavior||`smooth`}):de(e)[0]?.scrollIntoView?.({behavior:t.behavior||`smooth`,block:t.block||`start`}),this)},register(e,t){return!e||!t||typeof t.create!=`function`?(console.warn(`[Kineto] Module "${e}" needs a create() function.`),Zt({code:ct.INVALID_MODULE,module:String(e||`unknown`),phase:`register`,recoverable:!0}),this):(_t.set(e,t),this[e]=(t,n={})=>this.create(e,t,n),this)},unregister(e){return Array.from(vt).forEach(t=>{t.name===e&&ln(t)}),_t.delete(e),delete this[e],this},create(e,t,n={}){let r=_t.get(e);if(!r&&Bt?.has(e))return Bt.notLoaded(e);if(!r)return console.warn(`[Kineto] Unknown module: ${e}`),Zt({code:ct.UNKNOWN_MODULE,module:String(e||`unknown`),phase:`create`,recoverable:!0}),null;let i=de(t);if(!i.length)return null;let a=i.map(t=>{let i=$t(t)?.get(e);if(i)return i.instance;yn(t,e);try{let i,a=this.prefersReducedMotion,o=r.reducedMotion||r.reduced;if(i=a?(o?o.call(r,t,n,this):void 0)||we(t,e):this.performance===`low`&&typeof r.fallback==`function`?r.fallback.call(r,t,n,this)||we(t,e):r.create(t,n,this),!i)return Zt({code:ct.NOT_APPLICABLE,module:e,phase:`create`,recoverable:!0,detail:tn(t)}),null;let s=en(t,e,i,n);return on(r,n)&&sn($t(t).get(e)),s}catch(t){return console.error(`[Kineto/${e}] create() failed:`,t),Zt({code:ct.CREATE_FAILED,module:e,phase:`create`,recoverable:!0,cause:t}),null}}).filter(Boolean);return a.length&&gn(),a.length<=1?a[0]||null:a},scan(e=typeof document<`u`?document:null){if(this.env.ssr||!e)return this;gn();let t=(e,t)=>!$t(e)?.has(t)&&!It.has(e,t)&&!gt(e,t),n=n=>{let r=[],i=new Map,a=e=>{ht.has(e)===n&&(r.push(e),i.set(`data-kt-${ce(e)}`,e))};_t.forEach((e,t)=>a(t)),Bt?.discoverable().forEach(e=>{_t.has(e)||a(e)});let o=new Map(r.map(e=>[e,[]]));if(!r.length)return o;let s=r.map(e=>`[data-kt-${ce(e)}]`).join(`,`),c=e=>{(e.getAttributeNames?.()||[]).forEach(n=>{let r=i.get(n);r&&t(e,r)&&o.get(r).push(e)})};return e.matches?.(s)&&c(e),e.querySelectorAll?.(s).forEach(c),o},r=(e,t=null)=>{_t.forEach((n,r)=>{let i=e.get(r);if(!i)return;let a=Pt.defer===!0&&n.defer===!0;i.forEach(e=>{(!t||t(e))&&(a&&It.queue(e,r)||this.create(r,e,ge(e,r)))})})},i=()=>{typeof requestAnimationFrame<`u`?requestAnimationFrame(()=>document.documentElement.classList.remove(`kt-preload`)):document.documentElement.classList.remove(`kt-preload`)};r(n(!1));let a=n(!0),o=Array.from(a.values()).some(e=>e.length>0),s=[],c=s.length?()=>{}:i;if(s.length&&Bt.loadAll(s).then(()=>e.isConnected===!1?i():this.scan(e)),o&&!v()){let t={root:e,cancelled:!1,released:[]};dn.add(t);let i=e.isConnected!==!1,o=e=>(!i||e.isConnected!==!1)&&!t.released.some(t=>un(t,e));b().finally(()=>{dn.delete(t),v()||zt(`gsap`,Array.from(a.entries()).filter(([,e])=>e.length>0).map(([e])=>e));let s=i&&e.isConnected===!1;!t.cancelled&&!s&&r(n(!0),o),c()})}else r(a),c();return this},init(e=typeof document<`u`?document:null){return this.scan(e)},initModules(e){return de(e).forEach(e=>this.scan(e)),this},autoInit(e=typeof document<`u`?document:null){return this.env.ssr||!e?this:document.readyState===`loading`?(St||(St=!0,Ct=()=>{St=!1,Ct=null,this.scan(e)},document.addEventListener(`DOMContentLoaded`,Ct,{once:!0})),this):this.scan(e)},observe(e=typeof document<`u`?document:null,t={}){let n=typeof e==`string`?de(e)[0]:e,r={root:n||null,active:!1,disconnect(){}};if(this.env.ssr||!n||typeof MutationObserver>`u`)return r;let i=bt.get(n);if(i)return i.handle;let a=hn(n,t),o={root:n,active:!0,disconnect:()=>{let e=bt.get(n);e&&e.handle===o&&(e.live.disconnect(),bt.delete(n),o.active=!1)}};return bt.set(n,{live:a,handle:o}),t.scan!==!1&&this.scan(n),o},getInstance(e,t){let n=de(e)[0];return n?t?$t(n)?.get(t)?.instance||null:Array.from($t(n)?.values()||[],({instance:e})=>e):null},updateModule(e,t,n={}){let r=de(e),i=0;return r.forEach(e=>{let r=$t(e)?.get(t);if(r&&typeof r.instance.update==`function`){let e={...r.options,...n};try{if(r.instance.update(n,e)!==!1){r.options=e,i+=1;return}}catch(e){console.error(`[Kineto/${t}] update() failed, recreating:`,e),Zt({code:ct.UPDATE_FAILED,module:t,phase:`update`,recoverable:!0,cause:e})}}let a=r?{...r.options,...n}:n;r?.instance?.effect===`radial`&&Number.isFinite(r.instance.index)&&(a.initialIndex=r.instance.index),r&&ln(r),this.create(t,e,a)}),i>0},destroyModule(e,t){let n=de(e);return n.length&&Array.from(vt).forEach(e=>{e.name===t&&pn(e,n)&&ln(e)}),this},replay(e,t,n){let r=de(e),i=[];Array.from(vt).forEach(e=>{e.name===t&&pn(e,r)&&i.push(e)});let a=[];return i.forEach(e=>{if(!n&&typeof e.instance?.replay==`function`)e.instance.replay(),a.push(e.instance);else{let r=e.sourceEl,i=n||e.options;ln(e,!0,!1);let o=this.create(t,r,i);o&&a.push(o)}}),a.length<=1?a[0]||null:a},destroy(e){if(e){let t=de(e);return Array.from(vt).forEach(e=>{pn(e,t)&&ln(e)}),It.cancel(t),fn(t),this}return It.cancel(),fn(),Array.from(vt).forEach(e=>ln(e)),Array.from(bt.values()).forEach(({handle:e})=>e.disconnect()),wn(),this},pause(){return vt.forEach(({instance:e})=>e.pause()),wt?.stop(),this},resume(){return vt.forEach(({instance:e})=>e.resume()),wt?.start(),this},refresh(){return _e()?.refresh(),this}};En.core={initModules:e=>En.initModules(e),destroyModule:(e,t)=>En.destroyModule(e,t),getInstance:(e,t)=>En.getInstance(e,t),replay:(e,t,n)=>En.replay(e,t,n),scan:e=>En.scan(e),enableSmooth:e=>En.enableSmooth(e),disableSmooth:()=>En.disableSmooth(),toggleSmooth:(e,t)=>En.toggleSmooth(e,t),scrollTo:(e,t)=>En.scrollTo(e,t)};var Dn={defer:!0,create(e,t){let n=Q(),r=_e();if(!n||!r)return this.fallback(e,t);let i=$(e,[`transform`,`willChange`]),a=t.speed??.5,o=t.axis||`y`,s=(t.distance??200)*Math.abs(a),c={[o]:a<0?s:-s},l={[o]:a<0?-s:s,ease:`none`,scrollTrigger:{trigger:e,start:t.start||`top bottom`,end:t.end||`bottom top`,scrub:t.scrub??!0,invalidateOnRefresh:!0,onUpdate:t.onUpdate?n=>t.onUpdate(n.progress,e,n):void 0}};e.style.willChange=`transform`;let u=n.fromTo(e,c,l);return{el:e,type:`parallax`,pause:()=>u.scrollTrigger?.disable(!1),resume:()=>u.scrollTrigger?.enable(),destroy:()=>{u.scrollTrigger?.kill(),u.kill(),i()}}},reduced(e){let t=$(e,[`transform`]),n=Q();return n?n.set(e,{x:0,y:0}):e.style.transform=`none`,{el:e,type:`parallax`,pause(){},resume(){},destroy:t}},fallback(e,t={}){let n=$(e,[`transform`,`willChange`]),r=t.axis===`x`?`x`:`y`,i=Number(t.speed??.5),a=Number(t.distance??200)*i;e.style.willChange=`transform`;let o=!1,s=null,c=!1,l=()=>{if(o=!1,s=null,c)return;let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,i=((n-t.top)/(n+t.height)-.5)*2*-a;e.style.transform=r===`x`?`translate3d(${i}px,0,0)`:`translate3d(0,${i}px,0)`},u=()=>{o||(o=!0,s=requestAnimationFrame(l))};return l(),window.addEventListener(`scroll`,u,{passive:!0}),window.addEventListener(`resize`,u,{passive:!0}),{el:e,type:`parallax`,pause(){window.removeEventListener(`scroll`,u)},resume(){window.addEventListener(`scroll`,u,{passive:!0})},destroy(){c=!0,s!=null&&cancelAnimationFrame(s),window.removeEventListener(`scroll`,u),window.removeEventListener(`resize`,u),n()}}}},On={defer:!0,offscreen:`pause`,create(e,t){let n=W();if((t.mode||t.preset)===`compass`){let i=X(t.smoothing??t.ease,.08,.01,1),a=Number(t.rotateOffset??0),o=t.compassRange==null?null:Number(t.compassRange),s=Number(t.sensitivity??1),c=t.global?window:e,l=$(e,[`transform`,`willChange`]);e.style.willChange=`transform`;let u=0,d=0,f=!0,p=!1,m=null,h=t.gyro!==!1&&n.hasGyro&&!te(),g=()=>{f&&m==null&&(m=requestAnimationFrame(r))},_=e=>{e.alpha!=null&&(u=-e.alpha*s,g())},v=n=>{let r=e.getBoundingClientRect();if(r.width&&r.height){if(o!=null){let e=t.global?{left:0,width:window.innerWidth}:r;u=J(((n.clientX-e.left)/e.width-.5)*2,-1,1)*o*s}else u=Math.atan2(n.clientY-(r.top+r.height/2),n.clientX-(r.left+r.width/2))*180/Math.PI*s;g()}},y=re();function r(t){if(m=null,!f)return;let n=(u-d)%360;n>180&&(n-=360),n<-180&&(n+=360),d+=n*Y(i,y.tick(t)),e.style.transform=`rotate(${(d+a).toFixed(3)}deg)`,Math.abs(n)>.01&&(m=requestAnimationFrame(r))}return h?K().then(e=>{e&&!p&&window.addEventListener(`deviceorientation`,_,{passive:!0})}):c.addEventListener(`pointermove`,v,{passive:!0}),m=requestAnimationFrame(r),{el:e,type:`mouseParallax`,pause:()=>{f=!1,m!=null&&cancelAnimationFrame(m),m=null},resume:()=>{f||(f=!0,g())},destroy:()=>{f=!1,p=!0,m!=null&&cancelAnimationFrame(m),c.removeEventListener(`pointermove`,v),window.removeEventListener(`deviceorientation`,_),l()}}}let i=X(t.smoothing??t.ease,.08,.01,1),a=t.maxX??40,o=t.maxY??40,s=t.global?window:e,c=t.gyro!==!1&&n.hasGyro&&!te(),l=Array.from(e.querySelectorAll(`[data-mp-speed], [data-kt-mouse-speed]`));l.length||l.push(e);let u=l.map(e=>$(e,[`transform`,`willChange`]));l.forEach(e=>{e.style.willChange=`transform`});let d=0,f=0,p=!0,m=!1,h=null,g=l.map(()=>0),_=l.map(()=>0),v=()=>{p&&h==null&&(h=requestAnimationFrame(r))},y=n=>{let r=t.global?{left:0,top:0,width:window.innerWidth,height:window.innerHeight}:e.getBoundingClientRect();r.width&&r.height&&(d=((n.clientX-r.left)/r.width-.5)*2,f=((n.clientY-r.top)/r.height-.5)*2,v())},b=e=>{d=J((e.gamma||0)/30,-1,1),f=J((e.beta||0)/30,-1,1),v()};c?K().then(e=>{e&&!m&&window.addEventListener(`deviceorientation`,b,{passive:!0})}):s.addEventListener(`pointermove`,y,{passive:!0});let x=re();function r(e){if(h=null,!p)return;let n=Y(i,x.tick(e)),s=!1;l.forEach((e,r)=>{let i=Number(e.dataset.mpSpeed??e.dataset.ktMouseSpeed??t.speed??.05),c=d*a*i,l=f*o*i;g[r]=q(g[r],c,n),_[r]=q(_[r],l,n),(Math.abs(c-g[r])>.01||Math.abs(l-_[r])>.01)&&(s=!0),e.style.transform=`translate3d(${g[r]}px, ${_[r]}px, 0)`}),s&&(h=requestAnimationFrame(r))}return h=requestAnimationFrame(r),{el:e,type:`mouseParallax`,pause:()=>{p=!1,h!=null&&cancelAnimationFrame(h),h=null},resume:()=>{p||(p=!0,v())},destroy:()=>{p=!1,m=!0,h!=null&&cancelAnimationFrame(h),s.removeEventListener(`pointermove`,y),window.removeEventListener(`deviceorientation`,b),u.forEach(e=>e())}}},reduced(){},fallback(e,t){return this.create(e,{...t,gyro:!1})}},kn={fade:{opacity:0},"fade-up":{y:40,opacity:0},"fade-down":{y:-40,opacity:0},"fade-left":{x:-40,opacity:0},"fade-right":{x:40,opacity:0},"slide-up":{yPercent:100,opacity:0},"slide-down":{yPercent:-100,opacity:0},"slide-left":{xPercent:-100,opacity:0},"slide-right":{xPercent:100,opacity:0},"zoom-in":{scale:.78,opacity:0},"zoom-out":{scale:1.16,opacity:0},blur:{filter:`blur(20px)`,opacity:0},rise:{y:72,scale:.96,opacity:0},soft:{y:24,filter:`blur(8px)`,opacity:0},"flip-x":{rotationX:-80,transformPerspective:900,opacity:0},"flip-y":{rotationY:-80,transformPerspective:900,opacity:0},rotate:{rotate:-8,scale:.92,opacity:0},swing:{rotate:-12,x:-28,transformOrigin:`0% 0%`,opacity:0},skew:{skewY:7,y:28,opacity:0},mask:{clipPath:`inset(0 100% 0 0)`,opacity:1},wipe:{clipPath:`inset(100% 0 0 0)`,opacity:1}},An=new Set([`start`,`end`,`center`,`edges`,`random`]),jn=(e,t)=>t.stagger&&e.children.length?Array.from(e.children):[e];function Mn(e,t){let n=[...new Set([...t,e])].map(e=>xe(e,[`style`,`class`]));return()=>n.forEach(e=>e())}function Nn(e){return An.has(String(e))?String(e):`start`}function Pn(e,t,n){n=Nn(n);let r=Math.max(0,Number(t)||0),i=Math.max(0,e-1),a=i/2,o;if(n===`end`)o=e=>i-e;else if(n===`center`)o=e=>Math.abs(e-a);else if(n===`edges`)o=e=>a-Math.abs(e-a);else if(n===`random`){let t=Array.from({length:e},(e,t)=>t);for(let e=t.length-1;e>0;--e){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}o=e=>t[e]}else o=e=>e;return Array.from({length:e},(e,t)=>o(t)*r)}function Fn(e,t,n){let r=String(t.enterClass||t.activeClass||`is-inview`).split(/\s+/).filter(Boolean),i=String(t.leaveClass||``).split(/\s+/).filter(Boolean),[a,o]=n?[i,r]:[r,i];e.classList.remove(...a),e.classList.add(...o),t.onClassChange?.(n,e)}var In=(e,t)=>Fn(e,t,!0),Ln=(e,t)=>Fn(e,t,!1);function Rn(e,t,n,r,i,a,o=()=>e.getBoundingClientRect()){let s=!1,c=null,l=null,u=null,d=Number(t.threshold??(n?.2:.1)),f=String(t.rootMargin||(n?`0px`:`0px 0px -10% 0px`)).trim().split(/\s+/),p=()=>{if(c=null,s)return;let t=document.documentElement.clientWidth||window.innerWidth,n=document.documentElement.clientHeight||window.innerHeight,i=[0,1,2,3].map(e=>{let n=f[e]||f[e%2]||f[0];return Number.parseFloat(n)*(n.endsWith(`%`)?t/100:1)}),u=o(),p=-i[0],m=n+i[2],h=-i[3],g=t+i[1];for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t);if(!/(hidden|clip|auto|scroll)/.test(e.overflowX+e.overflowY))continue;let n=t.getBoundingClientRect(),r=t.offsetWidth?n.width/t.offsetWidth:1,i=t.offsetHeight?n.height/t.offsetHeight:1;e.overflowX!==`visible`&&(h=Math.max(h,n.left+t.clientLeft*r),g=Math.min(g,n.left+(t.clientLeft+t.clientWidth)*r)),e.overflowY!==`visible`&&(p=Math.max(p,n.top+t.clientTop*i),m=Math.min(m,n.top+(t.clientTop+t.clientHeight)*i))}let _=Math.max(0,Math.min(u.right,g)-Math.max(u.left,h))*Math.max(0,Math.min(u.bottom,m)-Math.max(u.top,p)),v=_>0&&_/(u.width*u.height)>=d;if(a){v&&a();return}let y=v?0:u.top>=(p+m-u.height)/2?1:-1,b=l;l=y,!(b==null&&y!==0||b===y)&&(b===-1?r(2):(b===1||b==null)&&r(0),!s&&(y===-1?r(1):y===1&&r(3)))},m=()=>{!s&&c==null&&(c=requestAnimationFrame(p))};return typeof IntersectionObserver<`u`?(u=new IntersectionObserver(m,{threshold:d,rootMargin:f.join(` `)}),u.observe(e)):a||r(0),i&&!a&&(document.addEventListener(`scroll`,m,{passive:!0,capture:!0}),window.addEventListener(`resize`,m,{passive:!0})),{disconnect(){s=!0,u?.disconnect(),c!=null&&cancelAnimationFrame(c),document.removeEventListener(`scroll`,m,!0),window.removeEventListener(`resize`,m)}}}function zn(e,t,n,r,i,a){let o=t.preset||`fade-up`,s=jn(e,t),c=Mn(e,s),l=t.once!==!1,u=!l||t.onEnter||t.onLeave||t.onEnterBack||t.onLeaveBack,d={time:0},f=!1,p=!1,m=!1,h=-1,g=1,_,v,y,b,x=null,S=null,C=null,w=null,T=null,E=()=>{x?.pause(),S!=null&&cancelAnimationFrame(S),S=C=null},D=()=>{f||s.forEach((e,r)=>{let s=J(b(J((d.time-v[r])/_,0,1)),0,1);if(e.style.opacity=!n&&!i&&s===0?`0`:`1`,o===`clock`){let n=s*360,r=t.clockDirection===`ccw`?`transparent 0deg ${360-n}deg, #000 ${360-n}deg`:`#000 ${n}deg, transparent ${n}deg`,i=s===1?`none`:`conic-gradient(from ${Number(t.startAngle??0)}deg, ${r})`;e.style.maskImage=e.style.webkitMaskImage=i}else{let t=s>=.998||!n&&s===0?`none`:a(1-s);e.style.clipPath=e.style.webkitClipPath=t}e.style.willChange=s>0&&s<1?i?`mask-image`:`clip-path`:``})},O=()=>{f||(D(),u||(T?.disconnect(),w?.kill()),t.onComplete?.(e))},k=e=>{S=null,!(f||p)&&(C!=null&&(d.time=J(d.time+(e-C)*g/1e3,0,y)),C=e,D(),(g>0?d.time0)?S=requestAnimationFrame(k):g>0&&O())},A=()=>{f||p||(n?g>0?x.play():x.reverse():S==null&&(g>0?d.time0)&&(C=null,S=requestAnimationFrame(k)))},j=()=>{E(),x?.kill(),_=Math.max(.05,Number(t.duration??(i?1.4:n?.8:.55)));let e=Number(t.delay??0);v=Pn(s.length,t.stagger,t.order).map(t=>t+(n&&!i?e:Math.max(0,e))),y=Math.max(.001,_+Math.max(...v));let r=t.enterEase??t.ease,a={ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]}[r||(i?`linear`:`ease`)]||String(r).match(/^cubic-bezier\(\s*([\d.+-]+)\s*,\s*([\d.+-]+)\s*,\s*([\d.+-]+)\s*,\s*([\d.+-]+)\s*\)$/)?.slice(1).map(Number);b=n?n.parseEase(r?H(r):i?`power1.inOut`:(t.spring??U.spring)===!0?`back.out(1.25)`:`power3.out`):a?B(...a):z(r),d.time=0,g=1,D(),n&&(x=n.to(d,{time:y,duration:y,ease:`none`,paused:!0,onUpdate:D,onComplete:O}))},M=n=>{if(!(f||h===n)){if(h=n,n%2==0&&(!m||!l)){if(m=!0,g=1,In(e,t),f)return;A()}[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack][n]?.(e),!(f||n%2==0||l)&&(t.removeClassOnLeave!==!1&&Ln(e,t),!f&&(g=-1,A()))}};return j(),r&&(w=r.create({trigger:e,start:t.start||`top 85%`,end:t.end,onEnter:()=>M(0),onLeave:()=>M(1),onEnterBack:()=>M(2),onLeaveBack:()=>M(3)})),T=Rn(e,t,i,M,u,r?()=>{m||M(0)}:null),{el:e,type:`reveal`,replay(n){f||(Object.assign(t,n||{}),j(),p=!1,m=!0,In(e,t),A())},pause(){p=!0,E()},resume(){p=!1,A()},destroy(){f=!0,E(),x?.kill(),w?.kill(),T?.disconnect(),c()}}}var Bn={defer:!0,create(e,t={},n){let r=n?.performance===`low`?null:Q(),i=r&&_e(),a=t.preset||`fade-up`,o=a.startsWith(`slide-`)?a.slice(6):null,s=t.direction||o||(a===`mask`?`right`:`up`),c=a.startsWith(`slide-`)&&[`up`,`down`,`left`,`right`].includes(s)?`slide-${s}`:a,l=t.classOnly===!0||a===`class`,u=t.once!==!1,d=e.getAttribute(`class`);if(l){let n=null,r=null,a=null,o=!1,s=!1,c=!1,l=()=>{o||s||(c=!0,In(e,t),o||t.onEnter?.(e))},f=()=>{o||s||t.removeClassOnLeave!==!1&&(Ln(e,t),o||t.onLeave?.(e))},p=()=>{!o&&s&&(s=!1,r?.enable?.(),(!u||!c)&&n?.observe?.(e))};return i?r=i.create({trigger:e,start:t.start||`top 85%`,end:t.end||`bottom 15%`,once:u,onEnter:l,onEnterBack:()=>{l(),o||t.onEnterBack?.(e)},onLeave:f,onLeaveBack:()=>{f(),o||t.onLeaveBack?.(e)}}):u?n=ye(e,l,{threshold:Number(t.threshold??.1),rootMargin:t.rootMargin||`0px 0px -10% 0px`}):typeof IntersectionObserver<`u`?(n=new IntersectionObserver(t=>ve(t,e)?.isIntersecting?l():f(),{threshold:Number(t.threshold??.1),rootMargin:t.rootMargin||`0px`}),n.observe(e)):l(),{el:e,type:`reveal`,replay(n){p(),!o&&(Object.assign(t,n||{}),a!=null&&cancelAnimationFrame(a),Ln(e,t),!o&&(a=requestAnimationFrame(()=>{a=null,l()})))},pause(){o||(s=!0,r?.disable?.(),n?.disconnect?.())},resume:p,destroy(){o=!0,a!=null&&cancelAnimationFrame(a),r?.kill?.(),n?.disconnect?.(),d==null?e.removeAttribute(`class`):e.setAttribute(`class`,d)}}}let f=a===`clock`,p=c===`wipe`||c===`mask`,m=e=>{let t=`${(Math.max(0,Math.min(1,e))*100).toFixed(2)}%`;return s===`down`?`inset(0px 0px ${t} 0px)`:s===`left`?`inset(0px 0px 0px ${t})`:s===`right`?`inset(0px ${t} 0px 0px)`:`inset(${t} 0px 0px 0px)`};if(f||p)return zn(e,t,f||i?r:null,i,f,m);let h=kn[c];if(h&&t.distance!=null&&t.distance!==``){let e=Math.max(0,Number(t.distance));Number.isFinite(e)&&(h={...h},`xPercent`in h&&(h.x=Math.sign(h.xPercent||1)*e,delete h.xPercent),`yPercent`in h&&(h.y=Math.sign(h.yPercent||1)*e,delete h.yPercent),`x`in h&&!(`xPercent`in kn[c])&&(h.x=Math.sign(h.x||1)*e),`y`in h&&!(`yPercent`in kn[c])&&(h.y=Math.sign(h.y||1)*e))}if(!h)return console.warn(`[Kineto/reveal] Unknown preset: ${a}`),null;if(!r||!i)return this.fallback(e,t,h);let g=jn(e,t),_=Mn(e,g),v=Math.max(0,Number(t.duration??.8)),y=t.enterEase??t.ease?H(t.enterEase??t.ease):(t.spring??U.spring)===!0?`back.out(1.25)`:`power3.out`,b=!1,x=(n=Number(t.delay??0))=>{let r=Pn(g.length,t.stagger,t.order);return{x:0,y:0,xPercent:0,yPercent:0,scale:1,rotation:0,rotationX:0,rotationY:0,skewX:0,skewY:0,opacity:1,filter:`blur(0px)`,duration:v,delay:n,ease:y,stagger:t.stagger?e=>r[e]:void 0,onStart:()=>In(e,t),onComplete:()=>{g.forEach(e=>{e.style.willChange=``}),t.onComplete?.(e)}}},S=null,C=null,w=()=>{S&&(C!==S&&C?.kill(),C=S)},T={...x(),scrollTrigger:{trigger:e,start:t.start||`top 85%`,end:t.end,toggleActions:u?`play none none none`:`play reverse play reverse`,onEnter:()=>{b||(w(),t.onEnter?.(e))},onLeave:()=>{b||(w(),t.onLeave?.(e),!b&&!u&&t.removeClassOnLeave!==!1&&Ln(e,t))},onEnterBack:()=>{b||(w(),In(e,t),b||t.onEnterBack?.(e))},onLeaveBack:()=>{b||(w(),t.onLeaveBack?.(e),!b&&!u&&t.removeClassOnLeave!==!1&&Ln(e,t))}}};g.forEach(e=>{e.style.willChange=`transform,opacity,filter,clip-path`}),S=r.fromTo(g,h,T),C=S;let E=(e=0)=>{b||(D?.disconnect(),D=null,u&&S.scrollTrigger?.disable(!1),S.pause(),C!==S&&C.kill(),C=r.fromTo(g,h,{...x(e),overwrite:`auto`}))},D=null;typeof IntersectionObserver<`u`&&(D=new IntersectionObserver(n=>{ve(n,e)?.isIntersecting&&(D.disconnect(),D=null,S.progress()===0&&E(Number(t.delay??0)))},{threshold:.12,rootMargin:`0px 0px -8% 0px`}),D.observe(e));let O=null;return{el:e,type:`reveal`,replay(e){Object.assign(t,e||{}),E()},pause(){C.paused()||(C.pause(),O=C)},resume(){O===C&&C.resume(),O=null},destroy(){b=!0,D?.disconnect(),S.scrollTrigger?.kill?.(),C.kill(),S.kill(),_()}}},reduced(e){let t=$(e,[`opacity`,`transform`,`filter`,`clipPath`]);return e.style.opacity=`1`,e.style.transform=`none`,e.style.filter=`none`,e.style.clipPath=`none`,{el:e,type:`reveal`,pause(){},resume(){},destroy:t}},fallback(e,t={},n=kn[`fade-up`]){if(n.performance===`low`)return this.create(e,t,n);let r=jn(e,t),i=Mn(e,r),a=String(n.opacity??0),o=Number(n.x??0),s=Number(n.y??0),c=Number(n.xPercent??0),l=Number(n.yPercent??0),u=Number(n.scale??1),d=Number(n.rotate??n.rotation??0),f=Number(n.rotationX??0),p=Number(n.rotationY??0),m=Number(n.skewX??0),h=Number(n.skewY??0),g=Number(n.transformPerspective??0),_=Math.max(0,Number(t.duration??.55)),v=t.once!==!1,y=!v||t.onEnter||t.onLeave||t.onEnterBack||t.onLeaveBack,b=[],x=!1,S=!1,C=!1,w=1,T=0,E=null,D=new Set,O=new Set,k=new Set,A=e=>{let t=requestAnimationFrame(()=>{k.delete(t),x||e()});k.add(t)},j=()=>{T++,D.forEach(e=>{e.onfinish=null,e.cancel()}),D.clear(),O.clear(),b.forEach(clearTimeout),b=[],k.forEach(cancelAnimationFrame),k.clear()},M=()=>{x||w<0||(y||E?.disconnect(),t.onComplete?.(e))},N=()=>{D.forEach(e=>{e.playbackRate=w;let t=e.effect.getComputedTiming().endTime;!S&&(w>0?e.currentTime0)&&e.play()})},P=[g?`perspective(${g}px)`:``,`translate3d(${o}px,${s}px,0)`,c||l?`translate(${c}%,${l}%)`:``,d?`rotate(${d}deg)`:``,f?`rotateX(${f}deg)`:``,p?`rotateY(${p}deg)`:``,m?`skewX(${m}deg)`:``,h?`skewY(${h}deg)`:``,u===1?``:`scale(${u})`].filter(Boolean).join(` `),F=[{opacity:a,transform:P,filter:n.filter||`none`},{opacity:`1`,transform:`none`,filter:`none`}],I=e=>{e.style.transition=`none`,e.style.opacity=a,e.style.transform=P,n.transformOrigin&&(e.style.transformOrigin=n.transformOrigin),n.filter&&(e.style.filter=n.filter)};r.forEach(I);let L=()=>{if(x)return;j();let n=T;C=!0,w=1;let i=Pn(r.length,t.stagger,t.order),a=Math.max(0,Number(t.delay??0)),o=i.indexOf(Math.max(...i));In(e,t),!(x||n!==T)&&r.forEach((e,t)=>{if(typeof e.animate==`function`){Object.assign(e.style,F[1]);let r=e.animate(F,{duration:_*1e3,delay:(a+i[t])*1e3,easing:`ease`,fill:v?`backwards`:`both`});D.add(r),O.add(r),S&&r.pause(),r.onfinish=()=>{x||n!==T||w<0||!O.delete(r)||(v&&(r.onfinish=null,D.delete(r)),O.size||M())};return}b.push(setTimeout(()=>A(()=>{e.style.transition=`opacity ${_}s ease,transform ${_}s ease,filter ${_}s ease`,Object.assign(e.style,F[1]),t===o&&b.push(setTimeout(()=>{M()},_*1e3))}),(a+i[t])*1e3))})};return E=Rn(e,t,!1,n=>{if(x||(n%2==0&&(!C||!v)&&(!C||!D.size?L():(w=1,D.forEach(e=>O.add(e)),In(e,t),x||N())),x))return;let i=T;[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack][n]?.(e),!(x||i!==T||n%2==0||v)&&(t.removeClassOnLeave!==!1&&Ln(e,t),!(x||i!==T)&&(w=-1,D.size?N():(j(),r.forEach(e=>{e.style.transition=`opacity ${_}s ease,transform ${_}s ease,filter ${_}s ease`,Object.assign(e.style,F[0])}))))},y,null,()=>{if(r[0]!==e)return e.getBoundingClientRect();let t=e.style.getPropertyValue(`transform`),n=e.style.getPropertyPriority(`transform`);e.style.setProperty(`transform`,`none`,`important`);let i=e.getBoundingClientRect();return t?e.style.setProperty(`transform`,t,n):e.style.removeProperty(`transform`),i}),{el:e,type:`reveal`,replay(e){x||(Object.assign(t,e||{}),S=!1,y||E.disconnect(),j(),r.forEach(I),A(L))},pause(){x||(S=!0,D.forEach(e=>e.pause()))},resume(){x||(S=!1,N())},destroy(){x=!0,E.disconnect(),j(),r.forEach(e=>e.getAttribute(`style`)),i()}}}};function Vn(e){return e.format?e.format:Z(e.separator)||(e.grouping===!0||e.comma===!0?`,`:``)}function Hn(e){return e.classList.add(`kt-counter-separator--blink`),null}function Un(e){let t=`var(--kt-counter-seam,${e.seamColor||`rgba(0,0,0,.5)`})`,n=e.shadow===!1||e.shadow===`none`?`none`:typeof e.shadow==`string`?e.shadow:`drop-shadow(0 2px 5px rgba(0,0,0,.3))`;return{seam:t,shadow:`var(--kt-counter-flip-shadow,${n})`,hasShadow:n!==`none`,separatorColor:e.separatorColor||``}}function Wn(e,t,n){if(!t)return;let r=document.createElement(`span`);r.className=n,r.textContent=t,e.appendChild(r)}function Gn(e,t,n=`kt-counter-char`){let r=document.createElement(`span`);return r.className=n,r.textContent=t,r.style.display=`inline-block`,e.appendChild(r),r}function Kn(e,t){let n=Number(t);if(t!=null&&Number.isFinite(n)&&n>0)return n;let r=getComputedStyle(e),i=Number.parseFloat(r.fontSize),a=String(r.lineHeight||``).trim(),o=Number.parseFloat(a);if(/px$/i.test(a)&&Number.isFinite(o)&&o>0)return o;if(Number.isFinite(i)&&i>0){if(/^\d*\.?\d+$/.test(a)&&o>0||/^\d*\.?\d+em$/i.test(a)&&o>0)return i*o;if(/^\d*\.?\d+%$/.test(a)&&o>0)return i*o/100}let s=document.createElement(`span`);s.textContent=`0`,s.setAttribute(`aria-hidden`,`true`),s.style.cssText=`position:absolute;visibility:hidden;pointer-events:none;display:inline-block;padding:0;border:0;line-height:inherit;`,e.appendChild(s);let c=s.getBoundingClientRect().height;return s.remove(),Number.isFinite(c)&&c>0?c:Number.isFinite(i)&&i>0?i*1.2:40}function qn(e,t,n=``){let r=`${Math.max(1,t)}px`;e.style.cssText=`${n}overflow:hidden;height:${r};max-height:${r};block-size:${r};max-block-size:${r};contain:paint;`}var Jn=e=>e.secondsOnly===!0||(e.mode||e.preset||e.style)===`clock`,Yn=20,Xn=250,Zn=1e3;function Qn(e,t){if(t.start===!1)return;let n=e.getBoundingClientRect();if(!(n.bottom>0&&n.topJn(e)?`pause`:null,create(e,t){let n=Q(),r=e.innerHTML,i=e.getAttribute(`style`),a=xe(e,[`aria-label`,`aria-live`]),o=t.secondsOnly===!0,s=o?`clock`:t.mode||t.preset||t.style||`slot`,c=Number(t.from??0),l=Number.parseFloat((e.textContent||``).replace(/[^0-9.-]/g,``)),u=Number(t.to??(Number.isFinite(l)?l:0)),d=Math.max(0,Number(t.duration??2)),f=Math.max(0,Number(t.decimals??0)),p=Z(t.prefix),m=Z(t.suffix),h={decimals:f,format:Vn(t),locale:t.locale},g=Ye(u,h),_=`${p}${g}${m}`,v=Qn(e,t),y=[],b=null,x=t=>{Array.from(e.children).forEach(e=>{e!==b?.node&&e.setAttribute(`aria-hidden`,`true`)}),b||=nt(e,t),b.attach(),b.set(t)},S=e=>(e&&y.push(e),e),C=()=>{y.forEach(e=>{e.scrollTrigger?.kill?.(),e.kill?.()}),y.length=0};if(s===`plain`){let r={value:c},i=()=>{e.textContent=`${p}${Ye(r.value,h)}${m}`};i(),n?S(n.to(r,{value:u,duration:d,delay:Number(t.delay??0),ease:t.ease||`power2.out`,onUpdate:i,onComplete:()=>t.onComplete?.(e),scrollTrigger:v})):(r.value=u,i(),t.onComplete?.(e))}else if(s===`digit`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`baseline`,Wn(e,p,`kt-counter-prefix`);let r=[];for(let t of g)/\d/.test(t)?r.push({node:Gn(e,`0`,`kt-counter-digit`),target:Number(t)}):Gn(e,t,`kt-counter-separator`);Wn(e,m,`kt-counter-suffix`),x(_);let i=Math.max(0,Number(t.loops??2)),a=Math.max(0,Number(t.stagger??.06));if(n){let o=n.timeline({delay:Number(t.delay??0),scrollTrigger:v,onComplete:()=>t.onComplete?.(e)});r.forEach(({node:e,target:n},r)=>{let s={value:0},c=i*10+n,l=-1;o.to(s,{value:c,duration:Math.max(.05,d+r*a),ease:t.ease||`none`,onUpdate:()=>{let t=Math.floor(s.value)%10;t!==l&&(l=t,e.textContent=String(t))},onComplete:()=>{e.textContent=String(n)}},0)}),S(o)}else r.forEach(({node:e,target:t})=>{e.textContent=String(t)}),t.onComplete?.(e)}else if(s===`pop`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`baseline`,Wn(e,p,`kt-counter-prefix`);let r=Array.from(g,t=>Gn(e,t,/\d/.test(t)?`kt-counter-digit kt-counter-pop-char`:`kt-counter-separator kt-counter-pop-char`));Wn(e,m,`kt-counter-suffix`),x(_);let i=t.popAlign||`bottom`,a=i===`top`?`50% 0%`:i===`center`?`50% 50%`:`50% 85%`,o=Math.max(1,Number(t.popScale??1.8)),s=Math.max(.1,d||.8),c=Math.min(.36,Math.max(.14,s*.38)),l=Math.max(.05,Number(t.popDuration??c)),u=r.length>1?Math.max(.025,(s-l)/(r.length-1)):0,f=Math.max(0,Number(t.stagger??u));if(n){let i=n.timeline({delay:Number(t.delay??0),scrollTrigger:v,onComplete:()=>t.onComplete?.(e)});i.set(r,{opacity:0,scale:o,transformOrigin:a}),r.forEach((e,n)=>{i.to(e,{opacity:1,scale:1,duration:l,ease:t.ease||`back.out(2.2)`,clearProps:`transform,opacity`},n*f)}),S(i)}else{r.forEach((e,t)=>{e.style.opacity=`0`,e.style.transformOrigin=a,e.style.transform=`scale(${o})`,e.style.transition=`opacity ${l}s ease ${t*f}s,transform ${l}s cubic-bezier(.2,.9,.3,1.25) ${t*f}s`});let n=requestAnimationFrame(()=>{r.forEach(e=>{e.style.opacity=`1`,e.style.transform=`scale(1)`})}),i=setTimeout(()=>t.onComplete?.(e),(l+f*r.length)*1e3);S({kill:()=>{cancelAnimationFrame(n),clearTimeout(i)}})}}else if(s===`flip`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`center`,e.style.gap=`${Math.max(0,Number(t.gap??3))}px`,Wn(e,p,`kt-counter-prefix`);let n=t.tileColor||`#191b20`,r=t.tileTextColor||`#f6f7fb`,i=Math.max(0,Number(t.tileRadius??6)),a=`1.24em`,o=Un(t),s=[],l=e=>`position:absolute;left:0;right:0;height:50%;overflow:hidden;${e?`top:0;border-radius:${i}px ${i}px 0 0`:`bottom:0;border-radius:0 0 ${i}px ${i}px`};background:${n};backface-visibility:hidden;`,f=e=>`position:absolute;left:0;width:100%;height:${a};line-height:${a};text-align:center;${e?`top:0`:`bottom:0`};color:${r};`,h=(e,t)=>{let n=document.createElement(`span`);n.setAttribute(`aria-hidden`,`true`),n.style.cssText=l(e)+(t?`transform-origin:50% ${e?`100%`:`0%`};will-change:transform;z-index:3;`:`z-index:1;`);let r=document.createElement(`span`);return r.style.cssText=f(e),r.textContent=`0`,n.appendChild(r),{half:n,glyph:r}},v=u>=c,y=g.replace(/\D/g,``).length,b=String(Math.round(Math.abs(c))).padStart(y,`0`).slice(-y),C=0;for(let t of g){if(!/\d/.test(t)){let n=document.createElement(`span`);n.className=`kt-counter-separator`,n.textContent=t,n.style.opacity=`.7`,e.appendChild(n);continue}let n=Number(b[C]||`0`);C+=1;let r=document.createElement(`span`);r.className=`kt-counter-flip-cell`,r.style.cssText=`display:inline-block;position:relative;width:1.34ch;height:${a};perspective:340px;${o.hasShadow?`filter:${o.shadow};`:``}`;let i=h(!0,!1),c=h(!1,!1),l=h(!0,!0),u=h(!1,!0);u.half.style.transform=`rotateX(90deg)`,r.append(i.half,c.half,l.half,u.half);let d=document.createElement(`span`);d.className=`kt-counter-seam`,d.setAttribute(`aria-hidden`,`true`),d.style.cssText=`position:absolute;left:0;right:0;top:50%;height:1px;margin-top:-0.5px;background:${o.seam};z-index:4;pointer-events:none;`,r.appendChild(d),e.appendChild(r),s.push({topStatic:i,bottomStatic:c,topFlap:l,bottomFlap:u,target:Number(t),start:n})}Wn(e,m,`kt-counter-suffix`),x(_);let w=Math.max(0,Number(t.loops??1)),T=new Set,E=!0,D=(e,t)=>{let n=setTimeout(()=>{T.delete(n),E&&e()},t);T.add(n)},O=(e,t)=>{e.topStatic.half.style.visibility=`visible`,e.bottomStatic.half.style.visibility=`visible`,e.topStatic.glyph.textContent=String(t),e.bottomStatic.glyph.textContent=String(t),e.topFlap.glyph.textContent=String(t),e.bottomFlap.glyph.textContent=String(t),e.topFlap.half.style.transform=`rotateX(0deg)`,e.bottomFlap.half.style.transform=`rotateX(90deg)`},k=e=>e.withFilter,A=(e,t,n,r,i=!0)=>{let a=Math.max(34,r/2);if(i){e.topStatic.glyph.textContent=String(n),e.bottomStatic.glyph.textContent=String(t),e.topFlap.glyph.textContent=String(t),e.bottomFlap.glyph.textContent=String(n),e.topFlap.half.style.transform=`rotateX(0deg)`,e.bottomFlap.half.style.transform=`rotateX(90deg)`,e.bottomStatic.half.style.visibility=`hidden`;let r=k({withFilter:[{transform:`rotateX(0deg)`,filter:`brightness(1)`},{transform:`rotateX(-90deg)`,filter:`brightness(.6)`}],plain:[{transform:`rotateX(0deg)`},{transform:`rotateX(-90deg)`}]}),i=k({withFilter:[{transform:`rotateX(90deg)`,filter:`brightness(.6)`},{transform:`rotateX(0deg)`,filter:`brightness(1)`}],plain:[{transform:`rotateX(90deg)`},{transform:`rotateX(0deg)`}]});e.topFlap.half.animate(r,{duration:a,easing:`cubic-bezier(.55,0,.85,.5)`,fill:`forwards`}),D(()=>{e.bottomFlap.half.animate(i,{duration:a,easing:`cubic-bezier(.15,.6,.3,1.15)`,fill:`forwards`}),D(()=>{e.bottomStatic.glyph.textContent=String(n),e.bottomStatic.half.style.visibility=`visible`},a)},a)}else{e.topStatic.glyph.textContent=String(t),e.bottomStatic.glyph.textContent=String(n),e.bottomFlap.glyph.textContent=String(t),e.topFlap.glyph.textContent=String(n),e.bottomFlap.half.style.transform=`rotateX(0deg)`,e.topFlap.half.style.transform=`rotateX(-90deg)`,e.topStatic.half.style.visibility=`hidden`;let r=k({withFilter:[{transform:`rotateX(0deg)`,filter:`brightness(1)`},{transform:`rotateX(90deg)`,filter:`brightness(.6)`}],plain:[{transform:`rotateX(0deg)`},{transform:`rotateX(90deg)`}]}),i=k({withFilter:[{transform:`rotateX(-90deg)`,filter:`brightness(.6)`},{transform:`rotateX(0deg)`,filter:`brightness(1)`}],plain:[{transform:`rotateX(-90deg)`},{transform:`rotateX(0deg)`}]});e.bottomFlap.half.animate(r,{duration:a,easing:`cubic-bezier(.55,0,.85,.5)`,fill:`forwards`}),D(()=>{e.topFlap.half.animate(i,{duration:a,easing:`cubic-bezier(.15,.6,.3,1.15)`,fill:`forwards`}),D(()=>{e.topStatic.glyph.textContent=String(n),e.topStatic.half.style.visibility=`visible`},a)},a)}},j=()=>{T.forEach(clearTimeout),T.clear(),E=!0;let n=Math.max(0,Number(t.stagger??.08))*1e3,r=0;s.forEach((i,a)=>{O(i,i.start);let o=v?((i.target-i.start)%10+10)%10:((i.start-i.target)%10+10)%10,s=w*10+o;if(s===0)return;r+=1;let c=Math.max(120,d*1e3/Math.max(1,s));for(let o=1;o<=s;o+=1){let l=o===s,u=v?(i.start+o-1)%10:((i.start-(o-1))%10+10)%10,d=v?(i.start+o)%10:((i.start-o)%10+10)%10;D(()=>{A(i,u,d,c,v),l&&(--r,r===0&&D(()=>t.onComplete?.(e),c))},a*n+(o-1)*c+Number(t.delay??0)*1e3)}})},M=e.getBoundingClientRect(),N=t.start===!1||M.bottom>0&&M.top{E=!1},resume:()=>{E=!0},kill:()=>{E=!1,T.forEach(clearTimeout),T.clear(),P?.disconnect()}})}else if(s===`clock`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`center`,e.setAttribute(`aria-live`,`off`);let n=Kn(e,t.lineHeight),r=t.seconds!==!1,i=Math.max(1,Math.round(Number(t.secondsDigits??3))),a=String(t.secondsLabel??`S`),s=t.hour12===!0,c=Z(t.clockSeparator,`:`),l=t.blink!==!1,u=t.clockStyle||`roll`,d=Math.max(80,Number(t.rollDuration??.28)*1e3),f=String(t.daysLabel??`d`),h=t.until?new Date(t.until):null,g=t.since?new Date(t.since):null,_=!1,v=e=>String(e).padStart(2,`0`),y=()=>{if(h||g){let n=h?h.getTime()-Date.now():Date.now()-g.getTime();if(h&&n<=0&&!_&&(_=!0,t.onComplete?.(e)),n=Math.max(0,n),o)return{text:`${String(Math.floor(n/1e3)).padStart(i,`0`)}${a}`,meridiem:``,days:null};let s=Math.floor(n/864e5),l=[v(Math.floor(n/36e5)%24),v(Math.floor(n/6e4)%60)];return r&&l.push(v(Math.floor(n/1e3)%60)),{text:l.join(c),meridiem:``,days:s}}let n=new Date;if(o)return{text:`${String(n.getSeconds()).padStart(i,`0`)}${a}`,meridiem:``,days:null};let l=n.getHours(),u=``;s&&(u=l>=12?`PM`:`AM`,l=l%12||12);let d=[v(l),v(n.getMinutes())];return r&&d.push(v(n.getSeconds())),{text:d.join(c),meridiem:u,days:null}},C=e=>{let t=document.createElement(`span`);t.className=`kt-counter-digit kt-counter-clock-digit`,qn(t,n,`display:inline-block;min-width:1ch;text-align:center;vertical-align:bottom;`);let r=document.createElement(`span`);r.style.cssText=`display:block;will-change:transform;`;let i=document.createElement(`span`);return i.style.cssText=`display:block;height:${n}px;line-height:${n}px;`,i.textContent=e,r.appendChild(i),t.appendChild(r),{viewport:t,stack:r,value:e}},w=Un(t),T=new Set,E=(e,t)=>{let n=setTimeout(()=>{T.delete(n),e()},t);T.add(n)},D=()=>{T.forEach(clearTimeout),T.clear()},O={tileColor:t.tileColor||`#191b20`,tileText:t.tileTextColor||`#f6f7fb`,radius:Math.max(0,Number(t.tileRadius??6))},k=e=>{let t=O,n=`1.24em`,r=e=>`position:absolute;left:0;right:0;height:50%;overflow:hidden;${e?`top:0;border-radius:${t.radius}px ${t.radius}px 0 0`:`bottom:0;border-radius:0 0 ${t.radius}px ${t.radius}px`};background:${t.tileColor};backface-visibility:hidden;`,i=e=>`position:absolute;left:0;width:100%;height:${n};line-height:${n};text-align:center;${e?`top:0`:`bottom:0`};color:${t.tileText};`,a=(t,n)=>{let a=document.createElement(`span`);a.setAttribute(`aria-hidden`,`true`),a.style.cssText=r(t)+(n?`transform-origin:50% ${t?`100%`:`0%`};will-change:transform;z-index:3;`:`z-index:1;`);let o=document.createElement(`span`);return o.style.cssText=i(t),o.textContent=e,a.appendChild(o),{half:a,glyph:o}},o=document.createElement(`span`);o.className=`kt-counter-digit kt-counter-clock-digit kt-counter-flip-cell`,o.style.cssText=`display:inline-block;position:relative;width:1.34ch;height:1.24em;perspective:340px;${w.hasShadow?`filter:${w.shadow};`:``}margin:0 1px;`;let s={topStatic:a(!0,!1),bottomStatic:a(!1,!1),topFlap:a(!0,!0),bottomFlap:a(!1,!0)};s.bottomFlap.half.style.transform=`rotateX(90deg)`,o.append(s.topStatic.half,s.bottomStatic.half,s.topFlap.half,s.bottomFlap.half);let c=document.createElement(`span`);return c.className=`kt-counter-seam`,c.setAttribute(`aria-hidden`,`true`),c.style.cssText=`position:absolute;left:0;right:0;top:50%;height:1px;margin-top:-0.5px;background:${w.seam};z-index:4;pointer-events:none;`,o.appendChild(c),{viewport:o,parts:s,value:e}},A=(e,t)=>{let n=e.value;e.value=t;let r=e.parts;if(!r.topFlap.half.animate){[r.topStatic,r.bottomStatic,r.topFlap,r.bottomFlap].forEach(e=>{e.glyph.textContent=t});return}let i=Math.max(40,d*1.5/2);r.topStatic.glyph.textContent=t,r.bottomStatic.glyph.textContent=n,r.topFlap.glyph.textContent=n,r.bottomFlap.glyph.textContent=t,r.topFlap.half.style.transform=`rotateX(0deg)`,r.bottomFlap.half.style.transform=`rotateX(90deg)`,r.bottomStatic.half.style.visibility=`hidden`;let a=[{transform:`rotateX(0deg)`,filter:`brightness(1)`},{transform:`rotateX(-90deg)`,filter:`brightness(.6)`}],o=[{transform:`rotateX(90deg)`,filter:`brightness(.6)`},{transform:`rotateX(0deg)`,filter:`brightness(1)`}];r.topFlap.half.animate(a,{duration:i,easing:`cubic-bezier(.55,0,.85,.5)`,fill:`forwards`}),E(()=>{r.bottomFlap.half.animate(o,{duration:i,easing:`cubic-bezier(.15,.6,.3,1.15)`,fill:`forwards`}),E(()=>{r.bottomStatic.glyph.textContent=t,r.bottomStatic.half.style.visibility=`visible`},i)},i)},j=[],M=null,N=null,P=``,F=new Set,I=e=>e!=null&&(e>0||t.showDays===!0),L=e=>`${I(e.days)?String(e.days).length:0}|${e.text.length}`,R=t=>{D(),F.forEach(e=>e.cancel()),F.clear(),e.innerHTML=``,j=[],M=null,N=null,Wn(e,p,`kt-counter-prefix`),I(t.days)&&(N=document.createElement(`span`),N.className=`kt-counter-days`,N.style.cssText=`margin-right:.5ch;`,N.textContent=`${t.days}${f}`,e.appendChild(N));for(let n of t.text)if(/\d/.test(n)){let t=u===`flip`?k(n):C(n);e.appendChild(t.viewport),j.push(t)}else{let t=Gn(e,n,`kt-counter-separator kt-counter-clock-separator`);if(l&&n===c){let e=Hn(t);e&&F.add(e)}j.push(null)}s&&!h&&!g&&(M=document.createElement(`span`),M.className=`kt-counter-suffix kt-counter-meridiem`,M.style.cssText=`margin-left:.4ch;font-size:.55em;opacity:.75;align-self:center;`,M.textContent=t.meridiem,e.appendChild(M)),Wn(e,m,`kt-counter-suffix`),x(B(t))},z=(e,r)=>{if(u===`flip`){A(e,r);return}e.value=r;let i=e.stack.firstChild;if(u===`instant`||!e.stack.animate){i.textContent=r;return}if(u===`fade`){e.stack.animate([{opacity:1},{opacity:0,offset:.45},{opacity:0,offset:.55},{opacity:1}],{duration:d,easing:`ease`}),E(()=>{i.textContent=r},d/2);return}let a=(t.rollDirection||(h?`down`:`up`))===`down`,o=document.createElement(`span`);if(o.style.cssText=`display:block;height:${n}px;line-height:${n}px;`,o.textContent=r,a)for(e.stack.insertBefore(o,e.stack.firstChild);e.stack.children.length>2;)e.stack.lastChild.remove();else for(e.stack.appendChild(o);e.stack.children.length>2;)e.stack.firstChild.remove();let s=e.stack.animate(a?[{transform:`translateY(-${n}px)`},{transform:`translateY(0)`}]:[{transform:`translateY(0)`},{transform:`translateY(-${n}px)`}],{duration:d,easing:`cubic-bezier(.3,.7,.25,1)`,fill:`forwards`});s.finished.catch(()=>{}).finally(()=>{e.stack.children.length>1&&(a?e.stack.lastChild.remove():e.stack.firstChild.remove()),s.cancel?.()})},B=e=>`${I(e.days)?`${e.days}${f} `:``}${e.text}${e.meridiem?` ${e.meridiem}`:``}`,V=e=>b.set(B(e)),H=y();P=L(H),R(H);let U=!0,ee=()=>{if(!U)return;let e=y(),t=L(e);if(t!==P)P=t,R(e);else{if(Array.from(e.text).forEach((e,t)=>{let n=j[t];n&&n.value!==e&&z(n,e)}),N){let t=`${e.days}${f}`;N.textContent!==t&&(N.textContent=t)}M&&M.textContent!==e.meridiem&&(M.textContent=e.meridiem)}V(e)},W=setInterval(ee,Xn),te=null,G=()=>{h&&!_&&(te=setTimeout(()=>{te=null,y()},Math.max(0,h.getTime()-Date.now())+Yn))},K=()=>{clearTimeout(te),te=null},q=()=>{K(),U||(U=!0,W=setInterval(ee,Xn))};S({kill:()=>{U=!1,clearInterval(W),D(),K(),F.forEach(e=>e.cancel())},pause:()=>{U=!1,clearInterval(W),K(),G(),F.forEach(e=>e.pause())},resume:()=>{q(),F.forEach(e=>e.play())},restart:q})}else{let r=Kn(e,t.lineHeight);e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`flex-end`,e.style.overflow=`hidden`,Wn(e,p,`kt-counter-prefix`);let i=g.replace(/\D/g,``).length,a=String(Math.round(Math.abs(c))).padStart(i,`0`).slice(-i),o=u>=c,s=[],l=0;for(let n of g){if(!/\d/.test(n)){Gn(e,n,`kt-counter-separator`);continue}let i=Number(n),c=Number(a[l]||`0`);l+=1;let u=Math.max(0,Number(t.loops??3+Math.floor(Math.random()*2))),d=(o?((i-c)%10+10)%10:((c-i)%10+10)%10)+u*10,f=document.createElement(`span`);f.className=`kt-counter-slot`,qn(f,r,`display:inline-block;vertical-align:bottom;`);let p=document.createElement(`span`);p.className=`kt-counter-reel`,p.style.cssText=`display:flex;flex-direction:column;will-change:transform;`;let m=[];for(let e=0;e<=d;e+=1)m.push(o?(c+e)%10:((c-e)%10+10)%10);o||m.reverse(),m.forEach(e=>{let t=document.createElement(`span`);t.textContent=String(e),t.style.cssText=`height:${r}px;line-height:${r}px;display:flex;align-items:center;justify-content:center;`,p.appendChild(t)}),f.appendChild(p),e.appendChild(f),s.push({reel:p,fromY:o?0:-(d*r),toY:o?-(d*r):0})}if(Wn(e,m,`kt-counter-suffix`),x(_),n){let r=n.timeline({delay:Number(t.delay??0),scrollTrigger:v,onComplete:()=>t.onComplete?.(e)});s.forEach(({reel:e,fromY:n,toY:i},a)=>{r.fromTo(e,{y:n},{y:i,duration:d+a*Number(t.stagger??.1),ease:t.ease||`power3.inOut`},0)}),S(r)}else s.forEach(({reel:e,toY:t})=>{e.style.transform=`translateY(${t}px)`}),t.onComplete?.(e)}t.separatorColor&&e.querySelectorAll(`.kt-counter-separator`).forEach(e=>{e.style.color=`var(--kt-counter-separator,${t.separatorColor})`}),t.blinkSeparators===!0&&s!==`clock`&&s!==`plain`&&e.querySelectorAll(`.kt-counter-separator`).forEach(e=>{let t=Hn(e);t&&S({kill:()=>t.cancel(),pause:()=>t.pause(),resume:()=>t.play()})});let w=new Set,T=e=>typeof e.paused==`function`;return{el:e,type:`counter`,replay:()=>y.forEach(e=>e.restart?.()),pause:()=>y.forEach(e=>{if(!T(e)){e.pause?.();return}e.paused()||(e.pause(),w.add(e))}),resume:()=>y.forEach(e=>{T(e)?w.delete(e)&&e.resume():e.resume?.()}),destroy:()=>{C(),b?.restore(),e.innerHTML=r,i==null?e.removeAttribute(`style`):e.setAttribute(`style`,i),a()}}},reduced(e,t){let n=e.innerHTML,r=e.getAttribute(`style`);if((t.secondsOnly===!0?`clock`:t.mode||t.preset||t.style||`slot`)===`clock`){let i=Z(t.clockSeparator,`:`),a=t.seconds!==!1,o=t.hour12===!0,s=t=>{e.textContent!==t&&(e.textContent=t)},c=()=>{let e=e=>String(e).padStart(2,`0`),n=t.secondsOnly===!0;if(t.until||t.since){let r=t.until?new Date(t.until):new Date(t.since),o=Math.max(0,t.until?r.getTime()-Date.now():Date.now()-r.getTime());if(n){let e=Math.max(1,Math.round(Number(t.secondsDigits??3)));s(`${String(Math.floor(o/1e3)).padStart(e,`0`)}${String(t.secondsLabel??`S`)}`);return}let c=Math.floor(o/864e5),l=[e(Math.floor(o/36e5)%24),e(Math.floor(o/6e4)%60)];a&&l.push(e(Math.floor(o/1e3)%60));let u=c>0||t.showDays===!0?`${c}${t.daysLabel??`d`} `:``;s(`${Z(t.prefix)}${u}${l.join(i)}${Z(t.suffix)}`);return}let r=new Date;if(n){let e=Math.max(1,Math.round(Number(t.secondsDigits??3)));s(`${String(r.getSeconds()).padStart(e,`0`)}${String(t.secondsLabel??`S`)}`);return}let c=r.getHours(),l=``;o&&(l=c>=12?` PM`:` AM`,c=c%12||12);let u=[e(c),e(r.getMinutes())];a&&u.push(e(r.getSeconds())),s(`${Z(t.prefix)}${u.join(i)}${l}${Z(t.suffix)}`)};c();let l=setInterval(c,Zn);return{el:e,type:`counter`,pause(){clearInterval(l),l=null},resume(){l??=(c(),setInterval(c,Zn))},destroy(){clearInterval(l),e.innerHTML=n,r==null?e.removeAttribute(`style`):e.setAttribute(`style`,r)}}}let i=Math.max(0,Number(t.decimals??0)),a=Number.parseFloat((e.textContent||``).replace(/[^0-9.-]/g,``)),o=Number(t.to??(Number.isFinite(a)?a:0)),s=Vn(t);return e.textContent=`${Z(t.prefix)}${Ye(o,{decimals:i,format:s,locale:t.locale})}${Z(t.suffix)}`,{el:e,type:`counter`,pause(){},resume(){},destroy(){e.innerHTML=n,r==null?e.removeAttribute(`style`):e.setAttribute(`style`,r)}}}};function er(e,t=``){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e;if(typeof e==`number`&&Number.isFinite(e))return new Date(e<0xe8d4a51000?e*1e3:e);let n=String(e??``).trim();if(!n)return null;if(/^\d{10,13}$/.test(n))return er(Number(n),t);let r=/^ko(?:-|$)/i.test(String(t)),i=(e,t,n)=>{let r=new Date(Date.UTC(Number(e),Number(t)-1,Number(n)));return r.getUTCFullYear()===Number(e)&&r.getUTCMonth()===Number(t)-1&&r.getUTCDate()===Number(n)},a=(e=`0`,t=`0`,n=`0`,r=`0`)=>{let i=Number(e),a=Number(t),o=Number(n),s=String(r),c=Number(s.slice(0,3).padEnd(3,`0`));return/^\d+$/.test(s)&&Number.isInteger(i)&&i>=0&&i<=23&&Number.isInteger(a)&&a>=0&&a<=59&&Number.isInteger(o)&&o>=0&&o<=59&&Number.isInteger(c)&&c>=0&&c<=999},o=(e=`0`)=>{let t=String(e);return/^\d+$/.test(t)?t.slice(0,3).padEnd(3,`0`):null},s=e=>{if(!e)return``;if(String(e).toUpperCase()===`Z`)return`Z`;let t=String(e).match(/^([+-])(\d{2}):?(\d{2})$/);return!t||Number(t[2])>23||Number(t[3])>59?null:`${t[1]}${t[2]}:${t[3]}`},c=n.match(/^(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})(?:(?:[T\s]+)(\d{1,2})(?::?(\d{2}))?(?::?(\d{2})(?:\.(\d+))?)?\s*(Z|[+-]\d{2}:?\d{2})?)?$/i);if(c){let[,e,t,n,l,u=`0`,d=`0`,f=`0`,p]=c;if(!i(e,t,n))return null;let m=s(p);if(p&&!m)return null;if(l===void 0){if(p)return null;let i=r?new Date(`${e}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}T00:00:00.000+09:00`):new Date(`${e}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}`);return Number.isNaN(i.getTime())?null:i}if(!a(l,u,d,f))return null;let h=m||(r?`+09:00`:``),g=o(f);if(!g)return null;let _=`${e}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}T${String(l).padStart(2,`0`)}:${String(u).padStart(2,`0`)}:${String(d).padStart(2,`0`)}.${g}${h}`,v=new Date(_);return Number.isNaN(v.getTime())?null:v}let l=new Date(n);if(!Number.isNaN(l.getTime())&&(/^\d{4}-\d{2}-\d{2}(?:$|[T\s])/.test(n)||/^[A-Za-z]{3},\s/.test(n)))return l;let u=n.match(/^(\d{4})(\d{2})(\d{2})(?:(\d{2})(\d{2})(\d{2})(?:\.(\d{1,3}))?)?$/);if(u){let[,e,t,n,o=`0`,s=`0`,c=`0`,l=`0`]=u;if(!i(e,t,n)||!a(o,s,c,l))return null;let d=`${e}-${t}-${n}T${o.padStart(2,`0`)}:${s.padStart(2,`0`)}:${c.padStart(2,`0`)}.${l.padEnd(3,`0`)}${r?`+09:00`:``}`,f=new Date(d);return Number.isNaN(f.getTime())?null:f}let d=n.match(/^(\d{4})\s*년\s*(\d{1,2})\s*월\s*(\d{1,2})\s*일(?:\s*(\d{1,2})\s*시)?(?:\s*(\d{1,2})\s*분)?(?:\s*(\d{1,2})\s*초)?$/);if(d){let[,e,t,n,r=`0`,o=`0`,s=`0`]=d;if(!i(e,t,n)||!a(r,o,s))return null;let c=new Date(`${e}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}T${r.padStart(2,`0`)}:${o.padStart(2,`0`)}:${s.padStart(2,`0`)}+09:00`);return Number.isNaN(c.getTime())?null:c}let f=n.match(/^(\d{4})\s*년\s*(\d{1,2})\s*월\s*(\d{1,2})\s*일(?:\s+(\d{1,2})(?::(\d{2})(?::(\d{2}))?)?)?$/);if(f){let[,e,t,n,r=`0`,o=`0`,s=`0`]=f;if(!i(e,t,n)||!a(r,o,s))return null;let c=new Date(`${e}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}T${r.padStart(2,`0`)}:${o.padStart(2,`0`)}:${s.padStart(2,`0`)}+09:00`);return Number.isNaN(c.getTime())?null:c}let p=n.match(/^(\d{1,2})[./-](\d{1,2})[./-](\d{4})(?:[ T](\d{1,2}):?(\d{2})?(?::?(\d{2})(?:\.(\d+))?)?\s*(Z|[+-]\d{2}:?\d{2})?)?$/i);if(p){let[,e,n,c,l,u,d,f=`0`,m]=p,h=l??`0`,g=u??`0`,_=d??`0`,v=Number(e),y=Number(n),b=/^en-US(?:-|$)/i.test(String(t)),x=v>12?y:y>12||b?v:y,S=v>12?v:y>12||b?y:v,C=s(m);if(m&&!C)return null;if(x>=1&&x<=12&&S>=1&&S<=31&&i(c,x,S)&&a(h,g,_,f)){if(r||C){let e=o(f);if(!e)return null;let t=C||`+09:00`;return new Date(`${c}-${String(x).padStart(2,`0`)}-${String(S).padStart(2,`0`)}T${String(h).padStart(2,`0`)}:${String(g).padStart(2,`0`)}:${String(_).padStart(2,`0`)}.${e}${t}`)}return new Date(Number(c),x-1,S,Number(h),Number(g),Number(_),Number(o(f)))}}let m=n.replace(/\./g,`-`).replace(/\//g,`-`),h=new Date(m);return Number.isNaN(h.getTime())?null:h}var tr=[[`year`,315576e5],[`month`,26298e5],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4],[`second`,1e3]];function nr(e,t,n){let r=String(n.relativeUnit||`auto`),[i,a]=tr.find(([e])=>e===r)||tr.find(([,t])=>Math.abs(e)>=t)||tr.at(-1),o=e/a,s=String(n.relativeRounding||`round`),c=s===`floor`?Math.floor(o):s===`ceil`?Math.ceil(o):s===`trunc`?Math.trunc(o):Math.round(o);return new Intl.RelativeTimeFormat(t||void 0,{numeric:n.numeric||`auto`,style:n.relativeStyle||`long`}).format(c,i)}function rr(e,t){let n=Number(t.relativeCutoff??0);if(!Number.isFinite(n)||n<=0)return!1;let r=tr.find(([e])=>e===String(t.relativeCutoffUnit||`day`));return!!r&&Math.abs(e)>=n*r[1]}var ir={create(e,t){let n=e.innerHTML,r=e.getAttribute(`style`),i=xe(e,[`aria-label`,`aria-live`,`datetime`]),a=t.locale||document.documentElement.lang||void 0,o=er(t.value??t.date??t.datetime??t.source??e.getAttribute(`datetime`)??e.textContent,a),s=t.mode||t.preset||`relative`,c=Math.max(1e3,Number(t.updateInterval??3e4)),l=()=>{if(!o){e.textContent=t.fallback||n||``;return}let r=t.now?new Date(t.now).getTime():Date.now(),i=o.getTime()-r,c=nr(i,a,t),l=new Intl.DateTimeFormat(a,{dateStyle:t.dateStyle||`medium`,timeStyle:t.timeStyle||void 0,timeZone:t.timeZone||void 0}).format(o);e.textContent=s===`absolute`?l:s===`both`?`${c} · ${l}`:rr(i,t)?l:c,e.setAttribute(`datetime`,o.toISOString()),e.setAttribute(`aria-label`,e.textContent)};e.setAttribute(`aria-live`,`off`),l();let u=s===`absolute`||t.live===!1?null:setInterval(l,c);return{el:e,type:`dateTime`,render:l,destroy(){u&&clearInterval(u),e.innerHTML=n,r==null?e.removeAttribute(`style`):e.setAttribute(`style`,r),i()}}},reduced(e,t){return this.create(e,t)}},ar=[0,2,3,1],or=e=>{let t=e.length,n=[];for(let r=0;r{let t=[[0]];for(;t.length{let t=e.length,n=t*t;return e.map(e=>e.map(e=>(e+.5)/n))},ur=Object.freeze({"2x2":lr(sr(2)),"4x4":lr(sr(4)),"8x8":lr(sr(8)),"16x16":lr(sr(16)),cluster:lr(cr)}),dr=(e,t,n)=>{let r=52.9829189*(.06711056*(e+n*1.7)+.00583715*(t+n));return r-Math.floor(r)},fr=Object.freeze([`8x8`,`4x4`,`2x2`,`16x16`,`cluster`,`noise`,`random`,`floyd-steinberg`,`atkinson`]),pr=Object.freeze([`dot`,`square`,`line`,`cross`,`diamond`,`ring`,`triangle`]),mr=`@%#*+=-:. `;function hr(e){let t=(Number(e)||2654435769)>>>0;return()=>{t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}var gr=256,_r=`#010203`,vr=new Map,yr=/^var\(\s*(--[\w-]+)\s*(?:,\s*([\s\S]+?)\s*)?\)$/;function br(e,t=null){let n=String(e??``).trim(),r=yr.exec(n);if(!r)return n;if(typeof window>`u`||typeof getComputedStyle!=`function`)return r[2]||``;let i=(t&&t.nodeType===1?t:null)||(typeof document<`u`?document.documentElement:null);return i?getComputedStyle(i).getPropertyValue(r[1]).trim()||r[2]||``:r[2]||``}function xr(e,t=[0,0,0],n=null){let r=br(e,n);if(!r)return t;if(vr.has(r))return vr.get(r);let i=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):null;if(!i)return t;let a=t;if(i.fillStyle=_r,i.fillStyle=r,i.fillStyle!==_r||r.toLowerCase()===_r){i.fillRect(0,0,1,1);let[e,t,n]=i.getImageData(0,0,1,1).data;a=[e,t,n]}return vr.size>=gr&&vr.clear(),vr.set(r,a),a}var Sr=(e,t,n)=>e+(t-e)*n,Cr=(e,t,n)=>(.2126*e+.7152*t+.0722*n)/255;function wr(e,t,n,r){let i=Math.max(n/e,r/t),a=Math.min(e,n/i),o=Math.min(t,r/i);return{sx:(e-a)/2,sy:(t-o)/2,sw:a,sh:o}}function Tr(e){return e?e.videoWidth||e.videoHeight?{width:e.videoWidth,height:e.videoHeight}:e.naturalWidth||e.naturalHeight?{width:e.naturalWidth,height:e.naturalHeight}:{width:e.width||0,height:e.height||0}:{width:0,height:0}}function Er(e,t,n,r){let i=e*374761393+t*668265263+n*2246822519+r|0;return i=Math.imul(i^i>>>13,1274126177),((i^i>>>16)>>>0)/4294967296}function Dr(e,t,n,r){let i=Math.max(3,n),a=e=>e*e*(3-2*e),o=e/i,s=t/i,c=Math.floor(o),l=Math.floor(s),u=a(o-c),d=a(s-l),f=Er(c,l,0,r)*(1-u)+Er(c+1,l,0,r)*u,p=Er(c,l+1,0,r)*(1-u)+Er(c+1,l+1,0,r)*u;return J((f*(1-d)+p*d)*.82+Er(e,t,0,r)*.18,0,1)}var Or=Object.freeze([`none`,`drift`,`shuffle`,`scan`,`flow`,`pulse`]),kr=Object.freeze([`none`,`lens`,`spotlight`,`ripple`]);function Ar(e,t={}){return{style:e,originalColors:t.originalColors===!0,paper:xr(t.paperColor,[244,241,234],t.scope),ink:xr(t.inkColor,[17,17,17],t.scope),accent:t.accentColor?xr(t.accentColor,[0,0,0],t.scope):null,colorSteps:J(Math.round(Number(t.colorSteps??(e===`dither`?2:4))),2,8),inverted:t.inverted===!0,seed:t.seed,type:fr.includes(t.type)?t.type:`8x8`,shape:pr.includes(t.shape)?t.shape:`dot`,angle:X(t.angle,0,0,90),chars:typeof t.chars==`string`&&t.chars.length>=2?t.chars:mr,font:t.font||`ui-monospace, "SF Mono", Menlo, Consolas, monospace`,contrast:X(t.contrast,1,0,3),brightness:X(t.brightness,0,-1,1),...jr(t)}}function jr(e={}){return{motion:Or.includes(e.motion)?e.motion:`none`,motionSpeed:X(e.motionSpeed,1,.05,6),motionAmount:X(e.motionAmount,.5,0,1),pointer:kr.includes(e.pointer)?e.pointer:`none`,pointerRadius:X(e.pointerRadius,140,10,1200),pointerStrength:X(e.pointerStrength,.6,0,1),pointerCellSize:X(e.pointerCellSize,0,0,64)}}var Mr=Object.freeze([`motion`,`motionSpeed`,`motionAmount`,`pointer`,`pointerRadius`,`pointerStrength`,`pointerCellSize`]);function Nr(e,t,{maxDpr:n=2}={}){let r=e.getContext(`2d`,{alpha:!0,desynchronized:!0}),i=document.createElement(`canvas`),a=i.getContext(`2d`,{alpha:!0,willReadFrequently:!0}),o=(Number(t.seed)||2654435769)|0,s=hr(t.seed),c=0,l=0,u=1,d=null,f=t.type===`floyd-steinberg`?[[1,0,7/16],[-1,1,3/16],[0,1,5/16],[1,1,1/16]]:t.type===`atkinson`?[[1,0,1/8],[2,0,1/8],[-1,1,1/8],[0,1,1/8],[1,1,1/8],[0,2,1/8]]:null,p=t.type===`atkinson`?3:2,m=(t,i)=>{u=J(typeof window<`u`&&window.devicePixelRatio||1,1,n),c=Math.max(1,Math.round(Math.max(1,t)*u)),l=Math.max(1,Math.round(Math.max(1,i)*u)),(e.width!==c||e.height!==l)&&(e.width=c,e.height=l),r.setTransform(1,0,0,1,0,0)},h=(e,t,n=0,r=0)=>{let{width:o,height:s}=Tr(e);if(!o||!s)return null;let u=n!==0||r!==0,d=Math.max(1,Math.ceil(c/t)+ +!!u),f=Math.max(1,Math.ceil(l/t)+ +!!u);(i.width!==d||i.height!==f)&&(i.width=d,i.height=f);let p=wr(o,s,c,l),m=d*t/c,h=f*t/l;a.imageSmoothingEnabled=!0,a.clearRect(0,0,d,f);try{a.drawImage(e,p.sx,p.sy,p.sw*m,p.sh*h,0,0,d,f);let i=a.getImageData(0,0,d,f);return{cols:d,rows:f,cell:t,originX:-n,originY:-r,imageData:i,data:i.data}}catch{return null}},g=(e,t)=>Math.round(e*(t-1))/(t-1),_=(e,n,r=null)=>{if(t.originalColors){let e=t.colorSteps;return n.map(t=>{let n=t/255*(e-1);if(r==null)return Math.round(g(t/255,e)*255);let i=Math.floor(n);return Math.round(J((i+ +(n-i>r))/(e-1),0,1)*255)})}let i=t.paper,a=t.ink;return t.accent&&e>0&&e<1&&(e<.5?(a=t.accent,e*=2):(i=t.accent,e=e*2-1)),[Sr(i[0],a[0],e),Sr(i[1],a[1],e),Sr(i[2],a[2],e)]},v=([e,t,n])=>`rgb(${Math.round(e)},${Math.round(t)},${Math.round(n)})`,y=e=>J((e-.5)*t.contrast+.5+t.brightness,0,1),b=(e,n)=>{let r=y(Cr(e[n],e[n+1],e[n+2])),i=e[n+3]/255;return J((t.inverted?r:1-r)*i,0,1)},x=(e,n,r,i)=>{let{motion:a,motionAmount:s,motionSpeed:c}=t,l=(r||0)/1e3,d=Math.floor(l*c*18),f=l*c,p=Math.max(1,e.rows*.12),m=(f*.45%1.3-.15)*e.rows,h=a===`pulse`?Math.sin(f*2.2)*.22*s:0,g=a===`drift`?Math.floor(f*3.1):0,_=a===`drift`?Math.floor(f*2.3):0,v=a===`drift`?(e,t)=>Math.sin(e*.21+t*.16-f*2.6)*.05*s:null,y=a===`drift`?f*5:0,b=i&&i.active?i.x:null,x=i&&i.active?i.y:null,S=t.pointerRadius*u,C=t.pointerStrength,w=t.pointer!==`none`&&b!=null;return{pulse:h,noisePhase:y,falloff(e,t){if(!w)return 1;let n=Math.hypot(e-b,t-x)/S;return n>=1?1:n*n*(3-2*n)},driftX:g,driftY:_,inkShift(e,r,i,u){let f=h;if(v&&(f+=v(e,r)),a===`shuffle`&&Er(e,r,d,o^20973)0){if(t.pointer===`spotlight`)f+=e*C*.7;else if(t.pointer===`ripple`){let t=Math.sin(Math.hypot(i-b,u-x)/(n*2)-l*4*c);f+=e*t*C*.5}}}return f},thresholdShift(e,t){return a===`drift`?(Er(e,t,d,o^40503)-.5)*.14*s:a===`shuffle`&&Er(e,t,d,o^20973){let{cols:o,rows:c,cell:l,data:u,originX:m,originY:h}=e,v=t.colorSteps,y=ur[t.type],x=t.originalColors?3:1,S=o*x;if(f){let e=S*p;!d||d.length!==e?d=new Float32Array(e):d.fill(0)}let C=(e,t,n,r)=>{for(let[i,a,s]of f){let l=e+i;l>=0&&lo))/(v-1),0,1))}}u[i]=p[0],u[i+1]=p[1],u[i+2]=p[2],u[i+3]=255}f&&(d.copyWithin(0,S),d.fill(0,-S))}a.putImageData(e.imageData,0,0),r.imageSmoothingEnabled=!1,r.drawImage(i,0,0,o,c,m,h,o*l,c*l)},C={square(e,t,n,r,i){let a=r*Math.sqrt(i);e.fillRect(t-a/2,n-a/2,a,a)},line(e,t,n,r,i){let a=Math.max(.5,r*i);e.fillRect(t-r/2,n-a/2,r,a)},cross(e,t,n,r,i){let a=r*Math.sqrt(i),o=Math.max(.5,a*.36);e.fillRect(t-a/2,n-o/2,a,o),e.fillRect(t-o/2,n-a/2,o,a)},diamond(e,t,n,r,i){let a=r/2*Math.sqrt(i)*1.35;e.beginPath(),e.moveTo(t,n-a),e.lineTo(t+a,n),e.lineTo(t,n+a),e.lineTo(t-a,n),e.closePath(),e.fill()},ring(e,t,n,r,i){let a=r/2*Math.sqrt(i),o=Math.max(.5,a*(1-i*.85));e.beginPath(),e.arc(t,n,Math.max(o/2,a-o/2),0,Math.PI*2),e.lineWidth=o,e.strokeStyle=e.fillStyle,e.stroke()},triangle(e,t,n,r,i){let a=r/2*Math.sqrt(i)*1.5;e.beginPath(),e.moveTo(t,n-a),e.lineTo(t+a*.866,n+a*.5),e.lineTo(t-a*.866,n+a*.5),e.closePath(),e.fill()},dot(e,t,n,r,i){e.beginPath(),e.arc(t,n,r/2*Math.sqrt(i),0,Math.PI*2),e.fill()}},w={dither:S,halftone:(e,n)=>{let{cols:i,rows:a,cell:o,data:s,originX:u,originY:d}=e;r.fillStyle=v(t.paper),r.fillRect(0,0,c,l);let f=C[t.shape]||C.dot;t.originalColors||(r.fillStyle=v(t.ink));let p=(e,t,r,o)=>{let c=(J(t,0,a-1)*i+J(e,0,i-1))*4;return{index:c,ink:J(b(s,c)+n.inkShift(e,t,r,o),0,1)}},m=(e,n,i,a)=>{let{index:c,ink:l}=p(e,n,i,a);l<=.02||(t.originalColors&&(r.fillStyle=v(_(l,[s[c],s[c+1],s[c+2]]))),f(r,i,a,o,l))};if(!t.angle){for(let e=0;ec+o||r>l+o||m(Math.floor((n-u)/o),Math.floor((r-d)/o),n,r)}},ascii:(e,n)=>{let{cols:i,rows:a,cell:o,data:s,originX:u,originY:d}=e,f=t.chars;r.fillStyle=v(t.paper),r.fillRect(0,0,c,l),r.font=`${Math.max(4,o*1.15)}px ${t.font}`,r.textAlign=`center`,r.textBaseline=`middle`,t.originalColors||(r.fillStyle=v(t.ink));for(let e=0;ee.classList?.contains(t)))}function Ir(e,{className:t=`kt-lazy-wrap`,display:n,aspectRatio:r,height:i}={}){let a=e.parentElement,o=!1,s=a?.getAttribute(`style`)??null;Fr(a)||(a=document.createElement(`span`),a.className=t,e.parentNode?.insertBefore(a,e),a.appendChild(e),o=!0,a.style.position=`relative`),a.style.overflow=`hidden`,a.style.display=n||`block`,a.style.lineHeight=`0`,a.style.width=`100%`;let c=r||e.getAttribute(`data-aspect-ratio`),l=Number(e.getAttribute(`width`)),u=Number(e.getAttribute(`height`));c?a.style.aspectRatio=String(c).replace(`:`,` / `):l>0&&u>0&&(a.style.aspectRatio=`${l} / ${u}`),i&&(a.style.height=typeof i==`number`?`${i}px`:String(i));let d=!c&&!(l>0&&u>0)&&!i,f=()=>({parentHeight:o&&a.parentElement?.getBoundingClientRect().height||0,ownHeight:a.getBoundingClientRect().height}),p=({parentHeight:e,ownHeight:t})=>{o&&e>2?a.style.height=`100%`:t<2&&(a.style.aspectRatio=`16 / 9`)},m=null,h=()=>{if(typeof ResizeObserver>`u`){p(f());return}m=new ResizeObserver(()=>{a.isConnected&&a.getClientRects().length&&(m.disconnect(),m=null,p(f()))}),m.observe(a)},g=Ge(()=>({position:o?`relative`:getComputedStyle(a).position,radius:getComputedStyle(e).borderRadius,drawn:d&&a.getClientRects().length>0,box:d?f():null}),({position:e,radius:t,drawn:n,box:r})=>{a.isConnected&&(e===`static`&&(a.style.position=`relative`),t&&t!==`0px`&&(a.style.borderRadius=t),d&&(n?p(r):h()))});return{wrapper:a,created:o,originalWrapperStyle:s,cancel:()=>{g(),m?.disconnect(),m=null}}}function Lr(e,{wrapper:t,created:n,originalWrapperStyle:r,cancel:i}){i?.(),n&&t.parentNode?(t.parentNode.insertBefore(e,t),t.remove()):n||(r==null?t.removeAttribute(`style`):t.setAttribute(`style`,r))}function Rr(e,t,n=2){let r=document.createElement(`span`);return r.className=t,r.setAttribute(`aria-hidden`,`true`),r.style.cssText=`position:absolute;inset:0;z-index:${n};display:block;overflow:hidden;pointer-events:none;border-radius:inherit;`,e.appendChild(r),r}var zr=Object.freeze([`dither`,`ascii`,`halftone`]),Br=new Set(zr),Vr={dither:6,ascii:12,halftone:8},Hr={dither:2,ascii:5,halftone:3},Ur=.7,Wr=Object.freeze([`shrink`,`dissolve`,`wipe`]),Gr=/\.(?:gif|apng|webp)(?:$|[?#])/i;function Kr(e){let t={x:0,y:0,active:!1},n=n=>{let r=e.getBoundingClientRect();t.x=n.clientX-r.left,t.y=n.clientY-r.top,t.active=!0},r=()=>{t.active=!1};return e.addEventListener(`pointermove`,n,{passive:!0}),e.addEventListener(`pointerdown`,n,{passive:!0}),e.addEventListener(`pointerleave`,r,{passive:!0}),{state:t,destroy(){e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerdown`,n),e.removeEventListener(`pointerleave`,r)}}}function qr(e){return Br.has(e)}function Jr(e,t){let n=Number(e??t);return Number.isFinite(n)?n<=30?n*1e3:n:t*1e3}function Yr(e,t,n){let r=J(e/Ur,0,1),i=J((e-Ur)/.30000000000000004,0,1);return{cell:t*(n/t)**+r,layerOpacity:1-i}}function Xr(e,t={},{lowTier:n=!1,persistFps:r=24,revealFps:i=24,maxDpr:a=2}={}){if(!Br.has(e))return null;let o=t.persist===!0,s=J(Number(t.cellSize??Vr[e]),2,64),c={scope:t.scope,paperColor:t.paperColor,inkColor:t.inkColor,accentColor:t.accentColor,originalColors:t.originalColors===!0,colorSteps:t.colorSteps,inverted:t.inverted===!0,seed:t.seed,contrast:t.contrast,brightness:t.brightness,motion:t.motion,motionSpeed:t.motionSpeed,motionAmount:t.motionAmount,pointer:t.pointer,pointerRadius:t.pointerRadius,pointerStrength:t.pointerStrength,pointerCellSize:t.pointerCellSize};e===`dither`&&(c.type=t.ditherType),e===`ascii`&&(c.chars=t.asciiChars,c.font=t.asciiFont),e===`halftone`&&(c.shape=t.halftoneShape,c.angle=t.halftoneAngle);let l=Ar(e,c),u=l.motion!==`none`||l.pointer!==`none`,d=t.renderFps??(o?r:i);return{persist:o,live:u,startCell:s,handoffCell:Math.min(s,Hr[e]),transition:Wr.includes(t.transition)?t.transition:`shrink`,styleConfig:l,fps:J(Number(d),4,n?12:60),maxDpr:J(Number(t.maxDpr??a),.5,4),ease:z(t.ease||`cubic-out`)}}function Zr(e,t={},n=null){return n?n.setLiveLook(t):Object.assign(e.styleConfig,jr({...e.styleConfig,...t})),e.live=e.styleConfig.motion!==`none`||e.styleConfig.pointer!==`none`,e.live}function Qr(e,t,n=`kt-stylize`){let r=Rr(e,`${n}-${t}-layer ${n}-stylized-layer`,3),i=document.createElement(`canvas`);return i.className=`${n}-${t}-canvas ${n}-stylized-canvas`,i.style.cssText=`position:absolute;inset:0;width:100%;height:100%;display:block;`,r.appendChild(i),{layer:r,canvas:i}}function $r({el:e,wrapper:t,effect:n,settings:r,prefix:i=`kt-stylize`,drawable:a=()=>e,animatedSource:o=!1,durationMs:s=1600,delayMs:c=60,holdMs:l=0,onProgress:u,onFinish:d,onRendered:f}){let{persist:p,startCell:m,handoffCell:h,transition:g,styleConfig:_,fps:v,maxDpr:y,ease:b}=r,{layer:x,canvas:S}=Qr(t,n,i),C=Nr(S,_,{maxDpr:y}),w=1e3/v,T=r.live,E=_.pointer===`none`?null:Kr(t),D=()=>{_.pointer===`none`?(E?.destroy(),E=null):E||=Kr(t)},O=null,k=null,A=!1,j=!1,M=!1,N=!0,P=0,F=null,I=null,L=!1,R=null,z=-1/0,B=0,V=null,H=()=>M&&!A&&!j&&!document.hidden,U=()=>{H()&&F&&O==null&&(O=requestAnimationFrame(e=>{O=null,H()&&F?.(e)}))},ee=()=>{if(!H()||!I||I.id!=null)return;let e=I;e.at=performance.now(),e.id=setTimeout(()=>{e.id=null,e.remaining=0,H()&&I===e&&(I=null,e.callback())},e.remaining)},W=(e,t)=>{I={callback:e,remaining:Math.max(0,Number(t)||0),id:null,at:0},ee()},te=e=>(V!=null&&(B+=e-V),V=e,B),G=(e,n=B)=>{let r=t.getBoundingClientRect();return C.sync(r.width,r.height),C.render(a(),e,{time:n,pointer:E?.state})},K=()=>{O!=null&&cancelAnimationFrame(O),O=null,V=null,I?.id!=null&&(clearTimeout(I.id),I.remaining=Math.max(0,I.remaining-(performance.now()-I.at)),I.id=null)},q=()=>{K(),I=null,F=null,k?.disconnect(),k=null,L=!1},ne=()=>{let t=P,n=G(m);f?.(n),!(A||t!==P)&&(u?.(1,e),!(A||t!==P)&&n&&X())},Y=e=>{let t=te(e);e-z>=w&&(G(m,t),z=e),U()},re=()=>{k||typeof ResizeObserver>`u`||(k=new ResizeObserver(()=>{A||(H()?G(m):L=!0)}),k.observe(t))};function X(){if(o||T){k?.disconnect(),k=null,F||(F=Y,U());return}F===Y&&(K(),F=null),re()}let ie=()=>{let t=t=>{let n=P,r=te(t);R??=r;let i=J((r-R)/s,0,1);if(t-z>=w||i>=1){let a=J(b(i),0,1),o;if(g===`shrink`){let{cell:e,layerOpacity:t}=Yr(a,m,h);o=G(e,r),x.style.opacity=String(t)}else o=G(m,r),o&&C.mask(a,g,m);if(!o&&z===-1/0){F=null,d?.();return}if(u?.(i,e),A||n!==P)return;z=t}i<1?U():(F=null,W(()=>d?.(),l))};G(m),W(()=>{F=t,U()},c)},ae=()=>{H()&&(N&&(N=!1,p?ne():ie()),L&&(L=!1,G(m)),ee(),U())},oe=()=>{document.hidden?K():ae()};return document.addEventListener(`visibilitychange`,oe),{layer:x,canvas:S,renderer:C,get persist(){return p},setLiveLook(e={}){A||(C.configure(e),T=C.live,D(),p&&M&&X(),p&&M&&!F&&H()&&G(m))},start(){A||M||(M=!0,ae())},pause(){j=!0,K()},resume(){j=!1,ae()},replay(){A||(q(),P++,M=!1,N=!0,R=null,z=-1/0,x.style.opacity=`1`,x.isConnected||t.appendChild(x),this.start())},destroy(){A||(A=!0,q(),document.removeEventListener(`visibilitychange`,oe),E?.destroy(),C.destroy(),x.remove())}}}function ei({el:e,wrapper:t,effect:n,settings:r,prefix:i=`kt-stylize`,durationMs:a=1600,delayMs:o=0,holdMs:s=0,onProgress:c,onFinish:l}){let{persist:u,startCell:d,handoffCell:f,transition:p,styleConfig:m,fps:h,maxDpr:g,ease:_}=r,{layer:v,canvas:y}=Qr(t,n,i),b=Nr(y,m,{maxDpr:g}),x=1e3/h,S=m.pointer===`none`?null:Kr(t),C=null,w=!1,T=!1,E=!1,D=!1,O=0,k=null,A=0,j=-1/0,M=0,N=(n,r=M)=>{if(e.readyState<2)return!1;let i=t.getBoundingClientRect();return b.sync(i.width,i.height),b.render(e,n,{time:r,pointer:S?.state})},P=()=>E&&!w&&!T&&!document.hidden&&!e.paused&&!e.ended&&!D&&e.readyState>=2,F=()=>{C!=null&&cancelAnimationFrame(C),C=null,k=null},I=()=>{P()&&C==null&&(C=requestAnimationFrame(R))},L=()=>{D=!0,F(),v.remove(),l?.()},R=t=>{if(C=null,!P()){k=null;return}if(k!=null&&(O+=t-k),k=t,t-j=o+a+s?L():I())},z=()=>{w||D||(E=!0,I())},B=()=>{document.hidden?F():I()},V=[`pause`,`ended`,`waiting`];return e.addEventListener(`playing`,I),V.forEach(t=>e.addEventListener(t,F)),document.addEventListener(`visibilitychange`,B),{layer:v,canvas:y,renderer:b,get persist(){return u},setLiveLook(e={}){w||(b.configure(e),m.pointer===`none`?(S?.destroy(),S=null):S||=Kr(t),E&&!P()&&N(d))},start:z,pause(){T=!0,F()},resume(){T=!1,I()},replay(){w||(F(),A++,O=0,D=!1,j=-1/0,v.style.opacity=`1`,v.isConnected||t.appendChild(v),z())},destroy(){w||(w=!0,F(),e.removeEventListener(`playing`,I),V.forEach(t=>e.removeEventListener(t,F)),document.removeEventListener(`visibilitychange`,B),S?.destroy(),b.destroy(),v.remove())}}}var ti=`stylize`;function ni(e){return{display:e.display,aspectRatio:e.aspectRatio,height:e.height}}function ri(e,t={}){return t.src||e.dataset.src||e.getAttribute(`data-src`)||e.currentSrc||e.getAttribute(`src`)||``}function ii(e,t,n){let r=Math.max(1,Math.min(t||300,n||200)),i=e=>e<=1?Math.max(1,Math.round(1/Math.max(.004,e))):Math.round(e);if(Array.isArray(e.steps)&&e.steps.length){let t=e.steps.map(Number).filter(e=>Number.isFinite(e)&&e>0).map(i);if(t.length)return t.sort((e,t)=>t-e)}let a=Math.max(2,Math.round(Number(e.pixelStepCount??e.stepCount??8))),o=e.pixelStart!=null||e.pixelEnd!=null,s=o?J(i(J(Number(e.pixelStart??.035),.004,1)),2,200):J(Math.round(r/6),20,96),c=o?i(J(Number(e.pixelEnd??1),.01,1)):1,l=[];for(let e=0;e=l[l.length-1]&&(r=Math.max(c,l[l.length-1]-1)),l.push(r)}return l[l.length-1]=c,l}function ai(e){return e.length>1&&e[e.length-1]<=1?e.slice(0,-1):e.length?e:[2]}function oi(e,t,n={}){let r=document.createElement(`img`);r.className=`kt-lazy-live-image`,r.alt=``,r.setAttribute(`aria-hidden`,`true`),r.loading=`eager`,r.decoding=`async`,n.crossOrigin&&(r.crossOrigin=n.crossOrigin);let i=n.srcset||t.getAttribute(`data-srcset`)||t.getAttribute(`srcset`),a=n.sizes||t.getAttribute(`sizes`);return i&&(r.srcset=i),a&&(r.sizes=a),r.src=e,r.style.cssText=`display:block;width:100%;height:100%;object-fit:${n.objectFit||`cover`};object-position:${n.objectPosition||`50% 50%`};border-radius:inherit;`,r}function si(e,t,n=4){let r=document.createElement(`canvas`);r.className=`kt-lazy-noise`,r.setAttribute(`aria-hidden`,`true`),r.width=Math.max(32,Number(t.noiseWidth??320)),r.height=Math.max(18,Number(t.noiseHeight??180)),r.style.cssText=`position:absolute;inset:0;width:100%;height:100%;z-index:${n};pointer-events:none;mix-blend-mode:${t.noiseBlend||`overlay`};opacity:0;border-radius:inherit;`,e.appendChild(r);let i=r.getContext(`2d`,{alpha:!0}),a=0,o=0,s=1e3/J(Number(t.noiseFps??30),4,60);return{canvas:r,draw:(e=performance.now())=>{if(!i||e-a{let a=new Image;a.decoding=`async`,n.crossOrigin&&(a.crossOrigin=n.crossOrigin);let o=n.srcset||t.getAttribute(`data-srcset`)||t.getAttribute(`srcset`);o&&(a.srcset=o),a.onload=()=>r(a),a.onerror=()=>i(Error(`Kineto lazy image failed to load: ${e}`)),a.src=e,a.complete&&a.naturalWidth&&r(a)})}function ui(e,t={}){let n={style:e.getAttribute(`style`),src:e.getAttribute(`src`),preload:e.getAttribute(`preload`)},r=Array.from(e.querySelectorAll(`source`)),i=t.src||e.dataset.src||e.getAttribute(`data-src`)||``,a=Math.max(0,Number(t.duration??.6))*1e3,o=t.ease||`cubic-bezier(.22,.8,.3,1)`,s=t.once!==!1,c=t.autoplay!==!1;t.muted!==!1&&(e.muted=!0,e.setAttribute(`muted`,``)),t.loop!==!1&&(e.loop=!0),t.playsinline!==!1&&e.setAttribute(`playsinline`,``),e.preload=t.preload||`none`,e.style.opacity=`0`,e.style.transition=`opacity ${a}ms ${o}`,e.style.willChange=`opacity`;let l=!1,u=!1,d=null,f=()=>{if(l)return;l=!0;let t=!1;r.forEach(e=>{let n=e.dataset.src||e.getAttribute(`data-src`);n&&(e.src=n,t=!0)}),i&&(e.src=i,t=!0),t&&e.load()},p=()=>{if(!u){if(e.style.opacity=`1`,c){let t=e.play?.();t&&typeof t.catch==`function`&&t.catch(()=>{})}t.onReveal?.(e)}},m=()=>{f(),e.readyState>=2?p():e.addEventListener(`loadeddata`,p,{once:!0})};return s?d=ye(e,m,{threshold:Number(t.threshold??.15),rootMargin:t.rootMargin||`200px 0px`}):typeof IntersectionObserver<`u`?(d=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?m():l&&e.pause?.()})},{threshold:Number(t.threshold??.15),rootMargin:t.rootMargin||`0px`}),d.observe(e)):m(),{el:e,type:`lazy`,get animatedMedia(){return!0},replay(){l=!1,e.style.opacity=`0`,m()},pause(){e.pause?.()},resume(){if(l&&c){let t=e.play?.();t&&typeof t.catch==`function`&&t.catch(()=>{})}},destroy(){u=!0,d?.disconnect?.(),e.pause?.(),e.removeEventListener(`loadeddata`,p);let t=(t,n)=>n==null?e.removeAttribute(t):e.setAttribute(t,n);t(`style`,n.style),t(`src`,n.src),t(`preload`,n.preload)}}}function di(e,t,n=null){let r={scope:n};return(e===`dither`||e===`ascii`||e===`halftone`)&&(r.persist=t.persist,r.cellSize=t.cellSize,r.paperColor=t.paperColor,r.inkColor=t.inkColor,r.accentColor=t.accentColor,r.originalColors=t.originalColors,r.colorSteps=t.colorSteps,r.inverted=t.inverted,r.seed=t.seed,r.renderFps=t.renderFps,r.maxDpr=t.maxDpr,r.ease=t.ease),e===`dither`&&(r.ditherType=t.ditherType),e===`ascii`&&(r.asciiChars=t.asciiChars,r.asciiFont=t.asciiFont),e===`halftone`&&(r.halftoneShape=t.halftoneShape,r.halftoneAngle=t.halftoneAngle),r}function fi(e,t,n,r=null){pi(r,n);let i=r?.performance===`low`,a=Ir(e,ni(t)),{wrapper:o}=a,s=e.getAttribute(`style`);e.style.display=`block`,e.style.width=`100%`,e.style.height=`100%`,e.style.objectFit=t.objectFit||`cover`;let c=ei({el:e,wrapper:o,effect:n,settings:Xr(n,di(n,t,e),{lowTier:i,persistFps:24,revealFps:24,maxDpr:1.5}),prefix:`kt-lazy`,durationMs:Math.max(120,Jr(t.duration,1.6)),onProgress:(e,n)=>t.onProgress?.(e,n)}),l=ui(e,{...t,onReveal:e=>{t.onReveal?.(e),c.start()}});return{el:e,type:`lazy`,get animatedMedia(){return!0},replay(){l.replay(),c.replay()},pause(){c.pause(),l.pause()},resume(){c.resume(),l.resume()},destroy(){c.destroy(),l.destroy(),Lr(e,a),s==null?e.removeAttribute(`style`):e.setAttribute(`style`,s)}}}function pi(e,t){let n=e?.diagnostics,r=e?.diagnosticCodes?.DEPRECATED;if(n&&r)try{n.emit(n.create({code:r,module:`lazy`,phase:`create`,recoverable:!0,detail:{variant:t,replacement:`data-kt-${ti}="${t}"`,removal:`next major`}}))}catch{}}var mi={create(e,t={},n=null){if(e.tagName===`VIDEO`){let r=t.preset||t.effect||`fade`;return qr(r)?fi(e,t,r,n):ui(e,t)}let r=t.preset||t.effect||`fade`,i=r===`noise`?`dissolve`:r===`zoom`?`blur-up`:r,a=ri(e,t);if(!a)return null;let o={style:e.getAttribute(`style`),src:e.getAttribute(`src`),srcset:e.getAttribute(`srcset`),sizes:e.getAttribute(`sizes`),loading:e.getAttribute(`loading`),decoding:e.getAttribute(`decoding`)},s=Ir(e,ni(t)),{wrapper:c}=s;qr(i)&&pi(n,i),e.loading=t.nativeLazy===!1?`eager`:`lazy`,e.decoding=`async`,e.style.display=`block`,e.style.width=`100%`,e.style.height=`100%`,e.style.objectFit=t.objectFit||`cover`,e.style.objectPosition=t.objectPosition||`50% 50%`;let l=[],u=new Set,d=null,f=null,p=!1,m=!1,h=!1,g=0,_=null,v=null,y=0,b=n?.performance===`low`,x=(e,t)=>{let n=setTimeout(()=>{u.delete(n),p||e()},Math.max(0,Number(t)||0));return u.add(n),n},S=new Set,C=e=>{let t=requestAnimationFrame(()=>{S.delete(t),p||e()});return S.add(t),t},w=()=>{S.forEach(e=>cancelAnimationFrame(e)),S.clear()},T=()=>{l.splice(0).forEach(e=>e.remove()),_?.canvas.remove(),_=null,v?.destroy(),v=null},E=()=>{let n=t.srcset||e.getAttribute(`data-srcset`);n&&(e.srcset=n),t.sizes&&(e.sizes=t.sizes),e.loading=`eager`,e.src=a,e.style.opacity=`1`,e.style.filter=`none`,e.style.transform=`none`,e.style.clipPath=`none`,e.style.maskImage=`none`,e.style.webkitMaskImage=`none`},D=()=>{E(),T(),t.onProgress?.(1,e),t.onLoad?.(e)},O=()=>{let n=t.skeletonVariant||t.variant||`shimmer`,r=Rr(c,`kt-lazy-skeleton kt-lazy-skeleton-${n}`,5),i=t.skeletonColor||`color-mix(in srgb, currentColor 9%, transparent)`,a=t.skeletonHighlight||`rgba(255,255,255,.45)`,o=Math.max(.3,Number(t.skeletonSpeed??1.5));if(r.style.backgroundColor=i,n===`pulse`?r.style.animation=`kt-skeleton-pulse ${o}s ease-in-out infinite`:(r.style.backgroundImage=`linear-gradient(${Number(t.skeletonAngle??100)}deg,transparent 32%,${a} 50%,transparent 68%)`,r.style.backgroundSize=`250% 100%`,r.style.animation=`kt-shimmer ${o}s cubic-bezier(.4,.2,.6,.8) infinite`),t.skeletonIcon!==!1){let e=document.createElement(`span`);e.className=`kt-lazy-skeleton-icon`,e.setAttribute(`aria-hidden`,`true`),e.innerHTML=``,r.appendChild(e)}return l.push(r),e.style.opacity=`0`,r},k=()=>{let e=++g;return()=>!p&&e===g},A=async()=>{if(h||p)return;h=!0;let n=k(),r=performance.now(),s;try{s=await li(a,e,t)}catch(r){if(!n())return;T(),t.fallbackSrc?e.src=t.fallbackSrc:o.src==null?e.removeAttribute(`src`):e.setAttribute(`src`,o.src),e.style.opacity=`1`,t.onError?.(r,e);return}let u=Math.max(0,Number(t.minDuration??0))-(performance.now()-r);if(u>0&&await new Promise(e=>x(e,u)),n()){if(i===`skeleton`){let n=l[0]||O();E();let r=Math.max(0,Number(t.fadeDuration??t.duration??.45));e.style.transform=`scale(1.015)`,e.style.transition=`opacity ${r}s ease, transform ${Math.max(r,.5)}s cubic-bezier(.22,.8,.3,1)`,n.style.animation=`none`,n.style.transition=`opacity ${Math.min(Math.max(r*.5,.18),.32)}s ease`,C(()=>{e.style.opacity=`1`,e.style.transform=`scale(1)`,n.style.opacity=`0`}),x(T,r*1e3+60),t.onLoad?.(e,s);return}if(i===`fade`){e.src=a,e.style.transition=`none`,e.style.opacity=`0`,e.offsetWidth,e.style.transition=`opacity ${Math.max(0,Number(t.duration??.7))}s ${t.ease||`ease`}`,C(()=>{e.style.opacity=`1`}),t.onLoad?.(e,s);return}if(i===`blur-up`){e.src=a,e.style.transition=`none`,e.style.opacity=`1`,e.style.filter=`blur(${Math.max(0,Number(t.blur??18))}px)`,e.style.transform=`scale(${Math.max(1,Number(t.startScale??1.06))})`;let n=Math.max(0,Number(t.duration??.85));e.offsetWidth,C(()=>{e.style.transition=`filter ${n}s ease,transform ${n}s cubic-bezier(.22,.8,.3,1)`,e.style.filter=`blur(0px)`,e.style.transform=`scale(1)`}),t.onLoad?.(e,s);return}if(i===`polaroid`){e.src=a;let n=t.frame!==!1,r=null;if(n){r=Rr(c,`kt-lazy-polaroid-frame`,6);let e=`clamp(6px, 4.5%, 18px)`;r.style.cssText+=`border:${e} solid ${t.frameColor||`#fbfaf7`};border-bottom-width:calc(${e} * 3.2);box-shadow:inset 0 0 8px rgba(0,0,0,.12);`,l.push(r)}let i=Math.max(.2,Number(t.duration??2.4));e.style.transition=`none`,e.style.opacity=`1`,e.style.filter=`brightness(2.1) saturate(.05) contrast(.72) sepia(.28) blur(7px)`,e.style.transform=`rotate(${Number(t.rotate??-2)}deg) scale(.965)`,c.style.transition=`none`,e.offsetWidth,C(()=>C(()=>{e.style.transition=`filter ${i}s cubic-bezier(.3,.1,.25,1),transform ${Math.min(i,1.1)}s cubic-bezier(.34,1.4,.44,1)`,e.style.filter=`none`,e.style.transform=`none`})),x(()=>{t.keepFrame===!0?(E(),t.onLoad?.(e,s)):D()},i*1e3+120);return}if(i===`crt`){e.src=a;let n=Math.max(.3,Number(t.duration??1.1));e.style.opacity=`1`,e.style.transformOrigin=`center`,e.style.willChange=`transform, filter, opacity`,e.style.animation=`kt-lazy-crt ${n}s cubic-bezier(.2,.7,.2,1) both`;let r=Rr(c,`kt-lazy-crt-beam`,7);r.style.cssText+=`pointer-events:none;top:50%;bottom:auto;height:2px;transform:translateY(-50%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.85) 16%,#fff 50%,rgba(255,255,255,.85) 84%,transparent);box-shadow:0 0 12px 2px rgba(255,255,255,.5);animation:kt-lazy-crt-beam ${n}s ease-out both;`,l.push(r);let i=Rr(c,`kt-lazy-crt-bloom`,8);if(i.style.cssText+=`pointer-events:none;background:#fff;animation:kt-lazy-crt-bloom ${n}s ease-out both;`,l.push(i),t.frame!==!1){let e=Rr(c,`kt-lazy-crt-scan`,5);e.style.cssText+=`pointer-events:none;background:repeating-linear-gradient(to bottom,rgba(0,0,0,.09) 0,rgba(0,0,0,.09) 1px,transparent 1px,transparent 3px);mix-blend-mode:multiply;opacity:0;animation:kt-lazy-crt-scan ${n}s ease both;`,l.push(e);let t=Rr(c,`kt-lazy-crt-roll`,6);t.style.cssText+=`pointer-events:none;top:0;bottom:auto;height:60%;background:linear-gradient(to bottom,transparent 0%,rgba(0,0,0,.18) 35%,rgba(0,0,0,.28) 50%,rgba(0,0,0,.18) 65%,transparent 100%);filter:blur(3px);animation:kt-lazy-crt-roll ${n}s linear both;`,l.push(t)}x(()=>{e.style.animation=``,e.style.willChange=``,D()},n*1e3+160);return}if(i===`data-mosaic`||i===`rgb-slice-burst`){let n=Math.max(.1,Number(t.duration??1.1));e.src=a,e.style.opacity=`1`;let r=Rr(c,`kt-lazy-${i}-layer`,3);r.style.cssText+=`;overflow:hidden`;let o=c.getBoundingClientRect(),s=o.width||e.naturalWidth||300,l=o.height||e.naturalHeight||200,u=y;y+=1;let d=((Math.floor(Number(t.seed??20260729))||1)>>>0)+Math.imul(u,2654435761)>>>0,f=()=>{d=d+1831565813>>>0;let e=d;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296},p=(e,t)=>e+f()*(t-e);if(i===`data-mosaic`){let e=Math.max(8,Number(t.tileMax??44)),i=Math.max(3,Number(t.tileMin??8)),a=String(t.skeletonColor||`#0a0908`),o=[],c=(t,n,u)=>{if(t>=s||n>=l)return;if(u/2>=i&&f()<.68){let e=u/2;c(t,n,e),c(t+e,n,e),c(t,n+e,e),c(t+e,n+e,e);return}let d=Math.ceil(Math.min(u,s-t)),p=Math.ceil(Math.min(u,l-n));if(d<=0||p<=0)return;let m=document.createElement(`span`);m.style.cssText=`position:absolute;left:${t}px;top:${n}px;width:${d}px;height:${p}px;background:${a}`,r.appendChild(m),o.push({tile:m,weight:f()*.66+u/e*.34})};for(let t=0;te.weight-t.weight),o.forEach((e,t)=>{let r=t/Math.max(1,o.length-1);x(()=>{e.tile.style.transition=`opacity 90ms linear`,e.tile.style.opacity=`0`},r*n*1e3)}),x(()=>{r.remove(),D()},n*1e3+200)}else{let e=Array.isArray(t.colors)&&t.colors.length>=3?t.colors:[`#ff2020`,`#20ff40`,`#2060ff`],i=Math.round(p(4,7)),o=Math.max(6,s*.05),c=Array.from({length:i*2},(e,t)=>t);for(let e=c.length-1;e>0;--e){let t=Math.floor(f()*(e+1)),n=c[e];c[e]=c[t],c[t]=n}for(let t=0;t{r.remove(),D()},n*1e3+200)}return}if(i===`wave`||i===`grain`){e.src=a,e.style.opacity=`1`;let n=Math.max(120,Jr(t.duration,i===`wave`?1.35:1.1)),r=Math.max(0,Number(t.delay??60)),o=J(Number(t.maxDpr??1.5),.5,2),u=1e3/J(Number(t.renderFps??(i===`wave`?30:24)),4,60),d=z(t.ease||`cubic-out`),h=J(Number(t.grain??t.noise??(i===`wave`?.13:.3)),0,1),g=Rr(c,`kt-lazy-${i}-layer`,3),v=document.createElement(`canvas`);v.className=`kt-lazy-${i}-canvas`,g.appendChild(v),l.push(g);let y=v.getContext(`2d`,{alpha:!0,desynchronized:!0});_=si(c,t,4),_.canvas.classList.add(`kt-lazy-grain-canvas`);let b=null,S=null,C=-1/0,w=0,T=0,E=1,O=()=>{let e=c.getBoundingClientRect();w=Math.max(1,e.width),T=Math.max(1,e.height),E=J(window.devicePixelRatio||1,1,o);let t=Math.max(1,Math.round(w*E)),n=Math.max(1,Math.round(T*E));(v.width!==t||v.height!==n)&&(v.width=t,v.height=n),y.setTransform(E,0,0,E,0,0)},k=(n,r)=>{let a=e.complete&&e.naturalWidth?e:s;if(!a.naturalWidth)return;let o=wr(a.naturalWidth,a.naturalHeight,w,T);if(y.clearRect(0,0,w,T),i===`grain`)y.drawImage(a,o.sx,o.sy,o.sw,o.sh,0,0,w,T);else{let e=Math.max(0,Number(t.waveAmplitude??22))*(1-n),i=Math.max(.001,Number(t.waveFrequency??.035)),s=Number(t.waveSpeed??.012),c=Math.max(1,Math.round(Number(t.waveSliceHeight??2)));for(let t=0;t{if(p)return;if(m){S??=r,f=requestAnimationFrame(A);return}S!=null&&b!=null&&(b+=r-S,S=null),b??=r;let i=J((r-b)/n,0,1),a=J(d(i),0,1);(r-C>=u||i>=1)&&(O(),k(a,r),_.draw(r),_.canvas.style.opacity=String(h*(1-a)**1.15),g.style.opacity=String(Math.max(0,1-a)),t.onProgress?.(i,e),C=r),i<1?f=requestAnimationFrame(A):D()};x(()=>{f=requestAnimationFrame(A)},r);return}if(i===`pixelate`){e.src=a,e.style.opacity=`1`;let n=Rr(c,`kt-lazy-pixelate-layer`,3),r=document.createElement(`canvas`);r.className=`kt-lazy-pixelate-canvas`,r.style.cssText=`position:absolute;inset:0;width:100%;height:100%;display:block;`,n.appendChild(r),l.push(n);let i=t.noise!==!1&&t.noise!==0&&t.noise!==`0`&&t.noise!==`false`,o=typeof t.noise==`number`?J(t.noise,0,1):.14;i&&(_=si(c,t,4),_.canvas.style.opacity=String(o));let u=r.getContext(`2d`,{alpha:!0,desynchronized:!0}),d=document.createElement(`canvas`),h=d.getContext(`2d`,{alpha:!0}),g=c.getBoundingClientRect(),v=ai(ii(t,g.width,g.height)),y=Math.max(0,Number(t.stepDuration??0)),b=y>0?y*v.length:Jr(t.duration,1.25),S=Math.max(0,Number(t.delay??100)),C=Math.max(0,Number(t.holdDuration??0)),w=J(Number(t.maxDpr??2),.5,4),T=1e3/J(Number(t.renderFps??60),4,120),E=0,O=0,k=()=>{let e=c.getBoundingClientRect();E=Math.max(1,e.width),O=Math.max(1,e.height);let t=J(window.devicePixelRatio||1,1,w),n=Math.max(1,Math.round(E*t)),i=Math.max(1,Math.round(O*t));(r.width!==n||r.height!==i)&&(r.width=n,r.height=i),u.setTransform(t,0,0,t,0,0)},A=t=>{let n=e.complete&&e.naturalWidth?e:s,r=n.naturalWidth,i=n.naturalHeight;if(!r||!i)return;let a=Math.max(1,Math.ceil(E/Math.max(1,t))),o=Math.max(1,Math.ceil(O/Math.max(1,t)));(d.width!==a||d.height!==o)&&(d.width=a,d.height=o);let c=wr(r,i,E,O);h.clearRect(0,0,a,o),h.imageSmoothingEnabled=!0;try{h.drawImage(n,c.sx,c.sy,c.sw,c.sh,0,0,a,o)}catch{return}u.clearRect(0,0,E,O),u.imageSmoothingEnabled=!1,u.drawImage(d,0,0,a,o,0,0,E,O)},j=null,M=null,N=-1/0,P=-1,F=n=>{if(p)return;if(m){M??=n,f=requestAnimationFrame(F);return}M!=null&&j!=null&&(j+=n-M,M=null),j??=n;let r=J((n-j)/Math.max(1,b),0,1);_&&(_.draw(n),_.canvas.style.opacity=String(o*Math.max(0,1-r)));let i=r>=1?v.length-1:Math.min(v.length-1,Math.floor(r*v.length));for(;P=1){x(D,C);return}n-N>=T&&(k(),A(v[i]),N=n),f=requestAnimationFrame(F)};k(),A(v[0]),x(()=>{f=requestAnimationFrame(F)},S);return}if(i===`flicker`){e.src=a,e.style.opacity=`1`;let n=Rr(c,`kt-lazy-flicker-layer`,3);n.style.background=t.flickerBackground||`#000`;let r=document.createElement(`canvas`);r.style.cssText=`position:absolute;inset:0;width:100%;height:100%;display:block;`,n.appendChild(r),l.push(n);let i=r.getContext(`2d`,{alpha:!1}),o=Math.max(120,Jr(t.duration,1.15)),u=J(Number(t.glitchStrength??1),.1,3),d=Math.max(2,Math.round(Number(t.sliceCount??7))),h=Math.max(0,Number(t.delay??60)),g=null,_=null,v=()=>{let e=c.getBoundingClientRect(),n=J(window.devicePixelRatio||1,1,J(Number(t.maxDpr??2),.5,4)),i=Math.max(1,Math.round(e.width*n)),a=Math.max(1,Math.round(e.height*n));(r.width!==i||r.height!==a)&&(r.width=i,r.height=a)},y=t=>{let n=e.complete&&e.naturalWidth?e:s;if(!n.naturalWidth)return;let a=r.width,o=r.height,c=wr(n.naturalWidth,n.naturalHeight,a,o);if(i.fillStyle=`#000`,i.fillRect(0,0,a,o),Math.random()<(1-t)*.28)return;let l=(1-t)*u;i.globalAlpha=1;for(let e=0;e.15&&Math.random()<.6&&(i.globalAlpha=.18*l,i.drawImage(n,c.sx,c.sy,c.sw,c.sh,Math.round(8*l),0,a,o),i.globalAlpha=1)},b=n=>{if(p)return;if(m){_??=n,f=requestAnimationFrame(b);return}_!=null&&g!=null&&(g+=n-_,_=null),g??=n;let r=J((n-g)/o,0,1);v(),y(r),t.onProgress?.(r,e),r<1?f=requestAnimationFrame(b):D()};x(()=>{f=requestAnimationFrame(b)},h);return}if(i===`dither`||i===`ascii`||i===`halftone`){e.src=a,e.style.opacity=`1`;let n=Xr(i,di(i,t,e),{lowTier:b,persistFps:24,revealFps:30,maxDpr:2});v=$r({el:e,wrapper:c,effect:i,settings:n,prefix:`kt-lazy`,drawable:()=>e.complete&&e.naturalWidth?e:s,animatedSource:t.animated===!0||Gr.test(a),durationMs:Math.max(120,Jr(t.duration,1.6)),delayMs:Math.max(0,Number(t.delay??60)),holdMs:Math.max(0,Number(t.holdDuration??0)),onProgress:(e,n)=>t.onProgress?.(e,n),onFinish:D}),l.push(v.layer),n.persist&&t.onLoad?.(e,s),v.start();return}if(i===`print`||i===`dissolve`){e.src=a,e.style.opacity=`0`;let n=Rr(c,`kt-lazy-${i}-base`,2),r=oi(a,e,t);n.appendChild(r),l.push(n);let o=null,s=null,u=null;i===`print`&&(o=Rr(c,`kt-lazy-print-sharp`,3),s=oi(a,e,t),o.appendChild(s),l.push(o),u=Rr(c,`kt-lazy-print-edge`,5),u.style.mixBlendMode=`soft-light`,l.push(u)),_=si(c,t,4);let d=Math.max(50,Jr(t.duration,i===`print`?2.2:1.55)),h=Math.max(0,Number(t.delay??100)),g=Math.max(0,Number(t.blur??16)),v=J(Number(t.noise??(i===`print`?.3:.68)),0,1),y=t.direction||`down`,b=Number(t.feather??(i===`print`?12:8)),S=null,C=null,w=n=>{if(p)return;if(m){C??=n,f=requestAnimationFrame(w);return}C!=null&&S!=null&&(S+=n-C,C=null),S??=n;let a=J((n-S)/d,0,1),s=1-(1-a)**2.2;if(_.draw(n),i===`print`){let e=a<.5?2*a*a:1-(-2*a+2)**2/2,n=g*(1-a*.45);r.style.filter=`blur(${n}px) contrast(${1+(1-a)*.1}) brightness(${1+(1-a)*.06})`,o.style.maskImage=ci(y,e,b,!1),o.style.webkitMaskImage=o.style.maskImage,_.canvas.style.maskImage=ci(y,e,b,!0),_.canvas.style.webkitMaskImage=_.canvas.style.maskImage,_.canvas.style.opacity=String(v*(1-a**1.6*.85));let i=y===`up`?`to top`:y===`left`?`to left`:y===`right`?`to right`:`to bottom`,s=J(e*100,0,100),c=J(Number(t.edgeWidth??9),2,30);u.style.opacity=a>=1?`0`:`1`,u.style.background=`linear-gradient(${i}, transparent ${J(s-c,0,100)}%, rgba(255,255,255,${J(Number(t.edgeOpacity??.5),0,1)}) ${s}%, transparent ${J(s+c*.4,0,100)}%)`}else r.style.filter=`blur(${g*(1-s)}px) contrast(${1+(1-s)*.22})`,_.canvas.style.opacity=String(v*(1-s)**1.2);t.onProgress?.(a,e),a<1?f=requestAnimationFrame(w):D()};x(()=>{f=requestAnimationFrame(w)},h);return}E(),t.onLoad?.(e,s)}};return i===`skeleton`?O():![`blur-up`,`polaroid`,`pixelate`].includes(i)&&!qr(i)&&(e.style.opacity=`0`),d=ye(e,A,{threshold:Number(t.threshold??.05),rootMargin:t.rootMargin||`200px 0px`}),{el:e,type:`lazy`,get animatedMedia(){return t.animated===!0||Gr.test(a)},replay(){f!=null&&cancelAnimationFrame(f),f=null,u.forEach(clearTimeout),u.clear(),w(),T(),h=!1,i===`skeleton`&&O(),A()},pause(){m=!0,v?.pause()},resume(){m=!1,v?.resume()},destroy(){p=!0,m=!1,d?.disconnect(),f!=null&&cancelAnimationFrame(f),u.forEach(clearTimeout),u.clear(),w(),T(),Lr(e,s);let t=(t,n)=>n==null?e.removeAttribute(t):e.setAttribute(t,n);t(`style`,o.style),t(`src`,o.src),t(`srcset`,o.srcset),t(`sizes`,o.sizes),t(`loading`,o.loading),t(`decoding`,o.decoding)}}},reduced(e,t={}){let n=e.getAttribute(`style`),r=e.getAttribute(`src`),i=ri(e,t);return i&&(e.src=i),e.style.opacity=`1`,e.style.filter=`none`,e.style.transform=`none`,{el:e,type:`lazy`,pause(){},resume(){},destroy(){n==null?e.removeAttribute(`style`):e.setAttribute(`style`,n),r==null?e.removeAttribute(`src`):e.setAttribute(`src`,r)}}}},hi=new Set([`load`,`view`,`manual`]),gi=`kt-stylize-wrap`;function _i(e){return{className:gi,display:e.display,aspectRatio:e.aspectRatio,height:e.height}}function vi(e,t){let n=e.getAttribute(`style`);return e.style.display=`block`,e.style.width=`100%`,e.style.height=`100%`,e.style.objectFit=t.objectFit||`cover`,e.tagName===`IMG`&&(e.style.objectPosition=t.objectPosition||`50% 50%`),n}function yi(e){return e.tagName===`IMG`||e.tagName===`VIDEO`?e:e.querySelector(`img, video`)}function bi(e){return e.currentSrc||e.getAttribute(`src`)||e.getAttribute(`data-src`)||``}function xi(e,t,n,r=null){let i={scope:r,persist:n===`persist`,cellSize:t.cellSize,paperColor:t.paperColor,inkColor:t.inkColor,accentColor:t.accentColor,originalColors:t.originalColors,colorSteps:t.colorSteps,inverted:t.inverted,contrast:t.contrast,brightness:t.brightness,motion:t.motion,motionSpeed:t.motionSpeed,motionAmount:t.motionAmount,pointer:t.pointer,pointerRadius:t.pointerRadius,pointerStrength:t.pointerStrength,pointerCellSize:t.pointerCellSize,transition:t.transition||`dissolve`,seed:t.seed,renderFps:t.renderFps,maxDpr:t.maxDpr,ease:t.ease};return e===`dither`&&(i.ditherType=t.ditherType),e===`ascii`&&(i.asciiChars=t.asciiChars,i.asciiFont=t.asciiFont),e===`halftone`&&(i.halftoneShape=t.halftoneShape,i.halftoneAngle=t.halftoneAngle),i}function Si(e={}){let t={};for(let n of Object.keys(e)){if(!Mr.includes(n))return null;t[n]=e[n]}return t}function Ci(e){return{durationMs:Math.max(120,Jr(e.duration,1.6)),delayMs:Math.max(0,Jr(e.delay,0)),holdMs:Math.max(0,Jr(e.holdDuration,0))}}function wi(e,t,n,r,i){let a=r.mode===`reveal`?`reveal`:`persist`,o=hi.has(r.trigger)?r.trigger:`load`,s=i?.performance===`low`,c=Ir(t,_i(r)),{wrapper:l}=c,u=vi(t,r),d=Xr(n,xi(n,r,a,t),{lowTier:s,persistFps:24,revealFps:30,maxDpr:2}),f=bi(t),p=r.animated===!0||Gr.test(f),m=null,h=null,g=!1,_=!1,v=!1,y=()=>{m?.destroy(),m=null,r.onComplete?.(t)},b=()=>{g||m||(m=$r({el:t,wrapper:l,effect:n,settings:d,prefix:`kt-stylize`,animatedSource:p,...Ci(r),onProgress:(e,t)=>r.onProgress?.(e,t),onFinish:y,onRendered:e=>{e&&a===`persist`&&r.onComplete?.(t)}}),_&&m.pause(),m.start())},x=()=>{if(!(g||v)){if(v=!0,a===`persist`||o===`load`){b();return}o===`view`&&(h=ye(t,b,{threshold:Number(r.threshold??.05),rootMargin:r.rootMargin||`0px`}))}},S=()=>t.complete&&t.naturalWidth>0,C=()=>{t.removeEventListener(`load`,C),x()};return S()?x():t.addEventListener(`load`,C),{el:e,type:`stylize`,get animatedMedia(){return p||d.live},get motion(){return d.styleConfig.motion},update(e={}){let t=Si(e);return t?(Zr(d,t,m),!0):!1},replay(){if(!g){if(m){m.replay();return}S()&&b()}},pause(){_=!0,m?.pause()},resume(){_=!1,m?.resume()},destroy(){g||(g=!0,t.removeEventListener(`load`,C),h?.disconnect(),h=null,m?.destroy(),m=null,Lr(t,c),u==null?t.removeAttribute(`style`):t.setAttribute(`style`,u))}}}function Ti(e,t,n,r,i){let a=!1,o=!1,s=!1,c=null,l=null,u=r.mode===`reveal`?`reveal`:`persist`,d=hi.has(r.trigger)?r.trigger:`load`,f=i?.performance===`low`,p=Ir(t,_i(r)),{wrapper:m}=p,h=vi(t,r),g=Xr(n,xi(n,r,u,t),{lowTier:f,persistFps:24,revealFps:24,maxDpr:1.5}),_=()=>{a||l||t.readyState<2||(c?.disconnect(),c=null,l=ei({el:t,wrapper:m,effect:n,settings:g,prefix:`kt-stylize`,...Ci(r),onProgress:(e,t)=>r.onProgress?.(e,t),onFinish:()=>r.onComplete?.(t)}),o&&l.pause(),l.start())},v=()=>{if(!a){if(s||u===`persist`||d===`load`){_();return}d===`view`&&(c=ye(t,_,{threshold:Number(r.threshold??.05),rootMargin:r.rootMargin||`0px`}))}},y=()=>{t.removeEventListener(`loadeddata`,y),v()};return t.readyState>=2?v():t.addEventListener(`loadeddata`,y),{el:e,type:`stylize`,get animatedMedia(){return!0},get motion(){return g.styleConfig.motion},update(e={}){let t=Si(e);return t?(Zr(g,t,l),!0):!1},replay(){a||(s=!0,l?l.replay():_())},pause(){o=!0,l?.pause()},resume(){o=!1,l?.resume()},destroy(){a||(a=!0,t.removeEventListener(`loadeddata`,y),c?.disconnect(),l?.destroy(),Lr(t,p),h==null?t.removeAttribute(`style`):t.setAttribute(`style`,h))}}}var Ei={defer:!0,offscreen:`pause`,create(e,t={},n=null){let r=yi(e);if(!r)return null;let i=t.preset||t.effect||`dither`,a=qr(i)?i:zr[0];return r.tagName===`VIDEO`?Ti(e,r,a,t,n):wi(e,r,a,t,n)},reduced(e,t={},n=null){return t.mode===`reveal`?{el:e,type:`stylize`,motion:`none`,pause(){},resume(){},replay(){},destroy(){}}:this.create(e,{...t,motion:`none`,pointer:`none`},n)}},Di={rise:{from:{y:`110%`,opacity:0},to:{y:0,opacity:1},wrap:!0},wave:{from:{y:30,opacity:0},to:{y:0,opacity:1}},fade:{from:{opacity:0},to:{opacity:1}},spin:{from:{rotateY:-95,opacity:0,y:8},to:{rotateY:0,opacity:1,y:0}},flip:{from:{rotateX:-90,opacity:0,y:10},to:{rotateX:0,opacity:1,y:0}},scale:{from:{scale:.4,opacity:0},to:{scale:1,opacity:1}},blur:{from:{opacity:0,filter:`blur(10px)`,y:12},to:{opacity:1,filter:`blur(0px)`,y:0}},"slide-up":{from:{y:`0.9em`,opacity:0},to:{y:0,opacity:1}},"slide-down":{from:{y:`-0.9em`,opacity:0},to:{y:0,opacity:1}},drift:{from:{x:`0.55em`,opacity:0},to:{x:0,opacity:1}},squeeze:{from:{x:`0.4em`,opacity:0,scaleX:.28},to:{x:0,opacity:1,scaleX:1}}},Oi={"slide-up":{y:`-0.7em`,opacity:0},"slide-down":{y:`0.7em`,opacity:0},fade:{opacity:0},blur:{opacity:0,filter:`blur(8px)`},scale:{scale:.6,opacity:0},flip:{rotateX:90,opacity:0},spin:{rotateY:95,opacity:0},drift:{x:`-0.45em`,opacity:0},squeeze:{x:`-0.35em`,opacity:0,scaleX:.28}};function ki(e,t,n,r){let i=[],a=Ie(e),o=()=>{let e=document.createElement(`br`);e.setAttribute(`aria-hidden`,`true`),a.gap(e)},s=e=>{Me(e).split(/(\n)/).forEach(e=>{e&&(e===` + `,document.head.appendChild(e)}var En={version:`0.13.0`,easing:I,easingFn:z,easings:F,get env(){return kt||=W(),Gt(),kt},get prefersReducedMotion(){return Pt.forceReducedMotion?!0:!!(Pt.respectReducedMotion&&this.env.reducedMotion)},setReducedMotion(e){e===`always`||e===!0?(Pt.forceReducedMotion=!0,Pt.respectReducedMotion=!0):e===`never`||e===!1?(Pt.forceReducedMotion=!1,Pt.respectReducedMotion=!1):(Pt.forceReducedMotion=!1,Pt.respectReducedMotion=!0),Vt();try{document.dispatchEvent(new CustomEvent(`kineto:reduced-motion`,{detail:{reduced:this.prefersReducedMotion}}))}catch{}return this},get performance(){return Pt.performance===`auto`?this.env.perf:Pt.performance},get registry(){return Object.fromEntries(_t)},get instanceCount(){return vt.size},diagnostics:Rt,diagnosticCodes:ct,get smoothEnabled(){return!!wt},get lenis(){return wt},config(e={}){return e.smoothOptions&&(Pt.smoothOptions={...Pt.smoothOptions,...e.smoothOptions}),Object.assign(Pt,{...e,smoothOptions:Pt.smoothOptions}),e.spring!==void 0&&ee({spring:e.spring===!0}),kt=null,this},setAnimationEngine:h,setEngineSource(e={}){return f(e),this},getEngineSource(){return p()},enableSmooth(e={}){return Pt.smooth=!0,Pt.smoothOptions={...Pt.smoothOptions,...e},xt?xn():gn(),this},disableSmooth(){return Pt.smooth=!1,Sn(),this},toggleSmooth(e,t={}){return(typeof e==`boolean`?e:!Pt.smooth)?this.enableSmooth(t):this.disableSmooth()},scrollTo(e,t={}){return wt?(wt.scrollTo(e,t),this):(typeof e==`number`?window.scrollTo({top:e,behavior:t.behavior||`smooth`}):de(e)[0]?.scrollIntoView?.({behavior:t.behavior||`smooth`,block:t.block||`start`}),this)},register(e,t){return!e||!t||typeof t.create!=`function`?(console.warn(`[Kineto] Module "${e}" needs a create() function.`),Zt({code:ct.INVALID_MODULE,module:String(e||`unknown`),phase:`register`,recoverable:!0}),this):(_t.set(e,t),this[e]=(t,n={})=>this.create(e,t,n),this)},unregister(e){return Array.from(vt).forEach(t=>{t.name===e&&ln(t)}),_t.delete(e),delete this[e],this},create(e,t,n={}){let r=_t.get(e);if(!r&&Bt?.has(e))return Bt.notLoaded(e);if(!r)return console.warn(`[Kineto] Unknown module: ${e}`),Zt({code:ct.UNKNOWN_MODULE,module:String(e||`unknown`),phase:`create`,recoverable:!0}),null;let i=de(t);if(!i.length)return null;let a=i.map(t=>{let i=$t(t)?.get(e);if(i)return i.instance;yn(t,e);try{let i,a=this.prefersReducedMotion,o=r.reducedMotion||r.reduced;if(i=a?(o?o.call(r,t,n,this):void 0)||we(t,e):this.performance===`low`&&typeof r.fallback==`function`?r.fallback.call(r,t,n,this)||we(t,e):r.create(t,n,this),!i)return Zt({code:ct.NOT_APPLICABLE,module:e,phase:`create`,recoverable:!0,detail:tn(t)}),null;let s=en(t,e,i,n);return on(r,n)&&sn($t(t).get(e)),s}catch(t){return console.error(`[Kineto/${e}] create() failed:`,t),Zt({code:ct.CREATE_FAILED,module:e,phase:`create`,recoverable:!0,cause:t}),null}}).filter(Boolean);return a.length&&gn(),a.length<=1?a[0]||null:a},scan(e=typeof document<`u`?document:null){if(this.env.ssr||!e)return this;gn();let t=(e,t)=>!$t(e)?.has(t)&&!It.has(e,t)&&!gt(e,t),n=n=>{let r=[],i=new Map,a=e=>{ht.has(e)===n&&(r.push(e),i.set(`data-kt-${ce(e)}`,e))};_t.forEach((e,t)=>a(t)),Bt?.discoverable().forEach(e=>{_t.has(e)||a(e)});let o=new Map(r.map(e=>[e,[]]));if(!r.length)return o;let s=r.map(e=>`[data-kt-${ce(e)}]`).join(`,`),c=e=>{(e.getAttributeNames?.()||[]).forEach(n=>{let r=i.get(n);r&&t(e,r)&&o.get(r).push(e)})};return e.matches?.(s)&&c(e),e.querySelectorAll?.(s).forEach(c),o},r=(e,t=null)=>{_t.forEach((n,r)=>{let i=e.get(r);if(!i)return;let a=Pt.defer===!0&&n.defer===!0;i.forEach(e=>{(!t||t(e))&&(a&&It.queue(e,r)||this.create(r,e,ge(e,r)))})})},i=()=>{typeof requestAnimationFrame<`u`?requestAnimationFrame(()=>document.documentElement.classList.remove(`kt-preload`)):document.documentElement.classList.remove(`kt-preload`)};r(n(!1));let a=n(!0),o=Array.from(a.values()).some(e=>e.length>0),s=[],c=s.length?()=>{}:i;if(s.length&&Bt.loadAll(s).then(()=>e.isConnected===!1?i():this.scan(e)),o&&!v()){let t={root:e,cancelled:!1,released:[]};dn.add(t);let i=e.isConnected!==!1,o=e=>(!i||e.isConnected!==!1)&&!t.released.some(t=>un(t,e));b().finally(()=>{dn.delete(t),v()||zt(`gsap`,Array.from(a.entries()).filter(([,e])=>e.length>0).map(([e])=>e));let s=i&&e.isConnected===!1;!t.cancelled&&!s&&r(n(!0),o),c()})}else r(a),c();return this},init(e=typeof document<`u`?document:null){return this.scan(e)},initModules(e){return de(e).forEach(e=>this.scan(e)),this},autoInit(e=typeof document<`u`?document:null){return this.env.ssr||!e?this:document.readyState===`loading`?(St||(St=!0,Ct=()=>{St=!1,Ct=null,this.scan(e)},document.addEventListener(`DOMContentLoaded`,Ct,{once:!0})),this):this.scan(e)},observe(e=typeof document<`u`?document:null,t={}){let n=typeof e==`string`?de(e)[0]:e,r={root:n||null,active:!1,disconnect(){}};if(this.env.ssr||!n||typeof MutationObserver>`u`)return r;let i=bt.get(n);if(i)return i.handle;let a=hn(n,t),o={root:n,active:!0,disconnect:()=>{let e=bt.get(n);e&&e.handle===o&&(e.live.disconnect(),bt.delete(n),o.active=!1)}};return bt.set(n,{live:a,handle:o}),t.scan!==!1&&this.scan(n),o},getInstance(e,t){let n=de(e)[0];return n?t?$t(n)?.get(t)?.instance||null:Array.from($t(n)?.values()||[],({instance:e})=>e):null},updateModule(e,t,n={}){let r=de(e),i=0;return r.forEach(e=>{let r=$t(e)?.get(t);if(r&&typeof r.instance.update==`function`){let e={...r.options,...n};try{if(r.instance.update(n,e)!==!1){r.options=e,i+=1;return}}catch(e){console.error(`[Kineto/${t}] update() failed, recreating:`,e),Zt({code:ct.UPDATE_FAILED,module:t,phase:`update`,recoverable:!0,cause:e})}}let a=r?{...r.options,...n}:n;r?.instance?.effect===`radial`&&Number.isFinite(r.instance.index)&&(a.initialIndex=r.instance.index),r&&ln(r),this.create(t,e,a)}),i>0},destroyModule(e,t){let n=de(e);return n.length&&Array.from(vt).forEach(e=>{e.name===t&&pn(e,n)&&ln(e)}),this},replay(e,t,n){let r=de(e),i=[];Array.from(vt).forEach(e=>{e.name===t&&pn(e,r)&&i.push(e)});let a=[];return i.forEach(e=>{if(!n&&typeof e.instance?.replay==`function`)e.instance.replay(),a.push(e.instance);else{let r=e.sourceEl,i=n||e.options;ln(e,!0,!1);let o=this.create(t,r,i);o&&a.push(o)}}),a.length<=1?a[0]||null:a},destroy(e){if(e){let t=de(e);return Array.from(vt).forEach(e=>{pn(e,t)&&ln(e)}),It.cancel(t),fn(t),this}return It.cancel(),fn(),Array.from(vt).forEach(e=>ln(e)),Array.from(bt.values()).forEach(({handle:e})=>e.disconnect()),wn(),this},pause(){return vt.forEach(({instance:e})=>e.pause()),wt?.stop(),this},resume(){return vt.forEach(({instance:e})=>e.resume()),wt?.start(),this},refresh(){return _e()?.refresh(),this}};En.core={initModules:e=>En.initModules(e),destroyModule:(e,t)=>En.destroyModule(e,t),getInstance:(e,t)=>En.getInstance(e,t),replay:(e,t,n)=>En.replay(e,t,n),scan:e=>En.scan(e),enableSmooth:e=>En.enableSmooth(e),disableSmooth:()=>En.disableSmooth(),toggleSmooth:(e,t)=>En.toggleSmooth(e,t),scrollTo:(e,t)=>En.scrollTo(e,t)};var Dn={defer:!0,create(e,t){let n=Q(),r=_e();if(!n||!r)return this.fallback(e,t);let i=$(e,[`transform`,`willChange`]),a=t.speed??.5,o=t.axis||`y`,s=(t.distance??200)*Math.abs(a),c={[o]:a<0?s:-s},l={[o]:a<0?-s:s,ease:`none`,scrollTrigger:{trigger:e,start:t.start||`top bottom`,end:t.end||`bottom top`,scrub:t.scrub??!0,invalidateOnRefresh:!0,onUpdate:t.onUpdate?n=>t.onUpdate(n.progress,e,n):void 0}};e.style.willChange=`transform`;let u=n.fromTo(e,c,l);return{el:e,type:`parallax`,pause:()=>u.scrollTrigger?.disable(!1),resume:()=>u.scrollTrigger?.enable(),destroy:()=>{u.scrollTrigger?.kill(),u.kill(),i()}}},reduced(e){let t=$(e,[`transform`]),n=Q();return n?n.set(e,{x:0,y:0}):e.style.transform=`none`,{el:e,type:`parallax`,pause(){},resume(){},destroy:t}},fallback(e,t={}){let n=$(e,[`transform`,`willChange`]),r=t.axis===`x`?`x`:`y`,i=Number(t.speed??.5),a=Number(t.distance??200)*i;e.style.willChange=`transform`;let o=!1,s=null,c=!1,l=()=>{if(o=!1,s=null,c)return;let t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,i=((n-t.top)/(n+t.height)-.5)*2*-a;e.style.transform=r===`x`?`translate3d(${i}px,0,0)`:`translate3d(0,${i}px,0)`},u=()=>{o||(o=!0,s=requestAnimationFrame(l))};return l(),window.addEventListener(`scroll`,u,{passive:!0}),window.addEventListener(`resize`,u,{passive:!0}),{el:e,type:`parallax`,pause(){window.removeEventListener(`scroll`,u)},resume(){window.addEventListener(`scroll`,u,{passive:!0})},destroy(){c=!0,s!=null&&cancelAnimationFrame(s),window.removeEventListener(`scroll`,u),window.removeEventListener(`resize`,u),n()}}}},On={defer:!0,offscreen:`pause`,create(e,t){let n=W();if((t.mode||t.preset)===`compass`){let i=X(t.smoothing??t.ease,.08,.01,1),a=Number(t.rotateOffset??0),o=t.compassRange==null?null:Number(t.compassRange),s=Number(t.sensitivity??1),c=t.global?window:e,l=$(e,[`transform`,`willChange`]);e.style.willChange=`transform`;let u=0,d=0,f=!0,p=!1,m=null,h=t.gyro!==!1&&n.hasGyro&&!te(),g=()=>{f&&m==null&&(m=requestAnimationFrame(r))},_=e=>{e.alpha!=null&&(u=-e.alpha*s,g())},v=n=>{let r=e.getBoundingClientRect();if(r.width&&r.height){if(o!=null){let e=t.global?{left:0,width:window.innerWidth}:r;u=J(((n.clientX-e.left)/e.width-.5)*2,-1,1)*o*s}else u=Math.atan2(n.clientY-(r.top+r.height/2),n.clientX-(r.left+r.width/2))*180/Math.PI*s;g()}},y=re();function r(t){if(m=null,!f)return;let n=(u-d)%360;n>180&&(n-=360),n<-180&&(n+=360),d+=n*Y(i,y.tick(t)),e.style.transform=`rotate(${(d+a).toFixed(3)}deg)`,Math.abs(n)>.01&&(m=requestAnimationFrame(r))}return h?K().then(e=>{e&&!p&&window.addEventListener(`deviceorientation`,_,{passive:!0})}):c.addEventListener(`pointermove`,v,{passive:!0}),m=requestAnimationFrame(r),{el:e,type:`mouseParallax`,pause:()=>{f=!1,m!=null&&cancelAnimationFrame(m),m=null},resume:()=>{f||(f=!0,g())},destroy:()=>{f=!1,p=!0,m!=null&&cancelAnimationFrame(m),c.removeEventListener(`pointermove`,v),window.removeEventListener(`deviceorientation`,_),l()}}}let i=X(t.smoothing??t.ease,.08,.01,1),a=t.maxX??40,o=t.maxY??40,s=t.global?window:e,c=t.gyro!==!1&&n.hasGyro&&!te(),l=Array.from(e.querySelectorAll(`[data-mp-speed], [data-kt-mouse-speed]`));l.length||l.push(e);let u=l.map(e=>$(e,[`transform`,`willChange`]));l.forEach(e=>{e.style.willChange=`transform`});let d=0,f=0,p=!0,m=!1,h=null,g=l.map(()=>0),_=l.map(()=>0),v=()=>{p&&h==null&&(h=requestAnimationFrame(r))},y=n=>{let r=t.global?{left:0,top:0,width:window.innerWidth,height:window.innerHeight}:e.getBoundingClientRect();r.width&&r.height&&(d=((n.clientX-r.left)/r.width-.5)*2,f=((n.clientY-r.top)/r.height-.5)*2,v())},b=e=>{d=J((e.gamma||0)/30,-1,1),f=J((e.beta||0)/30,-1,1),v()};c?K().then(e=>{e&&!m&&window.addEventListener(`deviceorientation`,b,{passive:!0})}):s.addEventListener(`pointermove`,y,{passive:!0});let x=re();function r(e){if(h=null,!p)return;let n=Y(i,x.tick(e)),s=!1;l.forEach((e,r)=>{let i=Number(e.dataset.mpSpeed??e.dataset.ktMouseSpeed??t.speed??.05),c=d*a*i,l=f*o*i;g[r]=q(g[r],c,n),_[r]=q(_[r],l,n),(Math.abs(c-g[r])>.01||Math.abs(l-_[r])>.01)&&(s=!0),e.style.transform=`translate3d(${g[r]}px, ${_[r]}px, 0)`}),s&&(h=requestAnimationFrame(r))}return h=requestAnimationFrame(r),{el:e,type:`mouseParallax`,pause:()=>{p=!1,h!=null&&cancelAnimationFrame(h),h=null},resume:()=>{p||(p=!0,v())},destroy:()=>{p=!1,m=!0,h!=null&&cancelAnimationFrame(h),s.removeEventListener(`pointermove`,y),window.removeEventListener(`deviceorientation`,b),u.forEach(e=>e())}}},reduced(){},fallback(e,t){return this.create(e,{...t,gyro:!1})}},kn={fade:{opacity:0},"fade-up":{y:40,opacity:0},"fade-down":{y:-40,opacity:0},"fade-left":{x:-40,opacity:0},"fade-right":{x:40,opacity:0},"slide-up":{yPercent:100,opacity:0},"slide-down":{yPercent:-100,opacity:0},"slide-left":{xPercent:-100,opacity:0},"slide-right":{xPercent:100,opacity:0},"zoom-in":{scale:.78,opacity:0},"zoom-out":{scale:1.16,opacity:0},blur:{filter:`blur(20px)`,opacity:0},rise:{y:72,scale:.96,opacity:0},soft:{y:24,filter:`blur(8px)`,opacity:0},"flip-x":{rotationX:-80,transformPerspective:900,opacity:0},"flip-y":{rotationY:-80,transformPerspective:900,opacity:0},rotate:{rotate:-8,scale:.92,opacity:0},swing:{rotate:-12,x:-28,transformOrigin:`0% 0%`,opacity:0},skew:{skewY:7,y:28,opacity:0},mask:{clipPath:`inset(0 100% 0 0)`,opacity:1},wipe:{clipPath:`inset(100% 0 0 0)`,opacity:1}},An=new Set([`start`,`end`,`center`,`edges`,`random`]),jn=(e,t)=>t.stagger&&e.children.length?Array.from(e.children):[e];function Mn(e,t){let n=[...new Set([...t,e])].map(e=>xe(e,[`style`,`class`]));return()=>n.forEach(e=>e())}function Nn(e){return An.has(String(e))?String(e):`start`}function Pn(e,t,n){n=Nn(n);let r=Math.max(0,Number(t)||0),i=Math.max(0,e-1),a=i/2,o;if(n===`end`)o=e=>i-e;else if(n===`center`)o=e=>Math.abs(e-a);else if(n===`edges`)o=e=>a-Math.abs(e-a);else if(n===`random`){let t=Array.from({length:e},(e,t)=>t);for(let e=t.length-1;e>0;--e){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}o=e=>t[e]}else o=e=>e;return Array.from({length:e},(e,t)=>o(t)*r)}function Fn(e,t,n){let r=String(t.enterClass||t.activeClass||`is-inview`).split(/\s+/).filter(Boolean),i=String(t.leaveClass||``).split(/\s+/).filter(Boolean),[a,o]=n?[i,r]:[r,i];e.classList.remove(...a),e.classList.add(...o),t.onClassChange?.(n,e)}var In=(e,t)=>Fn(e,t,!0),Ln=(e,t)=>Fn(e,t,!1);function Rn(e,t,n,r,i,a,o=()=>e.getBoundingClientRect()){let s=!1,c=null,l=null,u=null,d=Number(t.threshold??(n?.2:.1)),f=String(t.rootMargin||(n?`0px`:`0px 0px -10% 0px`)).trim().split(/\s+/),p=()=>{if(c=null,s)return;let t=document.documentElement.clientWidth||window.innerWidth,n=document.documentElement.clientHeight||window.innerHeight,i=[0,1,2,3].map(e=>{let n=f[e]||f[e%2]||f[0];return Number.parseFloat(n)*(n.endsWith(`%`)?t/100:1)}),u=o(),p=-i[0],m=n+i[2],h=-i[3],g=t+i[1];for(let t=e.parentElement;t;t=t.parentElement){let e=getComputedStyle(t);if(!/(hidden|clip|auto|scroll)/.test(e.overflowX+e.overflowY))continue;let n=t.getBoundingClientRect(),r=t.offsetWidth?n.width/t.offsetWidth:1,i=t.offsetHeight?n.height/t.offsetHeight:1;e.overflowX!==`visible`&&(h=Math.max(h,n.left+t.clientLeft*r),g=Math.min(g,n.left+(t.clientLeft+t.clientWidth)*r)),e.overflowY!==`visible`&&(p=Math.max(p,n.top+t.clientTop*i),m=Math.min(m,n.top+(t.clientTop+t.clientHeight)*i))}let _=Math.max(0,Math.min(u.right,g)-Math.max(u.left,h))*Math.max(0,Math.min(u.bottom,m)-Math.max(u.top,p)),v=_>0&&_/(u.width*u.height)>=d;if(a){v&&a();return}let y=v?0:u.top>=(p+m-u.height)/2?1:-1,b=l;l=y,!(b==null&&y!==0||b===y)&&(b===-1?r(2):(b===1||b==null)&&r(0),!s&&(y===-1?r(1):y===1&&r(3)))},m=()=>{!s&&c==null&&(c=requestAnimationFrame(p))};return typeof IntersectionObserver<`u`?(u=new IntersectionObserver(m,{threshold:d,rootMargin:f.join(` `)}),u.observe(e)):a||r(0),i&&!a&&(document.addEventListener(`scroll`,m,{passive:!0,capture:!0}),window.addEventListener(`resize`,m,{passive:!0})),{disconnect(){s=!0,u?.disconnect(),c!=null&&cancelAnimationFrame(c),document.removeEventListener(`scroll`,m,!0),window.removeEventListener(`resize`,m)}}}function zn(e,t,n,r,i,a){let o=t.preset||`fade-up`,s=jn(e,t),c=Mn(e,s),l=t.once!==!1,u=!l||t.onEnter||t.onLeave||t.onEnterBack||t.onLeaveBack,d={time:0},f=!1,p=!1,m=!1,h=-1,g=1,_,v,y,b,x=null,S=null,C=null,w=null,T=null,E=()=>{x?.pause(),S!=null&&cancelAnimationFrame(S),S=C=null},D=()=>{f||s.forEach((e,r)=>{let s=J(b(J((d.time-v[r])/_,0,1)),0,1);if(e.style.opacity=!n&&!i&&s===0?`0`:`1`,o===`clock`){let n=s*360,r=t.clockDirection===`ccw`?`transparent 0deg ${360-n}deg, #000 ${360-n}deg`:`#000 ${n}deg, transparent ${n}deg`,i=s===1?`none`:`conic-gradient(from ${Number(t.startAngle??0)}deg, ${r})`;e.style.maskImage=e.style.webkitMaskImage=i}else{let t=s>=.998||!n&&s===0?`none`:a(1-s);e.style.clipPath=e.style.webkitClipPath=t}e.style.willChange=s>0&&s<1?i?`mask-image`:`clip-path`:``})},O=()=>{f||(D(),u||(T?.disconnect(),w?.kill()),t.onComplete?.(e))},k=e=>{S=null,!(f||p)&&(C!=null&&(d.time=J(d.time+(e-C)*g/1e3,0,y)),C=e,D(),(g>0?d.time0)?S=requestAnimationFrame(k):g>0&&O())},A=()=>{f||p||(n?g>0?x.play():x.reverse():S==null&&(g>0?d.time0)&&(C=null,S=requestAnimationFrame(k)))},j=()=>{E(),x?.kill(),_=Math.max(.05,Number(t.duration??(i?1.4:n?.8:.55)));let e=Number(t.delay??0);v=Pn(s.length,t.stagger,t.order).map(t=>t+(n&&!i?e:Math.max(0,e))),y=Math.max(.001,_+Math.max(...v));let r=t.enterEase??t.ease,a={ease:[.25,.1,.25,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]}[r||(i?`linear`:`ease`)]||String(r).match(/^cubic-bezier\(\s*([\d.+-]+)\s*,\s*([\d.+-]+)\s*,\s*([\d.+-]+)\s*,\s*([\d.+-]+)\s*\)$/)?.slice(1).map(Number);b=n?n.parseEase(r?H(r):i?`power1.inOut`:(t.spring??U.spring)===!0?`back.out(1.25)`:`power3.out`):a?B(...a):z(r),d.time=0,g=1,D(),n&&(x=n.to(d,{time:y,duration:y,ease:`none`,paused:!0,onUpdate:D,onComplete:O}))},M=n=>{if(!(f||h===n)){if(h=n,n%2==0&&(!m||!l)){if(m=!0,g=1,In(e,t),f)return;A()}[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack][n]?.(e),!(f||n%2==0||l)&&(t.removeClassOnLeave!==!1&&Ln(e,t),!f&&(g=-1,A()))}};return j(),r&&(w=r.create({trigger:e,start:t.start||`top 85%`,end:t.end,onEnter:()=>M(0),onLeave:()=>M(1),onEnterBack:()=>M(2),onLeaveBack:()=>M(3)})),T=Rn(e,t,i,M,u,r?()=>{m||M(0)}:null),{el:e,type:`reveal`,replay(n){f||(Object.assign(t,n||{}),j(),p=!1,m=!0,In(e,t),A())},pause(){p=!0,E()},resume(){p=!1,A()},destroy(){f=!0,E(),x?.kill(),w?.kill(),T?.disconnect(),c()}}}var Bn={defer:!0,create(e,t={},n){let r=n?.performance===`low`?null:Q(),i=r&&_e(),a=t.preset||`fade-up`,o=a.startsWith(`slide-`)?a.slice(6):null,s=t.direction||o||(a===`mask`?`right`:`up`),c=a.startsWith(`slide-`)&&[`up`,`down`,`left`,`right`].includes(s)?`slide-${s}`:a,l=t.classOnly===!0||a===`class`,u=t.once!==!1,d=e.getAttribute(`class`);if(l){let n=null,r=null,a=null,o=!1,s=!1,c=!1,l=()=>{o||s||(c=!0,In(e,t),o||t.onEnter?.(e))},f=()=>{o||s||t.removeClassOnLeave!==!1&&(Ln(e,t),o||t.onLeave?.(e))},p=()=>{!o&&s&&(s=!1,r?.enable?.(),(!u||!c)&&n?.observe?.(e))};return i?r=i.create({trigger:e,start:t.start||`top 85%`,end:t.end||`bottom 15%`,once:u,onEnter:l,onEnterBack:()=>{l(),o||t.onEnterBack?.(e)},onLeave:f,onLeaveBack:()=>{f(),o||t.onLeaveBack?.(e)}}):u?n=ye(e,l,{threshold:Number(t.threshold??.1),rootMargin:t.rootMargin||`0px 0px -10% 0px`}):typeof IntersectionObserver<`u`?(n=new IntersectionObserver(t=>ve(t,e)?.isIntersecting?l():f(),{threshold:Number(t.threshold??.1),rootMargin:t.rootMargin||`0px`}),n.observe(e)):l(),{el:e,type:`reveal`,replay(n){p(),!o&&(Object.assign(t,n||{}),a!=null&&cancelAnimationFrame(a),Ln(e,t),!o&&(a=requestAnimationFrame(()=>{a=null,l()})))},pause(){o||(s=!0,r?.disable?.(),n?.disconnect?.())},resume:p,destroy(){o=!0,a!=null&&cancelAnimationFrame(a),r?.kill?.(),n?.disconnect?.(),d==null?e.removeAttribute(`class`):e.setAttribute(`class`,d)}}}let f=a===`clock`,p=c===`wipe`||c===`mask`,m=e=>{let t=`${(Math.max(0,Math.min(1,e))*100).toFixed(2)}%`;return s===`down`?`inset(0px 0px ${t} 0px)`:s===`left`?`inset(0px 0px 0px ${t})`:s===`right`?`inset(0px ${t} 0px 0px)`:`inset(${t} 0px 0px 0px)`};if(f||p)return zn(e,t,f||i?r:null,i,f,m);let h=kn[c];if(h&&t.distance!=null&&t.distance!==``){let e=Math.max(0,Number(t.distance));Number.isFinite(e)&&(h={...h},`xPercent`in h&&(h.x=Math.sign(h.xPercent||1)*e,delete h.xPercent),`yPercent`in h&&(h.y=Math.sign(h.yPercent||1)*e,delete h.yPercent),`x`in h&&!(`xPercent`in kn[c])&&(h.x=Math.sign(h.x||1)*e),`y`in h&&!(`yPercent`in kn[c])&&(h.y=Math.sign(h.y||1)*e))}if(!h)return console.warn(`[Kineto/reveal] Unknown preset: ${a}`),null;if(!r||!i)return this.fallback(e,t,h);let g=jn(e,t),_=Mn(e,g),v=Math.max(0,Number(t.duration??.8)),y=t.enterEase??t.ease?H(t.enterEase??t.ease):(t.spring??U.spring)===!0?`back.out(1.25)`:`power3.out`,b=!1,x=(n=Number(t.delay??0))=>{let r=Pn(g.length,t.stagger,t.order);return{x:0,y:0,xPercent:0,yPercent:0,scale:1,rotation:0,rotationX:0,rotationY:0,skewX:0,skewY:0,opacity:1,filter:`blur(0px)`,duration:v,delay:n,ease:y,stagger:t.stagger?e=>r[e]:void 0,onStart:()=>In(e,t),onComplete:()=>{g.forEach(e=>{e.style.willChange=``}),t.onComplete?.(e)}}},S=null,C=null,w=()=>{S&&(C!==S&&C?.kill(),C=S)},T={...x(),scrollTrigger:{trigger:e,start:t.start||`top 85%`,end:t.end,toggleActions:u?`play none none none`:`play reverse play reverse`,onEnter:()=>{b||(w(),t.onEnter?.(e))},onLeave:()=>{b||(w(),t.onLeave?.(e),!b&&!u&&t.removeClassOnLeave!==!1&&Ln(e,t))},onEnterBack:()=>{b||(w(),In(e,t),b||t.onEnterBack?.(e))},onLeaveBack:()=>{b||(w(),t.onLeaveBack?.(e),!b&&!u&&t.removeClassOnLeave!==!1&&Ln(e,t))}}};g.forEach(e=>{e.style.willChange=`transform,opacity,filter,clip-path`}),S=r.fromTo(g,h,T),C=S;let E=(e=0)=>{b||(D?.disconnect(),D=null,u&&S.scrollTrigger?.disable(!1),S.pause(),C!==S&&C.kill(),C=r.fromTo(g,h,{...x(e),overwrite:`auto`}))},D=null;typeof IntersectionObserver<`u`&&(D=new IntersectionObserver(n=>{ve(n,e)?.isIntersecting&&(D.disconnect(),D=null,S.progress()===0&&E(Number(t.delay??0)))},{threshold:.12,rootMargin:`0px 0px -8% 0px`}),D.observe(e));let O=null;return{el:e,type:`reveal`,replay(e){Object.assign(t,e||{}),E()},pause(){C.paused()||(C.pause(),O=C)},resume(){O===C&&C.resume(),O=null},destroy(){b=!0,D?.disconnect(),S.scrollTrigger?.kill?.(),C.kill(),S.kill(),_()}}},reduced(e){let t=$(e,[`opacity`,`transform`,`filter`,`clipPath`]);return e.style.opacity=`1`,e.style.transform=`none`,e.style.filter=`none`,e.style.clipPath=`none`,{el:e,type:`reveal`,pause(){},resume(){},destroy:t}},fallback(e,t={},n=kn[`fade-up`]){if(n.performance===`low`)return this.create(e,t,n);let r=jn(e,t),i=Mn(e,r),a=String(n.opacity??0),o=Number(n.x??0),s=Number(n.y??0),c=Number(n.xPercent??0),l=Number(n.yPercent??0),u=Number(n.scale??1),d=Number(n.rotate??n.rotation??0),f=Number(n.rotationX??0),p=Number(n.rotationY??0),m=Number(n.skewX??0),h=Number(n.skewY??0),g=Number(n.transformPerspective??0),_=Math.max(0,Number(t.duration??.55)),v=t.once!==!1,y=!v||t.onEnter||t.onLeave||t.onEnterBack||t.onLeaveBack,b=[],x=!1,S=!1,C=!1,w=1,T=0,E=null,D=new Set,O=new Set,k=new Set,A=e=>{let t=requestAnimationFrame(()=>{k.delete(t),x||e()});k.add(t)},j=()=>{T++,D.forEach(e=>{e.onfinish=null,e.cancel()}),D.clear(),O.clear(),b.forEach(clearTimeout),b=[],k.forEach(cancelAnimationFrame),k.clear()},M=()=>{x||w<0||(y||E?.disconnect(),t.onComplete?.(e))},N=()=>{D.forEach(e=>{e.playbackRate=w;let t=e.effect.getComputedTiming().endTime;!S&&(w>0?e.currentTime0)&&e.play()})},P=[g?`perspective(${g}px)`:``,`translate3d(${o}px,${s}px,0)`,c||l?`translate(${c}%,${l}%)`:``,d?`rotate(${d}deg)`:``,f?`rotateX(${f}deg)`:``,p?`rotateY(${p}deg)`:``,m?`skewX(${m}deg)`:``,h?`skewY(${h}deg)`:``,u===1?``:`scale(${u})`].filter(Boolean).join(` `),F=[{opacity:a,transform:P,filter:n.filter||`none`},{opacity:`1`,transform:`none`,filter:`none`}],I=e=>{e.style.transition=`none`,e.style.opacity=a,e.style.transform=P,n.transformOrigin&&(e.style.transformOrigin=n.transformOrigin),n.filter&&(e.style.filter=n.filter)};r.forEach(I);let L=()=>{if(x)return;j();let n=T;C=!0,w=1;let i=Pn(r.length,t.stagger,t.order),a=Math.max(0,Number(t.delay??0)),o=i.indexOf(Math.max(...i));In(e,t),!(x||n!==T)&&r.forEach((e,t)=>{if(typeof e.animate==`function`){Object.assign(e.style,F[1]);let r=e.animate(F,{duration:_*1e3,delay:(a+i[t])*1e3,easing:`ease`,fill:v?`backwards`:`both`});D.add(r),O.add(r),S&&r.pause(),r.onfinish=()=>{x||n!==T||w<0||!O.delete(r)||(v&&(r.onfinish=null,D.delete(r)),O.size||M())};return}b.push(setTimeout(()=>A(()=>{e.style.transition=`opacity ${_}s ease,transform ${_}s ease,filter ${_}s ease`,Object.assign(e.style,F[1]),t===o&&b.push(setTimeout(()=>{M()},_*1e3))}),(a+i[t])*1e3))})};return E=Rn(e,t,!1,n=>{if(x||(n%2==0&&(!C||!v)&&(!C||!D.size?L():(w=1,D.forEach(e=>O.add(e)),In(e,t),x||N())),x))return;let i=T;[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack][n]?.(e),!(x||i!==T||n%2==0||v)&&(t.removeClassOnLeave!==!1&&Ln(e,t),!(x||i!==T)&&(w=-1,D.size?N():(j(),r.forEach(e=>{e.style.transition=`opacity ${_}s ease,transform ${_}s ease,filter ${_}s ease`,Object.assign(e.style,F[0])}))))},y,null,()=>{if(r[0]!==e)return e.getBoundingClientRect();let t=e.style.getPropertyValue(`transform`),n=e.style.getPropertyPriority(`transform`);e.style.setProperty(`transform`,`none`,`important`);let i=e.getBoundingClientRect();return t?e.style.setProperty(`transform`,t,n):e.style.removeProperty(`transform`),i}),{el:e,type:`reveal`,replay(e){x||(Object.assign(t,e||{}),S=!1,y||E.disconnect(),j(),r.forEach(I),A(L))},pause(){x||(S=!0,D.forEach(e=>e.pause()))},resume(){x||(S=!1,N())},destroy(){x=!0,E.disconnect(),j(),r.forEach(e=>e.getAttribute(`style`)),i()}}}};function Vn(e){return e.format?e.format:Z(e.separator)||(e.grouping===!0||e.comma===!0?`,`:``)}function Hn(e){return e.classList.add(`kt-counter-separator--blink`),null}function Un(e){let t=`var(--kt-counter-seam,${e.seamColor||`rgba(0,0,0,.5)`})`,n=e.shadow===!1||e.shadow===`none`?`none`:typeof e.shadow==`string`?e.shadow:`drop-shadow(0 2px 5px rgba(0,0,0,.3))`;return{seam:t,shadow:`var(--kt-counter-flip-shadow,${n})`,hasShadow:n!==`none`,separatorColor:e.separatorColor||``}}function Wn(e,t,n){if(!t)return;let r=document.createElement(`span`);r.className=n,r.textContent=t,e.appendChild(r)}function Gn(e,t,n=`kt-counter-char`){let r=document.createElement(`span`);return r.className=n,r.textContent=t,r.style.display=`inline-block`,e.appendChild(r),r}function Kn(e,t){let n=Number(t);if(t!=null&&Number.isFinite(n)&&n>0)return n;let r=getComputedStyle(e),i=Number.parseFloat(r.fontSize),a=String(r.lineHeight||``).trim(),o=Number.parseFloat(a);if(/px$/i.test(a)&&Number.isFinite(o)&&o>0)return o;if(Number.isFinite(i)&&i>0){if(/^\d*\.?\d+$/.test(a)&&o>0||/^\d*\.?\d+em$/i.test(a)&&o>0)return i*o;if(/^\d*\.?\d+%$/.test(a)&&o>0)return i*o/100}let s=document.createElement(`span`);s.textContent=`0`,s.setAttribute(`aria-hidden`,`true`),s.style.cssText=`position:absolute;visibility:hidden;pointer-events:none;display:inline-block;padding:0;border:0;line-height:inherit;`,e.appendChild(s);let c=s.getBoundingClientRect().height;return s.remove(),Number.isFinite(c)&&c>0?c:Number.isFinite(i)&&i>0?i*1.2:40}function qn(e,t,n=``){let r=`${Math.max(1,t)}px`;e.style.cssText=`${n}overflow:hidden;height:${r};max-height:${r};block-size:${r};max-block-size:${r};contain:paint;`}var Jn=e=>e.secondsOnly===!0||(e.mode||e.preset||e.style)===`clock`,Yn=20,Xn=250,Zn=1e3;function Qn(e,t){if(t.start===!1)return;let n=e.getBoundingClientRect();if(!(n.bottom>0&&n.topJn(e)?`pause`:null,create(e,t){let n=Q(),r=e.innerHTML,i=e.getAttribute(`style`),a=xe(e,[`aria-label`,`aria-live`]),o=t.secondsOnly===!0,s=o?`clock`:t.mode||t.preset||t.style||`slot`,c=Number(t.from??0),l=Number.parseFloat((e.textContent||``).replace(/[^0-9.-]/g,``)),u=Number(t.to??(Number.isFinite(l)?l:0)),d=Math.max(0,Number(t.duration??2)),f=Math.max(0,Number(t.decimals??0)),p=Z(t.prefix),m=Z(t.suffix),h={decimals:f,format:Vn(t),locale:t.locale},g=Ye(u,h),_=`${p}${g}${m}`,v=Qn(e,t),y=[],b=null,x=t=>{Array.from(e.children).forEach(e=>{e!==b?.node&&e.setAttribute(`aria-hidden`,`true`)}),b||=nt(e,t),b.attach(),b.set(t)},S=e=>(e&&y.push(e),e),C=()=>{y.forEach(e=>{e.scrollTrigger?.kill?.(),e.kill?.()}),y.length=0};if(s===`plain`){let r={value:c},i=()=>{e.textContent=`${p}${Ye(r.value,h)}${m}`};i(),n?S(n.to(r,{value:u,duration:d,delay:Number(t.delay??0),ease:t.ease||`power2.out`,onUpdate:i,onComplete:()=>t.onComplete?.(e),scrollTrigger:v})):(r.value=u,i(),t.onComplete?.(e))}else if(s===`digit`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`baseline`,Wn(e,p,`kt-counter-prefix`);let r=[];for(let t of g)/\d/.test(t)?r.push({node:Gn(e,`0`,`kt-counter-digit`),target:Number(t)}):Gn(e,t,`kt-counter-separator`);Wn(e,m,`kt-counter-suffix`),x(_);let i=Math.max(0,Number(t.loops??2)),a=Math.max(0,Number(t.stagger??.06));if(n){let o=n.timeline({delay:Number(t.delay??0),scrollTrigger:v,onComplete:()=>t.onComplete?.(e)});r.forEach(({node:e,target:n},r)=>{let s={value:0},c=i*10+n,l=-1;o.to(s,{value:c,duration:Math.max(.05,d+r*a),ease:t.ease||`none`,onUpdate:()=>{let t=Math.floor(s.value)%10;t!==l&&(l=t,e.textContent=String(t))},onComplete:()=>{e.textContent=String(n)}},0)}),S(o)}else r.forEach(({node:e,target:t})=>{e.textContent=String(t)}),t.onComplete?.(e)}else if(s===`pop`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`baseline`,Wn(e,p,`kt-counter-prefix`);let r=Array.from(g,t=>Gn(e,t,/\d/.test(t)?`kt-counter-digit kt-counter-pop-char`:`kt-counter-separator kt-counter-pop-char`));Wn(e,m,`kt-counter-suffix`),x(_);let i=t.popAlign||`bottom`,a=i===`top`?`50% 0%`:i===`center`?`50% 50%`:`50% 85%`,o=Math.max(1,Number(t.popScale??1.8)),s=Math.max(.1,d||.8),c=Math.min(.36,Math.max(.14,s*.38)),l=Math.max(.05,Number(t.popDuration??c)),u=r.length>1?Math.max(.025,(s-l)/(r.length-1)):0,f=Math.max(0,Number(t.stagger??u));if(n){let i=n.timeline({delay:Number(t.delay??0),scrollTrigger:v,onComplete:()=>t.onComplete?.(e)});i.set(r,{opacity:0,scale:o,transformOrigin:a}),r.forEach((e,n)=>{i.to(e,{opacity:1,scale:1,duration:l,ease:t.ease||`back.out(2.2)`,clearProps:`transform,opacity`},n*f)}),S(i)}else{r.forEach((e,t)=>{e.style.opacity=`0`,e.style.transformOrigin=a,e.style.transform=`scale(${o})`,e.style.transition=`opacity ${l}s ease ${t*f}s,transform ${l}s cubic-bezier(.2,.9,.3,1.25) ${t*f}s`});let n=requestAnimationFrame(()=>{r.forEach(e=>{e.style.opacity=`1`,e.style.transform=`scale(1)`})}),i=setTimeout(()=>t.onComplete?.(e),(l+f*r.length)*1e3);S({kill:()=>{cancelAnimationFrame(n),clearTimeout(i)}})}}else if(s===`flip`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`center`,e.style.gap=`${Math.max(0,Number(t.gap??3))}px`,Wn(e,p,`kt-counter-prefix`);let n=t.tileColor||`#191b20`,r=t.tileTextColor||`#f6f7fb`,i=Math.max(0,Number(t.tileRadius??6)),a=`1.24em`,o=Un(t),s=[],l=e=>`position:absolute;left:0;right:0;height:50%;overflow:hidden;${e?`top:0;border-radius:${i}px ${i}px 0 0`:`bottom:0;border-radius:0 0 ${i}px ${i}px`};background:${n};backface-visibility:hidden;`,f=e=>`position:absolute;left:0;width:100%;height:${a};line-height:${a};text-align:center;${e?`top:0`:`bottom:0`};color:${r};`,h=(e,t)=>{let n=document.createElement(`span`);n.setAttribute(`aria-hidden`,`true`),n.style.cssText=l(e)+(t?`transform-origin:50% ${e?`100%`:`0%`};will-change:transform;z-index:3;`:`z-index:1;`);let r=document.createElement(`span`);return r.style.cssText=f(e),r.textContent=`0`,n.appendChild(r),{half:n,glyph:r}},v=u>=c,y=g.replace(/\D/g,``).length,b=String(Math.round(Math.abs(c))).padStart(y,`0`).slice(-y),C=0;for(let t of g){if(!/\d/.test(t)){let n=document.createElement(`span`);n.className=`kt-counter-separator`,n.textContent=t,n.style.opacity=`.7`,e.appendChild(n);continue}let n=Number(b[C]||`0`);C+=1;let r=document.createElement(`span`);r.className=`kt-counter-flip-cell`,r.style.cssText=`display:inline-block;position:relative;width:1.34ch;height:${a};perspective:340px;${o.hasShadow?`filter:${o.shadow};`:``}`;let i=h(!0,!1),c=h(!1,!1),l=h(!0,!0),u=h(!1,!0);u.half.style.transform=`rotateX(90deg)`,r.append(i.half,c.half,l.half,u.half);let d=document.createElement(`span`);d.className=`kt-counter-seam`,d.setAttribute(`aria-hidden`,`true`),d.style.cssText=`position:absolute;left:0;right:0;top:50%;height:1px;margin-top:-0.5px;background:${o.seam};z-index:4;pointer-events:none;`,r.appendChild(d),e.appendChild(r),s.push({topStatic:i,bottomStatic:c,topFlap:l,bottomFlap:u,target:Number(t),start:n})}Wn(e,m,`kt-counter-suffix`),x(_);let w=Math.max(0,Number(t.loops??1)),T=new Set,E=!0,D=(e,t)=>{let n=setTimeout(()=>{T.delete(n),E&&e()},t);T.add(n)},O=(e,t)=>{e.topStatic.half.style.visibility=`visible`,e.bottomStatic.half.style.visibility=`visible`,e.topStatic.glyph.textContent=String(t),e.bottomStatic.glyph.textContent=String(t),e.topFlap.glyph.textContent=String(t),e.bottomFlap.glyph.textContent=String(t),e.topFlap.half.style.transform=`rotateX(0deg)`,e.bottomFlap.half.style.transform=`rotateX(90deg)`},k=e=>e.withFilter,A=(e,t,n,r,i=!0)=>{let a=Math.max(34,r/2);if(i){e.topStatic.glyph.textContent=String(n),e.bottomStatic.glyph.textContent=String(t),e.topFlap.glyph.textContent=String(t),e.bottomFlap.glyph.textContent=String(n),e.topFlap.half.style.transform=`rotateX(0deg)`,e.bottomFlap.half.style.transform=`rotateX(90deg)`,e.bottomStatic.half.style.visibility=`hidden`;let r=k({withFilter:[{transform:`rotateX(0deg)`,filter:`brightness(1)`},{transform:`rotateX(-90deg)`,filter:`brightness(.6)`}],plain:[{transform:`rotateX(0deg)`},{transform:`rotateX(-90deg)`}]}),i=k({withFilter:[{transform:`rotateX(90deg)`,filter:`brightness(.6)`},{transform:`rotateX(0deg)`,filter:`brightness(1)`}],plain:[{transform:`rotateX(90deg)`},{transform:`rotateX(0deg)`}]});e.topFlap.half.animate(r,{duration:a,easing:`cubic-bezier(.55,0,.85,.5)`,fill:`forwards`}),D(()=>{e.bottomFlap.half.animate(i,{duration:a,easing:`cubic-bezier(.15,.6,.3,1.15)`,fill:`forwards`}),D(()=>{e.bottomStatic.glyph.textContent=String(n),e.bottomStatic.half.style.visibility=`visible`},a)},a)}else{e.topStatic.glyph.textContent=String(t),e.bottomStatic.glyph.textContent=String(n),e.bottomFlap.glyph.textContent=String(t),e.topFlap.glyph.textContent=String(n),e.bottomFlap.half.style.transform=`rotateX(0deg)`,e.topFlap.half.style.transform=`rotateX(-90deg)`,e.topStatic.half.style.visibility=`hidden`;let r=k({withFilter:[{transform:`rotateX(0deg)`,filter:`brightness(1)`},{transform:`rotateX(90deg)`,filter:`brightness(.6)`}],plain:[{transform:`rotateX(0deg)`},{transform:`rotateX(90deg)`}]}),i=k({withFilter:[{transform:`rotateX(-90deg)`,filter:`brightness(.6)`},{transform:`rotateX(0deg)`,filter:`brightness(1)`}],plain:[{transform:`rotateX(-90deg)`},{transform:`rotateX(0deg)`}]});e.bottomFlap.half.animate(r,{duration:a,easing:`cubic-bezier(.55,0,.85,.5)`,fill:`forwards`}),D(()=>{e.topFlap.half.animate(i,{duration:a,easing:`cubic-bezier(.15,.6,.3,1.15)`,fill:`forwards`}),D(()=>{e.topStatic.glyph.textContent=String(n),e.topStatic.half.style.visibility=`visible`},a)},a)}},j=()=>{T.forEach(clearTimeout),T.clear(),E=!0;let n=Math.max(0,Number(t.stagger??.08))*1e3,r=0;s.forEach((i,a)=>{O(i,i.start);let o=v?((i.target-i.start)%10+10)%10:((i.start-i.target)%10+10)%10,s=w*10+o;if(s===0)return;r+=1;let c=Math.max(120,d*1e3/Math.max(1,s));for(let o=1;o<=s;o+=1){let l=o===s,u=v?(i.start+o-1)%10:((i.start-(o-1))%10+10)%10,d=v?(i.start+o)%10:((i.start-o)%10+10)%10;D(()=>{A(i,u,d,c,v),l&&(--r,r===0&&D(()=>t.onComplete?.(e),c))},a*n+(o-1)*c+Number(t.delay??0)*1e3)}})},M=e.getBoundingClientRect(),N=t.start===!1||M.bottom>0&&M.top{E=!1},resume:()=>{E=!0},kill:()=>{E=!1,T.forEach(clearTimeout),T.clear(),P?.disconnect()}})}else if(s===`clock`){e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`center`,e.setAttribute(`aria-live`,`off`);let n=Kn(e,t.lineHeight),r=t.seconds!==!1,i=Math.max(1,Math.round(Number(t.secondsDigits??3))),a=String(t.secondsLabel??`S`),s=t.hour12===!0,c=Z(t.clockSeparator,`:`),l=t.blink!==!1,u=t.clockStyle||`roll`,d=Math.max(80,Number(t.rollDuration??.28)*1e3),f=String(t.daysLabel??`d`),h=t.until?new Date(t.until):null,g=t.since?new Date(t.since):null,_=!1,v=e=>String(e).padStart(2,`0`),y=()=>{if(h||g){let n=h?h.getTime()-Date.now():Date.now()-g.getTime();if(h&&n<=0&&!_&&(_=!0,t.onComplete?.(e)),n=Math.max(0,n),o)return{text:`${String(Math.floor(n/1e3)).padStart(i,`0`)}${a}`,meridiem:``,days:null};let s=Math.floor(n/864e5),l=[v(Math.floor(n/36e5)%24),v(Math.floor(n/6e4)%60)];return r&&l.push(v(Math.floor(n/1e3)%60)),{text:l.join(c),meridiem:``,days:s}}let n=new Date;if(o)return{text:`${String(n.getSeconds()).padStart(i,`0`)}${a}`,meridiem:``,days:null};let l=n.getHours(),u=``;s&&(u=l>=12?`PM`:`AM`,l=l%12||12);let d=[v(l),v(n.getMinutes())];return r&&d.push(v(n.getSeconds())),{text:d.join(c),meridiem:u,days:null}},C=e=>{let t=document.createElement(`span`);t.className=`kt-counter-digit kt-counter-clock-digit`,qn(t,n,`display:inline-block;min-width:1ch;text-align:center;vertical-align:bottom;`);let r=document.createElement(`span`);r.style.cssText=`display:block;will-change:transform;`;let i=document.createElement(`span`);return i.style.cssText=`display:block;height:${n}px;line-height:${n}px;`,i.textContent=e,r.appendChild(i),t.appendChild(r),{viewport:t,stack:r,value:e}},w=Un(t),T=new Set,E=(e,t)=>{let n=setTimeout(()=>{T.delete(n),e()},t);T.add(n)},D=()=>{T.forEach(clearTimeout),T.clear()},O={tileColor:t.tileColor||`#191b20`,tileText:t.tileTextColor||`#f6f7fb`,radius:Math.max(0,Number(t.tileRadius??6))},k=e=>{let t=O,n=`1.24em`,r=e=>`position:absolute;left:0;right:0;height:50%;overflow:hidden;${e?`top:0;border-radius:${t.radius}px ${t.radius}px 0 0`:`bottom:0;border-radius:0 0 ${t.radius}px ${t.radius}px`};background:${t.tileColor};backface-visibility:hidden;`,i=e=>`position:absolute;left:0;width:100%;height:${n};line-height:${n};text-align:center;${e?`top:0`:`bottom:0`};color:${t.tileText};`,a=(t,n)=>{let a=document.createElement(`span`);a.setAttribute(`aria-hidden`,`true`),a.style.cssText=r(t)+(n?`transform-origin:50% ${t?`100%`:`0%`};will-change:transform;z-index:3;`:`z-index:1;`);let o=document.createElement(`span`);return o.style.cssText=i(t),o.textContent=e,a.appendChild(o),{half:a,glyph:o}},o=document.createElement(`span`);o.className=`kt-counter-digit kt-counter-clock-digit kt-counter-flip-cell`,o.style.cssText=`display:inline-block;position:relative;width:1.34ch;height:1.24em;perspective:340px;${w.hasShadow?`filter:${w.shadow};`:``}margin:0 1px;`;let s={topStatic:a(!0,!1),bottomStatic:a(!1,!1),topFlap:a(!0,!0),bottomFlap:a(!1,!0)};s.bottomFlap.half.style.transform=`rotateX(90deg)`,o.append(s.topStatic.half,s.bottomStatic.half,s.topFlap.half,s.bottomFlap.half);let c=document.createElement(`span`);return c.className=`kt-counter-seam`,c.setAttribute(`aria-hidden`,`true`),c.style.cssText=`position:absolute;left:0;right:0;top:50%;height:1px;margin-top:-0.5px;background:${w.seam};z-index:4;pointer-events:none;`,o.appendChild(c),{viewport:o,parts:s,value:e}},A=(e,t)=>{let n=e.value;e.value=t;let r=e.parts;if(!r.topFlap.half.animate){[r.topStatic,r.bottomStatic,r.topFlap,r.bottomFlap].forEach(e=>{e.glyph.textContent=t});return}let i=Math.max(40,d*1.5/2);r.topStatic.glyph.textContent=t,r.bottomStatic.glyph.textContent=n,r.topFlap.glyph.textContent=n,r.bottomFlap.glyph.textContent=t,r.topFlap.half.style.transform=`rotateX(0deg)`,r.bottomFlap.half.style.transform=`rotateX(90deg)`,r.bottomStatic.half.style.visibility=`hidden`;let a=[{transform:`rotateX(0deg)`,filter:`brightness(1)`},{transform:`rotateX(-90deg)`,filter:`brightness(.6)`}],o=[{transform:`rotateX(90deg)`,filter:`brightness(.6)`},{transform:`rotateX(0deg)`,filter:`brightness(1)`}];r.topFlap.half.animate(a,{duration:i,easing:`cubic-bezier(.55,0,.85,.5)`,fill:`forwards`}),E(()=>{r.bottomFlap.half.animate(o,{duration:i,easing:`cubic-bezier(.15,.6,.3,1.15)`,fill:`forwards`}),E(()=>{r.bottomStatic.glyph.textContent=t,r.bottomStatic.half.style.visibility=`visible`},i)},i)},j=[],M=null,N=null,P=``,F=new Set,I=e=>e!=null&&(e>0||t.showDays===!0),L=e=>`${I(e.days)?String(e.days).length:0}|${e.text.length}`,R=t=>{D(),F.forEach(e=>e.cancel()),F.clear(),e.innerHTML=``,j=[],M=null,N=null,Wn(e,p,`kt-counter-prefix`),I(t.days)&&(N=document.createElement(`span`),N.className=`kt-counter-days`,N.style.cssText=`margin-right:.5ch;`,N.textContent=`${t.days}${f}`,e.appendChild(N));for(let n of t.text)if(/\d/.test(n)){let t=u===`flip`?k(n):C(n);e.appendChild(t.viewport),j.push(t)}else{let t=Gn(e,n,`kt-counter-separator kt-counter-clock-separator`);if(l&&n===c){let e=Hn(t);e&&F.add(e)}j.push(null)}s&&!h&&!g&&(M=document.createElement(`span`),M.className=`kt-counter-suffix kt-counter-meridiem`,M.style.cssText=`margin-left:.4ch;font-size:.55em;opacity:.75;align-self:center;`,M.textContent=t.meridiem,e.appendChild(M)),Wn(e,m,`kt-counter-suffix`),x(B(t))},z=(e,r)=>{if(u===`flip`){A(e,r);return}e.value=r;let i=e.stack.firstChild;if(u===`instant`||!e.stack.animate){i.textContent=r;return}if(u===`fade`){e.stack.animate([{opacity:1},{opacity:0,offset:.45},{opacity:0,offset:.55},{opacity:1}],{duration:d,easing:`ease`}),E(()=>{i.textContent=r},d/2);return}let a=(t.rollDirection||(h?`down`:`up`))===`down`,o=document.createElement(`span`);if(o.style.cssText=`display:block;height:${n}px;line-height:${n}px;`,o.textContent=r,a)for(e.stack.insertBefore(o,e.stack.firstChild);e.stack.children.length>2;)e.stack.lastChild.remove();else for(e.stack.appendChild(o);e.stack.children.length>2;)e.stack.firstChild.remove();let s=e.stack.animate(a?[{transform:`translateY(-${n}px)`},{transform:`translateY(0)`}]:[{transform:`translateY(0)`},{transform:`translateY(-${n}px)`}],{duration:d,easing:`cubic-bezier(.3,.7,.25,1)`,fill:`forwards`});s.finished.catch(()=>{}).finally(()=>{e.stack.children.length>1&&(a?e.stack.lastChild.remove():e.stack.firstChild.remove()),s.cancel?.()})},B=e=>`${I(e.days)?`${e.days}${f} `:``}${e.text}${e.meridiem?` ${e.meridiem}`:``}`,V=e=>b.set(B(e)),H=y();P=L(H),R(H);let U=!0,ee=()=>{if(!U)return;let e=y(),t=L(e);if(t!==P)P=t,R(e);else{if(Array.from(e.text).forEach((e,t)=>{let n=j[t];n&&n.value!==e&&z(n,e)}),N){let t=`${e.days}${f}`;N.textContent!==t&&(N.textContent=t)}M&&M.textContent!==e.meridiem&&(M.textContent=e.meridiem)}V(e)},W=setInterval(ee,Xn),te=null,G=()=>{h&&!_&&(te=setTimeout(()=>{te=null,y()},Math.max(0,h.getTime()-Date.now())+Yn))},K=()=>{clearTimeout(te),te=null},q=()=>{K(),U||(U=!0,W=setInterval(ee,Xn))};S({kill:()=>{U=!1,clearInterval(W),D(),K(),F.forEach(e=>e.cancel())},pause:()=>{U=!1,clearInterval(W),K(),G(),F.forEach(e=>e.pause())},resume:()=>{q(),F.forEach(e=>e.play())},restart:q})}else{let r=Kn(e,t.lineHeight);e.innerHTML=``,e.style.display=`inline-flex`,e.style.alignItems=`flex-end`,e.style.overflow=`hidden`,Wn(e,p,`kt-counter-prefix`);let i=g.replace(/\D/g,``).length,a=String(Math.round(Math.abs(c))).padStart(i,`0`).slice(-i),o=u>=c,s=[],l=0;for(let n of g){if(!/\d/.test(n)){Gn(e,n,`kt-counter-separator`);continue}let i=Number(n),c=Number(a[l]||`0`);l+=1;let u=Math.max(0,Number(t.loops??3+Math.floor(Math.random()*2))),d=(o?((i-c)%10+10)%10:((c-i)%10+10)%10)+u*10,f=document.createElement(`span`);f.className=`kt-counter-slot`,qn(f,r,`display:inline-block;vertical-align:bottom;`);let p=document.createElement(`span`);p.className=`kt-counter-reel`,p.style.cssText=`display:flex;flex-direction:column;will-change:transform;`;let m=[];for(let e=0;e<=d;e+=1)m.push(o?(c+e)%10:((c-e)%10+10)%10);o||m.reverse(),m.forEach(e=>{let t=document.createElement(`span`);t.textContent=String(e),t.style.cssText=`height:${r}px;line-height:${r}px;display:flex;align-items:center;justify-content:center;`,p.appendChild(t)}),f.appendChild(p),e.appendChild(f),s.push({reel:p,fromY:o?0:-(d*r),toY:o?-(d*r):0})}if(Wn(e,m,`kt-counter-suffix`),x(_),n){let r=n.timeline({delay:Number(t.delay??0),scrollTrigger:v,onComplete:()=>t.onComplete?.(e)});s.forEach(({reel:e,fromY:n,toY:i},a)=>{r.fromTo(e,{y:n},{y:i,duration:d+a*Number(t.stagger??.1),ease:t.ease||`power3.inOut`},0)}),S(r)}else s.forEach(({reel:e,toY:t})=>{e.style.transform=`translateY(${t}px)`}),t.onComplete?.(e)}t.separatorColor&&e.querySelectorAll(`.kt-counter-separator`).forEach(e=>{e.style.color=`var(--kt-counter-separator,${t.separatorColor})`}),t.blinkSeparators===!0&&s!==`clock`&&s!==`plain`&&e.querySelectorAll(`.kt-counter-separator`).forEach(e=>{let t=Hn(e);t&&S({kill:()=>t.cancel(),pause:()=>t.pause(),resume:()=>t.play()})});let w=new Set,T=e=>typeof e.paused==`function`;return{el:e,type:`counter`,replay:()=>y.forEach(e=>e.restart?.()),pause:()=>y.forEach(e=>{if(!T(e)){e.pause?.();return}e.paused()||(e.pause(),w.add(e))}),resume:()=>y.forEach(e=>{T(e)?w.delete(e)&&e.resume():e.resume?.()}),destroy:()=>{C(),b?.restore(),e.innerHTML=r,i==null?e.removeAttribute(`style`):e.setAttribute(`style`,i),a()}}},reduced(e,t){let n=e.innerHTML,r=e.getAttribute(`style`);if((t.secondsOnly===!0?`clock`:t.mode||t.preset||t.style||`slot`)===`clock`){let i=Z(t.clockSeparator,`:`),a=t.seconds!==!1,o=t.hour12===!0,s=t=>{e.textContent!==t&&(e.textContent=t)},c=()=>{let e=e=>String(e).padStart(2,`0`),n=t.secondsOnly===!0;if(t.until||t.since){let r=t.until?new Date(t.until):new Date(t.since),o=Math.max(0,t.until?r.getTime()-Date.now():Date.now()-r.getTime());if(n){let e=Math.max(1,Math.round(Number(t.secondsDigits??3)));s(`${String(Math.floor(o/1e3)).padStart(e,`0`)}${String(t.secondsLabel??`S`)}`);return}let c=Math.floor(o/864e5),l=[e(Math.floor(o/36e5)%24),e(Math.floor(o/6e4)%60)];a&&l.push(e(Math.floor(o/1e3)%60));let u=c>0||t.showDays===!0?`${c}${t.daysLabel??`d`} `:``;s(`${Z(t.prefix)}${u}${l.join(i)}${Z(t.suffix)}`);return}let r=new Date;if(n){let e=Math.max(1,Math.round(Number(t.secondsDigits??3)));s(`${String(r.getSeconds()).padStart(e,`0`)}${String(t.secondsLabel??`S`)}`);return}let c=r.getHours(),l=``;o&&(l=c>=12?` PM`:` AM`,c=c%12||12);let u=[e(c),e(r.getMinutes())];a&&u.push(e(r.getSeconds())),s(`${Z(t.prefix)}${u.join(i)}${l}${Z(t.suffix)}`)};c();let l=setInterval(c,Zn);return{el:e,type:`counter`,pause(){clearInterval(l),l=null},resume(){l??=(c(),setInterval(c,Zn))},destroy(){clearInterval(l),e.innerHTML=n,r==null?e.removeAttribute(`style`):e.setAttribute(`style`,r)}}}let i=Math.max(0,Number(t.decimals??0)),a=Number.parseFloat((e.textContent||``).replace(/[^0-9.-]/g,``)),o=Number(t.to??(Number.isFinite(a)?a:0)),s=Vn(t);return e.textContent=`${Z(t.prefix)}${Ye(o,{decimals:i,format:s,locale:t.locale})}${Z(t.suffix)}`,{el:e,type:`counter`,pause(){},resume(){},destroy(){e.innerHTML=n,r==null?e.removeAttribute(`style`):e.setAttribute(`style`,r)}}}};function er(e,t=``){if(e instanceof Date&&!Number.isNaN(e.getTime()))return e;if(typeof e==`number`&&Number.isFinite(e))return new Date(e<0xe8d4a51000?e*1e3:e);let n=String(e??``).trim();if(!n)return null;if(/^\d{10,13}$/.test(n))return er(Number(n),t);let r=/^ko(?:-|$)/i.test(String(t)),i=(e,t,n)=>{let r=new Date(Date.UTC(Number(e),Number(t)-1,Number(n)));return r.getUTCFullYear()===Number(e)&&r.getUTCMonth()===Number(t)-1&&r.getUTCDate()===Number(n)},a=(e=`0`,t=`0`,n=`0`,r=`0`)=>{let i=Number(e),a=Number(t),o=Number(n),s=String(r),c=Number(s.slice(0,3).padEnd(3,`0`));return/^\d+$/.test(s)&&Number.isInteger(i)&&i>=0&&i<=23&&Number.isInteger(a)&&a>=0&&a<=59&&Number.isInteger(o)&&o>=0&&o<=59&&Number.isInteger(c)&&c>=0&&c<=999},o=(e=`0`)=>{let t=String(e);return/^\d+$/.test(t)?t.slice(0,3).padEnd(3,`0`):null},s=e=>{if(!e)return``;if(String(e).toUpperCase()===`Z`)return`Z`;let t=String(e).match(/^([+-])(\d{2}):?(\d{2})$/);return!t||Number(t[2])>23||Number(t[3])>59?null:`${t[1]}${t[2]}:${t[3]}`},c=n.match(/^(\d{4})[-/.](\d{1,2})[-/.](\d{1,2})(?:(?:[T\s]+)(\d{1,2})(?::?(\d{2}))?(?::?(\d{2})(?:\.(\d+))?)?\s*(Z|[+-]\d{2}:?\d{2})?)?$/i);if(c){let[,e,t,n,l,u=`0`,d=`0`,f=`0`,p]=c;if(!i(e,t,n))return null;let m=s(p);if(p&&!m)return null;if(l===void 0){if(p)return null;let i=r?new Date(`${e}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}T00:00:00.000+09:00`):new Date(`${e}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}`);return Number.isNaN(i.getTime())?null:i}if(!a(l,u,d,f))return null;let h=m||(r?`+09:00`:``),g=o(f);if(!g)return null;let _=`${e}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}T${String(l).padStart(2,`0`)}:${String(u).padStart(2,`0`)}:${String(d).padStart(2,`0`)}.${g}${h}`,v=new Date(_);return Number.isNaN(v.getTime())?null:v}let l=new Date(n);if(!Number.isNaN(l.getTime())&&(/^\d{4}-\d{2}-\d{2}(?:$|[T\s])/.test(n)||/^[A-Za-z]{3},\s/.test(n)))return l;let u=n.match(/^(\d{4})(\d{2})(\d{2})(?:(\d{2})(\d{2})(\d{2})(?:\.(\d{1,3}))?)?$/);if(u){let[,e,t,n,o=`0`,s=`0`,c=`0`,l=`0`]=u;if(!i(e,t,n)||!a(o,s,c,l))return null;let d=`${e}-${t}-${n}T${o.padStart(2,`0`)}:${s.padStart(2,`0`)}:${c.padStart(2,`0`)}.${l.padEnd(3,`0`)}${r?`+09:00`:``}`,f=new Date(d);return Number.isNaN(f.getTime())?null:f}let d=n.match(/^(\d{4})\s*년\s*(\d{1,2})\s*월\s*(\d{1,2})\s*일(?:\s*(\d{1,2})\s*시)?(?:\s*(\d{1,2})\s*분)?(?:\s*(\d{1,2})\s*초)?$/);if(d){let[,e,t,n,r=`0`,o=`0`,s=`0`]=d;if(!i(e,t,n)||!a(r,o,s))return null;let c=new Date(`${e}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}T${r.padStart(2,`0`)}:${o.padStart(2,`0`)}:${s.padStart(2,`0`)}+09:00`);return Number.isNaN(c.getTime())?null:c}let f=n.match(/^(\d{4})\s*년\s*(\d{1,2})\s*월\s*(\d{1,2})\s*일(?:\s+(\d{1,2})(?::(\d{2})(?::(\d{2}))?)?)?$/);if(f){let[,e,t,n,r=`0`,o=`0`,s=`0`]=f;if(!i(e,t,n)||!a(r,o,s))return null;let c=new Date(`${e}-${t.padStart(2,`0`)}-${n.padStart(2,`0`)}T${r.padStart(2,`0`)}:${o.padStart(2,`0`)}:${s.padStart(2,`0`)}+09:00`);return Number.isNaN(c.getTime())?null:c}let p=n.match(/^(\d{1,2})[./-](\d{1,2})[./-](\d{4})(?:[ T](\d{1,2}):?(\d{2})?(?::?(\d{2})(?:\.(\d+))?)?\s*(Z|[+-]\d{2}:?\d{2})?)?$/i);if(p){let[,e,n,c,l,u,d,f=`0`,m]=p,h=l??`0`,g=u??`0`,_=d??`0`,v=Number(e),y=Number(n),b=/^en-US(?:-|$)/i.test(String(t)),x=v>12?y:y>12||b?v:y,S=v>12?v:y>12||b?y:v,C=s(m);if(m&&!C)return null;if(x>=1&&x<=12&&S>=1&&S<=31&&i(c,x,S)&&a(h,g,_,f)){if(r||C){let e=o(f);if(!e)return null;let t=C||`+09:00`;return new Date(`${c}-${String(x).padStart(2,`0`)}-${String(S).padStart(2,`0`)}T${String(h).padStart(2,`0`)}:${String(g).padStart(2,`0`)}:${String(_).padStart(2,`0`)}.${e}${t}`)}return new Date(Number(c),x-1,S,Number(h),Number(g),Number(_),Number(o(f)))}}let m=n.replace(/\./g,`-`).replace(/\//g,`-`),h=new Date(m);return Number.isNaN(h.getTime())?null:h}var tr=[[`year`,315576e5],[`month`,26298e5],[`week`,6048e5],[`day`,864e5],[`hour`,36e5],[`minute`,6e4],[`second`,1e3]];function nr(e,t,n){let r=String(n.relativeUnit||`auto`),[i,a]=tr.find(([e])=>e===r)||tr.find(([,t])=>Math.abs(e)>=t)||tr.at(-1),o=e/a,s=String(n.relativeRounding||`round`),c=s===`floor`?Math.floor(o):s===`ceil`?Math.ceil(o):s===`trunc`?Math.trunc(o):Math.round(o);return new Intl.RelativeTimeFormat(t||void 0,{numeric:n.numeric||`auto`,style:n.relativeStyle||`long`}).format(c,i)}function rr(e,t){let n=Number(t.relativeCutoff??0);if(!Number.isFinite(n)||n<=0)return!1;let r=tr.find(([e])=>e===String(t.relativeCutoffUnit||`day`));return!!r&&Math.abs(e)>=n*r[1]}var ir={create(e,t){let n=e.innerHTML,r=e.getAttribute(`style`),i=xe(e,[`aria-label`,`aria-live`,`datetime`]),a=t.locale||document.documentElement.lang||void 0,o=er(t.value??t.date??t.datetime??t.source??e.getAttribute(`datetime`)??e.textContent,a),s=t.mode||t.preset||`relative`,c=Math.max(1e3,Number(t.updateInterval??3e4)),l=()=>{if(!o){e.textContent=t.fallback||n||``;return}let r=t.now?new Date(t.now).getTime():Date.now(),i=o.getTime()-r,c=nr(i,a,t),l=new Intl.DateTimeFormat(a,{dateStyle:t.dateStyle||`medium`,timeStyle:t.timeStyle||void 0,timeZone:t.timeZone||void 0}).format(o);e.textContent=s===`absolute`?l:s===`both`?`${c} · ${l}`:rr(i,t)?l:c,e.setAttribute(`datetime`,o.toISOString()),e.setAttribute(`aria-label`,e.textContent)};e.setAttribute(`aria-live`,`off`),l();let u=s===`absolute`||t.live===!1?null:setInterval(l,c);return{el:e,type:`dateTime`,render:l,destroy(){u&&clearInterval(u),e.innerHTML=n,r==null?e.removeAttribute(`style`):e.setAttribute(`style`,r),i()}}},reduced(e,t){return this.create(e,t)}},ar=[0,2,3,1],or=e=>{let t=e.length,n=[];for(let r=0;r{let t=[[0]];for(;t.length{let t=e.length,n=t*t;return e.map(e=>e.map(e=>(e+.5)/n))},ur=Object.freeze({"2x2":lr(sr(2)),"4x4":lr(sr(4)),"8x8":lr(sr(8)),"16x16":lr(sr(16)),cluster:lr(cr)}),dr=(e,t,n)=>{let r=52.9829189*(.06711056*(e+n*1.7)+.00583715*(t+n));return r-Math.floor(r)},fr=Object.freeze([`8x8`,`4x4`,`2x2`,`16x16`,`cluster`,`noise`,`random`,`floyd-steinberg`,`atkinson`]),pr=Object.freeze([`dot`,`square`,`line`,`cross`,`diamond`,`ring`,`triangle`]),mr=`@%#*+=-:. `;function hr(e){let t=(Number(e)||2654435769)>>>0;return()=>{t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}var gr=256,_r=`#010203`,vr=new Map,yr=/^var\(\s*(--[\w-]+)\s*(?:,\s*([\s\S]+?)\s*)?\)$/;function br(e,t=null){let n=String(e??``).trim(),r=yr.exec(n);if(!r)return n;if(typeof window>`u`||typeof getComputedStyle!=`function`)return r[2]||``;let i=(t&&t.nodeType===1?t:null)||(typeof document<`u`?document.documentElement:null);return i?getComputedStyle(i).getPropertyValue(r[1]).trim()||r[2]||``:r[2]||``}function xr(e,t=[0,0,0],n=null){let r=br(e,n);if(!r)return t;if(vr.has(r))return vr.get(r);let i=typeof document<`u`?document.createElement(`canvas`).getContext(`2d`):null;if(!i)return t;let a=t;if(i.fillStyle=_r,i.fillStyle=r,i.fillStyle!==_r||r.toLowerCase()===_r){i.fillRect(0,0,1,1);let[e,t,n]=i.getImageData(0,0,1,1).data;a=[e,t,n]}return vr.size>=gr&&vr.clear(),vr.set(r,a),a}var Sr=(e,t,n)=>e+(t-e)*n,Cr=(e,t,n)=>(.2126*e+.7152*t+.0722*n)/255;function wr(e,t,n,r){let i=Math.max(n/e,r/t),a=Math.min(e,n/i),o=Math.min(t,r/i);return{sx:(e-a)/2,sy:(t-o)/2,sw:a,sh:o}}function Tr(e){return e?e.videoWidth||e.videoHeight?{width:e.videoWidth,height:e.videoHeight}:e.naturalWidth||e.naturalHeight?{width:e.naturalWidth,height:e.naturalHeight}:{width:e.width||0,height:e.height||0}:{width:0,height:0}}function Er(e,t,n,r){let i=e*374761393+t*668265263+n*2246822519+r|0;return i=Math.imul(i^i>>>13,1274126177),((i^i>>>16)>>>0)/4294967296}function Dr(e,t,n,r){let i=Math.max(3,n),a=e=>e*e*(3-2*e),o=e/i,s=t/i,c=Math.floor(o),l=Math.floor(s),u=a(o-c),d=a(s-l),f=Er(c,l,0,r)*(1-u)+Er(c+1,l,0,r)*u,p=Er(c,l+1,0,r)*(1-u)+Er(c+1,l+1,0,r)*u;return J((f*(1-d)+p*d)*.82+Er(e,t,0,r)*.18,0,1)}var Or=Object.freeze([`none`,`drift`,`shuffle`,`scan`,`flow`,`pulse`]),kr=Object.freeze([`none`,`lens`,`spotlight`,`ripple`]);function Ar(e,t={}){return{style:e,originalColors:t.originalColors===!0,paper:xr(t.paperColor,[244,241,234],t.scope),ink:xr(t.inkColor,[17,17,17],t.scope),accent:t.accentColor?xr(t.accentColor,[0,0,0],t.scope):null,colorSteps:J(Math.round(Number(t.colorSteps??(e===`dither`?2:4))),2,8),inverted:t.inverted===!0,seed:t.seed,type:fr.includes(t.type)?t.type:`8x8`,shape:pr.includes(t.shape)?t.shape:`dot`,angle:X(t.angle,0,0,90),chars:typeof t.chars==`string`&&t.chars.length>=2?t.chars:mr,font:t.font||`ui-monospace, "SF Mono", Menlo, Consolas, monospace`,contrast:X(t.contrast,1,0,3),brightness:X(t.brightness,0,-1,1),...jr(t)}}function jr(e={}){return{motion:Or.includes(e.motion)?e.motion:`none`,motionSpeed:X(e.motionSpeed,1,.05,6),motionAmount:X(e.motionAmount,.5,0,1),pointer:kr.includes(e.pointer)?e.pointer:`none`,pointerRadius:X(e.pointerRadius,140,10,1200),pointerStrength:X(e.pointerStrength,.6,0,1),pointerCellSize:X(e.pointerCellSize,0,0,64)}}var Mr=Object.freeze([`motion`,`motionSpeed`,`motionAmount`,`pointer`,`pointerRadius`,`pointerStrength`,`pointerCellSize`]);function Nr(e,t,{maxDpr:n=2}={}){let r=e.getContext(`2d`,{alpha:!0,desynchronized:!0}),i=document.createElement(`canvas`),a=i.getContext(`2d`,{alpha:!0,willReadFrequently:!0}),o=(Number(t.seed)||2654435769)|0,s=hr(t.seed),c=0,l=0,u=1,d=null,f=t.type===`floyd-steinberg`?[[1,0,7/16],[-1,1,3/16],[0,1,5/16],[1,1,1/16]]:t.type===`atkinson`?[[1,0,1/8],[2,0,1/8],[-1,1,1/8],[0,1,1/8],[1,1,1/8],[0,2,1/8]]:null,p=t.type===`atkinson`?3:2,m=(t,i)=>{u=J(typeof window<`u`&&window.devicePixelRatio||1,1,n),c=Math.max(1,Math.round(Math.max(1,t)*u)),l=Math.max(1,Math.round(Math.max(1,i)*u)),(e.width!==c||e.height!==l)&&(e.width=c,e.height=l),r.setTransform(1,0,0,1,0,0)},h=(e,t,n=0,r=0)=>{let{width:o,height:s}=Tr(e);if(!o||!s)return null;let u=n!==0||r!==0,d=Math.max(1,Math.ceil(c/t)+ +!!u),f=Math.max(1,Math.ceil(l/t)+ +!!u);(i.width!==d||i.height!==f)&&(i.width=d,i.height=f);let p=wr(o,s,c,l),m=d*t/c,h=f*t/l;a.imageSmoothingEnabled=!0,a.clearRect(0,0,d,f);try{a.drawImage(e,p.sx,p.sy,p.sw*m,p.sh*h,0,0,d,f);let i=a.getImageData(0,0,d,f);return{cols:d,rows:f,cell:t,originX:-n,originY:-r,imageData:i,data:i.data}}catch{return null}},g=(e,t)=>Math.round(e*(t-1))/(t-1),_=(e,n,r=null)=>{if(t.originalColors){let e=t.colorSteps;return n.map(t=>{let n=t/255*(e-1);if(r==null)return Math.round(g(t/255,e)*255);let i=Math.floor(n);return Math.round(J((i+ +(n-i>r))/(e-1),0,1)*255)})}let i=t.paper,a=t.ink;return t.accent&&e>0&&e<1&&(e<.5?(a=t.accent,e*=2):(i=t.accent,e=e*2-1)),[Sr(i[0],a[0],e),Sr(i[1],a[1],e),Sr(i[2],a[2],e)]},v=([e,t,n])=>`rgb(${Math.round(e)},${Math.round(t)},${Math.round(n)})`,y=e=>J((e-.5)*t.contrast+.5+t.brightness,0,1),b=(e,n)=>{let r=y(Cr(e[n],e[n+1],e[n+2])),i=e[n+3]/255;return J((t.inverted?r:1-r)*i,0,1)},x=(e,n,r,i)=>{let{motion:a,motionAmount:s,motionSpeed:c}=t,l=(r||0)/1e3,d=Math.floor(l*c*18),f=l*c,p=Math.max(1,e.rows*.12),m=(f*.45%1.3-.15)*e.rows,h=a===`pulse`?Math.sin(f*2.2)*.22*s:0,g=a===`drift`?Math.floor(f*3.1):0,_=a===`drift`?Math.floor(f*2.3):0,v=a===`drift`?(e,t)=>Math.sin(e*.21+t*.16-f*2.6)*.05*s:null,y=a===`drift`?f*5:0,b=i&&i.active?i.x:null,x=i&&i.active?i.y:null,S=t.pointerRadius*u,C=t.pointerStrength,w=t.pointer!==`none`&&b!=null;return{pulse:h,noisePhase:y,falloff(e,t){if(!w)return 1;let n=Math.hypot(e-b,t-x)/S;return n>=1?1:n*n*(3-2*n)},driftX:g,driftY:_,inkShift(e,r,i,u){let f=h;if(v&&(f+=v(e,r)),a===`shuffle`&&Er(e,r,d,o^20973)0){if(t.pointer===`spotlight`)f+=e*C*.7;else if(t.pointer===`ripple`){let t=Math.sin(Math.hypot(i-b,u-x)/(n*2)-l*4*c);f+=e*t*C*.5}}}return f},thresholdShift(e,t){return a===`drift`?(Er(e,t,d,o^40503)-.5)*.14*s:a===`shuffle`&&Er(e,t,d,o^20973){let{cols:o,rows:c,cell:l,data:u,originX:m,originY:h}=e,v=t.colorSteps,y=ur[t.type],x=t.originalColors?3:1,S=o*x;if(f){let e=S*p;!d||d.length!==e?d=new Float32Array(e):d.fill(0)}let C=(e,t,n,r)=>{for(let[i,a,s]of f){let l=e+i;l>=0&&lo))/(v-1),0,1))}}u[i]=p[0],u[i+1]=p[1],u[i+2]=p[2],u[i+3]=255}f&&(d.copyWithin(0,S),d.fill(0,-S))}a.putImageData(e.imageData,0,0),r.imageSmoothingEnabled=!1,r.drawImage(i,0,0,o,c,m,h,o*l,c*l)},C={square(e,t,n,r,i){let a=r*Math.sqrt(i);e.fillRect(t-a/2,n-a/2,a,a)},line(e,t,n,r,i){let a=Math.max(.5,r*i);e.fillRect(t-r/2,n-a/2,r,a)},cross(e,t,n,r,i){let a=r*Math.sqrt(i),o=Math.max(.5,a*.36);e.fillRect(t-a/2,n-o/2,a,o),e.fillRect(t-o/2,n-a/2,o,a)},diamond(e,t,n,r,i){let a=r/2*Math.sqrt(i)*1.35;e.beginPath(),e.moveTo(t,n-a),e.lineTo(t+a,n),e.lineTo(t,n+a),e.lineTo(t-a,n),e.closePath(),e.fill()},ring(e,t,n,r,i){let a=r/2*Math.sqrt(i),o=Math.max(.5,a*(1-i*.85));e.beginPath(),e.arc(t,n,Math.max(o/2,a-o/2),0,Math.PI*2),e.lineWidth=o,e.strokeStyle=e.fillStyle,e.stroke()},triangle(e,t,n,r,i){let a=r/2*Math.sqrt(i)*1.5;e.beginPath(),e.moveTo(t,n-a),e.lineTo(t+a*.866,n+a*.5),e.lineTo(t-a*.866,n+a*.5),e.closePath(),e.fill()},dot(e,t,n,r,i){e.beginPath(),e.arc(t,n,r/2*Math.sqrt(i),0,Math.PI*2),e.fill()}},w={dither:S,halftone:(e,n)=>{let{cols:i,rows:a,cell:o,data:s,originX:u,originY:d}=e;r.fillStyle=v(t.paper),r.fillRect(0,0,c,l);let f=C[t.shape]||C.dot;t.originalColors||(r.fillStyle=v(t.ink));let p=(e,t,r,o)=>{let c=(J(t,0,a-1)*i+J(e,0,i-1))*4;return{index:c,ink:J(b(s,c)+n.inkShift(e,t,r,o),0,1)}},m=(e,n,i,a)=>{let{index:c,ink:l}=p(e,n,i,a);l<=.02||(t.originalColors&&(r.fillStyle=v(_(l,[s[c],s[c+1],s[c+2]]))),f(r,i,a,o,l))};if(!t.angle){for(let e=0;ec+o||r>l+o||m(Math.floor((n-u)/o),Math.floor((r-d)/o),n,r)}},ascii:(e,n)=>{let{cols:i,rows:a,cell:o,data:s,originX:u,originY:d}=e,f=t.chars;r.fillStyle=v(t.paper),r.fillRect(0,0,c,l),r.font=`${Math.max(4,o*1.15)}px ${t.font}`,r.textAlign=`center`,r.textBaseline=`middle`,t.originalColors||(r.fillStyle=v(t.ink));for(let e=0;ee.classList?.contains(t)))}function Ir(e,{className:t=`kt-lazy-wrap`,display:n,aspectRatio:r,height:i}={}){let a=e.parentElement,o=!1,s=a?.getAttribute(`style`)??null;Fr(a)||(a=document.createElement(`span`),a.className=t,e.parentNode?.insertBefore(a,e),a.appendChild(e),o=!0,a.style.position=`relative`),a.style.overflow=`hidden`,a.style.display=n||`block`,a.style.lineHeight=`0`,a.style.width=`100%`;let c=r||e.getAttribute(`data-aspect-ratio`),l=Number(e.getAttribute(`width`)),u=Number(e.getAttribute(`height`));c?a.style.aspectRatio=String(c).replace(`:`,` / `):l>0&&u>0&&(a.style.aspectRatio=`${l} / ${u}`),i&&(a.style.height=typeof i==`number`?`${i}px`:String(i));let d=!c&&!(l>0&&u>0)&&!i,f=()=>({parentHeight:o&&a.parentElement?.getBoundingClientRect().height||0,ownHeight:a.getBoundingClientRect().height}),p=({parentHeight:e,ownHeight:t})=>{o&&e>2?a.style.height=`100%`:t<2&&(a.style.aspectRatio=`16 / 9`)},m=null,h=()=>{if(typeof ResizeObserver>`u`){p(f());return}m=new ResizeObserver(()=>{a.isConnected&&a.getClientRects().length&&(m.disconnect(),m=null,p(f()))}),m.observe(a)},g=Ge(()=>({position:o?`relative`:getComputedStyle(a).position,radius:getComputedStyle(e).borderRadius,drawn:d&&a.getClientRects().length>0,box:d?f():null}),({position:e,radius:t,drawn:n,box:r})=>{a.isConnected&&(e===`static`&&(a.style.position=`relative`),t&&t!==`0px`&&(a.style.borderRadius=t),d&&(n?p(r):h()))});return{wrapper:a,created:o,originalWrapperStyle:s,cancel:()=>{g(),m?.disconnect(),m=null}}}function Lr(e,{wrapper:t,created:n,originalWrapperStyle:r,cancel:i}){i?.(),n&&t.parentNode?(t.parentNode.insertBefore(e,t),t.remove()):n||(r==null?t.removeAttribute(`style`):t.setAttribute(`style`,r))}function Rr(e,t,n=2){let r=document.createElement(`span`);return r.className=t,r.setAttribute(`aria-hidden`,`true`),r.style.cssText=`position:absolute;inset:0;z-index:${n};display:block;overflow:hidden;pointer-events:none;border-radius:inherit;`,e.appendChild(r),r}var zr=Object.freeze([`dither`,`ascii`,`halftone`]),Br=new Set(zr),Vr={dither:6,ascii:12,halftone:8},Hr={dither:2,ascii:5,halftone:3},Ur=.7,Wr=Object.freeze([`shrink`,`dissolve`,`wipe`]),Gr=/\.(?:gif|apng|webp)(?:$|[?#])/i;function Kr(e){let t={x:0,y:0,active:!1},n=n=>{let r=e.getBoundingClientRect();t.x=n.clientX-r.left,t.y=n.clientY-r.top,t.active=!0},r=()=>{t.active=!1};return e.addEventListener(`pointermove`,n,{passive:!0}),e.addEventListener(`pointerdown`,n,{passive:!0}),e.addEventListener(`pointerleave`,r,{passive:!0}),{state:t,destroy(){e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerdown`,n),e.removeEventListener(`pointerleave`,r)}}}function qr(e){return Br.has(e)}function Jr(e,t){let n=Number(e??t);return Number.isFinite(n)?n<=30?n*1e3:n:t*1e3}function Yr(e,t,n){let r=J(e/Ur,0,1),i=J((e-Ur)/.30000000000000004,0,1);return{cell:t*(n/t)**+r,layerOpacity:1-i}}function Xr(e,t={},{lowTier:n=!1,persistFps:r=24,revealFps:i=24,maxDpr:a=2}={}){if(!Br.has(e))return null;let o=t.persist===!0,s=J(Number(t.cellSize??Vr[e]),2,64),c={scope:t.scope,paperColor:t.paperColor,inkColor:t.inkColor,accentColor:t.accentColor,originalColors:t.originalColors===!0,colorSteps:t.colorSteps,inverted:t.inverted===!0,seed:t.seed,contrast:t.contrast,brightness:t.brightness,motion:t.motion,motionSpeed:t.motionSpeed,motionAmount:t.motionAmount,pointer:t.pointer,pointerRadius:t.pointerRadius,pointerStrength:t.pointerStrength,pointerCellSize:t.pointerCellSize};e===`dither`&&(c.type=t.ditherType),e===`ascii`&&(c.chars=t.asciiChars,c.font=t.asciiFont),e===`halftone`&&(c.shape=t.halftoneShape,c.angle=t.halftoneAngle);let l=Ar(e,c),u=l.motion!==`none`||l.pointer!==`none`,d=t.renderFps??(o?r:i);return{persist:o,live:u,startCell:s,handoffCell:Math.min(s,Hr[e]),transition:Wr.includes(t.transition)?t.transition:`shrink`,styleConfig:l,fps:J(Number(d),4,n?12:60),maxDpr:J(Number(t.maxDpr??a),.5,4),ease:z(t.ease||`cubic-out`)}}function Zr(e,t={},n=null){return n?n.setLiveLook(t):Object.assign(e.styleConfig,jr({...e.styleConfig,...t})),e.live=e.styleConfig.motion!==`none`||e.styleConfig.pointer!==`none`,e.live}function Qr(e,t,n=`kt-stylize`){let r=Rr(e,`${n}-${t}-layer ${n}-stylized-layer`,3),i=document.createElement(`canvas`);return i.className=`${n}-${t}-canvas ${n}-stylized-canvas`,i.style.cssText=`position:absolute;inset:0;width:100%;height:100%;display:block;`,r.appendChild(i),{layer:r,canvas:i}}function $r({el:e,wrapper:t,effect:n,settings:r,prefix:i=`kt-stylize`,drawable:a=()=>e,animatedSource:o=!1,durationMs:s=1600,delayMs:c=60,holdMs:l=0,onProgress:u,onFinish:d,onRendered:f}){let{persist:p,startCell:m,handoffCell:h,transition:g,styleConfig:_,fps:v,maxDpr:y,ease:b}=r,{layer:x,canvas:S}=Qr(t,n,i),C=Nr(S,_,{maxDpr:y}),w=1e3/v,T=r.live,E=_.pointer===`none`?null:Kr(t),D=()=>{_.pointer===`none`?(E?.destroy(),E=null):E||=Kr(t)},O=null,k=null,A=!1,j=!1,M=!1,N=!0,P=0,F=null,I=null,L=!1,R=null,z=-1/0,B=0,V=null,H=()=>M&&!A&&!j&&!document.hidden,U=()=>{H()&&F&&O==null&&(O=requestAnimationFrame(e=>{O=null,H()&&F?.(e)}))},ee=()=>{if(!H()||!I||I.id!=null)return;let e=I;e.at=performance.now(),e.id=setTimeout(()=>{e.id=null,e.remaining=0,H()&&I===e&&(I=null,e.callback())},e.remaining)},W=(e,t)=>{I={callback:e,remaining:Math.max(0,Number(t)||0),id:null,at:0},ee()},te=e=>(V!=null&&(B+=e-V),V=e,B),G=(e,n=B)=>{let r=t.getBoundingClientRect();return C.sync(r.width,r.height),C.render(a(),e,{time:n,pointer:E?.state})},K=()=>{O!=null&&cancelAnimationFrame(O),O=null,V=null,I?.id!=null&&(clearTimeout(I.id),I.remaining=Math.max(0,I.remaining-(performance.now()-I.at)),I.id=null)},q=()=>{K(),I=null,F=null,k?.disconnect(),k=null,L=!1},ne=()=>{let t=P,n=G(m);f?.(n),!(A||t!==P)&&(u?.(1,e),!(A||t!==P)&&n&&X())},Y=e=>{let t=te(e);e-z>=w&&(G(m,t),z=e),U()},re=()=>{k||typeof ResizeObserver>`u`||(k=new ResizeObserver(()=>{A||(H()?G(m):L=!0)}),k.observe(t))};function X(){if(o||T){k?.disconnect(),k=null,F||(F=Y,U());return}F===Y&&(K(),F=null),re()}let ie=()=>{let t=t=>{let n=P,r=te(t);R??=r;let i=J((r-R)/s,0,1);if(t-z>=w||i>=1){let a=J(b(i),0,1),o;if(g===`shrink`){let{cell:e,layerOpacity:t}=Yr(a,m,h);o=G(e,r),x.style.opacity=String(t)}else o=G(m,r),o&&C.mask(a,g,m);if(!o&&z===-1/0){F=null,d?.();return}if(u?.(i,e),A||n!==P)return;z=t}i<1?U():(F=null,W(()=>d?.(),l))};G(m),W(()=>{F=t,U()},c)},ae=()=>{H()&&(N&&(N=!1,p?ne():ie()),L&&(L=!1,G(m)),ee(),U())},oe=()=>{document.hidden?K():ae()};return document.addEventListener(`visibilitychange`,oe),{layer:x,canvas:S,renderer:C,get persist(){return p},setLiveLook(e={}){A||(C.configure(e),T=C.live,D(),p&&M&&X(),p&&M&&!F&&H()&&G(m))},start(){A||M||(M=!0,ae())},pause(){j=!0,K()},resume(){j=!1,ae()},replay(){A||(q(),P++,M=!1,N=!0,R=null,z=-1/0,x.style.opacity=`1`,x.isConnected||t.appendChild(x),this.start())},destroy(){A||(A=!0,q(),document.removeEventListener(`visibilitychange`,oe),E?.destroy(),C.destroy(),x.remove())}}}function ei({el:e,wrapper:t,effect:n,settings:r,prefix:i=`kt-stylize`,durationMs:a=1600,delayMs:o=0,holdMs:s=0,onProgress:c,onFinish:l}){let{persist:u,startCell:d,handoffCell:f,transition:p,styleConfig:m,fps:h,maxDpr:g,ease:_}=r,{layer:v,canvas:y}=Qr(t,n,i),b=Nr(y,m,{maxDpr:g}),x=1e3/h,S=m.pointer===`none`?null:Kr(t),C=null,w=!1,T=!1,E=!1,D=!1,O=0,k=null,A=0,j=-1/0,M=0,N=(n,r=M)=>{if(e.readyState<2)return!1;let i=t.getBoundingClientRect();return b.sync(i.width,i.height),b.render(e,n,{time:r,pointer:S?.state})},P=()=>E&&!w&&!T&&!document.hidden&&!e.paused&&!e.ended&&!D&&e.readyState>=2,F=()=>{C!=null&&cancelAnimationFrame(C),C=null,k=null},I=()=>{P()&&C==null&&(C=requestAnimationFrame(R))},L=()=>{D=!0,F(),v.remove(),l?.()},R=t=>{if(C=null,!P()){k=null;return}if(k!=null&&(O+=t-k),k=t,t-j=o+a+s?L():I())},z=()=>{w||D||(E=!0,I())},B=()=>{document.hidden?F():I()},V=[`pause`,`ended`,`waiting`];return e.addEventListener(`playing`,I),V.forEach(t=>e.addEventListener(t,F)),document.addEventListener(`visibilitychange`,B),{layer:v,canvas:y,renderer:b,get persist(){return u},setLiveLook(e={}){w||(b.configure(e),m.pointer===`none`?(S?.destroy(),S=null):S||=Kr(t),E&&!P()&&N(d))},start:z,pause(){T=!0,F()},resume(){T=!1,I()},replay(){w||(F(),A++,O=0,D=!1,j=-1/0,v.style.opacity=`1`,v.isConnected||t.appendChild(v),z())},destroy(){w||(w=!0,F(),e.removeEventListener(`playing`,I),V.forEach(t=>e.removeEventListener(t,F)),document.removeEventListener(`visibilitychange`,B),S?.destroy(),b.destroy(),v.remove())}}}var ti=`stylize`;function ni(e){return{display:e.display,aspectRatio:e.aspectRatio,height:e.height}}function ri(e,t={}){return t.src||e.dataset.src||e.getAttribute(`data-src`)||e.currentSrc||e.getAttribute(`src`)||``}function ii(e,t,n){let r=Math.max(1,Math.min(t||300,n||200)),i=e=>e<=1?Math.max(1,Math.round(1/Math.max(.004,e))):Math.round(e);if(Array.isArray(e.steps)&&e.steps.length){let t=e.steps.map(Number).filter(e=>Number.isFinite(e)&&e>0).map(i);if(t.length)return t.sort((e,t)=>t-e)}let a=Math.max(2,Math.round(Number(e.pixelStepCount??e.stepCount??8))),o=e.pixelStart!=null||e.pixelEnd!=null,s=o?J(i(J(Number(e.pixelStart??.035),.004,1)),2,200):J(Math.round(r/6),20,96),c=o?i(J(Number(e.pixelEnd??1),.01,1)):1,l=[];for(let e=0;e=l[l.length-1]&&(r=Math.max(c,l[l.length-1]-1)),l.push(r)}return l[l.length-1]=c,l}function ai(e){return e.length>1&&e[e.length-1]<=1?e.slice(0,-1):e.length?e:[2]}function oi(e,t,n={}){let r=document.createElement(`img`);r.className=`kt-lazy-live-image`,r.alt=``,r.setAttribute(`aria-hidden`,`true`),r.loading=`eager`,r.decoding=`async`,n.crossOrigin&&(r.crossOrigin=n.crossOrigin);let i=n.srcset||t.getAttribute(`data-srcset`)||t.getAttribute(`srcset`),a=n.sizes||t.getAttribute(`sizes`);return i&&(r.srcset=i),a&&(r.sizes=a),r.src=e,r.style.cssText=`display:block;width:100%;height:100%;object-fit:${n.objectFit||`cover`};object-position:${n.objectPosition||`50% 50%`};border-radius:inherit;`,r}function si(e,t,n=4){let r=document.createElement(`canvas`);r.className=`kt-lazy-noise`,r.setAttribute(`aria-hidden`,`true`),r.width=Math.max(32,Number(t.noiseWidth??320)),r.height=Math.max(18,Number(t.noiseHeight??180)),r.style.cssText=`position:absolute;inset:0;width:100%;height:100%;z-index:${n};pointer-events:none;mix-blend-mode:${t.noiseBlend||`overlay`};opacity:0;border-radius:inherit;`,e.appendChild(r);let i=r.getContext(`2d`,{alpha:!0}),a=0,o=0,s=1e3/J(Number(t.noiseFps??30),4,60);return{canvas:r,draw:(e=performance.now())=>{if(!i||e-a{let a=new Image;a.decoding=`async`,n.crossOrigin&&(a.crossOrigin=n.crossOrigin);let o=n.srcset||t.getAttribute(`data-srcset`)||t.getAttribute(`srcset`);o&&(a.srcset=o),a.onload=()=>r(a),a.onerror=()=>i(Error(`Kineto lazy image failed to load: ${e}`)),a.src=e,a.complete&&a.naturalWidth&&r(a)})}function ui(e,t={}){let n={style:e.getAttribute(`style`),src:e.getAttribute(`src`),preload:e.getAttribute(`preload`)},r=Array.from(e.querySelectorAll(`source`)),i=t.src||e.dataset.src||e.getAttribute(`data-src`)||``,a=Math.max(0,Number(t.duration??.6))*1e3,o=t.ease||`cubic-bezier(.22,.8,.3,1)`,s=t.once!==!1,c=t.autoplay!==!1;t.muted!==!1&&(e.muted=!0,e.setAttribute(`muted`,``)),t.loop!==!1&&(e.loop=!0),t.playsinline!==!1&&e.setAttribute(`playsinline`,``),e.preload=t.preload||`none`,e.style.opacity=`0`,e.style.transition=`opacity ${a}ms ${o}`,e.style.willChange=`opacity`;let l=!1,u=!1,d=null,f=()=>{if(l)return;l=!0;let t=!1;r.forEach(e=>{let n=e.dataset.src||e.getAttribute(`data-src`);n&&(e.src=n,t=!0)}),i&&(e.src=i,t=!0),t&&e.load()},p=()=>{if(!u){if(e.style.opacity=`1`,c){let t=e.play?.();t&&typeof t.catch==`function`&&t.catch(()=>{})}t.onReveal?.(e)}},m=()=>{f(),e.readyState>=2?p():e.addEventListener(`loadeddata`,p,{once:!0})};return s?d=ye(e,m,{threshold:Number(t.threshold??.15),rootMargin:t.rootMargin||`200px 0px`}):typeof IntersectionObserver<`u`?(d=new IntersectionObserver(t=>{t.forEach(t=>{t.isIntersecting?m():l&&e.pause?.()})},{threshold:Number(t.threshold??.15),rootMargin:t.rootMargin||`0px`}),d.observe(e)):m(),{el:e,type:`lazy`,get animatedMedia(){return!0},replay(){l=!1,e.style.opacity=`0`,m()},pause(){e.pause?.()},resume(){if(l&&c){let t=e.play?.();t&&typeof t.catch==`function`&&t.catch(()=>{})}},destroy(){u=!0,d?.disconnect?.(),e.pause?.(),e.removeEventListener(`loadeddata`,p);let t=(t,n)=>n==null?e.removeAttribute(t):e.setAttribute(t,n);t(`style`,n.style),t(`src`,n.src),t(`preload`,n.preload)}}}function di(e,t,n=null){let r={scope:n};return(e===`dither`||e===`ascii`||e===`halftone`)&&(r.persist=t.persist,r.cellSize=t.cellSize,r.paperColor=t.paperColor,r.inkColor=t.inkColor,r.accentColor=t.accentColor,r.originalColors=t.originalColors,r.colorSteps=t.colorSteps,r.inverted=t.inverted,r.seed=t.seed,r.renderFps=t.renderFps,r.maxDpr=t.maxDpr,r.ease=t.ease),e===`dither`&&(r.ditherType=t.ditherType),e===`ascii`&&(r.asciiChars=t.asciiChars,r.asciiFont=t.asciiFont),e===`halftone`&&(r.halftoneShape=t.halftoneShape,r.halftoneAngle=t.halftoneAngle),r}function fi(e,t,n,r=null){pi(r,n);let i=r?.performance===`low`,a=Ir(e,ni(t)),{wrapper:o}=a,s=e.getAttribute(`style`);e.style.display=`block`,e.style.width=`100%`,e.style.height=`100%`,e.style.objectFit=t.objectFit||`cover`;let c=ei({el:e,wrapper:o,effect:n,settings:Xr(n,di(n,t,e),{lowTier:i,persistFps:24,revealFps:24,maxDpr:1.5}),prefix:`kt-lazy`,durationMs:Math.max(120,Jr(t.duration,1.6)),onProgress:(e,n)=>t.onProgress?.(e,n)}),l=ui(e,{...t,onReveal:e=>{t.onReveal?.(e),c.start()}});return{el:e,type:`lazy`,get animatedMedia(){return!0},replay(){l.replay(),c.replay()},pause(){c.pause(),l.pause()},resume(){c.resume(),l.resume()},destroy(){c.destroy(),l.destroy(),Lr(e,a),s==null?e.removeAttribute(`style`):e.setAttribute(`style`,s)}}}function pi(e,t){let n=e?.diagnostics,r=e?.diagnosticCodes?.DEPRECATED;if(n&&r)try{n.emit(n.create({code:r,module:`lazy`,phase:`create`,recoverable:!0,detail:{variant:t,replacement:`data-kt-${ti}="${t}"`,removal:`next major`}}))}catch{}}var mi={create(e,t={},n=null){if(e.tagName===`VIDEO`){let r=t.preset||t.effect||`fade`;return qr(r)?fi(e,t,r,n):ui(e,t)}let r=t.preset||t.effect||`fade`,i=r===`noise`?`dissolve`:r===`zoom`?`blur-up`:r,a=ri(e,t);if(!a)return null;let o={style:e.getAttribute(`style`),src:e.getAttribute(`src`),srcset:e.getAttribute(`srcset`),sizes:e.getAttribute(`sizes`),loading:e.getAttribute(`loading`),decoding:e.getAttribute(`decoding`)},s=Ir(e,ni(t)),{wrapper:c}=s;qr(i)&&pi(n,i),e.loading=t.nativeLazy===!1?`eager`:`lazy`,e.decoding=`async`,e.style.display=`block`,e.style.width=`100%`,e.style.height=`100%`,e.style.objectFit=t.objectFit||`cover`,e.style.objectPosition=t.objectPosition||`50% 50%`;let l=[],u=new Set,d=null,f=null,p=!1,m=!1,h=!1,g=0,_=null,v=null,y=0,b=n?.performance===`low`,x=(e,t)=>{let n=setTimeout(()=>{u.delete(n),p||e()},Math.max(0,Number(t)||0));return u.add(n),n},S=new Set,C=e=>{let t=requestAnimationFrame(()=>{S.delete(t),p||e()});return S.add(t),t},w=()=>{S.forEach(e=>cancelAnimationFrame(e)),S.clear()},T=()=>{l.splice(0).forEach(e=>e.remove()),_?.canvas.remove(),_=null,v?.destroy(),v=null},E=()=>{let n=t.srcset||e.getAttribute(`data-srcset`);n&&(e.srcset=n),t.sizes&&(e.sizes=t.sizes),e.loading=`eager`,e.src=a,e.style.opacity=`1`,e.style.filter=`none`,e.style.transform=`none`,e.style.clipPath=`none`,e.style.maskImage=`none`,e.style.webkitMaskImage=`none`},D=()=>{E(),T(),t.onProgress?.(1,e),t.onLoad?.(e)},O=()=>{let n=t.skeletonVariant||t.variant||`shimmer`,r=Rr(c,`kt-lazy-skeleton kt-lazy-skeleton-${n}`,5),i=t.skeletonColor||`color-mix(in srgb, currentColor 9%, transparent)`,a=t.skeletonHighlight||`rgba(255,255,255,.45)`,o=Math.max(.3,Number(t.skeletonSpeed??1.5));if(r.style.backgroundColor=i,n===`pulse`?r.style.animation=`kt-skeleton-pulse ${o}s ease-in-out infinite`:(r.style.backgroundImage=`linear-gradient(${Number(t.skeletonAngle??100)}deg,transparent 32%,${a} 50%,transparent 68%)`,r.style.backgroundSize=`250% 100%`,r.style.animation=`kt-shimmer ${o}s cubic-bezier(.4,.2,.6,.8) infinite`),t.skeletonIcon!==!1){let e=document.createElement(`span`);e.className=`kt-lazy-skeleton-icon`,e.setAttribute(`aria-hidden`,`true`),e.innerHTML=``,r.appendChild(e)}return l.push(r),e.style.opacity=`0`,r},k=()=>{let e=++g;return()=>!p&&e===g},A=async()=>{if(h||p)return;h=!0;let n=k(),r=performance.now(),s;try{s=await li(a,e,t)}catch(r){if(!n())return;T(),t.fallbackSrc?e.src=t.fallbackSrc:o.src==null?e.removeAttribute(`src`):e.setAttribute(`src`,o.src),e.style.opacity=`1`,t.onError?.(r,e);return}let u=Math.max(0,Number(t.minDuration??0))-(performance.now()-r);if(u>0&&await new Promise(e=>x(e,u)),n()){if(i===`skeleton`){let n=l[0]||O();E();let r=Math.max(0,Number(t.fadeDuration??t.duration??.45));e.style.transform=`scale(1.015)`,e.style.transition=`opacity ${r}s ease, transform ${Math.max(r,.5)}s cubic-bezier(.22,.8,.3,1)`,n.style.animation=`none`,n.style.transition=`opacity ${Math.min(Math.max(r*.5,.18),.32)}s ease`,C(()=>{e.style.opacity=`1`,e.style.transform=`scale(1)`,n.style.opacity=`0`}),x(T,r*1e3+60),t.onLoad?.(e,s);return}if(i===`fade`){e.src=a,e.style.transition=`none`,e.style.opacity=`0`,e.offsetWidth,e.style.transition=`opacity ${Math.max(0,Number(t.duration??.7))}s ${t.ease||`ease`}`,C(()=>{e.style.opacity=`1`}),t.onLoad?.(e,s);return}if(i===`blur-up`){e.src=a,e.style.transition=`none`,e.style.opacity=`1`,e.style.filter=`blur(${Math.max(0,Number(t.blur??18))}px)`,e.style.transform=`scale(${Math.max(1,Number(t.startScale??1.06))})`;let n=Math.max(0,Number(t.duration??.85));e.offsetWidth,C(()=>{e.style.transition=`filter ${n}s ease,transform ${n}s cubic-bezier(.22,.8,.3,1)`,e.style.filter=`blur(0px)`,e.style.transform=`scale(1)`}),t.onLoad?.(e,s);return}if(i===`polaroid`){e.src=a;let n=t.frame!==!1,r=null;if(n){r=Rr(c,`kt-lazy-polaroid-frame`,6);let e=`clamp(6px, 4.5%, 18px)`;r.style.cssText+=`border:${e} solid ${t.frameColor||`#fbfaf7`};border-bottom-width:calc(${e} * 3.2);box-shadow:inset 0 0 8px rgba(0,0,0,.12);`,l.push(r)}let i=Math.max(.2,Number(t.duration??2.4));e.style.transition=`none`,e.style.opacity=`1`,e.style.filter=`brightness(2.1) saturate(.05) contrast(.72) sepia(.28) blur(7px)`,e.style.transform=`rotate(${Number(t.rotate??-2)}deg) scale(.965)`,c.style.transition=`none`,e.offsetWidth,C(()=>C(()=>{e.style.transition=`filter ${i}s cubic-bezier(.3,.1,.25,1),transform ${Math.min(i,1.1)}s cubic-bezier(.34,1.4,.44,1)`,e.style.filter=`none`,e.style.transform=`none`})),x(()=>{t.keepFrame===!0?(E(),t.onLoad?.(e,s)):D()},i*1e3+120);return}if(i===`crt`){e.src=a;let n=Math.max(.3,Number(t.duration??1.1));e.style.opacity=`1`,e.style.transformOrigin=`center`,e.style.willChange=`transform, filter, opacity`,e.style.animation=`kt-lazy-crt ${n}s cubic-bezier(.2,.7,.2,1) both`;let r=Rr(c,`kt-lazy-crt-beam`,7);r.style.cssText+=`pointer-events:none;top:50%;bottom:auto;height:2px;transform:translateY(-50%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.85) 16%,#fff 50%,rgba(255,255,255,.85) 84%,transparent);box-shadow:0 0 12px 2px rgba(255,255,255,.5);animation:kt-lazy-crt-beam ${n}s ease-out both;`,l.push(r);let i=Rr(c,`kt-lazy-crt-bloom`,8);if(i.style.cssText+=`pointer-events:none;background:#fff;animation:kt-lazy-crt-bloom ${n}s ease-out both;`,l.push(i),t.frame!==!1){let e=Rr(c,`kt-lazy-crt-scan`,5);e.style.cssText+=`pointer-events:none;background:repeating-linear-gradient(to bottom,rgba(0,0,0,.09) 0,rgba(0,0,0,.09) 1px,transparent 1px,transparent 3px);mix-blend-mode:multiply;opacity:0;animation:kt-lazy-crt-scan ${n}s ease both;`,l.push(e);let t=Rr(c,`kt-lazy-crt-roll`,6);t.style.cssText+=`pointer-events:none;top:0;bottom:auto;height:60%;background:linear-gradient(to bottom,transparent 0%,rgba(0,0,0,.18) 35%,rgba(0,0,0,.28) 50%,rgba(0,0,0,.18) 65%,transparent 100%);filter:blur(3px);animation:kt-lazy-crt-roll ${n}s linear both;`,l.push(t)}x(()=>{e.style.animation=``,e.style.willChange=``,D()},n*1e3+160);return}if(i===`data-mosaic`||i===`rgb-slice-burst`){let n=Math.max(.1,Number(t.duration??1.1));e.src=a,e.style.opacity=`1`;let r=Rr(c,`kt-lazy-${i}-layer`,3);r.style.cssText+=`;overflow:hidden`;let o=c.getBoundingClientRect(),s=o.width||e.naturalWidth||300,l=o.height||e.naturalHeight||200,u=y;y+=1;let d=((Math.floor(Number(t.seed??20260729))||1)>>>0)+Math.imul(u,2654435761)>>>0,f=()=>{d=d+1831565813>>>0;let e=d;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296},p=(e,t)=>e+f()*(t-e);if(i===`data-mosaic`){let e=Math.max(8,Number(t.tileMax??44)),i=Math.max(3,Number(t.tileMin??8)),a=String(t.skeletonColor||`#0a0908`),o=[],c=(t,n,u)=>{if(t>=s||n>=l)return;if(u/2>=i&&f()<.68){let e=u/2;c(t,n,e),c(t+e,n,e),c(t,n+e,e),c(t+e,n+e,e);return}let d=Math.ceil(Math.min(u,s-t)),p=Math.ceil(Math.min(u,l-n));if(d<=0||p<=0)return;let m=document.createElement(`span`);m.style.cssText=`position:absolute;left:${t}px;top:${n}px;width:${d}px;height:${p}px;background:${a}`,r.appendChild(m),o.push({tile:m,weight:f()*.66+u/e*.34})};for(let t=0;te.weight-t.weight),o.forEach((e,t)=>{let r=t/Math.max(1,o.length-1);x(()=>{e.tile.style.transition=`opacity 90ms linear`,e.tile.style.opacity=`0`},r*n*1e3)}),x(()=>{r.remove(),D()},n*1e3+200)}else{let e=Array.isArray(t.colors)&&t.colors.length>=3?t.colors:[`#ff2020`,`#20ff40`,`#2060ff`],i=Math.round(p(4,7)),o=Math.max(6,s*.05),c=Array.from({length:i*2},(e,t)=>t);for(let e=c.length-1;e>0;--e){let t=Math.floor(f()*(e+1)),n=c[e];c[e]=c[t],c[t]=n}for(let t=0;t{r.remove(),D()},n*1e3+200)}return}if(i===`wave`||i===`grain`){e.src=a,e.style.opacity=`1`;let n=Math.max(120,Jr(t.duration,i===`wave`?1.35:1.1)),r=Math.max(0,Number(t.delay??60)),o=J(Number(t.maxDpr??1.5),.5,2),u=1e3/J(Number(t.renderFps??(i===`wave`?30:24)),4,60),d=z(t.ease||`cubic-out`),h=J(Number(t.grain??t.noise??(i===`wave`?.13:.3)),0,1),g=Rr(c,`kt-lazy-${i}-layer`,3),v=document.createElement(`canvas`);v.className=`kt-lazy-${i}-canvas`,g.appendChild(v),l.push(g);let y=v.getContext(`2d`,{alpha:!0,desynchronized:!0});_=si(c,t,4),_.canvas.classList.add(`kt-lazy-grain-canvas`);let b=null,S=null,C=-1/0,w=0,T=0,E=1,O=()=>{let e=c.getBoundingClientRect();w=Math.max(1,e.width),T=Math.max(1,e.height),E=J(window.devicePixelRatio||1,1,o);let t=Math.max(1,Math.round(w*E)),n=Math.max(1,Math.round(T*E));(v.width!==t||v.height!==n)&&(v.width=t,v.height=n),y.setTransform(E,0,0,E,0,0)},k=(n,r)=>{let a=e.complete&&e.naturalWidth?e:s;if(!a.naturalWidth)return;let o=wr(a.naturalWidth,a.naturalHeight,w,T);if(y.clearRect(0,0,w,T),i===`grain`)y.drawImage(a,o.sx,o.sy,o.sw,o.sh,0,0,w,T);else{let e=Math.max(0,Number(t.waveAmplitude??22))*(1-n),i=Math.max(.001,Number(t.waveFrequency??.035)),s=Number(t.waveSpeed??.012),c=Math.max(1,Math.round(Number(t.waveSliceHeight??2)));for(let t=0;t{if(p)return;if(m){S??=r,f=requestAnimationFrame(A);return}S!=null&&b!=null&&(b+=r-S,S=null),b??=r;let i=J((r-b)/n,0,1),a=J(d(i),0,1);(r-C>=u||i>=1)&&(O(),k(a,r),_.draw(r),_.canvas.style.opacity=String(h*(1-a)**1.15),g.style.opacity=String(Math.max(0,1-a)),t.onProgress?.(i,e),C=r),i<1?f=requestAnimationFrame(A):D()};x(()=>{f=requestAnimationFrame(A)},r);return}if(i===`pixelate`){e.src=a,e.style.opacity=`1`;let n=Rr(c,`kt-lazy-pixelate-layer`,3),r=document.createElement(`canvas`);r.className=`kt-lazy-pixelate-canvas`,r.style.cssText=`position:absolute;inset:0;width:100%;height:100%;display:block;`,n.appendChild(r),l.push(n);let i=t.noise!==!1&&t.noise!==0&&t.noise!==`0`&&t.noise!==`false`,o=typeof t.noise==`number`?J(t.noise,0,1):.14;i&&(_=si(c,t,4),_.canvas.style.opacity=String(o));let u=r.getContext(`2d`,{alpha:!0,desynchronized:!0}),d=document.createElement(`canvas`),h=d.getContext(`2d`,{alpha:!0}),g=c.getBoundingClientRect(),v=ai(ii(t,g.width,g.height)),y=Math.max(0,Number(t.stepDuration??0)),b=y>0?y*v.length:Jr(t.duration,1.25),S=Math.max(0,Number(t.delay??100)),C=Math.max(0,Number(t.holdDuration??0)),w=J(Number(t.maxDpr??2),.5,4),T=1e3/J(Number(t.renderFps??60),4,120),E=0,O=0,k=()=>{let e=c.getBoundingClientRect();E=Math.max(1,e.width),O=Math.max(1,e.height);let t=J(window.devicePixelRatio||1,1,w),n=Math.max(1,Math.round(E*t)),i=Math.max(1,Math.round(O*t));(r.width!==n||r.height!==i)&&(r.width=n,r.height=i),u.setTransform(t,0,0,t,0,0)},A=t=>{let n=e.complete&&e.naturalWidth?e:s,r=n.naturalWidth,i=n.naturalHeight;if(!r||!i)return;let a=Math.max(1,Math.ceil(E/Math.max(1,t))),o=Math.max(1,Math.ceil(O/Math.max(1,t)));(d.width!==a||d.height!==o)&&(d.width=a,d.height=o);let c=wr(r,i,E,O);h.clearRect(0,0,a,o),h.imageSmoothingEnabled=!0;try{h.drawImage(n,c.sx,c.sy,c.sw,c.sh,0,0,a,o)}catch{return}u.clearRect(0,0,E,O),u.imageSmoothingEnabled=!1,u.drawImage(d,0,0,a,o,0,0,E,O)},j=null,M=null,N=-1/0,P=-1,F=n=>{if(p)return;if(m){M??=n,f=requestAnimationFrame(F);return}M!=null&&j!=null&&(j+=n-M,M=null),j??=n;let r=J((n-j)/Math.max(1,b),0,1);_&&(_.draw(n),_.canvas.style.opacity=String(o*Math.max(0,1-r)));let i=r>=1?v.length-1:Math.min(v.length-1,Math.floor(r*v.length));for(;P=1){x(D,C);return}n-N>=T&&(k(),A(v[i]),N=n),f=requestAnimationFrame(F)};k(),A(v[0]),x(()=>{f=requestAnimationFrame(F)},S);return}if(i===`flicker`){e.src=a,e.style.opacity=`1`;let n=Rr(c,`kt-lazy-flicker-layer`,3);n.style.background=t.flickerBackground||`#000`;let r=document.createElement(`canvas`);r.style.cssText=`position:absolute;inset:0;width:100%;height:100%;display:block;`,n.appendChild(r),l.push(n);let i=r.getContext(`2d`,{alpha:!1}),o=Math.max(120,Jr(t.duration,1.15)),u=J(Number(t.glitchStrength??1),.1,3),d=Math.max(2,Math.round(Number(t.sliceCount??7))),h=Math.max(0,Number(t.delay??60)),g=null,_=null,v=()=>{let e=c.getBoundingClientRect(),n=J(window.devicePixelRatio||1,1,J(Number(t.maxDpr??2),.5,4)),i=Math.max(1,Math.round(e.width*n)),a=Math.max(1,Math.round(e.height*n));(r.width!==i||r.height!==a)&&(r.width=i,r.height=a)},y=t=>{let n=e.complete&&e.naturalWidth?e:s;if(!n.naturalWidth)return;let a=r.width,o=r.height,c=wr(n.naturalWidth,n.naturalHeight,a,o);if(i.fillStyle=`#000`,i.fillRect(0,0,a,o),Math.random()<(1-t)*.28)return;let l=(1-t)*u;i.globalAlpha=1;for(let e=0;e.15&&Math.random()<.6&&(i.globalAlpha=.18*l,i.drawImage(n,c.sx,c.sy,c.sw,c.sh,Math.round(8*l),0,a,o),i.globalAlpha=1)},b=n=>{if(p)return;if(m){_??=n,f=requestAnimationFrame(b);return}_!=null&&g!=null&&(g+=n-_,_=null),g??=n;let r=J((n-g)/o,0,1);v(),y(r),t.onProgress?.(r,e),r<1?f=requestAnimationFrame(b):D()};x(()=>{f=requestAnimationFrame(b)},h);return}if(i===`dither`||i===`ascii`||i===`halftone`){e.src=a,e.style.opacity=`1`;let n=Xr(i,di(i,t,e),{lowTier:b,persistFps:24,revealFps:30,maxDpr:2});v=$r({el:e,wrapper:c,effect:i,settings:n,prefix:`kt-lazy`,drawable:()=>e.complete&&e.naturalWidth?e:s,animatedSource:t.animated===!0||Gr.test(a),durationMs:Math.max(120,Jr(t.duration,1.6)),delayMs:Math.max(0,Number(t.delay??60)),holdMs:Math.max(0,Number(t.holdDuration??0)),onProgress:(e,n)=>t.onProgress?.(e,n),onFinish:D}),l.push(v.layer),n.persist&&t.onLoad?.(e,s),v.start();return}if(i===`print`||i===`dissolve`){e.src=a,e.style.opacity=`0`;let n=Rr(c,`kt-lazy-${i}-base`,2),r=oi(a,e,t);n.appendChild(r),l.push(n);let o=null,s=null,u=null;i===`print`&&(o=Rr(c,`kt-lazy-print-sharp`,3),s=oi(a,e,t),o.appendChild(s),l.push(o),u=Rr(c,`kt-lazy-print-edge`,5),u.style.mixBlendMode=`soft-light`,l.push(u)),_=si(c,t,4);let d=Math.max(50,Jr(t.duration,i===`print`?2.2:1.55)),h=Math.max(0,Number(t.delay??100)),g=Math.max(0,Number(t.blur??16)),v=J(Number(t.noise??(i===`print`?.3:.68)),0,1),y=t.direction||`down`,b=Number(t.feather??(i===`print`?12:8)),S=null,C=null,w=n=>{if(p)return;if(m){C??=n,f=requestAnimationFrame(w);return}C!=null&&S!=null&&(S+=n-C,C=null),S??=n;let a=J((n-S)/d,0,1),s=1-(1-a)**2.2;if(_.draw(n),i===`print`){let e=a<.5?2*a*a:1-(-2*a+2)**2/2,n=g*(1-a*.45);r.style.filter=`blur(${n}px) contrast(${1+(1-a)*.1}) brightness(${1+(1-a)*.06})`,o.style.maskImage=ci(y,e,b,!1),o.style.webkitMaskImage=o.style.maskImage,_.canvas.style.maskImage=ci(y,e,b,!0),_.canvas.style.webkitMaskImage=_.canvas.style.maskImage,_.canvas.style.opacity=String(v*(1-a**1.6*.85));let i=y===`up`?`to top`:y===`left`?`to left`:y===`right`?`to right`:`to bottom`,s=J(e*100,0,100),c=J(Number(t.edgeWidth??9),2,30);u.style.opacity=a>=1?`0`:`1`,u.style.background=`linear-gradient(${i}, transparent ${J(s-c,0,100)}%, rgba(255,255,255,${J(Number(t.edgeOpacity??.5),0,1)}) ${s}%, transparent ${J(s+c*.4,0,100)}%)`}else r.style.filter=`blur(${g*(1-s)}px) contrast(${1+(1-s)*.22})`,_.canvas.style.opacity=String(v*(1-s)**1.2);t.onProgress?.(a,e),a<1?f=requestAnimationFrame(w):D()};x(()=>{f=requestAnimationFrame(w)},h);return}E(),t.onLoad?.(e,s)}};return i===`skeleton`?O():![`blur-up`,`polaroid`,`pixelate`].includes(i)&&!qr(i)&&(e.style.opacity=`0`),d=ye(e,A,{threshold:Number(t.threshold??.05),rootMargin:t.rootMargin||`200px 0px`}),{el:e,type:`lazy`,get animatedMedia(){return t.animated===!0||Gr.test(a)},replay(){f!=null&&cancelAnimationFrame(f),f=null,u.forEach(clearTimeout),u.clear(),w(),T(),h=!1,i===`skeleton`&&O(),A()},pause(){m=!0,v?.pause()},resume(){m=!1,v?.resume()},destroy(){p=!0,m=!1,d?.disconnect(),f!=null&&cancelAnimationFrame(f),u.forEach(clearTimeout),u.clear(),w(),T(),Lr(e,s);let t=(t,n)=>n==null?e.removeAttribute(t):e.setAttribute(t,n);t(`style`,o.style),t(`src`,o.src),t(`srcset`,o.srcset),t(`sizes`,o.sizes),t(`loading`,o.loading),t(`decoding`,o.decoding)}}},reduced(e,t={}){let n=e.getAttribute(`style`),r=e.getAttribute(`src`),i=ri(e,t);return i&&(e.src=i),e.style.opacity=`1`,e.style.filter=`none`,e.style.transform=`none`,{el:e,type:`lazy`,pause(){},resume(){},destroy(){n==null?e.removeAttribute(`style`):e.setAttribute(`style`,n),r==null?e.removeAttribute(`src`):e.setAttribute(`src`,r)}}}},hi=new Set([`load`,`view`,`manual`]),gi=`kt-stylize-wrap`;function _i(e){return{className:gi,display:e.display,aspectRatio:e.aspectRatio,height:e.height}}function vi(e,t){let n=e.getAttribute(`style`);return e.style.display=`block`,e.style.width=`100%`,e.style.height=`100%`,e.style.objectFit=t.objectFit||`cover`,e.tagName===`IMG`&&(e.style.objectPosition=t.objectPosition||`50% 50%`),n}function yi(e){return e.tagName===`IMG`||e.tagName===`VIDEO`?e:e.querySelector(`img, video`)}function bi(e){return e.currentSrc||e.getAttribute(`src`)||e.getAttribute(`data-src`)||``}function xi(e,t,n,r=null){let i={scope:r,persist:n===`persist`,cellSize:t.cellSize,paperColor:t.paperColor,inkColor:t.inkColor,accentColor:t.accentColor,originalColors:t.originalColors,colorSteps:t.colorSteps,inverted:t.inverted,contrast:t.contrast,brightness:t.brightness,motion:t.motion,motionSpeed:t.motionSpeed,motionAmount:t.motionAmount,pointer:t.pointer,pointerRadius:t.pointerRadius,pointerStrength:t.pointerStrength,pointerCellSize:t.pointerCellSize,transition:t.transition||`dissolve`,seed:t.seed,renderFps:t.renderFps,maxDpr:t.maxDpr,ease:t.ease};return e===`dither`&&(i.ditherType=t.ditherType),e===`ascii`&&(i.asciiChars=t.asciiChars,i.asciiFont=t.asciiFont),e===`halftone`&&(i.halftoneShape=t.halftoneShape,i.halftoneAngle=t.halftoneAngle),i}function Si(e={}){let t={};for(let n of Object.keys(e)){if(!Mr.includes(n))return null;t[n]=e[n]}return t}function Ci(e){return{durationMs:Math.max(120,Jr(e.duration,1.6)),delayMs:Math.max(0,Jr(e.delay,0)),holdMs:Math.max(0,Jr(e.holdDuration,0))}}function wi(e,t,n,r,i){let a=r.mode===`reveal`?`reveal`:`persist`,o=hi.has(r.trigger)?r.trigger:`load`,s=i?.performance===`low`,c=Ir(t,_i(r)),{wrapper:l}=c,u=vi(t,r),d=Xr(n,xi(n,r,a,t),{lowTier:s,persistFps:24,revealFps:30,maxDpr:2}),f=bi(t),p=r.animated===!0||Gr.test(f),m=null,h=null,g=!1,_=!1,v=!1,y=()=>{m?.destroy(),m=null,r.onComplete?.(t)},b=()=>{g||m||(m=$r({el:t,wrapper:l,effect:n,settings:d,prefix:`kt-stylize`,animatedSource:p,...Ci(r),onProgress:(e,t)=>r.onProgress?.(e,t),onFinish:y,onRendered:e=>{e&&a===`persist`&&r.onComplete?.(t)}}),_&&m.pause(),m.start())},x=()=>{if(!(g||v)){if(v=!0,a===`persist`||o===`load`){b();return}o===`view`&&(h=ye(t,b,{threshold:Number(r.threshold??.05),rootMargin:r.rootMargin||`0px`}))}},S=()=>t.complete&&t.naturalWidth>0,C=()=>{t.removeEventListener(`load`,C),x()};return S()?x():t.addEventListener(`load`,C),{el:e,type:`stylize`,get animatedMedia(){return p||d.live},get motion(){return d.styleConfig.motion},update(e={}){let t=Si(e);return t?(Zr(d,t,m),!0):!1},replay(){if(!g){if(m){m.replay();return}S()&&b()}},pause(){_=!0,m?.pause()},resume(){_=!1,m?.resume()},destroy(){g||(g=!0,t.removeEventListener(`load`,C),h?.disconnect(),h=null,m?.destroy(),m=null,Lr(t,c),u==null?t.removeAttribute(`style`):t.setAttribute(`style`,u))}}}function Ti(e,t,n,r,i){let a=!1,o=!1,s=!1,c=null,l=null,u=r.mode===`reveal`?`reveal`:`persist`,d=hi.has(r.trigger)?r.trigger:`load`,f=i?.performance===`low`,p=Ir(t,_i(r)),{wrapper:m}=p,h=vi(t,r),g=Xr(n,xi(n,r,u,t),{lowTier:f,persistFps:24,revealFps:24,maxDpr:1.5}),_=()=>{a||l||t.readyState<2||(c?.disconnect(),c=null,l=ei({el:t,wrapper:m,effect:n,settings:g,prefix:`kt-stylize`,...Ci(r),onProgress:(e,t)=>r.onProgress?.(e,t),onFinish:()=>r.onComplete?.(t)}),o&&l.pause(),l.start())},v=()=>{if(!a){if(s||u===`persist`||d===`load`){_();return}d===`view`&&(c=ye(t,_,{threshold:Number(r.threshold??.05),rootMargin:r.rootMargin||`0px`}))}},y=()=>{t.removeEventListener(`loadeddata`,y),v()};return t.readyState>=2?v():t.addEventListener(`loadeddata`,y),{el:e,type:`stylize`,get animatedMedia(){return!0},get motion(){return g.styleConfig.motion},update(e={}){let t=Si(e);return t?(Zr(g,t,l),!0):!1},replay(){a||(s=!0,l?l.replay():_())},pause(){o=!0,l?.pause()},resume(){o=!1,l?.resume()},destroy(){a||(a=!0,t.removeEventListener(`loadeddata`,y),c?.disconnect(),l?.destroy(),Lr(t,p),h==null?t.removeAttribute(`style`):t.setAttribute(`style`,h))}}}var Ei={defer:!0,offscreen:`pause`,create(e,t={},n=null){let r=yi(e);if(!r)return null;let i=t.preset||t.effect||`dither`,a=qr(i)?i:zr[0];return r.tagName===`VIDEO`?Ti(e,r,a,t,n):wi(e,r,a,t,n)},reduced(e,t={},n=null){return t.mode===`reveal`?{el:e,type:`stylize`,motion:`none`,pause(){},resume(){},replay(){},destroy(){}}:this.create(e,{...t,motion:`none`,pointer:`none`},n)}},Di={rise:{from:{y:`110%`,opacity:0},to:{y:0,opacity:1},wrap:!0},wave:{from:{y:30,opacity:0},to:{y:0,opacity:1}},fade:{from:{opacity:0},to:{opacity:1}},spin:{from:{rotateY:-95,opacity:0,y:8},to:{rotateY:0,opacity:1,y:0}},flip:{from:{rotateX:-90,opacity:0,y:10},to:{rotateX:0,opacity:1,y:0}},scale:{from:{scale:.4,opacity:0},to:{scale:1,opacity:1}},blur:{from:{opacity:0,filter:`blur(10px)`,y:12},to:{opacity:1,filter:`blur(0px)`,y:0}},"slide-up":{from:{y:`0.9em`,opacity:0},to:{y:0,opacity:1}},"slide-down":{from:{y:`-0.9em`,opacity:0},to:{y:0,opacity:1}},drift:{from:{x:`0.55em`,opacity:0},to:{x:0,opacity:1}},squeeze:{from:{x:`0.4em`,opacity:0,scaleX:.28},to:{x:0,opacity:1,scaleX:1}}},Oi={"slide-up":{y:`-0.7em`,opacity:0},"slide-down":{y:`0.7em`,opacity:0},fade:{opacity:0},blur:{opacity:0,filter:`blur(8px)`},scale:{scale:.6,opacity:0},flip:{rotateX:90,opacity:0},spin:{rotateY:95,opacity:0},drift:{x:`-0.45em`,opacity:0},squeeze:{x:`-0.35em`,opacity:0,scaleX:.28}};function ki(e,t,n,r){let i=[],a=Ie(e),o=()=>{let e=document.createElement(`br`);e.setAttribute(`aria-hidden`,`true`),a.gap(e)},s=e=>{Me(e).split(/(\n)/).forEach(e=>{e&&(e===` `?o():a.gap(document.createTextNode(e)))})},c=e=>{let t=document.createElement(`span`);if(t.style.display=`inline-block`,t.style.transformStyle=`preserve-3d`,t.style.backfaceVisibility=`hidden`,t.setAttribute(`aria-hidden`,`true`),t.textContent=e,r){let e=document.createElement(`span`);e.style.cssText=`display:inline-block;overflow:hidden;vertical-align:bottom;`,e.appendChild(t),a.add(e)}else a.add(t);i.push(t)};return n===`word`?Me(t).split(/(\n|[^\S\n]+)/).forEach(e=>{e&&(/^\s+$/.test(e)?s(e):c(e))}):je(Me(t)).forEach(e=>{/^\s$/.test(e)?s(e):c(e)}),i}var Ai=e=>Array.isArray(e.texts)&&e.texts.length>1,ji={defer:!0,offscreen:e=>Ai(e)?`pause`:null,create(e,t){let n=Q(),r=_e();if(!n||!r)return null;let i=t.by||`char`,a=typeof t.animation==`string`&&Di[t.animation]?t.animation:Di[t.preset]?t.preset:`rise`,o=Di[a],s=Ke(e),c=Ne(e),l=$(e,[`overflow`,`perspective`,`display`,`minHeight`]),u=Array.isArray(t.texts)&&t.texts.length?t.texts.map(e=>Me(String(e))):null,d=Number(t.duration??.8),f=Number(t.stagger??.03),p=t.ease?H(t.ease):`power3.out`;e.innerHTML=``,(a===`spin`||a===`flip`)&&(e.style.perspective=`${Number(t.perspective??600)}px`);let m=ki(e,u?u[0]:c,i,o.wrap&&!u),h=nt(e,u?u[0]:c),g=t=>{e.innerHTML=``,m=ki(e,t,i,!1),h.attach(),h.set(t)},_=null,v=null,y=0,b=!0,x=r=>(_?.kill(),_=n.fromTo(m,{...o.from},{...o.to,duration:d,delay:Number(t.delay??0),ease:a===`wave`?t.ease?H(t.ease):`back.out(2.2)`:p,stagger:f,overwrite:!0,onComplete:()=>{t.onComplete?.(e),r?.()}}),_),S=Math.max(200,ae(t.hold??t.pause,2e3)),C=Oi[t.swapOut]||Oi[`slide-up`],w=()=>{!u||u.length<2||!b||(clearTimeout(v),v=setTimeout(()=>{b&&(_?.kill(),_=n.to(m,{...C,duration:Math.min(.45,d),ease:t.swapEase?H(t.swapEase):`power2.in`,stagger:Math.min(.02,f),overwrite:!0,onComplete:()=>{b&&(y=(y+1)%u.length,g(u[y]),t.onSwap?.(y,u[y],e),x(w))}}))},S))},T=!1,E=r.create({trigger:e,start:t.start||`top 85%`,onEnter:()=>{T&&t.once!==!1||(T=!0,x(u?w:null))},onLeaveBack:()=>{t.once===!1&&(T=!1,clearTimeout(v),_?.kill(),n.set(m,{...o.from}))}});return n.set(m,{...o.from}),{el:e,type:`textSplit`,get units(){return m},replay:()=>{clearTimeout(v),_?.kill(),u&&(y=0,g(u[0])),n.set(m,{...o.from}),x(u?w:null)},pause:()=>{_?.pause(),clearTimeout(v)},resume:()=>{_?.resume(),T&&u&&!_?.isActive()&&w()},destroy:()=>{b=!1,clearTimeout(v),E.kill(),_?.kill(),h.restore(),s(),l()}}},reduced(e,t={}){let n=Ke(e),r=xe(e,[`aria-label`]),i=$(e,[`opacity`,`transform`]),a=Array.isArray(t.texts)&&t.texts.length?Me(String(t.texts[0])):Ne(e);return Array.isArray(t.texts)&&t.texts.length&&(e.textContent=a),Pe(e),tt(e,a),e.style.opacity=`1`,e.style.transform=`none`,{el:e,type:`textSplit`,pause(){},resume(){},destroy(){n(),r(),i()}}}},Mi={defer:!0,create(e,t){let n=Q(),r=_e(),i=Ke(e),a=Ne(e);e.innerHTML=``;let o=Ie(e),s=je(a).map(e=>{if(/^\s$/.test(e)){let t=e===` `?document.createElement(`br`):document.createTextNode(e);return e===` `&&t.setAttribute(`aria-hidden`,`true`),o.gap(t),null}let t=document.createElement(`span`);return t.style.cssText=`display:inline-block;filter:blur(8px);opacity:0;will-change:filter,opacity;`,t.setAttribute(`aria-hidden`,`true`),t.textContent=e,o.add(t),t}).filter(Boolean),c=nt(e,a),l=t.duration??.6,u=t.stagger??.03,d=null,f=null,p=()=>typeof performance<`u`?performance.now():Date.now(),m=new Set,h=0,g=(e,t)=>{let n={run:e,runAt:p()+t};n.id=setTimeout(()=>{m.delete(n),e()},t),m.add(n)},_=()=>{m.forEach(e=>clearTimeout(e.id)),m.clear(),h=0},v=()=>{t.once!==!1&&s.forEach(e=>{e.style.willChange=``})},y=()=>{if(_(),!s.length){t.onComplete?.();return}s.forEach((e,n)=>{g(()=>{e.style.transition=`filter ${l}s ease, opacity ${l}s ease`,e.style.filter=`blur(0)`,e.style.opacity=`1`,n===s.length-1&&(v(),t.onComplete?.())},u*n*1e3)})};n&&r?f=n.to(s,{filter:`blur(0px)`,opacity:1,duration:l,stagger:u,ease:t.ease?H(t.ease):`power2.out`,onComplete:()=>{v(),t.onComplete?.()},scrollTrigger:{trigger:e,start:t.start||`top 85%`,toggleActions:t.once===!1?`play reverse play reverse`:`play none none none`}}):d=ye(e,y,{threshold:.1});let b=null;return{el:e,type:`blurText`,replay:()=>{if(f){f.restart();return}s.forEach(e=>{e.style.filter=`blur(8px)`,e.style.opacity=`0`}),y()},pause:()=>{f&&!f.paused()&&(f.pause(),b=f),!h&&m.size&&(h=p(),m.forEach(e=>clearTimeout(e.id)))},resume:()=>{if(b?.resume(),b=null,!h)return;let e=p()-h;h=0,m.forEach(t=>{t.runAt+=e,t.id=setTimeout(()=>{m.delete(t),t.run()},Math.max(0,t.runAt-p()))})},destroy:()=>{d?.disconnect(),_(),f?.scrollTrigger?.kill(),f?.kill(),c.restore(),i()}}},reduced(e){let t=Ke(e),n=xe(e,[`aria-label`]),r=$(e,[`opacity`,`filter`]);return tt(e,Ne(e)),Pe(e),e.style.opacity=`1`,e.style.filter=`none`,{el:e,type:`blurText`,pause(){},resume(){},destroy(){t(),n(),r()}}}},Ni={defer:!0,offscreen:`pause`,create(e,t){let n=e.innerHTML,r=Array.isArray(t.strings)?t.strings.map(String):t.strings==null?[e.textContent||``]:[String(t.strings)],i=Number(t.typeSpeed??60),a=Number(t.eraseSpeed??30),o=Number(t.pauseAfter??1500),s=t.loop!==!1,c=t.caret!==!1,l=Z(t.caretChar,`|`),u=t.hangul===!0||t.compose===!0,d=document.createElement(`span`);if(d.className=`kt-tw-text`,d.setAttribute(`aria-hidden`,`true`),e.replaceChildren(d),c){let t=document.createElement(`span`);t.className=`kt-tw-caret`,t.setAttribute(`aria-hidden`,`true`),t.textContent=l,e.appendChild(t)}let f=nt(e,r.join(`, `)),p=r.map(e=>je(e)),m=0,h=0,g=0,_=!1,v=!0,y=!1,b=null,x=e=>u?ke(e):[e],S=()=>{if(!v)return;let n=p[m];if(_)--h,g=0,d.textContent=n.slice(0,Math.max(0,h)).join(``),h<=0?(_=!1,m=(m+1)%r.length,b=setTimeout(S,i)):b=setTimeout(S,a);else{let a=n.slice(0,h).join(``);if(h>=n.length){if(d.textContent=a,!s&&m===r.length-1){y=!0,t.onComplete?.(e);return}b=setTimeout(()=>{_=!0,S()},o);return}let c=x(n[h]);d.textContent=a+c[Math.min(g,c.length-1)],g+=1,g>=c.length&&(g=0,h+=1),b=setTimeout(S,u?Math.max(16,i*.72):i)}};return S(),{el:e,type:`typewriter`,replay:()=>{clearTimeout(b),m=0,h=0,g=0,_=!1,v=!0,y=!1,d.textContent=``,S()},pause:()=>{v=!1,clearTimeout(b)},resume:()=>{v||(v=!0,y||S())},destroy:()=>{v=!1,clearTimeout(b),f.restore(),e.innerHTML=n}}},reduced(e,t){let n=e.innerHTML,r=Array.isArray(t.strings)?t.strings:t.strings==null?[e.textContent]:[t.strings];return e.textContent=String(r[0]??``),{el:e,type:`typewriter`,pause(){},resume(){},destroy(){e.innerHTML=n}}},fallback(e,t){return this.reduced(e,t)}};function Pi(){let e=document.createElement(`br`);return e.setAttribute(`aria-hidden`,`true`),e}function Fi(e,t){Me(t).split(/(\n)/).forEach(t=>{t&&e.gap(t===` diff --git a/site/llms.txt b/site/llms.txt index f9b7f446..7d6beaff 100644 --- a/site/llms.txt +++ b/site/llms.txt @@ -1,6 +1,6 @@ # Kineto -> @dong-gri/kineto v0.12.3 — vanilla-first web motion & media effects library (53 modules, React/Vue/jQuery adapters, zero runtime dependencies). Attach effects with data-kt-* attributes on any markup, including shadcn/ui, Bootstrap, MUI, Mantine, Chakra, Ant Design, daisyUI, Nuxt UI, PrimeVue and Vuetify components. +> @dong-gri/kineto v0.13.0 — vanilla-first web motion & media effects library (53 modules, React/Vue/jQuery adapters, zero runtime dependencies). Attach effects with data-kt-* attributes on any markup, including shadcn/ui, Bootstrap, MUI, Mantine, Chakra, Ant Design, daisyUI, Nuxt UI, PrimeVue and Vuetify components. ## Start here diff --git a/site/r/ai-rules.json b/site/r/ai-rules.json index 6ce3e7d2..acd98c29 100644 --- a/site/r/ai-rules.json +++ b/site/r/ai-rules.json @@ -10,13 +10,13 @@ "path": "ai/cursor/kineto.mdc", "type": "registry:file", "target": "~/.cursor/rules/kineto.mdc", - "content": "---\ndescription: Use Kineto (@dong-gri/kineto) motion and media effects correctly next to shadcn/ui, Bootstrap, MUI, Mantine, Chakra, Ant Design, daisyUI, Nuxt UI, PrimeVue and Vuetify, including Figma-to-code flows.\nglobs: [\"**/*.tsx\", \"**/*.jsx\", \"**/*.vue\", \"**/*.html\", \"**/*.astro\", \"**/*.svelte\"]\nalwaysApply: false\n---\n\n# Kineto rules for coding agents (v0.12.3)\n\nKineto (`@dong-gri/kineto`) is a vanilla-first motion/effects library: 55 modules activated by `data-kt-*` attributes or `Kineto.create()`, with React/Vue/jQuery adapters. Use these rules whenever you generate UI with any component library (shadcn/ui, Bootstrap, MUI, Mantine, Chakra, Ant Design, daisyUI, Nuxt UI, PrimeVue, Vuetify) or from a Figma frame.\n\n## Principles\n\n- Kineto adds motion and media effects to markup you already own; it does not replace the component library's behaviour (dialogs, menus, forms, routing).\n- Prefer the library's own component when it already provides the behaviour (toast, tooltip, tabs, accordion, dialog, carousel). Use Kineto for what the library does not ship: entrance motion, text motion, counters, image loading effects, hover/pointer effects, marquee, page reveal, cursor, scroll storytelling.\n- Never put two things that animate the same property on one element: a Tailwind/tw-animate-css enter animation plus a Kineto reveal, a Bootstrap carousel plus a Kineto slider, two Kineto modules that both write transform (see docs/rfc/module-composition.md).\n- Attach with `data-kt-*` attributes on the element that reaches the DOM, call `Kineto.observe()` once at startup so markup added later (framework renders, portals, modals) is picked up and cleaned up, and reach for the React/Vue adapters only when you need the instance (replay, pause, presence).\n- Respect `prefers-reduced-motion`: Kineto already renders the meaningful end state for every module, so do not add a second reduced-motion branch around it.\n- Read the exact option names from kineto.features.json (or `npx @dong-gri/kineto-mcp`); do not invent options.\n\n## Setup (once per app)\n\n```js\nimport '@dong-gri/kineto/style.css';\nimport Kineto from '@dong-gri/kineto';\nKineto.observe(); // scans now and follows later DOM changes\n```\n\nReact: mount a client `KinetoProvider` that calls `Kineto.observe()` in an effect (shadcn registry: `npx shadcn@latest add @kineto/provider`). Vue/Nuxt: a client plugin that calls `Kineto.observe()`. Static HTML: the CDN snippet with `Kineto.observe()`.\n\n## Attachment grammar\n\n- Activation: `data-kt-=\"\"` (omit the value for the default variant). Options: `data-kt-=\"value\"`; booleans as bare attributes; arrays/objects as JSON strings.\n- JavaScript: `Kineto.create('', element, { : '', ...options })`. React: `useKineto('', options)` / `\" options={...}>`. Vue: `v-motion=\"{ type, options }\"` / `useKineto()`.\n- Component libraries forward unknown props/attrs to their root DOM node, so `data-kt-*` on ``, `