@vinena/knobs 0.5.3 → 0.6.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 +32 -0
- package/README.md +7 -6
- package/dist/context-amfyasb5.js +23 -0
- package/dist/context-svtr7vwt.js +22 -0
- package/dist/early.global.js +5 -5
- package/dist/edit/css.d.ts +59 -0
- package/dist/edit/html.d.ts +91 -0
- package/dist/edit/keep.d.ts +175 -0
- package/dist/edit/log.d.ts +107 -0
- package/dist/edit/replay.d.ts +28 -0
- package/dist/edit/risk.d.ts +33 -0
- package/dist/edit/rule.d.ts +31 -0
- package/dist/edit/source.d.ts +12 -0
- package/dist/edit/text.d.ts +66 -0
- package/dist/elementsview-dm5v3z5a.js +3761 -0
- package/dist/elementsview-xm82cvs2.js +3762 -0
- package/dist/engine/dock.d.ts +3 -4
- package/dist/engine/frame.d.ts +1 -1
- package/dist/engine/style.d.ts +15 -0
- package/dist/{framekit-cjz0e4y8.js → framekit-622h6w1f.js} +54 -47
- package/dist/{framekit-yk1jxjv7.js → framekit-yx612r28.js} +54 -47
- package/dist/index-0zp9py56.js +859 -0
- package/dist/{index-prjpx67p.js → index-1mstjadm.js} +126 -2167
- package/dist/{index-begsqdm0.js → index-4a4x1bt2.js} +1 -1
- package/dist/index-58jdczmj.js +44 -0
- package/dist/index-5tv6sr74.js +23 -0
- package/dist/index-6bc2ztfd.js +688 -0
- package/dist/index-7cb4x1vj.js +1885 -0
- package/dist/index-a974q3aa.js +34 -0
- package/dist/{index-q73py563.js → index-aymfvd8s.js} +1 -1
- package/dist/{index-zt3rheck.js → index-aynkv7qk.js} +11 -8
- package/dist/{index-p57fdttx.js → index-dzm8ywq0.js} +492 -2365
- package/dist/{index-9jhatmky.js → index-f60yax1j.js} +13 -8
- package/dist/index-f67wctn3.js +1858 -0
- package/dist/{index-vgfn2n1h.js → index-ftjdt358.js} +8 -171
- package/dist/{index-j1h13ahg.js → index-gm51cthv.js} +2 -45
- package/dist/index-kfdzsyyw.js +1859 -0
- package/dist/index-t4kssacm.js +208 -0
- package/dist/index-v0ht9q0g.js +1518 -0
- package/dist/{index-6wbgqkdz.js → index-x59vz1xx.js} +247 -905
- package/dist/index-xh39jtkq.js +32 -0
- package/dist/index-yb7fc59g.js +718 -0
- package/dist/index-zd6adby9.js +496 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.global.js +438 -153
- package/dist/index.js +594 -486
- package/dist/react-0wepdf60.js +1519 -0
- package/dist/{react-gefkdkdz.js → react-1gqwa2yw.js} +1 -1
- package/dist/{index-sn2y6j09.js → react-3mfz1x2a.js} +126 -2167
- package/dist/react-4rbjw9af.js +33 -0
- package/dist/react-5rq7bnsy.js +210 -0
- package/dist/react-6bz05qk1.js +860 -0
- package/dist/{react-qgz9afa2.js → react-6fnxxs30.js} +8 -171
- package/dist/react-6q2cw2ya.js +689 -0
- package/dist/{react-7vjfsh40.js → react-6t4dbdzn.js} +11 -8
- package/dist/react-88es9b5q.js +719 -0
- package/dist/react-97b5b8j4.js +46 -0
- package/dist/{react-mmq2zya3.js → react-bxzn8vq5.js} +1 -1
- package/dist/{react-3rhdj2k1.js → react-cs62p9qh.js} +62 -720
- package/dist/react-ethftdxp.js +497 -0
- package/dist/react-fp73vhyd.js +36 -0
- package/dist/{react-qfpg79hs.js → react-me102s1a.js} +2 -45
- package/dist/react-t2qnewz2.js +24 -0
- package/dist/react-ttj8f9qp.js +1886 -0
- package/dist/{react-806qmkyz.js → react-v8497a41.js} +13 -8
- package/dist/{react-6tss0r9f.js → react-wqn4sx0n.js} +265 -2137
- package/dist/react.js +590 -486
- package/dist/replay-j18rw92k.js +258 -0
- package/dist/replay-vtg0vqj2.js +257 -0
- package/dist/{storageview-7cv0vpdm.js → storageview-6xj7zb63.js} +11 -7
- package/dist/{storageview-dyhpgt8f.js → storageview-pzn8yaad.js} +11 -7
- package/dist/styles/force.d.ts +66 -0
- package/dist/ui/bindings.d.ts +31 -5
- package/dist/ui/changes.d.ts +49 -0
- package/dist/ui/cssauto.d.ts +119 -0
- package/dist/ui/cssedit.d.ts +80 -0
- package/dist/ui/domedit.d.ts +99 -0
- package/dist/ui/domtree.d.ts +26 -1
- package/dist/ui/elementsview.d.ts +17 -2
- package/dist/ui/htmledit.d.ts +62 -0
- package/dist/ui/inspector.d.ts +6 -1
- package/dist/ui/keys.d.ts +12 -8
- package/dist/ui/pane.d.ts +0 -2
- package/dist/ui/panel.d.ts +3 -0
- package/dist/ui/prefs.d.ts +30 -10
- package/dist/ui/settings.d.ts +22 -1
- package/dist/ui/size.d.ts +14 -22
- package/dist/ui/stylesview.d.ts +30 -1
- package/package.json +1 -1
- package/skills/devknobs/SKILL.md +95 -0
- package/dist/elementsview-1wsxcdtj.js +0 -2874
- package/dist/elementsview-3kv34jfx.js +0 -2873
- package/dist/index-78r0f8pw.js +0 -27
- package/dist/react-adky72h9.js +0 -29
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
- the `keep edits after reload` switch is in the settings now, with a short hint under it, and no longer at the top of the Elements view. as before, it is not there in fresh mode or in the copy of devknobs inside its own frame, which keeps nothing itself; the page's keeper still keeps edits made in the frame
|
|
6
|
+
- the line between the DOM tree and the styles is a full-width drag handle, also moved with ↑ ↓
|
|
7
|
+
|
|
8
|
+
## 0.6.0
|
|
9
|
+
|
|
10
|
+
- every edit field in inspect, the DOM tree's texts and attributes, the html editor and the styles' values, wraps its lines and grows down, so a long value or address never scrolls sideways, at any panel width and in the width knob's frame
|
|
11
|
+
- the styles show `;` after every declaration, in the simple mode too and on a line that is off, as the browsers' tools do. it is drawn apart from the value, never part of what is edited
|
|
12
|
+
- edits made in devknobs' frame, with the panel pinned or a device shown, are kept for the page while the frame shows it (same origin and path), and after a reload they are made again in the frame once its page settles. edits made in any other window are still not kept
|
|
13
|
+
- in inspect's styles, ↩ and Tab with no suggestion marked take the first only where it completes the word typed (`bl` takes `block`); a number such as `1`, a `#` color, a word ended with a space and an empty field keep what was typed. taking `var(--x)` after a typed `var(` no longer doubles it
|
|
14
|
+
- an empty name or value field in inspect's styles shows every suggestion as it gets the focus. ↩ and Tab in it, before an arrow key, fill nothing; ↑ or ↓ then ↩ takes the one marked. a press on the list or its scrollbar keeps the focus in the field
|
|
15
|
+
- the panel has one width: the rows, the settings and every view (inspect's elements and styles, the requests, the storage) show at it, so opening or leaving a view no longer changes the width or glides it. it starts at 320 and goes from 240 to 720 (a width kept by an older version stays as it was), and dragging the edge or its keys in any view sets it for all of them. a view no longer starts at 340 with a width of its own. preferences kept by an older version keep the rows' width and drop the view's
|
|
16
|
+
- inspect's styles suggest as you type, as the browsers' tools do: a property's name lists every property the browser knows (asked of it at run time) and the page's custom properties, and a value lists the keywords the browser takes for that property, named colors where it takes a color, `var(--x)` for each custom property and the global keywords. ↑ ↓ mark one, ↩ takes the one marked, Tab takes it or the first (in a name it goes on to the value), esc closes the list and a second esc leaves the field, and a click takes one. it is a listbox with `aria-activedescendant`
|
|
17
|
+
- the DOM tree's `edit as html` is an editor: the panel's monospace with line numbers, html colored (tags, attributes, values, comments), ↩ keeps the indent and goes one in after an opening tag, `>` closes the tag (not a void one), and `"` after `=` pairs. a grip drags its height and `expand` makes it as tall as the panel, both kept in the panel's preferences. `⇧↩`, its `apply` button and esc work as before, and so do its refusals
|
|
18
|
+
- the changes at the foot of the Elements view fold their `-` and `+` lines away at first: `changes (N)` shows them, and the way it is left is kept in the panel's preferences. the buttons, the kept edits and those that wait, with their values, show either way
|
|
19
|
+
- each declaration in the styles has a real checkbox in a gutter of its own, as in the browsers' tools: shown on hover and focus and always on a line that is off, checked while on, its line struck through and faint while off, reached with Tab and turned with space, named `turn off padding` or `turn on padding`. it no longer sits over the property's name
|
|
20
|
+
|
|
21
|
+
- `⇧N` opens the requests from a closed panel too, as `⇧S` does the storage view, and pressed again while they show, leaves them
|
|
22
|
+
- two new shortcuts: `⇧E` shows inspect's elements view, the DOM tree and the styles, on the element inspect last picked, else the page's body, without picking, and `⇧O` shows the settings. both open the panel where it is closed, leave their view when pressed again, work from the width knob's frame, and do nothing while a field of the page has the focus. they are listed under shortcuts, to set or put back. where the `hotkey` or `grabKey` option takes `⇧E` or `⇧O`, the elements view takes the next free of `⇧L` and `⇧D`, and the settings the next free of `⇧U` and `⇧P`. keys you already set still work, and the only new defaults are `⇧E` and `⇧O`
|
|
23
|
+
- a shortcut can be any key or combination, a key alone too, such as `c`, or `⇧C`: the recorder no longer asks for a modifier. a key alone acts only when no field has the focus, the panel's search included, so it never takes what is typed. a `grabKey` of a key alone works the same. the defaults stay as they are
|
|
24
|
+
- inspect's styles can be edited, as in the browsers' own tools, in both modes: a click on a value makes it a field (set as the page's own script sets a property, so a longhand inside a shorthand and a value with `var()` keep, enter puts it on the page, a click elsewhere puts it on too and that click still does what it does, an empty value is refused, escape leaves it, tab goes to the next value, a value the page does not take turns red and stays open, `!important` is kept), the box at a line's start turns a declaration off and on, the line struck through where it stood while off, and `+ add property` under `element.style` and each rule adds one. `element.style` shows with no `style` attribute too. a stylesheet from another origin says in its tooltip that it cannot be edited
|
|
25
|
+
- the changes at the foot of the Elements view count the edits and list them as `-` before and `+` after lines under their rule or the element's own style, with `copy prompt for agent` (a prompt with each element's selector, its file and line where grab finds them, the rule and stylesheet, and each property from before to after), `copy diff` and `undo all`. `Z` undoes the last edit and `⇧Z` (`Shift Z` off a Mac) does it again, while the focus is in the view and not in a field. reset in the footer and `unmount()` undo every edit; `devknobs.reset()` leaves them. an edit whose page goes, as a frame's reloads, stays in the list as text and lets go of the page, and undo then only takes it out; a page kept for back and forward keeps its edits live, and a panel handed to the page's own copy leaves the edits on the page. the copy buttons say `could not copy` when the clipboard refuses, and page text in the prompt that could pass for a line of its own is written as a json string
|
|
26
|
+
- `window.devknobs.edits()` gives the edits in force as json: `kind` (`css-value`, `css-toggle`, `css-add`, `css-rule`), `target` (`selector`, `source` where grab finds it, `rule` with `selectorText`, `sheet`, `owner`, `sheetId` (tells two stylesheets with the same address apart), `path` and `context`, the `@media`, `@layer` or outer rule it sits in, which the diff and the prompt name too), `property`, `before` and `after`. the `Edit`, `EditKind` and `EditTarget` types are exported, and the package's agent skill tells an agent to read them and put them in the code
|
|
27
|
+
- inspect's DOM tree can be edited, into the same changes: a double-click on a text (or ↩ on its line) or on an attribute makes it a field (`name="value"`, as in the tag, `"` written `"`: change it, rename it, write several or clear it to take it out; a text or value with line breaks opens in a field that keeps them, `⇧↩` or its `apply` button puts it on; a field closed as it was opened makes no edit), `a` adds an attribute, `F2` edits the element as html (enter breaks the line, `⇧↩` (`Shift Enter` off a Mac) or its `apply` button puts it on, html with no element is refused, the new element is selected), `h` hides the element and all in it with `visibility: hidden` through an attribute of devknobs', never its `style`, and shows it again, and Delete or Backspace deletes the node, which undo puts back where it stood. the keys are plain, act on the selected line and never in a field, and a bar under the tree has the same actions. `<html>`, `<head>`, `<body>` and an element that holds devknobs' nodes are never replaced, hidden or deleted, and html with devknobs' own `data-devknobs` attributes is refused. a field whose edit is refused stays open and no other action runs. two deletes, or a real `hidden` attribute and a hide, are never listed as one. it works in the width knob's frame too. the changes list them under `html of` and the element's selector, `edits()` gives them as `kind` `text`, `attr`, `html`, `hide` and `delete`, and the prompt for an agent lists each one from before to after and asks the agent to change the component or template, as a framework's next render may undo an edit of the DOM. an edit whose node the page changed or replaced since stays in the list as text, and undo then only takes it out
|
|
28
|
+
|
|
29
|
+
- inspect's styles can add a rule: `+ new rule` under the element's rules, in both modes, takes a selector that starts as the element's classes (or a short selector that finds it) and the states forced on it, such as `.cta:hover`, refuses one the browser does not take, and opens `+ add property` on the new rule. a click elsewhere adds the rule only where its selector was changed. the rule is in a stylesheet of devknobs' own in the element's document, the width knob's frame's too, which no other view reads as the page's. it is listed with the element's rules, from `new rule`, also while it does not match. undo takes it off the page and redo puts the same rule back. the changes list it under `new rule for` the element, `edits()` gives it as `kind` `css-rule` (`property` `rule`, `after` the selector, `target.rule.sheet` `new rule`), and the prompt asks the agent to add it where the element's styles are written
|
|
30
|
+
- inspect's styles can force a state: chips over the rules for `:hover`, `:focus`, `:focus-visible`, `:active` and `:focus-within` make the element draw as in that state, and the styles show its rules as applying. it is emulated with a `data-devknobs-force` attribute and copies of the page's rules with the state, in their `@media`, `@supports`, `@container`, `@layer` and `@scope`, made again as the stylesheets change. it is no edit, and ends when another element is shown, the view closes, on reset in the footer or on `unmount()`. a stylesheet from another origin is not copied, nor a rule in a `@layer` with no name, a page rule with `:not(:hover)` still draws, and a copy comes after the page's rules, so it wins a tie of equal weight that the page's own order would have lost. `devknobs.reset()` leaves a forced state: `forceState(null)` ends it. `window.devknobs.forceState(elementOrSelector, states)` does the same for an agent, and the `ForcedState` type is exported
|
|
31
|
+
- inspect's DOM tree can move elements, into the same changes: `⇧↑` and `⇧↓` (`Shift Up` and `Shift Down` off a Mac) on the selected element's line move it before the element above or after the one below among its siblings, never while a field has the focus, and an element's line has a handle, `⋮⋮`, on hover and while selected, that drags it before or after another element or into one, a line or a ring showing where it goes, esc letting it go where it was. the bar under the tree has `move up` and `move down`. `<html>`, `<head>`, `<body>`, devknobs' own nodes and an element that holds them never move, nor does a `<script>`, frame, `<object>`, `<embed>`, `<base>`, `<link>` or `<meta>` or an element that holds one, nor does an element into itself, one in it or an element with no content. undo puts it back where it stood, unless the page moved it since. the changes list it under `html of` the element as `- at the end of <ul class="menu">` and `+ before <li class="a"> in <ul class="menu">` (`the 2nd <li>` among alike siblings, and a move is never dropped as no change), `edits()` gives it as `kind` `move` with `from` and `to` (`parent` and `next` as selectors), and the prompt asks the agent to move it, the place as selectors. the `EditPlace` type is exported
|
|
32
|
+
- the Elements view has a switch at its top, `keep edits after reload`, off at first. on, the edits in force are kept for the page (its origin and path) as plain json, and as the page loads again and settles they are made again in order, each only where its element, rule and value before are still there; a new rule is made anew. the changes say `N edits kept from before the reload, M could not be found` and list those not made, and they are edits like any other after; those not made are dropped from what is kept at the next change, and after a delete, move or html edit not made, no later edit is made. html and attribute edits are never made as the page loads: they wait in the changes until the user's own click on `apply`, as a page script could have planted them, and while they wait nothing new is kept. off forgets them. an edit that could run a script (`<script>`, frames, `<object>`, `<embed>`, `<base>`, `<meta>`, `<link>`, `on…`, `srcdoc`, `javascript:`) is never kept nor made again, by `setEdits()` either, nor is an attribute or text edit of the page's own `<script>` (data scripts too), `<base>`, frame, `<object>`, `<embed>`, `<link>` or `<meta>`. the waiting list shows each edit's markup or `name="value"` as apply would make it, under `apply only edits you made on this page`. kept edits hold the page's text, attribute values and markup, up to 64K characters each, under the path the page loaded at. fresh mode keeps and makes none. a page keeps its first 200 edits, up to 256 KB, for 20 pages at most, the page kept longest ago forgotten first; forced states are never kept, and edits made in devknobs' frame keep as the page's while it shows the page. they are in the page's `localStorage` under `devknobs:edits:` and the path, none in fresh mode
|
|
33
|
+
- `window.devknobs.setEdits(list)` makes edits again from a list in `edits()`'s shape, through the same log as the panel's, html and attribute edits at once (an agent's call, which waits for no click), none that could run a script, and resolves to `{ applied, skipped }`, each skipped with why; anything but a list throws a `TypeError`. `window.devknobs.undoEdit()` undoes the last edit in force and returns it, or null. so an agent can save `edits()` and make them again on a fresh load. the `SavedEdit`, `Skipped` and `Replayed` types are exported. the changes' note says `agents read and apply edits: devknobs.edits() / setEdits()`
|
|
34
|
+
|
|
3
35
|
## 0.5.3
|
|
4
36
|
|
|
5
37
|
- a host can load the frame's page itself: `native.load(frame, url)`, given an address on the page's own origin, is called once the frame is in the document, on its first load and on each load again. it returns true where the host set the frame's address itself, such as a browser extension from its own world, which the page's `frame-src` policy does not bind, and false to leave it to devknobs. false, or no `load` at all, and devknobs sets the address as before
|
package/README.md
CHANGED
|
@@ -7,13 +7,13 @@ runtime dependencies.
|
|
|
7
7
|
## install
|
|
8
8
|
|
|
9
9
|
with an ai agent: paste this setup prompt into claude code, codex or cursor, and
|
|
10
|
-
it installs @vinena/knobs and mounts it in development only. it is the copy
|
|
11
|
-
prompt button on https://knobs.dev too.
|
|
10
|
+
it installs @vinena/knobs and mounts it in development only. it is the copy
|
|
11
|
+
installation prompt button on https://knobs.dev too.
|
|
12
12
|
|
|
13
|
-
<!-- the same text is the install_prompt message in apps/web/messages/en.json; change
|
|
13
|
+
<!-- the same text is the install_prompt message in apps/web/messages/en.json and the setup prompt in apps/web/content/reference/start.md; change all three together. -->
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
|
|
16
|
+
Read https://knobs.dev/llms-full.txt first: it is the full devknobs reference. Then install @vinena/knobs in this project. It is a dev-only panel that emulates browser preferences from inside the page.
|
|
17
17
|
|
|
18
18
|
1. Detect the package manager from the lockfile and add @vinena/knobs as a dev dependency (npm i -D @vinena/knobs, or the pnpm, yarn or bun equivalent).
|
|
19
19
|
2. Mount it once, on the client, in development only:
|
|
@@ -22,8 +22,9 @@ Install @vinena/knobs in this project. It is a dev-only panel that emulates brow
|
|
|
22
22
|
- A plain page with no bundler: skip the npm install and add <script src="//unpkg.com/@vinena/knobs/dist/index.global.js"></script> to the page. It mounts itself. Keep it out of the deployed page.
|
|
23
23
|
3. Keep devknobs out of production builds. A static import stays in the bundle even behind a dev check, so gate the import itself as above. If the project has a build script, run it and check that the output has no devknobs.
|
|
24
24
|
4. If the app reads media queries, the time or the user agent while it boots, or renders with React, add the early script as the first element in <head>, in development only: <script src="//unpkg.com/@vinena/knobs/dist/early.global.js"></script>
|
|
25
|
-
5. Change nothing else in the project.
|
|
26
|
-
6.
|
|
25
|
+
5. Change nothing else in the project for the setup.
|
|
26
|
+
6. Open the app in your browser tool, such as Playwright or the Chrome DevTools MCP, and drive window.devknobs. For each check, call window.devknobs.reset(), then window.devknobs.setState(), then await window.devknobs.ready(). Check a phone ({ device: "iphone-17" }), dark mode ({ scheme: "dark" }) and a right-to-left language ({ locale: { lang: "ar", dir: "rtl" } }). The locale knob can reload the page, so wait for the load. window.devknobs.grab() what breaks, fix it and check again. Then call window.devknobs.reset().
|
|
27
|
+
7. Then tell me what you changed, what you fixed and how to open the panel: press Shift+K or click the handle on the right edge of the window. In the open panel, / searches the knobs. Shift+G grabs an element.
|
|
27
28
|
```
|
|
28
29
|
|
|
29
30
|
or by hand:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
buildTrace,
|
|
4
|
+
componentOf,
|
|
5
|
+
formatEntry,
|
|
6
|
+
grabContext,
|
|
7
|
+
grabEntry,
|
|
8
|
+
joinEntries,
|
|
9
|
+
quickEntry
|
|
10
|
+
} from "./react-3mfz1x2a.js";
|
|
11
|
+
import"./react-1gqwa2yw.js";
|
|
12
|
+
import"./react-5rq7bnsy.js";
|
|
13
|
+
import"./react-fp73vhyd.js";
|
|
14
|
+
import"./react-t2qnewz2.js";
|
|
15
|
+
export {
|
|
16
|
+
quickEntry,
|
|
17
|
+
joinEntries,
|
|
18
|
+
grabEntry,
|
|
19
|
+
grabContext,
|
|
20
|
+
formatEntry,
|
|
21
|
+
componentOf,
|
|
22
|
+
buildTrace
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildTrace,
|
|
3
|
+
componentOf,
|
|
4
|
+
formatEntry,
|
|
5
|
+
grabContext,
|
|
6
|
+
grabEntry,
|
|
7
|
+
joinEntries,
|
|
8
|
+
quickEntry
|
|
9
|
+
} from "./index-1mstjadm.js";
|
|
10
|
+
import"./index-aymfvd8s.js";
|
|
11
|
+
import"./index-t4kssacm.js";
|
|
12
|
+
import"./index-a974q3aa.js";
|
|
13
|
+
import"./index-5tv6sr74.js";
|
|
14
|
+
export {
|
|
15
|
+
quickEntry,
|
|
16
|
+
joinEntries,
|
|
17
|
+
grabEntry,
|
|
18
|
+
grabContext,
|
|
19
|
+
formatEntry,
|
|
20
|
+
componentOf,
|
|
21
|
+
buildTrace
|
|
22
|
+
};
|
package/dist/early.global.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(()=>{var Y1=(j,$)=>()=>(j&&($=j(j=0)),$);var o0,N0=()=>{},gj=(j)=>j.__REACT_DEVTOOLS_GLOBAL_HOOK__,P$=(j)=>{let $=j.current.memoizedState;return $===null||$!==void 0&&($.element===null||$.element===void 0)},vj=(j)=>{try{Function.prototype.toString.call(j).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build")})}catch{}},hj=(j=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(j&&("getFiberRoots"in j)&&j._isBippyHook!==!0),C$=(j=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!j||typeof j.inject!="function"||hj(j))return!1;try{return Function.prototype.toString.call(j.inject).includes("(injected)")}catch{return!1}},yj,e0,a0,H$,pj,kj,uj=(j,$)=>{yj.add(j);let J=a0.get(j)??new Set;J.add($),a0.set(j,J)},r0=(j)=>{for(let $ of yj)a0.get($)?.has(j)&&$()},z$=(j,$)=>{for(let J of H$)J.target===j&&J.listener($)},M$=(j,$)=>{for(let J of pj)J(j,$)},I$=(j)=>Object.prototype.toString.call(j)==="[object Map]",cj=(j)=>(I$(j.renderers)||(j.renderers=new Map),j.renderers),dj=(j,$,J,X,Z)=>{J.set(X,Z),e0.add(Z),j._instrumentationIsActive||(j._instrumentationIsActive=!0,r0($));let Q=kj.get($)??new WeakSet;kj.set($,Q),!Q.has(Z)&&(Q.add(Z),z$($,Z))},mj=(j,$=globalThis)=>{j&&uj(j,$);let J=new Map,X=new Map,Z=(G)=>{let V=X.get(G)??new Set;return X.set(G,V),V},Q=0,B={_instrumentationIsActive:!1,_instrumentationSource:"bippy-0.7.3",_isBippyHook:!0,checkDCE:vj,getFiberRoots:Z,hasUnsupportedRendererAttached:!1,inject:(G)=>{let V=++Q;return dj(B,$,J,V,G),V},on:N0,onCommitFiberRoot:(G,V)=>{let K=Z(G);P$(V)?K.delete(V):K.add(V)},onCommitFiberUnmount:N0,onPostCommitFiberRoot:N0,renderers:J,supportsFiber:!0,supportsFlight:!0};try{if(o0($,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get:()=>B,set:(G)=>{if(G&&typeof G=="object"){let V=B.renderers;B=G;let K=cj(B);V.forEach((Y,H)=>{e0.add(Y),K.set(H,Y)}),(V.size>0||pj.size>0)&&t0(j,$),M$(B,$)}}}),$===globalThis&&typeof window<"u"){let G=window.hasOwnProperty.bind(window),V=Object.getOwnPropertyDescriptor(window,"hasOwnProperty"),K=!1,Y=()=>{V?o0(window,"hasOwnProperty",V):Reflect.deleteProperty(window,"hasOwnProperty")};o0(window,"hasOwnProperty",{configurable:!0,value:(H)=>!K&&H==="__REACT_DEVTOOLS_GLOBAL_HOOK__"?(K=!0,Y(),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,!1):G(H),writable:!0})}}catch{t0(j,$)}return B},t0=(j,$=globalThis)=>{j&&uj(j,$);let J=!1,X=gj($);if(!X)return;let Z=cj(X);if(!X._instrumentationSource){X.checkDCE=vj,X.supportsFiber=!0,X.supportsFlight=!0,X.hasUnsupportedRendererAttached=!1,X._instrumentationSource="bippy-0.7.3",X._instrumentationIsActive=!1;let Q=hj(X);Q||(X.on=N0),Z.size?(Z.forEach((G)=>e0.add(G)),X._instrumentationIsActive=!0,r0($),J=!0):!Q&&C$(X)&&(X._instrumentationIsActive=!0,r0($),J=!0);let B=X.inject;X.inject=(G)=>{let V=B.call(X,G);return dj(X,$,Z,V,G),V}}!J&&(Z.size||X._instrumentationIsActive)&&j?.()},U$=(j=globalThis)=>Object.hasOwn(j,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),ij=(j,$=globalThis)=>U$($)?(t0(j,$),gj($)??mj(j,$)):mj(j,$);var lj=Y1(()=>{o0=Object.defineProperty,yj=new Set,e0=new Set,a0=new WeakMap,H$=new Set,pj=new Set,kj=new WeakMap});var _$={};var nj=Y1(()=>{lj();try{ij()}catch{}});var D3=Symbol.for("devknobs.clock"),g=globalThis[D3]??={Date,clock:null},Y0=g.Date;function D(){return Y0.now()}function q3(j,$){if(j.mode==="frozen")return j.at;if(j.mode==="offset")return Math.floor(j.at+($-j.since)*j.speed);return $}function O3(j){g.clock=j&&j.mode!=="system"?{...j}:null}function W0(){return g.clock?q3(g.clock,D()):D()}function R3(j,$){return new Proxy(j,{construct(J,X,Z){if(X.length===0&&g.clock)return Reflect.construct(J,[W0()],Z);return Reflect.construct(J,$?$.args(X):X,Z)},apply(J,X,Z){if(!g.clock&&!$?.on())return Reflect.apply(J,X,Z);return String(new Y0(W0()))},get(J,X,Z){if(X==="now")return W0;if(X==="parse"&&$)return $.parse;return Reflect.get(J,X,Z)}})}var C1={instant:(j)=>j,zonedDateTimeISO:(j,$)=>j.toZonedDateTimeISO($),plainDateTimeISO:(j,$)=>j.toZonedDateTimeISO($).toPlainDateTime(),plainDateISO:(j,$)=>j.toZonedDateTimeISO($).toPlainDate(),plainTimeISO:(j,$)=>j.toZonedDateTimeISO($).toPlainTime()},x3=Object.keys(C1);function A3(){return globalThis.Temporal?.Now}function S3(j,$,J){return function(X){let Z=J(X),Q=globalThis.Temporal;if(!g.clock||!Q?.Instant)return $.call(this,Z);let B=Q.Instant.fromEpochMilliseconds(W0()),G=Q.Now?.timeZoneId,V=typeof G==="function"?G.call(Q.Now):void 0;return C1[j](B,Z??V)}}var P1=Symbol.for("devknobs.early.clock");function H1(j){let $=globalThis;if(P1 in $||j.mode==="system")return;O3(j);let J=[],X=(Q,B,G)=>{let V=Reflect.get(Q,B);if(!Reflect.set(Q,B,G))return;J.push(()=>{if(Reflect.get(Q,B)===G)Reflect.set(Q,B,V)})};X(globalThis,"Date",R3(Y0)),X(Y0.prototype,"constructor",globalThis.Date);let Z=A3();for(let Q of x3){let B=Z?.[Q];if(Z&&typeof B==="function"){let G=S3(Q,B,(V)=>V);X(Z,Q,G)}}$[P1]={release:()=>{for(let Q of J.reverse())Q()}}}var P0=["closed","open"];var R0=[{id:"iphone-18-pro",label:"iPhone 18 Pro",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-18-pro-max",label:"iPhone 18 Pro Max",width:440,height:956,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-duo",label:"iPhone Duo",width:466,height:678,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone",postures:{closed:{id:"iphone-duo-closed",label:"iPhone Duo (closed)",clockwise:!0},open:{id:"iphone-duo-open",label:"iPhone Duo (open)",width:669,height:951,usual:"landscape",clockwise:!0}}},{id:"iphone-air",label:"iPhone Air",width:420,height:912,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-17",label:"iPhone 17",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-17-pro",label:"iPhone 17 Pro",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-17-pro-max",label:"iPhone 17 Pro Max",width:440,height:956,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16",label:"iPhone 16",width:393,height:852,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16-plus",label:"iPhone 16 Plus",width:430,height:932,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16-pro",label:"iPhone 16 Pro",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16-pro-max",label:"iPhone 16 Pro Max",width:440,height:956,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-se",label:"iPhone SE",width:375,height:667,dpr:2,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"pixel-10",label:"Pixel 10",width:412,height:924,dpr:2.625,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-10-pro",label:"Pixel 10 Pro",width:427,height:952,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-10-pro-xl",label:"Pixel 10 Pro XL",width:448,height:998,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-10a",label:"Pixel 10a",width:412,height:924,dpr:2.625,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-9",label:"Pixel 9",width:412,height:924,dpr:2.625,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-9-pro",label:"Pixel 9 Pro",width:427,height:952,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-9-pro-xl",label:"Pixel 9 Pro XL",width:448,height:998,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"ipad-mini",label:"iPad mini",width:744,height:1133,dpr:2,ua:"ipad-safari",touch:!0,kind:"tablet"},{id:"ipad-air-11",label:"iPad Air 11",width:820,height:1180,dpr:2,ua:"ipad-safari",touch:!0,kind:"tablet"},{id:"ipad-pro-13",label:"iPad Pro 13",width:1032,height:1376,dpr:2,ua:"ipad-safari",touch:!0,kind:"tablet"},{id:"macbook-air-13",label:"MacBook Air 13",width:1470,height:956,dpr:2,ua:"mac-safari",touch:!1,kind:"laptop"},{id:"laptop",label:"laptop",width:1366,height:768,dpr:1,ua:"windows-chrome",touch:!1,kind:"laptop"},{id:"desktop",label:"desktop",width:1920,height:1080,dpr:1,ua:"windows-chrome",touch:!1,kind:"desktop"}];function x0(j){return R0.find(($)=>$.id===j)}function z1(j){for(let $ of R0){let J=P0.find((X)=>$.postures?.[X].id===j);if(J)return{device:$.id,posture:J}}return}var X2=R0.flatMap((j)=>{let{postures:$}=j;return $?P0.map((J)=>({...j,...$[J]})):[j]});function M1(j){return x0(j)?.touch===!0}function C0(j){return typeof j==="string"&&/^#[0-9a-f]{6}$/.test(j)}function I1(j){let J=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(j.trim())?.[1];if(!J)return null;let X=J.length===3?Array.from(J,(G)=>G+G):J.match(/../g),[Z=0,Q=0,B=0]=(X??[]).map((G)=>Number.parseInt(G,16));return{red:Z,green:Q,blue:B,alpha:1}}function T3(j){if(typeof j!=="object"||j===null)return 0;let $=Reflect.get(j,"v");return typeof $==="number"&&Number.isInteger($)&&$>=0?$:0}function O(j,$){return T3(j)>$}function n(j,$){return{v:$,...j}}var A0="devknobs",f3="fresh",w3="data-devknobs-fresh",S0="devknobs:fresh-reload",E3=1,b3=1e4,k3="devknobs:locale-",U1=Symbol.for("devknobs.fresh");function F1(j){try{return new URLSearchParams(j).getAll(A0).includes(f3)}catch{return!1}}function m3(j){if(j===A0)return!0;return j.startsWith(`${A0}:`)&&!j.startsWith(k3)}function g3(j){if(!j)return 0;try{let $=JSON.parse(j);if(typeof $!=="object"||$===null||O($,E3))return 0;let J=Reflect.get($,"at");return typeof J==="number"?J:0}catch{return 0}}function v3(){try{let j=window.sessionStorage,$=D()-g3(j.getItem(S0));if(j.removeItem(S0),$>=0&&$<b3)return;let J=[];for(let X=0;X<j.length;X++){let Z=j.key(X);if(Z!==null&&m3(Z))J.push(Z)}for(let X of J)j.removeItem(X)}catch{}}function h3(){try{window.sessionStorage.removeItem(S0)}catch{}}function y3(){try{let j=window.frameElement;if(j)return j.hasAttribute(w3)}catch{}return window.name===T0&&F1(window.location?.search??"")}function _1(){if(typeof window>"u")return!1;let j=Reflect.get(window,U1);if(typeof j==="boolean")return j;let $=!1;try{if(R())$=y3();else if($=F1(window.location?.search??""),$)v3();else h3()}catch{$=!1}return Reflect.set(window,U1,$),$}function T(j){try{if(typeof window>"u")return null;if(j==="session")return _1(),window.sessionStorage??null;return _1()?null:window.localStorage??null}catch{return null}}var L1=20,N1=40;function D1(j){return Math.min(Math.max(j,0.25),4)}var p3="devknobs",u3=2,c3="devknobs:place",d3=2,f1=["device","scheme","text","locale"],q1=128,i3=new Map([["speed","motion"],["pseudo","locale"],["timeZone","clock"],["ua","device"],["grabColor","debug"]]),W={scheme:"system",motion:"system",speed:1,contrast:"system",transparency:"system",locale:{lang:"system",dir:"system"},pseudo:!1,geo:{preset:"system",lat:0,lng:0,accuracy:L1,timeZone:"",error:"none",route:"",speed:N1},timeZone:"geo",clock:{mode:"system",at:0,since:0,speed:1,header:!1},network:{online:"system",type:"system",saveData:"system"},text:"system",spacing:!1,width:"full",height:"full",device:"none",orientation:"portrait",posture:"closed",mock:!0,touchPointer:!0,browser:"auto",bars:"auto",edgeToEdge:!0,frame:!1,dpr:"system",zoom:"fit",mat:"blue",vision:"none",ua:{preset:"system",custom:""},overflow:!1,outlines:!1,grabColor:"auto",panel:{open:!1,side:"right",y:q1,top:q1,edge:"none",tab:"top",docked:!1,handle:!0,devIcon:"auto",realPhone:!1,pinned:[...f1]}},l3=["light","dark","system"],n3=["reduce","system"],s3=["more","system"],o3=["reduce","system"],a3=["ltr","rtl","system"],r3=["none","denied","unavailable","timeout"],t3=["system","offset","frozen"],e3=["offline","system"],j7=["slow-2g","2g","3g","4g","system"],$7=["on","off","system"],J7=["auto","expanded","minimized"],X7=["auto","compact","bottom","top","off"],Z7=["portrait","landscape"],O1=["top","bottom","none"],Q7=["left","right"],B7=["auto","on","off"],G7=["none","protanopia","deuteranopia","tritanopia","achromatopsia","blur"],V7=["blue","green","magenta","purple","red","graphite"],K7=["auto","blue","green","pink","orange","purple","cyan"];function w(j){return typeof j==="object"&&j!==null?j:{}}function _(j,$,J){return $.includes(j)?j:J}function R1(j,$,J){return C0(j)?j:_(j,$,J)}function f(j,$){return typeof j==="string"?j:$}function q(j,$){return typeof j==="number"&&Number.isFinite(j)?j:$}function L(j,$){return typeof j==="boolean"?j:$}function s(j,$,J){if(j===$)return $;if(typeof j==="number"&&Number.isFinite(j)&&j>0)return j;return J}function x1(j,$){return typeof j==="number"&&Number.isFinite(j)&&j>=0?j:$}function W7(j){if(!Array.isArray(j))return[];let $=j.filter((J)=>typeof J==="string");return Array.from(new Set($.map((J)=>i3.get(J)??J)))}function A1(j,$){if(!j)return null;try{let J=JSON.parse(j);return O(J,$)?null:J}catch{return null}}function S1(j,$){let J=w(j),X=Number.isFinite(q(J.y,q(J.top,Number.NaN)));return{side:_(J.side,Q7,$.side),y:q(J.y,$.y),top:q(J.top,q(J.y,$.top)),edge:_(J.edge,O1,X?"none":$.edge),tab:_(J.tab,O1,X?"none":$.tab),docked:L(J.docked,$.docked)}}function w1(j,$){let J=S1(A1($,d3),W.panel),X=w(A1(j,u3)),Z=w(X.locale),Q=w(X.geo),B=w(X.clock),G=w(X.network),V=w(X.ua),K=w(X.panel),Y=f(X.device,W.device),H=z1(Y),C=s(X.zoom,"fit",W.zoom);return{scheme:_(X.scheme,l3,W.scheme),motion:_(X.motion,n3,W.motion),speed:x1(X.speed,W.speed),contrast:_(X.contrast,s3,W.contrast),transparency:_(X.transparency,o3,W.transparency),locale:{lang:f(Z.lang,W.locale.lang),dir:_(Z.dir,a3,W.locale.dir)},pseudo:L(X.pseudo,W.pseudo),geo:{preset:f(Q.preset,W.geo.preset),lat:q(Q.lat,W.geo.lat),lng:q(Q.lng,W.geo.lng),accuracy:q(Q.accuracy,W.geo.accuracy),timeZone:f(Q.timeZone,W.geo.timeZone),error:_(Q.error,r3,W.geo.error),route:f(Q.route,W.geo.route),speed:q(Q.speed,W.geo.speed)},timeZone:f(X.timeZone,"")||W.timeZone,clock:{mode:_(B.mode,t3,W.clock.mode),at:q(B.at,W.clock.at),since:q(B.since,W.clock.since),speed:x1(B.speed,W.clock.speed),header:L(B.header,W.clock.header)},network:{online:_(G.online,e3,W.network.online),type:_(G.type,j7,W.network.type),saveData:_(G.saveData,$7,W.network.saveData)},text:s(X.text,"system",W.text),spacing:L(X.spacing,W.spacing),width:s(X.width,"full",W.width),height:s(X.height,"full",W.height),device:H?.device??(x0(Y)?Y:W.device),orientation:_(X.orientation,Z7,W.orientation),posture:H?.posture??_(X.posture,[...P0],W.posture),mock:L(X.mock,W.mock),touchPointer:L(X.touchPointer,W.touchPointer),browser:_(X.browser,X7,W.browser),bars:X.browserMin===!0?"minimized":_(X.bars,J7,W.bars),edgeToEdge:L(X.edgeToEdge,W.edgeToEdge),frame:L(X.frame,W.frame),dpr:s(X.dpr,"system",W.dpr),zoom:C==="fit"?C:D1(C),mat:R1(X.mat,V7,"blue"),vision:_(X.vision,G7,W.vision),ua:{preset:f(V.preset,W.ua.preset),custom:f(V.custom,W.ua.custom)},overflow:L(X.overflow,W.overflow),outlines:L(X.outlines,W.outlines),grabColor:R1(X.grabColor,K7,"auto"),panel:{open:L(K.open,W.panel.open),...S1(K,J),handle:L(K.handle,W.panel.handle),devIcon:_(K.devIcon,B7,W.panel.devIcon),realPhone:L(K.realPhone,W.panel.realPhone),pinned:X.panel===void 0?[...f1]:W7(K.pinned)}}}function T1(j,$){try{return T(j)?.getItem($)??null}catch{return null}}function E1(){let j=w1(T1("session",p3),T1("local",c3));return{...j,panel:{...j.panel,realPhone:W.panel.realPhone}}}var Y7="data-devknobs-frame",T0="devknobs-frame";function R(){try{if(window.frameElement?.hasAttribute(Y7))return!0}catch{}return window.name===T0}function b1(j){if(j==="system")return!1;try{return window.frameElement?.style.getPropertyValue("color-scheme")===j}catch{return!1}}var P7={width:"full",height:"full",frame:!1,dpr:"system",vision:"none"},S2={...P7,device:"none",panel:{docked:!1}};function f0(j){return typeof j==="number"&&j>0}function k1(j){return f0(j.width)||f0(j.height)||j.frame||f0(j.dpr)||j.vision!=="none"}function m1(j){return k1(j)||j.panel?.docked===!0}function g1(j){return j.panel?.docked===!0&&!k1(j)}var v1=["text","media"],H0=new Map,o=null,d=null;function h1(j,$,J){for(let X=j;X<v1.length;X++){let Z=H0.get(v1[X]);if(Z)return Z($,(Q)=>h1(X+1,Q,J))}return J.call(window,$)}function y1(j){return(o??window.matchMedia).call(window,j)}function w0(j,$){if(H0.set(j,$),d)return;let J=window.matchMedia,X=function(Q){let B=String(Q);return d===X?h1(0,B,J):J.call(window,B)};o=J,d=X,window.matchMedia=X}function E0(j){if(H0.delete(j),H0.size>0||!d)return;if(window.matchMedia===d&&o)window.matchMedia=o;d=null,o=null}var p1=Symbol.for("devknobs.inline");function C7(j){let $=Reflect.get(j,p1);return typeof $==="object"&&$!==null?$:null}function b0(j,$,J){let X=C7(j);if(J===null||J===""){if(X)Reflect.deleteProperty(X,$);return}if(X)Reflect.set(X,$,J);else Reflect.set(j,p1,{[$]:J})}var H7=new WeakMap;function u1(j){let $=H7.get(j);return $&&j.media.mediaText===$.written?$.original:void 0}var l1={scheme:"system",motion:"system",contrast:"system",transparency:"system",touch:!1},z7="(min-width: 0px)",M7="all",I7="not all",v0={scheme:"prefers-color-scheme",motion:"prefers-reduced-motion",contrast:"prefers-contrast",transparency:"prefers-reduced-transparency"},n1=Object.keys(v0),s1=[["pointer","coarse"],["any-pointer","coarse"],["hover","none"],["any-hover","none"]],U7=[...n1.map((j)=>v0[j]),...s1.map(([j])=>j)];function o1(j){return[...n1.map(($)=>[v0[$],j[$]]),...s1.map(([$,J])=>[$,j.touch?J:"system"])]}function _7(j){return new RegExp(`\\(\\s*${j}\\s*(?::\\s*([a-z-]+)\\s*)?\\)`,"gi")}function F7(j,$){if(j===void 0||j==="")return $!=="no-preference"&&$!=="none";return j.toLowerCase()===$}function L7(j){let $=[],J=0,X=0;for(let Z=0;Z<j.length;Z++){let Q=j[Z];if(Q==="(")J++;else if(Q===")")J--;else if(Q===","&&J===0)$.push(j.slice(X,Z)),X=Z+1}return $.push(j.slice(X)),$.map((Z)=>Z.trim()).filter((Z)=>Z.length>0)}function N7(j,$,J,X){if(!$)return j;let Z=/^not\s/i.test(j);if(Z?J:!J)return I7;return Z?M7:X}function D7(j,$,J){let X=!1,Z=!0,Q=j.replace(_7($),(B,G)=>{if(X=!0,!F7(G,J))Z=!1;return z7});return N7(j,X,Z,Q)}function q7(j,$,J){if(J==="system")return j;if(!j.toLowerCase().includes($))return j;let X=L7(j);if(X.length===0)return j;return X.map((Z)=>D7(Z,$,J)).join(", ")}function a1(j,$){let J=j;for(let[X,Z]of o1($))J=q7(J,X,Z);return J}function h0(j){let $=j.toLowerCase();return U7.some((J)=>$.includes(J))}var M0=Symbol.for("devknobs.early"),c1=new WeakMap,x=new Set,v=new WeakMap,e=new WeakMap,I0=new WeakSet,r1=256,d1=r1,E=l1,z0=null,U0=null,r=null,y0=null,_0=!1,k0=!1,g0=null,t=null,i=0,a=null;function t1(j,$,J){for(let X=0;X<j.length;X++){let Z=j[X];if(!Z)continue;let Q=Z.styleSheet;if(Q)e1(Q,$,J);let B=Z.media;if(B&&typeof B.mediaText==="string")$(Z);let G=Z.cssRules;if(G&&G!==j)t1(G,$,J)}}function e1(j,$,J){if(J.has(j))return;J.add(j);let X=null;try{X=j.cssRules}catch{return}if(X)t1(X,$,J)}function p0(){let j=new Set,$=[...Array.from(document.styleSheets),...document.adoptedStyleSheets??[]];for(let J of $)e1(J,(X)=>{let Z=X.media.mediaText,Q=c1.get(X);if(Q===void 0){if(Q=u1(X)??Z,!h0(Q))return;c1.set(X,Q)}let B=a1(Q,E);if(B===Z)return;try{X.media.mediaText=B}catch{}},j)}function i1(){if(i)return;i=requestAnimationFrame(()=>{i=0,p0()})}function O7(){if(t||typeof MutationObserver>"u")return;t=new MutationObserver((j)=>{for(let $ of j)for(let J of Array.from($.addedNodes)){let X=J.nodeName;if(X!=="STYLE"&&X!=="LINK")continue;if(J.hasAttribute?.("data-devknobs"))continue;if(X==="LINK")J.addEventListener("load",i1,{once:!0});i1()}}),t.observe(document.documentElement,{childList:!0,subtree:!0})}function jj(){return o1(E).some(([,j])=>j!=="system")}function R7(j){try{let $=y1(a1(j,E));return U0?U0.call($):$.matches}catch{return!1}}function $j(){for(let j of Array.from(x)){let $=j.deref();if(!$){x.delete(j);continue}let J=$.matches;if(J===v.get($))continue;v.set($,J),$.dispatchEvent(new MediaQueryListEvent("change",{media:$.media,matches:J}))}}function Jj(j){if(g0){g0(j);return}if(!j.isTrusted)return;let $=j.currentTarget;if(!jj()){v.set($,j.matches);return}if(j.stopImmediatePropagation(),k0)return;k0=!0,queueMicrotask(()=>{k0=!1,$j()})}function m0(j){if(I0.has(j)||!e.has(j))return;I0.add(j),v.set(j,j.matches),(y0??j.addEventListener).call(j,"change",Jj)}function x7(j,$){if(e.set(j,$),v.set(j,j.matches),x.add(new WeakRef(j)),x.size<d1)return;for(let J of x)if(!J.deref())x.delete(J);d1=Math.max(r1,x.size*2)}var A7=["addEventListener","addListener","onchange"];function S7(){let j=MediaQueryList.prototype;r=new Map(A7.map((Q)=>[Q,Object.getOwnPropertyDescriptor(j,Q)]));let $=j.addEventListener;y0=$,Object.defineProperty(j,"addEventListener",{configurable:!0,writable:!0,value:function(...B){if(B[1]&&String(B[0])==="change")m0(this);$.apply(this,B)}});let J=j.addListener;if(typeof J==="function")Object.defineProperty(j,"addListener",{configurable:!0,writable:!0,value:function(...B){if(B[0])m0(this);J.apply(this,B)}});let X=r.get("onchange"),Z=X?.set;if(X&&Z)Object.defineProperty(j,"onchange",{...X,set(Q){if(Q!==null&&Q!==void 0)m0(this);Z.call(this,Q)}})}function T7(){if(!r)return;let j=MediaQueryList.prototype;for(let[$,J]of r)if(J)Object.defineProperty(j,$,J);else Reflect.deleteProperty(j,$);r=null,y0=null}function f7(j,$){let J=$(j);if(h0(j))x7(J,j);return J}function w7(){if(_0)return;let j=window,$=j[M0];j[M0]=null;let J=$?.release(Jj)??[];_0=!0;for(let{list:Q,query:B,heard:G,guarded:V}of J)if(e.set(Q,B),v.set(Q,G),x.add(new WeakRef(Q)),V!==!1)I0.add(Q);w0("media",f7),S7();let X=Object.getOwnPropertyDescriptor(MediaQueryList.prototype,"matches"),Z=X?.get;if(!X||!Z)return;z0=X,U0=Z,Object.defineProperty(MediaQueryList.prototype,"matches",{configurable:!0,enumerable:X.enumerable,get(){if(!jj())return Z.call(this);let Q=e.get(this)??this.media;return h0(Q)?R7(Q):Z.call(this)}})}function Xj(){let j=document.documentElement;if(a===null)a=j.style.getPropertyValue("color-scheme");let $=E.scheme==="system"?a:E.scheme;if($)j.style.setProperty("color-scheme",$);else j.style.removeProperty("color-scheme");let J=E.scheme!=="system"&&$!==a;b0(j,"color-scheme",J?j.style.getPropertyValue("color-scheme"):null)}function E7(j){E=j,w7(),O7(),Xj(),p0(),$j()}function b7(){if(t?.disconnect(),t=null,i)cancelAnimationFrame(i),i=0;if(_0){if(E0("media"),T7(),z0)Object.defineProperty(MediaQueryList.prototype,"matches",z0);z0=null,U0=null,_0=!1}a=null}function k7(j){let $=[];for(let J of x){let X=J.deref();if(!X)continue;$.push({list:X,query:e.get(X)??X.media,heard:v.get(X)??X.matches,guarded:I0.has(X)})}return g0=j,x.clear(),E=l1,Xj(),p0(),b7(),$}function Zj(j){let $=window;if(M0 in $)return;E7(j),$[M0]={release:k7}}var Qj={blue:{srgb:["rgb(20, 70, 152)","rgb(12, 48, 114)","rgb(7, 31, 80)"],p3:["color(display-p3 0.1 0.27 0.61)","color(display-p3 0.06 0.19 0.46)","color(display-p3 0.035 0.12 0.32)"],line:"rgb(170, 205, 255)"},green:{srgb:["rgb(26, 96, 71)","rgb(14, 71, 51)","rgb(8, 49, 35)"],p3:["color(display-p3 0.159 0.377 0.279)","color(display-p3 0.102 0.277 0.2)","color(display-p3 0.065 0.194 0.136)"],line:"rgb(160, 218, 191)"},magenta:{srgb:["rgb(123, 37, 88)","rgb(90, 22, 63)","rgb(62, 12, 42)"],p3:["color(display-p3 0.462 0.14 0.342)","color(display-p3 0.34 0.081 0.246)","color(display-p3 0.234 0.043 0.165)"],line:"rgb(238, 185, 211)"},purple:{srgb:["rgb(86, 56, 130)","rgb(62, 38, 96)","rgb(42, 24, 67)"],p3:["color(display-p3 0.326 0.209 0.521)","color(display-p3 0.233 0.138 0.387)","color(display-p3 0.156 0.086 0.269)"],line:"rgb(209, 193, 242)"},red:{srgb:["rgb(132, 36, 36)","rgb(97, 21, 22)","rgb(68, 11, 12)"],p3:["color(display-p3 0.499 0.139 0.133)","color(display-p3 0.369 0.079 0.078)","color(display-p3 0.256 0.041 0.042)"],line:"rgb(239, 188, 183)"},graphite:{srgb:["rgb(64, 68, 74)","rgb(43, 46, 51)","rgb(26, 28, 32)"],p3:["color(display-p3 0.25 0.264 0.291)","color(display-p3 0.169 0.179 0.2)","color(display-p3 0.102 0.11 0.126)"],line:"rgb(198, 203, 211)"}},m7=["blue","green","magenta","purple","red","graphite"];function d0(j){return`radial-gradient(140% 100% at 50% 0%, ${j[0]}, ${j[1]} 60%, ${j[2]})`}function g7(j){return m7.some(($)=>$===j)}var u0=[1,0.82,0.64];function c0(j){return`rgb(${Math.round(j.red)}, ${Math.round(j.green)}, ${Math.round(j.blue)})`}function v7(j){let $=(J)=>({red:j.red*J,green:j.green*J,blue:j.blue*J,alpha:1});return[$(u0[0]),$(u0[1]),$(u0[2])]}function h7(j){return C0(j)?I1(j):null}function Bj(j){if(g7(j))return Qj[j];let $=h7(j);if(!$)return Qj.blue;let[J,X,Z]=v7($),Q=[c0(J),c0(X),c0(Z)];return{srgb:Q,p3:Q}}var y7=Symbol.for("devknobs.own"),Kj=Symbol.for("devknobs.name"),Gj=Symbol.for("devknobs.text"),Vj=new WeakMap;function i0(j){return j.nodeType===9}function p7(j){return i0(j)?j:j.ownerDocument??document}function Wj(j){let J=(i0(j)?j:j.ownerDocument)?.defaultView?.CSSStyleSheet;if(typeof J!=="function"||typeof J.prototype.replaceSync!=="function")return null;return"adoptedStyleSheets"in j?J:null}function Yj(j,$){let J=Vj.get($);if(J)return J;let X={get textContent(){let Z=Reflect.get($,Gj);return typeof Z==="string"?Z:""},set textContent(Z){Reflect.set($,Gj,Z??""),$.replaceSync(Z??"")},sheet:$,remove(){j.adoptedStyleSheets=j.adoptedStyleSheets.filter((Z)=>Z!==$)}};return Vj.set($,X),X}function Pj(j,$,J){let X=new $;if(Reflect.set(X,y7,!0),J!==void 0)Reflect.set(X,Kj,J);return j.adoptedStyleSheets=[...j.adoptedStyleSheets,X],Yj(j,X)}function Cj(j,$){let J=Wj(j);if(J){let Z=Pj(j,J);return Z.textContent=$,Z}let X=p7(j).createElement("style");if(X.textContent=$,i0(j))(j.head??j.documentElement).appendChild(X);else j.append(X);return X}function F0(j,$=document){let J="adoptedStyleSheets"in $?$.adoptedStyleSheets.find((X)=>Reflect.get(X,Kj)===j):void 0;return J?Yj($,J):$.querySelector(`style[data-devknobs="${j}"]`)}function Hj(j,$=document){let J=F0(j,$);if(J)return J;let X=Wj($);if(X)return Pj($,X,j);let Z=$.createElement("style");return Z.setAttribute("data-devknobs",j),($.head??$.documentElement).appendChild(Z),Z}function zj(j,$=document){F0(j,$)?.remove()}var Ij=2147483645,j0="early",u7="devknobs:snapshot",c7=1,d7=3000;function i7(j){if(!j)return`html{overflow:hidden!important}
|
|
1
|
+
(()=>{var Y1=(j,$)=>()=>(j&&($=j(j=0)),$);var o0,N0=()=>{},gj=(j)=>j.__REACT_DEVTOOLS_GLOBAL_HOOK__,P$=(j)=>{let $=j.current.memoizedState;return $===null||$!==void 0&&($.element===null||$.element===void 0)},vj=(j)=>{try{Function.prototype.toString.call(j).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://react.dev/link/perf-use-production-build")})}catch{}},hj=(j=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(j&&("getFiberRoots"in j)&&j._isBippyHook!==!0),C$=(j=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>{if(!j||typeof j.inject!="function"||hj(j))return!1;try{return Function.prototype.toString.call(j.inject).includes("(injected)")}catch{return!1}},yj,e0,a0,H$,pj,kj,uj=(j,$)=>{yj.add(j);let J=a0.get(j)??new Set;J.add($),a0.set(j,J)},r0=(j)=>{for(let $ of yj)a0.get($)?.has(j)&&$()},z$=(j,$)=>{for(let J of H$)J.target===j&&J.listener($)},M$=(j,$)=>{for(let J of pj)J(j,$)},I$=(j)=>Object.prototype.toString.call(j)==="[object Map]",cj=(j)=>(I$(j.renderers)||(j.renderers=new Map),j.renderers),dj=(j,$,J,X,Z)=>{J.set(X,Z),e0.add(Z),j._instrumentationIsActive||(j._instrumentationIsActive=!0,r0($));let Q=kj.get($)??new WeakSet;kj.set($,Q),!Q.has(Z)&&(Q.add(Z),z$($,Z))},mj=(j,$=globalThis)=>{j&&uj(j,$);let J=new Map,X=new Map,Z=(G)=>{let V=X.get(G)??new Set;return X.set(G,V),V},Q=0,B={_instrumentationIsActive:!1,_instrumentationSource:"bippy-0.7.3",_isBippyHook:!0,checkDCE:vj,getFiberRoots:Z,hasUnsupportedRendererAttached:!1,inject:(G)=>{let V=++Q;return dj(B,$,J,V,G),V},on:N0,onCommitFiberRoot:(G,V)=>{let K=Z(G);P$(V)?K.delete(V):K.add(V)},onCommitFiberUnmount:N0,onPostCommitFiberRoot:N0,renderers:J,supportsFiber:!0,supportsFlight:!0};try{if(o0($,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get:()=>B,set:(G)=>{if(G&&typeof G=="object"){let V=B.renderers;B=G;let K=cj(B);V.forEach((Y,H)=>{e0.add(Y),K.set(H,Y)}),(V.size>0||pj.size>0)&&t0(j,$),M$(B,$)}}}),$===globalThis&&typeof window<"u"){let G=window.hasOwnProperty.bind(window),V=Object.getOwnPropertyDescriptor(window,"hasOwnProperty"),K=!1,Y=()=>{V?o0(window,"hasOwnProperty",V):Reflect.deleteProperty(window,"hasOwnProperty")};o0(window,"hasOwnProperty",{configurable:!0,value:(H)=>!K&&H==="__REACT_DEVTOOLS_GLOBAL_HOOK__"?(K=!0,Y(),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,!1):G(H),writable:!0})}}catch{t0(j,$)}return B},t0=(j,$=globalThis)=>{j&&uj(j,$);let J=!1,X=gj($);if(!X)return;let Z=cj(X);if(!X._instrumentationSource){X.checkDCE=vj,X.supportsFiber=!0,X.supportsFlight=!0,X.hasUnsupportedRendererAttached=!1,X._instrumentationSource="bippy-0.7.3",X._instrumentationIsActive=!1;let Q=hj(X);Q||(X.on=N0),Z.size?(Z.forEach((G)=>e0.add(G)),X._instrumentationIsActive=!0,r0($),J=!0):!Q&&C$(X)&&(X._instrumentationIsActive=!0,r0($),J=!0);let B=X.inject;X.inject=(G)=>{let V=B.call(X,G);return dj(X,$,Z,V,G),V}}!J&&(Z.size||X._instrumentationIsActive)&&j?.()},U$=(j=globalThis)=>Object.hasOwn(j,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),ij=(j,$=globalThis)=>U$($)?(t0(j,$),gj($)??mj(j,$)):mj(j,$);var lj=Y1(()=>{o0=Object.defineProperty,yj=new Set,e0=new Set,a0=new WeakMap,H$=new Set,pj=new Set,kj=new WeakMap});var _$={};var nj=Y1(()=>{lj();try{ij()}catch{}});var q3=Symbol.for("devknobs.clock"),g=globalThis[q3]??={Date,clock:null},Y0=g.Date;function q(){return Y0.now()}function D3(j,$){if(j.mode==="frozen")return j.at;if(j.mode==="offset")return Math.floor(j.at+($-j.since)*j.speed);return $}function O3(j){g.clock=j&&j.mode!=="system"?{...j}:null}function W0(){return g.clock?D3(g.clock,q()):q()}function R3(j,$){return new Proxy(j,{construct(J,X,Z){if(X.length===0&&g.clock)return Reflect.construct(J,[W0()],Z);return Reflect.construct(J,$?$.args(X):X,Z)},apply(J,X,Z){if(!g.clock&&!$?.on())return Reflect.apply(J,X,Z);return String(new Y0(W0()))},get(J,X,Z){if(X==="now")return W0;if(X==="parse"&&$)return $.parse;return Reflect.get(J,X,Z)}})}var C1={instant:(j)=>j,zonedDateTimeISO:(j,$)=>j.toZonedDateTimeISO($),plainDateTimeISO:(j,$)=>j.toZonedDateTimeISO($).toPlainDateTime(),plainDateISO:(j,$)=>j.toZonedDateTimeISO($).toPlainDate(),plainTimeISO:(j,$)=>j.toZonedDateTimeISO($).toPlainTime()},x3=Object.keys(C1);function A3(){return globalThis.Temporal?.Now}function S3(j,$,J){return function(X){let Z=J(X),Q=globalThis.Temporal;if(!g.clock||!Q?.Instant)return $.call(this,Z);let B=Q.Instant.fromEpochMilliseconds(W0()),G=Q.Now?.timeZoneId,V=typeof G==="function"?G.call(Q.Now):void 0;return C1[j](B,Z??V)}}var P1=Symbol.for("devknobs.early.clock");function H1(j){let $=globalThis;if(P1 in $||j.mode==="system")return;O3(j);let J=[],X=(Q,B,G)=>{let V=Reflect.get(Q,B);if(!Reflect.set(Q,B,G))return;J.push(()=>{if(Reflect.get(Q,B)===G)Reflect.set(Q,B,V)})};X(globalThis,"Date",R3(Y0)),X(Y0.prototype,"constructor",globalThis.Date);let Z=A3();for(let Q of x3){let B=Z?.[Q];if(Z&&typeof B==="function"){let G=S3(Q,B,(V)=>V);X(Z,Q,G)}}$[P1]={release:()=>{for(let Q of J.reverse())Q()}}}var P0=["closed","open"];var R0=[{id:"iphone-18-pro",label:"iPhone 18 Pro",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-18-pro-max",label:"iPhone 18 Pro Max",width:440,height:956,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-duo",label:"iPhone Duo",width:466,height:678,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone",postures:{closed:{id:"iphone-duo-closed",label:"iPhone Duo (closed)",clockwise:!0},open:{id:"iphone-duo-open",label:"iPhone Duo (open)",width:669,height:951,usual:"landscape",clockwise:!0}}},{id:"iphone-air",label:"iPhone Air",width:420,height:912,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-17",label:"iPhone 17",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-17-pro",label:"iPhone 17 Pro",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-17-pro-max",label:"iPhone 17 Pro Max",width:440,height:956,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16",label:"iPhone 16",width:393,height:852,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16-plus",label:"iPhone 16 Plus",width:430,height:932,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16-pro",label:"iPhone 16 Pro",width:402,height:874,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-16-pro-max",label:"iPhone 16 Pro Max",width:440,height:956,dpr:3,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"iphone-se",label:"iPhone SE",width:375,height:667,dpr:2,ua:"iphone-safari",touch:!0,kind:"phone"},{id:"pixel-10",label:"Pixel 10",width:412,height:924,dpr:2.625,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-10-pro",label:"Pixel 10 Pro",width:427,height:952,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-10-pro-xl",label:"Pixel 10 Pro XL",width:448,height:998,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-10a",label:"Pixel 10a",width:412,height:924,dpr:2.625,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-9",label:"Pixel 9",width:412,height:924,dpr:2.625,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-9-pro",label:"Pixel 9 Pro",width:427,height:952,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"pixel-9-pro-xl",label:"Pixel 9 Pro XL",width:448,height:998,dpr:3,ua:"android-chrome",touch:!0,kind:"phone"},{id:"ipad-mini",label:"iPad mini",width:744,height:1133,dpr:2,ua:"ipad-safari",touch:!0,kind:"tablet"},{id:"ipad-air-11",label:"iPad Air 11",width:820,height:1180,dpr:2,ua:"ipad-safari",touch:!0,kind:"tablet"},{id:"ipad-pro-13",label:"iPad Pro 13",width:1032,height:1376,dpr:2,ua:"ipad-safari",touch:!0,kind:"tablet"},{id:"macbook-air-13",label:"MacBook Air 13",width:1470,height:956,dpr:2,ua:"mac-safari",touch:!1,kind:"laptop"},{id:"laptop",label:"laptop",width:1366,height:768,dpr:1,ua:"windows-chrome",touch:!1,kind:"laptop"},{id:"desktop",label:"desktop",width:1920,height:1080,dpr:1,ua:"windows-chrome",touch:!1,kind:"desktop"}];function x0(j){return R0.find(($)=>$.id===j)}function z1(j){for(let $ of R0){let J=P0.find((X)=>$.postures?.[X].id===j);if(J)return{device:$.id,posture:J}}return}var X2=R0.flatMap((j)=>{let{postures:$}=j;return $?P0.map((J)=>({...j,...$[J]})):[j]});function M1(j){return x0(j)?.touch===!0}function C0(j){return typeof j==="string"&&/^#[0-9a-f]{6}$/.test(j)}function I1(j){let J=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(j.trim())?.[1];if(!J)return null;let X=J.length===3?Array.from(J,(G)=>G+G):J.match(/../g),[Z=0,Q=0,B=0]=(X??[]).map((G)=>Number.parseInt(G,16));return{red:Z,green:Q,blue:B,alpha:1}}function T3(j){if(typeof j!=="object"||j===null)return 0;let $=Reflect.get(j,"v");return typeof $==="number"&&Number.isInteger($)&&$>=0?$:0}function O(j,$){return T3(j)>$}function n(j,$){return{v:$,...j}}var A0="devknobs",w3="fresh",f3="data-devknobs-fresh",S0="devknobs:fresh-reload",E3=1,b3=1e4,k3="devknobs:locale-",U1=Symbol.for("devknobs.fresh");function F1(j){try{return new URLSearchParams(j).getAll(A0).includes(w3)}catch{return!1}}function m3(j){if(j===A0)return!0;return j.startsWith(`${A0}:`)&&!j.startsWith(k3)}function g3(j){if(!j)return 0;try{let $=JSON.parse(j);if(typeof $!=="object"||$===null||O($,E3))return 0;let J=Reflect.get($,"at");return typeof J==="number"?J:0}catch{return 0}}function v3(){try{let j=window.sessionStorage,$=q()-g3(j.getItem(S0));if(j.removeItem(S0),$>=0&&$<b3)return;let J=[];for(let X=0;X<j.length;X++){let Z=j.key(X);if(Z!==null&&m3(Z))J.push(Z)}for(let X of J)j.removeItem(X)}catch{}}function h3(){try{window.sessionStorage.removeItem(S0)}catch{}}function y3(){try{let j=window.frameElement;if(j)return j.hasAttribute(f3)}catch{}return window.name===T0&&F1(window.location?.search??"")}function _1(){if(typeof window>"u")return!1;let j=Reflect.get(window,U1);if(typeof j==="boolean")return j;let $=!1;try{if(R())$=y3();else if($=F1(window.location?.search??""),$)v3();else h3()}catch{$=!1}return Reflect.set(window,U1,$),$}function T(j){try{if(typeof window>"u")return null;if(j==="session")return _1(),window.sessionStorage??null;return _1()?null:window.localStorage??null}catch{return null}}var L1=20,N1=40;function q1(j){return Math.min(Math.max(j,0.25),4)}var p3="devknobs",u3=2,c3="devknobs:place",d3=2,w1=["device","scheme","text","locale"],D1=128,i3=new Map([["speed","motion"],["pseudo","locale"],["timeZone","clock"],["ua","device"],["grabColor","debug"]]),W={scheme:"system",motion:"system",speed:1,contrast:"system",transparency:"system",locale:{lang:"system",dir:"system"},pseudo:!1,geo:{preset:"system",lat:0,lng:0,accuracy:L1,timeZone:"",error:"none",route:"",speed:N1},timeZone:"geo",clock:{mode:"system",at:0,since:0,speed:1,header:!1},network:{online:"system",type:"system",saveData:"system"},text:"system",spacing:!1,width:"full",height:"full",device:"none",orientation:"portrait",posture:"closed",mock:!0,touchPointer:!0,browser:"auto",bars:"auto",edgeToEdge:!0,frame:!1,dpr:"system",zoom:"fit",mat:"blue",vision:"none",ua:{preset:"system",custom:""},overflow:!1,outlines:!1,grabColor:"auto",panel:{open:!1,side:"right",y:D1,top:D1,edge:"none",tab:"top",docked:!1,handle:!0,devIcon:"auto",realPhone:!1,pinned:[...w1]}},l3=["light","dark","system"],n3=["reduce","system"],s3=["more","system"],o3=["reduce","system"],a3=["ltr","rtl","system"],r3=["none","denied","unavailable","timeout"],t3=["system","offset","frozen"],e3=["offline","system"],j7=["slow-2g","2g","3g","4g","system"],$7=["on","off","system"],J7=["auto","expanded","minimized"],X7=["auto","compact","bottom","top","off"],Z7=["portrait","landscape"],O1=["top","bottom","none"],Q7=["left","right"],B7=["auto","on","off"],G7=["none","protanopia","deuteranopia","tritanopia","achromatopsia","blur"],V7=["blue","green","magenta","purple","red","graphite"],K7=["auto","blue","green","pink","orange","purple","cyan"];function f(j){return typeof j==="object"&&j!==null?j:{}}function _(j,$,J){return $.includes(j)?j:J}function R1(j,$,J){return C0(j)?j:_(j,$,J)}function w(j,$){return typeof j==="string"?j:$}function D(j,$){return typeof j==="number"&&Number.isFinite(j)?j:$}function L(j,$){return typeof j==="boolean"?j:$}function s(j,$,J){if(j===$)return $;if(typeof j==="number"&&Number.isFinite(j)&&j>0)return j;return J}function x1(j,$){return typeof j==="number"&&Number.isFinite(j)&&j>=0?j:$}function W7(j){if(!Array.isArray(j))return[];let $=j.filter((J)=>typeof J==="string");return Array.from(new Set($.map((J)=>i3.get(J)??J)))}function A1(j,$){if(!j)return null;try{let J=JSON.parse(j);return O(J,$)?null:J}catch{return null}}function S1(j,$){let J=f(j),X=Number.isFinite(D(J.y,D(J.top,Number.NaN)));return{side:_(J.side,Q7,$.side),y:D(J.y,$.y),top:D(J.top,D(J.y,$.top)),edge:_(J.edge,O1,X?"none":$.edge),tab:_(J.tab,O1,X?"none":$.tab),docked:L(J.docked,$.docked)}}function f1(j,$){let J=S1(A1($,d3),W.panel),X=f(A1(j,u3)),Z=f(X.locale),Q=f(X.geo),B=f(X.clock),G=f(X.network),V=f(X.ua),K=f(X.panel),Y=w(X.device,W.device),H=z1(Y),C=s(X.zoom,"fit",W.zoom);return{scheme:_(X.scheme,l3,W.scheme),motion:_(X.motion,n3,W.motion),speed:x1(X.speed,W.speed),contrast:_(X.contrast,s3,W.contrast),transparency:_(X.transparency,o3,W.transparency),locale:{lang:w(Z.lang,W.locale.lang),dir:_(Z.dir,a3,W.locale.dir)},pseudo:L(X.pseudo,W.pseudo),geo:{preset:w(Q.preset,W.geo.preset),lat:D(Q.lat,W.geo.lat),lng:D(Q.lng,W.geo.lng),accuracy:D(Q.accuracy,W.geo.accuracy),timeZone:w(Q.timeZone,W.geo.timeZone),error:_(Q.error,r3,W.geo.error),route:w(Q.route,W.geo.route),speed:D(Q.speed,W.geo.speed)},timeZone:w(X.timeZone,"")||W.timeZone,clock:{mode:_(B.mode,t3,W.clock.mode),at:D(B.at,W.clock.at),since:D(B.since,W.clock.since),speed:x1(B.speed,W.clock.speed),header:L(B.header,W.clock.header)},network:{online:_(G.online,e3,W.network.online),type:_(G.type,j7,W.network.type),saveData:_(G.saveData,$7,W.network.saveData)},text:s(X.text,"system",W.text),spacing:L(X.spacing,W.spacing),width:s(X.width,"full",W.width),height:s(X.height,"full",W.height),device:H?.device??(x0(Y)?Y:W.device),orientation:_(X.orientation,Z7,W.orientation),posture:H?.posture??_(X.posture,[...P0],W.posture),mock:L(X.mock,W.mock),touchPointer:L(X.touchPointer,W.touchPointer),browser:_(X.browser,X7,W.browser),bars:X.browserMin===!0?"minimized":_(X.bars,J7,W.bars),edgeToEdge:L(X.edgeToEdge,W.edgeToEdge),frame:L(X.frame,W.frame),dpr:s(X.dpr,"system",W.dpr),zoom:C==="fit"?C:q1(C),mat:R1(X.mat,V7,"blue"),vision:_(X.vision,G7,W.vision),ua:{preset:w(V.preset,W.ua.preset),custom:w(V.custom,W.ua.custom)},overflow:L(X.overflow,W.overflow),outlines:L(X.outlines,W.outlines),grabColor:R1(X.grabColor,K7,"auto"),panel:{open:L(K.open,W.panel.open),...S1(K,J),handle:L(K.handle,W.panel.handle),devIcon:_(K.devIcon,B7,W.panel.devIcon),realPhone:L(K.realPhone,W.panel.realPhone),pinned:X.panel===void 0?[...w1]:W7(K.pinned)}}}function T1(j,$){try{return T(j)?.getItem($)??null}catch{return null}}function E1(){let j=f1(T1("session",p3),T1("local",c3));return{...j,panel:{...j.panel,realPhone:W.panel.realPhone}}}var Y7="data-devknobs-frame",T0="devknobs-frame";function R(){try{if(window.frameElement?.hasAttribute(Y7))return!0}catch{}return window.name===T0}function b1(j){if(j==="system")return!1;try{return window.frameElement?.style.getPropertyValue("color-scheme")===j}catch{return!1}}var P7={width:"full",height:"full",frame:!1,dpr:"system",vision:"none"},S2={...P7,device:"none",panel:{docked:!1}};function w0(j){return typeof j==="number"&&j>0}function k1(j){return w0(j.width)||w0(j.height)||j.frame||w0(j.dpr)||j.vision!=="none"}function m1(j){return k1(j)||j.panel?.docked===!0}function g1(j){return j.panel?.docked===!0&&!k1(j)}var v1=["text","media"],H0=new Map,o=null,d=null;function h1(j,$,J){for(let X=j;X<v1.length;X++){let Z=H0.get(v1[X]);if(Z)return Z($,(Q)=>h1(X+1,Q,J))}return J.call(window,$)}function y1(j){return(o??window.matchMedia).call(window,j)}function f0(j,$){if(H0.set(j,$),d)return;let J=window.matchMedia,X=function(Q){let B=String(Q);return d===X?h1(0,B,J):J.call(window,B)};o=J,d=X,window.matchMedia=X}function E0(j){if(H0.delete(j),H0.size>0||!d)return;if(window.matchMedia===d&&o)window.matchMedia=o;d=null,o=null}var p1=Symbol.for("devknobs.inline");function C7(j){let $=Reflect.get(j,p1);return typeof $==="object"&&$!==null?$:null}function b0(j,$,J){let X=C7(j);if(J===null||J===""){if(X)Reflect.deleteProperty(X,$);return}if(X)Reflect.set(X,$,J);else Reflect.set(j,p1,{[$]:J})}var H7=new WeakMap;function u1(j){let $=H7.get(j);return $&&j.media.mediaText===$.written?$.original:void 0}var l1={scheme:"system",motion:"system",contrast:"system",transparency:"system",touch:!1},z7="(min-width: 0px)",M7="all",I7="not all",v0={scheme:"prefers-color-scheme",motion:"prefers-reduced-motion",contrast:"prefers-contrast",transparency:"prefers-reduced-transparency"},n1=Object.keys(v0),s1=[["pointer","coarse"],["any-pointer","coarse"],["hover","none"],["any-hover","none"]],U7=[...n1.map((j)=>v0[j]),...s1.map(([j])=>j)];function o1(j){return[...n1.map(($)=>[v0[$],j[$]]),...s1.map(([$,J])=>[$,j.touch?J:"system"])]}function _7(j){return new RegExp(`\\(\\s*${j}\\s*(?::\\s*([a-z-]+)\\s*)?\\)`,"gi")}function F7(j,$){if(j===void 0||j==="")return $!=="no-preference"&&$!=="none";return j.toLowerCase()===$}function L7(j){let $=[],J=0,X=0;for(let Z=0;Z<j.length;Z++){let Q=j[Z];if(Q==="(")J++;else if(Q===")")J--;else if(Q===","&&J===0)$.push(j.slice(X,Z)),X=Z+1}return $.push(j.slice(X)),$.map((Z)=>Z.trim()).filter((Z)=>Z.length>0)}function N7(j,$,J,X){if(!$)return j;let Z=/^not\s/i.test(j);if(Z?J:!J)return I7;return Z?M7:X}function q7(j,$,J){let X=!1,Z=!0,Q=j.replace(_7($),(B,G)=>{if(X=!0,!F7(G,J))Z=!1;return z7});return N7(j,X,Z,Q)}function D7(j,$,J){if(J==="system")return j;if(!j.toLowerCase().includes($))return j;let X=L7(j);if(X.length===0)return j;return X.map((Z)=>q7(Z,$,J)).join(", ")}function a1(j,$){let J=j;for(let[X,Z]of o1($))J=D7(J,X,Z);return J}function h0(j){let $=j.toLowerCase();return U7.some((J)=>$.includes(J))}var M0=Symbol.for("devknobs.early"),c1=new WeakMap,x=new Set,v=new WeakMap,e=new WeakMap,I0=new WeakSet,r1=256,d1=r1,E=l1,z0=null,U0=null,r=null,y0=null,_0=!1,k0=!1,g0=null,t=null,i=0,a=null;function t1(j,$,J){for(let X=0;X<j.length;X++){let Z=j[X];if(!Z)continue;let Q=Z.styleSheet;if(Q)e1(Q,$,J);let B=Z.media;if(B&&typeof B.mediaText==="string")$(Z);let G=Z.cssRules;if(G&&G!==j)t1(G,$,J)}}function e1(j,$,J){if(J.has(j))return;J.add(j);let X=null;try{X=j.cssRules}catch{return}if(X)t1(X,$,J)}function p0(){let j=new Set,$=[...Array.from(document.styleSheets),...document.adoptedStyleSheets??[]];for(let J of $)e1(J,(X)=>{let Z=X.media.mediaText,Q=c1.get(X);if(Q===void 0){if(Q=u1(X)??Z,!h0(Q))return;c1.set(X,Q)}let B=a1(Q,E);if(B===Z)return;try{X.media.mediaText=B}catch{}},j)}function i1(){if(i)return;i=requestAnimationFrame(()=>{i=0,p0()})}function O7(){if(t||typeof MutationObserver>"u")return;t=new MutationObserver((j)=>{for(let $ of j)for(let J of Array.from($.addedNodes)){let X=J.nodeName;if(X!=="STYLE"&&X!=="LINK")continue;if(J.hasAttribute?.("data-devknobs"))continue;if(X==="LINK")J.addEventListener("load",i1,{once:!0});i1()}}),t.observe(document.documentElement,{childList:!0,subtree:!0})}function jj(){return o1(E).some(([,j])=>j!=="system")}function R7(j){try{let $=y1(a1(j,E));return U0?U0.call($):$.matches}catch{return!1}}function $j(){for(let j of Array.from(x)){let $=j.deref();if(!$){x.delete(j);continue}let J=$.matches;if(J===v.get($))continue;v.set($,J),$.dispatchEvent(new MediaQueryListEvent("change",{media:$.media,matches:J}))}}function Jj(j){if(g0){g0(j);return}if(!j.isTrusted)return;let $=j.currentTarget;if(!jj()){v.set($,j.matches);return}if(j.stopImmediatePropagation(),k0)return;k0=!0,queueMicrotask(()=>{k0=!1,$j()})}function m0(j){if(I0.has(j)||!e.has(j))return;I0.add(j),v.set(j,j.matches),(y0??j.addEventListener).call(j,"change",Jj)}function x7(j,$){if(e.set(j,$),v.set(j,j.matches),x.add(new WeakRef(j)),x.size<d1)return;for(let J of x)if(!J.deref())x.delete(J);d1=Math.max(r1,x.size*2)}var A7=["addEventListener","addListener","onchange"];function S7(){let j=MediaQueryList.prototype;r=new Map(A7.map((Q)=>[Q,Object.getOwnPropertyDescriptor(j,Q)]));let $=j.addEventListener;y0=$,Object.defineProperty(j,"addEventListener",{configurable:!0,writable:!0,value:function(...B){if(B[1]&&String(B[0])==="change")m0(this);$.apply(this,B)}});let J=j.addListener;if(typeof J==="function")Object.defineProperty(j,"addListener",{configurable:!0,writable:!0,value:function(...B){if(B[0])m0(this);J.apply(this,B)}});let X=r.get("onchange"),Z=X?.set;if(X&&Z)Object.defineProperty(j,"onchange",{...X,set(Q){if(Q!==null&&Q!==void 0)m0(this);Z.call(this,Q)}})}function T7(){if(!r)return;let j=MediaQueryList.prototype;for(let[$,J]of r)if(J)Object.defineProperty(j,$,J);else Reflect.deleteProperty(j,$);r=null,y0=null}function w7(j,$){let J=$(j);if(h0(j))x7(J,j);return J}function f7(){if(_0)return;let j=window,$=j[M0];j[M0]=null;let J=$?.release(Jj)??[];_0=!0;for(let{list:Q,query:B,heard:G,guarded:V}of J)if(e.set(Q,B),v.set(Q,G),x.add(new WeakRef(Q)),V!==!1)I0.add(Q);f0("media",w7),S7();let X=Object.getOwnPropertyDescriptor(MediaQueryList.prototype,"matches"),Z=X?.get;if(!X||!Z)return;z0=X,U0=Z,Object.defineProperty(MediaQueryList.prototype,"matches",{configurable:!0,enumerable:X.enumerable,get(){if(!jj())return Z.call(this);let Q=e.get(this)??this.media;return h0(Q)?R7(Q):Z.call(this)}})}function Xj(){let j=document.documentElement;if(a===null)a=j.style.getPropertyValue("color-scheme");let $=E.scheme==="system"?a:E.scheme;if($)j.style.setProperty("color-scheme",$);else j.style.removeProperty("color-scheme");let J=E.scheme!=="system"&&$!==a;b0(j,"color-scheme",J?j.style.getPropertyValue("color-scheme"):null)}function E7(j){E=j,f7(),O7(),Xj(),p0(),$j()}function b7(){if(t?.disconnect(),t=null,i)cancelAnimationFrame(i),i=0;if(_0){if(E0("media"),T7(),z0)Object.defineProperty(MediaQueryList.prototype,"matches",z0);z0=null,U0=null,_0=!1}a=null}function k7(j){let $=[];for(let J of x){let X=J.deref();if(!X)continue;$.push({list:X,query:e.get(X)??X.media,heard:v.get(X)??X.matches,guarded:I0.has(X)})}return g0=j,x.clear(),E=l1,Xj(),p0(),b7(),$}function Zj(j){let $=window;if(M0 in $)return;E7(j),$[M0]={release:k7}}var Qj={blue:{srgb:["rgb(20, 70, 152)","rgb(12, 48, 114)","rgb(7, 31, 80)"],p3:["color(display-p3 0.1 0.27 0.61)","color(display-p3 0.06 0.19 0.46)","color(display-p3 0.035 0.12 0.32)"],line:"rgb(170, 205, 255)"},green:{srgb:["rgb(26, 96, 71)","rgb(14, 71, 51)","rgb(8, 49, 35)"],p3:["color(display-p3 0.159 0.377 0.279)","color(display-p3 0.102 0.277 0.2)","color(display-p3 0.065 0.194 0.136)"],line:"rgb(160, 218, 191)"},magenta:{srgb:["rgb(123, 37, 88)","rgb(90, 22, 63)","rgb(62, 12, 42)"],p3:["color(display-p3 0.462 0.14 0.342)","color(display-p3 0.34 0.081 0.246)","color(display-p3 0.234 0.043 0.165)"],line:"rgb(238, 185, 211)"},purple:{srgb:["rgb(86, 56, 130)","rgb(62, 38, 96)","rgb(42, 24, 67)"],p3:["color(display-p3 0.326 0.209 0.521)","color(display-p3 0.233 0.138 0.387)","color(display-p3 0.156 0.086 0.269)"],line:"rgb(209, 193, 242)"},red:{srgb:["rgb(132, 36, 36)","rgb(97, 21, 22)","rgb(68, 11, 12)"],p3:["color(display-p3 0.499 0.139 0.133)","color(display-p3 0.369 0.079 0.078)","color(display-p3 0.256 0.041 0.042)"],line:"rgb(239, 188, 183)"},graphite:{srgb:["rgb(64, 68, 74)","rgb(43, 46, 51)","rgb(26, 28, 32)"],p3:["color(display-p3 0.25 0.264 0.291)","color(display-p3 0.169 0.179 0.2)","color(display-p3 0.102 0.11 0.126)"],line:"rgb(198, 203, 211)"}},m7=["blue","green","magenta","purple","red","graphite"];function d0(j){return`radial-gradient(140% 100% at 50% 0%, ${j[0]}, ${j[1]} 60%, ${j[2]})`}function g7(j){return m7.some(($)=>$===j)}var u0=[1,0.82,0.64];function c0(j){return`rgb(${Math.round(j.red)}, ${Math.round(j.green)}, ${Math.round(j.blue)})`}function v7(j){let $=(J)=>({red:j.red*J,green:j.green*J,blue:j.blue*J,alpha:1});return[$(u0[0]),$(u0[1]),$(u0[2])]}function h7(j){return C0(j)?I1(j):null}function Bj(j){if(g7(j))return Qj[j];let $=h7(j);if(!$)return Qj.blue;let[J,X,Z]=v7($),Q=[c0(J),c0(X),c0(Z)];return{srgb:Q,p3:Q}}var y7=Symbol.for("devknobs.own"),Kj=Symbol.for("devknobs.name"),Gj=Symbol.for("devknobs.text"),Vj=new WeakMap;function i0(j){return j.nodeType===9}function p7(j){return i0(j)?j:j.ownerDocument??document}function Wj(j){let J=(i0(j)?j:j.ownerDocument)?.defaultView?.CSSStyleSheet;if(typeof J!=="function"||typeof J.prototype.replaceSync!=="function")return null;return"adoptedStyleSheets"in j?J:null}function Yj(j,$){let J=Vj.get($);if(J)return J;let X={get textContent(){let Z=Reflect.get($,Gj);return typeof Z==="string"?Z:""},set textContent(Z){Reflect.set($,Gj,Z??""),$.replaceSync(Z??"")},sheet:$,remove(){j.adoptedStyleSheets=j.adoptedStyleSheets.filter((Z)=>Z!==$)}};return Vj.set($,X),X}function Pj(j,$,J){let X=new $;if(Reflect.set(X,y7,!0),J!==void 0)Reflect.set(X,Kj,J);return j.adoptedStyleSheets=[...j.adoptedStyleSheets,X],Yj(j,X)}function Cj(j,$){let J=Wj(j);if(J){let Z=Pj(j,J);return Z.textContent=$,Z}let X=p7(j).createElement("style");if(X.textContent=$,i0(j))(j.head??j.documentElement).appendChild(X);else j.append(X);return X}function F0(j,$=document){let J="adoptedStyleSheets"in $?$.adoptedStyleSheets.find((X)=>Reflect.get(X,Kj)===j):void 0;return J?Yj($,J):$.querySelector(`style[data-devknobs="${j}"]`)}function Hj(j,$=document){let J=F0(j,$);if(J)return J;let X=Wj($);if(X)return Pj($,X,j);let Z=$.createElement("style");return Z.setAttribute("data-devknobs",j),($.head??$.documentElement).appendChild(Z),Z}function zj(j,$=document){F0(j,$)?.remove()}var Ij=2147483645,j0="early",u7="devknobs:snapshot",c7=1,d7=3000;function i7(j){if(!j)return`html{overflow:hidden!important}
|
|
2
2
|
body>:not([data-devknobs]){content-visibility:hidden!important}`;let J=Bj(j);return`html{overflow:hidden!important}
|
|
3
3
|
body>:not([data-devknobs]){content-visibility:hidden!important}
|
|
4
4
|
html::after{content:"";position:fixed;inset:0;z-index:${Ij-1};background:${d0(J.srgb)};pointer-events:none}
|
|
5
|
-
@media (color-gamut:p3){html::after{background:${d0(J.p3)}}}`}function l7(j,$){return JSON.stringify([j.width,j.height,j.frame,j.dpr,j.vision,j.scheme,j.device,j.orientation,j.posture,j.mock,j.browser,j.bars,j.edgeToEdge,j.zoom,j.mat,j.panel.open,j.panel.side,j.panel.docked,$.innerWidth,$.innerHeight,$.devicePixelRatio])}var Mj=/^rgb\(\d{1,3}, \d{1,3}, \d{1,3}\)$/;function n7(j){if(typeof j!=="object"||j===null)return null;let $=(P)=>Reflect.get(j,P),J=$("background"),X=$("scheme"),Z=$("host"),Q=[$("dark"),$("canBack"),$("canForward")];if(typeof J!=="string"||!Mj.test(J))return null;if(X!=="light"&&X!=="dark"||typeof Z!=="string")return null;let[B,G,V]=Q;if(typeof B!=="boolean"||typeof G!=="boolean")return null;if(typeof V!=="boolean")return null;let K=(P)=>{let z=$(P);return typeof z==="string"&&Mj.test(z)?z:J},Y=K("top"),H=K("bottom"),C=$("header");if(typeof C!=="boolean")return null;return{background:J,top:Y,bottom:H,header:C,footer:$("footer")===!0,under:[],dark:B,scheme:X,host:Z,canBack:G,canForward:V}}function s7(j,$){try{let J=T("session")?.getItem(u7);if(!J)return null;let X=JSON.parse(J);if(typeof X!=="object"||X===null||O(X,c7))return null;let Z=Reflect.get(X,"key"),Q=Reflect.get(X,"css"),B=Reflect.get(X,"html"),G=n7(Reflect.get(X,"look"));if(Z!==l7(j,$)||typeof Q!=="string")return null;if(typeof B!=="string"||!G)return null;return{key:Z,css:Q,html:B,look:G}}catch{return null}}function o7(){for(let j of Array.from(document.querySelectorAll(`[data-devknobs="${j0}"]`)))j.remove();zj(j0)}function Uj(j){if(!m1(j)||!document.head)return;let $=Hj(j0);$.textContent=i7(g1(j)?null:j.mat),window.setTimeout(o7,d7);let J=s7(j,window);if(!J)return;let X=document.createElement("div");X.setAttribute("data-devknobs",j0),X.style.cssText=`position:fixed;inset:0;z-index:${Ij}`;let Z=X.attachShadow({mode:"open"});Z.innerHTML=J.html;for(let G of Array.from(Z.querySelectorAll("[style]")))G.style.cssText=G.getAttribute("style")??"";Cj(Z,J.css);let Q=()=>{if(F0(j0)!==$)return!0;if(!document.body)return!1;return document.body.append(X),!0};if(Q())return;let B=new MutationObserver(()=>{if(Q())B.disconnect()});B.observe(document.documentElement,{childList:!0})}var l0="devknobs:scroll",Lj=1,a7=1e4,r7=2000,t7=1e4,e7=20,_j=["wheel","touchstart","keydown","mousedown"];function Fj(j){if(typeof j!=="object"||j===null)return;let $=Reflect.get(j,"path"),J=Reflect.get(j,"x"),X=Reflect.get(j,"y");if(typeof $!=="string"||typeof J!=="number"||typeof X!=="number")return;return Number.isFinite(J)&&Number.isFinite(X)?{path:$,x:J,y:X}:void 0}function j$(j){if(!j)return null;let $;try{$=JSON.parse(j)}catch{return null}if(typeof $!=="object"||$===null||O($,Lj))return null;let J=Reflect.get($,"at");if(typeof J!=="number")return null;let X={at:J},Z=Fj(Reflect.get($,"page")),Q=Fj(Reflect.get($,"frame"));if(Z)X.page=Z;if(Q)X.frame=Q;return X}function $$(j,$){let J=$-j;return!(J>=0&&J<a7)}function J$(j,$,J,X){if(!j||$$(j.at,X))return{place:null,rest:null};let Z=j[$],Q=$==="page"?"frame":"page",B=j[Q],G=B?{at:j.at,[Q]:B}:null;if(!Z||Z.path!==J)return{place:null,rest:G};return{place:{x:Z.x,y:Z.y},rest:G}}function X$(j,$){let{target:J}=j,X=Math.abs($.x-J.x)<=1&&Math.abs($.y-J.y)<=1,Z=j.puts>=e7;if($.now-j.start>=t7||j.loadedAt!==null&&$.now-j.loadedAt>=r7)return X||Z?"done":"last";if(Z)return"done";if(X)return"wait";return $.maxX>=J.x-1&&$.maxY>=J.y-1?"put":"wait"}function Z$(j,$,J=D){let X={target:$,start:J(),loadedAt:null,puts:0},Z=!1,Q=()=>{Z=!0;for(let G of _j)j.removeEventListener(G,Q,!0)},B=()=>{if(Z)return;let G=J();if(X.loadedAt===null&&j.document.readyState==="complete")X.loadedAt=G;let V=j.document.documentElement,K=X$(X,{x:j.scrollX,y:j.scrollY,maxX:V?V.scrollWidth-V.clientWidth:0,maxY:V?V.scrollHeight-V.clientHeight:0,now:G});if(K==="put"||K==="last")X.puts++,j.scrollTo({left:$.x,top:$.y,behavior:"instant"});if(K==="last"||K==="done")Q();else j.requestAnimationFrame(B)};for(let G of _j)j.addEventListener(G,Q,!0);B()}function Nj(){if(typeof window>"u")return;let j=null;try{let $=T("session"),J=$?.getItem(l0)??null;if(!$||J===null)return;let X=R()?"frame":"page",{place:Z,rest:Q}=J$(j$(J),X,window.location.pathname,D());if(Q)$.setItem(l0,JSON.stringify(n(Q,Lj)));else $.removeItem(l0);j=Z}catch{return}if(j)Z$(window,j)}var Q$={brand:"Not/A)Brand",version:"24.0.0.0"};function Aj(j){return j.split(".")[0]??j}function L0(j,$=!1){let J=`Chrome/${Aj("154.0.8037.98")}.0.0.0 ${$?"Mobile ":""}Safari/537.36`;return`Mozilla/5.0 (${j}) AppleWebKit/537.36 (KHTML, like Gecko) ${J}`}function $0(j,$){let J=[{brand:"Chromium",version:"154.0.8037.98"},Q$,...j?[j]:[]];return{brands:J.map(({brand:X,version:Z})=>({brand:X,version:Aj(Z)})),hints:{...$,fullVersionList:J,uaFullVersion:j?.version??"154.0.8037.98"}}}var n0={brand:"Google Chrome",version:"154.0.8037.98"},Sj={model:"",bitness:"64"},Dj={...Sj,platformVersion:"19.0.0",architecture:"x86"},qj="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Safari/605.1.15",B$=[{id:"iphone-safari",label:"iPhone Safari",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Mobile/15E148 Safari/604.1",platform:"iPhone",vendor:"Apple Computer, Inc.",mobile:!0,brands:[],uaPlatform:"iOS",maxTouchPoints:5},{id:"android-chrome",label:"Android Chrome",userAgent:L0("Linux; Android 10; K",!0),platform:"Linux armv81",vendor:"Google Inc.",mobile:!0,uaPlatform:"Android",maxTouchPoints:5,...$0(n0,{platformVersion:"16.0.0",model:"Pixel 10",architecture:"",bitness:""})},{id:"ipad-safari",label:"iPad Safari",userAgent:qj,platform:"MacIntel",vendor:"Apple Computer, Inc.",mobile:!1,brands:[],uaPlatform:"iOS",maxTouchPoints:5},{id:"mac-safari",label:"Mac Safari",userAgent:qj,platform:"MacIntel",vendor:"Apple Computer, Inc.",mobile:!1,brands:[],uaPlatform:"macOS",maxTouchPoints:0},{id:"mac-chrome",label:"Mac Chrome",userAgent:L0("Macintosh; Intel Mac OS X 10_15_7"),platform:"MacIntel",vendor:"Google Inc.",mobile:!1,uaPlatform:"macOS",maxTouchPoints:0,...$0(n0,{...Sj,platformVersion:"26.7.1",architecture:"arm"})},{id:"windows-chrome",label:"Windows Chrome",userAgent:L0("Windows NT 10.0; Win64; x64"),platform:"Win32",vendor:"Google Inc.",mobile:!1,uaPlatform:"Windows",maxTouchPoints:0,...$0(n0,Dj)},{id:"windows-edge",label:"Windows Edge",userAgent:`${L0("Windows NT 10.0; Win64; x64")} Edg/154.0.4258.53`,platform:"Win32",vendor:"Google Inc.",mobile:!1,uaPlatform:"Windows",maxTouchPoints:0,...$0({brand:"Microsoft Edge",version:"154.0.4258.53"},Dj)},{id:"linux-firefox",label:"Linux Firefox",userAgent:"Mozilla/5.0 (X11; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0",platform:"Linux x86_64",vendor:"",mobile:!1,brands:[],uaPlatform:"Linux",maxTouchPoints:0,appVersion:"5.0 (X11)"},{id:"googlebot",label:"Googlebot",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.8037.98 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",platform:"Linux armv81",vendor:"Google Inc.",mobile:!0,uaPlatform:"Android",maxTouchPoints:1,...$0(null,{platformVersion:"6.0.1",model:"Nexus 5X",architecture:"",bitness:""})}];function Tj(j){return B$.find(($)=>$.id===j)}function G$(j){if(j.preset==="custom")return j.custom.trim();return Tj(j.preset)?.userAgent??""}function V$(j){return j.replace(/^Mozilla\//,"")}var fj=["userAgent","appVersion","platform","vendor","maxTouchPoints","userAgentData"],Oj=Symbol.for("devknobs.ua");function K$(j){return typeof j==="object"&&j!==null&&"originals"in j}function wj(j){let $=Reflect.get(j,Oj);if(K$($))return $;let J={originals:null};return Reflect.set(j,Oj,J),J}function Ej(j){let $=Reflect.get(j,"Navigator");return typeof $==="function"?$.prototype:null}function h(j,$,J){Object.defineProperty(j,$,{configurable:!0,enumerable:!0,get:()=>J})}function s0(j,$,J){let X=j.originals?.get(J);if(X)Object.defineProperty($,J,X);else Reflect.deleteProperty($,J)}function Rj(j){return j.map(({brand:$,version:J})=>({brand:$,version:J}))}var W$={brands:[],mobile:!1,uaPlatform:""};function xj(j,$){let J=Object.freeze(j.brands.map((V)=>Object.freeze({...V}))),X=()=>({brands:Rj(J),mobile:j.mobile,platform:j.uaPlatform}),Z=j.hints,Q=()=>({architecture:Z?.architecture??"",bitness:Z?.bitness??"",fullVersionList:Rj(Z?.fullVersionList??[]),model:Z?.model??"",platformVersion:Z?.platformVersion??"",uaFullVersion:Z?.uaFullVersion??""}),B=Reflect.get($,"NavigatorUAData"),G=typeof B==="function"?B.prototype:Object.prototype;return Object.create(G,{brands:{enumerable:!0,get:()=>J},mobile:{enumerable:!0,get:()=>j.mobile},platform:{enumerable:!0,get:()=>j.uaPlatform},getHighEntropyValues:{value:(V)=>{try{let K=X(),Y=Q();for(let H of Array.from(V,String))if(Object.hasOwn(Y,H))K[H]=Y[H];return Promise.resolve(K)}catch(K){return Promise.reject(K)}}},toJSON:{value:X}})}function bj(j,$=globalThis){let J=Ej($),X=j.preset==="custom"?void 0:Tj(j.preset),Z=G$(j);if(!J||Z===""){Y$($);return}let Q=wj($);if(Q.originals??=new Map(fj.map((B)=>[B,Object.getOwnPropertyDescriptor(J,B)])),h(J,"userAgent",Z),h(J,"appVersion",X?.appVersion??V$(Z)),!X){for(let B of["platform","vendor","maxTouchPoints"])s0(Q,J,B);if(Q.originals.get("userAgentData"))h(J,"userAgentData",xj(W$,$));else s0(Q,J,"userAgentData");return}if(h(J,"platform",X.platform),h(J,"vendor",X.vendor),h(J,"maxTouchPoints",X.maxTouchPoints),X.brands.length>0)h(J,"userAgentData",xj(X,$));else Reflect.deleteProperty(J,"userAgentData")}function Y$(j=globalThis){let $=wj(j),J=Ej(j);if(!$.originals)return;if(J)for(let X of fj)s0($,J,X);$.originals=null}function j1(){if(Object.hasOwn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"))return;Promise.resolve().then(() => nj())}var F$=Symbol.for("devknobs.owner");function sj(j){return typeof Reflect.get(j,F$)==="function"}function L$(j,$){for(let J of["name","length",...Object.keys($)]){let X=Object.getOwnPropertyDescriptor($,J);if(X)Object.defineProperty(j,J,X)}Object.defineProperty(j,"toString",{configurable:!0,writable:!0,value:()=>Function.prototype.toString.call($)})}function A(j,$,J,X){let Z=Reflect.get($,J);if(typeof Z!=="function")return;let Q=Object.hasOwn($,J),B=X(Z);if(L$(B,Z),Reflect.set($,J,B))j.push({target:$,key:J,original:Z,value:B,own:Q})}function oj(j){for(let{target:$,key:J,original:X,value:Z,own:Q}of j.reverse()){if(Reflect.get($,J)!==Z)continue;if(Q)Reflect.set($,J,X);else Reflect.deleteProperty($,J)}j.length=0}var $1=300,y=65536,J1=200,aj=4096;var N$=/^text\/|[/+](json|xml|javascript|ecmascript|x-www-form-urlencoded|graphql|yaml)\b|\/svg/i;function X1(j){return N$.test(j)}var X0=/�+$/;function b(j,$,J=y){if(j.length<=J){let Q=new TextEncoder().encode(j);if(Q.length<=J)return{kind:"text",text:j,size:Q.length,truncated:!1,type:$};return{kind:"text",text:new TextDecoder().decode(Q.subarray(0,J)).replace(X0,""),size:Q.length,truncated:!0,type:$}}let X=new TextEncoder().encode(j.slice(0,J)),Z=new TextDecoder().decode(X.subarray(0,J));return{kind:"text",text:X.length>J?Z.replace(X0,""):Z,size:null,truncated:!0,type:$}}function J0(j,$,J){return{kind:j,text:"",size:$,truncated:!1,type:J}}function D$(j,$){let J=[],X=0;for(let[Z,Q]of j){let B=typeof Q==="string"?`${Z}=${Q}`:`${Z}=(file ${Q.name}, ${Q.type||"no type"}, ${Q.size} bytes)`;if(J.push(B),X+=B.length+1,X>$)break}return J.join(`
|
|
6
|
-
`)}function p(j,$){return typeof j==="function"&&$ instanceof j}function
|
|
7
|
-
`).map((X)=>X.trim()).filter((X)=>X!=="");if(J[0]!==void 0&&!
|
|
8
|
-
`)}var O$=new Set(["open","error"]);function ej(j,$){let J=Reflect.get(globalThis,"EventSource");if(typeof J!=="function")return;let X=new WeakMap,Z=EventTarget.prototype.addEventListener;function Q(G,V){let K=k(G.url),Y=()=>$.start("eventsource",{method:"GET",url:K,headers:[],body:null,initiator:V}),H=(P,z)=>{Z.call(G,P,(M)=>{try{z(M)}catch{}})},C={id:Y(),open:!1,types:new Set,listen(P){if(C.types.has(P)||O$.has(P))return;C.types.add(P),H(P,(z)=>{if(C.id===null)return;let M=Reflect.get(z,"data"),N=Reflect.get(z,"lastEventId");$.message(C.id,{type:z.type,data:String(M??""),id:typeof N==="string"?N:""})})}};X.set(G,C),C.listen("message"),H("open",()=>{if(C.id===null){if(!$.active())return;C.id=Y()}C.open=!0,$.responded(C.id,{status:200,state:"ok",contentType:"text/event-stream"})}),H("error",()=>{if(C.id===null)return;$.ended(C.id,C.open?{}:{state:"failed",error:"EventSource failed to connect"}),C.id=null,C.open=!1})}A(j,globalThis,"EventSource",(G)=>{function V(...K){if(!new.target)return Reflect.apply(G,this,K);let Y=Reflect.construct(G,K,new.target);try{if($.active())Q(Y,l(Error().stack,1))}catch{}return Y}return V.prototype=G.prototype,V});let B=Reflect.get(J,"prototype");if(typeof B!=="object"||B===null)return;A(j,B,"addEventListener",()=>function(...G){try{if(typeof G[0]==="string")X.get(this)?.listen(G[0])}catch{}return Reflect.apply(Reflect.get(Object.getPrototypeOf(B),"addEventListener"),this,G)}),A(j,B,"close",(G)=>function(...V){try{let K=X.get(this);if(K&&K.id!==null)$.ended(K.id,K.open?{}:{state:"aborted"}),K.id=null}catch{}return G.apply(this,V)})}var j3=2,Z0=Symbol.for("devknobs.requests"),$3=Symbol.for("devknobs.quiet");function R$(j){return typeof j==="object"&&j!==null&&Reflect.get(j,"version")===2}function q0(j=globalThis){try{let $=Reflect.get(j,Z0);return R$($)?$:null}catch{return null}}function B1(j){if(j)Reflect.set(globalThis,Z0,j);else Reflect.deleteProperty(globalThis,Z0)}function J3(){let j=Reflect.get(globalThis,Z0);if(typeof j!=="object"||j===null)return;let $=Reflect.get(j,"uninstall");try{if(typeof $==="function")$.call(j)}catch{}Reflect.deleteProperty(globalThis,Z0)}function x$(j){return typeof j==="object"&&j!==null&&"url"in j&&"method"in j&&"headers"in j&&"clone"in j}function Q0(j,$){return typeof j==="object"&&j!==null?Reflect.get(j,$):void 0}function A$(j){try{return typeof j==="object"&&j!==null&&Reflect.get(j,$3)===!0}catch{return!1}}function X3(j){let $=[];if(typeof j!=="object"||j===null)return $;if(p(globalThis.Headers,j))j.forEach((J,X)=>$.push([X,J]));else if(Array.isArray(j)){for(let J of j)if(Array.isArray(J)&&J.length>1)$.push([String(J[0]),String(J[1])])}else for(let[J,X]of Object.entries(j))$.push([J,String(X)]);return $}function Z3(j){return j instanceof Error?`${j.name}: ${j.message}`:String(j)}function Q3(j){return typeof j==="object"&&j!==null&&Reflect.get(j,"aborted")===!0}function S$(j,$,J){if($==="GET"||$==="HEAD")return null;if(j.body===null||j.bodyUsed)return null;return u(X1(J)?"stream":"binary",null,J)}function T$(j,$){let J=x$(j)?j:null,X=String(Q0($,"method")??J?.method??"GET").toUpperCase(),Z=Q0($,"headers"),Q=X3(Z===void 0?J?.headers:Z),B=m(Q,"content-type"),G=Q0($,"body"),V=J&&(G===void 0||G===null)?S$(J,X,B):null,K=D0(G,B)??V,Y=String(Q0($,"referrerPolicy")??J?.referrerPolicy??"");return{request:{method:X,url:k(J?J.url:String(j)),headers:Q,body:K,referrerPolicy:Y},signal:Q0($,"signal")??J?.signal}}function f$(j){let $=Number.parseInt(m(j,"content-length"),10);return Number.isFinite($)?$:null}function w$(j){return/^text\/event-stream\b/i.test(j.trim())}function E$(j,$,J,X,Z){let Q=X3(J.headers),B=m(Q,"content-type"),G=J.type==="opaque"||J.type==="opaqueredirect";if(j.responded($,{status:J.status,statusText:J.statusText,state:J.ok||G?"ok":"failed",responseHeaders:Q,contentType:B,redirected:J.redirected,finalUrl:J.url||null}),G)j.set($,{responseBody:u("opaque",null,"")});else if(J.body===null)j.ended($,{});else if(w$(B))j.set($,{responseBody:u("stream",null,B)});else if(!X1(B))j.set($,{responseBody:u("binary",f$(Q),B)});else rj(J.clone(),B,void 0,Z).then(({record:V,complete:K})=>{let Y=V.size===0?null:V;if(K)j.ended($,{responseBody:Y});else j.set($,{responseBody:Y})},(V)=>{j.ended($,{state:Q3(X)?"aborted":"failed",error:Z3(V)})})}function B3(j,$,J=Z1){return function(){let Z=arguments;if(!$.active()||A$(Z[1]))return Reflect.apply(j,this,Z);let Q=null,B;try{let K=T$(Z[0],Z[1]);B=K.signal,Q=$.start("fetch",{...K.request,initiator:l(Error().stack,1)})}catch{}let G=Reflect.apply(j,this,Z);if(Q===null)return G;let V=Q;return G.then((K)=>{try{E$($,V,K,B,J)}catch{}return K},(K)=>{try{$.ended(V,{state:Q3(B)?"aborted":"failed",error:Z3(K)})}catch{}throw K})}}var G1=250,B0=5;function F(j,$){let J=Reflect.get(j,$);return typeof J==="number"&&Number.isFinite(J)?J:0}function c(j,$){let J=Reflect.get(j,$);return typeof J==="string"?J:""}function G3(j){return j.split("#",1)[0]??j}function b$(j){try{return new URL(j).origin}catch{return""}}function V3(j,$){let J=F(j,"transferSize"),X=F(j,"encodedBodySize"),Z=F(j,"decodedBodySize"),Q=J+X+Z===0&&b$(j.name)!==$;return{transfer:J,encoded:X,decoded:Z,hidden:Q}}function K3(j){return{startTime:j.startTime,workerStart:F(j,"workerStart"),redirectStart:F(j,"redirectStart"),redirectEnd:F(j,"redirectEnd"),fetchStart:F(j,"fetchStart"),domainLookupStart:F(j,"domainLookupStart"),domainLookupEnd:F(j,"domainLookupEnd"),connectStart:F(j,"connectStart"),secureConnectionStart:F(j,"secureConnectionStart"),connectEnd:F(j,"connectEnd"),requestStart:F(j,"requestStart"),responseStart:F(j,"responseStart"),responseEnd:F(j,"responseEnd")||j.startTime+j.duration}}function W3(j){return F(j,"responseStatus")||null}function Y3(j,$,J,X,Z){let Q=Q1($,j.entryType==="navigation"?"navigation":"resource",J,X,j.startTime),B=W3(j),G=F(j,"responseEnd")||j.startTime+j.duration,V=F(j,"responseStart"),K=Math.max(0,G-j.startTime);return{...Q,url:j.name,state:B!==null&&B>=400?"failed":"ok",status:B,contentType:c(j,"contentType"),sizes:V3(j,Z),timing:{...Q.timing,response:V>0?Math.max(0,V-j.startTime):null,end:Q.timing.start+K,duration:K},phases:K3(j),initiatorType:c(j,"initiatorType")||j.entryType,protocol:c(j,"nextHopProtocol")}}var k$={fetch:"fetch",xmlhttprequest:"xhr",other:"eventsource"};function P3(j,$,J){let X=k$[c($,"initiatorType")];if(!X)return null;let Z=G3($.name),Q=F($,"responseEnd")||$.startTime+$.duration,B=null;for(let G of j){if(G.kind!==X||G.source!==J||G.sizes!==null)continue;let V=$.startTime-G.timing.at;if(!(X==="eventsource"&&V<=B0&&G.timing.at<=Q+B0)&&(V<-B0||V>G1)||G3(G.url)!==Z)continue;if(!B||Math.abs(V)<Math.abs($.startTime-B.timing.at))B=G}return B}function C3(j,$,J){let X=F($,"responseEnd")||$.startTime+$.duration,Z=Math.max(0,X-j.timing.at);return{sizes:V3($,J),phases:K3($),protocol:c($,"nextHopProtocol"),initiatorType:c($,"initiatorType"),status:j.status||W3($),contentType:j.contentType||c($,"contentType"),timing:{...j.timing,end:j.timing.start+Z,duration:Z}}}var m$=50;function g$(j){let $=setTimeout(j,m$);return()=>clearTimeout($)}function H3(j){let $=j.schedule??g$,J=[],X=new Map,Z=new Set,Q=new Set,B=null,G=!1,V=Number.NEGATIVE_INFINITY,K=0;function Y(){if(B?.(),B=null,Q.size===0&&!G)return;let P=[];for(let z of Q){let M=X.get(z);if(M)P.push(M)}Q.clear(),G=!1;for(let z of Array.from(Z))z(P)}function H(P){if(Z.size===0)return;if(P===null)G=!0;else Q.add(P);B??=$(Y)}function C(P){if(P.timing.start<V)return;let z=X.get(P.id);if(X.set(P.id,P),z)J[J.lastIndexOf(z)]=P;else{let M=J.length;while(M>0&&(J[M-1]?.timing.start??0)>P.timing.start)M--;if(J.splice(M,0,P),J.length>$1){let N=J.shift();if(N)X.delete(N.id);if(N===P)return}}H(P.id)}return{entries:()=>J,get:(P)=>X.get(P),nextId:()=>`${j.seed}-${++K}`,put:C,update(P,z){let M=X.get(P);if(M)C({...M,...z,id:P})},clear(){J=[],X.clear(),Q.clear(),V=j.now(),H(null)},subscribe(P){return Z.add(P),()=>{Z.delete(P)}},flush:Y,close(){B?.(),B=null,J=[],X.clear(),Q.clear(),Z.clear()}}}var v$=4*y;function h$(j){let $=[];for(let J of j.split(/\r?\n/)){let X=J.indexOf(":");if(X>0)$.push([J.slice(0,X).trim(),J.slice(X+1).trim()])}return $}function z3(j,$){let J=h$(j.getAllResponseHeaders()??""),X=j.responseURL||null;return{status:j.status,statusText:j.statusText,responseHeaders:J,contentType:m(J,"content-type"),finalUrl:X,redirected:X!==null&&X!==$.split("#",1)[0]}}function y$(j){if(typeof j!=="object"||j===null)return null;let $=Reflect.get(j,"byteLength")??Reflect.get(j,"size");return typeof $==="number"?$:null}function p$(j,$,J){let X=j.responseType,Z;if(X===""||X==="text")Z=b(j.responseText,$);else if(X!=="json")Z=u("binary",y$(j.response)??J,$||X);else if(J!==null&&J>v$)Z={kind:"text",text:"",size:J,truncated:!0,type:$};else Z=b(JSON.stringify(j.response)??"",$);return Z.size===0?null:Z}var M3=["error","abort","timeout"];function u$(j,$,J,X){let Z=null,Q=null,B=!1,G=null,V=()=>{j.removeEventListener("readystatechange",Y,!0),j.removeEventListener("progress",H,!0);for(let z of M3)j.removeEventListener(z,C,!0);j.removeEventListener("loadend",P,!0)};function K(){B=!0,V();try{let z=z3(j,J),M=j.status,N=Z??(M===0||M>=400?"failed":"ok"),V0=Number.parseInt(m(z.responseHeaders??[],"content-length"),10),K0=G??(Number.isFinite(V0)?V0:null),O0=Z?null:p$(j,z.contentType??"",K0);X.ended($,{...z,status:M===0?null:M,state:N,error:Q,responseBody:O0})}catch{X.ended($,{state:Z??"failed",error:Q})}}function Y(){try{if(j.readyState===2)X.responded($,z3(j,J))}catch{}if(j.readyState===4&&j.status!==0)K()}function H(z){let M=Reflect.get(z,"loaded");if(typeof M==="number")G=M}function C(z){Z=z.type==="abort"?"aborted":"failed",Q=z.type==="abort"?null:z.type}function P(z){if(j.readyState!==4)return;H(z),K()}j.addEventListener("readystatechange",Y,!0),j.addEventListener("progress",H,!0);for(let z of M3)j.addEventListener(z,C,!0);return j.addEventListener("loadend",P,!0),()=>{if(B)return;B=!0,V(),X.ended($,{state:"aborted"})}}function I3(j,$){if(typeof XMLHttpRequest!=="function")return;let J=new WeakMap,X=XMLHttpRequest.prototype;A(j,X,"open",(Z)=>function(...Q){let B=Z.apply(this,Q);try{if(J.get(this)?.drop?.(),J.delete(this),$.active()){let G=String(Q[0]).toUpperCase();J.set(this,{method:G,url:k(String(Q[1])),headers:[],drop:null})}}catch{}return B}),A(j,X,"setRequestHeader",(Z)=>function(...Q){let B=Z.apply(this,Q);return J.get(this)?.headers.push([String(Q[0]),String(Q[1])]),B}),A(j,X,"send",(Z)=>function(...Q){let B=J.get(this);if(!B||!$.active())return Z.apply(this,Q);let G=null;try{let{method:V,url:K,headers:Y}=B,H=D0(Q[0],m(Y,"content-type")),C=l(Error().stack,1);G=$.start("xhr",{method:V,url:K,headers:[...Y],body:H,initiator:C}),B.drop=u$(this,G,K,$)}catch{}try{return Z.apply(this,Q)}catch(V){if(B.drop?.(),B.drop=null,G!==null)$.set(G,{state:"failed",error:String(V)});throw V}})}var c$=100,G0=typeof performance>"u"?null:performance,U3=G0?G0.now.bind(G0):D;function d$(){let j=G0?G0.timeOrigin??D()-U3():0;return{now:U3,origin:j}}function i$(j){return k(j).split("#",1)[0]??j}function l$(j){return{...j,source:"frame",requestHeaders:j.requestHeaders.map(([$,J])=>[$,J]),responseHeaders:j.responseHeaders.map(([$,J])=>[$,J]),requestBody:j.requestBody&&{...j.requestBody},responseBody:j.responseBody&&{...j.responseBody},sizes:j.sizes&&{...j.sizes},timing:{...j.timing},phases:j.phases&&{...j.phases},messages:j.messages.map(($)=>({...$}))}}function n$(j){let{source:$,clock:J,origin:X}=j,Z=`${$.charAt(0)}${Math.floor(J.origin).toString(36)}${Math.floor(Math.random()*46656).toString(36)}`,Q=H3({seed:Z,now:()=>J.origin+J.now(),schedule:j.schedule}),B=[],G=!0,V=0,K=new Set,Y=[],H=tj(Q,J,$,()=>G&&V===0);function C(U,I){let S=i$(U);if(S.startsWith("data:"))return;if(!I)K.add(S);else Y=[...Y.slice(1-c$),{url:S,at:J.now()}]}function P(U){if(K.has(U.name))return!0;let I=Y.findIndex((S)=>{let W1=U.startTime-S.at;return S.url===U.name&&W1>=-B0&&W1<=G1});if(I<0)return!1;return Y.splice(I,1),!0}function z(U){try{if(P(U))return;let I=P3(Q.entries(),U,$);if(I)Q.update(I.id,C3(I,U,X));else Q.put(Y3(U,Q.nextId(),$,J,X))}catch{}}function M(){if(typeof PerformanceObserver!=="function")return()=>{};let U=new PerformanceObserver((I)=>{if(G)for(let S of I.getEntries())z(S)});for(let I of["navigation","resource"])try{U.observe({type:I,buffered:!0})}catch{}return()=>U.disconnect()}let N=null;function V0(U){let I=j.above?.()??null;if(I)I.adopt(I===N?U:Q.entries());N=I}function K0(U){if(Reflect.get(U,"persisted")===!0)return;for(let I of[...Q.entries()])if(I.state==="pending")Q.update(I.id,{state:"aborted"});Q.flush()}A(B,globalThis,"fetch",(U)=>B3(U,H,j.readFor)),I3(B,H),ej(B,H);let O0=M();if(j.above)Q.subscribe(V0),globalThis.addEventListener?.("pagehide",K0);let K1={version:j3,store:Q,quietly(U,I){C(U,!0),V++;try{return I()}finally{V--}},hush:C,adopt(U){for(let I of U)Q.put(l$(I))},uninstall(){if(G=!1,oj(B),O0(),globalThis.removeEventListener?.("pagehide",K0),Q.close(),q0()===K1)B1(null)}};return K1}function s$(){try{return window.parent===window?null:q0(window.parent)}catch{return null}}function _3(){if(q0())return;J3();let j=typeof window<"u"&&R(),$=typeof location>"u"?"":location.origin;B1(n$({source:j?"frame":"top",clock:d$(),origin:$,above:j?s$:void 0}))}var o$="devknobs:storage-presets",a$=1,F3=Symbol.for("devknobs.presets");function L3(j){return typeof j==="object"&&j!==null&&!Array.isArray(j)?Object.fromEntries(Object.entries(j)):{}}function V1(j){return Array.isArray(j)?j.map(L3):[]}function r$(){try{let j=JSON.parse(T("local")?.getItem(o$)??"null");return O(j,a$)?[]:V1(L3(j).presets)}catch{return[]}}function t$(j){let $=`${String(j.name)}=${String(j.value)}`;if($+=`; path=${typeof j.path==="string"?j.path:"/"}`,typeof j.domain==="string")$+=`; domain=${j.domain}`;if(typeof j.maxAge==="number")$+=`; max-age=${j.maxAge}`;if(typeof j.expires==="string")$+=`; expires=${j.expires}`;if(typeof j.sameSite==="string")$+=`; samesite=${j.sameSite}`;if(j.secure===!0)$+="; secure";return $}function e$(j){let $=[];for(let J=0;J<j.length;J++){let X=j.key(J);if(X!==null&&X!=="devknobs"&&!X.startsWith("devknobs:"))$.push(X)}for(let J of $)j.removeItem(J)}function j2(j,$,J){let X=[];for(let Z of["local","session"])try{let Q=Z==="local"?j.localStorage:j.sessionStorage;if(J)e$(Q);for(let B of V1($[Z]))try{if(typeof B.name==="string"&&typeof B.value==="string")Q.setItem(B.name,B.value)}catch{X.push(String(B.name))}}catch{X.push(`${Z}Storage`)}for(let Z of V1($.cookies))try{if(typeof Z.name==="string"&&typeof Z.value==="string")j.document.cookie=t$(Z)}catch{X.push(String(Z.name))}return X}function N3(){if(typeof window>"u")return 0;let j=Reflect.get(window,F3);if(typeof j==="number")return j;let $=0;try{if(!R())for(let J of r$()){if(J.onLoad!==!0)continue;j2(window,J,J.clearFirst===!0),$++}}catch{}return Reflect.set(window,F3,$),$}N3();if(sj(window))j1();else{let j=E1(),$=R(),J=$&&b1(j.scheme)?"system":j.scheme,{motion:X,contrast:Z,transparency:Q}=j;if(Zj({scheme:J,motion:X,contrast:Z,transparency:Q,touch:$&&M1(j.device)}),H1(j.clock),bj(j.ua),_3(),j1(),!$)Uj(j);Nj()}})();
|
|
5
|
+
@media (color-gamut:p3){html::after{background:${d0(J.p3)}}}`}function l7(j,$){return JSON.stringify([j.width,j.height,j.frame,j.dpr,j.vision,j.scheme,j.device,j.orientation,j.posture,j.mock,j.browser,j.bars,j.edgeToEdge,j.zoom,j.mat,j.panel.open,j.panel.side,j.panel.docked,$.innerWidth,$.innerHeight,$.devicePixelRatio])}var Mj=/^rgb\(\d{1,3}, \d{1,3}, \d{1,3}\)$/;function n7(j){if(typeof j!=="object"||j===null)return null;let $=(P)=>Reflect.get(j,P),J=$("background"),X=$("scheme"),Z=$("host"),Q=[$("dark"),$("canBack"),$("canForward")];if(typeof J!=="string"||!Mj.test(J))return null;if(X!=="light"&&X!=="dark"||typeof Z!=="string")return null;let[B,G,V]=Q;if(typeof B!=="boolean"||typeof G!=="boolean")return null;if(typeof V!=="boolean")return null;let K=(P)=>{let z=$(P);return typeof z==="string"&&Mj.test(z)?z:J},Y=K("top"),H=K("bottom"),C=$("header");if(typeof C!=="boolean")return null;return{background:J,top:Y,bottom:H,header:C,footer:$("footer")===!0,under:[],dark:B,scheme:X,host:Z,canBack:G,canForward:V}}function s7(j,$){try{let J=T("session")?.getItem(u7);if(!J)return null;let X=JSON.parse(J);if(typeof X!=="object"||X===null||O(X,c7))return null;let Z=Reflect.get(X,"key"),Q=Reflect.get(X,"css"),B=Reflect.get(X,"html"),G=n7(Reflect.get(X,"look"));if(Z!==l7(j,$)||typeof Q!=="string")return null;if(typeof B!=="string"||!G)return null;return{key:Z,css:Q,html:B,look:G}}catch{return null}}function o7(){for(let j of Array.from(document.querySelectorAll(`[data-devknobs="${j0}"]`)))j.remove();zj(j0)}function Uj(j){if(!m1(j)||!document.head)return;let $=Hj(j0);$.textContent=i7(g1(j)?null:j.mat),window.setTimeout(o7,d7);let J=s7(j,window);if(!J)return;let X=document.createElement("div");X.setAttribute("data-devknobs",j0),X.style.cssText=`position:fixed;inset:0;z-index:${Ij}`;let Z=X.attachShadow({mode:"open"});Z.innerHTML=J.html;for(let G of Array.from(Z.querySelectorAll("[style]")))G.style.cssText=G.getAttribute("style")??"";Cj(Z,J.css);let Q=()=>{if(F0(j0)!==$)return!0;if(!document.body)return!1;return document.body.append(X),!0};if(Q())return;let B=new MutationObserver(()=>{if(Q())B.disconnect()});B.observe(document.documentElement,{childList:!0})}var l0="devknobs:scroll",Lj=1,a7=1e4,r7=2000,t7=1e4,e7=20,_j=["wheel","touchstart","keydown","mousedown"];function Fj(j){if(typeof j!=="object"||j===null)return;let $=Reflect.get(j,"path"),J=Reflect.get(j,"x"),X=Reflect.get(j,"y");if(typeof $!=="string"||typeof J!=="number"||typeof X!=="number")return;return Number.isFinite(J)&&Number.isFinite(X)?{path:$,x:J,y:X}:void 0}function j$(j){if(!j)return null;let $;try{$=JSON.parse(j)}catch{return null}if(typeof $!=="object"||$===null||O($,Lj))return null;let J=Reflect.get($,"at");if(typeof J!=="number")return null;let X={at:J},Z=Fj(Reflect.get($,"page")),Q=Fj(Reflect.get($,"frame"));if(Z)X.page=Z;if(Q)X.frame=Q;return X}function $$(j,$){let J=$-j;return!(J>=0&&J<a7)}function J$(j,$,J,X){if(!j||$$(j.at,X))return{place:null,rest:null};let Z=j[$],Q=$==="page"?"frame":"page",B=j[Q],G=B?{at:j.at,[Q]:B}:null;if(!Z||Z.path!==J)return{place:null,rest:G};return{place:{x:Z.x,y:Z.y},rest:G}}function X$(j,$){let{target:J}=j,X=Math.abs($.x-J.x)<=1&&Math.abs($.y-J.y)<=1,Z=j.puts>=e7;if($.now-j.start>=t7||j.loadedAt!==null&&$.now-j.loadedAt>=r7)return X||Z?"done":"last";if(Z)return"done";if(X)return"wait";return $.maxX>=J.x-1&&$.maxY>=J.y-1?"put":"wait"}function Z$(j,$,J=q){let X={target:$,start:J(),loadedAt:null,puts:0},Z=!1,Q=()=>{Z=!0;for(let G of _j)j.removeEventListener(G,Q,!0)},B=()=>{if(Z)return;let G=J();if(X.loadedAt===null&&j.document.readyState==="complete")X.loadedAt=G;let V=j.document.documentElement,K=X$(X,{x:j.scrollX,y:j.scrollY,maxX:V?V.scrollWidth-V.clientWidth:0,maxY:V?V.scrollHeight-V.clientHeight:0,now:G});if(K==="put"||K==="last")X.puts++,j.scrollTo({left:$.x,top:$.y,behavior:"instant"});if(K==="last"||K==="done")Q();else j.requestAnimationFrame(B)};for(let G of _j)j.addEventListener(G,Q,!0);B()}function Nj(){if(typeof window>"u")return;let j=null;try{let $=T("session"),J=$?.getItem(l0)??null;if(!$||J===null)return;let X=R()?"frame":"page",{place:Z,rest:Q}=J$(j$(J),X,window.location.pathname,q());if(Q)$.setItem(l0,JSON.stringify(n(Q,Lj)));else $.removeItem(l0);j=Z}catch{return}if(j)Z$(window,j)}var Q$={brand:"Not/A)Brand",version:"24.0.0.0"};function Aj(j){return j.split(".")[0]??j}function L0(j,$=!1){let J=`Chrome/${Aj("154.0.8037.98")}.0.0.0 ${$?"Mobile ":""}Safari/537.36`;return`Mozilla/5.0 (${j}) AppleWebKit/537.36 (KHTML, like Gecko) ${J}`}function $0(j,$){let J=[{brand:"Chromium",version:"154.0.8037.98"},Q$,...j?[j]:[]];return{brands:J.map(({brand:X,version:Z})=>({brand:X,version:Aj(Z)})),hints:{...$,fullVersionList:J,uaFullVersion:j?.version??"154.0.8037.98"}}}var n0={brand:"Google Chrome",version:"154.0.8037.98"},Sj={model:"",bitness:"64"},qj={...Sj,platformVersion:"19.0.0",architecture:"x86"},Dj="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Safari/605.1.15",B$=[{id:"iphone-safari",label:"iPhone Safari",userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 18_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0 Mobile/15E148 Safari/604.1",platform:"iPhone",vendor:"Apple Computer, Inc.",mobile:!0,brands:[],uaPlatform:"iOS",maxTouchPoints:5},{id:"android-chrome",label:"Android Chrome",userAgent:L0("Linux; Android 10; K",!0),platform:"Linux armv81",vendor:"Google Inc.",mobile:!0,uaPlatform:"Android",maxTouchPoints:5,...$0(n0,{platformVersion:"16.0.0",model:"Pixel 10",architecture:"",bitness:""})},{id:"ipad-safari",label:"iPad Safari",userAgent:Dj,platform:"MacIntel",vendor:"Apple Computer, Inc.",mobile:!1,brands:[],uaPlatform:"iOS",maxTouchPoints:5},{id:"mac-safari",label:"Mac Safari",userAgent:Dj,platform:"MacIntel",vendor:"Apple Computer, Inc.",mobile:!1,brands:[],uaPlatform:"macOS",maxTouchPoints:0},{id:"mac-chrome",label:"Mac Chrome",userAgent:L0("Macintosh; Intel Mac OS X 10_15_7"),platform:"MacIntel",vendor:"Google Inc.",mobile:!1,uaPlatform:"macOS",maxTouchPoints:0,...$0(n0,{...Sj,platformVersion:"26.7.1",architecture:"arm"})},{id:"windows-chrome",label:"Windows Chrome",userAgent:L0("Windows NT 10.0; Win64; x64"),platform:"Win32",vendor:"Google Inc.",mobile:!1,uaPlatform:"Windows",maxTouchPoints:0,...$0(n0,qj)},{id:"windows-edge",label:"Windows Edge",userAgent:`${L0("Windows NT 10.0; Win64; x64")} Edg/154.0.4258.53`,platform:"Win32",vendor:"Google Inc.",mobile:!1,uaPlatform:"Windows",maxTouchPoints:0,...$0({brand:"Microsoft Edge",version:"154.0.4258.53"},qj)},{id:"linux-firefox",label:"Linux Firefox",userAgent:"Mozilla/5.0 (X11; Linux x86_64; rv:157.0) Gecko/20100101 Firefox/157.0",platform:"Linux x86_64",vendor:"",mobile:!1,brands:[],uaPlatform:"Linux",maxTouchPoints:0,appVersion:"5.0 (X11)"},{id:"googlebot",label:"Googlebot",userAgent:"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/154.0.8037.98 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",platform:"Linux armv81",vendor:"Google Inc.",mobile:!0,uaPlatform:"Android",maxTouchPoints:1,...$0(null,{platformVersion:"6.0.1",model:"Nexus 5X",architecture:"",bitness:""})}];function Tj(j){return B$.find(($)=>$.id===j)}function G$(j){if(j.preset==="custom")return j.custom.trim();return Tj(j.preset)?.userAgent??""}function V$(j){return j.replace(/^Mozilla\//,"")}var wj=["userAgent","appVersion","platform","vendor","maxTouchPoints","userAgentData"],Oj=Symbol.for("devknobs.ua");function K$(j){return typeof j==="object"&&j!==null&&"originals"in j}function fj(j){let $=Reflect.get(j,Oj);if(K$($))return $;let J={originals:null};return Reflect.set(j,Oj,J),J}function Ej(j){let $=Reflect.get(j,"Navigator");return typeof $==="function"?$.prototype:null}function h(j,$,J){Object.defineProperty(j,$,{configurable:!0,enumerable:!0,get:()=>J})}function s0(j,$,J){let X=j.originals?.get(J);if(X)Object.defineProperty($,J,X);else Reflect.deleteProperty($,J)}function Rj(j){return j.map(({brand:$,version:J})=>({brand:$,version:J}))}var W$={brands:[],mobile:!1,uaPlatform:""};function xj(j,$){let J=Object.freeze(j.brands.map((V)=>Object.freeze({...V}))),X=()=>({brands:Rj(J),mobile:j.mobile,platform:j.uaPlatform}),Z=j.hints,Q=()=>({architecture:Z?.architecture??"",bitness:Z?.bitness??"",fullVersionList:Rj(Z?.fullVersionList??[]),model:Z?.model??"",platformVersion:Z?.platformVersion??"",uaFullVersion:Z?.uaFullVersion??""}),B=Reflect.get($,"NavigatorUAData"),G=typeof B==="function"?B.prototype:Object.prototype;return Object.create(G,{brands:{enumerable:!0,get:()=>J},mobile:{enumerable:!0,get:()=>j.mobile},platform:{enumerable:!0,get:()=>j.uaPlatform},getHighEntropyValues:{value:(V)=>{try{let K=X(),Y=Q();for(let H of Array.from(V,String))if(Object.hasOwn(Y,H))K[H]=Y[H];return Promise.resolve(K)}catch(K){return Promise.reject(K)}}},toJSON:{value:X}})}function bj(j,$=globalThis){let J=Ej($),X=j.preset==="custom"?void 0:Tj(j.preset),Z=G$(j);if(!J||Z===""){Y$($);return}let Q=fj($);if(Q.originals??=new Map(wj.map((B)=>[B,Object.getOwnPropertyDescriptor(J,B)])),h(J,"userAgent",Z),h(J,"appVersion",X?.appVersion??V$(Z)),!X){for(let B of["platform","vendor","maxTouchPoints"])s0(Q,J,B);if(Q.originals.get("userAgentData"))h(J,"userAgentData",xj(W$,$));else s0(Q,J,"userAgentData");return}if(h(J,"platform",X.platform),h(J,"vendor",X.vendor),h(J,"maxTouchPoints",X.maxTouchPoints),X.brands.length>0)h(J,"userAgentData",xj(X,$));else Reflect.deleteProperty(J,"userAgentData")}function Y$(j=globalThis){let $=fj(j),J=Ej(j);if(!$.originals)return;if(J)for(let X of wj)s0($,J,X);$.originals=null}function j1(){if(Object.hasOwn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"))return;Promise.resolve().then(() => nj())}var F$=Symbol.for("devknobs.owner");function sj(j){return typeof Reflect.get(j,F$)==="function"}function L$(j,$){for(let J of["name","length",...Object.keys($)]){let X=Object.getOwnPropertyDescriptor($,J);if(X)Object.defineProperty(j,J,X)}Object.defineProperty(j,"toString",{configurable:!0,writable:!0,value:()=>Function.prototype.toString.call($)})}function A(j,$,J,X){let Z=Reflect.get($,J);if(typeof Z!=="function")return;let Q=Object.hasOwn($,J),B=X(Z);if(L$(B,Z),Reflect.set($,J,B))j.push({target:$,key:J,original:Z,value:B,own:Q})}function oj(j){for(let{target:$,key:J,original:X,value:Z,own:Q}of j.reverse()){if(Reflect.get($,J)!==Z)continue;if(Q)Reflect.set($,J,X);else Reflect.deleteProperty($,J)}j.length=0}var $1=300,y=65536,J1=200,aj=4096;var N$=/^text\/|[/+](json|xml|javascript|ecmascript|x-www-form-urlencoded|graphql|yaml)\b|\/svg/i;function X1(j){return N$.test(j)}var X0=/�+$/;function b(j,$,J=y){if(j.length<=J){let Q=new TextEncoder().encode(j);if(Q.length<=J)return{kind:"text",text:j,size:Q.length,truncated:!1,type:$};return{kind:"text",text:new TextDecoder().decode(Q.subarray(0,J)).replace(X0,""),size:Q.length,truncated:!0,type:$}}let X=new TextEncoder().encode(j.slice(0,J)),Z=new TextDecoder().decode(X.subarray(0,J));return{kind:"text",text:X.length>J?Z.replace(X0,""):Z,size:null,truncated:!0,type:$}}function J0(j,$,J){return{kind:j,text:"",size:$,truncated:!1,type:J}}function q$(j,$){let J=[],X=0;for(let[Z,Q]of j){let B=typeof Q==="string"?`${Z}=${Q}`:`${Z}=(file ${Q.name}, ${Q.type||"no type"}, ${Q.size} bytes)`;if(J.push(B),X+=B.length+1,X>$)break}return J.join(`
|
|
6
|
+
`)}function p(j,$){return typeof j==="function"&&$ instanceof j}function q0(j,$,J=y){if(j===void 0||j===null)return null;if(typeof j==="string")return b(j,$||"text/plain;charset=UTF-8",J);if(p(globalThis.URLSearchParams,j))return b(String(j),$||"application/x-www-form-urlencoded;charset=UTF-8",J);if(p(globalThis.FormData,j))return{...b(q$(j,J),$||"multipart/form-data",J),kind:"form",size:null};if(p(globalThis.Blob,j))return J0("binary",j.size,$||j.type||"Blob");if(p(globalThis.ArrayBuffer,j))return J0("binary",j.byteLength,$||"ArrayBuffer");if(ArrayBuffer.isView(j))return J0("binary",j.byteLength,$||"ArrayBufferView");if(p(globalThis.ReadableStream,j))return J0("stream",null,$);return null}function u(j,$,J){return J0(j,$,J)}var Z1=2000;async function rj(j,$,J=y,X=Z1){if(!j.body){let Y=await j.blob(),H=await Y.slice(0,J).text(),C=Y.size>J;return{record:{kind:"text",text:C?H.replace(X0,""):H,size:Y.size,truncated:C,type:$},complete:!0}}let Z=j.body.getReader(),Q=new TextDecoder,B="",G=0,V=!1,K=setTimeout(()=>{V=!0,Z.cancel().catch(()=>{})},X);try{for(;;){let{done:Y,value:H}=await Z.read();if(Y)break;let C=J-G;if(H.byteLength>C)return B+=Q.decode(H.subarray(0,C)),Z.cancel().catch(()=>{}),{record:{kind:"text",text:B.replace(X0,""),size:null,truncated:!0,type:$},complete:!1};B+=Q.decode(H,{stream:!0}),G+=H.byteLength}}finally{clearTimeout(K)}if(B+=Q.decode(),V)return{record:{kind:"text",text:B.replace(X0,""),size:null,truncated:!0,timedOut:!0,type:$},complete:!1};return{record:{kind:"text",text:B,size:G,truncated:!1,type:$},complete:!0}}function k(j){try{return new URL(j,typeof document>"u"?void 0:document.baseURI).href}catch{return j}}function m(j,$){return j.find(([J])=>J.toLowerCase()===$)?.[1]??""}function Q1(j,$,J,X,Z){return{id:j,kind:$,detail:$==="resource"||$==="navigation"?"light":"full",source:J,method:"",url:"",finalUrl:null,redirected:!1,state:"pending",status:null,statusText:"",error:null,requestHeaders:[],responseHeaders:[],requestBody:null,responseBody:null,contentType:"",sizes:null,timing:{start:X.origin+Z,at:Z,response:null,end:null,duration:null},phases:null,messages:[],initiator:"",initiatorType:"",protocol:"",referrerPolicy:""}}function tj(j,$,J,X){return{active:X,start(Z,Q){let B=j.nextId();return j.put({...Q1(B,Z,J,$,$.now()),method:Q.method,url:Q.url,requestHeaders:Q.headers,requestBody:Q.body,initiator:Q.initiator,referrerPolicy:Q.referrerPolicy??""}),B},set:(Z,Q)=>j.update(Z,Q),responded(Z,Q){let B=j.get(Z)?.timing;if(!B)return;let G=B.response??$.now()-B.at;j.update(Z,{...Q,timing:{...B,response:G}})},ended(Z,Q){let B=j.get(Z)?.timing;if(!B)return;let G=B.duration??$.now()-B.at;j.update(Z,{...Q,timing:{...B,end:B.start+G,duration:G}})},message(Z,Q){let B=j.get(Z)?.messages;if(!B)return;let{text:G,truncated:V}=b(Q.data,"",aj),K={...Q,data:G,truncated:V,time:$.origin+$.now()};j.update(Z,{messages:[...B.slice(1-J1),K]})}}}var D$=/^at |@/;function l(j,$){if(typeof j!=="string")return"";let J=j.split(`
|
|
7
|
+
`).map((X)=>X.trim()).filter((X)=>X!=="");if(J[0]!==void 0&&!D$.test(J[0]))J.shift();return J.slice($,$+12).join(`
|
|
8
|
+
`)}var O$=new Set(["open","error"]);function ej(j,$){let J=Reflect.get(globalThis,"EventSource");if(typeof J!=="function")return;let X=new WeakMap,Z=EventTarget.prototype.addEventListener;function Q(G,V){let K=k(G.url),Y=()=>$.start("eventsource",{method:"GET",url:K,headers:[],body:null,initiator:V}),H=(P,z)=>{Z.call(G,P,(M)=>{try{z(M)}catch{}})},C={id:Y(),open:!1,types:new Set,listen(P){if(C.types.has(P)||O$.has(P))return;C.types.add(P),H(P,(z)=>{if(C.id===null)return;let M=Reflect.get(z,"data"),N=Reflect.get(z,"lastEventId");$.message(C.id,{type:z.type,data:String(M??""),id:typeof N==="string"?N:""})})}};X.set(G,C),C.listen("message"),H("open",()=>{if(C.id===null){if(!$.active())return;C.id=Y()}C.open=!0,$.responded(C.id,{status:200,state:"ok",contentType:"text/event-stream"})}),H("error",()=>{if(C.id===null)return;$.ended(C.id,C.open?{}:{state:"failed",error:"EventSource failed to connect"}),C.id=null,C.open=!1})}A(j,globalThis,"EventSource",(G)=>{function V(...K){if(!new.target)return Reflect.apply(G,this,K);let Y=Reflect.construct(G,K,new.target);try{if($.active())Q(Y,l(Error().stack,1))}catch{}return Y}return V.prototype=G.prototype,V});let B=Reflect.get(J,"prototype");if(typeof B!=="object"||B===null)return;A(j,B,"addEventListener",()=>function(...G){try{if(typeof G[0]==="string")X.get(this)?.listen(G[0])}catch{}return Reflect.apply(Reflect.get(Object.getPrototypeOf(B),"addEventListener"),this,G)}),A(j,B,"close",(G)=>function(...V){try{let K=X.get(this);if(K&&K.id!==null)$.ended(K.id,K.open?{}:{state:"aborted"}),K.id=null}catch{}return G.apply(this,V)})}var j3=2,Z0=Symbol.for("devknobs.requests"),$3=Symbol.for("devknobs.quiet");function R$(j){return typeof j==="object"&&j!==null&&Reflect.get(j,"version")===2}function D0(j=globalThis){try{let $=Reflect.get(j,Z0);return R$($)?$:null}catch{return null}}function B1(j){if(j)Reflect.set(globalThis,Z0,j);else Reflect.deleteProperty(globalThis,Z0)}function J3(){let j=Reflect.get(globalThis,Z0);if(typeof j!=="object"||j===null)return;let $=Reflect.get(j,"uninstall");try{if(typeof $==="function")$.call(j)}catch{}Reflect.deleteProperty(globalThis,Z0)}function x$(j){return typeof j==="object"&&j!==null&&"url"in j&&"method"in j&&"headers"in j&&"clone"in j}function Q0(j,$){return typeof j==="object"&&j!==null?Reflect.get(j,$):void 0}function A$(j){try{return typeof j==="object"&&j!==null&&Reflect.get(j,$3)===!0}catch{return!1}}function X3(j){let $=[];if(typeof j!=="object"||j===null)return $;if(p(globalThis.Headers,j))j.forEach((J,X)=>$.push([X,J]));else if(Array.isArray(j)){for(let J of j)if(Array.isArray(J)&&J.length>1)$.push([String(J[0]),String(J[1])])}else for(let[J,X]of Object.entries(j))$.push([J,String(X)]);return $}function Z3(j){return j instanceof Error?`${j.name}: ${j.message}`:String(j)}function Q3(j){return typeof j==="object"&&j!==null&&Reflect.get(j,"aborted")===!0}function S$(j,$,J){if($==="GET"||$==="HEAD")return null;if(j.body===null||j.bodyUsed)return null;return u(X1(J)?"stream":"binary",null,J)}function T$(j,$){let J=x$(j)?j:null,X=String(Q0($,"method")??J?.method??"GET").toUpperCase(),Z=Q0($,"headers"),Q=X3(Z===void 0?J?.headers:Z),B=m(Q,"content-type"),G=Q0($,"body"),V=J&&(G===void 0||G===null)?S$(J,X,B):null,K=q0(G,B)??V,Y=String(Q0($,"referrerPolicy")??J?.referrerPolicy??"");return{request:{method:X,url:k(J?J.url:String(j)),headers:Q,body:K,referrerPolicy:Y},signal:Q0($,"signal")??J?.signal}}function w$(j){let $=Number.parseInt(m(j,"content-length"),10);return Number.isFinite($)?$:null}function f$(j){return/^text\/event-stream\b/i.test(j.trim())}function E$(j,$,J,X,Z){let Q=X3(J.headers),B=m(Q,"content-type"),G=J.type==="opaque"||J.type==="opaqueredirect";if(j.responded($,{status:J.status,statusText:J.statusText,state:J.ok||G?"ok":"failed",responseHeaders:Q,contentType:B,redirected:J.redirected,finalUrl:J.url||null}),G)j.set($,{responseBody:u("opaque",null,"")});else if(J.body===null)j.ended($,{});else if(f$(B))j.set($,{responseBody:u("stream",null,B)});else if(!X1(B))j.set($,{responseBody:u("binary",w$(Q),B)});else rj(J.clone(),B,void 0,Z).then(({record:V,complete:K})=>{let Y=V.size===0?null:V;if(K)j.ended($,{responseBody:Y});else j.set($,{responseBody:Y})},(V)=>{j.ended($,{state:Q3(X)?"aborted":"failed",error:Z3(V)})})}function B3(j,$,J=Z1){return function(){let Z=arguments;if(!$.active()||A$(Z[1]))return Reflect.apply(j,this,Z);let Q=null,B;try{let K=T$(Z[0],Z[1]);B=K.signal,Q=$.start("fetch",{...K.request,initiator:l(Error().stack,1)})}catch{}let G=Reflect.apply(j,this,Z);if(Q===null)return G;let V=Q;return G.then((K)=>{try{E$($,V,K,B,J)}catch{}return K},(K)=>{try{$.ended(V,{state:Q3(B)?"aborted":"failed",error:Z3(K)})}catch{}throw K})}}var G1=250,B0=5;function F(j,$){let J=Reflect.get(j,$);return typeof J==="number"&&Number.isFinite(J)?J:0}function c(j,$){let J=Reflect.get(j,$);return typeof J==="string"?J:""}function G3(j){return j.split("#",1)[0]??j}function b$(j){try{return new URL(j).origin}catch{return""}}function V3(j,$){let J=F(j,"transferSize"),X=F(j,"encodedBodySize"),Z=F(j,"decodedBodySize"),Q=J+X+Z===0&&b$(j.name)!==$;return{transfer:J,encoded:X,decoded:Z,hidden:Q}}function K3(j){return{startTime:j.startTime,workerStart:F(j,"workerStart"),redirectStart:F(j,"redirectStart"),redirectEnd:F(j,"redirectEnd"),fetchStart:F(j,"fetchStart"),domainLookupStart:F(j,"domainLookupStart"),domainLookupEnd:F(j,"domainLookupEnd"),connectStart:F(j,"connectStart"),secureConnectionStart:F(j,"secureConnectionStart"),connectEnd:F(j,"connectEnd"),requestStart:F(j,"requestStart"),responseStart:F(j,"responseStart"),responseEnd:F(j,"responseEnd")||j.startTime+j.duration}}function W3(j){return F(j,"responseStatus")||null}function Y3(j,$,J,X,Z){let Q=Q1($,j.entryType==="navigation"?"navigation":"resource",J,X,j.startTime),B=W3(j),G=F(j,"responseEnd")||j.startTime+j.duration,V=F(j,"responseStart"),K=Math.max(0,G-j.startTime);return{...Q,url:j.name,state:B!==null&&B>=400?"failed":"ok",status:B,contentType:c(j,"contentType"),sizes:V3(j,Z),timing:{...Q.timing,response:V>0?Math.max(0,V-j.startTime):null,end:Q.timing.start+K,duration:K},phases:K3(j),initiatorType:c(j,"initiatorType")||j.entryType,protocol:c(j,"nextHopProtocol")}}var k$={fetch:"fetch",xmlhttprequest:"xhr",other:"eventsource"};function P3(j,$,J){let X=k$[c($,"initiatorType")];if(!X)return null;let Z=G3($.name),Q=F($,"responseEnd")||$.startTime+$.duration,B=null;for(let G of j){if(G.kind!==X||G.source!==J||G.sizes!==null)continue;let V=$.startTime-G.timing.at;if(!(X==="eventsource"&&V<=B0&&G.timing.at<=Q+B0)&&(V<-B0||V>G1)||G3(G.url)!==Z)continue;if(!B||Math.abs(V)<Math.abs($.startTime-B.timing.at))B=G}return B}function C3(j,$,J){let X=F($,"responseEnd")||$.startTime+$.duration,Z=Math.max(0,X-j.timing.at);return{sizes:V3($,J),phases:K3($),protocol:c($,"nextHopProtocol"),initiatorType:c($,"initiatorType"),status:j.status||W3($),contentType:j.contentType||c($,"contentType"),timing:{...j.timing,end:j.timing.start+Z,duration:Z}}}var m$=50;function g$(j){let $=setTimeout(j,m$);return()=>clearTimeout($)}function H3(j){let $=j.schedule??g$,J=[],X=new Map,Z=new Set,Q=new Set,B=null,G=!1,V=Number.NEGATIVE_INFINITY,K=0;function Y(){if(B?.(),B=null,Q.size===0&&!G)return;let P=[];for(let z of Q){let M=X.get(z);if(M)P.push(M)}Q.clear(),G=!1;for(let z of Array.from(Z))z(P)}function H(P){if(Z.size===0)return;if(P===null)G=!0;else Q.add(P);B??=$(Y)}function C(P){if(P.timing.start<V)return;let z=X.get(P.id);if(X.set(P.id,P),z)J[J.lastIndexOf(z)]=P;else{let M=J.length;while(M>0&&(J[M-1]?.timing.start??0)>P.timing.start)M--;if(J.splice(M,0,P),J.length>$1){let N=J.shift();if(N)X.delete(N.id);if(N===P)return}}H(P.id)}return{entries:()=>J,get:(P)=>X.get(P),nextId:()=>`${j.seed}-${++K}`,put:C,update(P,z){let M=X.get(P);if(M)C({...M,...z,id:P})},clear(){J=[],X.clear(),Q.clear(),V=j.now(),H(null)},subscribe(P){return Z.add(P),()=>{Z.delete(P)}},flush:Y,close(){B?.(),B=null,J=[],X.clear(),Q.clear(),Z.clear()}}}var v$=4*y;function h$(j){let $=[];for(let J of j.split(/\r?\n/)){let X=J.indexOf(":");if(X>0)$.push([J.slice(0,X).trim(),J.slice(X+1).trim()])}return $}function z3(j,$){let J=h$(j.getAllResponseHeaders()??""),X=j.responseURL||null;return{status:j.status,statusText:j.statusText,responseHeaders:J,contentType:m(J,"content-type"),finalUrl:X,redirected:X!==null&&X!==$.split("#",1)[0]}}function y$(j){if(typeof j!=="object"||j===null)return null;let $=Reflect.get(j,"byteLength")??Reflect.get(j,"size");return typeof $==="number"?$:null}function p$(j,$,J){let X=j.responseType,Z;if(X===""||X==="text")Z=b(j.responseText,$);else if(X!=="json")Z=u("binary",y$(j.response)??J,$||X);else if(J!==null&&J>v$)Z={kind:"text",text:"",size:J,truncated:!0,type:$};else Z=b(JSON.stringify(j.response)??"",$);return Z.size===0?null:Z}var M3=["error","abort","timeout"];function u$(j,$,J,X){let Z=null,Q=null,B=!1,G=null,V=()=>{j.removeEventListener("readystatechange",Y,!0),j.removeEventListener("progress",H,!0);for(let z of M3)j.removeEventListener(z,C,!0);j.removeEventListener("loadend",P,!0)};function K(){B=!0,V();try{let z=z3(j,J),M=j.status,N=Z??(M===0||M>=400?"failed":"ok"),V0=Number.parseInt(m(z.responseHeaders??[],"content-length"),10),K0=G??(Number.isFinite(V0)?V0:null),O0=Z?null:p$(j,z.contentType??"",K0);X.ended($,{...z,status:M===0?null:M,state:N,error:Q,responseBody:O0})}catch{X.ended($,{state:Z??"failed",error:Q})}}function Y(){try{if(j.readyState===2)X.responded($,z3(j,J))}catch{}if(j.readyState===4&&j.status!==0)K()}function H(z){let M=Reflect.get(z,"loaded");if(typeof M==="number")G=M}function C(z){Z=z.type==="abort"?"aborted":"failed",Q=z.type==="abort"?null:z.type}function P(z){if(j.readyState!==4)return;H(z),K()}j.addEventListener("readystatechange",Y,!0),j.addEventListener("progress",H,!0);for(let z of M3)j.addEventListener(z,C,!0);return j.addEventListener("loadend",P,!0),()=>{if(B)return;B=!0,V(),X.ended($,{state:"aborted"})}}function I3(j,$){if(typeof XMLHttpRequest!=="function")return;let J=new WeakMap,X=XMLHttpRequest.prototype;A(j,X,"open",(Z)=>function(...Q){let B=Z.apply(this,Q);try{if(J.get(this)?.drop?.(),J.delete(this),$.active()){let G=String(Q[0]).toUpperCase();J.set(this,{method:G,url:k(String(Q[1])),headers:[],drop:null})}}catch{}return B}),A(j,X,"setRequestHeader",(Z)=>function(...Q){let B=Z.apply(this,Q);return J.get(this)?.headers.push([String(Q[0]),String(Q[1])]),B}),A(j,X,"send",(Z)=>function(...Q){let B=J.get(this);if(!B||!$.active())return Z.apply(this,Q);let G=null;try{let{method:V,url:K,headers:Y}=B,H=q0(Q[0],m(Y,"content-type")),C=l(Error().stack,1);G=$.start("xhr",{method:V,url:K,headers:[...Y],body:H,initiator:C}),B.drop=u$(this,G,K,$)}catch{}try{return Z.apply(this,Q)}catch(V){if(B.drop?.(),B.drop=null,G!==null)$.set(G,{state:"failed",error:String(V)});throw V}})}var c$=100,G0=typeof performance>"u"?null:performance,U3=G0?G0.now.bind(G0):q;function d$(){let j=G0?G0.timeOrigin??q()-U3():0;return{now:U3,origin:j}}function i$(j){return k(j).split("#",1)[0]??j}function l$(j){return{...j,source:"frame",requestHeaders:j.requestHeaders.map(([$,J])=>[$,J]),responseHeaders:j.responseHeaders.map(([$,J])=>[$,J]),requestBody:j.requestBody&&{...j.requestBody},responseBody:j.responseBody&&{...j.responseBody},sizes:j.sizes&&{...j.sizes},timing:{...j.timing},phases:j.phases&&{...j.phases},messages:j.messages.map(($)=>({...$}))}}function n$(j){let{source:$,clock:J,origin:X}=j,Z=`${$.charAt(0)}${Math.floor(J.origin).toString(36)}${Math.floor(Math.random()*46656).toString(36)}`,Q=H3({seed:Z,now:()=>J.origin+J.now(),schedule:j.schedule}),B=[],G=!0,V=0,K=new Set,Y=[],H=tj(Q,J,$,()=>G&&V===0);function C(U,I){let S=i$(U);if(S.startsWith("data:"))return;if(!I)K.add(S);else Y=[...Y.slice(1-c$),{url:S,at:J.now()}]}function P(U){if(K.has(U.name))return!0;let I=Y.findIndex((S)=>{let W1=U.startTime-S.at;return S.url===U.name&&W1>=-B0&&W1<=G1});if(I<0)return!1;return Y.splice(I,1),!0}function z(U){try{if(P(U))return;let I=P3(Q.entries(),U,$);if(I)Q.update(I.id,C3(I,U,X));else Q.put(Y3(U,Q.nextId(),$,J,X))}catch{}}function M(){if(typeof PerformanceObserver!=="function")return()=>{};let U=new PerformanceObserver((I)=>{if(G)for(let S of I.getEntries())z(S)});for(let I of["navigation","resource"])try{U.observe({type:I,buffered:!0})}catch{}return()=>U.disconnect()}let N=null;function V0(U){let I=j.above?.()??null;if(I)I.adopt(I===N?U:Q.entries());N=I}function K0(U){if(Reflect.get(U,"persisted")===!0)return;for(let I of[...Q.entries()])if(I.state==="pending")Q.update(I.id,{state:"aborted"});Q.flush()}A(B,globalThis,"fetch",(U)=>B3(U,H,j.readFor)),I3(B,H),ej(B,H);let O0=M();if(j.above)Q.subscribe(V0),globalThis.addEventListener?.("pagehide",K0);let K1={version:j3,store:Q,quietly(U,I){C(U,!0),V++;try{return I()}finally{V--}},hush:C,adopt(U){for(let I of U)Q.put(l$(I))},uninstall(){if(G=!1,oj(B),O0(),globalThis.removeEventListener?.("pagehide",K0),Q.close(),D0()===K1)B1(null)}};return K1}function s$(){try{return window.parent===window?null:D0(window.parent)}catch{return null}}function _3(){if(D0())return;J3();let j=typeof window<"u"&&R(),$=typeof location>"u"?"":location.origin;B1(n$({source:j?"frame":"top",clock:d$(),origin:$,above:j?s$:void 0}))}var o$="devknobs:storage-presets",a$=1,F3=Symbol.for("devknobs.presets");function L3(j){return typeof j==="object"&&j!==null&&!Array.isArray(j)?Object.fromEntries(Object.entries(j)):{}}function V1(j){return Array.isArray(j)?j.map(L3):[]}function r$(){try{let j=JSON.parse(T("local")?.getItem(o$)??"null");return O(j,a$)?[]:V1(L3(j).presets)}catch{return[]}}function t$(j){let $=`${String(j.name)}=${String(j.value)}`;if($+=`; path=${typeof j.path==="string"?j.path:"/"}`,typeof j.domain==="string")$+=`; domain=${j.domain}`;if(typeof j.maxAge==="number")$+=`; max-age=${j.maxAge}`;if(typeof j.expires==="string")$+=`; expires=${j.expires}`;if(typeof j.sameSite==="string")$+=`; samesite=${j.sameSite}`;if(j.secure===!0)$+="; secure";return $}function e$(j){let $=[];for(let J=0;J<j.length;J++){let X=j.key(J);if(X!==null&&X!=="devknobs"&&!X.startsWith("devknobs:"))$.push(X)}for(let J of $)j.removeItem(J)}function j2(j,$,J){let X=[];for(let Z of["local","session"])try{let Q=Z==="local"?j.localStorage:j.sessionStorage;if(J)e$(Q);for(let B of V1($[Z]))try{if(typeof B.name==="string"&&typeof B.value==="string")Q.setItem(B.name,B.value)}catch{X.push(String(B.name))}}catch{X.push(`${Z}Storage`)}for(let Z of V1($.cookies))try{if(typeof Z.name==="string"&&typeof Z.value==="string")j.document.cookie=t$(Z)}catch{X.push(String(Z.name))}return X}function N3(){if(typeof window>"u")return 0;let j=Reflect.get(window,F3);if(typeof j==="number")return j;let $=0;try{if(!R())for(let J of r$()){if(J.onLoad!==!0)continue;j2(window,J,J.clearFirst===!0),$++}}catch{}return Reflect.set(window,F3,$),$}N3();if(sj(window))j1();else{let j=E1(),$=R(),J=$&&b1(j.scheme)?"system":j.scheme,{motion:X,contrast:Z,transparency:Q}=j;if(Zj({scheme:J,motion:X,contrast:Z,transparency:Q,touch:$&&M1(j.device)}),H1(j.clock),bj(j.ua),_3(),j1(),!$)Uj(j);Nj()}})();
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edits of css declarations, in a rule or in an element's `style`: a value
|
|
3
|
+
* changed, a property added, a declaration turned off or on. A value goes in
|
|
4
|
+
* through `setProperty`, as the page's own script would set it, so the
|
|
5
|
+
* browser keeps every other declaration as it was, a longhand inside a
|
|
6
|
+
* shorthand included. Only a declaration turned on again is written back
|
|
7
|
+
* into the block's text, so it goes back where it stood. To use it:
|
|
8
|
+
*
|
|
9
|
+
* const change = cssValue("css-value", place, "padding", "10px 18px");
|
|
10
|
+
* if (change) edits.record(change);
|
|
11
|
+
*/
|
|
12
|
+
import { type Written } from "../styles/declarations";
|
|
13
|
+
import type { Change, EditKind, EditTarget, Recorded } from "./log";
|
|
14
|
+
/** What a css edit's text is written in, and where that is. */
|
|
15
|
+
export interface CssPlace {
|
|
16
|
+
/** The rule's `style`, or the element's own. */
|
|
17
|
+
style: CSSStyleDeclaration;
|
|
18
|
+
/** The element the edit is for: the one whose `style` it is, or that the rule styles. */
|
|
19
|
+
element: Element;
|
|
20
|
+
/** The rule, where the edit is in one. */
|
|
21
|
+
rule?: EditTarget["rule"];
|
|
22
|
+
/** A css selector that finds the element. */
|
|
23
|
+
selector: string;
|
|
24
|
+
}
|
|
25
|
+
/** The css edits, by their kind. */
|
|
26
|
+
export type CssKind = Extract<EditKind, "css-value" | "css-toggle" | "css-add">;
|
|
27
|
+
/** The edits in force, read as a change is made and as it is undone, for where the lines that are off stand. */
|
|
28
|
+
export type ReadRecorded = () => readonly Pick<Recorded, "edit" | "change">[];
|
|
29
|
+
/** A declaration's value as an edit keeps it: `!important` at its end where it has it. */
|
|
30
|
+
export declare function valueText(written: Pick<Written, "value" | "important">): string;
|
|
31
|
+
/** The property's declaration in a block's text, and its place there, or null where the text has none. */
|
|
32
|
+
export declare function declarationIn(style: Pick<CSSStyleDeclaration, "cssText">, property: string): {
|
|
33
|
+
text: string;
|
|
34
|
+
index: number;
|
|
35
|
+
} | null;
|
|
36
|
+
/** Set a property to `text`, or with null take it out. False where the page did not take the value. */
|
|
37
|
+
export declare function setText(style: CSSStyleDeclaration, element: Element, property: string, text: string | null): boolean;
|
|
38
|
+
/** A number for a rule's stylesheet, the same for every rule of it while it is up. */
|
|
39
|
+
export declare function sheetIdOf(rule: CSSRule | CSSNestedDeclarations): number;
|
|
40
|
+
/**
|
|
41
|
+
* A value changed, or a property added: `after` set on the block. Null
|
|
42
|
+
* where nothing would change. The value before is read from the block as it
|
|
43
|
+
* is now, and undo sets it back, or takes the property out where it was not set.
|
|
44
|
+
*/
|
|
45
|
+
export declare function cssValue(kind: "css-value" | "css-add", place: CssPlace, property: string, after: string): Change | null;
|
|
46
|
+
/** A declaration an edit turned off, which the view still shows, struck through. */
|
|
47
|
+
export interface Off {
|
|
48
|
+
property: string;
|
|
49
|
+
/** Its value as it was when turned off, `!important` and all. */
|
|
50
|
+
text: string;
|
|
51
|
+
/** Where it stands among all of its block's declarations, those off too. */
|
|
52
|
+
index: number;
|
|
53
|
+
}
|
|
54
|
+
/** The declarations of a block that the edits in force left off, in the order they stand. */
|
|
55
|
+
export declare function offIn(recorded: readonly Pick<Recorded, "edit" | "change">[], style: CSSStyleDeclaration): Off[];
|
|
56
|
+
/** A declaration turned off. Null where the block does not set it. */
|
|
57
|
+
export declare function cssOff(place: CssPlace, property: string, recorded: ReadRecorded): Change | null;
|
|
58
|
+
/** A declaration an edit turned off, turned on again where it stood. */
|
|
59
|
+
export declare function cssOn(place: CssPlace, off: Off, recorded: ReadRecorded): Change;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Edits of the page's html, made in the DOM tree: a text changed, an
|
|
3
|
+
* attribute set, added or taken out, an element written anew as html, an
|
|
4
|
+
* element hidden, a node deleted. Each keeps the very nodes it moved, so
|
|
5
|
+
* undo puts back what the page had. An edit goes on and comes off only where
|
|
6
|
+
* its node is as the edit left it: where the page's own script changed or
|
|
7
|
+
* replaced the node since, as a framework does when it renders again, the
|
|
8
|
+
* edit stays as text, and undo only takes it out of the log. To use it:
|
|
9
|
+
*
|
|
10
|
+
* const change = textEdit(target, node, "Buy now");
|
|
11
|
+
* if (change) edits.record(change);
|
|
12
|
+
*/
|
|
13
|
+
import type { Change, EditKind, EditPlace, EditTarget } from "./log";
|
|
14
|
+
/** The html edits, by their kind. */
|
|
15
|
+
export type HtmlKind = Extract<EditKind, "text" | "attr" | "html" | "hide" | "delete" | "move">;
|
|
16
|
+
/** The attribute a hidden element carries. devknobs' own, so the tree and a copy leave it out. */
|
|
17
|
+
export declare const HIDE_ATTRIBUTE = "data-devknobs-hide";
|
|
18
|
+
/** What hides an element and all in it, as the browsers' tools hide one: its box keeps its place. */
|
|
19
|
+
export declare const HIDE_CSS = "[data-devknobs-hide], [data-devknobs-hide] * { visibility: hidden !important; }";
|
|
20
|
+
/** The node that stands where `node` stood, after edits put others in its place. Null where none does. */
|
|
21
|
+
export declare function successor(node: Node): Node | null;
|
|
22
|
+
/**
|
|
23
|
+
* A text node's text changed to `text`, the white space around it kept.
|
|
24
|
+
* `property` says which of its element's texts it is. Null where nothing
|
|
25
|
+
* would change, or where the text would be empty: a delete takes a text out.
|
|
26
|
+
*/
|
|
27
|
+
export declare function textEdit(target: EditTarget, node: Node, text: string, property?: string): Change | null;
|
|
28
|
+
/** An attribute's name as the element keeps it: lower case on an html element. */
|
|
29
|
+
export declare function attributeName(element: Element, name: string): string;
|
|
30
|
+
/** An attribute set to `value`, added, or with null taken out. Null where nothing would change, or for one of devknobs'. */
|
|
31
|
+
export declare function attrEdit(target: EditTarget, element: Element, name: string, value: string | null): Change | null;
|
|
32
|
+
/** The nodes `html` makes, parsed in the element's document as the page's own html would be, scripts left inert. */
|
|
33
|
+
export declare function parseHtml(doc: Document, html: string): Node[];
|
|
34
|
+
/** Nodes as markup, as the browser writes them back: an element's outer html, a comment, a text with `&`, `<` and `>` escaped. */
|
|
35
|
+
export declare function markupOfNodes(nodes: readonly Node[]): string;
|
|
36
|
+
/** Whether nodes carry devknobs' own attribute, on them or anything in them, which no edit makes. */
|
|
37
|
+
export declare function holdsReserved(nodes: readonly Node[]): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* An element written anew: `nodes` in its place. `before` is its markup as
|
|
40
|
+
* the tree copies it, and the edit's `after` the nodes' markup as the
|
|
41
|
+
* browser writes it back, so two edits of one element compare alike. Null
|
|
42
|
+
* where the nodes hold no element, carry devknobs' own attribute, or come to
|
|
43
|
+
* the markup it has. It goes on and comes off only where the element, or the
|
|
44
|
+
* nodes in its place, still stand in the parent it had, in one run.
|
|
45
|
+
*/
|
|
46
|
+
export declare function htmlEdit(target: EditTarget, element: Element, before: string, nodes: readonly Node[]): Change | null;
|
|
47
|
+
/** Bring the rule that hides into the element's document or shadow root, once. */
|
|
48
|
+
export declare function hideStyle(element: Element): void;
|
|
49
|
+
/** An element hidden, or shown again where a hide is on it. `style` brings in the rule that hides. */
|
|
50
|
+
export declare function hideEdit(target: EditTarget, element: Element, style?: (element: Element) => void): Change;
|
|
51
|
+
/**
|
|
52
|
+
* A node deleted: `before` is its markup, `property` what it is in its
|
|
53
|
+
* element. Undo puts it back where it stood, before the node that came after
|
|
54
|
+
* it, or after the one before where that went, or first where it was first.
|
|
55
|
+
* Null for a node with no parent.
|
|
56
|
+
*/
|
|
57
|
+
export declare function deleteEdit(target: EditTarget, node: Node, before: string, property?: string): Change | null;
|
|
58
|
+
/** The element after a node among its parent's, devknobs' own left out. Null at the end. */
|
|
59
|
+
export declare function nextElementOf(node: Node): Element | null;
|
|
60
|
+
/** The element before a node among its parent's, devknobs' own left out. Null at the start. */
|
|
61
|
+
export declare function previousElementOf(node: Node): Element | null;
|
|
62
|
+
/** The first element in a node, devknobs' own left out. */
|
|
63
|
+
export declare function firstElementOf(node: Node): Element | null;
|
|
64
|
+
/**
|
|
65
|
+
* Whether an element can be moved: one in an element, and not the head or
|
|
66
|
+
* body, devknobs' own, one that holds devknobs' own nodes, as the body holds
|
|
67
|
+
* the panel, nor a script, frame or the like, or one that holds one. The
|
|
68
|
+
* root element has a document above it, and stays.
|
|
69
|
+
*/
|
|
70
|
+
export declare function movable(node: Node): node is Element;
|
|
71
|
+
/** Whether an element can take `element` moved into it: on the page, not devknobs' own, not the element or one in it, through shadow roots too, and not one of `EMPTY`. */
|
|
72
|
+
export declare function canHold(parent: Node, element: Element): parent is Element;
|
|
73
|
+
/** An element as a move says it: its tag, with its id and class where it has them. */
|
|
74
|
+
export declare function tagLabel(element: Element): string;
|
|
75
|
+
/** A place in words: `before <li class="x"> in <ul>`, `before the 2nd <li> in <ul>`, or `at the end of <ul>`. */
|
|
76
|
+
export declare function placeWords(parent: Element, next: Element | null): string;
|
|
77
|
+
/**
|
|
78
|
+
* An element moved into `to.parent`, before `to.next`, or at its end with
|
|
79
|
+
* null. `places` are the two places as selectors, read before the move. Null
|
|
80
|
+
* where it cannot move, where the place cannot take it, or where it already
|
|
81
|
+
* stands there. It goes on only where the element still stands where it was,
|
|
82
|
+
* and comes off only where it still stands where it went: undo puts it back
|
|
83
|
+
* before the node that came after it, or after the one before.
|
|
84
|
+
*/
|
|
85
|
+
export declare function moveEdit(target: EditTarget, element: Element, to: {
|
|
86
|
+
parent: Element;
|
|
87
|
+
next: Element | null;
|
|
88
|
+
}, places: {
|
|
89
|
+
from: EditPlace;
|
|
90
|
+
to: EditPlace;
|
|
91
|
+
}): Change | null;
|