prop-for-that 0.6.4 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/README.md +8 -6
- package/dist/auto.cjs +1 -1
- package/dist/auto.js +1 -1
- package/dist/battery-CDMJLP4C.js +1 -0
- package/dist/battery-DQQ2NOGC.cjs +1 -0
- package/dist/chunk-2C7ZUOOR.js +1 -0
- package/dist/chunk-2E2JQAHI.js +1 -0
- package/dist/chunk-2H5YFW6O.cjs +1 -0
- package/dist/chunk-2LAVIUIS.cjs +1 -0
- package/dist/chunk-3MK6Q7DX.cjs +1 -0
- package/dist/chunk-3W7CXUWN.cjs +1 -0
- package/dist/chunk-5JZBLUQK.js +1 -0
- package/dist/chunk-63C3RCO2.cjs +1 -0
- package/dist/chunk-65MXZJBD.cjs +1 -0
- package/dist/chunk-6FIY4G6K.cjs +1 -0
- package/dist/chunk-6LTQ7ISE.cjs +1 -0
- package/dist/chunk-7CDVAP3H.cjs +1 -0
- package/dist/chunk-7L35N3N3.cjs +1 -0
- package/dist/chunk-7U544OAJ.js +1 -0
- package/dist/chunk-A2ETARW3.js +1 -0
- package/dist/chunk-A6JDSQWH.cjs +1 -0
- package/dist/chunk-A7GWTDM7.js +1 -0
- package/dist/chunk-BH7EQDLL.cjs +1 -0
- package/dist/chunk-CGNMHQYQ.cjs +1 -0
- package/dist/chunk-CQQV55KU.cjs +1 -0
- package/dist/chunk-DQJQEWPS.js +1 -0
- package/dist/chunk-EEMKKLRF.js +1 -0
- package/dist/chunk-EOPF4ZLZ.cjs +1 -0
- package/dist/chunk-F5H2O3AR.js +1 -0
- package/dist/chunk-FKBHTKZH.cjs +1 -0
- package/dist/chunk-FOHEZJHF.js +1 -0
- package/dist/chunk-H7X35UB4.js +1 -0
- package/dist/chunk-HHINWX7L.cjs +1 -0
- package/dist/chunk-HKCTBVQT.js +1 -0
- package/dist/chunk-HYVT6V4Z.cjs +1 -0
- package/dist/chunk-IJDX3MYP.js +1 -0
- package/dist/chunk-IKOVFAJO.js +1 -0
- package/dist/chunk-JB72QLD6.js +1 -0
- package/dist/chunk-KAK6WZS7.js +1 -0
- package/dist/chunk-KMPRPVIO.js +1 -0
- package/dist/chunk-L4SCOKPV.cjs +1 -0
- package/dist/chunk-LF4OE7IL.js +1 -0
- package/dist/chunk-LTJ2VKVY.js +1 -0
- package/dist/chunk-LULEQHRM.cjs +1 -0
- package/dist/chunk-MDKLN42L.js +1 -0
- package/dist/chunk-MGZTR3X6.cjs +1 -0
- package/dist/chunk-MJJCQRTF.cjs +1 -0
- package/dist/chunk-OVF4XN2H.cjs +1 -0
- package/dist/chunk-QHHF5SEL.cjs +1 -0
- package/dist/chunk-QIUPJ6MF.js +1 -0
- package/dist/chunk-QRIZE6VL.js +1 -0
- package/dist/chunk-RI7ZNKJ4.js +1 -0
- package/dist/chunk-RT47EE2L.cjs +1 -0
- package/dist/chunk-S2QXIZB2.cjs +1 -0
- package/dist/chunk-SBF6XS5A.cjs +1 -0
- package/dist/chunk-SFO6H2DN.js +1 -0
- package/dist/chunk-SRQQTNRZ.js +1 -0
- package/dist/chunk-SYKMPPTY.cjs +1 -0
- package/dist/chunk-T4N6AEOZ.js +1 -0
- package/dist/chunk-UALPUR2L.cjs +1 -0
- package/dist/chunk-UHGW7AXC.js +1 -0
- package/dist/chunk-UQW7YOHI.js +1 -0
- package/dist/chunk-WIPJMLJJ.cjs +1 -0
- package/dist/chunk-WUGCASE4.js +1 -0
- package/dist/chunk-X5SADKXG.cjs +1 -0
- package/dist/chunk-XQOUJEVE.cjs +1 -0
- package/dist/chunk-Y7HUY6HR.js +1 -0
- package/dist/chunk-YXEERKSK.js +1 -0
- package/dist/chunk-YXQTZ7WB.cjs +1 -0
- package/dist/chunk-ZQTU5EW7.js +1 -0
- package/dist/clock-EVSBOOMJ.cjs +1 -0
- package/dist/clock-LYF2IHGE.js +1 -0
- package/dist/color-input-ISNND62O.cjs +1 -0
- package/dist/color-input-UT32SY4G.js +1 -0
- package/dist/cpu-pressure-FXZDL5IE.cjs +1 -0
- package/dist/cpu-pressure-WCDHVDRP.js +1 -0
- package/dist/field-MPAB2GPW.cjs +1 -0
- package/dist/field-N3X45MAG.js +1 -0
- package/dist/field-state-CW4AHAD4.js +1 -0
- package/dist/field-state-LUVDPYVB.cjs +1 -0
- package/dist/form-state-43U225CL.js +1 -0
- package/dist/form-state-OQCU5JIW.cjs +1 -0
- package/dist/fps-OLN52HAI.js +1 -0
- package/dist/fps-TZQLC5MI.cjs +1 -0
- package/dist/geo-CMG7QJ6S.cjs +1 -0
- package/dist/geo-MXO5OMVO.js +1 -0
- package/dist/head.cjs +1 -1
- package/dist/img-QU7AEFQR.cjs +1 -0
- package/dist/img-ZKCK5FYH.js +1 -0
- package/dist/img-color-MBEU42DF.cjs +1 -0
- package/dist/img-color-VW3XMATY.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.global.js +1 -1
- package/dist/index.js +1 -1
- package/dist/media-RDQ3WR22.js +1 -0
- package/dist/media-XS6ADFFY.cjs +1 -0
- package/dist/motion-BIOKXRRD.js +1 -0
- package/dist/motion-XN5OMPI3.cjs +1 -0
- package/dist/nav-type-MFJJDDPZ.cjs +1 -0
- package/dist/nav-type-S4MHMDHS.js +1 -0
- package/dist/network-BHUTXTX7.js +1 -0
- package/dist/network-DPAAEK2S.cjs +1 -0
- package/dist/online-KTMCBCXT.cjs +1 -0
- package/dist/online-MGYZDLCQ.js +1 -0
- package/dist/orientation-7UDEAKUV.cjs +1 -0
- package/dist/orientation-WJTK5VKX.js +1 -0
- package/dist/page-focused-3WLSZDV4.cjs +1 -0
- package/dist/page-focused-LBKD6QXG.js +1 -0
- package/dist/page-visible-27YKTHKU.js +1 -0
- package/dist/page-visible-6PMX575B.cjs +1 -0
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.cts +13 -2
- package/dist/plugins.d.ts +13 -2
- package/dist/plugins.js +1 -1
- package/dist/pointer-3O7MGTQD.js +1 -0
- package/dist/pointer-DJSMZGSV.cjs +1 -0
- package/dist/pointer-local-6JKSOJZV.cjs +1 -0
- package/dist/pointer-local-X5TVNEEJ.js +1 -0
- package/dist/scroll-velocity-3LOHC3FK.js +1 -0
- package/dist/scroll-velocity-FBORAQ7L.cjs +1 -0
- package/dist/select-EU62RW5T.js +1 -0
- package/dist/select-VOFG6POI.cjs +1 -0
- package/dist/{types-BYVnuPvd.d.cts → types-CudiAlDE.d.cts} +21 -1
- package/dist/{types-BYVnuPvd.d.ts → types-CudiAlDE.d.ts} +21 -1
- package/dist/video-color-B37Z5OBY.cjs +1 -0
- package/dist/video-color-ZMRKDZFO.js +1 -0
- package/dist/visual-viewport-GNJTAHPT.js +1 -0
- package/dist/visual-viewport-MKUHWUQT.cjs +1 -0
- package/llms.txt +13 -9
- package/package.json +1 -1
- package/dist/auto.global.js +0 -1
- package/dist/chunk-6DXNWAGS.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,69 @@ backwards-compatible change (semver's `1.0.0`+ rules kick in at v1).
|
|
|
8
8
|
Only the published library (`dist/`) is versioned here; the demo and docs site
|
|
9
9
|
are repo-only and not part of the npm package.
|
|
10
10
|
|
|
11
|
+
## [0.7.1]
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- **`visibility` now tolerates near-1 intersection ratios.** The shared
|
|
15
|
+
`IntersectionObserver` requests callbacks just below full containment, and the
|
|
16
|
+
`visibility` source confirms full visibility from the entry geometry instead of
|
|
17
|
+
requiring an exact `intersectionRatio === 1`. This fixes scroll-triggered
|
|
18
|
+
reveal examples that could get stuck on Firefox mobile when the browser reports
|
|
19
|
+
a ratio fractionally below 1.
|
|
20
|
+
|
|
21
|
+
## [0.7.0]
|
|
22
|
+
|
|
23
|
+
Breaking release (0.x minor): leaner defaults, viewport-aware sources, and a
|
|
24
|
+
truly zero-config `auto`. Migration notes are under each item.
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **`auto` is now fully declarative and attaches nothing by default.** It no
|
|
28
|
+
longer auto-attaches `viewport`/`pointer` to `:root`. Declare every source —
|
|
29
|
+
globals included — with `data-props-for`, e.g. `<html data-props-for="viewport
|
|
30
|
+
pointer">`. **Migration:** add the globals you relied on to the root `<html>`.
|
|
31
|
+
- **`auto` loads plugins on demand.** The first time a `data-props-for` key needs
|
|
32
|
+
a plugin, its chunk is dynamically imported and registered, then the binding
|
|
33
|
+
attaches — no more `registerPlugins()` / `prop-for-that/plugins` import when
|
|
34
|
+
using `auto`. Because it lazy-loads via dynamic `import()`, load `auto` as a
|
|
35
|
+
**module**: `<script type="module" src=".../auto.js">`. The classic
|
|
36
|
+
`auto.global.js` drop-in is removed (it can't resolve lazy chunks from a CDN).
|
|
37
|
+
**Migration:** switch the `auto` script tag to `type="module"` and drop any
|
|
38
|
+
`registerPlugins()` calls that existed only to feed `auto`.
|
|
39
|
+
- **Element sources are viewport-gated.** An `element`-scoped source now runs only
|
|
40
|
+
while its element is in the viewport (via the shared `IntersectionObserver`);
|
|
41
|
+
off screen its work is torn down and its last values freeze in place, resuming +
|
|
42
|
+
re-seeding on re-entry. Global sources and `:root` bindings are never gated; a
|
|
43
|
+
source can opt out with `gate: false`. No API change for consumers.
|
|
44
|
+
- **The frame loop freezes while the tab is hidden** (`document.hidden`) and stays
|
|
45
|
+
fully idle when nothing is changing — fewer stray `requestAnimationFrame`s on
|
|
46
|
+
pages that aren't actively updating.
|
|
47
|
+
- Shared `ResizeObserver`/`IntersectionObserver` now support multiple subscribers
|
|
48
|
+
per element (with last-entry replay to late subscribers), so an element can be
|
|
49
|
+
watched by both a source and the gate at once.
|
|
50
|
+
- `auto` no longer caches a *failed* plugin load permanently — a transient failure
|
|
51
|
+
(offline, blocked, flaky CDN) is dropped so a later request for the same key retries.
|
|
52
|
+
- `img-color` memoizes its extracted palette per rendered source, so the viewport
|
|
53
|
+
gate re-running `start()` on scroll-in reuses the result instead of re-sampling the
|
|
54
|
+
canvas when the image hasn't changed.
|
|
55
|
+
- Documented the auto path's two limits (light-DOM only / no shadow roots; needs a
|
|
56
|
+
CDN that serves the `dist` tree verbatim) and the gate contract for source authors
|
|
57
|
+
(`start()` is re-invoked on every viewport re-entry, so keep it cheap + idempotent).
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
- **`gate?: boolean` on `Source`** — opt an element source out of viewport gating
|
|
61
|
+
(defaults on for `scope: 'element'`). `visibility` sets it `false`.
|
|
62
|
+
- **`isRegistered(key)`** exported from `prop-for-that` — whether a source key is
|
|
63
|
+
currently registered.
|
|
64
|
+
|
|
65
|
+
### Removed
|
|
66
|
+
- **`pointer` is no longer a core source** — it writes on every `pointermove`, so
|
|
67
|
+
it's now an opt-in plugin alongside `pointer-local`. **Migration:** under `auto`
|
|
68
|
+
it just works (loaded on demand). Imperatively, `register` it first:
|
|
69
|
+
`import { pointer } from 'prop-for-that/plugins'; register(pointer);
|
|
70
|
+
propsFor(['pointer'])`.
|
|
71
|
+
- **`dist/auto.global.js`** (the classic, non-module `auto` drop-in) — see the
|
|
72
|
+
`auto` note above.
|
|
73
|
+
|
|
11
74
|
## [0.6.4]
|
|
12
75
|
|
|
13
76
|
### Added
|
package/README.md
CHANGED
|
@@ -43,28 +43,30 @@ Bind any element with `data-props-for="key …"` and read its `--live-*` propert
|
|
|
43
43
|
## Why
|
|
44
44
|
|
|
45
45
|
- **CSS does the work.** No per-element event handlers or render loops — bind once, compose in stylesheets.
|
|
46
|
-
- **Fast by design.** One `requestAnimationFrame` flush per frame, write-on-change diffing
|
|
47
|
-
- **Ship only what you use.**
|
|
46
|
+
- **Fast by design.** One `requestAnimationFrame` flush per frame — idle when nothing changes, frozen while the tab is hidden — plus write-on-change diffing and a single shared `ResizeObserver` / `IntersectionObserver` for the whole page. Element sources pause while their element is off screen.
|
|
47
|
+
- **Ship only what you use.** Four lightweight core sources are built in; everything else is an opt-in, tree-shakeable plugin — and under `auto` each plugin loads on demand, the moment a `data-props-for` attribute asks for it.
|
|
48
48
|
- **Plays with the platform.** Opt into typed [`@property`](https://prop-for-that.netlify.app/docsite/concepts/typed-properties/) values for interpolation, or FOUC-safe constants written before first paint.
|
|
49
49
|
- **Tiny and dependency-free**, in every bundle format.
|
|
50
50
|
|
|
51
51
|
## What it can read
|
|
52
52
|
|
|
53
|
-
**Core** (
|
|
53
|
+
**Core** (built in): viewport, element size, visibility, and `<input type="range">` values.
|
|
54
54
|
|
|
55
|
-
**Plugins** (opt-in): battery, network, online status, page focus & visibility, navigation type, FPS, clock, scroll velocity, device orientation / motion, geolocation, CPU pressure, media playback, form & field state, select & color-picker values, and dominant + accent colors extracted from images and video — 20+ in all.
|
|
55
|
+
**Plugins** (opt-in): pointer position, battery, network, online status, page focus & visibility, navigation type, FPS, clock, scroll velocity, device orientation / motion, geolocation, CPU pressure, media playback, form & field state, select & color-picker values, and dominant + accent colors extracted from images and video — 20+ in all.
|
|
56
56
|
|
|
57
57
|
→ Every source, every property, and live demos are in the **[docs](https://prop-for-that.netlify.app/docsite/reference/plugins/)**.
|
|
58
58
|
|
|
59
|
-
##
|
|
59
|
+
## Entry points
|
|
60
60
|
|
|
61
61
|
| Import | What it does |
|
|
62
62
|
| --- | --- |
|
|
63
|
-
| `prop-for-that/auto` | Zero-config
|
|
63
|
+
| `prop-for-that/auto` | Zero-config & declarative: binds every `data-props-for` element — globals included, via `<html data-props-for="…">` — loading plugin sources on demand, kept in sync with the DOM. Use as `<script type="module">`. |
|
|
64
64
|
| `prop-for-that` | Imperative API — `propsFor()`, `register()`, `configure()` — for explicit control and teardown. |
|
|
65
65
|
| `prop-for-that/head` | Synchronous, FOUC-safe constants (scrollbar width, DPR, core count, device memory) before first paint. |
|
|
66
66
|
| `prop-for-that/plugins` | The opt-in plugin catalog. |
|
|
67
67
|
|
|
68
|
+
> `auto` sees the **light DOM only** (not shadow roots — bind those with `propsFor(el, …)`), and lazy-loads plugin chunks, so from a CDN use one that serves the `dist` files verbatim (unpkg / jsDelivr), not a rewriting CDN.
|
|
69
|
+
|
|
68
70
|
Full API and concepts: **[prop-for-that.netlify.app/docsite](https://prop-for-that.netlify.app/docsite/)**.
|
|
69
71
|
|
|
70
72
|
## For LLMs / AI tools
|
package/dist/auto.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk2LAVIUIS_cjs=require('./chunk-2LAVIUIS.cjs');require('./chunk-HHINWX7L.cjs'),require('./chunk-EOPF4ZLZ.cjs'),require('./chunk-65MXZJBD.cjs'),require('./chunk-7L35N3N3.cjs'),require('./chunk-QHHF5SEL.cjs');var u={"scroll-velocity":()=>import('./scroll-velocity-FBORAQ7L.cjs').then(t=>t.scrollVelocity),online:()=>import('./online-KTMCBCXT.cjs').then(t=>t.online),"page-focused":()=>import('./page-focused-3WLSZDV4.cjs').then(t=>t.pageFocused),"page-visible":()=>import('./page-visible-6PMX575B.cjs').then(t=>t.pageVisible),"nav-type":()=>import('./nav-type-MFJJDDPZ.cjs').then(t=>t.navType),network:()=>import('./network-DPAAEK2S.cjs').then(t=>t.network),battery:()=>import('./battery-DQQ2NOGC.cjs').then(t=>t.battery),clock:()=>import('./clock-EVSBOOMJ.cjs').then(t=>t.clock),fps:()=>import('./fps-TZQLC5MI.cjs').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-MKUHWUQT.cjs').then(t=>t.visualViewport),pointer:()=>import('./pointer-DJSMZGSV.cjs').then(t=>t.pointer),"pointer-local":()=>import('./pointer-local-6JKSOJZV.cjs').then(t=>t.pointerLocal),media:()=>import('./media-XS6ADFFY.cjs').then(t=>t.media),field:()=>import('./field-MPAB2GPW.cjs').then(t=>t.field),"field-state":()=>import('./field-state-LUVDPYVB.cjs').then(t=>t.fieldState),"form-state":()=>import('./form-state-OQCU5JIW.cjs').then(t=>t.formState),select:()=>import('./select-VOFG6POI.cjs').then(t=>t.select),"color-input":()=>import('./color-input-ISNND62O.cjs').then(t=>t.colorInput),orientation:()=>import('./orientation-7UDEAKUV.cjs').then(t=>t.orientation),motion:()=>import('./motion-XN5OMPI3.cjs').then(t=>t.motion),geo:()=>import('./geo-CMG7QJ6S.cjs').then(t=>t.geo),"cpu-pressure":()=>import('./cpu-pressure-FXZDL5IE.cjs').then(t=>t.cpuPressure),img:()=>import('./img-QU7AEFQR.cjs').then(t=>t.img),"img-color":()=>import('./img-color-MBEU42DF.cjs').then(t=>t.imgColor),"video-color":()=>import('./video-color-B37Z5OBY.cjs').then(t=>t.videoColor)};var n=new WeakMap,a=new Map;function v(t){return (t.dataset.propsFor??"").split(/\s+/).filter(Boolean)}function E(t){if(chunk2LAVIUIS_cjs.c(t))return null;let e=u[t];if(!e)return null;let o=a.get(t);return o||(o=e().then(r=>{chunk2LAVIUIS_cjs.a(r);}).catch(r=>{a.delete(t),console.error(`[prop-for-that] failed to load plugin "${t}"`,r);}),a.set(t,o)),o}function L(t,e){let o=E(e);if(!o){chunk2LAVIUIS_cjs.e(t,[e]);return}o.then(()=>{chunk2LAVIUIS_cjs.c(e)&&(n.get(t)??[]).includes(e)&&chunk2LAVIUIS_cjs.e(t,[e]);});}function s(t){let e=v(t),o=n.get(t)??[],r=o.filter(i=>!e.includes(i)),g=e.filter(i=>!o.includes(i));r.length&&chunk2LAVIUIS_cjs.f(t,r),e.length?n.set(t,e):n.delete(t);for(let i of g)L(t,i);}function f(t){let e=n.get(t);e&&(chunk2LAVIUIS_cjs.f(t,e),n.delete(t));}function M(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&s(t),t.querySelectorAll("[data-props-for]").forEach(s));}function b(t){t instanceof HTMLElement&&(f(t),t.querySelectorAll("[data-props-for]").forEach(f));}function h(){document.documentElement.hasAttribute("data-props-typed")&&chunk2LAVIUIS_cjs.d({typed:true}),document.querySelectorAll("[data-props-for]").forEach(s),new MutationObserver(t=>{for(let e of t){if(e.type==="attributes"&&e.target instanceof HTMLElement){s(e.target);continue}e.removedNodes.forEach(b),e.addedNodes.forEach(M);}}).observe(document.documentElement,{subtree:true,childList:true,attributes:true,attributeFilter:["data-props-for"]});}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h,{once:true}):h());
|
package/dist/auto.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {d,f as f$1,e,c,a as a$1}from'./chunk-UQW7YOHI.js';import'./chunk-LTJ2VKVY.js';import'./chunk-LF4OE7IL.js';import'./chunk-T4N6AEOZ.js';import'./chunk-LWKH66VY.js';import'./chunk-EEMKKLRF.js';var u={"scroll-velocity":()=>import('./scroll-velocity-3LOHC3FK.js').then(t=>t.scrollVelocity),online:()=>import('./online-MGYZDLCQ.js').then(t=>t.online),"page-focused":()=>import('./page-focused-LBKD6QXG.js').then(t=>t.pageFocused),"page-visible":()=>import('./page-visible-27YKTHKU.js').then(t=>t.pageVisible),"nav-type":()=>import('./nav-type-S4MHMDHS.js').then(t=>t.navType),network:()=>import('./network-BHUTXTX7.js').then(t=>t.network),battery:()=>import('./battery-CDMJLP4C.js').then(t=>t.battery),clock:()=>import('./clock-LYF2IHGE.js').then(t=>t.clock),fps:()=>import('./fps-OLN52HAI.js').then(t=>t.fps),"visual-viewport":()=>import('./visual-viewport-GNJTAHPT.js').then(t=>t.visualViewport),pointer:()=>import('./pointer-3O7MGTQD.js').then(t=>t.pointer),"pointer-local":()=>import('./pointer-local-X5TVNEEJ.js').then(t=>t.pointerLocal),media:()=>import('./media-RDQ3WR22.js').then(t=>t.media),field:()=>import('./field-N3X45MAG.js').then(t=>t.field),"field-state":()=>import('./field-state-CW4AHAD4.js').then(t=>t.fieldState),"form-state":()=>import('./form-state-43U225CL.js').then(t=>t.formState),select:()=>import('./select-EU62RW5T.js').then(t=>t.select),"color-input":()=>import('./color-input-UT32SY4G.js').then(t=>t.colorInput),orientation:()=>import('./orientation-WJTK5VKX.js').then(t=>t.orientation),motion:()=>import('./motion-BIOKXRRD.js').then(t=>t.motion),geo:()=>import('./geo-MXO5OMVO.js').then(t=>t.geo),"cpu-pressure":()=>import('./cpu-pressure-WCDHVDRP.js').then(t=>t.cpuPressure),img:()=>import('./img-ZKCK5FYH.js').then(t=>t.img),"img-color":()=>import('./img-color-VW3XMATY.js').then(t=>t.imgColor),"video-color":()=>import('./video-color-ZMRKDZFO.js').then(t=>t.videoColor)};var n=new WeakMap,a=new Map;function v(t){return (t.dataset.propsFor??"").split(/\s+/).filter(Boolean)}function E(t){if(c(t))return null;let e=u[t];if(!e)return null;let o=a.get(t);return o||(o=e().then(r=>{a$1(r);}).catch(r=>{a.delete(t),console.error(`[prop-for-that] failed to load plugin "${t}"`,r);}),a.set(t,o)),o}function L(t,e$1){let o=E(e$1);if(!o){e(t,[e$1]);return}o.then(()=>{c(e$1)&&(n.get(t)??[]).includes(e$1)&&e(t,[e$1]);});}function s(t){let e=v(t),o=n.get(t)??[],r=o.filter(i=>!e.includes(i)),g=e.filter(i=>!o.includes(i));r.length&&f$1(t,r),e.length?n.set(t,e):n.delete(t);for(let i of g)L(t,i);}function f(t){let e=n.get(t);e&&(f$1(t,e),n.delete(t));}function M(t){t instanceof HTMLElement&&(t.hasAttribute("data-props-for")&&s(t),t.querySelectorAll("[data-props-for]").forEach(s));}function b(t){t instanceof HTMLElement&&(f(t),t.querySelectorAll("[data-props-for]").forEach(f));}function h(){document.documentElement.hasAttribute("data-props-typed")&&d({typed:true}),document.querySelectorAll("[data-props-for]").forEach(s),new MutationObserver(t=>{for(let e of t){if(e.type==="attributes"&&e.target instanceof HTMLElement){s(e.target);continue}e.removedNodes.forEach(b),e.addedNodes.forEach(M);}}).observe(document.documentElement,{subtree:true,childList:true,attributes:true,attributeFilter:["data-props-for"]});}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",h,{once:true}):h());
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as battery}from'./chunk-DQJQEWPS.js';import'./chunk-T4N6AEOZ.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk7CDVAP3H_cjs=require('./chunk-7CDVAP3H.cjs');require('./chunk-65MXZJBD.cjs');Object.defineProperty(exports,"battery",{enumerable:true,get:function(){return chunk7CDVAP3H_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-LTJ2VKVY.js';import {a as a$1}from'./chunk-T4N6AEOZ.js';var p=[["valueMissing","value-missing"],["typeMismatch","type-mismatch"],["patternMismatch","pattern-mismatch"],["tooLong","too-long"],["tooShort","too-short"],["rangeUnderflow","range-underflow"],["rangeOverflow","range-overflow"],["stepMismatch","step-mismatch"],["badInput","bad-input"],["customError","custom-error"]],u={key:"field",scope:"element",start(t){let r=a(t.target,"input, textarea, select");if(!r)return ()=>{};let o=()=>{let e=r.value.length;t.write("length",e),t.write("empty",e===0?1:0),t.write("valid",r.validity.valid?1:0);for(let[l,m]of p)t.write(m,r.validity[l]?1:0);let n=r.maxLength;n>=0&&(t.write("remaining",Math.max(0,n-e)),t.write("fill-pct",n>0?a$1(Math.min(1,e/n)):0));};o();let i=["input","change"];for(let e of i)r.addEventListener(e,o,{passive:true});return ()=>{for(let e of i)r.removeEventListener(e,o);}}};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-T4N6AEOZ.js';import {a}from'./chunk-EEMKKLRF.js';var h={key:"pointer-local",scope:"element",start(t){let p=t.target;return a("pointermove",l=>{let r=l,o=p.getBoundingClientRect(),e=o.width>0?(r.clientX-o.left)/o.width:0,n=o.height>0?(r.clientY-o.top)/o.height:0,s=e>=0&&e<=1&&n>=0&&n<=1;t.write("local-pointer-x-ratio",a$1(e)),t.write("local-pointer-y-ratio",a$1(n)),t.write("local-pointer-inside",s?1:0);})}};export{h as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var n={nominal:0,fair:1,serious:2,critical:3},o={key:"cpu-pressure",scope:"global",start(r){let s=globalThis.PressureObserver;if(!s)return ()=>{};r.write("cpu-pressure",0);let e;try{e=new s(t=>{let c=t[t.length-1];c&&r.write("cpu-pressure",n[c.state]??0);}),e.observe("cpu",{sampleInterval:1e3}).catch(()=>{});}catch{e=void 0;}return ()=>e?.disconnect()}};exports.a=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunkEOPF4ZLZ_cjs=require('./chunk-EOPF4ZLZ.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var u;function K(){if(u!==void 0||(u=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return u;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],u=e.cssRules[0].style;}catch{u=null;}return u}function y(e){if(typeof document<"u"&&e===document.documentElement){let t=K();if(t)return t}return e.style}var E=class{pending=new Map;last=new WeakMap;set(t,r,n){let o=this.pending.get(t);if(o?.has(r)){o.set(r,n);return}this.last.get(t)?.get(r)!==n&&(o?o.set(r,n):this.pending.set(t,new Map([[r,n]])),chunkEOPF4ZLZ_cjs.a());}forget(t,r){this.last.get(t)?.delete(r),this.pending.get(t)?.delete(r);}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let n=this.last.get(t);n||this.last.set(t,n=new Map);let o=y(t);for(let[s,i]of r)n.get(s)!==i&&(o.setProperty(s,i),n.set(s,i));}this.pending.clear();}}},g=new E;chunkEOPF4ZLZ_cjs.b(g.flush);var S,d=new WeakMap,T=new WeakMap;function R(e,t){S||(S=new ResizeObserver(o=>{for(let s of o){T.set(s.target,s);let i=d.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=d.get(e);r||(d.set(e,r=new Set),S.observe(e)),r.add(t);let n=T.get(e);return n&&t(n),()=>{let o=d.get(e);o&&(o.delete(t),o.size===0&&(d.delete(e),S.unobserve(e)));}}var v,m=new WeakMap,H=new WeakMap,A=[0,.98,.99,.995,.999,1];function w(e,t){v||(v=new IntersectionObserver(o=>{for(let s of o){H.set(s.target,s);let i=m.get(s.target);if(i)for(let p of [...i])p(s);}},{threshold:A}));let r=m.get(e);r||(m.set(e,r=new Set),v.observe(e)),r.add(t);let n=H.get(e);return n&&t(n),()=>{let o=m.get(e);o&&(o.delete(t),o.size===0&&(m.delete(e),v.unobserve(e)));}}var z=new Set;function I(e,t,r){if(z.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;z.add(e);let n=t?r?.[t]:void 0,o=t?chunk7L35N3N3_cjs.a.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:n?.syntax??"<number>",inherits:n?.inherits??!0,initialValue:o!=null?String(o):n?.initial??"0"});}catch{}}var D={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),chunkQHHF5SEL_cjs.a("resize",t)}};var O={key:"size",scope:"element",start(e){return R(e.target,t=>{let r=t.borderBoxSize?.[0],n=r?r.inlineSize:t.contentRect.width,o=r?r.blockSize:t.contentRect.height;e.write("w",chunk65MXZJBD_cjs.a(n)),e.write("h",chunk65MXZJBD_cjs.a(o)),e.write("aspect",o>0?chunk65MXZJBD_cjs.a(n/o):0);})}};var h=1;function B(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let r=e.boundingClientRect;return r.top>=t.top-h&&r.right<=t.right+h&&r.bottom<=t.bottom+h&&r.left>=t.left-h}var P={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),w(e.target,r=>{let n=B(r);e.write("visible",n?1:0),n&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var F={key:"range",scope:"element",start(e){let t=chunkHHINWX7L_cjs.a(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let n=t.min===""?0:Number(t.min),o=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",o>n?chunk65MXZJBD_cjs.a((s-n)/(o-n)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var W={viewport:D,size:O,visibility:P,range:F};var N=()=>{},f=new Map,b={...W};function Me(e){b[e.key]=e;}function ke(e){delete b[e];}function Le(e){return e in b}function xe(e){Object.assign(chunk7L35N3N3_cjs.a,e);}function V(e,t,r){return {target:e,config:chunk7L35N3N3_cjs.a,write(n,o,s="live"){let i=(s==="const"?chunk7L35N3N3_cjs.a.constPrefix:chunk7L35N3N3_cjs.a.livePrefix)+n;t.add(i),chunk7L35N3N3_cjs.a.typed&&I(i,n,r),g.set(e,i,String(o));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==chunk7L35N3N3_cjs.a.root&&typeof IntersectionObserver<"u"))return e.start(t);let o=null,s=()=>{if(!o)try{o=e.start(t);}catch(a){console.error(`[prop-for-that] source "${e.key}" failed to start`,a);}},i=()=>{o?.(),o=null;},p=w(r,a=>{a.isIntersecting?s():i();});return ()=>{p(),i();}}function C(e,t,r){let n=r.get(t);if(!n)return;n.dispose();let o=y(e);for(let s of n.written)o.removeProperty(s),g.forget(e,s);r.delete(t);}function _(e,t){let r=f.get(e);r||f.set(e,r=new Map);let n=[];for(let o of t){if(r.has(o))continue;let s=b[o];if(!s){console.warn(`[prop-for-that] unknown source "${o}"`);continue}let i=new Set,p;try{p=$(s,V(e,i,s.props),e);}catch(a){console.error(`[prop-for-that] source "${o}" failed to start`,a);continue}r.set(o,{dispose:p,written:i}),n.push(o);}return ()=>{let o=f.get(e);if(o){for(let s of n)C(e,s,o);o.size===0&&f.delete(e);}}}function j(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function q(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function Te(e,t){let r,n;if(t===void 0&&q(e)?(r=chunk7L35N3N3_cjs.a.root?[chunk7L35N3N3_cjs.a.root]:[],n=e):(r=j(e),n=t??[]),!r.length||!n.length)return N;let o=r.map(s=>_(s,n));return ()=>{for(let s of o)s();}}function He(e,t){let r=f.get(e);if(r){for(let n of t??[...r.keys()])C(e,n,r);r.size===0&&f.delete(e);}}function Re(){for(let[e,t]of f)for(let r of [...t.keys()])C(e,r,t);f.clear();}exports.a=Me;exports.b=ke;exports.c=Le;exports.d=xe;exports.e=Te;exports.f=He;exports.g=Re;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var s=new Map;function o(e,n){let t=s.get(e);if(!t){let r=new Set,i=a=>{for(let d of [...r])d(a);};t={handlers:r,dispatch:i},s.set(e,t),document.addEventListener(e,i,{passive:true});}return t.handlers.add(n),()=>{t.handlers.delete(n),t.handlers.size===0&&(document.removeEventListener(e,t.dispatch),s.delete(e));}}var l={key:"page-visible",scope:"global",start(e){let n=()=>e.write("page-visible",document.visibilityState==="visible"?1:0);return n(),o("visibilitychange",n)}};exports.a=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var c={key:"pointer",scope:"global",start(o){return chunkQHHF5SEL_cjs.a("pointermove",n=>{let e=n;o.write("pointer-x",e.clientX),o.write("pointer-y",e.clientY),o.write("pointer-x-ratio",chunk65MXZJBD_cjs.a(e.clientX/window.innerWidth)),o.write("pointer-y-ratio",chunk65MXZJBD_cjs.a(e.clientY/window.innerHeight));})}};exports.a=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n={nominal:0,fair:1,serious:2,critical:3},o={key:"cpu-pressure",scope:"global",start(r){let s=globalThis.PressureObserver;if(!s)return ()=>{};r.write("cpu-pressure",0);let e;try{e=new s(t=>{let c=t[t.length-1];c&&r.write("cpu-pressure",n[c.state]??0);}),e.observe("cpu",{sampleInterval:1e3}).catch(()=>{});}catch{e=void 0;}return ()=>e?.disconnect()}};export{o as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var d={key:"media",scope:"element",start(r){let e=chunkHHINWX7L_cjs.a(r.target,"video, audio");if(!e)return ()=>{};let i=()=>{let t=isFinite(e.duration)?e.duration:0;r.write("current-time",chunk65MXZJBD_cjs.a(e.currentTime)),r.write("duration",chunk65MXZJBD_cjs.a(t)),r.write("progress",t>0?chunk65MXZJBD_cjs.a(e.currentTime/t):0),r.write("paused",e.paused?1:0),r.write("volume",chunk65MXZJBD_cjs.a(e.volume));};i();let n=["timeupdate","loadedmetadata","play","pause","volumechange"];for(let t of n)e.addEventListener(t,i,{passive:true});return ()=>{for(let t of n)e.removeEventListener(t,i);}}};exports.a=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function r(n){return Math.round(n*1e4)/1e4}exports.a=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs');var u={key:"img",scope:"element",start(t){let e=chunkHHINWX7L_cjs.a(t.target,"img");if(!e)return ()=>{};let i=()=>e.getAttribute("src")!==null||e.getAttribute("srcset")!==null,r=e.complete&&e.naturalWidth===0&&i(),o=()=>{t.write("natural-w",e.naturalWidth),t.write("natural-h",e.naturalHeight),t.write("loaded",e.complete&&e.naturalWidth>0?1:0),t.write("broken",r?1:0);},n=()=>{r=false,o();},a=()=>{r=true,o();};return o(),e.addEventListener("load",n,{passive:true}),e.addEventListener("error",a,{passive:true}),()=>{e.removeEventListener("load",n),e.removeEventListener("error",a);}}};exports.a=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var s={key:"clock",scope:"global",start(e){let o=0,r=()=>{let t=new Date;e.write("now",Math.floor(t.getTime()/1e3)),e.write("hours",t.getHours()),e.write("minutes",t.getMinutes()),e.write("seconds",t.getSeconds()),o=setTimeout(r,1e3-Date.now()%1e3);};return r(),()=>clearTimeout(o)}};exports.a=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var l={key:"battery",scope:"global",start(n){let a=navigator.getBattery;if(!a)return ()=>{};let g=false,r,e;return a.call(navigator).then(t=>{g||(r=t,e=()=>{n.write("battery-level",chunk65MXZJBD_cjs.a(t.level)),n.write("battery-charging",t.charging?1:0);},e(),t.addEventListener("levelchange",e),t.addEventListener("chargingchange",e));}),()=>{g=true,r&&e&&(r.removeEventListener("levelchange",e),r.removeEventListener("chargingchange",e));}}};exports.a=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var e={livePrefix:"--live-",constPrefix:"--const-",root:typeof document<"u"?document.documentElement:void 0,typed:false};exports.a=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s={key:"clock",scope:"global",start(e){let o=0,r=()=>{let t=new Date;e.write("now",Math.floor(t.getTime()/1e3)),e.write("hours",t.getHours()),e.write("minutes",t.getMinutes()),e.write("seconds",t.getSeconds()),o=setTimeout(r,1e3-Date.now()%1e3);};return r(),()=>clearTimeout(o)}};export{s as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E=({r:n,g:t,b:e})=>`#${(16777216|n<<16|t<<8|e).toString(16).slice(1)}`,N={syntax:"<color>",initial:"transparent"},k=(n,t,e)=>(.2126*n+.7152*t+.0722*e)/255,I=(n,t,e)=>{let o=Math.max(n,t,e)/255,c=Math.min(n,t,e)/255,l=o-c;return l===0?0:Math.min(1,l/(1-Math.abs(o+c-1)))};function L(n){let t=new Map,e=0,o=0,c=0,l=0;for(let u=0;u<n.length;u+=4){if(n[u+3]<128)continue;let s=n[u],m=n[u+1],i=n[u+2];e++,o+=s,c+=m,l+=i;let g=s>>4<<8|m>>4<<4|i>>4,a=t.get(g);a?(a.r+=s,a.g+=m,a.b+=i,a.n++):t.set(g,{r:s,g:m,b:i,n:1});}return {buckets:t,count:e,sumR:o,sumG:c,sumB:l}}var B=n=>{let t=Math.round(n.r/n.n),e=Math.round(n.g/n.n),o=Math.round(n.b/n.n);return {r:t,g:e,b:o,l:k(t,e,o)}},D=.04,O=.96,P=.15;function T(n){let{buckets:t,count:e,sumR:o,sumG:c,sumB:l}=L(n);if(!e)return null;let u=0;for(let b of t.values())b.n>u&&(u=b.n);let s=null,m=0,i=null,g=-1/0,a=null,y=1/0,C=null,R=-1/0;for(let b of t.values()){let r=B(b);b.n>m&&(m=b.n,s=r);let x=I(r.r,r.g,r.b);if(x>=P){let S=1-Math.abs(r.l-.5)*2,M=3*x+1.5*Math.max(0,S)+b.n/u;M>g&&(g=M,i=r);}r.l>=D&&r.l<y&&(y=r.l,a=r),r.l<=O&&r.l>R&&(R=r.l,C=r);}let p=Math.round(o/e),v=Math.round(c/e),h=Math.round(l/e),A={r:p,g:v,b:h,l:k(p,v,h)},d=s;return {dominant:d,accent:i??d,dark:a??d,light:C??d,average:A,temp:(p-h)/255}}var f=16,w=()=>{if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(f,f);if(typeof document>"u")return null;let n=document.createElement("canvas");return n.width=n.height=f,n};function _(){let t=w()?.getContext("2d",{willReadFrequently:true});return t?e=>{t.drawImage(e,0,0,f,f);try{return t.getImageData(0,0,f,f).data}catch{return null}}:null}export{E as a,N as b,T as c,f as d,_ as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var E=({r:n,g:t,b:e})=>`#${(16777216|n<<16|t<<8|e).toString(16).slice(1)}`,N={syntax:"<color>",initial:"transparent"},k=(n,t,e)=>(.2126*n+.7152*t+.0722*e)/255,I=(n,t,e)=>{let o=Math.max(n,t,e)/255,c=Math.min(n,t,e)/255,l=o-c;return l===0?0:Math.min(1,l/(1-Math.abs(o+c-1)))};function L(n){let t=new Map,e=0,o=0,c=0,l=0;for(let u=0;u<n.length;u+=4){if(n[u+3]<128)continue;let s=n[u],m=n[u+1],i=n[u+2];e++,o+=s,c+=m,l+=i;let g=s>>4<<8|m>>4<<4|i>>4,a=t.get(g);a?(a.r+=s,a.g+=m,a.b+=i,a.n++):t.set(g,{r:s,g:m,b:i,n:1});}return {buckets:t,count:e,sumR:o,sumG:c,sumB:l}}var B=n=>{let t=Math.round(n.r/n.n),e=Math.round(n.g/n.n),o=Math.round(n.b/n.n);return {r:t,g:e,b:o,l:k(t,e,o)}},D=.04,O=.96,P=.15;function T(n){let{buckets:t,count:e,sumR:o,sumG:c,sumB:l}=L(n);if(!e)return null;let u=0;for(let b of t.values())b.n>u&&(u=b.n);let s=null,m=0,i=null,g=-1/0,a=null,y=1/0,C=null,R=-1/0;for(let b of t.values()){let r=B(b);b.n>m&&(m=b.n,s=r);let x=I(r.r,r.g,r.b);if(x>=P){let S=1-Math.abs(r.l-.5)*2,M=3*x+1.5*Math.max(0,S)+b.n/u;M>g&&(g=M,i=r);}r.l>=D&&r.l<y&&(y=r.l,a=r),r.l<=O&&r.l>R&&(R=r.l,C=r);}let p=Math.round(o/e),v=Math.round(c/e),h=Math.round(l/e),A={r:p,g:v,b:h,l:k(p,v,h)},d=s;return {dominant:d,accent:i??d,dark:a??d,light:C??d,average:A,temp:(p-h)/255}}var f=16,w=()=>{if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(f,f);if(typeof document>"u")return null;let n=document.createElement("canvas");return n.width=n.height=f,n};function _(){let t=w()?.getContext("2d",{willReadFrequently:true});return t?e=>{t.drawImage(e,0,0,f,f);try{return t.getImageData(0,0,f,f).data}catch{return null}}:null}exports.a=E;exports.b=N;exports.c=T;exports.d=f;exports.e=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b,c,a as a$2,e,d}from'./chunk-A2ETARW3.js';import {a}from'./chunk-LTJ2VKVY.js';import {a as a$1}from'./chunk-T4N6AEOZ.js';async function y(m){let e$1=e();if(!e$1)return null;let o=m,r;if(typeof createImageBitmap=="function")try{r=await createImageBitmap(m,{resizeWidth:d,resizeHeight:d,resizeQuality:"low"}),o=r;}catch{}let i=e$1(o);return r?.close(),i}var I={key:"img-color",scope:"element",props:{img:b,"img-accent":b,"img-dark":b,"img-light":b,"img-avg":b,"img-temp":{syntax:"<number>",initial:"0"}},start(m){let e=a(m.target,"img");if(!e)return ()=>{};let o=false,r="",i=null,g=c=>{for(let t in c)m.write(t,c[t]);},l=async()=>{if(!e.complete||e.naturalWidth===0)return;if(i&&r===e.currentSrc)return g(i);let c$1=await y(e).catch(()=>null);if(o||!c$1)return;let t=c(c$1);t&&(r=e.currentSrc,i={img:a$2(t.dominant),"img-accent":a$2(t.accent),"img-dark":a$2(t.dark),"img-light":a$2(t.light),"img-avg":a$2(t.average),"img-temp":a$1(t.temp)},g(i));};return l(),e.addEventListener("load",l,{passive:true}),()=>{o=true,e.removeEventListener("load",l);}}};export{I as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var m={key:"select",scope:"element",start(n){let t=chunkHHINWX7L_cjs.a(n.target,"select");if(!t)return ()=>{};let o=()=>{let e=t.options.length,r=t.selectedIndex,c=t.selectedOptions.length;n.write("index",r),n.write("option-count",e),n.write("index-pct",r>=0&&e>1?chunk65MXZJBD_cjs.a(r/(e-1)):0),n.write("selected-count",c),n.write("selected-pct",e>0?chunk65MXZJBD_cjs.a(c/e):0);let l=Number(t.value);t.value.trim()!==""&&Number.isFinite(l)&&n.write("value-num",l);};o();let i=["input","change"];for(let e of i)t.addEventListener(e,o,{passive:true});return ()=>{for(let e of i)t.removeEventListener(e,o);}}};exports.a=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkL4SCOKPV_cjs=require('./chunk-L4SCOKPV.cjs');var g=e=>e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")?e.checked?"1":"0":e.value,h=e=>{if(e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio"))return e.defaultChecked?"1":"0";if(e instanceof HTMLSelectElement){let r=Array.from(e.options).find(o=>o.defaultSelected);return r?r.value:e.options[0]?.value??""}return e.defaultValue},y={key:"field-state",scope:"element",start(e){let r=chunkL4SCOKPV_cjs.a(e.target);if(!r.length)return ()=>{};let o=new Set(r),l=new WeakMap;for(let t of r)l.set(t,g(t));let u=new Set,f=new Set,s=new Set,c=false,i=()=>{let t=u.size>0,n=f.size>0;e.write("dirty",t?1:0),e.write("pristine",t?0:1),e.write("touched",n?1:0),e.write("untouched",n?0:1),e.write("changed",s.size>0?1:0),e.write("submitted",c?1:0);};i();let a=t=>{let n=t.target;o.has(n)&&(u.add(n),g(n)===l.get(n)?s.delete(n):s.add(n),i());},m=t=>{let n=t.target;o.has(n)&&(f.add(n),i());};e.target.addEventListener("input",a,{passive:true}),e.target.addEventListener("change",a,{passive:true}),e.target.addEventListener("focusout",m,{passive:true});let d=e.target instanceof HTMLFormElement?e.target:r[0]?.form,E=()=>{c=true,i();},v=()=>{u.clear(),f.clear(),c=false,s.clear();for(let t of r)h(t)!==l.get(t)&&s.add(t);i();};return d?.addEventListener("submit",E,{passive:true}),d?.addEventListener("reset",v,{passive:true}),()=>{e.target.removeEventListener("input",a),e.target.removeEventListener("change",a),e.target.removeEventListener("focusout",m),d?.removeEventListener("submit",E),d?.removeEventListener("reset",v);}}};exports.a=y;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkL4SCOKPV_cjs=require('./chunk-L4SCOKPV.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var c={key:"form-state",scope:"element",start(e){let o=chunkL4SCOKPV_cjs.a(e.target);if(!o.length)return ()=>{};let t=()=>{let r=0,i=0,n=0,f=0;for(let a of o){if(!a.willValidate)continue;r++;let u=a.validity.valid;u&&i++,a.required&&(n++,u&&f++);}e.write("field-count",r),e.write("valid-count",i),e.write("invalid-count",r-i),e.write("all-valid",r===i?1:0),e.write("completion",n?chunk65MXZJBD_cjs.a(f/n):1);};t(),e.target.addEventListener("input",t,{passive:true}),e.target.addEventListener("change",t,{passive:true});let s=false,l=e.target instanceof HTMLFormElement?e.target:o[0]?.form,d=()=>{requestAnimationFrame(()=>{s||t();});};return l?.addEventListener("reset",d,{passive:true}),()=>{s=true,e.target.removeEventListener("input",t),e.target.removeEventListener("change",t),l?.removeEventListener("reset",d);}}};exports.a=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T4N6AEOZ.js';var l={key:"battery",scope:"global",start(n){let a$1=navigator.getBattery;if(!a$1)return ()=>{};let g=false,r,e;return a$1.call(navigator).then(t=>{g||(r=t,e=()=>{n.write("battery-level",a(t.level)),n.write("battery-charging",t.charging?1:0);},e(),t.addEventListener("levelchange",e),t.addEventListener("chargingchange",e));}),()=>{g=true,r&&e&&(r.removeEventListener("levelchange",e),r.removeEventListener("chargingchange",e));}}};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=new Map;function a(n,s){let e=t.get(n);if(!e){let r=new Set,d=i=>{for(let o of [...r])o(i);};e={handlers:r,dispatch:d},t.set(n,e),window.addEventListener(n,d,{passive:true});}return e.handlers.add(s),()=>{e.handlers.delete(s),e.handlers.size===0&&(window.removeEventListener(n,e.dispatch),t.delete(n));}}export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk7L35N3N3_cjs=require('./chunk-7L35N3N3.cjs');var i=new Set,m=null,n=0,u=false,t=false,d=0,f=()=>typeof requestAnimationFrame=="function";function s(e){if(n=0,t)return;let r=chunk7L35N3N3_cjs.a.liveHz;if(f()&&r&&r>0&&e-d<1e3/r){n=requestAnimationFrame(s);return}if(d=e,u=true,i.size)for(let c of [...i])c(e);m?.(),u=false,i.size&&f()&&o();}function o(){n||u||t||(f()?n=requestAnimationFrame(s):s(0));}function v(){o();}function y(e){m=e;}function h(e){return i.add(e),o(),()=>{i.delete(e);}}function l(){t||(t=true,n&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),n=0);}function p(){t&&(t=false,o());}typeof document<"u"&&typeof document.addEventListener=="function"&&document.addEventListener("visibilitychange",()=>{document.hidden?l():p();});exports.a=v;exports.b=y;exports.c=h;exports.d=l;exports.e=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T4N6AEOZ.js';var i={key:"visual-viewport",scope:"global",start(o){let e=window.visualViewport;if(!e)return ()=>{};let r=()=>{o.write("vvp-scale",a(e.scale)),o.write("vvp-offset-top",a(e.offsetTop)),o.write("vvp-height",a(e.height));};return r(),e.addEventListener("resize",r,{passive:true}),e.addEventListener("scroll",r,{passive:true}),()=>{e.removeEventListener("resize",r),e.removeEventListener("scroll",r);}}};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkA6JDSQWH_cjs=require('./chunk-A6JDSQWH.cjs'),chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');async function y(m){let e=chunkA6JDSQWH_cjs.e();if(!e)return null;let o=m,r;if(typeof createImageBitmap=="function")try{r=await createImageBitmap(m,{resizeWidth:chunkA6JDSQWH_cjs.d,resizeHeight:chunkA6JDSQWH_cjs.d,resizeQuality:"low"}),o=r;}catch{}let i=e(o);return r?.close(),i}var I={key:"img-color",scope:"element",props:{img:chunkA6JDSQWH_cjs.b,"img-accent":chunkA6JDSQWH_cjs.b,"img-dark":chunkA6JDSQWH_cjs.b,"img-light":chunkA6JDSQWH_cjs.b,"img-avg":chunkA6JDSQWH_cjs.b,"img-temp":{syntax:"<number>",initial:"0"}},start(m){let e=chunkHHINWX7L_cjs.a(m.target,"img");if(!e)return ()=>{};let o=false,r="",i=null,g=c=>{for(let t in c)m.write(t,c[t]);},l=async()=>{if(!e.complete||e.naturalWidth===0)return;if(i&&r===e.currentSrc)return g(i);let c=await y(e).catch(()=>null);if(o||!c)return;let t=chunkA6JDSQWH_cjs.c(c);t&&(r=e.currentSrc,i={img:chunkA6JDSQWH_cjs.a(t.dominant),"img-accent":chunkA6JDSQWH_cjs.a(t.accent),"img-dark":chunkA6JDSQWH_cjs.a(t.dark),"img-light":chunkA6JDSQWH_cjs.a(t.light),"img-avg":chunkA6JDSQWH_cjs.a(t.average),"img-temp":chunk65MXZJBD_cjs.a(t.temp)},g(i));};return l(),e.addEventListener("load",l,{passive:true}),()=>{o=true,e.removeEventListener("load",l);}}};exports.a=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T4N6AEOZ.js';var n={key:"geo",scope:"global",start(e){let r=navigator.geolocation;if(!r)return ()=>{};let c=false,a$1=r.watchPosition(t=>{c||(e.write("geo-lat",a(t.coords.latitude)),e.write("geo-lng",a(t.coords.longitude)),e.write("geo-accuracy",a(t.coords.accuracy)));});return ()=>{c=true,r.clearWatch(a$1);}}};export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n={key:"nav-type",scope:"global",props:{"nav-type":{syntax:"<custom-ident>",initial:"navigate"}},start(e){let t=performance.getEntriesByType("navigation")[0];return e.write("nav-type",t?.type??"navigate","const"),()=>{}}};export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function t(e,n){return e.matches(n)?e:e.querySelector(n)}exports.a=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-EEMKKLRF.js';var u={key:"page-focused",scope:"global",start(c){let o=()=>c.write("page-focused",document.hasFocus()?1:0);o();let t=a("focus",o),r=a("blur",o);return ()=>{t(),r();}}};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkA6JDSQWH_cjs=require('./chunk-A6JDSQWH.cjs'),chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs');var b=250,E=2,C={key:"video-color",scope:"element",props:{video:chunkA6JDSQWH_cjs.b,"video-accent":chunkA6JDSQWH_cjs.b},start(n){let e=chunkHHINWX7L_cjs.a(n.target,"video");if(!e)return ()=>{};let m=chunkA6JDSQWH_cjs.e();if(!m)return ()=>{};let i=false,u=-1/0,d=t=>{if(t-u<b||e.readyState<E)return;let a=m(e);if(!a)return;let r=chunkA6JDSQWH_cjs.c(a);r&&(u=t,n.write("video",chunkA6JDSQWH_cjs.a(r.dominant)),n.write("video-accent",chunkA6JDSQWH_cjs.a(r.accent)));};d(0);let c=e.requestVideoFrameCallback?.bind(e);if(c){let t=c(function a(r){i||(d(r),t=c(a));});return ()=>{i=true,e.cancelVideoFrameCallback?.(t);}}let V=0,o=()=>d(V+=b);return e.addEventListener("timeupdate",o,{passive:true}),e.addEventListener("loadeddata",o,{passive:true}),()=>{i=true,e.removeEventListener("timeupdate",o),e.removeEventListener("loadeddata",o);}}};exports.a=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-LTJ2VKVY.js';import {a as a$1}from'./chunk-T4N6AEOZ.js';var m={key:"select",scope:"element",start(n){let t=a(n.target,"select");if(!t)return ()=>{};let o=()=>{let e=t.options.length,r=t.selectedIndex,c=t.selectedOptions.length;n.write("index",r),n.write("option-count",e),n.write("index-pct",r>=0&&e>1?a$1(r/(e-1)):0),n.write("selected-count",c),n.write("selected-pct",e>0?a$1(c/e):0);let l=Number(t.value);t.value.trim()!==""&&Number.isFinite(l)&&n.write("value-num",l);};o();let i=["input","change"];for(let e of i)t.addEventListener(e,o,{passive:true});return ()=>{for(let e of i)t.removeEventListener(e,o);}}};export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c as c$1}from'./chunk-LF4OE7IL.js';var c={key:"fps",scope:"global",start(s){let t=performance.now(),r=60;return c$1(e=>{let o=e-t;t=e,!(o<=0)&&(r+=(1e3/o-r)*.1,s.write("fps",Math.round(r)));})}};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(t){switch(t){case "slow-2g":return 1;case "2g":return 2;case "3g":return 3;case "4g":return 4;default:return 0}}var o={key:"network",scope:"global",start(t){let e=navigator.connection;if(!e)return ()=>{};let n=()=>{t.write("net-downlink",e.downlink??0),t.write("net-rtt",e.rtt??0),t.write("net-save-data",e.saveData?1:0),t.write("net-type",r(e.effectiveType));};return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)}};export{r as a,o as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-T4N6AEOZ.js';import {a}from'./chunk-EEMKKLRF.js';var c={key:"pointer",scope:"global",start(o){return a("pointermove",n=>{let e=n;o.write("pointer-x",e.clientX),o.write("pointer-y",e.clientY),o.write("pointer-x-ratio",a$1(e.clientX/window.innerWidth)),o.write("pointer-y-ratio",a$1(e.clientY/window.innerHeight));})}};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-LTJ2VKVY.js';var u={key:"img",scope:"element",start(t){let e=a(t.target,"img");if(!e)return ()=>{};let i=()=>e.getAttribute("src")!==null||e.getAttribute("srcset")!==null,r=e.complete&&e.naturalWidth===0&&i(),o=()=>{t.write("natural-w",e.naturalWidth),t.write("natural-h",e.naturalHeight),t.write("loaded",e.complete&&e.naturalWidth>0?1:0),t.write("broken",r?1:0);},n=()=>{r=false,o();},a$1=()=>{r=true,o();};return o(),e.addEventListener("load",n,{passive:true}),e.addEventListener("error",a$1,{passive:true}),()=>{e.removeEventListener("load",n),e.removeEventListener("error",a$1);}}};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var t="input:not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), textarea, select",n=e=>e.matches(t)?[e]:Array.from(e.querySelectorAll(t));exports.a=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-LWKH66VY.js';var i=new Set,m=null,n=0,u=false,t=false,d=0,f=()=>typeof requestAnimationFrame=="function";function s(e){if(n=0,t)return;let r=a.liveHz;if(f()&&r&&r>0&&e-d<1e3/r){n=requestAnimationFrame(s);return}if(d=e,u=true,i.size)for(let c of [...i])c(e);m?.(),u=false,i.size&&f()&&o();}function o(){n||u||t||(f()?n=requestAnimationFrame(s):s(0));}function v(){o();}function y(e){m=e;}function h(e){return i.add(e),o(),()=>{i.delete(e);}}function l(){t||(t=true,n&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(n),n=0);}function p(){t&&(t=false,o());}typeof document<"u"&&typeof document.addEventListener=="function"&&document.addEventListener("visibilitychange",()=>{document.hidden?l():p();});export{v as a,y as b,h as c,l as d,p as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(e,n){return e.matches(n)?e:e.querySelector(n)}export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var c={key:"motion",scope:"global",start(o){if(typeof DeviceMotionEvent>"u")return ()=>{};let n=i=>{let t=i.accelerationIncludingGravity;o.write("accel-x",chunk65MXZJBD_cjs.a(t?.x??0)),o.write("accel-y",chunk65MXZJBD_cjs.a(t?.y??0)),o.write("accel-z",chunk65MXZJBD_cjs.a(t?.z??0));};return window.addEventListener("devicemotion",n,{passive:true}),()=>window.removeEventListener("devicemotion",n)}};exports.a=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-EEMKKLRF.js';var f={key:"online",scope:"global",start(e){let o=()=>e.write("online",navigator.onLine?1:0);o();let t=a("online",o),i=a("offline",o);return ()=>{t(),i();}}};export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var n={key:"nav-type",scope:"global",props:{"nav-type":{syntax:"<custom-ident>",initial:"navigate"}},start(e){let t=performance.getEntriesByType("navigation")[0];return e.write("nav-type",t?.type??"navigate","const"),()=>{}}};exports.a=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var r={key:"orientation",scope:"global",start(t){if(typeof DeviceOrientationEvent>"u")return ()=>{};let n=i=>{t.write("orient-alpha",chunk65MXZJBD_cjs.a(i.alpha??0)),t.write("orient-beta",chunk65MXZJBD_cjs.a(i.beta??0)),t.write("orient-gamma",chunk65MXZJBD_cjs.a(i.gamma??0));};return window.addEventListener("deviceorientation",n,{passive:true}),()=>window.removeEventListener("deviceorientation",n)}};exports.a=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var f={key:"online",scope:"global",start(e){let o=()=>e.write("online",navigator.onLine?1:0);o();let t=chunkQHHF5SEL_cjs.a("online",o),i=chunkQHHF5SEL_cjs.a("offline",o);return ()=>{t(),i();}}};exports.a=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var t=new Map;function a(n,s){let e=t.get(n);if(!e){let r=new Set,d=i=>{for(let o of [...r])o(i);};e={handlers:r,dispatch:d},t.set(n,e),window.addEventListener(n,d,{passive:true});}return e.handlers.add(s),()=>{e.handlers.delete(s),e.handlers.size===0&&(window.removeEventListener(n,e.dispatch),t.delete(n));}}exports.a=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t="input:not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), textarea, select",n=e=>e.matches(t)?[e]:Array.from(e.querySelectorAll(t));export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b}from'./chunk-A2ETARW3.js';import {a}from'./chunk-LTJ2VKVY.js';var i={key:"color-input",scope:"element",props:{color:b},start(r){let e=a(r.target,'input[type="color"]');if(!e)return ()=>{};let o=()=>r.write("color",e.value);o();let n=["input","change"];for(let t of n)e.addEventListener(t,o,{passive:true});return ()=>{for(let t of n)e.removeEventListener(t,o);}}};export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {c}from'./chunk-LF4OE7IL.js';import {a as a$1}from'./chunk-T4N6AEOZ.js';import {a}from'./chunk-EEMKKLRF.js';var u={key:"scroll-velocity",scope:"global",start(r){let e=window.scrollY,l=0,o=null,a$2=()=>{let c=window.scrollY,w=c-e;e=c,l=w||l*.8,Math.abs(l)<.01&&(l=0);let t=a$1(l);r.write("scroll-velocity",t),r.write("scroll-direction",Math.sign(t)),t===0&&o&&(o(),o=null);},m=()=>{o||(o=c(a$2));};r.write("scroll-velocity",0),r.write("scroll-direction",0);let p=a("scroll",m);return ()=>{p(),o?.();}}};export{u as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';function r(t){switch(t){case "slow-2g":return 1;case "2g":return 2;case "3g":return 3;case "4g":return 4;default:return 0}}var o={key:"network",scope:"global",start(t){let e=navigator.connection;if(!e)return ()=>{};let n=()=>{t.write("net-downlink",e.downlink??0),t.write("net-rtt",e.rtt??0),t.write("net-save-data",e.saveData?1:0),t.write("net-type",r(e.effectiveType));};return n(),e.addEventListener("change",n),()=>e.removeEventListener("change",n)}};exports.a=r;exports.b=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkEOPF4ZLZ_cjs=require('./chunk-EOPF4ZLZ.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var u={key:"scroll-velocity",scope:"global",start(r){let e=window.scrollY,l=0,o=null,a=()=>{let c=window.scrollY,w=c-e;e=c,l=w||l*.8,Math.abs(l)<.01&&(l=0);let t=chunk65MXZJBD_cjs.a(l);r.write("scroll-velocity",t),r.write("scroll-direction",Math.sign(t)),t===0&&o&&(o(),o=null);},m=()=>{o||(o=chunkEOPF4ZLZ_cjs.c(a));};r.write("scroll-velocity",0),r.write("scroll-direction",0);let p=chunkQHHF5SEL_cjs.a("scroll",m);return ()=>{p(),o?.();}}};exports.a=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkEOPF4ZLZ_cjs=require('./chunk-EOPF4ZLZ.cjs');var c={key:"fps",scope:"global",start(s){let t=performance.now(),r=60;return chunkEOPF4ZLZ_cjs.c(e=>{let o=e-t;t=e,!(o<=0)&&(r+=(1e3/o-r)*.1,s.write("fps",Math.round(r)));})}};exports.a=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s=new Map;function o(e,n){let t=s.get(e);if(!t){let r=new Set,i=a=>{for(let d of [...r])d(a);};t={handlers:r,dispatch:i},s.set(e,t),document.addEventListener(e,i,{passive:true});}return t.handlers.add(n),()=>{t.handlers.delete(n),t.handlers.size===0&&(document.removeEventListener(e,t.dispatch),s.delete(e));}}var l={key:"page-visible",scope:"global",start(e){let n=()=>e.write("page-visible",document.visibilityState==="visible"?1:0);return n(),o("visibilitychange",n)}};export{l as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-QIUPJ6MF.js';import {a as a$1}from'./chunk-T4N6AEOZ.js';var c={key:"form-state",scope:"element",start(e){let o=a(e.target);if(!o.length)return ()=>{};let t=()=>{let r=0,i=0,n=0,f=0;for(let a of o){if(!a.willValidate)continue;r++;let u=a.validity.valid;u&&i++,a.required&&(n++,u&&f++);}e.write("field-count",r),e.write("valid-count",i),e.write("invalid-count",r-i),e.write("all-valid",r===i?1:0),e.write("completion",n?a$1(f/n):1);};t(),e.target.addEventListener("input",t,{passive:true}),e.target.addEventListener("change",t,{passive:true});let s=false,l=e.target instanceof HTMLFormElement?e.target:o[0]?.form,d=()=>{requestAnimationFrame(()=>{s||t();});};return l?.addEventListener("reset",d,{passive:true}),()=>{s=true,e.target.removeEventListener("input",t),e.target.removeEventListener("change",t),l?.removeEventListener("reset",d);}}};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs'),chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var h={key:"pointer-local",scope:"element",start(t){let p=t.target;return chunkQHHF5SEL_cjs.a("pointermove",l=>{let r=l,o=p.getBoundingClientRect(),e=o.width>0?(r.clientX-o.left)/o.width:0,n=o.height>0?(r.clientY-o.top)/o.height:0,s=e>=0&&e<=1&&n>=0&&n<=1;t.write("local-pointer-x-ratio",chunk65MXZJBD_cjs.a(e)),t.write("local-pointer-y-ratio",chunk65MXZJBD_cjs.a(n)),t.write("local-pointer-inside",s?1:0);})}};exports.a=h;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(n){return Math.round(n*1e4)/1e4}export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var n={key:"geo",scope:"global",start(e){let r=navigator.geolocation;if(!r)return ()=>{};let c=false,a=r.watchPosition(t=>{c||(e.write("geo-lat",chunk65MXZJBD_cjs.a(t.coords.latitude)),e.write("geo-lng",chunk65MXZJBD_cjs.a(t.coords.longitude)),e.write("geo-accuracy",chunk65MXZJBD_cjs.a(t.coords.accuracy)));});return ()=>{c=true,r.clearWatch(a);}}};exports.a=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-LTJ2VKVY.js';import {a as a$1}from'./chunk-T4N6AEOZ.js';var d={key:"media",scope:"element",start(r){let e=a(r.target,"video, audio");if(!e)return ()=>{};let i=()=>{let t=isFinite(e.duration)?e.duration:0;r.write("current-time",a$1(e.currentTime)),r.write("duration",a$1(t)),r.write("progress",t>0?a$1(e.currentTime/t):0),r.write("paused",e.paused?1:0),r.write("volume",a$1(e.volume));};i();let n=["timeupdate","loadedmetadata","play","pause","volumechange"];for(let t of n)e.addEventListener(t,i,{passive:true});return ()=>{for(let t of n)e.removeEventListener(t,i);}}};export{d as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-LTJ2VKVY.js';import {b as b$1,a}from'./chunk-LF4OE7IL.js';import {a as a$4}from'./chunk-T4N6AEOZ.js';import {a as a$1}from'./chunk-LWKH66VY.js';import {a as a$3}from'./chunk-EEMKKLRF.js';var u;function K(){if(u!==void 0||(u=null,typeof document>"u"||typeof CSSStyleSheet!="function"||!("adoptedStyleSheets"in document)))return u;try{let e=new CSSStyleSheet;e.replaceSync(":root{}"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e],u=e.cssRules[0].style;}catch{u=null;}return u}function y(e){if(typeof document<"u"&&e===document.documentElement){let t=K();if(t)return t}return e.style}var E=class{pending=new Map;last=new WeakMap;set(t,r,n){let o=this.pending.get(t);if(o?.has(r)){o.set(r,n);return}this.last.get(t)?.get(r)!==n&&(o?o.set(r,n):this.pending.set(t,new Map([[r,n]])),a());}forget(t,r){this.last.get(t)?.delete(r),this.pending.get(t)?.delete(r);}flush=()=>{if(this.pending.size!==0){for(let[t,r]of this.pending){let n=this.last.get(t);n||this.last.set(t,n=new Map);let o=y(t);for(let[s,i]of r)n.get(s)!==i&&(o.setProperty(s,i),n.set(s,i));}this.pending.clear();}}},g=new E;b$1(g.flush);var S,d=new WeakMap,T=new WeakMap;function R(e,t){S||(S=new ResizeObserver(o=>{for(let s of o){T.set(s.target,s);let i=d.get(s.target);if(i)for(let p of [...i])p(s);}}));let r=d.get(e);r||(d.set(e,r=new Set),S.observe(e)),r.add(t);let n=T.get(e);return n&&t(n),()=>{let o=d.get(e);o&&(o.delete(t),o.size===0&&(d.delete(e),S.unobserve(e)));}}var v,m=new WeakMap,H=new WeakMap,A=[0,.98,.99,.995,.999,1];function w(e,t){v||(v=new IntersectionObserver(o=>{for(let s of o){H.set(s.target,s);let i=m.get(s.target);if(i)for(let p of [...i])p(s);}},{threshold:A}));let r=m.get(e);r||(m.set(e,r=new Set),v.observe(e)),r.add(t);let n=H.get(e);return n&&t(n),()=>{let o=m.get(e);o&&(o.delete(t),o.size===0&&(m.delete(e),v.unobserve(e)));}}var z=new Set;function I(e,t,r){if(z.has(e)||typeof CSS>"u"||typeof CSS.registerProperty!="function")return;z.add(e);let n=t?r?.[t]:void 0,o=t?a$1.defaults?.[t]:void 0;try{CSS.registerProperty({name:e,syntax:n?.syntax??"<number>",inherits:n?.inherits??!0,initialValue:o!=null?String(o):n?.initial??"0"});}catch{}}var D={key:"viewport",scope:"global",start(e){let t=()=>{e.write("vw",window.innerWidth),e.write("vh",window.innerHeight);};return t(),a$3("resize",t)}};var O={key:"size",scope:"element",start(e){return R(e.target,t=>{let r=t.borderBoxSize?.[0],n=r?r.inlineSize:t.contentRect.width,o=r?r.blockSize:t.contentRect.height;e.write("w",a$4(n)),e.write("h",a$4(o)),e.write("aspect",o>0?a$4(n/o):0);})}};var h=1;function B(e){let t=e.rootBounds;if(!t)return e.intersectionRatio>=1;let r=e.boundingClientRect;return r.top>=t.top-h&&r.right<=t.right+h&&r.bottom<=t.bottom+h&&r.left>=t.left-h}var P={key:"visibility",scope:"element",gate:false,start(e){let t=false;return e.write("visible",0),e.write("has-entered",0,"const"),w(e.target,r=>{let n=B(r);e.write("visible",n?1:0),n&&!t&&(t=true,e.write("has-entered",1,"const"));})}};var F={key:"range",scope:"element",start(e){let t=a$2(e.target,'input[type="range"], input[type="number"]');if(!t)return ()=>{};let r=()=>{let n=t.min===""?0:Number(t.min),o=t.max===""?100:Number(t.max),s=Number(t.value);e.write("value",s),e.write("value-pct",o>n?a$4((s-n)/(o-n)):0);};return r(),t.addEventListener("input",r,{passive:true}),()=>t.removeEventListener("input",r)}};var W={viewport:D,size:O,visibility:P,range:F};var N=()=>{},f=new Map,b={...W};function Me(e){b[e.key]=e;}function ke(e){delete b[e];}function Le(e){return e in b}function xe(e){Object.assign(a$1,e);}function V(e,t,r){return {target:e,config:a$1,write(n,o,s="live"){let i=(s==="const"?a$1.constPrefix:a$1.livePrefix)+n;t.add(i),a$1.typed&&I(i,n,r),g.set(e,i,String(o));}}}function $(e,t,r){if(!(e.scope==="element"&&e.gate!==false&&r!==a$1.root&&typeof IntersectionObserver<"u"))return e.start(t);let o=null,s=()=>{if(!o)try{o=e.start(t);}catch(a){console.error(`[prop-for-that] source "${e.key}" failed to start`,a);}},i=()=>{o?.(),o=null;},p=w(r,a=>{a.isIntersecting?s():i();});return ()=>{p(),i();}}function C(e,t,r){let n=r.get(t);if(!n)return;n.dispose();let o=y(e);for(let s of n.written)o.removeProperty(s),g.forget(e,s);r.delete(t);}function _(e,t){let r=f.get(e);r||f.set(e,r=new Map);let n=[];for(let o of t){if(r.has(o))continue;let s=b[o];if(!s){console.warn(`[prop-for-that] unknown source "${o}"`);continue}let i=new Set,p;try{p=$(s,V(e,i,s.props),e);}catch(a){console.error(`[prop-for-that] source "${o}" failed to start`,a);continue}r.set(o,{dispose:p,written:i}),n.push(o);}return ()=>{let o=f.get(e);if(o){for(let s of n)C(e,s,o);o.size===0&&f.delete(e);}}}function j(e){return e instanceof Element?[e]:typeof NodeList<"u"&&e instanceof NodeList||typeof HTMLCollection<"u"&&e instanceof HTMLCollection||Array.isArray(e)?Array.from(e).filter(t=>t instanceof Element):[]}function q(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="string")}function Te(e,t){let r,n;if(t===void 0&&q(e)?(r=a$1.root?[a$1.root]:[],n=e):(r=j(e),n=t??[]),!r.length||!n.length)return N;let o=r.map(s=>_(s,n));return ()=>{for(let s of o)s();}}function He(e,t){let r=f.get(e);if(r){for(let n of t??[...r.keys()])C(e,n,r);r.size===0&&f.delete(e);}}function Re(){for(let[e,t]of f)for(let r of [...t.keys()])C(e,r,t);f.clear();}export{Me as a,ke as b,Le as c,xe as d,Te as e,He as f,Re as g};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkQHHF5SEL_cjs=require('./chunk-QHHF5SEL.cjs');var u={key:"page-focused",scope:"global",start(c){let o=()=>c.write("page-focused",document.hasFocus()?1:0);o();let t=chunkQHHF5SEL_cjs.a("focus",o),r=chunkQHHF5SEL_cjs.a("blur",o);return ()=>{t(),r();}}};exports.a=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T4N6AEOZ.js';var c={key:"motion",scope:"global",start(o){if(typeof DeviceMotionEvent>"u")return ()=>{};let n=i=>{let t=i.accelerationIncludingGravity;o.write("accel-x",a(t?.x??0)),o.write("accel-y",a(t?.y??0)),o.write("accel-z",a(t?.z??0));};return window.addEventListener("devicemotion",n,{passive:true}),()=>window.removeEventListener("devicemotion",n)}};export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkA6JDSQWH_cjs=require('./chunk-A6JDSQWH.cjs'),chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs');var i={key:"color-input",scope:"element",props:{color:chunkA6JDSQWH_cjs.b},start(r){let e=chunkHHINWX7L_cjs.a(r.target,'input[type="color"]');if(!e)return ()=>{};let o=()=>r.write("color",e.value);o();let n=["input","change"];for(let t of n)e.addEventListener(t,o,{passive:true});return ()=>{for(let t of n)e.removeEventListener(t,o);}}};exports.a=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var i={key:"visual-viewport",scope:"global",start(o){let e=window.visualViewport;if(!e)return ()=>{};let r=()=>{o.write("vvp-scale",chunk65MXZJBD_cjs.a(e.scale)),o.write("vvp-offset-top",chunk65MXZJBD_cjs.a(e.offsetTop)),o.write("vvp-height",chunk65MXZJBD_cjs.a(e.height));};return r(),e.addEventListener("resize",r,{passive:true}),e.addEventListener("scroll",r,{passive:true}),()=>{e.removeEventListener("resize",r),e.removeEventListener("scroll",r);}}};exports.a=i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-T4N6AEOZ.js';var r={key:"orientation",scope:"global",start(t){if(typeof DeviceOrientationEvent>"u")return ()=>{};let n=i=>{t.write("orient-alpha",a(i.alpha??0)),t.write("orient-beta",a(i.beta??0)),t.write("orient-gamma",a(i.gamma??0));};return window.addEventListener("deviceorientation",n,{passive:true}),()=>window.removeEventListener("deviceorientation",n)}};export{r as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-QIUPJ6MF.js';var g=e=>e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")?e.checked?"1":"0":e.value,h=e=>{if(e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio"))return e.defaultChecked?"1":"0";if(e instanceof HTMLSelectElement){let r=Array.from(e.options).find(o=>o.defaultSelected);return r?r.value:e.options[0]?.value??""}return e.defaultValue},y={key:"field-state",scope:"element",start(e){let r=a(e.target);if(!r.length)return ()=>{};let o=new Set(r),l=new WeakMap;for(let t of r)l.set(t,g(t));let u=new Set,f=new Set,s=new Set,c=false,i=()=>{let t=u.size>0,n=f.size>0;e.write("dirty",t?1:0),e.write("pristine",t?0:1),e.write("touched",n?1:0),e.write("untouched",n?0:1),e.write("changed",s.size>0?1:0),e.write("submitted",c?1:0);};i();let a$1=t=>{let n=t.target;o.has(n)&&(u.add(n),g(n)===l.get(n)?s.delete(n):s.add(n),i());},m=t=>{let n=t.target;o.has(n)&&(f.add(n),i());};e.target.addEventListener("input",a$1,{passive:true}),e.target.addEventListener("change",a$1,{passive:true}),e.target.addEventListener("focusout",m,{passive:true});let d=e.target instanceof HTMLFormElement?e.target:r[0]?.form,E=()=>{c=true,i();},v=()=>{u.clear(),f.clear(),c=false,s.clear();for(let t of r)h(t)!==l.get(t)&&s.add(t);i();};return d?.addEventListener("submit",E,{passive:true}),d?.addEventListener("reset",v,{passive:true}),()=>{e.target.removeEventListener("input",a$1),e.target.removeEventListener("change",a$1),e.target.removeEventListener("focusout",m),d?.removeEventListener("submit",E),d?.removeEventListener("reset",v);}}};export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHHINWX7L_cjs=require('./chunk-HHINWX7L.cjs'),chunk65MXZJBD_cjs=require('./chunk-65MXZJBD.cjs');var p=[["valueMissing","value-missing"],["typeMismatch","type-mismatch"],["patternMismatch","pattern-mismatch"],["tooLong","too-long"],["tooShort","too-short"],["rangeUnderflow","range-underflow"],["rangeOverflow","range-overflow"],["stepMismatch","step-mismatch"],["badInput","bad-input"],["customError","custom-error"]],u={key:"field",scope:"element",start(t){let r=chunkHHINWX7L_cjs.a(t.target,"input, textarea, select");if(!r)return ()=>{};let o=()=>{let e=r.value.length;t.write("length",e),t.write("empty",e===0?1:0),t.write("valid",r.validity.valid?1:0);for(let[l,m]of p)t.write(m,r.validity[l]?1:0);let n=r.maxLength;n>=0&&(t.write("remaining",Math.max(0,n-e)),t.write("fill-pct",n>0?chunk65MXZJBD_cjs.a(Math.min(1,e/n)):0));};o();let i=["input","change"];for(let e of i)r.addEventListener(e,o,{passive:true});return ()=>{for(let e of i)r.removeEventListener(e,o);}}};exports.a=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b as b$1,e,c,a as a$1}from'./chunk-A2ETARW3.js';import {a}from'./chunk-LTJ2VKVY.js';var b=250,E=2,C={key:"video-color",scope:"element",props:{video:b$1,"video-accent":b$1},start(n){let e$1=a(n.target,"video");if(!e$1)return ()=>{};let m=e();if(!m)return ()=>{};let i=false,u=-1/0,d=t=>{if(t-u<b||e$1.readyState<E)return;let a=m(e$1);if(!a)return;let r=c(a);r&&(u=t,n.write("video",a$1(r.dominant)),n.write("video-accent",a$1(r.accent)));};d(0);let c$1=e$1.requestVideoFrameCallback?.bind(e$1);if(c$1){let t=c$1(function a(r){i||(d(r),t=c$1(a));});return ()=>{i=true,e$1.cancelVideoFrameCallback?.(t);}}let V=0,o=()=>d(V+=b);return e$1.addEventListener("timeupdate",o,{passive:true}),e$1.addEventListener("loadeddata",o,{passive:true}),()=>{i=true,e$1.removeEventListener("timeupdate",o),e$1.removeEventListener("loadeddata",o);}}};export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk6LTQ7ISE_cjs=require('./chunk-6LTQ7ISE.cjs');Object.defineProperty(exports,"clock",{enumerable:true,get:function(){return chunk6LTQ7ISE_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as clock}from'./chunk-7U544OAJ.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkX5SADKXG_cjs=require('./chunk-X5SADKXG.cjs');require('./chunk-A6JDSQWH.cjs'),require('./chunk-HHINWX7L.cjs');Object.defineProperty(exports,"colorInput",{enumerable:true,get:function(){return chunkX5SADKXG_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as colorInput}from'./chunk-QRIZE6VL.js';import'./chunk-A2ETARW3.js';import'./chunk-LTJ2VKVY.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunk2H5YFW6O_cjs=require('./chunk-2H5YFW6O.cjs');Object.defineProperty(exports,"cpuPressure",{enumerable:true,get:function(){return chunk2H5YFW6O_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as cpuPressure}from'./chunk-5JZBLUQK.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkYXQTZ7WB_cjs=require('./chunk-YXQTZ7WB.cjs');require('./chunk-HHINWX7L.cjs'),require('./chunk-65MXZJBD.cjs');Object.defineProperty(exports,"field",{enumerable:true,get:function(){return chunkYXQTZ7WB_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as field}from'./chunk-2C7ZUOOR.js';import'./chunk-LTJ2VKVY.js';import'./chunk-T4N6AEOZ.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as fieldState}from'./chunk-YXEERKSK.js';import'./chunk-QIUPJ6MF.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCGNMHQYQ_cjs=require('./chunk-CGNMHQYQ.cjs');require('./chunk-L4SCOKPV.cjs');Object.defineProperty(exports,"fieldState",{enumerable:true,get:function(){return chunkCGNMHQYQ_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as formState}from'./chunk-SRQQTNRZ.js';import'./chunk-QIUPJ6MF.js';import'./chunk-T4N6AEOZ.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkCQQV55KU_cjs=require('./chunk-CQQV55KU.cjs');require('./chunk-L4SCOKPV.cjs'),require('./chunk-65MXZJBD.cjs');Object.defineProperty(exports,"formState",{enumerable:true,get:function(){return chunkCQQV55KU_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as fps}from'./chunk-IKOVFAJO.js';import'./chunk-LF4OE7IL.js';import'./chunk-LWKH66VY.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkSBF6XS5A_cjs=require('./chunk-SBF6XS5A.cjs');require('./chunk-EOPF4ZLZ.cjs'),require('./chunk-7L35N3N3.cjs');Object.defineProperty(exports,"fps",{enumerable:true,get:function(){return chunkSBF6XS5A_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkUALPUR2L_cjs=require('./chunk-UALPUR2L.cjs');require('./chunk-65MXZJBD.cjs');Object.defineProperty(exports,"geo",{enumerable:true,get:function(){return chunkUALPUR2L_cjs.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as geo}from'./chunk-FOHEZJHF.js';import'./chunk-T4N6AEOZ.js';
|